Skip to contentSkip to conversation

ARM: dts: rockchip: Add usb host0 ohci node for rk3288

PATCH Superseded Jagan Teki 2 participants 2 messages Jul 2, 2020

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/1 ARM: dts: rockchip: Add usb host0 ohci node for rk3288

rk3288 and rk3288w have a usb host0 ohci controller.

Although rk3288 ohci doesn't actually work on hardware, but rk3288w ohci can work well.

So add usb host0 ohci node in rk3288 dtsi and the quirk in ohci platform driver will disable ohci on rk3288.

The bootloader must update the compatible in order to bypass host0_ohci in legacy rk3288 platform.

---
Note:
- U-Boot patch for compatible update
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

 arch/arm/boot/dts/rk3288.dtsi | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3288.dtsi +13 -1
index 0cd88774db95..fd0066d07dfc 100644
@@ -614,7 +614,19 @@ usb_host0_ehci: usb@ff500000 {
 		status = "disabled";
 	};
 
-	/* NOTE: ohci@ff520000 doesn't actually work on hardware */
+	/**
+	 * NOTE: ohci@ff520000 doesn't actually work on hardware
+	 * hardware, but can work on rk3288w hardware.
+	 */
+	usb_host0_ohci: usb@ff520000 {
+		compatible = "generic-ohci";
+		reg = <0x0 0xff520000 0x0 0x100>;
+		interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_USBHOST0>;
+		phys = <&usbphy1>;
+		phy-names = "usb";
+		status = "disabled";
+	};
 
 	usb_host1: usb@ff540000 {
 		compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb",
Signature · 1 line
2.25.1
#1 lore raw
Quoted 26 lines · Jagan Teki

rk3288 and rk3288w have a usb host0 ohci controller.

Although rk3288 ohci doesn't actually work on hardware, but rk3288w ohci can work well.

So add usb host0 ohci node in rk3288 dtsi and the quirk in ohci platform driver will disable ohci on rk3288.

The bootloader must update the compatible in order to bypass host0_ohci in legacy rk3288 platform.

---
Note:
- U-Boot patch for compatible update
https://patchwork.ozlabs.org/project/uboot/patch/20200702084820.35942-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org/

  arch/arm/boot/dts/rk3288.dtsi | 14 +++++++++++++-
  1 file changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3288.dtsi +0 -0
index 0cd88774db95..fd0066d07dfc 100644

arch/arm/boot/dts/rk3288.dtsi usb_host0_ehci: usb@ff500000 { · line 620

Quoted 8 lines
arch/arm/boot/dts/rk3288.dtsi +4 -1
@@ -614,7 +614,19 @@ usb_host0_ehci: usb@ff500000 {
  		status = "disabled";
  	};
 
-	/* NOTE: ohci@ff520000 doesn't actually work on hardware */
+	/**
+	 * NOTE: ohci@ff520000 doesn't actually work on hardware
+	 * hardware, but can work on rk3288w hardware.
+	 */

Hardware hardware, hardware - seems like things got a bit mangled there ;)

How about simply something like this?:

	/* NOTE: doesn't work on RK3288, but fixed on RK3288W */

Robin.

Quoted 13 lines
arch/arm/boot/dts/rk3288.dtsi +9 -0
+	usb_host0_ohci: usb@ff520000 {
+		compatible = "generic-ohci";
+		reg = <0x0 0xff520000 0x0 0x100>;
+		interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_USBHOST0>;
+		phys = <&usbphy1>;
+		phy-names = "usb";
+		status = "disabled";
+	};
 
  	usb_host1: usb@ff540000 {
  		compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb",