Back to home page

OSCL-LXR

 
 

    


0001 STMicroelectronics PWM driver bindings
0002 --------------------------------------
0003 
0004 Required parameters:
0005 - compatible :          "st,pwm"
0006 - #pwm-cells :          Number of cells used to specify a PWM. First cell
0007                         specifies the per-chip index of the PWM to use and the
0008                         second cell is the period in nanoseconds - fixed to 2
0009                         for STiH41x.
0010 - reg :                 Physical base address and length of the controller's
0011                         registers.
0012 - pinctrl-names:        Set to "default".
0013 - pinctrl-0:            List of phandles pointing to pin configuration nodes
0014                         for PWM module.
0015                         For Pinctrl properties, please refer to [1].
0016 - clock-names:          Valid entries are "pwm" and/or "capture".
0017 - clocks:               phandle of the clock used by the PWM module.
0018                         For Clk properties, please refer to [2].
0019 - interrupts:           IRQ for the Capture device
0020 
0021 Optional properties:
0022 - st,pwm-num-chan:      Number of available PWM channels.  Default is 0.
0023 - st,capture-num-chan:  Number of available Capture channels.  Default is 0.
0024 
0025 [1] Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
0026 [2] Documentation/devicetree/bindings/clock/clock-bindings.txt
0027 
0028 Example:
0029 
0030 pwm1: pwm@fe510000 {
0031         compatible = "st,pwm";
0032         reg = <0xfe510000 0x68>;
0033         #pwm-cells = <2>;
0034         pinctrl-names = "default";
0035         pinctrl-0 = <&pinctrl_pwm1_chan0_default
0036                      &pinctrl_pwm1_chan1_default
0037                      &pinctrl_pwm1_chan2_default
0038                      &pinctrl_pwm1_chan3_default>;
0039         clocks = <&clk_sysin>;
0040         clock-names = "pwm";
0041         st,pwm-num-chan = <4>;
0042         st,capture-num-chan = <2>;
0043 };