Skip to contentSkip to conversation

Enable EHCI port on rk3288-evb

PATCH New Doug Anderson 1 participant 4 messages Jul 30, 2014 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover Enable EHCI port on rk3288-evb

This series enables the EHCI port on the rk3288-evb boards. A later patch series (from Kever) will enable the dwc2 ports.

Changes in v2:
- usb_host_vbus => vcc_host to match supply name, not pin name.
- pin name now matches in name in schematic
- Kever is now the author
- Node is now named usb

Doug Anderson (2):
ARM: dts: Turn on USB host vbus on rk3288-evb
ARM: dts: Enable USB host0 (EHCI) on rk3288-evb

Kever Yang (1):
ARM: dts: add rk3288 ehci usb devices

 arch/arm/boot/dts/rk3288-evb.dtsi | 22 ++++++++++++++++++++++
 arch/arm/boot/dts/rk3288.dtsi     | 20 ++++++++++++++++++++
 2 files changed, 42 insertions(+)
Signature · 1 line
2.0.0.526.g5318336
#1 lore raw

PATCH v2 1/3 ARM: dts: Turn on USB host vbus on rk3288-evb

There is no phy driver that works on the Rockchip board for either USB host port yet. For now just hardcode the vbus signal to be on all the time which makes both the dwc2 host and the EHCI port work.

---
Changes in v2:
- usb_host_vbus => vcc_host to match supply name, not pin name.
- pin name now matches in name in schematic

 arch/arm/boot/dts/rk3288-evb.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +18 -0
index 749e20d..e6c5b03 100644
@@ -35,6 +35,18 @@
 			debounce-interval = <100>;
 		};
 	};
+
+	/* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
+	vcc_host: vcc-host-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&host_vbus_drv>;
+		regulator-name = "vcc_host";
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &i2c0 {
@@ -71,4 +83,10 @@
 			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
+
+	usb {
+		host_vbus_drv: host-vbus-drv {
+			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
Signature · 1 line
2.0.0.526.g5318336
#2 lore raw

PATCH v2 2/3 ARM: dts: add rk3288 ehci usb devices

In reply to Doug Anderson

From: Kever Yang <[email protected]>

rk3288 has two kind of usb controller; this adds the ehci variant for host0 and hsic.

At the moment we don't add any phys for these controllers, but the default settings seem to work OK.

There is a hardware problem in ohci controller which make it unavailable and host0 controller can only support high-speed devices.

---
Changes in v2:
- Kever is now the author
- Node is now named usb

 arch/arm/boot/dts/rk3288.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +20 -0
index 3ef8951..e7cb008 100644
@@ -251,6 +251,26 @@
 		status = "disabled";
 	};
 
+	usb_host0_ehci: usb at ff500000 {
+		compatible = "generic-ehci";
+		reg = <0xff500000 0x100>;
+		interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_USBHOST0>;
+		clock-names = "usbhost";
+		status = "disabled";
+	};
+
+	/* NOTE: ohci at ff520000 doesn't actually work on hardware */
+
+	usb_hsic: usb at ff5c0000 {
+		compatible = "generic-ehci";
+		reg = <0xff5c0000 0x100>;
+		interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_HSIC>;
+		clock-names = "usbhost";
+		status = "disabled";
+	};
+
 	gic: interrupt-controller at ffc01000 {
 		compatible = "arm,gic-400";
 		interrupt-controller;
Signature · 1 line
2.0.0.526.g5318336
#3 lore raw

PATCH v2 3/3 ARM: dts: Enable USB host0 (EHCI) on rk3288-evb

In reply to Doug Anderson

This is the top USB port on the evb (the one closest to the Ethernet connector).

---
Changes in v2: None

 arch/arm/boot/dts/rk3288-evb.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +4 -0
index e6c5b03..4f57209 100644
@@ -90,3 +90,7 @@
 		};
 	};
 };
+
+&usb_host0_ehci {
+	status = "okay";
+};
Signature · 1 line
2.0.0.526.g5318336