xref: /linux/Documentation/devicetree/bindings/spmi/qcom,x1e80100-spmi-pmic-arb.yaml (revision 36ec807b627b4c0a0a382f0ae48eac7187d14b2b)
1*e72efb5dSAbel Vesa# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*e72efb5dSAbel Vesa%YAML 1.2
3*e72efb5dSAbel Vesa---
4*e72efb5dSAbel Vesa$id: http://devicetree.org/schemas/spmi/qcom,x1e80100-spmi-pmic-arb.yaml#
5*e72efb5dSAbel Vesa$schema: http://devicetree.org/meta-schemas/core.yaml#
6*e72efb5dSAbel Vesa
7*e72efb5dSAbel Vesatitle: Qualcomm X1E80100 SPMI Controller (PMIC Arbiter v7)
8*e72efb5dSAbel Vesa
9*e72efb5dSAbel Vesamaintainers:
10*e72efb5dSAbel Vesa  - Stephen Boyd <sboyd@kernel.org>
11*e72efb5dSAbel Vesa
12*e72efb5dSAbel Vesadescription: |
13*e72efb5dSAbel Vesa  The X1E80100 SPMI PMIC Arbiter implements HW version 7 and it's an SPMI
14*e72efb5dSAbel Vesa  controller with wrapping arbitration logic to allow for multiple on-chip
15*e72efb5dSAbel Vesa  devices to control up to 2 SPMI separate buses.
16*e72efb5dSAbel Vesa
17*e72efb5dSAbel Vesa  The PMIC Arbiter can also act as an interrupt controller, providing interrupts
18*e72efb5dSAbel Vesa  to slave devices.
19*e72efb5dSAbel Vesa
20*e72efb5dSAbel Vesaproperties:
21*e72efb5dSAbel Vesa  compatible:
22*e72efb5dSAbel Vesa    const: qcom,x1e80100-spmi-pmic-arb
23*e72efb5dSAbel Vesa
24*e72efb5dSAbel Vesa  reg:
25*e72efb5dSAbel Vesa    items:
26*e72efb5dSAbel Vesa      - description: core registers
27*e72efb5dSAbel Vesa      - description: tx-channel per virtual slave registers
28*e72efb5dSAbel Vesa      - description: rx-channel (called observer) per virtual slave registers
29*e72efb5dSAbel Vesa
30*e72efb5dSAbel Vesa  reg-names:
31*e72efb5dSAbel Vesa    items:
32*e72efb5dSAbel Vesa      - const: core
33*e72efb5dSAbel Vesa      - const: chnls
34*e72efb5dSAbel Vesa      - const: obsrvr
35*e72efb5dSAbel Vesa
36*e72efb5dSAbel Vesa  ranges: true
37*e72efb5dSAbel Vesa
38*e72efb5dSAbel Vesa  '#address-cells':
39*e72efb5dSAbel Vesa    const: 2
40*e72efb5dSAbel Vesa
41*e72efb5dSAbel Vesa  '#size-cells':
42*e72efb5dSAbel Vesa    const: 2
43*e72efb5dSAbel Vesa
44*e72efb5dSAbel Vesa  qcom,ee:
45*e72efb5dSAbel Vesa    $ref: /schemas/types.yaml#/definitions/uint32
46*e72efb5dSAbel Vesa    minimum: 0
47*e72efb5dSAbel Vesa    maximum: 5
48*e72efb5dSAbel Vesa    description: >
49*e72efb5dSAbel Vesa      indicates the active Execution Environment identifier
50*e72efb5dSAbel Vesa
51*e72efb5dSAbel Vesa  qcom,channel:
52*e72efb5dSAbel Vesa    $ref: /schemas/types.yaml#/definitions/uint32
53*e72efb5dSAbel Vesa    minimum: 0
54*e72efb5dSAbel Vesa    maximum: 5
55*e72efb5dSAbel Vesa    description: >
56*e72efb5dSAbel Vesa      which of the PMIC Arb provided channels to use for accesses
57*e72efb5dSAbel Vesa
58*e72efb5dSAbel VesapatternProperties:
59*e72efb5dSAbel Vesa  "^spmi@[a-f0-9]+$":
60*e72efb5dSAbel Vesa    type: object
61*e72efb5dSAbel Vesa    $ref: /schemas/spmi/spmi.yaml
62*e72efb5dSAbel Vesa    unevaluatedProperties: false
63*e72efb5dSAbel Vesa
64*e72efb5dSAbel Vesa    properties:
65*e72efb5dSAbel Vesa      reg:
66*e72efb5dSAbel Vesa        items:
67*e72efb5dSAbel Vesa          - description: configuration registers
68*e72efb5dSAbel Vesa          - description: interrupt controller registers
69*e72efb5dSAbel Vesa
70*e72efb5dSAbel Vesa      reg-names:
71*e72efb5dSAbel Vesa        items:
72*e72efb5dSAbel Vesa          - const: cnfg
73*e72efb5dSAbel Vesa          - const: intr
74*e72efb5dSAbel Vesa
75*e72efb5dSAbel Vesa      interrupts:
76*e72efb5dSAbel Vesa        maxItems: 1
77*e72efb5dSAbel Vesa
78*e72efb5dSAbel Vesa      interrupt-names:
79*e72efb5dSAbel Vesa        const: periph_irq
80*e72efb5dSAbel Vesa
81*e72efb5dSAbel Vesa      interrupt-controller: true
82*e72efb5dSAbel Vesa
83*e72efb5dSAbel Vesa      '#interrupt-cells':
84*e72efb5dSAbel Vesa        const: 4
85*e72efb5dSAbel Vesa        description: |
86*e72efb5dSAbel Vesa          cell 1: slave ID for the requested interrupt (0-15)
87*e72efb5dSAbel Vesa          cell 2: peripheral ID for requested interrupt (0-255)
88*e72efb5dSAbel Vesa          cell 3: the requested peripheral interrupt (0-7)
89*e72efb5dSAbel Vesa          cell 4: interrupt flags indicating level-sense information,
90*e72efb5dSAbel Vesa                  as defined in dt-bindings/interrupt-controller/irq.h
91*e72efb5dSAbel Vesa
92*e72efb5dSAbel Vesarequired:
93*e72efb5dSAbel Vesa  - compatible
94*e72efb5dSAbel Vesa  - reg-names
95*e72efb5dSAbel Vesa  - qcom,ee
96*e72efb5dSAbel Vesa  - qcom,channel
97*e72efb5dSAbel Vesa
98*e72efb5dSAbel VesaadditionalProperties: false
99*e72efb5dSAbel Vesa
100*e72efb5dSAbel Vesaexamples:
101*e72efb5dSAbel Vesa  - |
102*e72efb5dSAbel Vesa    #include <dt-bindings/interrupt-controller/arm-gic.h>
103*e72efb5dSAbel Vesa
104*e72efb5dSAbel Vesa    soc {
105*e72efb5dSAbel Vesa      #address-cells = <2>;
106*e72efb5dSAbel Vesa      #size-cells = <2>;
107*e72efb5dSAbel Vesa
108*e72efb5dSAbel Vesa      spmi: arbiter@c400000 {
109*e72efb5dSAbel Vesa        compatible = "qcom,x1e80100-spmi-pmic-arb";
110*e72efb5dSAbel Vesa        reg = <0 0x0c400000 0 0x3000>,
111*e72efb5dSAbel Vesa              <0 0x0c500000 0 0x4000000>,
112*e72efb5dSAbel Vesa              <0 0x0c440000 0 0x80000>;
113*e72efb5dSAbel Vesa        reg-names = "core", "chnls", "obsrvr";
114*e72efb5dSAbel Vesa
115*e72efb5dSAbel Vesa        qcom,ee = <0>;
116*e72efb5dSAbel Vesa        qcom,channel = <0>;
117*e72efb5dSAbel Vesa
118*e72efb5dSAbel Vesa        #address-cells = <2>;
119*e72efb5dSAbel Vesa        #size-cells = <2>;
120*e72efb5dSAbel Vesa        ranges;
121*e72efb5dSAbel Vesa
122*e72efb5dSAbel Vesa        spmi_bus0: spmi@c42d000 {
123*e72efb5dSAbel Vesa          reg = <0 0x0c42d000 0 0x4000>,
124*e72efb5dSAbel Vesa                <0 0x0c4c0000 0 0x10000>;
125*e72efb5dSAbel Vesa          reg-names = "cnfg", "intr";
126*e72efb5dSAbel Vesa
127*e72efb5dSAbel Vesa          interrupt-names = "periph_irq";
128*e72efb5dSAbel Vesa          interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>;
129*e72efb5dSAbel Vesa          interrupt-controller;
130*e72efb5dSAbel Vesa          #interrupt-cells = <4>;
131*e72efb5dSAbel Vesa
132*e72efb5dSAbel Vesa          #address-cells = <2>;
133*e72efb5dSAbel Vesa          #size-cells = <0>;
134*e72efb5dSAbel Vesa        };
135*e72efb5dSAbel Vesa      };
136*e72efb5dSAbel Vesa    };
137