Skip to contentSkip to conversation

ARM: dts: NSP: dma-coherent and USB3 changes

PATCH New Jon Mason 1 participant 4 messages Jul 31, 2017

Subsystems (2)
lore
Share & tools
lore

Jon Mason

author
#0 lore raw

v2 cover ARM: dts: NSP: dma-coherent and USB3 changes

Changes in v2:
* Removed pl330 and srab dma-coherent entries due to concerns that they were invalid

Add dma-coherent to the relevant DT entries, and add USB3 support

Jon Mason (3):
ARM: dts: NSP: Add dma-coherent to relevant DT entries
ARM: dts: NSP: Rearrage USB entries
ARM: dts: NSP: Add USB3 and USB3 PHY to NSP

 arch/arm/boot/dts/bcm-nsp.dtsi     | 59 +++++++++++++++++++++++++++++---------
 arch/arm/boot/dts/bcm958522er.dts  |  8 ++++++
 arch/arm/boot/dts/bcm958525er.dts  |  8 ++++++
 arch/arm/boot/dts/bcm958525xmc.dts |  8 ++++++
 arch/arm/boot/dts/bcm958622hr.dts  |  8 ++++++
 arch/arm/boot/dts/bcm958623hr.dts  |  8 ++++++
 arch/arm/boot/dts/bcm958625hr.dts  |  8 ++++++
 arch/arm/boot/dts/bcm958625k.dts   |  8 ++++++
 8 files changed, 101 insertions(+), 14 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 1/3 ARM: dts: NSP: Add dma-coherent to relevant DT entries

Cache related issues with DMA rings and performance issues related to caching are being caused by not properly setting the "dma-coherent" flag in the device tree entries. Adding it here to correct the issue.

Fixes 3107fa5bcfb2 ("ARM: dts: NSP: Add SD/MMC support")
Fixes 13d04f20935c ("ARM: dts: NSP: Add AMAC entries")
Fixes 5aeda7bf8a1e ("ARM: dts: NSP: Add and enable amac2")
Fixes 17d517172300 ("ARM: dts: NSP: Add mailbox (PDC) to NSP")
Fixes 1d8ece6639e1 ("ARM: dts: NSP: Add EHCI/OHCI USB nodes to device tree")
Fixes 0f9f27a36d09 ("ARM: dts: NSP: Add I2C support to the DT")
Fixes 8dbcad020f2e ("ARM: dts: nsp: Add sata device tree entry")
Fixes 522199029fdc ("ARM: dts: NSP: Fix PCIE DT issue")
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +12 -0
index 7204d1def23d..c82313a677d9 100644
@@ -215,6 +215,7 @@
 			interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
 			sdhci,auto-cmd12;
 			clocks = <&lcpll0 BCM_NSP_LCPLL0_SDIO_CLK>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -224,6 +225,7 @@
 			      <0x110000 0x1000>;
 			reg-names = "amac_base", "idm_base";
 			interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -233,6 +235,7 @@
 			      <0x111000 0x1000>;
 			reg-names = "amac_base", "idm_base";
 			interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -242,6 +245,7 @@
 			      <0x112000 0x1000>;
 			reg-names = "amac_base", "idm_base";
 			interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -252,6 +256,7 @@
 			#mbox-cells = <1>;
 			brcm,rx-status-len = <32>;
 			brcm,use-bcm-hdr;
+			dma-coherent;
 		};
 
 		nand: nand at 26000 {
@@ -325,6 +330,7 @@
 			compatible = "generic-ehci";
 			reg = <0x2a000 0x100>;
 			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -332,6 +338,7 @@
 			compatible = "generic-ohci";
 			reg = <0x2b000 0x100>;
 			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -376,6 +383,7 @@
 			#size-cells = <0>;
 			interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
 			clock-frequency = <100000>;
+			dma-coherent;
 			status = "disabled";
 		};
 
@@ -446,6 +454,7 @@
 			interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
 			#size-cells = <0>;
+			dma-coherent;
 			status = "disabled";
 
 			sata0: sata-port at 0 {
@@ -483,6 +492,7 @@
 		 */
 		ranges = <0x82000000 0 0x08000000 0x08000000 0 0x8000000>;
 
+		dma-coherent;
 		status = "disabled";
 
 		msi-parent = <&msi0>;
@@ -519,6 +529,7 @@
 		 */
 		ranges = <0x82000000 0 0x40000000 0x40000000 0 0x8000000>;
 
+		dma-coherent;
 		status = "disabled";
 
 		msi-parent = <&msi1>;
@@ -555,6 +566,7 @@
 		 */
 		ranges = <0x82000000 0 0x48000000 0x48000000 0 0x8000000>;
 
+		dma-coherent;
 		status = "disabled";
 
 		msi-parent = <&msi2>;
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH v2 2/3 ARM: dts: NSP: Rearrage USB entries

In reply to Jon Mason

The rest of the DTSI file is in incrementing addresses, but the USB OHCI/ECHI entries are out of sequence. Move them to put them in the proper place.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
arch/arm/boot/dts/bcm-nsp.dtsi +16 -16
index c82313a677d9..9feb3689d191 100644
@@ -302,6 +302,22 @@
 			#size-cells = <0>;
 		};
 
+		ehci0: usb at 2a000 {
+			compatible = "generic-ehci";
+			reg = <0x2a000 0x100>;
+			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
+			status = "disabled";
+		};
+
+		ohci0: usb at 2b000 {
+			compatible = "generic-ohci";
+			reg = <0x2b000 0x100>;
+			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+			dma-coherent;
+			status = "disabled";
+		};
+
 		crypto at 2f000 {
 			compatible = "brcm,spum-nsp-crypto";
 			reg = <0x2f000 0x900>;
@@ -326,22 +342,6 @@
 			status = "disabled";
 		};
 
-		ehci0: usb at 2a000 {
-			compatible = "generic-ehci";
-			reg = <0x2a000 0x100>;
-			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
-			dma-coherent;
-			status = "disabled";
-		};
-
-		ohci0: usb at 2b000 {
-			compatible = "generic-ohci";
-			reg = <0x2b000 0x100>;
-			interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
-			dma-coherent;
-			status = "disabled";
-		};
-
 		rng: rng at 33000 {
 			compatible = "brcm,bcm-nsp-rng";
 			reg = <0x33000 0x14>;
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH v2 3/3 ARM: dts: NSP: Add USB3 and USB3 PHY to NSP

In reply to Jon Mason

This uses the existing Northstar USB3 PHY driver to enable the USB3 ports on NSP.

---
 arch/arm/boot/dts/bcm-nsp.dtsi     | 19 +++++++++++++++++++
 arch/arm/boot/dts/bcm958522er.dts  |  8 ++++++++
 arch/arm/boot/dts/bcm958525er.dts  |  8 ++++++++
 arch/arm/boot/dts/bcm958525xmc.dts |  8 ++++++++
 arch/arm/boot/dts/bcm958622hr.dts  |  8 ++++++++
 arch/arm/boot/dts/bcm958623hr.dts  |  8 ++++++++
 arch/arm/boot/dts/bcm958625hr.dts  |  8 ++++++++
 arch/arm/boot/dts/bcm958625k.dts   |  8 ++++++++
 8 files changed, 75 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +19 -0
index 9feb3689d191..dff66974feed 100644
@@ -302,6 +302,16 @@
 			#size-cells = <0>;
 		};
 
+		xhci: usb at 29000 {
+			compatible = "generic-xhci";
+			reg = <0x29000 0x1000>;
+			interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&usb3_phy>;
+			phy-names = "usb3-phy";
+			dma-coherent;
+			status = "disabled";
+		};
+
 		ehci0: usb at 2a000 {
 			compatible = "generic-ehci";
 			reg = <0x2a000 0x100>;
@@ -469,6 +479,15 @@
 				phy-names = "sata-phy";
 			};
 		};
+
+		usb3_phy: usb3-phy at 104000 {
+			compatible = "brcm,ns-bx-usb3-phy";
+			reg = <0x104000 0x1000>,
+			      <0x032000 0x1000>;
+			reg-names = "dmp", "ccb-mii";
+			#phy-cells = <0>;
+			status = "disabled";
+		};
 	};
 
 	pcie0: pcie at 18012000 {
arch/arm/boot/dts/bcm958522er.dts +8 -0
index f5c42962c201..f9dd342cc2ae 100644
@@ -170,3 +170,11 @@
 &uart0 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
arch/arm/boot/dts/bcm958525er.dts +8 -0
index efcb1f67bdad..374508a9cfbf 100644
@@ -182,3 +182,11 @@
 &uart0 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
arch/arm/boot/dts/bcm958525xmc.dts +8 -0
index b335ce02e32f..403250c5ad8e 100644
@@ -202,3 +202,11 @@
 &uart0 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
arch/arm/boot/dts/bcm958622hr.dts +8 -0
index 16ab2d82a14b..fd8b8c689ffe 100644
@@ -219,3 +219,11 @@
 &uart0 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
arch/arm/boot/dts/bcm958623hr.dts +8 -0
index 9b921c6aa8f8..3bc50849d013 100644
@@ -227,3 +227,11 @@
 &uart0 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
arch/arm/boot/dts/bcm958625hr.dts +8 -0
index 006b08e41a3b..d94d14b3c745 100644
@@ -229,3 +229,11 @@
 &uart0 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
arch/arm/boot/dts/bcm958625k.dts +8 -0
index 64740f85cf4c..2cf2392483b2 100644
@@ -264,3 +264,11 @@
 &uart1 {
 	status = "okay";
 };
+
+&usb3_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
Signature · 1 line
2.7.4