arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
Subsystems (2)
PATCH 1/1 arm64: dts: sun50i-h5-orange-pi-pc2: Add CPUX voltage regulator
Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
--- .../dts/allwinner/sun50i-h5-orangepi-pc2.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +29 -0
@@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus { }; }; +&cpu0 { + cpu-supply = <®_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>;
Signature · 1 line
2.25.1
Hi Ondrej,
Quoted 12 lines · Ondrej Jirman
Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
Signed-off-by Ondrej Jirman <[email protected]>--- .../dts/allwinner/sun50i-h5-orangepi-pc2.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts reg_usb0_vbus: usb0-vbus { · line 91
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +4
-0@@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus { }; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; +
This should go alphabetically after "codec".
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 187
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +1
-0&codec { allwinner,audio-routing = "Line Out", "LINEOUT",@@ -180,6 +184,31 @@ flash@0 { }; }; +&r_i2c {
This should go alphabetically before "spi0".
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 194
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +7
-0+ 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.
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 203
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +9
-0+ /* + * 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.
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 214
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +8
-0+ 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,
Regards,
Samuel
Hi Samuel,
Quoted 36 lines · Samuel Holland
Hi Ondrej,
Quoted 12 lines · Ondrej Jirman
Orange Pi PC2 features sy8106a regulator just like Orange Pi PC.
Signed-off-by Ondrej Jirman <[email protected]>--- .../dts/allwinner/sun50i-h5-orangepi-pc2.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +0
-0arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts reg_usb0_vbus: usb0-vbus { · line 91
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +4
-0@@ -85,6 +85,10 @@ reg_usb0_vbus: usb0-vbus { }; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; +This should go alphabetically after "codec".
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 187
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +1
-0&codec { allwinner,audio-routing = "Line Out", "LINEOUT",@@ -180,6 +184,31 @@ flash@0 { }; }; +&r_i2c {This should go alphabetically before "spi0".
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 194
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +7
-0+ 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.
Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +4
-0+ /* + * 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
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 203
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +5
-0+ * 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.
Quoted 14 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts flash@0 { · line 214
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +8
-0+ 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,
Quoted 1 line
Reviewed-by Samuel Holland <[email protected]>
Thanks for the feedback.
regards,
o.
Quoted 2 lines
Regards,
Samuel