xref: /freebsd/sys/contrib/device-tree/Bindings/pwm/fsl,vf610-ftm-pwm.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/pwm/fsl,vf610-ftm-pwm.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: Freescale FlexTimer Module (FTM) PWM controller
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotdescription: |
10*0e8011faSEmmanuel Vadot  The same FTM PWM device can have a different endianness on different SoCs. The
11*0e8011faSEmmanuel Vadot  device tree provides a property to describing this so that an operating system
12*0e8011faSEmmanuel Vadot  device driver can handle all variants of the device. Refer to the table below
13*0e8011faSEmmanuel Vadot  for the endianness of the FTM PWM block as integrated into the existing SoCs:
14*0e8011faSEmmanuel Vadot
15*0e8011faSEmmanuel Vadot  SoC     | FTM-PWM endianness
16*0e8011faSEmmanuel Vadot  --------+-------------------
17*0e8011faSEmmanuel Vadot  Vybrid  | LE
18*0e8011faSEmmanuel Vadot  LS1     | BE
19*0e8011faSEmmanuel Vadot  LS2     | LE
20*0e8011faSEmmanuel Vadot
21*0e8011faSEmmanuel Vadot  Please see ../regmap/regmap.txt for more detail about how to specify endian
22*0e8011faSEmmanuel Vadot  modes in device tree.
23*0e8011faSEmmanuel Vadot
24*0e8011faSEmmanuel Vadotmaintainers:
25*0e8011faSEmmanuel Vadot  - Frank Li <Frank.Li@nxp.com>
26*0e8011faSEmmanuel Vadot
27*0e8011faSEmmanuel Vadotproperties:
28*0e8011faSEmmanuel Vadot  compatible:
29*0e8011faSEmmanuel Vadot    enum:
30*0e8011faSEmmanuel Vadot      - fsl,vf610-ftm-pwm
31*0e8011faSEmmanuel Vadot      - fsl,imx8qm-ftm-pwm
32*0e8011faSEmmanuel Vadot
33*0e8011faSEmmanuel Vadot  reg:
34*0e8011faSEmmanuel Vadot    maxItems: 1
35*0e8011faSEmmanuel Vadot
36*0e8011faSEmmanuel Vadot  "#pwm-cells":
37*0e8011faSEmmanuel Vadot    const: 3
38*0e8011faSEmmanuel Vadot
39*0e8011faSEmmanuel Vadot  clocks:
40*0e8011faSEmmanuel Vadot    minItems: 4
41*0e8011faSEmmanuel Vadot    maxItems: 4
42*0e8011faSEmmanuel Vadot
43*0e8011faSEmmanuel Vadot  clock-names:
44*0e8011faSEmmanuel Vadot    items:
45*0e8011faSEmmanuel Vadot      - const: ftm_sys
46*0e8011faSEmmanuel Vadot      - const: ftm_ext
47*0e8011faSEmmanuel Vadot      - const: ftm_fix
48*0e8011faSEmmanuel Vadot      - const: ftm_cnt_clk_en
49*0e8011faSEmmanuel Vadot
50*0e8011faSEmmanuel Vadot  pinctrl-0: true
51*0e8011faSEmmanuel Vadot  pinctrl-1: true
52*0e8011faSEmmanuel Vadot
53*0e8011faSEmmanuel Vadot  pinctrl-names:
54*0e8011faSEmmanuel Vadot    minItems: 1
55*0e8011faSEmmanuel Vadot    items:
56*0e8011faSEmmanuel Vadot      - const: default
57*0e8011faSEmmanuel Vadot      - const: sleep
58*0e8011faSEmmanuel Vadot
59*0e8011faSEmmanuel Vadot  big-endian:
60*0e8011faSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
61*0e8011faSEmmanuel Vadot    description:
62*0e8011faSEmmanuel Vadot      Boolean property, required if the FTM PWM registers use a big-
63*0e8011faSEmmanuel Vadot      endian rather than little-endian layout.
64*0e8011faSEmmanuel Vadot
65*0e8011faSEmmanuel Vadotrequired:
66*0e8011faSEmmanuel Vadot  - compatible
67*0e8011faSEmmanuel Vadot  - reg
68*0e8011faSEmmanuel Vadot  - clocks
69*0e8011faSEmmanuel Vadot  - clock-names
70*0e8011faSEmmanuel Vadot
71*0e8011faSEmmanuel VadotallOf:
72*0e8011faSEmmanuel Vadot  - $ref: pwm.yaml#
73*0e8011faSEmmanuel Vadot
74*0e8011faSEmmanuel VadotunevaluatedProperties: false
75*0e8011faSEmmanuel Vadot
76*0e8011faSEmmanuel Vadotexamples:
77*0e8011faSEmmanuel Vadot  - |
78*0e8011faSEmmanuel Vadot    #include <dt-bindings/clock/vf610-clock.h>
79*0e8011faSEmmanuel Vadot
80*0e8011faSEmmanuel Vadot    pwm@40038000 {
81*0e8011faSEmmanuel Vadot        compatible = "fsl,vf610-ftm-pwm";
82*0e8011faSEmmanuel Vadot        reg = <0x40038000 0x1000>;
83*0e8011faSEmmanuel Vadot        #pwm-cells = <3>;
84*0e8011faSEmmanuel Vadot        clocks = <&clks VF610_CLK_FTM0>,
85*0e8011faSEmmanuel Vadot                 <&clks VF610_CLK_FTM0_EXT_SEL>,
86*0e8011faSEmmanuel Vadot                 <&clks VF610_CLK_FTM0_FIX_SEL>,
87*0e8011faSEmmanuel Vadot                 <&clks VF610_CLK_FTM0_EXT_FIX_EN>;
88*0e8011faSEmmanuel Vadot        clock-names = "ftm_sys", "ftm_ext", "ftm_fix", "ftm_cnt_clk_en";
89*0e8011faSEmmanuel Vadot        pinctrl-names = "default";
90*0e8011faSEmmanuel Vadot        pinctrl-0 = <&pinctrl_pwm0_1>;
91*0e8011faSEmmanuel Vadot        big-endian;
92*0e8011faSEmmanuel Vadot    };
93