xref: /freebsd/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: Qualcomm PON Device
8354d7675SEmmanuel Vadot
9354d7675SEmmanuel Vadotmaintainers:
10354d7675SEmmanuel Vadot  - Vinod Koul <vkoul@kernel.org>
11354d7675SEmmanuel Vadot
12354d7675SEmmanuel Vadotdescription: |
13354d7675SEmmanuel Vadot  The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
14354d7675SEmmanuel Vadot  and resin along with the Android reboot-mode.
15354d7675SEmmanuel Vadot
16354d7675SEmmanuel Vadot  This DT node has pwrkey and resin as sub nodes.
17354d7675SEmmanuel Vadot
18354d7675SEmmanuel Vadotproperties:
19354d7675SEmmanuel Vadot  compatible:
20354d7675SEmmanuel Vadot    enum:
21354d7675SEmmanuel Vadot      - qcom,pm8916-pon
22f126890aSEmmanuel Vadot      - qcom,pm8941-pon
23354d7675SEmmanuel Vadot      - qcom,pms405-pon
24354d7675SEmmanuel Vadot      - qcom,pm8998-pon
257ef62cebSEmmanuel Vadot      - qcom,pmk8350-pon
26354d7675SEmmanuel Vadot
27354d7675SEmmanuel Vadot  reg:
287ef62cebSEmmanuel Vadot    description: |
297ef62cebSEmmanuel Vadot      Specifies the SPMI base address for the PON (power-on) peripheral.  For
307ef62cebSEmmanuel Vadot      PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS
317ef62cebSEmmanuel Vadot      (e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS
327ef62cebSEmmanuel Vadot      peripherals.  In that case, the PON_PBS address needs to be specified to
337ef62cebSEmmanuel Vadot      facilitate software debouncing on some PMIC.
347ef62cebSEmmanuel Vadot    minItems: 1
357ef62cebSEmmanuel Vadot    maxItems: 2
367ef62cebSEmmanuel Vadot
377ef62cebSEmmanuel Vadot  reg-names:
387ef62cebSEmmanuel Vadot    minItems: 1
397ef62cebSEmmanuel Vadot    maxItems: 2
40354d7675SEmmanuel Vadot
41354d7675SEmmanuel Vadot  pwrkey:
42354d7675SEmmanuel Vadot    type: object
43b97ee269SEmmanuel Vadot    $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
44354d7675SEmmanuel Vadot
45354d7675SEmmanuel Vadot  resin:
46354d7675SEmmanuel Vadot    type: object
47b97ee269SEmmanuel Vadot    $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
48b97ee269SEmmanuel Vadot
49b97ee269SEmmanuel Vadot  watchdog:
50b97ee269SEmmanuel Vadot    type: object
51b97ee269SEmmanuel Vadot    $ref: /schemas/watchdog/qcom,pm8916-wdt.yaml
52354d7675SEmmanuel Vadot
53354d7675SEmmanuel Vadotrequired:
54354d7675SEmmanuel Vadot  - compatible
55354d7675SEmmanuel Vadot  - reg
56354d7675SEmmanuel Vadot
57354d7675SEmmanuel VadotunevaluatedProperties: false
58354d7675SEmmanuel Vadot
597ef62cebSEmmanuel VadotallOf:
607ef62cebSEmmanuel Vadot  - if:
617ef62cebSEmmanuel Vadot      properties:
627ef62cebSEmmanuel Vadot        compatible:
637ef62cebSEmmanuel Vadot          contains:
647ef62cebSEmmanuel Vadot            enum:
657ef62cebSEmmanuel Vadot              - qcom,pm8916-pon
667ef62cebSEmmanuel Vadot              - qcom,pms405-pon
677ef62cebSEmmanuel Vadot              - qcom,pm8998-pon
687ef62cebSEmmanuel Vadot    then:
69f126890aSEmmanuel Vadot      allOf:
70f126890aSEmmanuel Vadot        - $ref: reboot-mode.yaml#
71f126890aSEmmanuel Vadot
727ef62cebSEmmanuel Vadot      properties:
737ef62cebSEmmanuel Vadot        reg:
747ef62cebSEmmanuel Vadot          maxItems: 1
757ef62cebSEmmanuel Vadot        reg-names:
767ef62cebSEmmanuel Vadot          items:
777ef62cebSEmmanuel Vadot            - const: pon
78f126890aSEmmanuel Vadot
79f126890aSEmmanuel Vadot    # Special case for pm8941, which doesn't store reset mode
80f126890aSEmmanuel Vadot  - if:
81f126890aSEmmanuel Vadot      properties:
82f126890aSEmmanuel Vadot        compatible:
83f126890aSEmmanuel Vadot          contains:
84f126890aSEmmanuel Vadot            const: qcom,pm8941-pon
85f126890aSEmmanuel Vadot    then:
86f126890aSEmmanuel Vadot      properties:
87f126890aSEmmanuel Vadot        reg:
88f126890aSEmmanuel Vadot          maxItems: 1
89f126890aSEmmanuel Vadot        reg-names:
90f126890aSEmmanuel Vadot          items:
91f126890aSEmmanuel Vadot            - const: pon
92f126890aSEmmanuel Vadot
937ef62cebSEmmanuel Vadot  - if:
947ef62cebSEmmanuel Vadot      properties:
957ef62cebSEmmanuel Vadot        compatible:
967ef62cebSEmmanuel Vadot          contains:
977ef62cebSEmmanuel Vadot            const: qcom,pmk8350-pon
987ef62cebSEmmanuel Vadot    then:
997ef62cebSEmmanuel Vadot      properties:
1007ef62cebSEmmanuel Vadot        reg:
1017ef62cebSEmmanuel Vadot          minItems: 1
1027ef62cebSEmmanuel Vadot          maxItems: 2
1037ef62cebSEmmanuel Vadot        reg-names:
1047ef62cebSEmmanuel Vadot          minItems: 1
1057ef62cebSEmmanuel Vadot          items:
1067ef62cebSEmmanuel Vadot            - const: hlos
1077ef62cebSEmmanuel Vadot            - const: pbs
1087ef62cebSEmmanuel Vadot
109354d7675SEmmanuel Vadotexamples:
110354d7675SEmmanuel Vadot  - |
111354d7675SEmmanuel Vadot   #include <dt-bindings/interrupt-controller/irq.h>
112354d7675SEmmanuel Vadot   #include <dt-bindings/input/linux-event-codes.h>
113354d7675SEmmanuel Vadot   #include <dt-bindings/spmi/spmi.h>
114*8d13bc63SEmmanuel Vadot
115*8d13bc63SEmmanuel Vadot   spmi@c440000 {
116354d7675SEmmanuel Vadot     reg = <0x0c440000 0x1100>;
117354d7675SEmmanuel Vadot     #address-cells = <2>;
118354d7675SEmmanuel Vadot     #size-cells = <0>;
119*8d13bc63SEmmanuel Vadot
120*8d13bc63SEmmanuel Vadot     pmic@0 {
121354d7675SEmmanuel Vadot       reg = <0x0 SPMI_USID>;
122354d7675SEmmanuel Vadot       #address-cells = <1>;
123354d7675SEmmanuel Vadot       #size-cells = <0>;
124*8d13bc63SEmmanuel Vadot
125*8d13bc63SEmmanuel Vadot       pon@800 {
126354d7675SEmmanuel Vadot         compatible = "qcom,pm8998-pon";
127*8d13bc63SEmmanuel Vadot         reg = <0x800>;
128354d7675SEmmanuel Vadot
129354d7675SEmmanuel Vadot         pwrkey {
130354d7675SEmmanuel Vadot            compatible = "qcom,pm8941-pwrkey";
131354d7675SEmmanuel Vadot            interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
132354d7675SEmmanuel Vadot            debounce = <15625>;
133354d7675SEmmanuel Vadot            bias-pull-up;
134354d7675SEmmanuel Vadot            linux,code = <KEY_POWER>;
135354d7675SEmmanuel Vadot         };
136354d7675SEmmanuel Vadot
137354d7675SEmmanuel Vadot         resin {
138354d7675SEmmanuel Vadot            compatible = "qcom,pm8941-resin";
139354d7675SEmmanuel Vadot            interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
140354d7675SEmmanuel Vadot            debounce = <15625>;
141354d7675SEmmanuel Vadot            bias-pull-up;
142354d7675SEmmanuel Vadot            linux,code = <KEY_VOLUMEDOWN>;
143354d7675SEmmanuel Vadot         };
144354d7675SEmmanuel Vadot       };
145354d7675SEmmanuel Vadot     };
146354d7675SEmmanuel Vadot   };
147354d7675SEmmanuel Vadot...
148