xref: /linux/Documentation/devicetree/bindings/bus/cznic,moxtet.yaml (revision 84318277d6334c6981ab326d4acc87c6a6ddc9b8)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/bus/cznic,moxtet.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Turris Moxtet SPI bus
8
9maintainers:
10  - Marek Behún <kabel@kernel.org>
11
12description: >
13  Turris Mox module status and configuration bus (over SPI)
14
15  The driver finds the devices connected to the bus by itself, but it may be
16  needed to reference some of them from other parts of the device tree. In that
17  case the devices can be defined as subnodes of the moxtet node.
18
19properties:
20  compatible:
21    const: cznic,moxtet
22
23  reg:
24    maxItems: 1
25
26  "#address-cells":
27    const: 1
28
29  "#size-cells":
30    const: 0
31
32  spi-cpol: true
33
34  spi-cpha: true
35
36  spi-max-frequency: true
37
38  interrupt-controller: true
39
40  "#interrupt-cells":
41    const: 1
42
43  interrupts:
44    maxItems: 1
45
46  reset-gpios:
47    maxItems: 1
48
49required:
50  - compatible
51  - reg
52  - "#address-cells"
53  - "#size-cells"
54  - spi-cpol
55  - spi-cpha
56  - interrupts
57  - interrupt-controller
58  - "#interrupt-cells"
59
60additionalProperties:
61  type: object
62
63  required:
64    - reg
65
66examples:
67  - |
68    #include <dt-bindings/interrupt-controller/irq.h>
69
70    spi {
71        #address-cells = <1>;
72        #size-cells = <0>;
73
74        moxtet@1 {
75            compatible = "cznic,moxtet";
76            #address-cells = <1>;
77            #size-cells = <0>;
78            reg = <1>;
79            spi-max-frequency = <10000000>;
80            spi-cpol;
81            spi-cpha;
82            interrupt-controller;
83            #interrupt-cells = <1>;
84            interrupt-parent = <&gpiosb>;
85            interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
86
87            gpio@0 {
88                compatible = "cznic,moxtet-gpio";
89                gpio-controller;
90                #gpio-cells = <2>;
91                reg = <0>;
92            };
93        };
94    };
95