All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc
@ 2020-03-25 15:37 sunil at amarulasolutions.com
  2020-03-26 10:02 ` Kever Yang
  2020-03-27  9:43 ` [PATCH] " Jagan Teki
  0 siblings, 2 replies; 6+ messages in thread
From: sunil at amarulasolutions.com @ 2020-03-25 15:37 UTC (permalink / raw)
  To: u-boot

From: Suniel Mahesh <sunil@amarulasolutions.com>

roc-rk3399-pc has an FE1.1 USB 2.0 HUB which connects two USB ports
(HOST1 and HOST2). For end devices to work we need to enable USB hub
so that HOST detects there presence and enumerates them accordingly.
This requires explicit pinctrl within gpio enablement.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
---
Note:
1. tested this on roc-rk3399-pc board version roc-rk3399-pc-v1.1-a 2018-9-25
2. after this changeset, HOST1 works but HOST2 still doesnt work. I have
tested them with linux-next, linux-rockchip and Firefly's source (both u-boot
and kernel), HOST2 doesn't work.
3. Request to test this changetest who have access to target and please advice
on HOST2
---
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
index 5746442..598e0e2 100644
--- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
@@ -14,6 +14,16 @@
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
+
+	vcc_hub_en: vcc_hub_en-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hub_rst>;
+		regulator-name = "vcc_hub_en";
+		regulator-always-on;
+	};
 };
 
 &vdd_log {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc
  2020-03-25 15:37 [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc sunil at amarulasolutions.com
@ 2020-03-26 10:02 ` Kever Yang
  2020-04-21 16:31   ` Suniel Mahesh
  2020-04-25 13:39   ` [RESEND PATCH] " sunil at amarulasolutions.com
  2020-03-27  9:43 ` [PATCH] " Jagan Teki
  1 sibling, 2 replies; 6+ messages in thread
From: Kever Yang @ 2020-03-26 10:02 UTC (permalink / raw)
  To: u-boot


On 2020/3/25 ??11:37, sunil at amarulasolutions.com wrote:
> From: Suniel Mahesh <sunil@amarulasolutions.com>
>
> roc-rk3399-pc has an FE1.1 USB 2.0 HUB which connects two USB ports
> (HOST1 and HOST2). For end devices to work we need to enable USB hub
> so that HOST detects there presence and enumerates them accordingly.
> This requires explicit pinctrl within gpio enablement.
>
> Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>


Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
> Note:
> 1. tested this on roc-rk3399-pc board version roc-rk3399-pc-v1.1-a 2018-9-25
> 2. after this changeset, HOST1 works but HOST2 still doesnt work. I have
> tested them with linux-next, linux-rockchip and Firefly's source (both u-boot
> and kernel), HOST2 doesn't work.
> 3. Request to test this changetest who have access to target and please advice
> on HOST2
> ---
>   arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> index 5746442..598e0e2 100644
> --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> @@ -14,6 +14,16 @@
>   	chosen {
>   		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
>   	};
> +
> +	vcc_hub_en: vcc_hub_en-regulator {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&hub_rst>;
> +		regulator-name = "vcc_hub_en";
> +		regulator-always-on;
> +	};
>   };
>   
>   &vdd_log {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc
  2020-03-25 15:37 [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc sunil at amarulasolutions.com
  2020-03-26 10:02 ` Kever Yang
@ 2020-03-27  9:43 ` Jagan Teki
  2020-03-27 11:09   ` Markus Reichl
  1 sibling, 1 reply; 6+ messages in thread
From: Jagan Teki @ 2020-03-27  9:43 UTC (permalink / raw)
  To: u-boot

Hi Markus and Levin,

On Wed, Mar 25, 2020 at 9:08 PM <sunil@amarulasolutions.com> wrote:
>
> From: Suniel Mahesh <sunil@amarulasolutions.com>
>
> roc-rk3399-pc has an FE1.1 USB 2.0 HUB which connects two USB ports
> (HOST1 and HOST2). For end devices to work we need to enable USB hub
> so that HOST detects there presence and enumerates them accordingly.
> This requires explicit pinctrl within gpio enablement.
>
> Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
> ---
> Note:
> 1. tested this on roc-rk3399-pc board version roc-rk3399-pc-v1.1-a 2018-9-25
> 2. after this changeset, HOST1 works but HOST2 still doesnt work. I have
> tested them with linux-next, linux-rockchip and Firefly's source (both u-boot
> and kernel), HOST2 doesn't work.
> 3. Request to test this changetest who have access to target and please advice
> on HOST2
> ---
>  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> index 5746442..598e0e2 100644
> --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> @@ -14,6 +14,16 @@
>         chosen {
>                 u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
>         };
> +
> +       vcc_hub_en: vcc_hub_en-regulator {
> +               compatible = "regulator-fixed";
> +               enable-active-high;
> +               gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&hub_rst>;
> +               regulator-name = "vcc_hub_en";
> +               regulator-always-on;
> +       };
>  };

Can you please confirm the tests from your side? not sure why would an
explicit vbus_hub_en required here since the vcc5v0_host has it, but
without pinctrl.

Jagan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc
  2020-03-27  9:43 ` [PATCH] " Jagan Teki
@ 2020-03-27 11:09   ` Markus Reichl
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Reichl @ 2020-03-27 11:09 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

My boards are -V1.0-A 2018-07-12.

With this patch below, both HOST1 and HOST2 (and of course HOST0)
detect an USB stick in current U-Boot.

Without this patch below, only HOST0
detects an USB stick.

I suspect, your HOST2 HW is broken.

Gru?,
--
Markus

Am 27.03.20 um 10:43 schrieb Jagan Teki:
> Hi Markus and Levin,
> 
> On Wed, Mar 25, 2020 at 9:08 PM <sunil@amarulasolutions.com> wrote:
>>
>> From: Suniel Mahesh <sunil@amarulasolutions.com>
>>
>> roc-rk3399-pc has an FE1.1 USB 2.0 HUB which connects two USB ports
>> (HOST1 and HOST2). For end devices to work we need to enable USB hub
>> so that HOST detects there presence and enumerates them accordingly.
>> This requires explicit pinctrl within gpio enablement.
>>
>> Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
>> ---
>> Note:
>> 1. tested this on roc-rk3399-pc board version roc-rk3399-pc-v1.1-a 2018-9-25
>> 2. after this changeset, HOST1 works but HOST2 still doesnt work. I have
>> tested them with linux-next, linux-rockchip and Firefly's source (both u-boot
>> and kernel), HOST2 doesn't work.
>> 3. Request to test this changetest who have access to target and please advice
>> on HOST2
>> ---
>>  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
>> index 5746442..598e0e2 100644
>> --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
>> +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
>> @@ -14,6 +14,16 @@
>>         chosen {
>>                 u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
>>         };
>> +
>> +       vcc_hub_en: vcc_hub_en-regulator {
>> +               compatible = "regulator-fixed";
>> +               enable-active-high;
>> +               gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&hub_rst>;
>> +               regulator-name = "vcc_hub_en";
>> +               regulator-always-on;
>> +       };
>>  };
> 
> Can you please confirm the tests from your side? not sure why would an
> explicit vbus_hub_en required here since the vcc5v0_host has it, but
> without pinctrl.
> 
> Jagan
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc
  2020-03-26 10:02 ` Kever Yang
@ 2020-04-21 16:31   ` Suniel Mahesh
  2020-04-25 13:39   ` [RESEND PATCH] " sunil at amarulasolutions.com
  1 sibling, 0 replies; 6+ messages in thread
From: Suniel Mahesh @ 2020-04-21 16:31 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 26, 2020 at 3:33 PM Kever Yang <kever.yang@rock-chips.com>
wrote:

>
> On 2020/3/25 ??11:37, sunil at amarulasolutions.com wrote:
> > From: Suniel Mahesh <sunil@amarulasolutions.com>
> >
> > roc-rk3399-pc has an FE1.1 USB 2.0 HUB which connects two USB ports
> > (HOST1 and HOST2). For end devices to work we need to enable USB hub
> > so that HOST detects there presence and enumerates them accordingly.
> > This requires explicit pinctrl within gpio enablement.
> >
> > Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
>
>
> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
>

Hi Kever,
This is patch is reviewed but not applied to mainline.
please let me know if you need any more changes.

Thanks
Suniel

>
> Thanks,
> - Kever
> > ---
> > Note:
> > 1. tested this on roc-rk3399-pc board version roc-rk3399-pc-v1.1-a
> 2018-9-25
> > 2. after this changeset, HOST1 works but HOST2 still doesnt work. I have
> > tested them with linux-next, linux-rockchip and Firefly's source (both
> u-boot
> > and kernel), HOST2 doesn't work.
> > 3. Request to test this changetest who have access to target and please
> advice
> > on HOST2
> > ---
> >   arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
> >
> > diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> > index 5746442..598e0e2 100644
> > --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> > +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
> > @@ -14,6 +14,16 @@
> >       chosen {
> >               u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
> >       };
> > +
> > +     vcc_hub_en: vcc_hub_en-regulator {
> > +             compatible = "regulator-fixed";
> > +             enable-active-high;
> > +             gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
> > +             pinctrl-names = "default";
> > +             pinctrl-0 = <&hub_rst>;
> > +             regulator-name = "vcc_hub_en";
> > +             regulator-always-on;
> > +     };
> >   };
> >
> >   &vdd_log {
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RESEND PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc
  2020-03-26 10:02 ` Kever Yang
  2020-04-21 16:31   ` Suniel Mahesh
@ 2020-04-25 13:39   ` sunil at amarulasolutions.com
  1 sibling, 0 replies; 6+ messages in thread
From: sunil at amarulasolutions.com @ 2020-04-25 13:39 UTC (permalink / raw)
  To: u-boot

From: Suniel Mahesh <sunil@amarulasolutions.com>

roc-rk3399-pc has an FE1.1 USB 2.0 HUB which connects two USB ports
(HOST1 and HOST2). For end devices to work we need to enable USB hub
so that HOST detects there presence and enumerates them accordingly.
This requires explicit pinctrl within gpio enablement.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
Note:
1. patch was reviewed, but not committed to mainline
2. tested this on roc-rk3399-pc board version roc-rk3399-pc-v1.1-a 2018-9-25
---
 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
index 5746442..598e0e2 100644
--- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi
@@ -14,6 +14,16 @@
 	chosen {
 		u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
 	};
+
+	vcc_hub_en: vcc_hub_en-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hub_rst>;
+		regulator-name = "vcc_hub_en";
+		regulator-always-on;
+	};
 };
 
 &vdd_log {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-25 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 15:37 [PATCH] arm: dts: rockchip: rk3399-roc-pc: Enable FE1.1 USB 2.0 HUB on roc-rk3399-pc sunil at amarulasolutions.com
2020-03-26 10:02 ` Kever Yang
2020-04-21 16:31   ` Suniel Mahesh
2020-04-25 13:39   ` [RESEND PATCH] " sunil at amarulasolutions.com
2020-03-27  9:43 ` [PATCH] " Jagan Teki
2020-03-27 11:09   ` Markus Reichl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.