arm64: dts: ls1046a: use a pseudo-bus to constrain usb and sata dma size
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>
Thu, 15 Sep 2022 23:34:29 +0000 (18:34 -0500)
committerShawn Guo <shawnguo@kernel.org>
Sat, 17 Sep 2022 08:35:24 +0000 (16:35 +0800)
Wrap the usb and sata controllers in an intermediate simple-bus and use
it to constrain the dma address size of these usb controllers to the 40
bits that they generate toward the interconnect.  This is required
because the SoC uses 48 bits address sizes and this mismatch would lead
to smmu context faults because the usb generates 40-bit addresses while
the smmu page tables are populated with 48-bit wide addresses.

Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi

index e406499..132d789 100644 (file)
                                            QORIQ_CLK_PLL_DIV(2)>;
                };
 
-               usb0: usb@2f00000 {
-                       compatible = "snps,dwc3";
-                       reg = <0x0 0x2f00000 0x0 0x10000>;
-                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
-                       dr_mode = "host";
-                       snps,quirk-frame-length-adjustment = <0x20>;
-                       snps,dis_rxdet_inp3_quirk;
-                       snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
-                       usb3-lpm-capable;
-               };
-
-               usb1: usb@3000000 {
-                       compatible = "snps,dwc3";
-                       reg = <0x0 0x3000000 0x0 0x10000>;
-                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
-                       dr_mode = "host";
-                       snps,quirk-frame-length-adjustment = <0x20>;
-                       snps,dis_rxdet_inp3_quirk;
-                       snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
-                       usb3-lpm-capable;
-               };
-
-               usb2: usb@3100000 {
-                       compatible = "snps,dwc3";
-                       reg = <0x0 0x3100000 0x0 0x10000>;
-                       interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
-                       dr_mode = "host";
-                       snps,quirk-frame-length-adjustment = <0x20>;
-                       snps,dis_rxdet_inp3_quirk;
-                       snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
-                       usb3-lpm-capable;
-               };
-
-               sata: sata@3200000 {
-                       compatible = "fsl,ls1046a-ahci";
-                       reg = <0x0 0x3200000 0x0 0x10000>,
-                               <0x0 0x20140520 0x0 0x4>;
-                       reg-names = "ahci", "sata-ecc";
-                       interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
-                                           QORIQ_CLK_PLL_DIV(2)>;
+               aux_bus: aux_bus {
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       compatible = "simple-bus";
+                       ranges;
+                       dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x00000000>;
+
+                       usb0: usb@2f00000 {
+                               compatible = "snps,dwc3";
+                               reg = <0x0 0x2f00000 0x0 0x10000>;
+                               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+                               dr_mode = "host";
+                               snps,quirk-frame-length-adjustment = <0x20>;
+                               snps,dis_rxdet_inp3_quirk;
+                               snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+                               usb3-lpm-capable;
+                       };
+
+                       usb1: usb@3000000 {
+                               compatible = "snps,dwc3";
+                               reg = <0x0 0x3000000 0x0 0x10000>;
+                               interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                               dr_mode = "host";
+                               snps,quirk-frame-length-adjustment = <0x20>;
+                               snps,dis_rxdet_inp3_quirk;
+                               snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+                               usb3-lpm-capable;
+                       };
+
+                       usb2: usb@3100000 {
+                               compatible = "snps,dwc3";
+                               reg = <0x0 0x3100000 0x0 0x10000>;
+                               interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+                               dr_mode = "host";
+                               snps,quirk-frame-length-adjustment = <0x20>;
+                               snps,dis_rxdet_inp3_quirk;
+                               snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
+                               usb3-lpm-capable;
+                       };
+
+                       sata: sata@3200000 {
+                               compatible = "fsl,ls1046a-ahci";
+                               reg = <0x0 0x3200000 0x0 0x10000>,
+                                       <0x0 0x20140520 0x0 0x4>;
+                               reg-names = "ahci", "sata-ecc";
+                               interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
+                                                   QORIQ_CLK_PLL_DIV(2)>;
+                       };
                };
 
                msi1: msi-controller@1580000 {