Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694552

[PATCH 2/2] ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset

From Gary Bisson <gary.bisson@boundarydevices.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset
Date 2017-07-24 11:00 +0200
Message-ID <u6HnB-2u7-33@gated-at.bofh.it> (permalink)
References <u6HnA-2u7-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
 arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
index f22e5879340b..989376643cf6 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
@@ -108,6 +108,19 @@
 			startup-delay-us = <70000>;
 			enable-active-high;
 		};
+
+		reg_usb_h1_vbus: regulator@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 = <&reg_usb_h1_vbus>;
 	status = "okay";
 };
 
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] ARM: dts: sabrelite/nitrogen6x: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 11:00 +0200
  [PATCH 2/2] ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 11:00 +0200
  [PATCH 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 11:00 +0200
    Re: [PATCH 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 15:00 +0200
    Re: [PATCH 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset Fabio Estevam <festevam@gmail.com> - 2017-07-24 15:00 +0200
  Re: [PATCH v2 2/2] ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset Fabio Estevam <festevam@gmail.com> - 2017-07-24 15:10 +0200
  [PATCH v2 2/2] ARM: dts: imx6qdl-nitrogen6x: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 15:10 +0200
  Re: [PATCH v2 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset Fabio Estevam <festevam@gmail.com> - 2017-07-24 15:10 +0200
  [PATCH v2 1/2] ARM: dts: imx6qdl-sabrelite: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 15:10 +0200
  [PATCH v2 0/2] ARM: dts: sabrelite/nitrogen6x: fix USB PHY reset Gary Bisson <gary.bisson@boundarydevices.com> - 2017-07-24 15:10 +0200
    Re: [PATCH v2 0/2] ARM: dts: sabrelite/nitrogen6x: fix USB PHY reset Shawn Guo <shawnguo@kernel.org> - 2017-07-26 04:50 +0200

csiph-web