diff mbox series

[v2] dts: rockpro64: Remove usb regulator-always-on

Message ID 20231222141616.508073-1-i@shantur.com (mailing list archive)
State New
Headers show
Series [v2] dts: rockpro64: Remove usb regulator-always-on | expand

Commit Message

Shantur Rathore Dec. 22, 2023, 2:16 p.m. UTC
USB port regulators should be controlled by PHYs
so we remove always-on property and let PHYs manage the
regulator.

phy-supply isn't sconfugred for the TypeC port and now that we are
removing regulator-always-on, we need to fix the phy-supply
so the PHYs are able to turn power to type-c port.

Series-version: 2

Signed-off-by: Shantur Rathore <i@shantur.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Heiko Stübner Dec. 29, 2023, 10:08 p.m. UTC | #1
Hi,

Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
> USB port regulators should be controlled by PHYs
> so we remove always-on property and let PHYs manage the
> regulator.
> 
> phy-supply isn't sconfugred for the TypeC port and now that we are
		^^ configured ?

> removing regulator-always-on, we need to fix the phy-supply
> so the PHYs are able to turn power to type-c port.
> 
> Series-version: 2
> 
> Signed-off-by: Shantur Rathore <i@shantur.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> index bca2b50e0a..f7273f7990 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&vcc5v0_host_en>;
>  		regulator-name = "vcc5v0_host";
> -		regulator-always-on;
>  		vin-supply = <&vcc5v0_usb>;
>  	};
>  
> @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&vcc5v0_typec_en>;
>  		regulator-name = "vcc5v0_typec";
> -		regulator-always-on;
>  		vin-supply = <&vcc5v0_usb>;
>  	};
>  
> @@ -859,6 +857,7 @@ &u2phy0 {
>  	status = "okay";
>  
>  	u2phy0_otg: otg-port {
> +		phy-supply = <&vcc5v0_typec>;
>  		status = "okay";
>  	};

Just to explain for me, what is supplying the "other" OTG port
	u2phy1_otg: otg-port {}

in u2phy1 ... this one is status okay, but does not have any phy
supply?


Thanks
Heiko
Shantur Rathore Jan. 4, 2024, 9:44 a.m. UTC | #2
Hi Heiko,

On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
>
> Hi,
>
> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
> > USB port regulators should be controlled by PHYs
> > so we remove always-on property and let PHYs manage the
> > regulator.
> >
> > phy-supply isn't sconfugred for the TypeC port and now that we are
>                 ^^ configured ?
>
> > removing regulator-always-on, we need to fix the phy-supply
> > so the PHYs are able to turn power to type-c port.
> >
> > Series-version: 2
> >
> > Signed-off-by: Shantur Rathore <i@shantur.com>
> > ---
> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> > index bca2b50e0a..f7273f7990 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
> >               pinctrl-names = "default";
> >               pinctrl-0 = <&vcc5v0_host_en>;
> >               regulator-name = "vcc5v0_host";
> > -             regulator-always-on;
> >               vin-supply = <&vcc5v0_usb>;
> >       };
> >
> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
> >               pinctrl-names = "default";
> >               pinctrl-0 = <&vcc5v0_typec_en>;
> >               regulator-name = "vcc5v0_typec";
> > -             regulator-always-on;
> >               vin-supply = <&vcc5v0_usb>;
> >       };
> >
> > @@ -859,6 +857,7 @@ &u2phy0 {
> >       status = "okay";
> >
> >       u2phy0_otg: otg-port {
> > +             phy-supply = <&vcc5v0_typec>;
> >               status = "okay";
> >       };
>
> Just to explain for me, what is supplying the "other" OTG port
>         u2phy1_otg: otg-port {}
>
> in u2phy1 ... this one is status okay, but does not have any phy
> supply?
>

In RockPro64 there is only 1 USB-C OTG port and the other port
is a USB-3.0 port.
To be honest, I am not 100% sure how this all works, as I understand
the USB3.0 port is wired to the second TypeC Phy.

Maybe Dragan has more info on this.

Kind regards,
Shantur
Dragan Simic Jan. 4, 2024, 9:50 a.m. UTC | #3
On 2024-01-04 10:44, Shantur Rathore wrote:
> On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
>> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
>> > USB port regulators should be controlled by PHYs
>> > so we remove always-on property and let PHYs manage the
>> > regulator.
>> >
>> > phy-supply isn't sconfugred for the TypeC port and now that we are
>>                 ^^ configured ?
>> 
>> > removing regulator-always-on, we need to fix the phy-supply
>> > so the PHYs are able to turn power to type-c port.
>> >
>> > Series-version: 2
>> >
>> > Signed-off-by: Shantur Rathore <i@shantur.com>
>> > ---
>> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
>> >  1 file changed, 1 insertion(+), 2 deletions(-)
>> >
>> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> > index bca2b50e0a..f7273f7990 100644
>> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
>> >               pinctrl-names = "default";
>> >               pinctrl-0 = <&vcc5v0_host_en>;
>> >               regulator-name = "vcc5v0_host";
>> > -             regulator-always-on;
>> >               vin-supply = <&vcc5v0_usb>;
>> >       };
>> >
>> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
>> >               pinctrl-names = "default";
>> >               pinctrl-0 = <&vcc5v0_typec_en>;
>> >               regulator-name = "vcc5v0_typec";
>> > -             regulator-always-on;
>> >               vin-supply = <&vcc5v0_usb>;
>> >       };
>> >
>> > @@ -859,6 +857,7 @@ &u2phy0 {
>> >       status = "okay";
>> >
>> >       u2phy0_otg: otg-port {
>> > +             phy-supply = <&vcc5v0_typec>;
>> >               status = "okay";
>> >       };
>> 
>> Just to explain for me, what is supplying the "other" OTG port
>>         u2phy1_otg: otg-port {}
>> 
>> in u2phy1 ... this one is status okay, but does not have any phy
>> supply?
>> 
> In RockPro64 there is only 1 USB-C OTG port and the other port
> is a USB-3.0 port.
> To be honest, I am not 100% sure how this all works, as I understand
> the USB3.0 port is wired to the second TypeC Phy.
> 
> Maybe Dragan has more info on this.

I'll have it checked and tested in detail, of course, but I have to 
recover from this nasty flu first.  Unfortunately, it has rendeded me 
unable to even think straight.
Shantur Rathore Jan. 8, 2024, 12:11 p.m. UTC | #4
Hi Dragan,

On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org> wrote:
>
> On 2024-01-04 10:44, Shantur Rathore wrote:
> > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
> >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
> >> > USB port regulators should be controlled by PHYs
> >> > so we remove always-on property and let PHYs manage the
> >> > regulator.
> >> >
> >> > phy-supply isn't sconfugred for the TypeC port and now that we are
> >>                 ^^ configured ?
> >>
> >> > removing regulator-always-on, we need to fix the phy-supply
> >> > so the PHYs are able to turn power to type-c port.
> >> >
> >> > Series-version: 2
> >> >
> >> > Signed-off-by: Shantur Rathore <i@shantur.com>
> >> > ---
> >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
> >> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >> >
> >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> > index bca2b50e0a..f7273f7990 100644
> >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
> >> >               pinctrl-names = "default";
> >> >               pinctrl-0 = <&vcc5v0_host_en>;
> >> >               regulator-name = "vcc5v0_host";
> >> > -             regulator-always-on;
> >> >               vin-supply = <&vcc5v0_usb>;
> >> >       };
> >> >
> >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
> >> >               pinctrl-names = "default";
> >> >               pinctrl-0 = <&vcc5v0_typec_en>;
> >> >               regulator-name = "vcc5v0_typec";
> >> > -             regulator-always-on;
> >> >               vin-supply = <&vcc5v0_usb>;
> >> >       };
> >> >
> >> > @@ -859,6 +857,7 @@ &u2phy0 {
> >> >       status = "okay";
> >> >
> >> >       u2phy0_otg: otg-port {
> >> > +             phy-supply = <&vcc5v0_typec>;
> >> >               status = "okay";
> >> >       };
> >>
> >> Just to explain for me, what is supplying the "other" OTG port
> >>         u2phy1_otg: otg-port {}
> >>
> >> in u2phy1 ... this one is status okay, but does not have any phy
> >> supply?
> >>
> > In RockPro64 there is only 1 USB-C OTG port and the other port
> > is a USB-3.0 port.
> > To be honest, I am not 100% sure how this all works, as I understand
> > the USB3.0 port is wired to the second TypeC Phy.
> >
> > Maybe Dragan has more info on this.
>
> I'll have it checked and tested in detail, of course, but I have to
> recover from this nasty flu first.  Unfortunately, it has rendeded me
> unable to even think straight.

Hope you feel better soon.
It would be awesome if we can get this in while the current merge
window is open.

Kind regards,
Shantur
Heiko Stübner Jan. 8, 2024, 12:29 p.m. UTC | #5
Hi Shantur,

Am Montag, 8. Januar 2024, 13:11:17 CET schrieb Shantur Rathore:
> On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org> wrote:
> > On 2024-01-04 10:44, Shantur Rathore wrote:
> > > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
> > >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
> > >> > USB port regulators should be controlled by PHYs
> > >> > so we remove always-on property and let PHYs manage the
> > >> > regulator.
> > >> >
> > >> > phy-supply isn't sconfugred for the TypeC port and now that we are
> > >>                 ^^ configured ?
> > >>
> > >> > removing regulator-always-on, we need to fix the phy-supply
> > >> > so the PHYs are able to turn power to type-c port.
> > >> >
> > >> > Series-version: 2
> > >> >
> > >> > Signed-off-by: Shantur Rathore <i@shantur.com>
> > >> > ---
> > >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
> > >> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > >> >
> > >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> > >> > index bca2b50e0a..f7273f7990 100644
> > >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> > >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> > >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
> > >> >               pinctrl-names = "default";
> > >> >               pinctrl-0 = <&vcc5v0_host_en>;
> > >> >               regulator-name = "vcc5v0_host";
> > >> > -             regulator-always-on;
> > >> >               vin-supply = <&vcc5v0_usb>;
> > >> >       };
> > >> >
> > >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
> > >> >               pinctrl-names = "default";
> > >> >               pinctrl-0 = <&vcc5v0_typec_en>;
> > >> >               regulator-name = "vcc5v0_typec";
> > >> > -             regulator-always-on;
> > >> >               vin-supply = <&vcc5v0_usb>;
> > >> >       };
> > >> >
> > >> > @@ -859,6 +857,7 @@ &u2phy0 {
> > >> >       status = "okay";
> > >> >
> > >> >       u2phy0_otg: otg-port {
> > >> > +             phy-supply = <&vcc5v0_typec>;
> > >> >               status = "okay";
> > >> >       };
> > >>
> > >> Just to explain for me, what is supplying the "other" OTG port
> > >>         u2phy1_otg: otg-port {}
> > >>
> > >> in u2phy1 ... this one is status okay, but does not have any phy
> > >> supply?
> > >>
> > > In RockPro64 there is only 1 USB-C OTG port and the other port
> > > is a USB-3.0 port.
> > > To be honest, I am not 100% sure how this all works, as I understand
> > > the USB3.0 port is wired to the second TypeC Phy.
> > >
> > > Maybe Dragan has more info on this.
> >
> > I'll have it checked and tested in detail, of course, but I have to
> > recover from this nasty flu first.  Unfortunately, it has rendeded me
> > unable to even think straight.
> 
> Hope you feel better soon.
> It would be awesome if we can get this in while the current merge
> window is open.

just a small comment regarding timing. All regular development changes
need to be finished and in linux-next _before_ the merge-window opens.

As this is not a fix it will go to 6.9 anyway - hence no need to rush.


Heiko
Dragan Simic Jan. 8, 2024, 2:40 p.m. UTC | #6
On 2024-01-08 13:11, Shantur Rathore wrote:
> Hi Dragan,

Hello!

> On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org> wrote:
>> 
>> On 2024-01-04 10:44, Shantur Rathore wrote:
>> > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
>> >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
>> >> > USB port regulators should be controlled by PHYs
>> >> > so we remove always-on property and let PHYs manage the
>> >> > regulator.
>> >> >
>> >> > phy-supply isn't sconfugred for the TypeC port and now that we are
>> >>                 ^^ configured ?
>> >>
>> >> > removing regulator-always-on, we need to fix the phy-supply
>> >> > so the PHYs are able to turn power to type-c port.
>> >> >
>> >> > Series-version: 2
>> >> >
>> >> > Signed-off-by: Shantur Rathore <i@shantur.com>
>> >> > ---
>> >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
>> >> >  1 file changed, 1 insertion(+), 2 deletions(-)
>> >> >
>> >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> >> > index bca2b50e0a..f7273f7990 100644
>> >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
>> >> >               pinctrl-names = "default";
>> >> >               pinctrl-0 = <&vcc5v0_host_en>;
>> >> >               regulator-name = "vcc5v0_host";
>> >> > -             regulator-always-on;
>> >> >               vin-supply = <&vcc5v0_usb>;
>> >> >       };
>> >> >
>> >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
>> >> >               pinctrl-names = "default";
>> >> >               pinctrl-0 = <&vcc5v0_typec_en>;
>> >> >               regulator-name = "vcc5v0_typec";
>> >> > -             regulator-always-on;
>> >> >               vin-supply = <&vcc5v0_usb>;
>> >> >       };
>> >> >
>> >> > @@ -859,6 +857,7 @@ &u2phy0 {
>> >> >       status = "okay";
>> >> >
>> >> >       u2phy0_otg: otg-port {
>> >> > +             phy-supply = <&vcc5v0_typec>;
>> >> >               status = "okay";
>> >> >       };
>> >>
>> >> Just to explain for me, what is supplying the "other" OTG port
>> >>         u2phy1_otg: otg-port {}
>> >>
>> >> in u2phy1 ... this one is status okay, but does not have any phy
>> >> supply?
>> >>
>> > In RockPro64 there is only 1 USB-C OTG port and the other port
>> > is a USB-3.0 port.
>> > To be honest, I am not 100% sure how this all works, as I understand
>> > the USB3.0 port is wired to the second TypeC Phy.
>> >
>> > Maybe Dragan has more info on this.
>> 
>> I'll have it checked and tested in detail, of course, but I have to
>> recover from this nasty flu first.  Unfortunately, it has rendeded me
>> unable to even think straight.
> 
> Hope you feel better soon.
> It would be awesome if we can get this in while the current merge
> window is open.

Thankfully, I'm feeling significantly better after more than two weeks 
of misery, and I hope to be able to work on this in the next few days.  
I'll do my best to have it done in the current merge window, together 
with a few new patches that I have planned to submit to the mailing 
list.
Dragan Simic Jan. 8, 2024, 2:47 p.m. UTC | #7
On 2024-01-08 13:29, Heiko Stübner wrote:
> Am Montag, 8. Januar 2024, 13:11:17 CET schrieb Shantur Rathore:
>> On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org> 
>> wrote:
>> > On 2024-01-04 10:44, Shantur Rathore wrote:
>> > > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
>> > >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
>> > >> > USB port regulators should be controlled by PHYs
>> > >> > so we remove always-on property and let PHYs manage the
>> > >> > regulator.
>> > >> >
>> > >> > phy-supply isn't sconfugred for the TypeC port and now that we are
>> > >>                 ^^ configured ?
>> > >>
>> > >> > removing regulator-always-on, we need to fix the phy-supply
>> > >> > so the PHYs are able to turn power to type-c port.
>> > >> >
>> > >> > Series-version: 2
>> > >> >
>> > >> > Signed-off-by: Shantur Rathore <i@shantur.com>
>> > >> > ---
>> > >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
>> > >> >  1 file changed, 1 insertion(+), 2 deletions(-)
>> > >> >
>> > >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> > >> > index bca2b50e0a..f7273f7990 100644
>> > >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> > >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> > >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
>> > >> >               pinctrl-names = "default";
>> > >> >               pinctrl-0 = <&vcc5v0_host_en>;
>> > >> >               regulator-name = "vcc5v0_host";
>> > >> > -             regulator-always-on;
>> > >> >               vin-supply = <&vcc5v0_usb>;
>> > >> >       };
>> > >> >
>> > >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
>> > >> >               pinctrl-names = "default";
>> > >> >               pinctrl-0 = <&vcc5v0_typec_en>;
>> > >> >               regulator-name = "vcc5v0_typec";
>> > >> > -             regulator-always-on;
>> > >> >               vin-supply = <&vcc5v0_usb>;
>> > >> >       };
>> > >> >
>> > >> > @@ -859,6 +857,7 @@ &u2phy0 {
>> > >> >       status = "okay";
>> > >> >
>> > >> >       u2phy0_otg: otg-port {
>> > >> > +             phy-supply = <&vcc5v0_typec>;
>> > >> >               status = "okay";
>> > >> >       };
>> > >>
>> > >> Just to explain for me, what is supplying the "other" OTG port
>> > >>         u2phy1_otg: otg-port {}
>> > >>
>> > >> in u2phy1 ... this one is status okay, but does not have any phy
>> > >> supply?
>> > >>
>> > > In RockPro64 there is only 1 USB-C OTG port and the other port
>> > > is a USB-3.0 port.
>> > > To be honest, I am not 100% sure how this all works, as I understand
>> > > the USB3.0 port is wired to the second TypeC Phy.
>> > >
>> > > Maybe Dragan has more info on this.
>> >
>> > I'll have it checked and tested in detail, of course, but I have to
>> > recover from this nasty flu first.  Unfortunately, it has rendeded me
>> > unable to even think straight.
>> 
>> Hope you feel better soon.
>> It would be awesome if we can get this in while the current merge
>> window is open.
> 
> just a small comment regarding timing. All regular development changes
> need to be finished and in linux-next _before_ the merge-window opens.
> 
> As this is not a fix it will go to 6.9 anyway - hence no need to rush.

Ah, yes, I keep forgetting that the current merge window basically goes 
one more kernel version into the past. :)  Thank you for the 
clarification.
Shantur Rathore Jan. 21, 2024, 10:12 p.m. UTC | #8
HI Dragan,

On Mon, Jan 8, 2024 at 2:47 PM Dragan Simic <dsimic@manjaro.org> wrote:
>
> On 2024-01-08 13:29, Heiko Stübner wrote:
> > Am Montag, 8. Januar 2024, 13:11:17 CET schrieb Shantur Rathore:
> >> On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org>
> >> wrote:
> >> > On 2024-01-04 10:44, Shantur Rathore wrote:
> >> > > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
> >> > >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
> >> > >> > USB port regulators should be controlled by PHYs
> >> > >> > so we remove always-on property and let PHYs manage the
> >> > >> > regulator.
> >> > >> >
> >> > >> > phy-supply isn't sconfugred for the TypeC port and now that we are
> >> > >>                 ^^ configured ?
> >> > >>
> >> > >> > removing regulator-always-on, we need to fix the phy-supply
> >> > >> > so the PHYs are able to turn power to type-c port.
> >> > >> >
> >> > >> > Series-version: 2
> >> > >> >
> >> > >> > Signed-off-by: Shantur Rathore <i@shantur.com>
> >> > >> > ---
> >> > >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
> >> > >> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >> > >> >
> >> > >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> > >> > index bca2b50e0a..f7273f7990 100644
> >> > >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> > >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> > >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
> >> > >> >               pinctrl-names = "default";
> >> > >> >               pinctrl-0 = <&vcc5v0_host_en>;
> >> > >> >               regulator-name = "vcc5v0_host";
> >> > >> > -             regulator-always-on;
> >> > >> >               vin-supply = <&vcc5v0_usb>;
> >> > >> >       };
> >> > >> >
> >> > >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
> >> > >> >               pinctrl-names = "default";
> >> > >> >               pinctrl-0 = <&vcc5v0_typec_en>;
> >> > >> >               regulator-name = "vcc5v0_typec";
> >> > >> > -             regulator-always-on;
> >> > >> >               vin-supply = <&vcc5v0_usb>;
> >> > >> >       };
> >> > >> >
> >> > >> > @@ -859,6 +857,7 @@ &u2phy0 {
> >> > >> >       status = "okay";
> >> > >> >
> >> > >> >       u2phy0_otg: otg-port {
> >> > >> > +             phy-supply = <&vcc5v0_typec>;
> >> > >> >               status = "okay";
> >> > >> >       };
> >> > >>
> >> > >> Just to explain for me, what is supplying the "other" OTG port
> >> > >>         u2phy1_otg: otg-port {}
> >> > >>
> >> > >> in u2phy1 ... this one is status okay, but does not have any phy
> >> > >> supply?
> >> > >>
> >> > > In RockPro64 there is only 1 USB-C OTG port and the other port
> >> > > is a USB-3.0 port.
> >> > > To be honest, I am not 100% sure how this all works, as I understand
> >> > > the USB3.0 port is wired to the second TypeC Phy.
> >> > >
> >> > > Maybe Dragan has more info on this.
> >> >
> >> > I'll have it checked and tested in detail, of course, but I have to
> >> > recover from this nasty flu first.  Unfortunately, it has rendeded me
> >> > unable to even think straight.
> >>
> >> Hope you feel better soon.
> >> It would be awesome if we can get this in while the current merge
> >> window is open.
> >
> > just a small comment regarding timing. All regular development changes
> > need to be finished and in linux-next _before_ the merge-window opens.
> >
> > As this is not a fix it will go to 6.9 anyway - hence no need to rush.
>
> Ah, yes, I keep forgetting that the current merge window basically goes
> one more kernel version into the past. :)  Thank you for the
> clarification.

Hope you are feeling better.
Just to update, my patch has been dropped in u-boot in expectation of
it being fixed here.

Do you foresee it happening anytime soon?

Kind regards,
Shantur
Dragan Simic Jan. 21, 2024, 10:24 p.m. UTC | #9
Hello Shantur,

On 2024-01-21 23:12, Shantur Rathore wrote:
> On Mon, Jan 8, 2024 at 2:47 PM Dragan Simic <dsimic@manjaro.org> wrote:
>> On 2024-01-08 13:29, Heiko Stübner wrote:
>> > Am Montag, 8. Januar 2024, 13:11:17 CET schrieb Shantur Rathore:
>> >> On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org> wrote:
>> >> > On 2024-01-04 10:44, Shantur Rathore wrote:
>> >> > > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
>> >> > >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
>> >> > >> > USB port regulators should be controlled by PHYs
>> >> > >> > so we remove always-on property and let PHYs manage the
>> >> > >> > regulator.
>> >> > >> >
>> >> > >> > phy-supply isn't sconfugred for the TypeC port and now that we are
>> >> > >>                 ^^ configured ?
>> >> > >>
>> >> > >> > removing regulator-always-on, we need to fix the phy-supply
>> >> > >> > so the PHYs are able to turn power to type-c port.
>> >> > >> >
>> >> > >> > Series-version: 2
>> >> > >> >
>> >> > >> > Signed-off-by: Shantur Rathore <i@shantur.com>
>> >> > >> > ---
>> >> > >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
>> >> > >> >  1 file changed, 1 insertion(+), 2 deletions(-)
>> >> > >> >
>> >> > >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> >> > >> > index bca2b50e0a..f7273f7990 100644
>> >> > >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> >> > >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> >> > >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
>> >> > >> >               pinctrl-names = "default";
>> >> > >> >               pinctrl-0 = <&vcc5v0_host_en>;
>> >> > >> >               regulator-name = "vcc5v0_host";
>> >> > >> > -             regulator-always-on;
>> >> > >> >               vin-supply = <&vcc5v0_usb>;
>> >> > >> >       };
>> >> > >> >
>> >> > >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
>> >> > >> >               pinctrl-names = "default";
>> >> > >> >               pinctrl-0 = <&vcc5v0_typec_en>;
>> >> > >> >               regulator-name = "vcc5v0_typec";
>> >> > >> > -             regulator-always-on;
>> >> > >> >               vin-supply = <&vcc5v0_usb>;
>> >> > >> >       };
>> >> > >> >
>> >> > >> > @@ -859,6 +857,7 @@ &u2phy0 {
>> >> > >> >       status = "okay";
>> >> > >> >
>> >> > >> >       u2phy0_otg: otg-port {
>> >> > >> > +             phy-supply = <&vcc5v0_typec>;
>> >> > >> >               status = "okay";
>> >> > >> >       };
>> >> > >>
>> >> > >> Just to explain for me, what is supplying the "other" OTG port
>> >> > >>         u2phy1_otg: otg-port {}
>> >> > >>
>> >> > >> in u2phy1 ... this one is status okay, but does not have any phy
>> >> > >> supply?
>> >> > >>
>> >> > > In RockPro64 there is only 1 USB-C OTG port and the other port
>> >> > > is a USB-3.0 port.
>> >> > > To be honest, I am not 100% sure how this all works, as I understand
>> >> > > the USB3.0 port is wired to the second TypeC Phy.
>> >> > >
>> >> > > Maybe Dragan has more info on this.
>> >> >
>> >> > I'll have it checked and tested in detail, of course, but I have to
>> >> > recover from this nasty flu first.  Unfortunately, it has rendeded me
>> >> > unable to even think straight.
>> >>
>> >> Hope you feel better soon.
>> >> It would be awesome if we can get this in while the current merge
>> >> window is open.
>> >
>> > just a small comment regarding timing. All regular development changes
>> > need to be finished and in linux-next _before_ the merge-window opens.
>> >
>> > As this is not a fix it will go to 6.9 anyway - hence no need to rush.
>> 
>> Ah, yes, I keep forgetting that the current merge window basically 
>> goes
>> one more kernel version into the past. :)  Thank you for the
>> clarification.
> 
> Hope you are feeling better.
> Just to update, my patch has been dropped in u-boot in expectation of
> it being fixed here.

Yes, I saw that message on the U-Boot mailing list.  Frankly, that's the
usual way, i.e. having the DT issues fixed in the Linux kernel first, 
and
then synced back to U-Boot.

> Do you foresee it happening anytime soon?

Unfortunately, I've been unable to focus well enough to be able to work 
on
this, as a result of still recovering from the _nasty_ flu. :(  Though, 
I've
been also getting gradually better, thankfully, so while crossing all my
fingers and knocking on wood at the same time, :) I'd dare to say that 
I'm
expecting to be able to work on this in the next few days.

I apologize for the delays.  Bear with me, please! :)
Shantur Rathore Jan. 21, 2024, 10:56 p.m. UTC | #10
On Sun, Jan 21, 2024 at 10:24 PM Dragan Simic <dsimic@manjaro.org> wrote:
>
> Hello Shantur,
>
> On 2024-01-21 23:12, Shantur Rathore wrote:
> > On Mon, Jan 8, 2024 at 2:47 PM Dragan Simic <dsimic@manjaro.org> wrote:
> >> On 2024-01-08 13:29, Heiko Stübner wrote:
> >> > Am Montag, 8. Januar 2024, 13:11:17 CET schrieb Shantur Rathore:
> >> >> On Thu, Jan 4, 2024 at 9:50 AM Dragan Simic <dsimic@manjaro.org> wrote:
> >> >> > On 2024-01-04 10:44, Shantur Rathore wrote:
> >> >> > > On Fri, Dec 29, 2023 at 10:08 PM Heiko Stübner <heiko@sntech.de> wrote:
> >> >> > >> Am Freitag, 22. Dezember 2023, 15:16:16 CET schrieb Shantur Rathore:
> >> >> > >> > USB port regulators should be controlled by PHYs
> >> >> > >> > so we remove always-on property and let PHYs manage the
> >> >> > >> > regulator.
> >> >> > >> >
> >> >> > >> > phy-supply isn't sconfugred for the TypeC port and now that we are
> >> >> > >>                 ^^ configured ?
> >> >> > >>
> >> >> > >> > removing regulator-always-on, we need to fix the phy-supply
> >> >> > >> > so the PHYs are able to turn power to type-c port.
> >> >> > >> >
> >> >> > >> > Series-version: 2
> >> >> > >> >
> >> >> > >> > Signed-off-by: Shantur Rathore <i@shantur.com>
> >> >> > >> > ---
> >> >> > >> >  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 3 +--
> >> >> > >> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >> >> > >> >
> >> >> > >> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> >> > >> > index bca2b50e0a..f7273f7990 100644
> >> >> > >> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> >> > >> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> >> >> > >> > @@ -192,7 +192,6 @@ vcc5v0_host: vcc5v0-host-regulator {
> >> >> > >> >               pinctrl-names = "default";
> >> >> > >> >               pinctrl-0 = <&vcc5v0_host_en>;
> >> >> > >> >               regulator-name = "vcc5v0_host";
> >> >> > >> > -             regulator-always-on;
> >> >> > >> >               vin-supply = <&vcc5v0_usb>;
> >> >> > >> >       };
> >> >> > >> >
> >> >> > >> > @@ -203,7 +202,6 @@ vcc5v0_typec: vcc5v0-typec-regulator {
> >> >> > >> >               pinctrl-names = "default";
> >> >> > >> >               pinctrl-0 = <&vcc5v0_typec_en>;
> >> >> > >> >               regulator-name = "vcc5v0_typec";
> >> >> > >> > -             regulator-always-on;
> >> >> > >> >               vin-supply = <&vcc5v0_usb>;
> >> >> > >> >       };
> >> >> > >> >
> >> >> > >> > @@ -859,6 +857,7 @@ &u2phy0 {
> >> >> > >> >       status = "okay";
> >> >> > >> >
> >> >> > >> >       u2phy0_otg: otg-port {
> >> >> > >> > +             phy-supply = <&vcc5v0_typec>;
> >> >> > >> >               status = "okay";
> >> >> > >> >       };
> >> >> > >>
> >> >> > >> Just to explain for me, what is supplying the "other" OTG port
> >> >> > >>         u2phy1_otg: otg-port {}
> >> >> > >>
> >> >> > >> in u2phy1 ... this one is status okay, but does not have any phy
> >> >> > >> supply?
> >> >> > >>
> >> >> > > In RockPro64 there is only 1 USB-C OTG port and the other port
> >> >> > > is a USB-3.0 port.
> >> >> > > To be honest, I am not 100% sure how this all works, as I understand
> >> >> > > the USB3.0 port is wired to the second TypeC Phy.
> >> >> > >
> >> >> > > Maybe Dragan has more info on this.
> >> >> >
> >> >> > I'll have it checked and tested in detail, of course, but I have to
> >> >> > recover from this nasty flu first.  Unfortunately, it has rendeded me
> >> >> > unable to even think straight.
> >> >>
> >> >> Hope you feel better soon.
> >> >> It would be awesome if we can get this in while the current merge
> >> >> window is open.
> >> >
> >> > just a small comment regarding timing. All regular development changes
> >> > need to be finished and in linux-next _before_ the merge-window opens.
> >> >
> >> > As this is not a fix it will go to 6.9 anyway - hence no need to rush.
> >>
> >> Ah, yes, I keep forgetting that the current merge window basically
> >> goes
> >> one more kernel version into the past. :)  Thank you for the
> >> clarification.
> >
> > Hope you are feeling better.
> > Just to update, my patch has been dropped in u-boot in expectation of
> > it being fixed here.
>
> Yes, I saw that message on the U-Boot mailing list.  Frankly, that's the
> usual way, i.e. having the DT issues fixed in the Linux kernel first,
> and
> then synced back to U-Boot.
>
> > Do you foresee it happening anytime soon?
>
> Unfortunately, I've been unable to focus well enough to be able to work
> on
> this, as a result of still recovering from the _nasty_ flu. :(  Though,
> I've
> been also getting gradually better, thankfully, so while crossing all my
> fingers and knocking on wood at the same time, :) I'd dare to say that
> I'm
> expecting to be able to work on this in the next few days.
>
> I apologize for the delays.  Bear with me, please! :)

You are fast in replies. Thanks for that.

I hope you feel 100% soon and no worries I was just checking.

Regards,
Shantur
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
index bca2b50e0a..f7273f7990 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
@@ -192,7 +192,6 @@  vcc5v0_host: vcc5v0-host-regulator {
 		pinctrl-names = "default";
 		pinctrl-0 = <&vcc5v0_host_en>;
 		regulator-name = "vcc5v0_host";
-		regulator-always-on;
 		vin-supply = <&vcc5v0_usb>;
 	};
 
@@ -203,7 +202,6 @@  vcc5v0_typec: vcc5v0-typec-regulator {
 		pinctrl-names = "default";
 		pinctrl-0 = <&vcc5v0_typec_en>;
 		regulator-name = "vcc5v0_typec";
-		regulator-always-on;
 		vin-supply = <&vcc5v0_usb>;
 	};
 
@@ -859,6 +857,7 @@  &u2phy0 {
 	status = "okay";
 
 	u2phy0_otg: otg-port {
+		phy-supply = <&vcc5v0_typec>;
 		status = "okay";
 	};