xref: /freebsd/sys/contrib/device-tree/Bindings/spmi/qcom,spmi-pmic-arb.yaml (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only
2d5b0e70fSEmmanuel Vadot%YAML 1.2
3d5b0e70fSEmmanuel Vadot---
4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/spmi/qcom,spmi-pmic-arb.yaml#
5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6d5b0e70fSEmmanuel Vadot
7d5b0e70fSEmmanuel Vadottitle: Qualcomm SPMI Controller (PMIC Arbiter)
8d5b0e70fSEmmanuel Vadot
9d5b0e70fSEmmanuel Vadotmaintainers:
10d5b0e70fSEmmanuel Vadot  - Stephen Boyd <sboyd@kernel.org>
11d5b0e70fSEmmanuel Vadot
12d5b0e70fSEmmanuel Vadotdescription: |
13d5b0e70fSEmmanuel Vadot  The SPMI PMIC Arbiter is found on Snapdragon chipsets. It is an SPMI
14d5b0e70fSEmmanuel Vadot  controller with wrapping arbitration logic to allow for multiple on-chip
15d5b0e70fSEmmanuel Vadot  devices to control a single SPMI master.
16d5b0e70fSEmmanuel Vadot
17d5b0e70fSEmmanuel Vadot  The PMIC Arbiter can also act as an interrupt controller, providing interrupts
18d5b0e70fSEmmanuel Vadot  to slave devices.
19d5b0e70fSEmmanuel Vadot
20d5b0e70fSEmmanuel VadotallOf:
21d5b0e70fSEmmanuel Vadot  - $ref: spmi.yaml
22d5b0e70fSEmmanuel Vadot
23d5b0e70fSEmmanuel Vadotproperties:
24d5b0e70fSEmmanuel Vadot  compatible:
25d5b0e70fSEmmanuel Vadot    const: qcom,spmi-pmic-arb
26d5b0e70fSEmmanuel Vadot
27d5b0e70fSEmmanuel Vadot  reg:
28d5b0e70fSEmmanuel Vadot    oneOf:
29d5b0e70fSEmmanuel Vadot      - items: # V1
30d5b0e70fSEmmanuel Vadot          - description: core registers
31d5b0e70fSEmmanuel Vadot          - description: interrupt controller registers
32d5b0e70fSEmmanuel Vadot          - description: configuration registers
33d5b0e70fSEmmanuel Vadot      - items: # V2
34d5b0e70fSEmmanuel Vadot          - description: core registers
35d5b0e70fSEmmanuel Vadot          - description: tx-channel per virtual slave regosters
36d5b0e70fSEmmanuel Vadot          - description: rx-channel (called observer) per virtual slave registers
37d5b0e70fSEmmanuel Vadot          - description: interrupt controller registers
38d5b0e70fSEmmanuel Vadot          - description: configuration registers
39d5b0e70fSEmmanuel Vadot
40d5b0e70fSEmmanuel Vadot  reg-names:
41d5b0e70fSEmmanuel Vadot    oneOf:
42d5b0e70fSEmmanuel Vadot      - items:
43d5b0e70fSEmmanuel Vadot          - const: core
44d5b0e70fSEmmanuel Vadot          - const: intr
45d5b0e70fSEmmanuel Vadot          - const: cnfg
46d5b0e70fSEmmanuel Vadot      - items:
47d5b0e70fSEmmanuel Vadot          - const: core
48d5b0e70fSEmmanuel Vadot          - const: chnls
49d5b0e70fSEmmanuel Vadot          - const: obsrvr
50d5b0e70fSEmmanuel Vadot          - const: intr
51d5b0e70fSEmmanuel Vadot          - const: cnfg
52d5b0e70fSEmmanuel Vadot
53d5b0e70fSEmmanuel Vadot  interrupts:
54d5b0e70fSEmmanuel Vadot    maxItems: 1
55d5b0e70fSEmmanuel Vadot
56d5b0e70fSEmmanuel Vadot  interrupt-names:
57d5b0e70fSEmmanuel Vadot    const: periph_irq
58d5b0e70fSEmmanuel Vadot
59d5b0e70fSEmmanuel Vadot  interrupt-controller: true
60d5b0e70fSEmmanuel Vadot
61d5b0e70fSEmmanuel Vadot  '#address-cells': true
62d5b0e70fSEmmanuel Vadot
63d5b0e70fSEmmanuel Vadot  '#interrupt-cells':
64d5b0e70fSEmmanuel Vadot    const: 4
65d5b0e70fSEmmanuel Vadot    description: |
66d5b0e70fSEmmanuel Vadot      cell 1: slave ID for the requested interrupt (0-15)
67d5b0e70fSEmmanuel Vadot      cell 2: peripheral ID for requested interrupt (0-255)
68d5b0e70fSEmmanuel Vadot      cell 3: the requested peripheral interrupt (0-7)
69d5b0e70fSEmmanuel Vadot      cell 4: interrupt flags indicating level-sense information,
70d5b0e70fSEmmanuel Vadot              as defined in dt-bindings/interrupt-controller/irq.h
71d5b0e70fSEmmanuel Vadot
72d5b0e70fSEmmanuel Vadot  '#size-cells': true
73d5b0e70fSEmmanuel Vadot
74d5b0e70fSEmmanuel Vadot  qcom,ee:
75d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
76d5b0e70fSEmmanuel Vadot    minimum: 0
77d5b0e70fSEmmanuel Vadot    maximum: 5
78d5b0e70fSEmmanuel Vadot    description: >
79d5b0e70fSEmmanuel Vadot      indicates the active Execution Environment identifier
80d5b0e70fSEmmanuel Vadot
81d5b0e70fSEmmanuel Vadot  qcom,channel:
82d5b0e70fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
83d5b0e70fSEmmanuel Vadot    minimum: 0
84d5b0e70fSEmmanuel Vadot    maximum: 5
85d5b0e70fSEmmanuel Vadot    description: >
86d5b0e70fSEmmanuel Vadot      which of the PMIC Arb provided channels to use for accesses
87d5b0e70fSEmmanuel Vadot
888bab661aSEmmanuel Vadot  qcom,bus-id:
898bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
908bab661aSEmmanuel Vadot    minimum: 0
918bab661aSEmmanuel Vadot    maximum: 1
928bab661aSEmmanuel Vadot    description: >
938bab661aSEmmanuel Vadot      SPMI bus instance. only applicable to PMIC arbiter version 7 and beyond.
948bab661aSEmmanuel Vadot      Supported values, 0 = primary bus, 1 = secondary bus
95*7d0873ebSEmmanuel Vadot    deprecated: true
968bab661aSEmmanuel Vadot
97d5b0e70fSEmmanuel Vadotrequired:
98d5b0e70fSEmmanuel Vadot  - compatible
99d5b0e70fSEmmanuel Vadot  - reg-names
100d5b0e70fSEmmanuel Vadot  - qcom,ee
101d5b0e70fSEmmanuel Vadot  - qcom,channel
102d5b0e70fSEmmanuel Vadot
103d5b0e70fSEmmanuel VadotunevaluatedProperties: false
104d5b0e70fSEmmanuel Vadot
105d5b0e70fSEmmanuel Vadotexamples:
106d5b0e70fSEmmanuel Vadot  - |
107d5b0e70fSEmmanuel Vadot    spmi@fc4cf000 {
108d5b0e70fSEmmanuel Vadot        compatible = "qcom,spmi-pmic-arb";
109d5b0e70fSEmmanuel Vadot        reg-names = "core", "intr", "cnfg";
110d5b0e70fSEmmanuel Vadot        reg = <0xfc4cf000 0x1000>,
111d5b0e70fSEmmanuel Vadot              <0xfc4cb000 0x1000>,
112d5b0e70fSEmmanuel Vadot              <0xfc4ca000 0x1000>;
113d5b0e70fSEmmanuel Vadot
114d5b0e70fSEmmanuel Vadot        interrupt-names = "periph_irq";
115d5b0e70fSEmmanuel Vadot        interrupts = <0 190 0>;
116d5b0e70fSEmmanuel Vadot
117d5b0e70fSEmmanuel Vadot        qcom,ee = <0>;
118d5b0e70fSEmmanuel Vadot        qcom,channel = <0>;
119d5b0e70fSEmmanuel Vadot
120d5b0e70fSEmmanuel Vadot        #address-cells = <2>;
121d5b0e70fSEmmanuel Vadot        #size-cells = <0>;
122d5b0e70fSEmmanuel Vadot
123d5b0e70fSEmmanuel Vadot        interrupt-controller;
124d5b0e70fSEmmanuel Vadot        #interrupt-cells = <4>;
1258bab661aSEmmanuel Vadot
1268bab661aSEmmanuel Vadot        qcom,bus-id = <0>;
127d5b0e70fSEmmanuel Vadot    };
128d5b0e70fSEmmanuel Vadot
129