linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies
@ 2017-05-25  7:31 Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 1/6] ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering Chen-Yu Tsai
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime,

This series enables the power supplies for the AXP PMICs on boards
that I currently have and am actively testing.

The first patch re-orders the node references for the Cubieboard 2
dts, to maintain alphabetical order.

Patches 2 through 5 enable the ACIN power supply on various boards.

Patch 6 ties the USB/VBUS power supply of the PMIC to the USB PHY.
The PHY should have all available methods of VBUS detection configured.
The Cubietruck already has the power supplies enabled, but the USB
power supply was not configured to be used for VBUS detection.

Regards
ChenYu


Chen-Yu Tsai (6):
  ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical
    ordering
  ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply
  ARM: sun7i: a20: bananapi-m1-plus: Enable AXP209's ACIN power supply
  ARM: sun4i: a10: cubieboard: Enable AXP209's ACIN power supply
  ARM: sun6i: a31: hummingbird: Enable AXP221's ACIN power supply
  ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY

 arch/arm/boot/dts/sun4i-a10-cubieboard.dts       |  4 ++++
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts      |  4 ++++
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts |  4 ++++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts      | 12 ++++++++----
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts       |  1 +
 5 files changed, 21 insertions(+), 4 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
@ 2017-05-25  7:31 ` Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 2/6] ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply Chen-Yu Tsai
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

We want to keep node references in alphabetical order, except for
instances where node must be #included first.

Move the usb_otg node reference so that all references to non-AXP209
device nodes are in alphabetical order.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 7ac5bcc9f972..c21edd75d0b3 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -174,11 +174,6 @@
 	status = "okay";
 };
 
-&usb_otg {
-	dr_mode = "otg";
-	status = "okay";
-};
-
 #include "axp209.dtsi"
 
 &reg_dcdc2 {
@@ -220,6 +215,11 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
 	pinctrl-names = "default";
 	pinctrl-0 = <&usb0_id_detect_pin>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 1/6] ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering Chen-Yu Tsai
@ 2017-05-25  7:31 ` Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 3/6] ARM: sun7i: a20: bananapi-m1-plus: " Chen-Yu Tsai
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

The ACIN pins of the AXP209 PMIC on the Cubieboard 2 are tied to the
DC jack on the board.

Enable the ACIN power supply.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index c21edd75d0b3..2a50207618cb 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -176,6 +176,10 @@
 
 #include "axp209.dtsi"
 
+&ac_power_supply {
+	status = "okay";
+};
+
 &reg_dcdc2 {
 	regulator-always-on;
 	regulator-min-microvolt = <1000000>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] ARM: sun7i: a20: bananapi-m1-plus: Enable AXP209's ACIN power supply
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 1/6] ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 2/6] ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply Chen-Yu Tsai
@ 2017-05-25  7:31 ` Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 4/6] ARM: sun4i: a10: cubieboard: " Chen-Yu Tsai
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

The ACIN pins of the AXP209 PMIC on the Bananapi M1 Plus are tied to the
"power input" micro USB connector next to the SATA connector on the board.

Enable the ACIN power supply.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
index 4c03cc3fd7b3..eb55e74232c9 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -144,6 +144,10 @@
 
 #include "axp209.dtsi"
 
+&ac_power_supply {
+	status = "okay";
+};
+
 &ir0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ir0_rx_pins_a>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] ARM: sun4i: a10: cubieboard: Enable AXP209's ACIN power supply
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2017-05-25  7:31 ` [PATCH 3/6] ARM: sun7i: a20: bananapi-m1-plus: " Chen-Yu Tsai
@ 2017-05-25  7:31 ` Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 5/6] ARM: sun6i: a31: hummingbird: Enable AXP221's " Chen-Yu Tsai
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

The ACIN pins of the AXP209 PMIC on the Cubieboard are tied to the
DC jack on the board.

Enable the ACIN power supply.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index a698a994e5ff..404ce7694899 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -182,6 +182,10 @@
 
 #include "axp209.dtsi"
 
+&ac_power_supply {
+	status = "okay";
+};
+
 &reg_dcdc2 {
 	regulator-always-on;
 	regulator-min-microvolt = <1000000>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] ARM: sun6i: a31: hummingbird: Enable AXP221's ACIN power supply
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
                   ` (3 preceding siblings ...)
  2017-05-25  7:31 ` [PATCH 4/6] ARM: sun4i: a10: cubieboard: " Chen-Yu Tsai
@ 2017-05-25  7:31 ` Chen-Yu Tsai
  2017-05-25  7:31 ` [PATCH 6/6] ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY Chen-Yu Tsai
  2017-05-29  6:51 ` [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Maxime Ripard
  6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

The ACIN pins of the AXP221 PMIC on the A31 Hummingbird are tied to the
DC jack on the board through a 12V to 5V buck converter.

Enable the ACIN power supply.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
index 55607208468b..9ecb5f0b3f83 100644
--- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
+++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
@@ -253,6 +253,10 @@
 
 #include "axp22x.dtsi"
 
+&ac_power_supply {
+	status = "okay";
+};
+
 &reg_aldo1 {
 	regulator-min-microvolt = <3300000>;
 	regulator-max-microvolt = <3300000>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
                   ` (4 preceding siblings ...)
  2017-05-25  7:31 ` [PATCH 5/6] ARM: sun6i: a31: hummingbird: Enable AXP221's " Chen-Yu Tsai
@ 2017-05-25  7:31 ` Chen-Yu Tsai
  2017-05-29  6:51 ` [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Maxime Ripard
  6 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2017-05-25  7:31 UTC (permalink / raw)
  To: linux-arm-kernel

The USB PHY can use either a GPIO pin or the PMIC's USB power supply
to sense VBUS. Since both options are available on the Cubietruck,
add the missing property for the USB power supply to the USB PHY node.

The device tree provides all usable options. Ultimately, which method
is used is up to the driver implementation.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 8dbf732c7aa9..bb510187602c 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -336,6 +336,7 @@
 	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
 	usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
 	usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
+	usb0_vbus_power-supply = <&usb_power_supply>;
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies
  2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
                   ` (5 preceding siblings ...)
  2017-05-25  7:31 ` [PATCH 6/6] ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY Chen-Yu Tsai
@ 2017-05-29  6:51 ` Maxime Ripard
  6 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2017-05-29  6:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 25, 2017 at 03:31:32PM +0800, Chen-Yu Tsai wrote:
> Hi Maxime,
> 
> This series enables the power supplies for the AXP PMICs on boards
> that I currently have and am actively testing.
> 
> The first patch re-orders the node references for the Cubieboard 2
> dts, to maintain alphabetical order.
> 
> Patches 2 through 5 enable the ACIN power supply on various boards.
> 
> Patch 6 ties the USB/VBUS power supply of the PMIC to the USB PHY.
> The PHY should have all available methods of VBUS detection configured.
> The Cubietruck already has the power supplies enabled, but the USB
> power supply was not configured to be used for VBUS detection.

Applied all 6, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170529/904518e0/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-29  6:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25  7:31 [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies Chen-Yu Tsai
2017-05-25  7:31 ` [PATCH 1/6] ARM: sun7i: a20: cubieboard2: Move usb_otg node for alphabetical ordering Chen-Yu Tsai
2017-05-25  7:31 ` [PATCH 2/6] ARM: sun7i: a20: cubieboard2: Enable AXP209's ACIN power supply Chen-Yu Tsai
2017-05-25  7:31 ` [PATCH 3/6] ARM: sun7i: a20: bananapi-m1-plus: " Chen-Yu Tsai
2017-05-25  7:31 ` [PATCH 4/6] ARM: sun4i: a10: cubieboard: " Chen-Yu Tsai
2017-05-25  7:31 ` [PATCH 5/6] ARM: sun6i: a31: hummingbird: Enable AXP221's " Chen-Yu Tsai
2017-05-25  7:31 ` [PATCH 6/6] ARM: sun7i: a20: cubietruck: Tie AXP209's USB power supply to USB PHY Chen-Yu Tsai
2017-05-29  6:51 ` [PATCH 0/6] ARM: sunxi: Enable AXP PMIC power supplies 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).