18c2ecf20Sopenharmony_ciNVIDIA Tegra124 DFLL FCPU clocksource 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThis binding uses the common clock binding: 48c2ecf20Sopenharmony_ciDocumentation/devicetree/bindings/clock/clock-bindings.txt 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciThe DFLL IP block on Tegra is a root clocksource designed for clocking 78c2ecf20Sopenharmony_cithe fast CPU cluster. It consists of a free-running voltage controlled 88c2ecf20Sopenharmony_cioscillator connected to the CPU voltage rail (VDD_CPU), and a closed loop 98c2ecf20Sopenharmony_cicontrol module that will automatically adjust the VDD_CPU voltage by 108c2ecf20Sopenharmony_cicommunicating with an off-chip PMIC either via an I2C bus or via PWM signals. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciRequired properties: 138c2ecf20Sopenharmony_ci- compatible : should be one of: 148c2ecf20Sopenharmony_ci - "nvidia,tegra124-dfll": for Tegra124 158c2ecf20Sopenharmony_ci - "nvidia,tegra210-dfll": for Tegra210 168c2ecf20Sopenharmony_ci- reg : Defines the following set of registers, in the order listed: 178c2ecf20Sopenharmony_ci - registers for the DFLL control logic. 188c2ecf20Sopenharmony_ci - registers for the I2C output logic. 198c2ecf20Sopenharmony_ci - registers for the integrated I2C master controller. 208c2ecf20Sopenharmony_ci - look-up table RAM for voltage register values. 218c2ecf20Sopenharmony_ci- interrupts: Should contain the DFLL block interrupt. 228c2ecf20Sopenharmony_ci- clocks: Must contain an entry for each entry in clock-names. 238c2ecf20Sopenharmony_ci See clock-bindings.txt for details. 248c2ecf20Sopenharmony_ci- clock-names: Must include the following entries: 258c2ecf20Sopenharmony_ci - soc: Clock source for the DFLL control logic. 268c2ecf20Sopenharmony_ci - ref: The closed loop reference clock 278c2ecf20Sopenharmony_ci - i2c: Clock source for the integrated I2C master. 288c2ecf20Sopenharmony_ci- resets: Must contain an entry for each entry in reset-names. 298c2ecf20Sopenharmony_ci See ../reset/reset.txt for details. 308c2ecf20Sopenharmony_ci- reset-names: Must include the following entries: 318c2ecf20Sopenharmony_ci - dvco: Reset control for the DFLL DVCO. 328c2ecf20Sopenharmony_ci- #clock-cells: Must be 0. 338c2ecf20Sopenharmony_ci- clock-output-names: Name of the clock output. 348c2ecf20Sopenharmony_ci- vdd-cpu-supply: Regulator for the CPU voltage rail that the DFLL 358c2ecf20Sopenharmony_ci hardware will start controlling. The regulator will be queried for 368c2ecf20Sopenharmony_ci the I2C register, control values and supported voltages. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciRequired properties for the control loop parameters: 398c2ecf20Sopenharmony_ci- nvidia,sample-rate: Sample rate of the DFLL control loop. 408c2ecf20Sopenharmony_ci- nvidia,droop-ctrl: See the register CL_DVFS_DROOP_CTRL in the TRM. 418c2ecf20Sopenharmony_ci- nvidia,force-mode: See the field DFLL_PARAMS_FORCE_MODE in the TRM. 428c2ecf20Sopenharmony_ci- nvidia,cf: Numeric value, see the field DFLL_PARAMS_CF_PARAM in the TRM. 438c2ecf20Sopenharmony_ci- nvidia,ci: Numeric value, see the field DFLL_PARAMS_CI_PARAM in the TRM. 448c2ecf20Sopenharmony_ci- nvidia,cg: Numeric value, see the field DFLL_PARAMS_CG_PARAM in the TRM. 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ciOptional properties for the control loop parameters: 478c2ecf20Sopenharmony_ci- nvidia,cg-scale: Boolean value, see the field DFLL_PARAMS_CG_SCALE in the TRM. 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciOptional properties for mode selection: 508c2ecf20Sopenharmony_ci- nvidia,pwm-to-pmic: Use PWM to control regulator rather then I2C. 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciRequired properties for I2C mode: 538c2ecf20Sopenharmony_ci- nvidia,i2c-fs-rate: I2C transfer rate, if using full speed mode. 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ciRequired properties for PWM mode: 568c2ecf20Sopenharmony_ci- nvidia,pwm-period-nanoseconds: period of PWM square wave in nanoseconds. 578c2ecf20Sopenharmony_ci- nvidia,pwm-tristate-microvolts: Regulator voltage in micro volts when PWM 588c2ecf20Sopenharmony_ci control is disabled and the PWM output is tristated. Note that this voltage is 598c2ecf20Sopenharmony_ci configured in hardware, typically via a resistor divider. 608c2ecf20Sopenharmony_ci- nvidia,pwm-min-microvolts: Regulator voltage in micro volts when PWM control 618c2ecf20Sopenharmony_ci is enabled and PWM output is low. Hence, this is the minimum output voltage 628c2ecf20Sopenharmony_ci that the regulator supports when PWM control is enabled. 638c2ecf20Sopenharmony_ci- nvidia,pwm-voltage-step-microvolts: Voltage increase in micro volts 648c2ecf20Sopenharmony_ci corresponding to a 1/33th increase in duty cycle. Eg the voltage for 2/33th 658c2ecf20Sopenharmony_ci duty cycle would be: nvidia,pwm-min-microvolts + 668c2ecf20Sopenharmony_ci nvidia,pwm-voltage-step-microvolts * 2. 678c2ecf20Sopenharmony_ci- pinctrl-0: I/O pad configuration when PWM control is enabled. 688c2ecf20Sopenharmony_ci- pinctrl-1: I/O pad configuration when PWM control is disabled. 698c2ecf20Sopenharmony_ci- pinctrl-names: must include the following entries: 708c2ecf20Sopenharmony_ci - dvfs_pwm_enable: I/O pad configuration when PWM control is enabled. 718c2ecf20Sopenharmony_ci - dvfs_pwm_disable: I/O pad configuration when PWM control is disabled. 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ciExample for I2C: 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ciclock@70110000 { 768c2ecf20Sopenharmony_ci compatible = "nvidia,tegra124-dfll"; 778c2ecf20Sopenharmony_ci reg = <0 0x70110000 0 0x100>, /* DFLL control */ 788c2ecf20Sopenharmony_ci <0 0x70110000 0 0x100>, /* I2C output control */ 798c2ecf20Sopenharmony_ci <0 0x70110100 0 0x100>, /* Integrated I2C controller */ 808c2ecf20Sopenharmony_ci <0 0x70110200 0 0x100>; /* Look-up table RAM */ 818c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 828c2ecf20Sopenharmony_ci clocks = <&tegra_car TEGRA124_CLK_DFLL_SOC>, 838c2ecf20Sopenharmony_ci <&tegra_car TEGRA124_CLK_DFLL_REF>, 848c2ecf20Sopenharmony_ci <&tegra_car TEGRA124_CLK_I2C5>; 858c2ecf20Sopenharmony_ci clock-names = "soc", "ref", "i2c"; 868c2ecf20Sopenharmony_ci resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>; 878c2ecf20Sopenharmony_ci reset-names = "dvco"; 888c2ecf20Sopenharmony_ci #clock-cells = <0>; 898c2ecf20Sopenharmony_ci clock-output-names = "dfllCPU_out"; 908c2ecf20Sopenharmony_ci vdd-cpu-supply = <&vdd_cpu>; 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci nvidia,sample-rate = <12500>; 938c2ecf20Sopenharmony_ci nvidia,droop-ctrl = <0x00000f00>; 948c2ecf20Sopenharmony_ci nvidia,force-mode = <1>; 958c2ecf20Sopenharmony_ci nvidia,cf = <10>; 968c2ecf20Sopenharmony_ci nvidia,ci = <0>; 978c2ecf20Sopenharmony_ci nvidia,cg = <2>; 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci nvidia,i2c-fs-rate = <400000>; 1008c2ecf20Sopenharmony_ci}; 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ciExample for PWM: 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciclock@70110000 { 1058c2ecf20Sopenharmony_ci compatible = "nvidia,tegra124-dfll"; 1068c2ecf20Sopenharmony_ci reg = <0 0x70110000 0 0x100>, /* DFLL control */ 1078c2ecf20Sopenharmony_ci <0 0x70110000 0 0x100>, /* I2C output control */ 1088c2ecf20Sopenharmony_ci <0 0x70110100 0 0x100>, /* Integrated I2C controller */ 1098c2ecf20Sopenharmony_ci <0 0x70110200 0 0x100>; /* Look-up table RAM */ 1108c2ecf20Sopenharmony_ci interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 1118c2ecf20Sopenharmony_ci clocks = <&tegra_car TEGRA210_CLK_DFLL_SOC>, 1128c2ecf20Sopenharmony_ci <&tegra_car TEGRA210_CLK_DFLL_REF>, 1138c2ecf20Sopenharmony_ci <&tegra_car TEGRA124_CLK_I2C5>;; 1148c2ecf20Sopenharmony_ci clock-names = "soc", "ref", "i2c"; 1158c2ecf20Sopenharmony_ci resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>; 1168c2ecf20Sopenharmony_ci reset-names = "dvco"; 1178c2ecf20Sopenharmony_ci #clock-cells = <0>; 1188c2ecf20Sopenharmony_ci clock-output-names = "dfllCPU_out"; 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci nvidia,sample-rate = <25000>; 1218c2ecf20Sopenharmony_ci nvidia,droop-ctrl = <0x00000f00>; 1228c2ecf20Sopenharmony_ci nvidia,force-mode = <1>; 1238c2ecf20Sopenharmony_ci nvidia,cf = <6>; 1248c2ecf20Sopenharmony_ci nvidia,ci = <0>; 1258c2ecf20Sopenharmony_ci nvidia,cg = <2>; 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci nvidia,pwm-min-microvolts = <708000>; /* 708mV */ 1288c2ecf20Sopenharmony_ci nvidia,pwm-period-nanoseconds = <2500>; /* 2.5us */ 1298c2ecf20Sopenharmony_ci nvidia,pwm-to-pmic; 1308c2ecf20Sopenharmony_ci nvidia,pwm-tristate-microvolts = <1000000>; 1318c2ecf20Sopenharmony_ci nvidia,pwm-voltage-step-microvolts = <19200>; /* 19.2mV */ 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable"; 1348c2ecf20Sopenharmony_ci pinctrl-0 = <&dvfs_pwm_active_state>; 1358c2ecf20Sopenharmony_ci pinctrl-1 = <&dvfs_pwm_inactive_state>; 1368c2ecf20Sopenharmony_ci}; 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci/* pinmux nodes added for completeness. Binding doc can be found in: 1398c2ecf20Sopenharmony_ci * Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt 1408c2ecf20Sopenharmony_ci */ 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_cipinmux: pinmux@700008d4 { 1438c2ecf20Sopenharmony_ci dvfs_pwm_active_state: dvfs_pwm_active { 1448c2ecf20Sopenharmony_ci dvfs_pwm_pbb1 { 1458c2ecf20Sopenharmony_ci nvidia,pins = "dvfs_pwm_pbb1"; 1468c2ecf20Sopenharmony_ci nvidia,tristate = <TEGRA_PIN_DISABLE>; 1478c2ecf20Sopenharmony_ci }; 1488c2ecf20Sopenharmony_ci }; 1498c2ecf20Sopenharmony_ci dvfs_pwm_inactive_state: dvfs_pwm_inactive { 1508c2ecf20Sopenharmony_ci dvfs_pwm_pbb1 { 1518c2ecf20Sopenharmony_ci nvidia,pins = "dvfs_pwm_pbb1"; 1528c2ecf20Sopenharmony_ci nvidia,tristate = <TEGRA_PIN_ENABLE>; 1538c2ecf20Sopenharmony_ci }; 1548c2ecf20Sopenharmony_ci }; 1558c2ecf20Sopenharmony_ci}; 156