Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / pwm / nvidia,tegra20-pwm.txt
1 Tegra SoC PWFM controller
2
3 Required 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
22 Optional properties:
23 ============================
24 In some of the interface like PWM based regulator device, it is required
25 to configure the pins differently in different states, especially in suspend
26 state of the system. The configuration of pin is provided via the pinctrl
27 DT node as detailed in the pinctrl DT binding document
28         Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
29
30 The PWM node will have following optional properties.
31 pinctrl-names:  Pin state names. Must be "default" and "sleep".
32 pinctrl-0:      phandle for the default/active state of pin configurations.
33 pinctrl-1:      phandle for the sleep state of pin configurations.
34
35 Example:
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
47 Example with the pin configuration for suspend and resume:
48 =========================================================
49 Suppose pin PE7 (On Tegra210) interfaced with the regulator device and
50 it requires PWM output to be tristated when system enters suspend.
51 Following 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         };