1Tegra SoC PWFM controller 2 3Required properties: 4- compatible: Must be: 5 - "nvidia,tegra20-pwm": for Tegra20 6 - "nvidia,tegra30-pwm", "nvidia,tegra20-pwm": for Tegra30 7 - "nvidia,tegra114-pwm", "nvidia,tegra20-pwm": for Tegra114 8 - "nvidia,tegra124-pwm", "nvidia,tegra20-pwm": for Tegra124 9 - "nvidia,tegra132-pwm", "nvidia,tegra20-pwm": for Tegra132 10 - "nvidia,tegra210-pwm", "nvidia,tegra20-pwm": for Tegra210 11 - "nvidia,tegra186-pwm": for Tegra186 12- reg: physical base address and length of the controller's registers 13- #pwm-cells: should be 2. See pwm.txt in this directory for a description of 14 the cells format. 15- clocks: Must contain one entry, for the module clock. 16 See ../clocks/clock-bindings.txt for details. 17- resets: Must contain an entry for each entry in reset-names. 18 See ../reset/reset.txt for details. 19- reset-names: Must include the following entries: 20 - pwm 21 22Optional properties: 23============================ 24In some of the interface like PWM based regulator device, it is required 25to configure the pins differently in different states, especially in suspend 26state of the system. The configuration of pin is provided via the pinctrl 27DT node as detailed in the pinctrl DT binding document 28 Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt 29 30The PWM node will have following optional properties. 31pinctrl-names: Pin state names. Must be "default" and "sleep". 32pinctrl-0: phandle for the default/active state of pin configurations. 33pinctrl-1: phandle for the sleep state of pin configurations. 34 35Example: 36 37 pwm: pwm@7000a000 { 38 compatible = "nvidia,tegra20-pwm"; 39 reg = <0x7000a000 0x100>; 40 #pwm-cells = <2>; 41 clocks = <&tegra_car 17>; 42 resets = <&tegra_car 17>; 43 reset-names = "pwm"; 44 }; 45 46 47Example with the pin configuration for suspend and resume: 48========================================================= 49Suppose pin PE7 (On Tegra210) interfaced with the regulator device and 50it requires PWM output to be tristated when system enters suspend. 51Following will be DT binding to achieve this: 52 53#include <dt-bindings/pinctrl/pinctrl-tegra.h> 54 55 pinmux@700008d4 { 56 pwm_active_state: pwm_active_state { 57 pe7 { 58 nvidia,pins = "pe7"; 59 nvidia,tristate = <TEGRA_PIN_DISABLE>; 60 }; 61 }; 62 63 pwm_sleep_state: pwm_sleep_state { 64 pe7 { 65 nvidia,pins = "pe7"; 66 nvidia,tristate = <TEGRA_PIN_ENABLE>; 67 }; 68 }; 69 }; 70 71 pwm@7000a000 { 72 /* Mandatory PWM properties */ 73 pinctrl-names = "default", "sleep"; 74 pinctrl-0 = <&pwm_active_state>; 75 pinctrl-1 = <&pwm_sleep_state>; 76 }; 77