Debian Codegraph @

Documentation/devicetree/bindings/power/reset/qcom,pon.yaml

raw
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
7 title: Qualcomm PON Device
8
9 maintainers:
10 - Vinod Koul <[email protected]>
11
12 description: |
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
18 properties:
19 compatible:
20 enum:
21 - qcom,pm8916-pon
22 - qcom,pm8941-pon
23 - qcom,pms405-pon
24 - qcom,pm8998-pon
25 - qcom,pmk8350-pon
26
27 reg:
28 description: |
29 Specifies the SPMI base address for the PON (power-on) peripheral. For
30 PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS
31 (e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS
32 peripherals. In that case, the PON_PBS address needs to be specified to
33 facilitate software debouncing on some PMIC.
34 minItems: 1
35 maxItems: 2
36
37 reg-names:
38 minItems: 1
39 maxItems: 2
40
41 pwrkey:
42 type: object
43 $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
44
45 resin:
46 type: object
47 $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
48
49 watchdog:
50 type: object
51 $ref: /schemas/watchdog/qcom,pm8916-wdt.yaml
52
53 required:
54 - compatible
55 - reg
56
57 patternProperties:
58 "^mode-.*$":
59 maxItems: 1
60
61 unevaluatedProperties: false
62
63 allOf:
64 - if:
65 properties:
66 compatible:
67 contains:
68 enum:
69 - qcom,pm8916-pon
70 - qcom,pms405-pon
71 - qcom,pm8998-pon
72 then:
73 allOf:
74 - $ref: reboot-mode.yaml#
75
76 properties:
77 reg:
78 maxItems: 1
79 reg-names:
80 items:
81 - const: pon
82 else:
83 patternProperties:
84 "^mode-.*$": false
85
86 # Special case for pm8941, which doesn't store reset mode
87 - if:
88 properties:
89 compatible:
90 contains:
91 const: qcom,pm8941-pon
92 then:
93 properties:
94 reg:
95 maxItems: 1
96 reg-names:
97 items:
98 - const: pon
99
100 - if:
101 properties:
102 compatible:
103 contains:
104 const: qcom,pmk8350-pon
105 then:
106 properties:
107 reg:
108 minItems: 1
109 maxItems: 2
110 reg-names:
111 minItems: 1
112 items:
113 - const: hlos
114 - const: pbs
115
116 examples:
117 - |
118 #include <dt-bindings/interrupt-controller/irq.h>
119 #include <dt-bindings/input/linux-event-codes.h>
120 #include <dt-bindings/spmi/spmi.h>
121
122 spmi@c440000 {
123 reg = <0x0c440000 0x1100>;
124 #address-cells = <2>;
125 #size-cells = <0>;
126
127 pmic@0 {
128 reg = <0x0 SPMI_USID>;
129 #address-cells = <1>;
130 #size-cells = <0>;
131
132 pon@800 {
133 compatible = "qcom,pm8998-pon";
134 reg = <0x800>;
135
136 pwrkey {
137 compatible = "qcom,pm8941-pwrkey";
138 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
139 debounce = <15625>;
140 bias-pull-up;
141 linux,code = <KEY_POWER>;
142 };
143
144 resin {
145 compatible = "qcom,pm8941-resin";
146 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
147 debounce = <15625>;
148 bias-pull-up;
149 linux,code = <KEY_VOLUMEDOWN>;
150 };
151 };
152 };
153 };
154 ...