All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
@ 2020-02-22 21:45 ` Ondrej Jirman
  0 siblings, 0 replies; 6+ messages in thread
From: Ondrej Jirman @ 2020-02-22 21:45 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Ondrej Jirman, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
index 70b5f09984218..5feedde95b5fc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus {
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_vdd_cpux>;
+};
+
 &codec {
 	allwinner,audio-routing =
 		"Line Out", "LINEOUT",
@@ -180,6 +184,31 @@ flash@0 {
 	};
 };
 
+&r_i2c {
+	status = "okay";
+
+	reg_vdd_cpux: regulator@65 {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "vdd-cpux";
+		silergy,fixed-microvolt = <1200000>;
+		/*
+		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+		 * however both the Armbian DVFS table and the official one
+		 * have operating points with voltage under 1.1V, and both
+		 * DVFS table are known to work properly at the lowest
+		 * operating point.
+		 *
+		 * Use 1.0V as the minimum voltage instead.
+		 */
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-ramp-delay = <200>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pa_pins>;
-- 
2.25.1


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

* [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
@ 2020-02-22 21:45 ` Ondrej Jirman
  0 siblings, 0 replies; 6+ messages in thread
From: Ondrej Jirman @ 2020-02-22 21:45 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Ondrej Jirman, Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	moderated list:ARM/Allwinner sunXi SoC support

Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
index 70b5f09984218..5feedde95b5fc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus {
 	};
 };
 
+&cpu0 {
+	cpu-supply = <&reg_vdd_cpux>;
+};
+
 &codec {
 	allwinner,audio-routing =
 		"Line Out", "LINEOUT",
@@ -180,6 +184,31 @@ flash@0 {
 	};
 };
 
+&r_i2c {
+	status = "okay";
+
+	reg_vdd_cpux: regulator@65 {
+		compatible = "silergy,sy8106a";
+		reg = <0x65>;
+		regulator-name = "vdd-cpux";
+		silergy,fixed-microvolt = <1200000>;
+		/*
+		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
+		 * however both the Armbian DVFS table and the official one
+		 * have operating points with voltage under 1.1V, and both
+		 * DVFS table are known to work properly at the lowest
+		 * operating point.
+		 *
+		 * Use 1.0V as the minimum voltage instead.
+		 */
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1400000>;
+		regulator-ramp-delay = <200>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pa_pins>;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [linux-sunxi] [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
  2020-02-22 21:45 ` Ondrej Jirman
@ 2020-02-23  3:26   ` Samuel Holland
  -1 siblings, 0 replies; 6+ messages in thread
From: Samuel Holland @ 2020-02-23  3:26 UTC (permalink / raw)
  To: megous, linux-sunxi
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	moderated list:ARM/Allwinner sunXi SoC support,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Hi Ondrej,

On 2/22/20 3:45 PM, Ondrej Jirman wrote:
> Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
> 
> Signed-off-by: Ondrej Jirman <megous@megous.com>
> ---
>  .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  | 29 +++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> index 70b5f09984218..5feedde95b5fc 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> @@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus {
>  	};
>  };
>  
> +&cpu0 {
> +	cpu-supply = <&reg_vdd_cpux>;
> +};
> +

This should go alphabetically after "codec".

>  &codec {
>  	allwinner,audio-routing =
>  		"Line Out", "LINEOUT",
> @@ -180,6 +184,31 @@ flash@0 {
>  	};
>  };
>  
> +&r_i2c {

This should go alphabetically before "spi0".

> +	status = "okay";
> +
> +	reg_vdd_cpux: regulator@65 {
> +		compatible = "silergy,sy8106a";
> +		reg = <0x65>;
> +		regulator-name = "vdd-cpux";
> +		silergy,fixed-microvolt = <1200000>;

The resistors in the datasheet (10k/11.8k) make this 1.1V.

> +		/*
> +		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
> +		 * however both the Armbian DVFS table and the official one
> +		 * have operating points with voltage under 1.1V, and both
> +		 * DVFS table are known to work properly at the lowest
> +		 * operating point.
> +		 *
> +		 * Use 1.0V as the minimum voltage instead.
> +		 */

The datasheet I have for H5 has "TBD" for the VDD-CPUX volatage range. I think
this comment only applies to H3 and is not necessary here.

> +		regulator-min-microvolt = <1000000>;
> +		regulator-max-microvolt = <1400000>;
> +		regulator-ramp-delay = <200>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
> +};
> +
>  &uart0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart0_pa_pins>;
> 

Otherwise,
Reviewed-by: Samuel Holland <samuel@sholland.org>

Regards,
Samuel

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

* Re: [linux-sunxi] [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
@ 2020-02-23  3:26   ` Samuel Holland
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Holland @ 2020-02-23  3:26 UTC (permalink / raw)
  To: megous, linux-sunxi
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	moderated list:ARM/Allwinner sunXi SoC support

Hi Ondrej,

On 2/22/20 3:45 PM, Ondrej Jirman wrote:
> Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
> 
> Signed-off-by: Ondrej Jirman <megous@megous.com>
> ---
>  .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  | 29 +++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> index 70b5f09984218..5feedde95b5fc 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> @@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus {
>  	};
>  };
>  
> +&cpu0 {
> +	cpu-supply = <&reg_vdd_cpux>;
> +};
> +

This should go alphabetically after "codec".

>  &codec {
>  	allwinner,audio-routing =
>  		"Line Out", "LINEOUT",
> @@ -180,6 +184,31 @@ flash@0 {
>  	};
>  };
>  
> +&r_i2c {

This should go alphabetically before "spi0".

> +	status = "okay";
> +
> +	reg_vdd_cpux: regulator@65 {
> +		compatible = "silergy,sy8106a";
> +		reg = <0x65>;
> +		regulator-name = "vdd-cpux";
> +		silergy,fixed-microvolt = <1200000>;

The resistors in the datasheet (10k/11.8k) make this 1.1V.

> +		/*
> +		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
> +		 * however both the Armbian DVFS table and the official one
> +		 * have operating points with voltage under 1.1V, and both
> +		 * DVFS table are known to work properly at the lowest
> +		 * operating point.
> +		 *
> +		 * Use 1.0V as the minimum voltage instead.
> +		 */

The datasheet I have for H5 has "TBD" for the VDD-CPUX volatage range. I think
this comment only applies to H3 and is not necessary here.

> +		regulator-min-microvolt = <1000000>;
> +		regulator-max-microvolt = <1400000>;
> +		regulator-ramp-delay = <200>;
> +		regulator-boot-on;
> +		regulator-always-on;
> +	};
> +};
> +
>  &uart0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&uart0_pa_pins>;
> 

Otherwise,
Reviewed-by: Samuel Holland <samuel@sholland.org>

Regards,
Samuel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [linux-sunxi] [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
  2020-02-23  3:26   ` Samuel Holland
@ 2020-02-23 10:37     ` Ondřej Jirman
  -1 siblings, 0 replies; 6+ messages in thread
From: Ondřej Jirman @ 2020-02-23 10:37 UTC (permalink / raw)
  To: Samuel Holland
  Cc: linux-sunxi, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	Mark Rutland, moderated list:ARM/Allwinner sunXi SoC support,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Hi Samuel,

On Sat, Feb 22, 2020 at 09:26:30PM -0600, Samuel Holland wrote:
> Hi Ondrej,
> 
> On 2/22/20 3:45 PM, Ondrej Jirman wrote:
> > Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
> > 
> > Signed-off-by: Ondrej Jirman <megous@megous.com>
> > ---
> >  .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  | 29 +++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> > index 70b5f09984218..5feedde95b5fc 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> > @@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus {
> >  	};
> >  };
> >  
> > +&cpu0 {
> > +	cpu-supply = <&reg_vdd_cpux>;
> > +};
> > +
> 
> This should go alphabetically after "codec".
> 
> >  &codec {
> >  	allwinner,audio-routing =
> >  		"Line Out", "LINEOUT",
> > @@ -180,6 +184,31 @@ flash@0 {
> >  	};
> >  };
> >  
> > +&r_i2c {
> 
> This should go alphabetically before "spi0".
> 
> > +	status = "okay";
> > +
> > +	reg_vdd_cpux: regulator@65 {
> > +		compatible = "silergy,sy8106a";
> > +		reg = <0x65>;
> > +		regulator-name = "vdd-cpux";
> > +		silergy,fixed-microvolt = <1200000>;
> 
> The resistors in the datasheet (10k/11.8k) make this 1.1V.

Ah, you're right. I didn't notice the fine print bellow:

  https://megous.com/dl/tmp/e696b6042b80bf2e.png

only the big number above. Hehe.

> > +		/*
> > +		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
> > +		 * however both the Armbian DVFS table and the official one
> > +		 * have operating points with voltage under 1.1V, and both
> > +		 * DVFS table are known to work properly at the lowest
> > +		 * operating point.
> > +		 *
> > +		 * Use 1.0V as the minimum voltage instead.
> > +		 */
> 
> The datasheet I have for H5 has "TBD" for the VDD-CPUX volatage range. I think
> this comment only applies to H3 and is not necessary here.

Ok.

> > +		regulator-min-microvolt = <1000000>;
> > +		regulator-max-microvolt = <1400000>;
> > +		regulator-ramp-delay = <200>;
> > +		regulator-boot-on;
> > +		regulator-always-on;
> > +	};
> > +};
> > +
> >  &uart0 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&uart0_pa_pins>;
> > 
> 
> Otherwise,
> Reviewed-by: Samuel Holland <samuel@sholland.org>

Thanks for the feedback.

regards,
	o.

> Regards,
> Samuel

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

* Re: [linux-sunxi] [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
@ 2020-02-23 10:37     ` Ondřej Jirman
  0 siblings, 0 replies; 6+ messages in thread
From: Ondřej Jirman @ 2020-02-23 10:37 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Mark Rutland,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Chen-Yu Tsai, Maxime Ripard, open list, linux-sunxi, Rob Herring,
	moderated list:ARM/Allwinner sunXi SoC support

Hi Samuel,

On Sat, Feb 22, 2020 at 09:26:30PM -0600, Samuel Holland wrote:
> Hi Ondrej,
> 
> On 2/22/20 3:45 PM, Ondrej Jirman wrote:
> > Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
> > 
> > Signed-off-by: Ondrej Jirman <megous@megous.com>
> > ---
> >  .../dts/allwinner/sun50i-h5-orangepi-pc2.dts  | 29 +++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> > index 70b5f09984218..5feedde95b5fc 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
> > @@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus {
> >  	};
> >  };
> >  
> > +&cpu0 {
> > +	cpu-supply = <&reg_vdd_cpux>;
> > +};
> > +
> 
> This should go alphabetically after "codec".
> 
> >  &codec {
> >  	allwinner,audio-routing =
> >  		"Line Out", "LINEOUT",
> > @@ -180,6 +184,31 @@ flash@0 {
> >  	};
> >  };
> >  
> > +&r_i2c {
> 
> This should go alphabetically before "spi0".
> 
> > +	status = "okay";
> > +
> > +	reg_vdd_cpux: regulator@65 {
> > +		compatible = "silergy,sy8106a";
> > +		reg = <0x65>;
> > +		regulator-name = "vdd-cpux";
> > +		silergy,fixed-microvolt = <1200000>;
> 
> The resistors in the datasheet (10k/11.8k) make this 1.1V.

Ah, you're right. I didn't notice the fine print bellow:

  https://megous.com/dl/tmp/e696b6042b80bf2e.png

only the big number above. Hehe.

> > +		/*
> > +		 * The datasheet uses 1.1V as the minimum value of VDD-CPUX,
> > +		 * however both the Armbian DVFS table and the official one
> > +		 * have operating points with voltage under 1.1V, and both
> > +		 * DVFS table are known to work properly at the lowest
> > +		 * operating point.
> > +		 *
> > +		 * Use 1.0V as the minimum voltage instead.
> > +		 */
> 
> The datasheet I have for H5 has "TBD" for the VDD-CPUX volatage range. I think
> this comment only applies to H3 and is not necessary here.

Ok.

> > +		regulator-min-microvolt = <1000000>;
> > +		regulator-max-microvolt = <1400000>;
> > +		regulator-ramp-delay = <200>;
> > +		regulator-boot-on;
> > +		regulator-always-on;
> > +	};
> > +};
> > +
> >  &uart0 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&uart0_pa_pins>;
> > 
> 
> Otherwise,
> Reviewed-by: Samuel Holland <samuel@sholland.org>

Thanks for the feedback.

regards,
	o.

> Regards,
> Samuel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-02-23 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-22 21:45 [PATCH] arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator Ondrej Jirman
2020-02-22 21:45 ` Ondrej Jirman
2020-02-23  3:26 ` [linux-sunxi] " Samuel Holland
2020-02-23  3:26   ` Samuel Holland
2020-02-23 10:37   ` Ondřej Jirman
2020-02-23 10:37     ` Ondřej Jirman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.