* [PATCH] ARM: dts: imx6qdl-wandboard: enable USB OTG
@ 2017-06-15 6:41 Alexander Kurz
[not found] ` <1497508870-4028-1-git-send-email-akurz-3EoFODjbY6Q@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kurz @ 2017-06-15 6:41 UTC (permalink / raw)
To: Fabio Estevam; +Cc: devicetree, Alexander Kurz, linux-arm-kernel
Enable USB OTG (dual-role) on the Wandboard.
Note, that the USB_OTG_VBUS current is quite limited due to a 22R resistor
in the power line. Hence, the overcurrent signal of 1A will never be
triggered on this board.
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
index 82dc5744..cbf69ae 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -34,6 +34,16 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
+
+ reg_usb_otg_vbus: usb_otg_vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usbotgvbus>;
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+ };
};
sound {
@@ -169,6 +179,12 @@
>;
};
+ pinctrl_usbotgvbus: usbotgvbusgrp {
+ fsl,pins = <
+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x130b0
+ >;
+ };
+
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
@@ -243,10 +259,11 @@
};
&usbotg {
+ vbus-supply = <®_usb_otg_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
disable-over-current;
- dr_mode = "peripheral";
+ dr_mode = "otg";
status = "okay";
};
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: dts: imx6qdl-wandboard: enable USB OTG
[not found] ` <1497508870-4028-1-git-send-email-akurz-3EoFODjbY6Q@public.gmane.org>
@ 2017-06-16 3:41 ` Fabio Estevam
0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2017-06-16 3:41 UTC (permalink / raw)
To: Alexander Kurz
Cc: Fabio Estevam, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Shawn Guo
Hi Alexander,
On Thu, Jun 15, 2017 at 3:41 AM, Alexander Kurz <akurz-3EoFODjbY6Q@public.gmane.org> wrote:
> +
> + reg_usb_otg_vbus: usb_otg_vbus {
> + compatible = "regulator-fixed";
> + regulator-name = "usb_otg_vbus";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_usbotgvbus>;
> + gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
There is some inconsistency here:
If this regulator is driven by an active high GPIO then it needs the
'enable-active-high' property.
If 'enable-active-high' property is not passed and this VBUS is being
activated, then you should pass:
gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
Please double check.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-16 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 6:41 [PATCH] ARM: dts: imx6qdl-wandboard: enable USB OTG Alexander Kurz
[not found] ` <1497508870-4028-1-git-send-email-akurz-3EoFODjbY6Q@public.gmane.org>
2017-06-16 3:41 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).