Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594697 > unrolled thread
| Started by | Anand Moon <linux.amoon@gmail.com> |
|---|---|
| First post | 2017-03-07 23:20 +0100 |
| Last post | 2017-03-11 07:50 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes Anand Moon <linux.amoon@gmail.com> - 2017-03-07 23:20 +0100
Re: [PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes Anand Moon <linux.amoon@gmail.com> - 2017-03-08 18:30 +0100
Re: [PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes Neil Armstrong <narmstrong@baylibre.com> - 2017-03-09 14:30 +0100
Re: [PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes Anand Moon <linux.amoon@gmail.com> - 2017-03-09 19:00 +0100
Re: [PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes Martin Blumenstingl <martin.blumenstingl@googlemail.com> - 2017-03-09 20:40 +0100
Re: [PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes Anand Moon <linux.amoon@gmail.com> - 2017-03-11 07:50 +0100
| From | Anand Moon <linux.amoon@gmail.com> |
|---|---|
| Date | 2017-03-07 23:20 +0100 |
| Subject | [PATCH] ARM64: dts: meson-gxbb-odroidc2: enable USB Host Nodes |
| Message-ID | <tivCx-5Bp-3@gated-at.bofh.it> |
From: Anand Moon <linux.amoon@gmail.com>
update the regulator supply nodes for usb host to
enable usb host on odroid-c2
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
root@odroid64:/usr/src/odroidxu3-4.y-devel# lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index c59403a..304b676 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -64,6 +64,18 @@
reg = <0x0 0x0 0x0 0x80000000>;
};
+ usb_host_pwr: regulator-usb-pwrs {
+ compatible = "regulator-fixed";
+
+ regulator-name = "USB_HOST_PWR";
+
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+
+ gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
usb_otg_pwr: regulator-usb-pwrs {
compatible = "regulator-fixed";
@@ -184,6 +196,7 @@
&usb1_phy {
status = "okay";
+ phy-supply = <&usb_host_pwr>;
};
&usb0 {
--
2.7.4
[toc] | [next] | [standalone]
| From | Anand Moon <linux.amoon@gmail.com> |
|---|---|
| Date | 2017-03-08 18:30 +0100 |
| Message-ID | <tiNzs-1fj-27@gated-at.bofh.it> |
| In reply to | #1594697 |
Hi All,
On 8 March 2017 at 02:06, Anand Moon <linux.amoon@gmail.com> wrote:
> From: Anand Moon <linux.amoon@gmail.com>
>
> update the regulator supply nodes for usb host to
> enable usb host on odroid-c2
>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> root@odroid64:/usr/src/odroidxu3-4.y-devel# lsusb -t
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
> |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
> |__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
> |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
> |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
> ---
> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index c59403a..304b676 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -64,6 +64,18 @@
> reg = <0x0 0x0 0x0 0x80000000>;
> };
>
> + usb_host_pwr: regulator-usb-pwrs {
> + compatible = "regulator-fixed";
> +
> + regulator-name = "USB_HOST_PWR";
> +
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> +
> + gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + };
> +
> usb_otg_pwr: regulator-usb-pwrs {
> compatible = "regulator-fixed";
>
> @@ -184,6 +196,7 @@
>
> &usb1_phy {
> status = "okay";
> + phy-supply = <&usb_host_pwr>;
> };
>
> &usb0 {
> --
> 2.7.4
>
Please ignore this patch, It not working.
I will try to submit a new patch.
Best Regards
-Anand Moon
[toc] | [prev] | [next] | [standalone]
| From | Neil Armstrong <narmstrong@baylibre.com> |
|---|---|
| Date | 2017-03-09 14:30 +0100 |
| Message-ID | <tj6iK-5Jn-13@gated-at.bofh.it> |
| In reply to | #1595406 |
On 03/08/2017 06:22 PM, Anand Moon wrote:
> Hi All,
>
> On 8 March 2017 at 02:06, Anand Moon <linux.amoon@gmail.com> wrote:
>> From: Anand Moon <linux.amoon@gmail.com>
>>
>> update the regulator supply nodes for usb host to
>> enable usb host on odroid-c2
>>
>> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
>> ---
>> root@odroid64:/usr/src/odroidxu3-4.y-devel# lsusb -t
>> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
>> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>> |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
>> |__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
>> |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>> |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>> ---
>> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
>> index c59403a..304b676 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
>> @@ -64,6 +64,18 @@
>> reg = <0x0 0x0 0x0 0x80000000>;
>> };
>>
>> + usb_host_pwr: regulator-usb-pwrs {
>> + compatible = "regulator-fixed";
>> +
>> + regulator-name = "USB_HOST_PWR";
>> +
>> + regulator-min-microvolt = <5000000>;
>> + regulator-max-microvolt = <5000000>;
>> +
>> + gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
>> + enable-active-high;
>> + };
>> +
>> usb_otg_pwr: regulator-usb-pwrs {
>> compatible = "regulator-fixed";
>>
>> @@ -184,6 +196,7 @@
>>
>> &usb1_phy {
>> status = "okay";
>> + phy-supply = <&usb_host_pwr>;
>> };
>>
>> &usb0 {
>> --
>> 2.7.4
>>
>
> Please ignore this patch, It not working.
> I will try to submit a new patch.
>
> Best Regards
> -Anand Moon
>
Hi Anand,
For this specific use case, the only way to manage this is to use the Work-In-Progress
Power Sequence Library proposer by Peter Chen at :
https://lkml.org/lkml/2016/11/13/315
Since this is the USB Hub reset link and has no direct link with either the USB controller
or the USB PHY, and the USB Hus cannot be modeled (yet ?) in the DT.
One intermediate, but crappy, solution would be to add a GPIO hog until the power
sequence code has been merged, with a proper big fat warning in the dts file.
You can find doc about the gpio-hog in :
Documentation/devicetree/bindings/gpio/gpio.txt
It should look like :
usb-hub {
gpio-hog;
gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "usb-hub-reset";
};
in the gpio_ao controller node.
Neil
[toc] | [prev] | [next] | [standalone]
| From | Anand Moon <linux.amoon@gmail.com> |
|---|---|
| Date | 2017-03-09 19:00 +0100 |
| Message-ID | <tjaw2-8vb-19@gated-at.bofh.it> |
| In reply to | #1596064 |
Hi Neil,
On 9 March 2017 at 18:43, Neil Armstrong <narmstrong@baylibre.com> wrote:
> On 03/08/2017 06:22 PM, Anand Moon wrote:
>> Hi All,
>>
>> On 8 March 2017 at 02:06, Anand Moon <linux.amoon@gmail.com> wrote:
>>> From: Anand Moon <linux.amoon@gmail.com>
>>>
>>> update the regulator supply nodes for usb host to
>>> enable usb host on odroid-c2
>>>
>>> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
>>> ---
>>> root@odroid64:/usr/src/odroidxu3-4.y-devel# lsusb -t
>>> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
>>> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
>>> |__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
>>> |__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
>>> |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>>> |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
>>> ---
>>> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 +++++++++++++
>>> 1 file changed, 13 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
>>> index c59403a..304b676 100644
>>> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
>>> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
>>> @@ -64,6 +64,18 @@
>>> reg = <0x0 0x0 0x0 0x80000000>;
>>> };
>>>
>>> + usb_host_pwr: regulator-usb-pwrs {
>>> + compatible = "regulator-fixed";
>>> +
>>> + regulator-name = "USB_HOST_PWR";
>>> +
>>> + regulator-min-microvolt = <5000000>;
>>> + regulator-max-microvolt = <5000000>;
>>> +
>>> + gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
>>> + enable-active-high;
>>> + };
>>> +
>>> usb_otg_pwr: regulator-usb-pwrs {
>>> compatible = "regulator-fixed";
>>>
>>> @@ -184,6 +196,7 @@
>>>
>>> &usb1_phy {
>>> status = "okay";
>>> + phy-supply = <&usb_host_pwr>;
>>> };
>>>
>>> &usb0 {
>>> --
>>> 2.7.4
>>>
>>
>> Please ignore this patch, It not working.
>> I will try to submit a new patch.
>>
>> Best Regards
>> -Anand Moon
>>
>
> Hi Anand,
>
> For this specific use case, the only way to manage this is to use the Work-In-Progress
> Power Sequence Library proposer by Peter Chen at :
> https://lkml.org/lkml/2016/11/13/315
>
> Since this is the USB Hub reset link and has no direct link with either the USB controller
> or the USB PHY, and the USB Hus cannot be modeled (yet ?) in the DT.
>
> One intermediate, but crappy, solution would be to add a GPIO hog until the power
> sequence code has been merged, with a proper big fat warning in the dts file.
>
> You can find doc about the gpio-hog in :
> Documentation/devicetree/bindings/gpio/gpio.txt
>
> It should look like :
>
> usb-hub {
> gpio-hog;
> gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
> output-high;
> line-name = "usb-hub-reset";
> };
>
> in the gpio_ao controller node.
>
> Neil
Thanks for this input.
I will check this series of patches, and work on this new approach.
-Best Regards
Anand Moon
[toc] | [prev] | [next] | [standalone]
| From | Martin Blumenstingl <martin.blumenstingl@googlemail.com> |
|---|---|
| Date | 2017-03-09 20:40 +0100 |
| Message-ID | <tjc4N-1cu-1@gated-at.bofh.it> |
| In reply to | #1596267 |
Hi Anand,
On Thu, Mar 9, 2017 at 6:58 PM, Anand Moon <linux.amoon@gmail.com> wrote:
>> Hi Anand,
>>
>> For this specific use case, the only way to manage this is to use the Work-In-Progress
>> Power Sequence Library proposer by Peter Chen at :
>> https://lkml.org/lkml/2016/11/13/315
>>
>> Since this is the USB Hub reset link and has no direct link with either the USB controller
>> or the USB PHY, and the USB Hus cannot be modeled (yet ?) in the DT.
>>
>> One intermediate, but crappy, solution would be to add a GPIO hog until the power
>> sequence code has been merged, with a proper big fat warning in the dts file.
>>
>> You can find doc about the gpio-hog in :
>> Documentation/devicetree/bindings/gpio/gpio.txt
>>
>> It should look like :
>>
>> usb-hub {
>> gpio-hog;
>> gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
>> output-high;
>> line-name = "usb-hub-reset";
>> };
>>
>> in the gpio_ao controller node.
>>
>> Neil
>
> Thanks for this input.
>
> I will check this series of patches, and work on this new approach.
you might want to look at the following two patches as well: [0] and [1]
I didn't test them as I don't have an Odroid-C2 but they should work
with the series that Neil has mentioned. feel free to take my patches
and fix them where needed
Regards,
Martin
[0] https://github.com/xdarklight/linux/commit/f0bc8f826b465fbf24279ce78654b65282790dc6
[1] https://github.com/xdarklight/linux/commit/7b5a69bf5bad992249aa39a96360fe90ccde9cd5
[toc] | [prev] | [next] | [standalone]
| From | Anand Moon <linux.amoon@gmail.com> |
|---|---|
| Date | 2017-03-11 07:50 +0100 |
| Message-ID | <tjJ0K-7cO-5@gated-at.bofh.it> |
| In reply to | #1596356 |
Hi Martin,
On 10 March 2017 at 01:06, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Hi Anand,
>
> On Thu, Mar 9, 2017 at 6:58 PM, Anand Moon <linux.amoon@gmail.com> wrote:
>>> Hi Anand,
>>>
>>> For this specific use case, the only way to manage this is to use the Work-In-Progress
>>> Power Sequence Library proposer by Peter Chen at :
>>> https://lkml.org/lkml/2016/11/13/315
>>>
>>> Since this is the USB Hub reset link and has no direct link with either the USB controller
>>> or the USB PHY, and the USB Hus cannot be modeled (yet ?) in the DT.
>>>
>>> One intermediate, but crappy, solution would be to add a GPIO hog until the power
>>> sequence code has been merged, with a proper big fat warning in the dts file.
>>>
>>> You can find doc about the gpio-hog in :
>>> Documentation/devicetree/bindings/gpio/gpio.txt
>>>
>>> It should look like :
>>>
>>> usb-hub {
>>> gpio-hog;
>>> gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
>>> output-high;
>>> line-name = "usb-hub-reset";
>>> };
>>>
>>> in the gpio_ao controller node.
>>>
>>> Neil
>>
>> Thanks for this input.
>>
>> I will check this series of patches, and work on this new approach.
> you might want to look at the following two patches as well: [0] and [1]
> I didn't test them as I don't have an Odroid-C2 but they should work
> with the series that Neil has mentioned. feel free to take my patches
> and fix them where needed
>
>
> Regards,
> Martin
>
> [0] https://github.com/xdarklight/linux/commit/f0bc8f826b465fbf24279ce78654b65282790dc6
> [1] https://github.com/xdarklight/linux/commit/7b5a69bf5bad992249aa39a96360fe90ccde9cd5
As pointed by Neil
For this specific use case, the only way to manage this is to use the
Work-In-Progress
Power Sequence Library proposer by Peter Chen at :
https://lkml.org/lkml/2017/1/5/33 (updated v11)
Using above series I was able to get the usb nodes to work correctly
on Odroid C2.
Although the series of patches did not clean apply completely.
I manage to get this working with your above patches. I will submit
the patches soon.
root@odroid64:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Human Interface Device,
Driver=usbhid, 1.5M
|__ Port 1: Dev 3, If 1, Class=Human Interface Device,
Driver=usbhid, 1.5M
|__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
root@odroid64:~#
Best Regards
-Anand Moon
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web