From 79f1494dbef612d9f3f648bdf179a67aed4509b1 Mon Sep 17 00:00:00 2001 From: Sandipan patra Date: Fri, 15 Nov 2019 10:48:57 +0530 Subject: dt: bindings: Add documentation for pwm-fan Device tree properties used in pwm-fan is Documented in Documentation/devicetree/bindings to understand how are the properties used in driver. Bug 200563459 Change-Id: I08bd23fc6c19410924c7007c2cc2a6542c0f5499 Signed-off-by: Sandipan patra Reviewed-on: https://git-master.nvidia.com/r/2239766 Reviewed-by: Bibek Basu Tested-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../devicetree/bindings/thermal/tegra-pwm-fan.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/tegra-pwm-fan.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/thermal/tegra-pwm-fan.txt b/Documentation/devicetree/bindings/thermal/tegra-pwm-fan.txt new file mode 100644 index 000000000..30a9935c4 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/tegra-pwm-fan.txt @@ -0,0 +1,51 @@ +Bindings for a fan connected to the PWM lines + +Properties details: +- compatible : "pwm-fan" +- pwms : the PWM that is used to control the PWM fan + +- shared_data + - active_steps : Entries for references in active_rpm[], active_pwm[], active_rru[], active_rrd[] + - active_rru : This value is kept on added to cur_pwm till it reaches at + next active step from the table. This is repeated until cur_pwm + value reaches target_pwm + - active_rrd : This value is kept on subtracted from cur_pwm till it reaches at + previous active step from the table. This is repeated until cur_pwm + value reaches target_pwm + - state_cap_lookup : Index to refer in active_pwm[] + - pwm_period : To derive duty cycle + - pwm_id : Assigned PWM controller id to tegra fan + Same as mentioned id in pwms. In pwms, the id starts from 1 + pwm_id in pfsd, the id starts from 0 + - step_time : Time taken for each step during rru/rrd + - state_cap : Capping state value out of available active_steps + - active_pwm_max : Max pwm value (256) + - pwm_gpio : GPIO pin used for pwm + +Example: + + pwm_fan_shared_data: pfsd { + status = "okay"; + num_resources = <0>; + active_steps = <10>; + active_rpm = <0 1000 2000 3000 4000 5000 6000 7000 10000 11000>; + active_rru = <40 2 1 1 1 1 1 1 1 1>; + active_rrd = <40 2 1 1 1 1 1 1 1 1>; + state_cap_lookup = <2 2 2 2 3 3 3 4 4 4>; + pwm_period = <45334>; + pwm_id = <3>; + step_time = <100>; /* mesecs */ + state_cap = <7>; + active_pwm_max = <256>; + pwm_gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(V, 6) GPIO_ACTIVE_LOW>; /* TEGRA_MAIN_GPIO_PV6 */ + }; + pwm-fan { + status = "okay"; + compatible = "pwm-fan"; + #pwm-cells = <1>; + pwms = <&tegra_pwm4 0 45334>; + shared_data = <&pwm_fan_shared_data>; + active_pwm = <0 80 120 160 255 255 255 255 255 255>; + }; +}; + -- cgit v1.2.2