ARM: dts: sabrelite/nitrogen6x: fix USB PHY reset
Subsystems (2)
cover ARM: dts: sabrelite/nitrogen6x: fix USB PHY reset
Hi all,
This series is follow-up to those two patches:
https://patchwork.kernel.org/patch/9395531/
https://patchwork.kernel.org/patch/9395539/
At the time they were refused because a pwrseq library was supposed to get in. Unfortunately that plan hasn't succeeded yet so re-submitting the original two patches with the following modifications:
- Rebase on top of v4.13-rc2
- Reword the title to make it clear this is a fix
- Reword the changelog so it is clearly a temporary workaround
Let me know if you have any question.
Regards,
Gary
Gary Bisson (2):
ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 20 ++++++++++++++++++++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+)
Signature · 1 line
2.11.0
PATCH 1/2 ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
Declared as a regulator since the driver doesn't have a reset-gpios property for this.
This ensures that the PHY is woken up, not depending on the state the second stage bootloader leaves the pin.
This is a workaround until a proper mechanism is provided to reset such devices like the pwrseq library [1] for instance.
[1] https://lkml.org/lkml/2017/2/10/779
--- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +20 -0
@@ -123,6 +123,19 @@ regulator-max-microvolt = <2800000>; regulator-always-on; }; + + reg_usb_h1_vbus: regulator at 7 { + compatible = "regulator-fixed"; + reg = <7>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; }; mipi_xclk: mipi_xclk {
@@ -610,6 +623,12 @@ >; }; + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x030b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
@@ -705,6 +724,7 @@ }; &usbh1 { + vbus-supply = <®_usb_h1_vbus>; status = "okay"; };
Signature · 1 line
2.11.0
PATCH 2/2 ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
In reply to Gary BissonDeclared as a regulator since the driver doesn't have a reset-gpios property for this.
This ensures that the PHY is woken up, not depending on the state the second stage bootloader leaves the pin.
This is a workaround until a proper mechanism is provided to reset such devices like the pwrseq library [1] for instance.
[1] https://lkml.org/lkml/2017/2/10/779
--- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +20 -0
@@ -108,6 +108,19 @@ startup-delay-us = <70000>; enable-active-high; }; + + reg_usb_h1_vbus: regulator at 5 { + compatible = "regulator-fixed"; + reg = <5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; }; gpio-keys {
@@ -515,6 +528,12 @@ >; }; + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x030b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
@@ -629,6 +648,7 @@ }; &usbh1 { + vbus-supply = <®_usb_h1_vbus>; status = "okay"; };
Signature · 1 line
2.11.0
Fabio Estevam
reviewerRe: [PATCH 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
In reply to Gary BissonHi Gary,
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi line 137
Quoted 12 lines · Gary Bisson
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +12
-0+ + reg_usb_h1_vbus: regulator at 7 { + compatible = "regulator-fixed"; + reg = <7>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on;
As this regulator is controlled via GPIO I believe you should remove the ' regulator-always-on' property.
Same applies to 2/2/
Re: [PATCH 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
Hi Fabio,
Quoted 19 lines · Fabio Estevam
Hi Gary,
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi line 137
Quoted 12 lines · Gary Bisson
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +12
-0+ + reg_usb_h1_vbus: regulator at 7 { + compatible = "regulator-fixed"; + reg = <7>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on;
Quoted 4 lines
As this regulator is controlled via GPIO I believe you should remove the ' regulator-always-on' property.
Same applies to 2/2/
Good catch, I'll send a v2 right away.
Thanks,
Gary
v2 cover ARM: dts: sabrelite/nitrogen6x: fix USB PHY reset
In reply to Gary BissonHi all,
This series is follow-up to those two patches:
https://patchwork.kernel.org/patch/9395531/
https://patchwork.kernel.org/patch/9395539/
At the time they were refused because a pwrseq library was supposed to get in. Unfortunately that plan hasn't succeeded yet so re-submitting the original two patches with the following modifications:
- Rebase on top of v4.13-rc2
- Reword the title to make it clear this is a fix
- Reword the changelog so it is clearly a temporary workaround
Changelog v1->v2:
- Remove 'regulator-always-on' property as suggested by Fabio
Let me know if you have any question.
Regards,
Gary
Gary Bisson (2):
ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 19 +++++++++++++++++++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+)
Signature · 1 line
2.11.0
PATCH v2 1/2 ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
Declared as a regulator since the driver doesn't have a reset-gpios property for this.
This ensures that the PHY is woken up, not depending on the state the second stage bootloader leaves the pin.
This is a workaround until a proper mechanism is provided to reset such devices like the pwrseq library [1] for instance.
[1] https://lkml.org/lkml/2017/2/10/779
--- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +19 -0
@@ -123,6 +123,18 @@ regulator-max-microvolt = <2800000>; regulator-always-on; }; + + reg_usb_h1_vbus: regulator at 7 { + compatible = "regulator-fixed"; + reg = <7>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; mipi_xclk: mipi_xclk {
@@ -610,6 +622,12 @@ >; }; + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x030b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
@@ -705,6 +723,7 @@ }; &usbh1 { + vbus-supply = <®_usb_h1_vbus>; status = "okay"; };
Signature · 1 line
2.11.0
PATCH v2 2/2 ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
In reply to Gary BissonDeclared as a regulator since the driver doesn't have a reset-gpios property for this.
This ensures that the PHY is woken up, not depending on the state the second stage bootloader leaves the pin.
This is a workaround until a proper mechanism is provided to reset such devices like the pwrseq library [1] for instance.
[1] https://lkml.org/lkml/2017/2/10/779
--- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +19 -0
@@ -108,6 +108,18 @@ startup-delay-us = <70000>; enable-active-high; }; + + reg_usb_h1_vbus: regulator at 5 { + compatible = "regulator-fixed"; + reg = <5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usbh1>; + regulator-name = "usb_h1_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; }; gpio-keys {
@@ -515,6 +527,12 @@ >; }; + pinctrl_usbh1: usbh1grp { + fsl,pins = < + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x030b0 + >; + }; + pinctrl_usbotg: usbotggrp { fsl,pins = < MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
@@ -629,6 +647,7 @@ }; &usbh1 { + vbus-supply = <®_usb_h1_vbus>; status = "okay"; };
Signature · 1 line
2.11.0
Re: [PATCH v2 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
In reply to Gary BissonQuoted 6 lines · Gary Bisson
Declared as a regulator since the driver doesn't have a reset-gpios property for this.
This ensures that the PHY is woken up, not depending on the state the second stage bootloader leaves the pin.
Quoted 6 lines
This is a workaround until a proper mechanism is provided to reset such devices like the pwrseq library [1] for instance.
[1] https://lkml.org/lkml/2017/2/10/779
Signed-off-by Gary Bisson <[email protected]>
Re: [PATCH v2 2/2] ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
In reply to Gary BissonQuoted 6 lines · Gary Bisson
Declared as a regulator since the driver doesn't have a reset-gpios property for this.
This ensures that the PHY is woken up, not depending on the state the second stage bootloader leaves the pin.
Quoted 6 lines
This is a workaround until a proper mechanism is provided to reset such devices like the pwrseq library [1] for instance.
[1] https://lkml.org/lkml/2017/2/10/779
Signed-off-by Gary Bisson <[email protected]>
Shawn Guo
AppliedQuoted 3 lines · Gary Bisson
Gary Bisson (2):
ARM: dts: imx6qdl-sabrelite: fix USB PHY reset
ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
Applied both, thanks.