2020-07-14 15:19:29

by Philippe Schenker

[permalink] [raw]
Subject: [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm

Chipidea depends on some hardware signals to be there in order
for runtime-pm to work well. Add the possibility to disable runtime
power management that is necessary for certain boards.

Signed-off-by: Philippe Schenker <[email protected]>
---

Changes in v2: None

Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
index 51376cbe5f3d..67a31df13e69 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -90,6 +90,7 @@ Optional properties:
case, the "idle" state needs to pull down the data and strobe pin
and the "active" state needs to pull up the strobe pin.
- pinctrl-n: alternate pin modes
+- disable-runtime-pm: This disables the runtime power management.

i.mx specific properties
- fsl,usbmisc: phandler of non-core register device, with one
--
2.27.0


2020-07-14 15:21:57

by Philippe Schenker

[permalink] [raw]
Subject: [PATCH v2 3/3] ARM: dts: colibri-imx6ull: disable runtime pm

The Colibri iMX6ULL has a somewhat special hardware design due to some
legacy decisions regarding USB OTG. This leads to different issues
when runtime PM is enabled.

Disable runtime power management on colibri-imx6ull USB.

Signed-off-by: Philippe Schenker <[email protected]>

---

Changes in v2: None

arch/arm/boot/dts/imx6ull-colibri.dtsi | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi b/arch/arm/boot/dts/imx6ull-colibri.dtsi
index 9145c536d71a..1c6692237506 100644
--- a/arch/arm/boot/dts/imx6ull-colibri.dtsi
+++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi
@@ -195,6 +195,7 @@ &uart5 {
};

&usbotg1 {
+ disable-runtime-pm;
dr_mode = "otg";
srp-disable;
hnp-disable;
@@ -202,6 +203,7 @@ &usbotg1 {
};

&usbotg2 {
+ disable-runtime-pm;
dr_mode = "host";
};

--
2.27.0

2020-07-16 19:27:50

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm

On Tue, Jul 14, 2020 at 05:18:20PM +0200, Philippe Schenker wrote:
> Chipidea depends on some hardware signals to be there in order
> for runtime-pm to work well. Add the possibility to disable runtime
> power management that is necessary for certain boards.

This is why we have SoC specific compatible strings. Use that.

>
> Signed-off-by: Philippe Schenker <[email protected]>
> ---
>
> Changes in v2: None
>
> Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> index 51376cbe5f3d..67a31df13e69 100644
> --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> @@ -90,6 +90,7 @@ Optional properties:
> case, the "idle" state needs to pull down the data and strobe pin
> and the "active" state needs to pull up the strobe pin.
> - pinctrl-n: alternate pin modes
> +- disable-runtime-pm: This disables the runtime power management.

This is a Linux feature, not h/w description or config.

>
> i.mx specific properties
> - fsl,usbmisc: phandler of non-core register device, with one
> --
> 2.27.0
>

2020-07-17 02:31:51

by Peter Chen

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm

On 20-07-16 13:24:52, Rob Herring wrote:
> On Tue, Jul 14, 2020 at 05:18:20PM +0200, Philippe Schenker wrote:
> > Chipidea depends on some hardware signals to be there in order
> > for runtime-pm to work well. Add the possibility to disable runtime
> > power management that is necessary for certain boards.
>
> This is why we have SoC specific compatible strings. Use that.

It is a board design limitation, not SoC's. To support USB low power
mode for device mode, either VBUS connects to SoC, or VBUS connect to
GPIO, or VBUS connect to Type-C IC, but none of the design is used
at that board. So the USB can't enter low power mode for that board,
otherwise, the USB controller can't be woken up since no any interrupts
will occur if USB cable (host at other side) connects to the connector.

Peter
>
> >
> > Signed-off-by: Philippe Schenker <[email protected]>
> > ---
> >
> > Changes in v2: None
> >
> > Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > index 51376cbe5f3d..67a31df13e69 100644
> > --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > @@ -90,6 +90,7 @@ Optional properties:
> > case, the "idle" state needs to pull down the data and strobe pin
> > and the "active" state needs to pull up the strobe pin.
> > - pinctrl-n: alternate pin modes
> > +- disable-runtime-pm: This disables the runtime power management.
>
> This is a Linux feature, not h/w description or config.
>
> >
> > i.mx specific properties
> > - fsl,usbmisc: phandler of non-core register device, with one
> > --
> > 2.27.0
> >

--

Thanks,
Peter Chen

2020-07-17 14:15:58

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm

On Thu, Jul 16, 2020 at 8:31 PM Peter Chen <[email protected]> wrote:
>
> On 20-07-16 13:24:52, Rob Herring wrote:
> > On Tue, Jul 14, 2020 at 05:18:20PM +0200, Philippe Schenker wrote:
> > > Chipidea depends on some hardware signals to be there in order
> > > for runtime-pm to work well. Add the possibility to disable runtime
> > > power management that is necessary for certain boards.
> >
> > This is why we have SoC specific compatible strings. Use that.
>
> It is a board design limitation, not SoC's. To support USB low power
> mode for device mode, either VBUS connects to SoC, or VBUS connect to
> GPIO, or VBUS connect to Type-C IC, but none of the design is used
> at that board. So the USB can't enter low power mode for that board,
> otherwise, the USB controller can't be woken up since no any interrupts
> will occur if USB cable (host at other side) connects to the connector.

That's certainly a better explanation than the original.

Don't you need to describe the Vbus connection in the above cases?
Then you could handle this case based on the lack of a Vbus
description?

Rob