Back to home page

OSCL-LXR

 
 

    


0001 Freescale FlexTimer Module (FTM) PWM controller
0002 
0003 The same FTM PWM device can have a different endianness on different SoCs. The
0004 device tree provides a property to describing this so that an operating system
0005 device driver can handle all variants of the device. Refer to the table below
0006 for the endianness of the FTM PWM block as integrated into the existing SoCs:
0007 
0008         SoC     | FTM-PWM endianness
0009         --------+-------------------
0010         Vybrid  | LE
0011         LS1     | BE
0012         LS2     | LE
0013 
0014 Please see ../regmap/regmap.txt for more detail about how to specify endian
0015 modes in device tree.
0016 
0017 
0018 Required properties:
0019 - compatible : should be "fsl,<soc>-ftm-pwm" and one of the following
0020    compatible strings:
0021   - "fsl,vf610-ftm-pwm" for PWM compatible with the one integrated on VF610
0022   - "fsl,imx8qm-ftm-pwm" for PWM compatible with the one integrated on i.MX8QM
0023 - reg: Physical base address and length of the controller's registers
0024 - #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
0025   the cells format.
0026 - clock-names: Should include the following module clock source entries:
0027     "ftm_sys" (module clock, also can be used as counter clock),
0028     "ftm_ext" (external counter clock),
0029     "ftm_fix" (fixed counter clock),
0030     "ftm_cnt_clk_en" (external and fixed counter clock enable/disable).
0031 - clocks: Must contain a phandle and clock specifier for each entry in
0032   clock-names, please see clock/clock-bindings.txt for details of the property
0033   values.
0034 - pinctrl-names: Must contain a "default" entry.
0035 - pinctrl-NNN: One property must exist for each entry in pinctrl-names.
0036   See pinctrl/pinctrl-bindings.txt for details of the property values.
0037 - big-endian: Boolean property, required if the FTM PWM registers use a big-
0038   endian rather than little-endian layout.
0039 
0040 Example:
0041 
0042 pwm0: pwm@40038000 {
0043                 compatible = "fsl,vf610-ftm-pwm";
0044                 reg = <0x40038000 0x1000>;
0045                 #pwm-cells = <3>;
0046                 clock-names = "ftm_sys", "ftm_ext",
0047                                 "ftm_fix", "ftm_cnt_clk_en";
0048                 clocks = <&clks VF610_CLK_FTM0>,
0049                         <&clks VF610_CLK_FTM0_EXT_SEL>,
0050                         <&clks VF610_CLK_FTM0_FIX_SEL>,
0051                         <&clks VF610_CLK_FTM0_EXT_FIX_EN>;
0052                 pinctrl-names = "default";
0053                 pinctrl-0 = <&pinctrl_pwm0_1>;
0054                 big-endian;
0055 };