← Documents Documentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

NVIDIA Tegra DFLL FCPU

Tegra124/210 CPU voltage와 frequency를 I2C 또는 PWM으로 제어하는 DFLL 바인딩입니다.

Source pathDocumentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

nvidia,tegra124-dfll.txt:1-155

Closed-loop DVCO, PMIC control, loop parameter와 두 mode의 예제를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 NVIDIA Tegra124 DFLL FCPU clocksource
2
3 This binding uses the common clock binding:
4 Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6 The DFLL IP block on Tegra is a root clocksource designed for clocking
7 the fast CPU cluster. It consists of a free-running voltage controlled
8 oscillator connected to the CPU voltage rail (VDD_CPU), and a closed loop
9 control module that will automatically adjust the VDD_CPU voltage by
10 communicating with an off-chip PMIC either via an I2C bus or via PWM signals.
11
12 Required properties:
13 - compatible : should be one of:
14 - "nvidia,tegra124-dfll": for Tegra124
15 - "nvidia,tegra210-dfll": for Tegra210
16 - reg : Defines the following set of registers, in the order listed:
17 - registers for the DFLL control logic.
18 - registers for the I2C output logic.
19 - registers for the integrated I2C master controller.
20 - look-up table RAM for voltage register values.
21 - interrupts: Should contain the DFLL block interrupt.
22 - clocks: Must contain an entry for each entry in clock-names.
23 See clock-bindings.txt for details.
24 - clock-names: Must include the following entries:
25 - soc: Clock source for the DFLL control logic.
26 - ref: The closed loop reference clock
27 - i2c: Clock source for the integrated I2C master.
28 - resets: Must contain an entry for each entry in reset-names.
29 See ../reset/reset.txt for details.
30 - reset-names: Must include the following entries:
31 - dvco: Reset control for the DFLL DVCO.
32 - #clock-cells: Must be 0.
33 - clock-output-names: Name of the clock output.
34 - vdd-cpu-supply: Regulator for the CPU voltage rail that the DFLL
35 hardware will start controlling. The regulator will be queried for
36 the I2C register, control values and supported voltages.
37
38 Required properties for the control loop parameters:
39 - nvidia,sample-rate: Sample rate of the DFLL control loop.
40 - nvidia,droop-ctrl: See the register CL_DVFS_DROOP_CTRL in the TRM.
41 - nvidia,force-mode: See the field DFLL_PARAMS_FORCE_MODE in the TRM.
42 - nvidia,cf: Numeric value, see the field DFLL_PARAMS_CF_PARAM in the TRM.
43 - nvidia,ci: Numeric value, see the field DFLL_PARAMS_CI_PARAM in the TRM.
44 - nvidia,cg: Numeric value, see the field DFLL_PARAMS_CG_PARAM in the TRM.
45
46 Optional properties for the control loop parameters:
47 - nvidia,cg-scale: Boolean value, see the field DFLL_PARAMS_CG_SCALE in the TRM.
48
49 Optional properties for mode selection:
50 - nvidia,pwm-to-pmic: Use PWM to control regulator rather then I2C.
51
52 Required properties for I2C mode:
53 - nvidia,i2c-fs-rate: I2C transfer rate, if using full speed mode.
54
55 Required properties for PWM mode:
56 - nvidia,pwm-period-nanoseconds: period of PWM square wave in nanoseconds.
57 - nvidia,pwm-tristate-microvolts: Regulator voltage in micro volts when PWM
58 control is disabled and the PWM output is tristated. Note that this voltage is
59 configured in hardware, typically via a resistor divider.
60 - nvidia,pwm-min-microvolts: Regulator voltage in micro volts when PWM control
61 is enabled and PWM output is low. Hence, this is the minimum output voltage
62 that the regulator supports when PWM control is enabled.
63 - nvidia,pwm-voltage-step-microvolts: Voltage increase in micro volts
64 corresponding to a 1/33th increase in duty cycle. Eg the voltage for 2/33th
65 duty cycle would be: nvidia,pwm-min-microvolts +
66 nvidia,pwm-voltage-step-microvolts * 2.
67 - pinctrl-0: I/O pad configuration when PWM control is enabled.
68 - pinctrl-1: I/O pad configuration when PWM control is disabled.
69 - pinctrl-names: must include the following entries:
70 - dvfs_pwm_enable: I/O pad configuration when PWM control is enabled.
71 - dvfs_pwm_disable: I/O pad configuration when PWM control is disabled.
72
73 Example for I2C:
74
75 clock@70110000 {
76 compatible = "nvidia,tegra124-dfll";
77 reg = <0 0x70110000 0 0x100>, /* DFLL control */
78 <0 0x70110000 0 0x100>, /* I2C output control */
79 <0 0x70110100 0 0x100>, /* Integrated I2C controller */
80 <0 0x70110200 0 0x100>; /* Look-up table RAM */
81 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
82 clocks = <&tegra_car TEGRA124_CLK_DFLL_SOC>,
83 <&tegra_car TEGRA124_CLK_DFLL_REF>,
84 <&tegra_car TEGRA124_CLK_I2C5>;
85 clock-names = "soc", "ref", "i2c";
86 resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>;
87 reset-names = "dvco";
88 #clock-cells = <0>;
89 clock-output-names = "dfllCPU_out";
90 vdd-cpu-supply = <&vdd_cpu>;
91
92 nvidia,sample-rate = <12500>;
93 nvidia,droop-ctrl = <0x00000f00>;
94 nvidia,force-mode = <1>;
95 nvidia,cf = <10>;
96 nvidia,ci = <0>;
97 nvidia,cg = <2>;
98
99 nvidia,i2c-fs-rate = <400000>;
100 };
101
102 Example for PWM:
103
104 clock@70110000 {
105 compatible = "nvidia,tegra124-dfll";
106 reg = <0 0x70110000 0 0x100>, /* DFLL control */
107 <0 0x70110000 0 0x100>, /* I2C output control */
108 <0 0x70110100 0 0x100>, /* Integrated I2C controller */
109 <0 0x70110200 0 0x100>; /* Look-up table RAM */
110 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
111 clocks = <&tegra_car TEGRA210_CLK_DFLL_SOC>,
112 <&tegra_car TEGRA210_CLK_DFLL_REF>,
113 <&tegra_car TEGRA124_CLK_I2C5>;;
114 clock-names = "soc", "ref", "i2c";
115 resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>;
116 reset-names = "dvco";
117 #clock-cells = <0>;
118 clock-output-names = "dfllCPU_out";
119
120 nvidia,sample-rate = <25000>;
121 nvidia,droop-ctrl = <0x00000f00>;
122 nvidia,force-mode = <1>;
123 nvidia,cf = <6>;
124 nvidia,ci = <0>;
125 nvidia,cg = <2>;
126
127 nvidia,pwm-min-microvolts = <708000>; /* 708mV */
128 nvidia,pwm-period-nanoseconds = <2500>; /* 2.5us */
129 nvidia,pwm-to-pmic;
130 nvidia,pwm-tristate-microvolts = <1000000>;
131 nvidia,pwm-voltage-step-microvolts = <19200>; /* 19.2mV */
132
133 pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable";
134 pinctrl-0 = <&dvfs_pwm_active_state>;
135 pinctrl-1 = <&dvfs_pwm_inactive_state>;
136 };
137
138 /* pinmux nodes added for completeness. Binding doc can be found in:
139 * Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.yaml
140 */
141
142 pinmux: pinmux@700008d4 {
143 dvfs_pwm_active_state: dvfs_pwm_active {
144 dvfs_pwm_pbb1 {
145 nvidia,pins = "dvfs_pwm_pbb1";
146 nvidia,tristate = <TEGRA_PIN_DISABLE>;
147 };
148 };
149 dvfs_pwm_inactive_state: dvfs_pwm_inactive {
150 dvfs_pwm_pbb1 {
151 nvidia,pins = "dvfs_pwm_pbb1";
152 nvidia,tristate = <TEGRA_PIN_ENABLE>;
153 };
154 };
155 };
156

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Tegra DFLL 구조와 필수 자원

1-37

NVIDIA Tegra124 DFLL FCPU clock source

이 바인딩은 공통 clock 바인딩 `Documentation/devicetree/bindings/clock/clock-bindings.txt`를 사용합니다.

Tegra의 DFLL IP block은 fast CPU cluster를 clocking하기 위한 root clock source입니다. CPU voltage rail `VDD_CPU`에 연결된 free-running voltage-controlled oscillator와 closed-loop control module로 구성됩니다.

Closed-loop module은 I2C bus 또는 PWM signal로 off-chip PMIC와 통신하여 `VDD_CPU` voltage를 자동 조정합니다.

필수 `compatible`은 Tegra124의 `nvidia,tegra124-dfll` 또는 Tegra210의 `nvidia,tegra210-dfll`입니다.

`reg`에는 순서대로 DFLL control logic register, I2C output logic register, integrated I2C master controller register, voltage register value용 lookup table RAM을 지정합니다.

`interrupts`는 DFLL block interrupt입니다. `clocks`는 `clock-names`의 각 entry를 포함해야 하며 이름은 DFLL control logic source인 `soc`, closed-loop reference인 `ref`, integrated I2C master source인 `i2c`입니다.

`resets`는 `reset-names`의 각 entry를 포함해야 하며 `dvco`는 DFLL DVCO reset control입니다. Reset 바인딩은 `../reset/reset.txt`를 참조합니다.

`#clock-cells`는 0이고 `clock-output-names`는 output clock 이름입니다. `vdd-cpu-supply`는 DFLL hardware가 제어하기 시작할 CPU voltage rail regulator입니다. Driver는 이 regulator에서 I2C register, control value와 지원 voltage를 조회합니다.

Tegra DFLL closed loop
soc/ref clocksDFLL control과 loop 기준
DFLL control loopDVCO frequency 측정 및 보정
I2C 또는 PWMOff-chip PMIC 제어
VDD_CPU regulatorCPU voltage rail 변경
DVCOFast CPU cluster clock 출력

Clock frequency와 CPU voltage를 함께 조정하는 DFLL 제어 경로입니다.

DFLL register와 clock input
종류순서 또는 이름역할
reg0DFLL control logic
reg1I2C output logic
reg2Integrated I2C master
reg3Voltage lookup table RAM
clocksocControl logic source
clockrefClosed-loop reference
clocki2cIntegrated I2C master source

필수 register 영역과 named clock을 정리합니다.

Control loop 매개변수와 mode 선택

38-51

필수 control loop 매개변수 `nvidia,sample-rate`는 DFLL loop sample rate입니다. `nvidia,droop-ctrl`은 TRM의 `CL_DVFS_DROOP_CTRL` register를 따르고 `nvidia,force-mode`는 `DFLL_PARAMS_FORCE_MODE` field를 따릅니다.

`nvidia,cf`, `nvidia,ci`, `nvidia,cg`는 각각 TRM의 `DFLL_PARAMS_CF_PARAM`, `DFLL_PARAMS_CI_PARAM`, `DFLL_PARAMS_CG_PARAM` field를 따르는 numeric 값입니다.

선택적 `nvidia,cg-scale`은 TRM의 `DFLL_PARAMS_CG_SCALE` field를 따르는 boolean 값입니다.

선택적 mode 속성 `nvidia,pwm-to-pmic`을 사용하면 I2C 대신 PWM으로 regulator를 제어합니다.

I2C 및 PWM mode별 속성

52-72

I2C mode에서 full-speed mode를 사용하면 필수 `nvidia,i2c-fs-rate`에 I2C transfer rate를 지정합니다.

PWM mode의 `nvidia,pwm-period-nanoseconds`는 PWM square wave period입니다. `nvidia,pwm-tristate-microvolts`는 PWM control이 disabled되고 output이 tristate일 때 regulator voltage이며 보통 resistor divider로 hardware에 구성됩니다.

`nvidia,pwm-min-microvolts`는 PWM control이 enabled되고 output이 low일 때의 regulator voltage, 즉 지원되는 최소 output voltage입니다.

`nvidia,pwm-voltage-step-microvolts`는 duty cycle이 1/33 증가할 때의 voltage 증가량입니다. 예를 들어 2/33 duty cycle의 voltage는 `nvidia,pwm-min-microvolts + nvidia,pwm-voltage-step-microvolts * 2`입니다.

`pinctrl-0`은 PWM control enabled 상태, `pinctrl-1`은 disabled 상태의 I/O pad configuration입니다. `pinctrl-names`에는 각각 `dvfs_pwm_enable`, `dvfs_pwm_disable`이 있어야 합니다.

DFLL PWM voltage 모델
속성의미
pwm-period-nanosecondsPWM square wave period
pwm-tristate-microvoltsOutput tristate 시 voltage
pwm-min-microvoltsDuty 0에서 최소 voltage
pwm-voltage-step-microvoltsDuty 1/33당 voltage 증가
pinctrl-0 / pinctrl-1PWM enabled / disabled pad state

PWM duty와 regulator voltage를 결정하는 속성을 정리합니다.

Tegra124 I2C mode 예

73-101

I2C 예제는 Tegra124 DFLL의 네 register 영역, 세 clock input, DVCO reset, CPU regulator와 loop parameter를 지정하고 I2C transfer rate를 400 kHz로 설정합니다.

clock@70110000 {
        compatible = "nvidia,tegra124-dfll";
        reg = <0 0x70110000 0 0x100>, /* DFLL control */
              <0 0x70110000 0 0x100>, /* I2C output control */
              <0 0x70110100 0 0x100>, /* Integrated I2C controller */
              <0 0x70110200 0 0x100>; /* Look-up table RAM */
        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&tegra_car TEGRA124_CLK_DFLL_SOC>,
                 <&tegra_car TEGRA124_CLK_DFLL_REF>,
                 <&tegra_car TEGRA124_CLK_I2C5>;
        clock-names = "soc", "ref", "i2c";
        resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>;
        reset-names = "dvco";
        #clock-cells = <0>;
        clock-output-names = "dfllCPU_out";
        vdd-cpu-supply = <&vdd_cpu>;

        nvidia,sample-rate = <12500>;
        nvidia,droop-ctrl = <0x00000f00>;
        nvidia,force-mode = <1>;
        nvidia,cf = <10>;
        nvidia,ci = <0>;
        nvidia,cg = <2>;

        nvidia,i2c-fs-rate = <400000>;
};

Tegra210 PWM mode 예

102-137

PWM 예제는 2.5 us period, 708 mV minimum, 1 V tristate voltage와 19.2 mV step을 사용하고 active/inactive pinctrl state를 연결합니다. 원문의 clock entry 끝에 있는 이중 세미콜론도 그대로 보존합니다.

clock@70110000 {
        compatible = "nvidia,tegra124-dfll";
        reg = <0 0x70110000 0 0x100>, /* DFLL control */
              <0 0x70110000 0 0x100>, /* I2C output control */
              <0 0x70110100 0 0x100>, /* Integrated I2C controller */
              <0 0x70110200 0 0x100>; /* Look-up table RAM */
        interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&tegra_car TEGRA210_CLK_DFLL_SOC>,
                 <&tegra_car TEGRA210_CLK_DFLL_REF>,
                 <&tegra_car TEGRA124_CLK_I2C5>;;
        clock-names = "soc", "ref", "i2c";
        resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>;
        reset-names = "dvco";
        #clock-cells = <0>;
        clock-output-names = "dfllCPU_out";

        nvidia,sample-rate = <25000>;
        nvidia,droop-ctrl = <0x00000f00>;
        nvidia,force-mode = <1>;
        nvidia,cf = <6>;
        nvidia,ci = <0>;
        nvidia,cg = <2>;

        nvidia,pwm-min-microvolts = <708000>; /* 708mV */
        nvidia,pwm-period-nanoseconds = <2500>; /* 2.5us */
        nvidia,pwm-to-pmic;
        nvidia,pwm-tristate-microvolts = <1000000>;
        nvidia,pwm-voltage-step-microvolts = <19200>; /* 19.2mV */

        pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable";
        pinctrl-0 = <&dvfs_pwm_active_state>;
        pinctrl-1 = <&dvfs_pwm_inactive_state>;
};

DVFS PWM pinmux 예

138-155

완전성을 위해 추가된 pinmux 예입니다. 바인딩 문서는 `Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.yaml`이며 active 상태는 tristate를 disable하고 inactive 상태는 enable합니다.

/* pinmux nodes added for completeness. Binding doc can be found in:
 * Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.yaml
 */

pinmux: pinmux@700008d4 {
        dvfs_pwm_active_state: dvfs_pwm_active {
                dvfs_pwm_pbb1 {
                        nvidia,pins = "dvfs_pwm_pbb1";
                        nvidia,tristate = <TEGRA_PIN_DISABLE>;
                };
        };
        dvfs_pwm_inactive_state: dvfs_pwm_inactive {
                dvfs_pwm_pbb1 {
                        nvidia,pins = "dvfs_pwm_pbb1";
                        nvidia,tristate = <TEGRA_PIN_ENABLE>;
                };
        };
};