xref: /freebsd/sys/contrib/device-tree/Bindings/power/reset/qcom,pon.yaml (revision 02e9120893770924227138ba49df1edb3896112a)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm PON Device
8
9maintainers:
10  - Vinod Koul <vkoul@kernel.org>
11
12description: |
13  The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
14  and resin along with the Android reboot-mode.
15
16  This DT node has pwrkey and resin as sub nodes.
17
18properties:
19  compatible:
20    enum:
21      - qcom,pm8916-pon
22      - qcom,pms405-pon
23      - qcom,pm8998-pon
24      - qcom,pmk8350-pon
25
26  reg:
27    description: |
28      Specifies the SPMI base address for the PON (power-on) peripheral.  For
29      PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS
30      (e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS
31      peripherals.  In that case, the PON_PBS address needs to be specified to
32      facilitate software debouncing on some PMIC.
33    minItems: 1
34    maxItems: 2
35
36  reg-names:
37    minItems: 1
38    maxItems: 2
39
40  pwrkey:
41    type: object
42    $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
43
44  resin:
45    type: object
46    $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
47
48  watchdog:
49    type: object
50    $ref: /schemas/watchdog/qcom,pm8916-wdt.yaml
51
52required:
53  - compatible
54  - reg
55
56unevaluatedProperties: false
57
58allOf:
59  - $ref: reboot-mode.yaml#
60  - if:
61      properties:
62        compatible:
63          contains:
64            enum:
65              - qcom,pm8916-pon
66              - qcom,pms405-pon
67              - qcom,pm8998-pon
68    then:
69      properties:
70        reg:
71          maxItems: 1
72        reg-names:
73          items:
74            - const: pon
75  - if:
76      properties:
77        compatible:
78          contains:
79            const: qcom,pmk8350-pon
80    then:
81      properties:
82        reg:
83          minItems: 1
84          maxItems: 2
85        reg-names:
86          minItems: 1
87          items:
88            - const: hlos
89            - const: pbs
90
91examples:
92  - |
93   #include <dt-bindings/interrupt-controller/irq.h>
94   #include <dt-bindings/input/linux-event-codes.h>
95   #include <dt-bindings/spmi/spmi.h>
96   spmi_bus: spmi@c440000 {
97     reg = <0x0c440000 0x1100>;
98     #address-cells = <2>;
99     #size-cells = <0>;
100     pmk8350: pmic@0 {
101       reg = <0x0 SPMI_USID>;
102       #address-cells = <1>;
103       #size-cells = <0>;
104       pmk8350_pon: pon_hlos@1300 {
105         reg = <0x1300>;
106         compatible = "qcom,pm8998-pon";
107
108         pwrkey {
109            compatible = "qcom,pm8941-pwrkey";
110            interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >;
111            debounce = <15625>;
112            bias-pull-up;
113            linux,code = <KEY_POWER>;
114         };
115
116         resin {
117            compatible = "qcom,pm8941-resin";
118            interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
119            debounce = <15625>;
120            bias-pull-up;
121            linux,code = <KEY_VOLUMEDOWN>;
122         };
123       };
124     };
125   };
126...
127