Skip to contentSkip to conversation

arm64: dts: broadcom: bcm4908: describe USB PHY

PATCH In review Rafał Miłecki 2 participants 2 messages Dec 15, 2020 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: broadcom: bcm4908: describe USB PHY

From: Rafał Miłecki <[email protected]>

It's (nearly?) identical PHY as in the STB line and has to be initialized the same way.

---
 .../dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts |  4 ++++
 arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi   | 13 +++++++++++++
 2 files changed, 17 insertions(+)
arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts +4 -0
index ee3ed612274c..e2bb0b04b524 100644
@@ -26,6 +26,10 @@ wps {
 	};
 };
 
+&usb_phy {
+	brcm,ioc = <1>;
+};
+
 &nandcs {
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +13 -0
index b5b772a9a51b..a96ec9b85d1f 100644
@@ -110,10 +110,21 @@ soc {
 		#size-cells = <1>;
 		ranges = <0x00 0x00 0x80000000 0x10000>;
 
+		usb_phy: usb-phy@c200 {
+			compatible = "brcm,brcmstb-usb-phy";
+			reg = <0xc200 0x100>;
+			reg-names = "crtl";
+			dr_mode = "host";
+			brcm,has-xhci;
+			brcm,has-eohci;
+			#phy-cells = <1>;
+		};
+
 		usb@c300 {
 			compatible = "generic-ehci";
 			reg = <0xc300 0x100>;
 			interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&usb_phy PHY_TYPE_USB2>;
 			status = "disabled";
 		};
 
@@ -121,6 +132,7 @@ usb@c400 {
 			compatible = "generic-ohci";
 			reg = <0xc400 0x100>;
 			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&usb_phy PHY_TYPE_USB2>;
 			status = "disabled";
 		};
 
@@ -128,6 +140,7 @@ usb@d000 {
 			compatible = "generic-xhci";
 			reg = <0xd000 0x8c8>;
 			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&usb_phy PHY_TYPE_USB3>;
 			status = "disabled";
 		};
 	};
Signature · 1 line
2.26.2
#1 lore raw
Quoted 31 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

It's (nearly?) identical PHY as in the STB line and has to be initialized the same way.

---
 .../dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts |  4 ++++
 arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi   | 13 +++++++++++++
 2 files changed, 17 insertions(+)
arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts +4 -0
index ee3ed612274c..e2bb0b04b524 100644
@@ -26,6 +26,10 @@ wps {
 	};
 };
 
+&usb_phy {
+	brcm,ioc = <1>;
+};
+
 &nandcs {
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +0 -0
index b5b772a9a51b..a96ec9b85d1f 100644

arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi soc { · line 114

Quoted 5 lines
arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +2 -0
@@ -110,10 +110,21 @@ soc {
 		#size-cells = <1>;
 		ranges = <0x00 0x00 0x80000000 0x10000>;
 
+		usb_phy: usb-phy@c200 {
+			compatible = "brcm,brcmstb-usb-phy";

It is probably prudent to define a compatible string for the 4908 just in case we need to key off that chip id within the USB PHY driver. Other than that, this looks good to me.

Signature · 1 line
Florian