1*6b42133dSNeil Armstrong# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*6b42133dSNeil Armstrong%YAML 1.2
3*6b42133dSNeil Armstrong---
4*6b42133dSNeil Armstrong$id: http://devicetree.org/schemas/soc/qcom/qcom,rpm.yaml#
5*6b42133dSNeil Armstrong$schema: http://devicetree.org/meta-schemas/core.yaml#
6*6b42133dSNeil Armstrong
7*6b42133dSNeil Armstrongtitle: Qualcomm Resource Power Manager (RPM)
8*6b42133dSNeil Armstrong
9*6b42133dSNeil Armstrongdescription:
10*6b42133dSNeil Armstrong  This driver is used to interface with the Resource Power Manager (RPM) found
11*6b42133dSNeil Armstrong  in various Qualcomm platforms. The RPM allows each component in the system
12*6b42133dSNeil Armstrong  to vote for state of the system resources, such as clocks, regulators and bus
13*6b42133dSNeil Armstrong  frequencies.
14*6b42133dSNeil Armstrong
15*6b42133dSNeil Armstrongmaintainers:
16*6b42133dSNeil Armstrong  - Bjorn Andersson <andersson@kernel.org>
17*6b42133dSNeil Armstrong
18*6b42133dSNeil Armstrongproperties:
19*6b42133dSNeil Armstrong  compatible:
20*6b42133dSNeil Armstrong    enum:
21*6b42133dSNeil Armstrong      - qcom,rpm-apq8064
22*6b42133dSNeil Armstrong      - qcom,rpm-msm8660
23*6b42133dSNeil Armstrong      - qcom,rpm-msm8960
24*6b42133dSNeil Armstrong      - qcom,rpm-ipq8064
25*6b42133dSNeil Armstrong      - qcom,rpm-mdm9615
26*6b42133dSNeil Armstrong
27*6b42133dSNeil Armstrong  reg:
28*6b42133dSNeil Armstrong    maxItems: 1
29*6b42133dSNeil Armstrong
30*6b42133dSNeil Armstrong  interrupts:
31*6b42133dSNeil Armstrong    maxItems: 3
32*6b42133dSNeil Armstrong
33*6b42133dSNeil Armstrong  interrupt-names:
34*6b42133dSNeil Armstrong    items:
35*6b42133dSNeil Armstrong      - const: ack
36*6b42133dSNeil Armstrong      - const: err
37*6b42133dSNeil Armstrong      - const: wakeup
38*6b42133dSNeil Armstrong
39*6b42133dSNeil Armstrong  qcom,ipc:
40*6b42133dSNeil Armstrong    $ref: /schemas/types.yaml#/definitions/phandle-array
41*6b42133dSNeil Armstrong    items:
42*6b42133dSNeil Armstrong      - items:
43*6b42133dSNeil Armstrong          - description: phandle to a syscon node representing the APCS registers
44*6b42133dSNeil Armstrong          - description: u32 representing offset to the register within the syscon
45*6b42133dSNeil Armstrong          - description: u32 representing the ipc bit within the register
46*6b42133dSNeil Armstrong    description:
47*6b42133dSNeil Armstrong      Three entries specifying the outgoing ipc bit used for signaling the RPM.
48*6b42133dSNeil Armstrong
49*6b42133dSNeil ArmstrongpatternProperties:
50*6b42133dSNeil Armstrong  "^regulators(-[01])?$":
51*6b42133dSNeil Armstrong    type: object
52*6b42133dSNeil Armstrong    $ref: /schemas/regulator/qcom,rpm-regulator.yaml#
53*6b42133dSNeil Armstrong    unevaluatedProperties: false
54*6b42133dSNeil Armstrong
55*6b42133dSNeil Armstrongrequired:
56*6b42133dSNeil Armstrong  - compatible
57*6b42133dSNeil Armstrong  - reg
58*6b42133dSNeil Armstrong  - interrupts
59*6b42133dSNeil Armstrong  - interrupt-names
60*6b42133dSNeil Armstrong  - qcom,ipc
61*6b42133dSNeil Armstrong
62*6b42133dSNeil ArmstrongadditionalProperties: false
63*6b42133dSNeil Armstrong
64*6b42133dSNeil Armstrongexamples:
65*6b42133dSNeil Armstrong  - |
66*6b42133dSNeil Armstrong    #include <dt-bindings/interrupt-controller/arm-gic.h>
67*6b42133dSNeil Armstrong    #include <dt-bindings/interrupt-controller/irq.h>
68*6b42133dSNeil Armstrong    #include <dt-bindings/mfd/qcom-rpm.h>
69*6b42133dSNeil Armstrong
70*6b42133dSNeil Armstrong    rpm@108000 {
71*6b42133dSNeil Armstrong      compatible = "qcom,rpm-msm8960";
72*6b42133dSNeil Armstrong      reg = <0x108000 0x1000>;
73*6b42133dSNeil Armstrong      qcom,ipc = <&apcs 0x8 2>;
74*6b42133dSNeil Armstrong
75*6b42133dSNeil Armstrong      interrupts = <GIC_SPI 19 IRQ_TYPE_NONE>, <GIC_SPI 21 IRQ_TYPE_NONE>, <GIC_SPI 22 IRQ_TYPE_NONE>;
76*6b42133dSNeil Armstrong      interrupt-names = "ack", "err", "wakeup";
77*6b42133dSNeil Armstrong
78*6b42133dSNeil Armstrong      regulators {
79*6b42133dSNeil Armstrong        compatible = "qcom,rpm-pm8921-regulators";
80*6b42133dSNeil Armstrong        vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
81*6b42133dSNeil Armstrong
82*6b42133dSNeil Armstrong        s1 {
83*6b42133dSNeil Armstrong          regulator-min-microvolt = <1225000>;
84*6b42133dSNeil Armstrong          regulator-max-microvolt = <1225000>;
85*6b42133dSNeil Armstrong
86*6b42133dSNeil Armstrong          bias-pull-down;
87*6b42133dSNeil Armstrong
88*6b42133dSNeil Armstrong          qcom,switch-mode-frequency = <3200000>;
89*6b42133dSNeil Armstrong        };
90*6b42133dSNeil Armstrong
91*6b42133dSNeil Armstrong        pm8921_s4: s4 {
92*6b42133dSNeil Armstrong          regulator-min-microvolt = <1800000>;
93*6b42133dSNeil Armstrong          regulator-max-microvolt = <1800000>;
94*6b42133dSNeil Armstrong
95*6b42133dSNeil Armstrong          qcom,switch-mode-frequency = <1600000>;
96*6b42133dSNeil Armstrong          bias-pull-down;
97*6b42133dSNeil Armstrong
98*6b42133dSNeil Armstrong          qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
99*6b42133dSNeil Armstrong        };
100*6b42133dSNeil Armstrong      };
101*6b42133dSNeil Armstrong    };
102