* [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node
2018-05-26 18:30 ARM: dts: imx6: enable OTG on wandboard and riotboard Alexander Kurz
@ 2018-05-26 18:30 ` Alexander Kurz
2018-05-27 16:40 ` Fabio Estevam
2018-05-28 0:56 ` Fabio Estevam
2018-05-26 18:30 ` [PATCH 2/3] ARM: dts: imx6qdl-wandboard: enable USB OTG Alexander Kurz
2018-05-26 18:30 ` [PATCH 3/3] ARM: dts: imx6dl-riotboard: fix OTG regulator polarity Alexander Kurz
2 siblings, 2 replies; 6+ messages in thread
From: Alexander Kurz @ 2018-05-26 18:30 UTC (permalink / raw)
To: Shawn Guo; +Cc: Fabio Estevam, devicetree, Alexander Kurz, linux-arm-kernel
To match the convention, move regulator-fixed nodes directly into
the root node.
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/boot/dts/imx6dl-riotboard.dts | 55 +++++++++++++-------------------
arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 40 ++++++++++-------------
2 files changed, 39 insertions(+), 56 deletions(-)
diff --git a/arch/arm/boot/dts/imx6dl-riotboard.dts b/arch/arm/boot/dts/imx6dl-riotboard.dts
index 2e98c92adff7..a52e05934e3a 100644
--- a/arch/arm/boot/dts/imx6dl-riotboard.dts
+++ b/arch/arm/boot/dts/imx6dl-riotboard.dts
@@ -19,38 +19,6 @@
reg = <0x10000000 0x40000000>;
};
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_2p5v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- };
-
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-
- reg_usb_otg_vbus: regulator@2 {
- compatible = "regulator-fixed";
- reg = <2>;
- regulator-name = "usb_otg_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 0>;
- enable-active-high;
- };
- };
-
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -82,6 +50,29 @@
mux-int-port = <1>;
mux-ext-port = <3>;
};
+
+ reg_2p5v: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ };
+
+ reg_3p3v: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ reg_usb_otg_vbus: fixedregulator@2 {
+ compatible = "regulator-fixed";
+ regulator-name = "usb_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpio3 22 0>;
+ enable-active-high;
+ };
};
&audmux {
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
index ed96d7b5feab..ff7e824dfd28 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -12,30 +12,6 @@
#include <dt-bindings/gpio/gpio.h>
/ {
- regulators {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <0>;
-
- reg_2p5v: regulator@0 {
- compatible = "regulator-fixed";
- reg = <0>;
- regulator-name = "2P5V";
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- regulator-always-on;
- };
-
- reg_3p3v: regulator@1 {
- compatible = "regulator-fixed";
- reg = <1>;
- regulator-name = "3P3V";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- };
- };
-
sound {
compatible = "fsl,imx6-wandboard-sgtl5000",
"fsl,imx-audio-sgtl5000";
@@ -56,6 +32,22 @@
spdif-controller = <&spdif>;
spdif-out;
};
+
+ reg_2p5v: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "2P5V";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-always-on;
+ };
+
+ reg_3p3v: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ regulator-name = "3P3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
};
&audmux {
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node
2018-05-26 18:30 ` [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node Alexander Kurz
@ 2018-05-27 16:40 ` Fabio Estevam
2018-05-28 0:56 ` Fabio Estevam
1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2018-05-27 16:40 UTC (permalink / raw)
To: Alexander Kurz
Cc: Fabio Estevam,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Shawn Guo,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
Hi Alexander,
[It would be better to split this patch in two: one for wandboard and
another one for riotboard]
On Sat, May 26, 2018 at 3:30 PM, Alexander Kurz <akurz@blala.de> wrote:
> +
> + reg_2p5v: fixedregulator@0 {
This causes dtc warnings with W=1 as you are passing a unit address
without a corresponding reg property.
You can rewrite this as:
reg_2p5v: regulator-2p5v {
Please follow this convention in the entire series.
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node
2018-05-26 18:30 ` [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node Alexander Kurz
2018-05-27 16:40 ` Fabio Estevam
@ 2018-05-28 0:56 ` Fabio Estevam
1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2018-05-28 0:56 UTC (permalink / raw)
To: Alexander Kurz
Cc: Fabio Estevam,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Shawn Guo,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
On Sat, May 26, 2018 at 3:30 PM, Alexander Kurz <akurz@blala.de> wrote:
> + reg_usb_otg_vbus: fixedregulator@2 {
> + compatible = "regulator-fixed";
> + regulator-name = "usb_otg_vbus";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + gpio = <&gpio3 22 0>;
Please use gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>; instead.
> + enable-active-high;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] ARM: dts: imx6qdl-wandboard: enable USB OTG
2018-05-26 18:30 ARM: dts: imx6: enable OTG on wandboard and riotboard Alexander Kurz
2018-05-26 18:30 ` [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node Alexander Kurz
@ 2018-05-26 18:30 ` Alexander Kurz
2018-05-26 18:30 ` [PATCH 3/3] ARM: dts: imx6dl-riotboard: fix OTG regulator polarity Alexander Kurz
2 siblings, 0 replies; 6+ messages in thread
From: Alexander Kurz @ 2018-05-26 18:30 UTC (permalink / raw)
To: Shawn Guo; +Cc: Fabio Estevam, 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 ff7e824dfd28..4ac8ee355c42 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -48,6 +48,16 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
+
+ reg_usb_otg_vbus: fixedregulator@2 {
+ 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_LOW>;
+ };
};
&audmux {
@@ -162,6 +172,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
@@ -236,10 +252,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.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] ARM: dts: imx6dl-riotboard: fix OTG regulator polarity
2018-05-26 18:30 ARM: dts: imx6: enable OTG on wandboard and riotboard Alexander Kurz
2018-05-26 18:30 ` [PATCH 1/3] ARM: dts: imx6 wandboard and riotboard: remove regulators bus node Alexander Kurz
2018-05-26 18:30 ` [PATCH 2/3] ARM: dts: imx6qdl-wandboard: enable USB OTG Alexander Kurz
@ 2018-05-26 18:30 ` Alexander Kurz
2 siblings, 0 replies; 6+ messages in thread
From: Alexander Kurz @ 2018-05-26 18:30 UTC (permalink / raw)
To: Shawn Guo; +Cc: Fabio Estevam, devicetree, Alexander Kurz, linux-arm-kernel
USB OTG power is switched on when the GPIO is pulled low.
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/boot/dts/imx6dl-riotboard.dts | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx6dl-riotboard.dts b/arch/arm/boot/dts/imx6dl-riotboard.dts
index a52e05934e3a..ef3b270c15e5 100644
--- a/arch/arm/boot/dts/imx6dl-riotboard.dts
+++ b/arch/arm/boot/dts/imx6dl-riotboard.dts
@@ -70,8 +70,7 @@
regulator-name = "usb_otg_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 22 0>;
- enable-active-high;
+ gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread