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