Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: clock: tegra124-dfll: Update DFLL binding for PWM regulator

Add new properties to configure the DFLL PWM regulator support.

Cc: devicetree@vger.kernel.org
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Peter De Schrijver and committed by
Thierry Reding
93caec00 22daf910

+77 -2
+77 -2
Documentation/devicetree/bindings/clock/nvidia,tegra124-dfll.txt
··· 8 8 oscillator connected to the CPU voltage rail (VDD_CPU), and a closed loop 9 9 control module that will automatically adjust the VDD_CPU voltage by 10 10 communicating with an off-chip PMIC either via an I2C bus or via PWM signals. 11 - Currently only the I2C mode is supported by these bindings. 12 11 13 12 Required properties: 14 13 - compatible : should be "nvidia,tegra124-dfll" ··· 44 45 Optional properties for the control loop parameters: 45 46 - nvidia,cg-scale: Boolean value, see the field DFLL_PARAMS_CG_SCALE in the TRM. 46 47 48 + Optional properties for mode selection: 49 + - nvidia,pwm-to-pmic: Use PWM to control regulator rather then I2C. 50 + 47 51 Required properties for I2C mode: 48 52 - nvidia,i2c-fs-rate: I2C transfer rate, if using full speed mode. 49 53 50 - Example: 54 + Required properties for PWM mode: 55 + - nvidia,pwm-period-nanoseconds: period of PWM square wave in nanoseconds. 56 + - nvidia,pwm-tristate-microvolts: Regulator voltage in micro volts when PWM 57 + control is disabled and the PWM output is tristated. Note that this voltage is 58 + configured in hardware, typically via a resistor divider. 59 + - nvidia,pwm-min-microvolts: Regulator voltage in micro volts when PWM control 60 + is enabled and PWM output is low. Hence, this is the minimum output voltage 61 + that the regulator supports when PWM control is enabled. 62 + - nvidia,pwm-voltage-step-microvolts: Voltage increase in micro volts 63 + corresponding to a 1/33th increase in duty cycle. Eg the voltage for 2/33th 64 + duty cycle would be: nvidia,pwm-min-microvolts + 65 + nvidia,pwm-voltage-step-microvolts * 2. 66 + - pinctrl-0: I/O pad configuration when PWM control is enabled. 67 + - pinctrl-1: I/O pad configuration when PWM control is disabled. 68 + - pinctrl-names: must include the following entries: 69 + - dvfs_pwm_enable: I/O pad configuration when PWM control is enabled. 70 + - dvfs_pwm_disable: I/O pad configuration when PWM control is disabled. 71 + 72 + Example for I2C: 51 73 52 74 clock@70110000 { 53 75 compatible = "nvidia,tegra124-dfll"; ··· 95 75 nvidia,cg = <2>; 96 76 97 77 nvidia,i2c-fs-rate = <400000>; 78 + }; 79 + 80 + Example for PWM: 81 + 82 + clock@70110000 { 83 + compatible = "nvidia,tegra124-dfll"; 84 + reg = <0 0x70110000 0 0x100>, /* DFLL control */ 85 + <0 0x70110000 0 0x100>, /* I2C output control */ 86 + <0 0x70110100 0 0x100>, /* Integrated I2C controller */ 87 + <0 0x70110200 0 0x100>; /* Look-up table RAM */ 88 + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 89 + clocks = <&tegra_car TEGRA210_CLK_DFLL_SOC>, 90 + <&tegra_car TEGRA210_CLK_DFLL_REF>, 91 + <&tegra_car TEGRA124_CLK_I2C5>;; 92 + clock-names = "soc", "ref", "i2c"; 93 + resets = <&tegra_car TEGRA124_RST_DFLL_DVCO>; 94 + reset-names = "dvco"; 95 + #clock-cells = <0>; 96 + clock-output-names = "dfllCPU_out"; 97 + 98 + nvidia,sample-rate = <25000>; 99 + nvidia,droop-ctrl = <0x00000f00>; 100 + nvidia,force-mode = <1>; 101 + nvidia,cf = <6>; 102 + nvidia,ci = <0>; 103 + nvidia,cg = <2>; 104 + 105 + nvidia,pwm-min-microvolts = <708000>; /* 708mV */ 106 + nvidia,pwm-period-nanoseconds = <2500>; /* 2.5us */ 107 + nvidia,pwm-to-pmic; 108 + nvidia,pwm-tristate-microvolts = <1000000>; 109 + nvidia,pwm-voltage-step-microvolts = <19200>; /* 19.2mV */ 110 + 111 + pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable"; 112 + pinctrl-0 = <&dvfs_pwm_active_state>; 113 + pinctrl-1 = <&dvfs_pwm_inactive_state>; 114 + }; 115 + 116 + /* pinmux nodes added for completeness. Binding doc can be found in: 117 + * Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt 118 + */ 119 + 120 + pinmux: pinmux@700008d4 { 121 + dvfs_pwm_active_state: dvfs_pwm_active { 122 + dvfs_pwm_pbb1 { 123 + nvidia,pins = "dvfs_pwm_pbb1"; 124 + nvidia,tristate = <TEGRA_PIN_DISABLE>; 125 + }; 126 + }; 127 + dvfs_pwm_inactive_state: dvfs_pwm_inactive { 128 + dvfs_pwm_pbb1 { 129 + nvidia,pins = "dvfs_pwm_pbb1"; 130 + nvidia,tristate = <TEGRA_PIN_ENABLE>; 131 + }; 132 + }; 98 133 };