跳到主要内容

Rockchip Power Discrete DCDC Development Guide

:::info 文档信息

文档标识:RK-KF-YF-114 · 发布版本:V1.4 · 发布日期:2021-12-29 · 页数:14 · 语言:英文

原始文档:Rockchip_Developer_Guide_Power_Discrete_DCDC_EN.pdf

:::

章节大纲​

  • Rockchip Power Discrete DCDC Development Guide(P1)
    • PWM Voltage Regulator(P4)
      • Driver(P4)
      • DTS node(P4)
    • SYR8XX Voltage Regulator(P5)
      • Driver(P5)
      • DTS node(P5)
    • XZ321X Voltage Regulator(P7)
      • Driver(P7)
      • DTS node(P7)
    • TCS452X Voltage Regulator(P9)
      • Driver(P9)
      • DTS node(P9)
    • RK860X Voltage Regulator(P11)
      • RK860X(P11)
      • Driver(P11)
      • DTS node(P11)
    • DEBUG Interface(P13)
      • Get Power Tree(P13)
      • Set voltage(P13)

在线预览​

若预览无法显示,请直接下载 PDF 后用本地阅读器打开。


1. PWM Voltage Regulator​

1.1 Driver​

drivers/regulator/pwm-regulator.c

1.2 DTS node​

vdd_center: vdd-center {
compatible = "pwm-regulator";
rockchip,pwm_id = <2>;
rockchip,pwm_voltage = <900000>;
pwms = <&pwm2 0 25000 1>;
regulator-name = "vdd_center";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;

Pwm Parameter

rockchip,pwm_id = <2>;//pwm2
rockchip,pwm_voltage = <900000>;//Init voltage in U-Boot

These two parameters are mainly used by U-Boot but not kernel.

pwms = <&pwm2 0 25000 1>;

PWM2 is using pwm2 node, 25000 is PWM cycle and 1 means PWM circuit polarity is reversed.

PWM circuit polarity:

Positive polarity: The larger the PWM duty ratio, the higher the output voltage

Reversed polarity: The larger the PWM duty ratio, the lower the output voltage

regulator-name = "vdd_center";

The name of the PWM output power, invoked for voltage regulating.

regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1400000>;

The max and min voltages supported by PWM circuit hardware. They must be the actual hardware value. (Test method: The corresponding output voltage after pull PWM port up or down forcedly)

Whether the power always on or not. You can delete the attribute if need to manage the switch by yourself.

Used in U-Boot if need to set the power on in U-Boot stage.

2. SYR8XX Voltage Regulator​

2.1 Driver​

drivers/regulator/fan53555.c

2.2 DTS node​

vdd_cpu_b: syr827@40 {
compatible = "silergy,syr827";
reg = <0x40>;
regulator-compatible = "fan53555-reg";
pinctrl-0 = <&vsel1_gpio>;
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
regulator-name = "vdd_cpu_b";
regulator-max-microvolt = <1500000>;
regulator-ramp-delay = <1000>;
fcs,suspend-voltage-selector = <1>;
regulator-initial-state = <3>;
regulator-state-mem {
regulator-off-in-suspend;

Supply Parameter

The hardware input voltage, no actual meaning, mainly used for constructing the power tree.

Pinctrl Parameter

pinctrl-0 = <&vsel1_gpio>;
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
fcs,suspend-voltage-selector = <1>;

Pay attention to this:This IO is used to change two groups of different voltages, but currently it is used to quickly change the switch.

fcs,suspend-voltage-selector = <1>;

Enable voltage when VSEL pin is low, disable the voltage when it is high. IO is pulled down by default.

fcs,suspend-voltage-selector = <0>;

Enable voltage when VSEL pin is high, disable the voltage when it is low. IO is pulled up by default.

The value should match with the actual hardware.

Note:

VSEL pin function can also be used to change voltage for sleep-resume instead of quickly changing the switch. Only need to delete:

pinctrl-0 = <&vsel1_gpio>;
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;

Now VSEL pin is connected to pmic_sleep. The function:

fcs,suspend-voltage-selector = <1>;

Output running voltage when VSEL pin is low and output standby voltage when it is high(also can set to off for standby). IO is pulled down by default.

fcs,suspend-voltage-selector = <0>;

Output running voltage when VSEL pin is high and output standby voltage when it is low(also can set to off for standby). IO is pulled up by default.

regulator-name = "vdd_cpu_b";

The name of the PWM output power, invoked for voltage regulating.

regulator-max-microvolt = <1500000>;

The max and min values limited by software, it is not allowable to set the values out of the range.

Whether the power always on or not. You can delete the attribute if need to manage the switch by yourself.

Used in U-Boot to if need to set the power on in U-Boot stage.

regulator-ramp-delay = <1000>;

It is to control the ascending speed of voltage regulating. Normally no need to change as it is already the optimal value.

3. XZ321X Voltage Regulator​

3.1 Driver​

drivers/regulator/xz3216.c

3.2 DTS node​

xz3216: xz3216@60 {
compatible = "xz3216";
reg = <0x60>;
status = "okay";
regulators {
#address-cells = <1>;
#size-cells = <0>;
xz3216_dc1: regulator@0 {
reg = <0>;
regulator-compatible = "xz_dcdc1";
regulator-name = "vdd_cpu_l";
regulator-max-microvolt = <1400000>;
regulator-initial-state = <3>;
regulator-state-mem {
regulator-off-in-suspend;
regulator-suspend-microvolt = <1100000>;
regulator-name = "vdd_cpu_l";

The name of the output power, invoked for voltage regulating.

regulator-max-microvolt = <1500000>;

The max and min values limited by software, it is not allowable to set the values out of the range.

Whether the power always on or not. You can delete the attribute if need to manage the switch by yourself.

Cpu Parameter

Pay attention to the changes for frequency and voltage regulating:

If it is used for CPU little core, also need to modify:

&cpu_l0 {
cpu-supply = <&xz3216_dc1>;
&cpu_l1 {
cpu-supply = <&xz3216_dc1>;
&cpu_l2 {
cpu-supply = <&xz3216_dc1>;
&cpu_l3 {
cpu-supply = <&xz3216_dc1>;

If it is used for CPU big core, also need to modify:

&cpu_b0 {
cpu-supply = <&xz3216_dc1>;
&cpu_b1 {
cpu-supply = <&xz3216_dc1>;

If it is used for GPU, also need to modify:

&gpu {
status = "okay";
mali-supply = <&xz3216_dc1>;

The configuration depends on the actual power supply situation of XZ3126.(configured according to the released hardware circuit by default)

4. TCS452X Voltage Regulator​

4.1 Driver​

drivers/regulator/fan53555.c

4.2 DTS node​

vdd_cpu: tcs4525@1c {
compatible = "tcs,tcs452x";
reg = <0x1c>;
regulator-compatible = "fan53555-reg";
regulator-name = "vdd_cpu";
regulator-max-microvolt = <1390000>;
regulator-ramp-delay = <2300>;
fcs,suspend-voltage-selector = <1>;
regulator-state-mem {
regulator-off-in-suspend;

Supply Parameter

The hardware input voltage, no actual meaning, mainly used for constructing the power tree.

Pinctrl Parameter

pinctrl-0 = <&vsel1_gpio>;/* may be not used */
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;/* may be not used */
fcs,suspend-voltage-selector = <1>;

Pay attention to this:This IO is used to change two groups of different voltages, but currently it is used to quickly change the switch.

fcs,suspend-voltage-selector = <1>;

Enable voltage when VSEL pin is low, disable the voltage when it is high. IO is pulled down by default.

fcs,suspend-voltage-selector = <0>;

Enable voltage when VSEL pin is high, disable the voltage when it is low. IO is pulled up by default.

The value should match with the actual hardware.

Note:

VSEL pin function can also be used to change voltage for sleep-resume instead of quickly changing the switch. Only need to delete:

pinctrl-0 = <&vsel1_gpio>;
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;

Now VSEL pin is connected to pmic_sleep. The function:

fcs,suspend-voltage-selector = <1>;

Output running voltage when VSEL pin is low and output standby voltage when it is high(also can set to off for standby). IO is pulled down by default.

fcs,suspend-voltage-selector = <0>;

Output running voltage when VSEL pin is high and output standby voltage when it is low(also can set to off for standby). IO is pulled up by default.

regulator-name = "vdd_cpu";

The name of the PWM output power, invoked for voltage regulating.

regulator-max-microvolt = <1390000>;

The max and min values limited by software, it is not allowable to set the values out of the range.

Whether the power always on or not. You can delete the attribute if need to manage the switch by yourself.

Used in U-Boot to if need to set the power on in U-Boot stage.

regulator-ramp-delay = <2300>;

It is to control the ascending speed of voltage regulating. Normally no need to change as it is already the optimal value.

5. RK860X Voltage Regulator​

5.1 RK860X​

CHIPADDRVolt RangeDEFAULTDie Id
RK86000x400.7125~1.5V(12.5MV)1.0V0x8
RK86010x410.7125~1.5V(12.5MV)1.0V0x8
RK86020x420.5~1.5V(6.25MV)0.8V0xa
RK86030x430.5~1.5V(6.25MV)0.8V0xa

5.2 Driver​

drivers/regulator/rk860x-regulator.c

5.3 DTS node​

vdd_cpu: rk8600@40{
compatible = "rockchip,rk860x";
reg = <0x40>;
regulator-compatible = "rk860x-reg";
regulator-name = "vdd_cpu";
regulator-max-microvolt = <1390000>;
regulator-init-microvolt = <900000>;
regulator-ramp-delay = <2300>;
rockchip,suspend-voltage-selector = <1>;
regulator-state-mem {
regulator-off-in-suspend;

Supply Parameter

The hardware input voltage, no actual meaning, mainly used for constructing the power tree.

Pinctrl Parameter

pinctrl-0 = <&vsel1_gpio>, <&en_gpio>;
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
en-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
rockchip,suspend-voltage-selector = <1>;

Pay attention to this:This IO is used to change two groups of different voltages, but currently it is used to quickly change the switch.

rockchip,suspend-voltage-selector = <1>;

Enable voltage when VSEL pin is low, disable the voltage when it is high. IO is pulled down by default.

rockchip,suspend-voltage-selector = <0>;

Enable voltage when VSEL pin is high, disable the voltage when it is low. IO is pulled up by default.

The value should match with the actual hardware.

Note:

VSEL pin function can also be used to change voltage for sleep-resume instead of quickly changing the switch. Only need to delete:

pinctrl-0 = <&vsel1_gpio>;
vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;

Now VSEL pin is connected to pmic_sleep. The function:

rockchip,suspend-voltage-selector = <1>;

Output running voltage when VSEL pin is low and output standby voltage when it is high(also can set to off for standby). IO is pulled down by default.

rockchip,suspend-voltage-selector = <0>;

Output running voltage when VSEL pin is high and output standby voltage when it is low(also can set to off for standby). IO is pulled up by default.

EN pin function can also be used to power up:

pinctrl-0 = <&en_gpio>;
en-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;

Now EN pin is output high in uboot.

regulator-name = "vdd_cpu";

The name of the output power, invoked for voltage regulating.

regulator-max-microvolt = <1500000>;

The max and min values limited by software, it is not allowable to set the values out of the range.

Whether the power always on or not. You can delete the attribute if need to manage the switch by yourself.

Used in U-Boot to if need to set the power on in U-Boot stage.

regulator-ramp-delay = <1000>;

It is to control the ascending speed of voltage regulating. Normally no need to change as it is already the optimal value.

6. DEBUG Interface​

6.1 Get Power Tree​

cat /sys/kernel/debug/regulator/regulator_summary

6.2 Set voltage​

Set the voltage interface:

echo 1000000 > /sys/kernel/debug/regulator/vdd_cpu/voltage

Get the voltage interface:

cat /sys/kernel/debug/regulator/vdd_cpu/voltage