xref: /freebsd/sys/contrib/device-tree/Bindings/pwm/nxp,mc33xs2410.yaml (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/pwm/nxp,mc33xs2410.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: High-side switch MC33XS2410
8
9maintainers:
10  - Dimitri Fedrau <dima.fedrau@gmail.com>
11
12allOf:
13  - $ref: pwm.yaml#
14  - $ref: /schemas/spi/spi-peripheral-props.yaml#
15
16properties:
17  compatible:
18    const: nxp,mc33xs2410
19
20  reg:
21    maxItems: 1
22
23  spi-max-frequency:
24    maximum: 10000000
25
26  spi-cpha: true
27
28  spi-cs-setup-delay-ns:
29    minimum: 100
30    default: 100
31
32  spi-cs-hold-delay-ns:
33    minimum: 10
34    default: 10
35
36  spi-cs-inactive-delay-ns:
37    minimum: 300
38    default: 300
39
40  reset-gpios:
41    description:
42      GPIO connected to the active low reset pin.
43    maxItems: 1
44
45  "#pwm-cells":
46    const: 3
47
48  pwm-names:
49    items:
50      - const: di0
51      - const: di1
52      - const: di2
53      - const: di3
54
55  pwms:
56    description:
57      Direct inputs(di0-3) are used to directly turn-on or turn-off the
58      outputs.
59    maxItems: 4
60
61  interrupts:
62    maxItems: 1
63
64  clocks:
65    description:
66      The external clock can be used if the internal clock doesn't meet
67      timing requirements over temperature and voltage operating range.
68    maxItems: 1
69
70  vdd-supply:
71    description:
72      Logic supply voltage
73
74  vspi-supply:
75    description:
76      Supply voltage for SPI
77
78  vpwr-supply:
79    description:
80      Power switch supply
81
82required:
83  - compatible
84  - reg
85
86unevaluatedProperties: false
87
88examples:
89  - |
90    #include <dt-bindings/gpio/gpio.h>
91    #include <dt-bindings/interrupt-controller/irq.h>
92    spi {
93        #address-cells = <1>;
94        #size-cells = <0>;
95
96       pwm@0 {
97           compatible = "nxp,mc33xs2410";
98           reg = <0x0>;
99           spi-max-frequency = <4000000>;
100           spi-cpha;
101           spi-cs-setup-delay-ns = <100>;
102           spi-cs-hold-delay-ns = <10>;
103           spi-cs-inactive-delay-ns = <300>;
104           reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
105           #pwm-cells = <3>;
106           pwm-names = "di0", "di1", "di2", "di3";
107           pwms = <&pwm0 0 1000000>,
108                  <&pwm1 0 1000000>,
109                  <&pwm2 0 1000000>,
110                  <&pwm3 0 1000000>;
111           interrupt-parent = <&gpio0>;
112           interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
113           clocks = <&clk_ext_fixed>;
114           vdd-supply = <&reg_3v3>;
115           vspi-supply = <&reg_3v3>;
116           vpwr-supply = <&reg_24v0>;
117       };
118    };
119