xref: /linux/Documentation/devicetree/bindings/spmi/mediatek,mt8196-spmi.yaml (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/spmi/mediatek,mt8196-spmi.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: MediaTek MT8196 SPMI 2.0 Controller
8
9maintainers:
10  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
11  - AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
12
13description:
14  The MediaTek MT8196 SoC features a SPMI version 2.0 compliant controller,
15  with internal wrapping arbitration logic to allow for multiple on-chip
16  devices to control up to two SPMI buses.
17  The main arbiter also acts as an interrupt controller, arbitering also
18  the interrupts coming from SPMI-connected devices into each of the nested
19  interrupt controllers from any of the present SPMI buses.
20
21properties:
22  compatible:
23    oneOf:
24      - enum:
25          - mediatek,mt8196-spmi
26      - items:
27          - enum:
28              - mediatek,mt6991-spmi
29          - const: mediatek,mt8196-spmi
30
31  ranges: true
32
33  '#address-cells':
34    const: 1
35
36  '#size-cells':
37    const: 1
38
39patternProperties:
40  "^spmi@[a-f0-9]+$":
41    type: object
42    $ref: /schemas/spmi/spmi.yaml
43    unevaluatedProperties: false
44
45    properties:
46      reg:
47        items:
48          - description: controller interface registers
49          - description: spmi master controller registers
50
51      reg-names:
52        items:
53          - const: pmif
54          - const: spmimst
55
56      clocks:
57        items:
58          - description: controller interface system clock
59          - description: controller interface timer clock
60          - description: spmi controller master clock
61
62      clock-names:
63        items:
64          - const: pmif_sys_ck
65          - const: pmif_tmr_ck
66          - const: spmimst_clk_mux
67
68      interrupts:
69        maxItems: 1
70
71      interrupt-names:
72        const: rcs
73
74      interrupt-controller: true
75
76      "#interrupt-cells":
77        const: 3
78        description: |
79          cell 1: slave ID for the requested interrupt (0-15)
80          cell 2: the requested peripheral interrupt (0-7)
81          cell 3: interrupt flags indicating level-sense information,
82                  as defined in dt-bindings/interrupt-controller/irq.h
83    required:
84      - reg
85      - reg-names
86      - clocks
87      - clock-names
88      - interrupts
89      - interrupt-names
90      - interrupt-controller
91      - "#interrupt-cells"
92
93required:
94  - compatible
95  - ranges
96  - '#address-cells'
97  - '#size-cells'
98
99additionalProperties: false
100
101examples:
102  - |
103    #include <dt-bindings/interrupt-controller/arm-gic.h>
104
105    soc {
106      #address-cells = <2>;
107      #size-cells = <2>;
108
109      spmi-arbiter@1c018000 {
110        compatible = "mediatek,mt8196-spmi";
111        ranges = <0 0 0x1c018000 0x4900>;
112        #address-cells = <1>;
113        #size-cells = <1>;
114
115        spmi@0 {
116          reg = <0 0x900>, <0x4800 0x100>;
117          reg-names = "pmif", "spmimst";
118          interrupts-extended = <&pio 292 IRQ_TYPE_LEVEL_HIGH>;
119          interrupt-names = "rcs";
120          interrupt-controller;
121          #interrupt-cells = <3>;
122          clocks = <&pmif_sys>, <&pmif_tmr>, <&spmi_mst>;
123          clock-names = "pmif_sys_ck", "pmif_tmr_ck", "spmimst_clk_mux";
124        };
125
126        spmi@2000 {
127          reg = <0x2000 0x900>, <0x4000 0x100>;
128          reg-names = "pmif", "spmimst";
129          interrupts-extended = <&pio 291 IRQ_TYPE_LEVEL_HIGH>;
130          interrupt-names = "rcs";
131          interrupt-controller;
132          #interrupt-cells = <3>;
133          clocks = <&pmif_sys>, <&pmif_tmr>, <&spmi_mst>;
134          clock-names = "pmif_sys_ck", "pmif_tmr_ck", "spmimst_clk_mux";
135        };
136      };
137    };
138...
139