* [PATCH 0/6] ARM: dts: sunxi: Enable otg support on a23/a33 boards
@ 2016-06-11 13:53 Hans de Goede
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree
Hi All,
All the necessary bits for this have been merged in the various foo-next
tree-s, so lets merge the dts bits and enable full otg support on these
boards.
Note that we cannot yet do this for a31 based boards as the axp221 pmic
has a quirk where it will not generate interrupts for vbus state changes
when it itself is driving vbus. I've a patch to work around this, but
this patch is part of a larger set which still needs to be merged.
Regards,
Hans
--
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] 10+ messages in thread
* [PATCH 1/6] ARM: dts: axp22x.dtsi: Disable axp22x ldo_io# regulators by default
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-11 13:53 ` Hans de Goede
2016-06-11 13:53 ` [PATCH 2/6] ARM: dts: axp22x.dtsi: Add usb_power_supply node Hans de Goede
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
Hans de Goede
Use of these as regulators conflicts with use of the gpio pins as
gpios, so disabled the ldo_io# regulators by default, this avoids
the regulator core touching them when the pins are used as gpios.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/axp22x.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi
index 76302f5..0cfec50 100644
--- a/arch/arm/boot/dts/axp22x.dtsi
+++ b/arch/arm/boot/dts/axp22x.dtsi
@@ -126,10 +126,12 @@
reg_ldo_io0: ldo_io0 {
regulator-name = "ldo_io0";
+ status = "disabled";
};
reg_ldo_io1: ldo_io1 {
regulator-name = "ldo_io1";
+ status = "disabled";
};
reg_rtc_ldo: rtc_ldo {
--
2.7.4
--
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 related [flat|nested] 10+ messages in thread
* [PATCH 2/6] ARM: dts: axp22x.dtsi: Add usb_power_supply node
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-11 13:53 ` [PATCH 1/6] ARM: dts: axp22x.dtsi: Disable axp22x ldo_io# regulators by default Hans de Goede
@ 2016-06-11 13:53 ` Hans de Goede
2016-06-11 13:53 ` [PATCH 3/6] ARM: dts: axp22x.dtsi: Add reg_drivebus node Hans de Goede
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
Hans de Goede
Add a node describing the (optional) usbpower-supply of the
axp221 / axp223 pmic.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/axp22x.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi
index 0cfec50..0401787 100644
--- a/arch/arm/boot/dts/axp22x.dtsi
+++ b/arch/arm/boot/dts/axp22x.dtsi
@@ -142,4 +142,9 @@
regulator-name = "rtc_ldo";
};
};
+
+ usb_power_supply: usb_power_supply {
+ compatible = "x-powers,axp221-usb-power-supply";
+ status = "disabled";
+ };
};
--
2.7.4
--
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 related [flat|nested] 10+ messages in thread
* [PATCH 3/6] ARM: dts: axp22x.dtsi: Add reg_drivebus node
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-11 13:53 ` [PATCH 1/6] ARM: dts: axp22x.dtsi: Disable axp22x ldo_io# regulators by default Hans de Goede
2016-06-11 13:53 ` [PATCH 2/6] ARM: dts: axp22x.dtsi: Add usb_power_supply node Hans de Goede
@ 2016-06-11 13:53 ` Hans de Goede
2016-06-11 13:53 ` [PATCH 4/6] ARM: dts: sun8i-a?3-q8-tablet.dts: Add full otg support Hans de Goede
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
Hans de Goede
Add a node describing the drivebus regulator which is an (optional)
part of the axp221/axp223 pmic. Since this regulator may not be
available at all depending on the board, mark it as disabled by
default.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/axp22x.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/axp22x.dtsi b/arch/arm/boot/dts/axp22x.dtsi
index 0401787..458b668 100644
--- a/arch/arm/boot/dts/axp22x.dtsi
+++ b/arch/arm/boot/dts/axp22x.dtsi
@@ -141,6 +141,11 @@
regulator-max-microvolt = <3000000>;
regulator-name = "rtc_ldo";
};
+
+ reg_drivevbus: drivevbus {
+ regulator-name = "drivevbus";
+ status = "disabled";
+ };
};
usb_power_supply: usb_power_supply {
--
2.7.4
--
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 related [flat|nested] 10+ messages in thread
* [PATCH 4/6] ARM: dts: sun8i-a?3-q8-tablet.dts: Add full otg support
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (2 preceding siblings ...)
2016-06-11 13:53 ` [PATCH 3/6] ARM: dts: axp22x.dtsi: Add reg_drivebus node Hans de Goede
@ 2016-06-11 13:53 ` Hans de Goede
[not found] ` <1465653186-953-5-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-11 13:53 ` [PATCH 5/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: " Hans de Goede
` (2 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
Hans de Goede
Now that we've all the necessary bits in place we can enable
full otg support on these tablets.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | 15 ---------------
arch/arm/boot/dts/sun8i-a33-q8-tablet.dts | 15 ---------------
arch/arm/boot/dts/sun8i-q8-common.dtsi | 31 +++++++++++++++++++++++++++++++
3 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
index 6062ea7..956320a 100644
--- a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
+++ b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
@@ -48,18 +48,3 @@
model = "Q8 A23 Tablet";
compatible = "allwinner,q8-a23", "allwinner,sun8i-a23";
};
-
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp223 pmic on the board.
- *
- * Once we have axp223 support we should switch to fully supporting otg.
- */
-&usb_otg {
- dr_mode = "host";
- status = "okay";
-};
-
-&usbphy {
- status = "okay";
-};
diff --git a/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
index 44b3229..b0bc236 100644
--- a/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
+++ b/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
@@ -48,18 +48,3 @@
model = "Q8 A33 Tablet";
compatible = "allwinner,q8-a33", "allwinner,sun8i-a33";
};
-
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp223 pmic on the board.
- *
- * Once we have axp223 support we should switch to fully supporting otg.
- */
-&usb_otg {
- dr_mode = "host";
- status = "okay";
-};
-
-&usbphy {
- status = "okay";
-};
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
index 346a49d..991087f 100644
--- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -87,6 +87,13 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
+
+ usb0_id_detect_pin: usb0_id_detect_pin@0 {
+ allwinner,pins = "PH8";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
};
&r_rsb {
@@ -98,6 +105,7 @@
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
eldoin-supply = <®_dcdc1>;
+ x-powers,drive-vbus-en;
};
};
@@ -163,6 +171,11 @@
regulator-name = "vcc-dram";
};
+®_drivevbus {
+ regulator-name = "usb0-vbus";
+ status = "okay";
+};
+
®_rtc_ldo {
regulator-name = "vcc-rtc";
};
@@ -176,3 +189,21 @@
&simplefb_lcd {
vcc-lcd-supply = <®_dc1sw>;
};
+
+&usb_otg {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_power_supply {
+ status = "okay";
+};
+
+&usbphy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb0_id_detect_pin>;
+ usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+ usb0_vbus_power-supply = <&usb_power_supply>;
+ usb0_vbus-supply = <®_drivevbus>;
+ status = "okay";
+};
--
2.7.4
--
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 related [flat|nested] 10+ messages in thread
* [PATCH 5/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: Add full otg support
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (3 preceding siblings ...)
2016-06-11 13:53 ` [PATCH 4/6] ARM: dts: sun8i-a?3-q8-tablet.dts: Add full otg support Hans de Goede
@ 2016-06-11 13:53 ` Hans de Goede
2016-06-11 13:53 ` [PATCH 6/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: Disable ehci0 Hans de Goede
2016-06-11 14:29 ` [PATCH 0/6] ARM: dts: sunxi: Enable otg support on a23/a33 boards Maxime Ripard
6 siblings, 0 replies; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
Hans de Goede
Now that we've all the necessary bits in place we can enable
full otg support on these tablets.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
.../boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 30 +++++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
index cb5daaf..bae779f 100644
--- a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
+++ b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
@@ -131,6 +131,13 @@
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
+
+ usb0_id_detect_pin: usb0_id_detect_pin@0 {
+ allwinner,pins = "PH8";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+ };
};
&pwm {
@@ -148,6 +155,7 @@
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
eldoin-supply = <®_dcdc1>;
+ x-powers,drive-vbus-en;
};
};
@@ -219,6 +227,11 @@
regulator-name = "vcc-dram";
};
+®_drivevbus {
+ regulator-name = "usb0-vbus";
+ status = "okay";
+};
+
®_rtc_ldo {
regulator-name = "vcc-rtc";
};
@@ -227,17 +240,20 @@
vcc-lcd-supply = <®_dc1sw>;
};
-/*
- * FIXME for now we only support host mode and rely on u-boot to have
- * turned on Vbus which is controlled by the axp223 pmic on the board.
- *
- * Once we have axp223 support we should switch to fully supporting otg.
- */
&usb_otg {
- dr_mode = "host";
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&usb_power_supply {
status = "okay";
};
&usbphy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb0_id_detect_pin>;
+ usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+ usb0_vbus_power-supply = <&usb_power_supply>;
+ usb0_vbus-supply = <®_drivevbus>;
status = "okay";
};
--
2.7.4
--
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 related [flat|nested] 10+ messages in thread
* [PATCH 6/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: Disable ehci0
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (4 preceding siblings ...)
2016-06-11 13:53 ` [PATCH 5/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: " Hans de Goede
@ 2016-06-11 13:53 ` Hans de Goede
2016-06-11 14:29 ` [PATCH 0/6] ARM: dts: sunxi: Enable otg support on a23/a33 boards Maxime Ripard
6 siblings, 0 replies; 10+ messages in thread
From: Hans de Goede @ 2016-06-11 13:53 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, devicetree,
Hans de Goede
The Polaroid mid2809pxe04 tablet uses an sdio esp8089 wifi chip, so
ehci0 is not used and should be disabled.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
index bae779f..e8c3f21 100644
--- a/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
+++ b/arch/arm/boot/dts/sun8i-a23-polaroid-mid2809pxe04.dts
@@ -72,10 +72,6 @@
};
};
-&ehci0 {
- status = "okay";
-};
-
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
--
2.7.4
--
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 related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/6] ARM: dts: sunxi: Enable otg support on a23/a33 boards
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
` (5 preceding siblings ...)
2016-06-11 13:53 ` [PATCH 6/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: Disable ehci0 Hans de Goede
@ 2016-06-11 14:29 ` Maxime Ripard
6 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2016-06-11 14:29 UTC (permalink / raw)
To: Hans de Goede
Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
On Sat, Jun 11, 2016 at 03:53:00PM +0200, Hans de Goede wrote:
> Hi All,
>
> All the necessary bits for this have been merged in the various foo-next
> tree-s, so lets merge the dts bits and enable full otg support on these
> boards.
>
> Note that we cannot yet do this for a31 based boards as the axp221 pmic
> has a quirk where it will not generate interrupts for vbus state changes
> when it itself is driving vbus. I've a patch to work around this, but
> this patch is part of a larger set which still needs to be merged.
Applied all of them, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/6] ARM: dts: sun8i-a?3-q8-tablet.dts: Add full otg support
[not found] ` <1465653186-953-5-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-13 3:19 ` Chen-Yu Tsai
[not found] ` <CAGb2v67+56hd6b+mZLNpMHPRGu3Fp9j-zJLNS2MkUmy2N_Lmdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Chen-Yu Tsai @ 2016-06-13 3:19 UTC (permalink / raw)
To: Hans de Goede; +Cc: Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel, devicetree
Hi,
On Sat, Jun 11, 2016 at 9:53 PM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Now that we've all the necessary bits in place we can enable
> full otg support on these tablets.
>
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | 15 ---------------
> arch/arm/boot/dts/sun8i-a33-q8-tablet.dts | 15 ---------------
> arch/arm/boot/dts/sun8i-q8-common.dtsi | 31 +++++++++++++++++++++++++++++++
> 3 files changed, 31 insertions(+), 30 deletions(-)
>
> diff --git a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
> index 6062ea7..956320a 100644
> --- a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
> +++ b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
> @@ -48,18 +48,3 @@
> model = "Q8 A23 Tablet";
> compatible = "allwinner,q8-a23", "allwinner,sun8i-a23";
> };
> -
> -/*
> - * FIXME for now we only support host mode and rely on u-boot to have
> - * turned on Vbus which is controlled by the axp223 pmic on the board.
> - *
> - * Once we have axp223 support we should switch to fully supporting otg.
> - */
> -&usb_otg {
> - dr_mode = "host";
> - status = "okay";
> -};
> -
> -&usbphy {
> - status = "okay";
> -};
> diff --git a/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
> index 44b3229..b0bc236 100644
> --- a/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
> +++ b/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
> @@ -48,18 +48,3 @@
> model = "Q8 A33 Tablet";
> compatible = "allwinner,q8-a33", "allwinner,sun8i-a33";
> };
> -
> -/*
> - * FIXME for now we only support host mode and rely on u-boot to have
> - * turned on Vbus which is controlled by the axp223 pmic on the board.
> - *
> - * Once we have axp223 support we should switch to fully supporting otg.
> - */
> -&usb_otg {
> - dr_mode = "host";
> - status = "okay";
> -};
> -
> -&usbphy {
> - status = "okay";
> -};
> diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
> index 346a49d..991087f 100644
> --- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
> +++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
> @@ -87,6 +87,13 @@
> allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> };
> +
> + usb0_id_detect_pin: usb0_id_detect_pin@0 {
> + allwinner,pins = "PH8";
> + allwinner,function = "gpio_in";
> + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> + };
> };
>
> &r_rsb {
> @@ -98,6 +105,7 @@
> interrupt-parent = <&nmi_intc>;
> interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> eldoin-supply = <®_dcdc1>;
> + x-powers,drive-vbus-en;
> };
> };
>
> @@ -163,6 +171,11 @@
> regulator-name = "vcc-dram";
> };
>
> +®_drivevbus {
> + regulator-name = "usb0-vbus";
> + status = "okay";
Adding a drivevbus-supply referencing vcc_5v0 (in the axp node) so
it doesn't show 0V would be nice.
Sorry for the late reply. I was out on vacation for a few days.
ChenYu
> +};
> +
> ®_rtc_ldo {
> regulator-name = "vcc-rtc";
> };
> @@ -176,3 +189,21 @@
> &simplefb_lcd {
> vcc-lcd-supply = <®_dc1sw>;
> };
> +
> +&usb_otg {
> + dr_mode = "otg";
> + status = "okay";
> +};
> +
> +&usb_power_supply {
> + status = "okay";
> +};
> +
> +&usbphy {
> + pinctrl-names = "default";
> + pinctrl-0 = <&usb0_id_detect_pin>;
> + usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
> + usb0_vbus_power-supply = <&usb_power_supply>;
> + usb0_vbus-supply = <®_drivevbus>;
> + status = "okay";
> +};
> --
> 2.7.4
>
--
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] 10+ messages in thread
* Re: [PATCH 4/6] ARM: dts: sun8i-a?3-q8-tablet.dts: Add full otg support
[not found] ` <CAGb2v67+56hd6b+mZLNpMHPRGu3Fp9j-zJLNS2MkUmy2N_Lmdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-06-13 9:32 ` Hans de Goede
0 siblings, 0 replies; 10+ messages in thread
From: Hans de Goede @ 2016-06-13 9:32 UTC (permalink / raw)
To: Chen-Yu Tsai; +Cc: Maxime Ripard, linux-arm-kernel, devicetree, Hans de Goede
Hi,
On 13-06-16 05:19, Chen-Yu Tsai wrote:
> Hi,
>
> On Sat, Jun 11, 2016 at 9:53 PM, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> Now that we've all the necessary bits in place we can enable
>> full otg support on these tablets.
>>
>> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> ---
>> arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | 15 ---------------
>> arch/arm/boot/dts/sun8i-a33-q8-tablet.dts | 15 ---------------
>> arch/arm/boot/dts/sun8i-q8-common.dtsi | 31 +++++++++++++++++++++++++++++++
>> 3 files changed, 31 insertions(+), 30 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
>> index 6062ea7..956320a 100644
>> --- a/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
>> +++ b/arch/arm/boot/dts/sun8i-a23-q8-tablet.dts
>> @@ -48,18 +48,3 @@
>> model = "Q8 A23 Tablet";
>> compatible = "allwinner,q8-a23", "allwinner,sun8i-a23";
>> };
>> -
>> -/*
>> - * FIXME for now we only support host mode and rely on u-boot to have
>> - * turned on Vbus which is controlled by the axp223 pmic on the board.
>> - *
>> - * Once we have axp223 support we should switch to fully supporting otg.
>> - */
>> -&usb_otg {
>> - dr_mode = "host";
>> - status = "okay";
>> -};
>> -
>> -&usbphy {
>> - status = "okay";
>> -};
>> diff --git a/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts b/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
>> index 44b3229..b0bc236 100644
>> --- a/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
>> +++ b/arch/arm/boot/dts/sun8i-a33-q8-tablet.dts
>> @@ -48,18 +48,3 @@
>> model = "Q8 A33 Tablet";
>> compatible = "allwinner,q8-a33", "allwinner,sun8i-a33";
>> };
>> -
>> -/*
>> - * FIXME for now we only support host mode and rely on u-boot to have
>> - * turned on Vbus which is controlled by the axp223 pmic on the board.
>> - *
>> - * Once we have axp223 support we should switch to fully supporting otg.
>> - */
>> -&usb_otg {
>> - dr_mode = "host";
>> - status = "okay";
>> -};
>> -
>> -&usbphy {
>> - status = "okay";
>> -};
>> diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
>> index 346a49d..991087f 100644
>> --- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
>> @@ -87,6 +87,13 @@
>> allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
>> };
>> +
>> + usb0_id_detect_pin: usb0_id_detect_pin@0 {
>> + allwinner,pins = "PH8";
>> + allwinner,function = "gpio_in";
>> + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
>> + };
>> };
>>
>> &r_rsb {
>> @@ -98,6 +105,7 @@
>> interrupt-parent = <&nmi_intc>;
>> interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
>> eldoin-supply = <®_dcdc1>;
>> + x-powers,drive-vbus-en;
>> };
>> };
>>
>> @@ -163,6 +171,11 @@
>> regulator-name = "vcc-dram";
>> };
>>
>> +®_drivevbus {
>> + regulator-name = "usb0-vbus";
>> + status = "okay";
>
> Adding a drivevbus-supply referencing vcc_5v0 (in the axp node) so
> it doesn't show 0V would be nice.
Ack, given that you've just asked for this with a number of boards,
I think that this belongs in axp22x.dtsi. I'll prepare a follow-up patch for
this.
Regards,
Hans
>
> Sorry for the late reply. I was out on vacation for a few days.
>
> ChenYu
>
>> +};
>> +
>> ®_rtc_ldo {
>> regulator-name = "vcc-rtc";
>> };
>> @@ -176,3 +189,21 @@
>> &simplefb_lcd {
>> vcc-lcd-supply = <®_dc1sw>;
>> };
>> +
>> +&usb_otg {
>> + dr_mode = "otg";
>> + status = "okay";
>> +};
>> +
>> +&usb_power_supply {
>> + status = "okay";
>> +};
>> +
>> +&usbphy {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&usb0_id_detect_pin>;
>> + usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
>> + usb0_vbus_power-supply = <&usb_power_supply>;
>> + usb0_vbus-supply = <®_drivevbus>;
>> + status = "okay";
>> +};
>> --
>> 2.7.4
>>
--
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] 10+ messages in thread
end of thread, other threads:[~2016-06-13 9:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-11 13:53 [PATCH 0/6] ARM: dts: sunxi: Enable otg support on a23/a33 boards Hans de Goede
[not found] ` <1465653186-953-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-11 13:53 ` [PATCH 1/6] ARM: dts: axp22x.dtsi: Disable axp22x ldo_io# regulators by default Hans de Goede
2016-06-11 13:53 ` [PATCH 2/6] ARM: dts: axp22x.dtsi: Add usb_power_supply node Hans de Goede
2016-06-11 13:53 ` [PATCH 3/6] ARM: dts: axp22x.dtsi: Add reg_drivebus node Hans de Goede
2016-06-11 13:53 ` [PATCH 4/6] ARM: dts: sun8i-a?3-q8-tablet.dts: Add full otg support Hans de Goede
[not found] ` <1465653186-953-5-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-13 3:19 ` Chen-Yu Tsai
[not found] ` <CAGb2v67+56hd6b+mZLNpMHPRGu3Fp9j-zJLNS2MkUmy2N_Lmdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-13 9:32 ` Hans de Goede
2016-06-11 13:53 ` [PATCH 5/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: " Hans de Goede
2016-06-11 13:53 ` [PATCH 6/6] ARM: dts: sun8i-a23-polaroid-mid2809pxe04: Disable ehci0 Hans de Goede
2016-06-11 14:29 ` [PATCH 0/6] ARM: dts: sunxi: Enable otg support on a23/a33 boards Maxime Ripard
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).