diff mbox series

[4/4] arm64: dts: imx8mn: Add power-domain reference in USB controller

Message ID 20201022150808.763082-5-aford173@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add i.MX8MN power domain and fix USB | expand

Commit Message

Adam Ford Oct. 22, 2020, 3:08 p.m. UTC
The USB OTG controller cannot be used until the power-domain is enabled
unless it was started in the bootloader.

Adding the power-domain reference to the OTG node allows the OTG
controller to operate.

Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Krzysztof Kozlowski Oct. 23, 2020, 9:55 a.m. UTC | #1
On Thu, Oct 22, 2020 at 10:08:07AM -0500, Adam Ford wrote:
> The USB OTG controller cannot be used until the power-domain is enabled
> unless it was started in the bootloader.
> 
> Adding the power-domain reference to the OTG node allows the OTG
> controller to operate.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 

I wonder, why your patches do not have usual Git trailer with summary of
changes (after '---')?

> diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index 27733fbe87e9..605e6dbd2c6f 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -979,6 +979,7 @@ usbotg1: usb@32e40000 {
>  				assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_500M>;
>  				fsl,usbphy = <&usbphynop1>;
>  				fsl,usbmisc = <&usbmisc1 0>;
> +				power-domains = <&pgc_otg1>;

I guess you need it also for the usbphynop1 and usbmisc1.

Best regards,
Krzysztof
Adam Ford Oct. 23, 2020, 11:03 a.m. UTC | #2
On Fri, Oct 23, 2020 at 4:55 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Oct 22, 2020 at 10:08:07AM -0500, Adam Ford wrote:
> > The USB OTG controller cannot be used until the power-domain is enabled
> > unless it was started in the bootloader.
> >
> > Adding the power-domain reference to the OTG node allows the OTG
> > controller to operate.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
>
> I wonder, why your patches do not have usual Git trailer with summary of
> changes (after '---')?

I historically have just done 'git format-patch -pX'  but I haven't
seen complaints that the summary was missing.  I can add them going
forward.  Most of these individual patches have only touched single
files or created new files all together.

>
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > index 27733fbe87e9..605e6dbd2c6f 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > @@ -979,6 +979,7 @@ usbotg1: usb@32e40000 {
> >                               assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_500M>;
> >                               fsl,usbphy = <&usbphynop1>;
> >                               fsl,usbmisc = <&usbmisc1 0>;
> > +                             power-domains = <&pgc_otg1>;
>
> I guess you need it also for the usbphynop1 and usbmisc1.

From what I can see looking at the IP blocks and the vendor's code
repo, only the usbotg IP block needs the power-domain to enable the
clocking going to it.  AFAICT, neither the usbphynop nor the usbmisc
are using clocks gated by the power-domain.
Thanks again for all your reviews.

adam
>
> Best regards,
> Krzysztof
Krzysztof Kozlowski Oct. 23, 2020, 11:08 a.m. UTC | #3
On Fri, Oct 23, 2020 at 06:03:32AM -0500, Adam Ford wrote:
> On Fri, Oct 23, 2020 at 4:55 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > On Thu, Oct 22, 2020 at 10:08:07AM -0500, Adam Ford wrote:
> > > The USB OTG controller cannot be used until the power-domain is enabled
> > > unless it was started in the bootloader.
> > >
> > > Adding the power-domain reference to the OTG node allows the OTG
> > > controller to operate.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > >
> >
> > I wonder, why your patches do not have usual Git trailer with summary of
> > changes (after '---')?
> 
> I historically have just done 'git format-patch -pX'  but I haven't
> seen complaints that the summary was missing.  I can add them going
> forward.  Most of these individual patches have only touched single
> files or created new files all together.

The patch stat is useful, especially if it touches multiple
files/subsystems. However it's not needed, so I was just wondering :)

> 
> >
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > index 27733fbe87e9..605e6dbd2c6f 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > > @@ -979,6 +979,7 @@ usbotg1: usb@32e40000 {
> > >                               assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_500M>;
> > >                               fsl,usbphy = <&usbphynop1>;
> > >                               fsl,usbmisc = <&usbmisc1 0>;
> > > +                             power-domains = <&pgc_otg1>;
> >
> > I guess you need it also for the usbphynop1 and usbmisc1.
> 
> From what I can see looking at the IP blocks and the vendor's code
> repo, only the usbotg IP block needs the power-domain to enable the
> clocking going to it.  AFAICT, neither the usbphynop nor the usbmisc
> are using clocks gated by the power-domain.
> Thanks again for all your reviews.

Mhm, ok then.  Thanks for checking.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index 27733fbe87e9..605e6dbd2c6f 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -979,6 +979,7 @@  usbotg1: usb@32e40000 {
 				assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_500M>;
 				fsl,usbphy = <&usbphynop1>;
 				fsl,usbmisc = <&usbmisc1 0>;
+				power-domains = <&pgc_otg1>;
 				status = "disabled";
 			};