Enable EHCI port on rk3288-evb
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.
Doug Anderson (3):
ARM: dts: Turn on USB host vbus on rk3288-evb
ARM: dts: add rk3288 ehci usb devices
ARM: dts: Enable USB host0 (EHCI) on rk3288-evb
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
PATCH 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.
--- arch/arm/boot/dts/rk3288-evb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +18 -0
@@ -35,6 +35,18 @@ debounce-interval = <100>; }; }; + + /* This turns on vbus for both host0 (ehci) and host1 (dwc2) */ + usb_host_vbus_regulator: usb-host-vbus-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_host_vbus>; + regulator-name = "usb-host-vbus"; + regulator-always-on; + regulator-boot-on; + }; }; &i2c0 {
@@ -71,4 +83,10 @@ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + usb-host { + usb_host_vbus: usb-host-vbus { + rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; };
Signature · 1 line
2.0.0.526.g5318336
Re: [PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb
Am Dienstag, 29. Juli 2014, 16:24:31 schrieb Doug Anderson:
Quoted 20 lines
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.
Signed-off-by Doug Anderson <[email protected]>--- arch/arm/boot/dts/rk3288-evb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 749e20d..efd625e 100644arch/arm/boot/dts/rk3288-evb.dtsi +3
-0@@ -35,6 +35,18 @@ debounce-interval = <100>; }; }; + + /* This turns on vbus for both host0 (ehci) and host1 (dwc2) */ + usb_host_vbus_regulator: usb-host-vbus-regulator {
arch/arm/boot/dts/rk3288-evb.dtsi line 50
Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +9
-0+ compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_host_vbus>; + regulator-name = "usb-host-vbus"; + regulator-always-on; + regulator-boot-on; + }; };
It seems I have a slightly outdated schematics pdf for the evb ... and only see the OTG vbus pin, on <&gpio0 12>, but am missing the whole host vbus.
Could you think about finding another name for the handle? For example, in my incomplete evb-schematics the supply coming from the otg regulator is called vcc50_usb and there should be something similar for the host supply, so I'd like something like
vcc50_usbhost: usb-host-vbus-regulator { /* or whatever it gets called */
...
};simply to keep with the supply names defined in the schematics - makes reading easier.
Heiko
Quoted 13 lines
arch/arm/boot/dts/rk3288-evb.dtsi +6
-0&i2c0 {@@ -71,4 +83,10 @@ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + usb-host { + usb_host_vbus: usb-host-vbus { + rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; };
Re: [PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb
Heiko,
Quoted 26 lines · Heiko St?bner
Am Dienstag, 29. Juli 2014, 16:24:31 schrieb Doug Anderson:
Quoted 25 lines
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.
Signed-off-by Doug Anderson <[email protected]>--- arch/arm/boot/dts/rk3288-evb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 749e20d..efd625e 100644arch/arm/boot/dts/rk3288-evb.dtsi +8
-0@@ -35,6 +35,18 @@ debounce-interval = <100>; }; }; + + /* This turns on vbus for both host0 (ehci) and host1 (dwc2) */ + usb_host_vbus_regulator: usb-host-vbus-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_host_vbus>;
Quoted 8 lines
arch/arm/boot/dts/rk3288-evb.dtsi line 50
Quoted 5 lines
arch/arm/boot/dts/rk3288-evb.dtsi +4
-0+ regulator-name = "usb-host-vbus"; + regulator-always-on; + regulator-boot-on; + }; };It seems I have a slightly outdated schematics pdf for the evb ... and only see the OTG vbus pin, on <&gpio0 12>, but am missing the whole host vbus.
I have schematics that claim to be from January 25, 2014 and claim to be rev 1.0. On my schematics:
* GPIO0_B4 (12) = OTG_VBUS_DRV = pin 233 of the mainboard connector
* GPIO0_B6 (14) = HOST_VBUS_DRV = pin 239 of the mainboard connector
On the mainboard schematics I have the OTG signal (233) doesn't actually go to the OTG port. It goes to a debug header and nowhere else. The HOST VBUS controls VBUS on both of the two "host" ports.
Quoted 11 lines
Could you think about finding another name for the handle? For example, in my incomplete evb-schematics the supply coming from the otg regulator is called
vcc50_usband there should be something similar for the host supply, so I'd like something likevcc50_usbhost: usb-host-vbus-regulator { /* or whatever it gets called */ ... };simply to keep with the supply names defined in the schematics - makes reading easier.
I did! ;) ...but I matched my schematics, not yours. Can you provide the date / version number from your schematics and we can see which is newer? Just for reference I was emailed schematics last week but that doesn't necessarily guarantee that they're the newest ones.
Given the above, I'm not planning to spin this patch unless you confirm you want me to. Thanks! :)
-Doug
Re: [PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb
Hi Doug,
Am Mittwoch, 30. Juli 2014, 08:13:52 schrieb Doug Anderson:
Quoted 63 lines · Heiko Stübner
Quoted 36 lines
Am Dienstag, 29. Juli 2014, 16:24:31 schrieb Doug Anderson:
Quoted 35 lines
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.
Signed-off-by Doug Anderson <[email protected]>---
arch/arm/boot/dts/rk3288-evb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 749e20d..efd625e 100644arch/arm/boot/dts/rk3288-evb.dtsi +12
-0@@ -35,6 +35,18 @@ debounce-interval = <100>; }; }; + + /* This turns on vbus for both host0 (ehci) and host1 (dwc2) */ + usb_host_vbus_regulator: usb-host-vbus-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_host_vbus>; + regulator-name = "usb-host-vbus"; + regulator-always-on; + regulator-boot-on; + };Quoted 5 lines
Quoted 1 line
};
It seems I have a slightly outdated schematics pdf for the evb ... and only
see the OTG vbus pin, on <&gpio0 12>, but am missing the whole host vbus.I have schematics that claim to be from January 25, 2014 and claim to be rev 1.0. On my schematics:
*
GPIO0_B4(12) =OTG_VBUS_DRV= pin 233 of the mainboard connector
*GPIO0_B6(14) =HOST_VBUS_DRV= pin 239 of the mainboard connectorOn the mainboard schematics I have the OTG signal (233) doesn't actually go to the OTG port. It goes to a debug header and nowhere else. The HOST VBUS controls VBUS on both of the two "host" ports.
Quoted 10 lines
Could you think about finding another name for the handle? For example, in my incomplete evb-schematics the supply coming from the otg regulator is called
vcc50_usband there should be something similar for the host supply, so I'd like something likevcc50_usbhost: usb-host-vbus-regulator { /* or whatever it gets called */ ... };
Quoted 7 lines
Quoted 2 lines
simply to keep with the supply names defined in the schematics - makes reading easier.
I did! ;) ...but I matched my schematics, not yours. Can you provide the date / version number from your schematics and we can see which is newer? Just for reference I was emailed schematics last week but that doesn't necessarily guarantee that they're the newest ones.
the schematics I have is "RK3288_BETA", REV 0.2, created in 2014/02/12, last changed on 2014/03/04.
At least in my schematics on page 16 of 44, the OTG_VBUS_DRV pin leads to a switch, that gets supplied by VCC50_BOOST and emits the VCC50_USB . So, a later phy node should in the otg case probably have a
whatever-supply = <&vcc50_usb>;
and not
whatever-supply = <&usb_otg_vbus_regulator>
And there I'd guess the host supply will probably be structured similarly - even if I can't see it right now :-) .
Quoted 2 lines
Given the above, I'm not planning to spin this patch unless you confirm you want me to. Thanks! :)
I'd like the regulator handle to be named after the supply name, not after the pin-name :-) .
Heiko
Re: [PATCH 1/3] ARM: dts: Turn on USB host vbus on rk3288-evb
Heiko,
Quoted 69 lines · Heiko St?bner
Hi Doug,
Am Mittwoch, 30. Juli 2014, 08:13:52 schrieb Doug Anderson:
Quoted 66 lines · Heiko St?bner
Quoted 36 lines
Am Dienstag, 29. Juli 2014, 16:24:31 schrieb Doug Anderson:
Quoted 35 lines
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.
Signed-off-by Doug Anderson <[email protected]>---
arch/arm/boot/dts/rk3288-evb.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 749e20d..efd625e 100644arch/arm/boot/dts/rk3288-evb.dtsi +12
-0@@ -35,6 +35,18 @@ debounce-interval = <100>; }; }; + + /* This turns on vbus for both host0 (ehci) and host1 (dwc2) */ + usb_host_vbus_regulator: usb-host-vbus-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_host_vbus>; + regulator-name = "usb-host-vbus"; + regulator-always-on; + regulator-boot-on; + };Quoted 5 lines
Quoted 1 line
};
It seems I have a slightly outdated schematics pdf for the evb ... and only
see the OTG vbus pin, on <&gpio0 12>, but am missing the whole host vbus.I have schematics that claim to be from January 25, 2014 and claim to be rev 1.0. On my schematics:
*
GPIO0_B4(12) =OTG_VBUS_DRV= pin 233 of the mainboard connector
*GPIO0_B6(14) =HOST_VBUS_DRV= pin 239 of the mainboard connectorOn the mainboard schematics I have the OTG signal (233) doesn't actually go to the OTG port. It goes to a debug header and nowhere else. The HOST VBUS controls VBUS on both of the two "host" ports.
Quoted 12 lines
Could you think about finding another name for the handle? For example, in my incomplete evb-schematics the supply coming from the otg regulator is called
vcc50_usband there should be something similar for the host supply, so I'd like something likevcc50_usbhost: usb-host-vbus-regulator { /* or whatever it gets called */ ... };simply to keep with the supply names defined in the schematics - makes reading easier.
Quoted 7 lines
Quoted 4 lines
I did! ;) ...but I matched my schematics, not yours. Can you provide the date / version number from your schematics and we can see which is newer? Just for reference I was emailed schematics last week but that doesn't necessarily guarantee that they're the newest ones.
the schematics I have is "
RK3288_BETA", REV 0.2, created in 2014/02/12, last changed on 2014/03/04.
OK, yours is clearly newer.
Quoted 6 lines
At least in my schematics on page 16 of 44, the
OTG_VBUS_DRVpin leads to a switch, that gets supplied byVCC50_BOOSTand emits theVCC50_USB. So, a later phy node should in the otg case probably have awhatever-supply = <&vcc50_usb>;and not
whatever-supply = <&usb_otg_vbus_regulator>
Ah, nice. I wonder if that's the "2.0" mainboard? I've seen some people with that. I have a "1.0 mainboard".
Quoted 9 lines
And there I'd guess the host supply will probably be structured similarly - even if I can't see it right now :-) .
Quoted 2 lines
Given the above, I'm not planning to spin this patch unless you confirm you want me to. Thanks! :)
I'd like the regulator handle to be named after the supply name, not after the pin-name :-) .
Got it. That means I can use the pin name for the pinctrl, which is nice.
One thing I'm always wary of: hardware designers tend to like to change the names of things from revision to revision.
-Doug
PATCH 2/3 ARM: dts: add rk3288 ehci usb devices
In reply to Doug Andersonrk3288 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.
--- arch/arm/boot/dts/rk3288.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +20 -0
@@ -251,6 +251,26 @@ status = "disabled"; }; + usb_host0_ehci: ehci 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: ehci 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
Re: [PATCH 2/3] ARM: dts: add rk3288 ehci usb devices
Hi,
Quoted 20 lines · Doug Anderson
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.
Signed-off-by Kever Yang <[email protected]>Signed-off-by Doug Anderson <[email protected]>--- arch/arm/boot/dts/rk3288.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)arch/arm/boot/dts/rk3288.dtsi +0
-0
arch/arm/boot/dts/rk3288.dtsi line 254
Quoted 4 lines
arch/arm/boot/dts/rk3288.dtsi +1
-0@@ -251,6 +251,26 @@ status = "disabled"; }; + usb_host0_ehci: ehci at ff500000 {
According to sergei.shtylyov at cogentembedded.com in another thread, this should be "usb at ff500000".
I will fix (and the hsic one) this when I spin the series shortly.
-Doug
PATCH 3/3 ARM: dts: Enable USB host0 (EHCI) on rk3288-evb
In reply to Doug AndersonThis is the top USB port on the evb (the one closest to the Ethernet connector).
--- arch/arm/boot/dts/rk3288-evb.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/rk3288-evb.dtsi +4 -0
@@ -90,3 +90,7 @@ }; }; }; + +&usb_host0_ehci { + status = "okay"; +};
Signature · 1 line
2.0.0.526.g5318336
Re: [PATCH 3/3] ARM: dts: Enable USB host0 (EHCI) on rk3288-evb
Am Dienstag, 29. Juli 2014, 16:24:33 schrieb Doug Anderson:
Quoted 5 lines
This is the top USB port on the evb (the one closest to the Ethernet connector).
Signed-off-by Doug Anderson <[email protected]>Signed-off-by Kever Yang <[email protected]>
shouldn't the signed-offs be the other way around, like in patch 2/3?
Quoted 16 lines
--- arch/arm/boot/dts/rk3288-evb.dtsi | 4 ++++ 1 file changed, 4 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex efd625e..fcdc64e 100644arch/arm/boot/dts/rk3288-evb.dtsi +4
-0@@ -90,3 +90,7 @@ }; }; }; + +&usb_host0_ehci { + status = "okay"; +};
Re: [PATCH 3/3] ARM: dts: Enable USB host0 (EHCI) on rk3288-evb
Heiko,
Quoted 8 lines · Heiko St?bner
Am Dienstag, 29. Juli 2014, 16:24:33 schrieb Doug Anderson:
Quoted 5 lines
This is the top USB port on the evb (the one closest to the Ethernet connector).
Signed-off-by Doug Anderson <[email protected]>Signed-off-by Kever Yang <[email protected]>shouldn't the signed-offs be the other way around, like in patch 2/3?
I wasn't aware that the order was too relevant, but I'll happily swap them. I generally try to list them based on contribution. Things get complicated when lots of WIP patches are sent around and then someone eventually puts things together. My work enabling the EHCI port was based on something Kever sent me in email, so I felt he should have SoB. ...but cleaning it up / organizing was done by me. Probably should be this to get it totally right:
* Patch #1: Author and SoB are me, since Kever just pointed me to the GPIO number
* Patch #2: Probably should be author Kever, first SoB Kever, second SoB me
* Patch #3: Probably should be author me, first SoB me, second SoB Kever
...in that case I just need to tweak the author of Patch #2 and leave everything else the same. I'll plan to do that when I repost.
...but I don't really care a whole lot and I'm OK with any authorship of patch set #2/#3 and any SoB order of patch set #2/#3. Just let me know which you prefer! :)
-Doug