Re: [linux-sunxi] [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board

2018-03-30 Thread Chen-Yu Tsai
On Tue, Feb 6, 2018 at 12:49 PM, Icenowy Zheng  wrote:
> Orange Pi Zero board has a SY8113B regulator, which is controlled via
> GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
> or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
> the power supply of the ARM cores in H2+ SoC.
>
> Add the device tree node of this regulator and set the cpu's cpu-supply
> property to it.
>
> Signed-off-by: Icenowy Zheng 

Reviewed-by: Chen-Yu Tsai 

However,

> ---
> No changes in v2.
>
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +
>  1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts 
> b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index 6713d0f2b3f4..34fc35737090 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -94,6 +94,27 @@
> reset-gpios = <_pio 0 7 GPIO_ACTIVE_LOW>;
> post-power-on-delay-ms = <200>;
> };
> +
> +   reg_sy8113b: gpio-regulator {

You might want to change the node name to something a bit more specific,
like vdd-cpux-regulator. This would decrease the chance of name collisions,
either from other additions or device tree overlays.

ChenYu

> +   compatible = "regulator-gpio";
> +   regulator-name = "vdd-cpux";
> +   regulator-type = "voltage";
> +   regulator-boot-on;
> +   regulator-always-on;
> +   regulator-min-microvolt = <110>;
> +   regulator-max-microvolt = <130>;
> +   regulator-ramp-delay = <50>; /* 4ms */
> +
> +   gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
> +   enable-active-high;
> +   gpios-states = <0x1>;
> +   states = <110 0x0
> + 130 0x1>;
> +   };
> +};
> +
> + {
> +   cpu-supply = <_sy8113b>;
>  };
>
>   {
> --
> 2.15.1
>
> --
> You received this message because you are subscribed to the Google Groups 
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to linux-sunxi+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board

2018-03-30 Thread Chen-Yu Tsai
On Tue, Feb 6, 2018 at 12:49 PM, Icenowy Zheng  wrote:
> Orange Pi Zero board has a SY8113B regulator, which is controlled via
> GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
> or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
> the power supply of the ARM cores in H2+ SoC.
>
> Add the device tree node of this regulator and set the cpu's cpu-supply
> property to it.
>
> Signed-off-by: Icenowy Zheng 

Reviewed-by: Chen-Yu Tsai 

However,

> ---
> No changes in v2.
>
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +
>  1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts 
> b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index 6713d0f2b3f4..34fc35737090 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -94,6 +94,27 @@
> reset-gpios = <_pio 0 7 GPIO_ACTIVE_LOW>;
> post-power-on-delay-ms = <200>;
> };
> +
> +   reg_sy8113b: gpio-regulator {

You might want to change the node name to something a bit more specific,
like vdd-cpux-regulator. This would decrease the chance of name collisions,
either from other additions or device tree overlays.

ChenYu

> +   compatible = "regulator-gpio";
> +   regulator-name = "vdd-cpux";
> +   regulator-type = "voltage";
> +   regulator-boot-on;
> +   regulator-always-on;
> +   regulator-min-microvolt = <110>;
> +   regulator-max-microvolt = <130>;
> +   regulator-ramp-delay = <50>; /* 4ms */
> +
> +   gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
> +   enable-active-high;
> +   gpios-states = <0x1>;
> +   states = <110 0x0
> + 130 0x1>;
> +   };
> +};
> +
> + {
> +   cpu-supply = <_sy8113b>;
>  };
>
>   {
> --
> 2.15.1
>
> --
> You received this message because you are subscribed to the Google Groups 
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to linux-sunxi+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


[PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board

2018-02-05 Thread Icenowy Zheng
Orange Pi Zero board has a SY8113B regulator, which is controlled via
GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
the power supply of the ARM cores in H2+ SoC.

Add the device tree node of this regulator and set the cpu's cpu-supply
property to it.

Signed-off-by: Icenowy Zheng 
---
No changes in v2.

 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts 
b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index 6713d0f2b3f4..34fc35737090 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -94,6 +94,27 @@
reset-gpios = <_pio 0 7 GPIO_ACTIVE_LOW>;
post-power-on-delay-ms = <200>;
};
+
+   reg_sy8113b: gpio-regulator {
+   compatible = "regulator-gpio";
+   regulator-name = "vdd-cpux";
+   regulator-type = "voltage";
+   regulator-boot-on;
+   regulator-always-on;
+   regulator-min-microvolt = <110>;
+   regulator-max-microvolt = <130>;
+   regulator-ramp-delay = <50>; /* 4ms */
+
+   gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+   enable-active-high;
+   gpios-states = <0x1>;
+   states = <110 0x0
+ 130 0x1>;
+   };
+};
+
+ {
+   cpu-supply = <_sy8113b>;
 };
 
  {
-- 
2.15.1



[PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board

2018-02-05 Thread Icenowy Zheng
Orange Pi Zero board has a SY8113B regulator, which is controlled via
GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0
or 1.3V when the PL6 GPIO is set to input or output 1, and the output is
the power supply of the ARM cores in H2+ SoC.

Add the device tree node of this regulator and set the cpu's cpu-supply
property to it.

Signed-off-by: Icenowy Zheng 
---
No changes in v2.

 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts 
b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index 6713d0f2b3f4..34fc35737090 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -94,6 +94,27 @@
reset-gpios = <_pio 0 7 GPIO_ACTIVE_LOW>;
post-power-on-delay-ms = <200>;
};
+
+   reg_sy8113b: gpio-regulator {
+   compatible = "regulator-gpio";
+   regulator-name = "vdd-cpux";
+   regulator-type = "voltage";
+   regulator-boot-on;
+   regulator-always-on;
+   regulator-min-microvolt = <110>;
+   regulator-max-microvolt = <130>;
+   regulator-ramp-delay = <50>; /* 4ms */
+
+   gpios = <_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+   enable-active-high;
+   gpios-states = <0x1>;
+   states = <110 0x0
+ 130 0x1>;
+   };
+};
+
+ {
+   cpu-supply = <_sy8113b>;
 };
 
  {
-- 
2.15.1