1 From a6a86473350c7dcbae61afa1e926941d76ca17ed Mon Sep 17 00:00:00 2001
2 From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
3 Date: Thu, 20 Sep 2018 13:46:54 +0300
4 Subject: [PATCH] arm64: dts: ls104x: use a pseudo-bus to constrain usb dma
7 Wrap the usb controllers in an intermediate simple-bus and use it to
8 constrain the dma address size of these usb controllers to the 40 bits
9 that they generate toward the interconnect.
10 This is required because the SoC uses 48 bits address sizes and this
11 mismatch would lead to smmu context faults because the usb generates
12 40-bit addresses while the smmu page tables are populated with 48-bit
15 Suggested-by: Robin Murphy <robin.murphy@arm.com>
16 Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
18 arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 82 ++++++++++++++------------
19 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 76 +++++++++++++-----------
20 2 files changed, 87 insertions(+), 71 deletions(-)
22 --- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
23 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
28 - usb0: usb3@2f00000 {
29 - compatible = "snps,dwc3";
30 - reg = <0x0 0x2f00000 0x0 0x10000>;
31 - interrupts = <0 60 0x4>;
33 - snps,quirk-frame-length-adjustment = <0x20>;
34 - snps,dis_rxdet_inp3_quirk;
36 - snps,dis-u1u2-when-u3-quirk;
37 - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
40 + usb_aux_bus: usb_aux_bus {
41 + #address-cells = <2>;
43 + compatible = "simple-bus";
45 + dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x00000000>;
47 - usb1: usb3@3000000 {
48 - compatible = "snps,dwc3";
49 - reg = <0x0 0x3000000 0x0 0x10000>;
50 - interrupts = <0 61 0x4>;
52 - snps,quirk-frame-length-adjustment = <0x20>;
53 - snps,dis_rxdet_inp3_quirk;
55 - snps,dis-u1u2-when-u3-quirk;
56 - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
59 + usb0: usb3@2f00000 {
60 + compatible = "snps,dwc3";
61 + reg = <0x0 0x2f00000 0x0 0x10000>;
62 + interrupts = <0 60 0x4>;
64 + snps,quirk-frame-length-adjustment = <0x20>;
65 + snps,dis_rxdet_inp3_quirk;
67 + snps,dis-u1u2-when-u3-quirk;
68 + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
72 + usb1: usb3@3000000 {
73 + compatible = "snps,dwc3";
74 + reg = <0x0 0x3000000 0x0 0x10000>;
75 + interrupts = <0 61 0x4>;
77 + snps,quirk-frame-length-adjustment = <0x20>;
78 + snps,dis_rxdet_inp3_quirk;
80 + snps,dis-u1u2-when-u3-quirk;
81 + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
85 - usb2: usb3@3100000 {
86 - compatible = "snps,dwc3";
87 - reg = <0x0 0x3100000 0x0 0x10000>;
88 - interrupts = <0 63 0x4>;
90 - snps,quirk-frame-length-adjustment = <0x20>;
91 - snps,dis_rxdet_inp3_quirk;
93 - snps,dis-u1u2-when-u3-quirk;
94 - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
96 + usb2: usb3@3100000 {
97 + compatible = "snps,dwc3";
98 + reg = <0x0 0x3100000 0x0 0x10000>;
99 + interrupts = <0 63 0x4>;
101 + snps,quirk-frame-length-adjustment = <0x20>;
102 + snps,dis_rxdet_inp3_quirk;
104 + snps,dis-u1u2-when-u3-quirk;
105 + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
111 --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
112 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
113 @@ -624,40 +624,48 @@
117 - usb0: usb@2f00000 {
118 - compatible = "snps,dwc3";
119 - reg = <0x0 0x2f00000 0x0 0x10000>;
120 - interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
122 - snps,quirk-frame-length-adjustment = <0x20>;
123 - snps,dis_rxdet_inp3_quirk;
124 - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
126 - snps,dis-u1u2-when-u3-quirk;
128 + usb_aux_bus: usb_aux_bus {
129 + #address-cells = <2>;
131 + compatible = "simple-bus";
133 + dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x00000000>;
135 - usb1: usb@3000000 {
136 - compatible = "snps,dwc3";
137 - reg = <0x0 0x3000000 0x0 0x10000>;
138 - interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
140 - snps,quirk-frame-length-adjustment = <0x20>;
141 - snps,dis_rxdet_inp3_quirk;
142 - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
144 - snps,dis-u1u2-when-u3-quirk;
146 + usb0: usb@2f00000 {
147 + compatible = "snps,dwc3";
148 + reg = <0x0 0x2f00000 0x0 0x10000>;
149 + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
151 + snps,quirk-frame-length-adjustment = <0x20>;
152 + snps,dis_rxdet_inp3_quirk;
153 + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
155 + snps,dis-u1u2-when-u3-quirk;
158 + usb1: usb@3000000 {
159 + compatible = "snps,dwc3";
160 + reg = <0x0 0x3000000 0x0 0x10000>;
161 + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
163 + snps,quirk-frame-length-adjustment = <0x20>;
164 + snps,dis_rxdet_inp3_quirk;
165 + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
167 + snps,dis-u1u2-when-u3-quirk;
170 - usb2: usb@3100000 {
171 - compatible = "snps,dwc3";
172 - reg = <0x0 0x3100000 0x0 0x10000>;
173 - interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
175 - snps,quirk-frame-length-adjustment = <0x20>;
176 - snps,dis_rxdet_inp3_quirk;
177 - snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
179 - snps,dis-u1u2-when-u3-quirk;
180 + usb2: usb@3100000 {
181 + compatible = "snps,dwc3";
182 + reg = <0x0 0x3100000 0x0 0x10000>;
183 + interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
185 + snps,quirk-frame-length-adjustment = <0x20>;
186 + snps,dis_rxdet_inp3_quirk;
187 + snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
189 + snps,dis-u1u2-when-u3-quirk;