xref: /freebsd/sys/contrib/device-tree/Bindings/spmi/qcom,spmi-pmic-arb.txt (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1c66ec88fSEmmanuel VadotQualcomm SPMI Controller (PMIC Arbiter)
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotThe SPMI PMIC Arbiter is found on Snapdragon chipsets.  It is an SPMI
4c66ec88fSEmmanuel Vadotcontroller with wrapping arbitration logic to allow for multiple on-chip
5c66ec88fSEmmanuel Vadotdevices to control a single SPMI master.
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel VadotThe PMIC Arbiter can also act as an interrupt controller, providing interrupts
8c66ec88fSEmmanuel Vadotto slave devices.
9c66ec88fSEmmanuel Vadot
10*6be33864SEmmanuel VadotSee Documentation/devicetree/bindings/spmi/spmi.yaml for the generic SPMI
11*6be33864SEmmanuel Vadotcontroller binding requirements for child nodes.
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel VadotSee Documentation/devicetree/bindings/interrupt-controller/interrupts.txt for
14c66ec88fSEmmanuel Vadotgeneric interrupt controller binding documentation.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel VadotRequired properties:
17c66ec88fSEmmanuel Vadot- compatible : should be "qcom,spmi-pmic-arb".
18c66ec88fSEmmanuel Vadot- reg-names  : must contain:
19c66ec88fSEmmanuel Vadot     "core" - core registers
20c66ec88fSEmmanuel Vadot     "intr" - interrupt controller registers
21c66ec88fSEmmanuel Vadot     "cnfg" - configuration registers
22c66ec88fSEmmanuel Vadot   Registers used only for V2 PMIC Arbiter:
23c66ec88fSEmmanuel Vadot     "chnls"  - tx-channel per virtual slave registers.
24c66ec88fSEmmanuel Vadot     "obsrvr" - rx-channel (called observer) per virtual slave registers.
25c66ec88fSEmmanuel Vadot
26c66ec88fSEmmanuel Vadot- reg : address + size pairs describing the PMIC arb register sets; order must
27c66ec88fSEmmanuel Vadot        correspond with the order of entries in reg-names
28c66ec88fSEmmanuel Vadot- #address-cells : must be set to 2
29c66ec88fSEmmanuel Vadot- #size-cells : must be set to 0
30c66ec88fSEmmanuel Vadot- qcom,ee : indicates the active Execution Environment identifier (0-5)
31c66ec88fSEmmanuel Vadot- qcom,channel : which of the PMIC Arb provided channels to use for accesses (0-5)
32c66ec88fSEmmanuel Vadot- interrupts : interrupt list for the PMIC Arb controller, must contain a
33c66ec88fSEmmanuel Vadot               single interrupt entry for the peripheral interrupt
34c66ec88fSEmmanuel Vadot- interrupt-names : corresponding interrupt names for the interrupts
35c66ec88fSEmmanuel Vadot                    listed in the 'interrupts' property, must contain:
36c66ec88fSEmmanuel Vadot     "periph_irq" - summary interrupt for PMIC peripherals
37c66ec88fSEmmanuel Vadot- interrupt-controller : boolean indicator that the PMIC arbiter is an interrupt controller
38c66ec88fSEmmanuel Vadot- #interrupt-cells :  must be set to 4. Interrupts are specified as a 4-tuple:
39c66ec88fSEmmanuel Vadot    cell 1: slave ID for the requested interrupt (0-15)
40c66ec88fSEmmanuel Vadot    cell 2: peripheral ID for requested interrupt (0-255)
41c66ec88fSEmmanuel Vadot    cell 3: the requested peripheral interrupt (0-7)
42c66ec88fSEmmanuel Vadot    cell 4: interrupt flags indicating level-sense information, as defined in
43c66ec88fSEmmanuel Vadot            dt-bindings/interrupt-controller/irq.h
44c66ec88fSEmmanuel Vadot
45c66ec88fSEmmanuel VadotExample:
46c66ec88fSEmmanuel Vadot
47c66ec88fSEmmanuel Vadot	spmi {
48c66ec88fSEmmanuel Vadot		compatible = "qcom,spmi-pmic-arb";
49c66ec88fSEmmanuel Vadot		reg-names = "core", "intr", "cnfg";
50c66ec88fSEmmanuel Vadot		reg = <0xfc4cf000 0x1000>,
51c66ec88fSEmmanuel Vadot		      <0xfc4cb000 0x1000>,
52c66ec88fSEmmanuel Vadot		      <0xfc4ca000 0x1000>;
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel Vadot		interrupt-names = "periph_irq";
55c66ec88fSEmmanuel Vadot		interrupts = <0 190 0>;
56c66ec88fSEmmanuel Vadot
57c66ec88fSEmmanuel Vadot		qcom,ee = <0>;
58c66ec88fSEmmanuel Vadot		qcom,channel = <0>;
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadot		#address-cells = <2>;
61c66ec88fSEmmanuel Vadot		#size-cells = <0>;
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot		interrupt-controller;
64c66ec88fSEmmanuel Vadot		#interrupt-cells = <4>;
65c66ec88fSEmmanuel Vadot	};
66