Loading...
1// SPDX-License-Identifier: GPL-2.0
2#include <dt-bindings/iio/qcom,spmi-vadc.h>
3#include <dt-bindings/interrupt-controller/irq.h>
4#include <dt-bindings/spmi/spmi.h>
5
6&spmi_bus {
7
8 pm8941_0: pm8941@0 {
9 compatible = "qcom,pm8941", "qcom,spmi-pmic";
10 reg = <0x0 SPMI_USID>;
11 #address-cells = <1>;
12 #size-cells = <0>;
13
14 rtc@6000 {
15 compatible = "qcom,pm8941-rtc";
16 reg = <0x6000>,
17 <0x6100>;
18 reg-names = "rtc", "alarm";
19 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
20 };
21
22 pwrkey@800 {
23 compatible = "qcom,pm8941-pwrkey";
24 reg = <0x800>;
25 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
26 debounce = <15625>;
27 bias-pull-up;
28 };
29
30 usb_id: usb-detect@900 {
31 compatible = "qcom,pm8941-misc";
32 reg = <0x900>;
33 interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
34 interrupt-names = "usb_id";
35 };
36
37 smbb: charger@1000 {
38 compatible = "qcom,pm8941-charger";
39 reg = <0x1000>;
40 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
41 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
42 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
43 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
44 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
45 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
46 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
47 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
48 interrupt-names = "chg-done",
49 "chg-fast",
50 "chg-trkl",
51 "bat-temp-ok",
52 "bat-present",
53 "chg-gone",
54 "usb-valid",
55 "dc-valid";
56
57 usb-otg-in-supply = <&pm8941_5vs1>;
58
59 chg_otg: otg-vbus { };
60 };
61
62 pm8941_gpios: gpio@c000 {
63 compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
64 reg = <0xc000>;
65 gpio-controller;
66 gpio-ranges = <&pm8941_gpios 0 0 36>;
67 #gpio-cells = <2>;
68 interrupt-controller;
69 #interrupt-cells = <2>;
70
71 boost_bypass_n_pin: boost-bypass-state {
72 pins = "gpio21";
73 function = "normal";
74 };
75 };
76
77 pm8941_mpps: mpps@a000 {
78 compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
79 reg = <0xa000>;
80 gpio-controller;
81 #gpio-cells = <2>;
82 gpio-ranges = <&pm8941_mpps 0 0 8>;
83 interrupt-controller;
84 #interrupt-cells = <2>;
85 };
86
87 pm8941_temp: temp-alarm@2400 {
88 compatible = "qcom,spmi-temp-alarm";
89 reg = <0x2400>;
90 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
91 io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
92 io-channel-names = "thermal";
93 #thermal-sensor-cells = <0>;
94 };
95
96 pm8941_vadc: adc@3100 {
97 compatible = "qcom,spmi-vadc";
98 reg = <0x3100>;
99 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
100 #address-cells = <1>;
101 #size-cells = <0>;
102 #io-channel-cells = <1>;
103
104
105 adc-chan@6 {
106 reg = <VADC_VBAT_SNS>;
107 };
108
109 adc-chan@8 {
110 reg = <VADC_DIE_TEMP>;
111 };
112
113 adc-chan@9 {
114 reg = <VADC_REF_625MV>;
115 };
116
117 adc-chan@a {
118 reg = <VADC_REF_1250MV>;
119 };
120
121 adc-chan@e {
122 reg = <VADC_GND_REF>;
123 };
124
125 adc-chan@f {
126 reg = <VADC_VDD_VADC>;
127 };
128
129 adc-chan@30 {
130 reg = <VADC_LR_MUX1_BAT_THERM>;
131 };
132 };
133
134 pm8941_iadc: adc@3600 {
135 compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
136 reg = <0x3600>;
137 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
138 qcom,external-resistor-micro-ohms = <10000>;
139 };
140
141 pm8941_coincell: charger@2800 {
142 compatible = "qcom,pm8941-coincell";
143 reg = <0x2800>;
144 status = "disabled";
145 };
146 };
147
148 pm8941_1: pm8941@1 {
149 compatible = "qcom,pm8941", "qcom,spmi-pmic";
150 reg = <0x1 SPMI_USID>;
151 #address-cells = <1>;
152 #size-cells = <0>;
153
154 pm8941_lpg: pwm {
155 compatible = "qcom,pm8941-lpg";
156
157 #address-cells = <1>;
158 #size-cells = <0>;
159 #pwm-cells = <2>;
160
161 status = "disabled";
162 };
163
164 pm8941_wled: wled@d800 {
165 compatible = "qcom,pm8941-wled";
166 reg = <0xd800>;
167 label = "backlight";
168
169 status = "disabled";
170 };
171
172 regulators {
173 compatible = "qcom,pm8941-regulators";
174 interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
175 interrupt-names = "ocp-5vs1", "ocp-5vs2";
176 vin_5vs-supply = <&pm8941_5v>;
177
178 pm8941_5v: s4 {
179 regulator-min-microvolt = <5000000>;
180 regulator-max-microvolt = <5000000>;
181 regulator-enable-ramp-delay = <500>;
182 };
183
184 pm8941_5vs1: 5vs1 {
185 regulator-enable-ramp-delay = <1000>;
186 regulator-pull-down;
187 regulator-over-current-protection;
188 qcom,ocp-max-retries = <10>;
189 qcom,ocp-retry-delay = <30>;
190 qcom,vs-soft-start-strength = <0>;
191 regulator-initial-mode = <1>;
192 };
193
194 pm8941_5vs2: 5vs2 {
195 regulator-enable-ramp-delay = <1000>;
196 regulator-pull-down;
197 regulator-over-current-protection;
198 qcom,ocp-max-retries = <10>;
199 qcom,ocp-retry-delay = <30>;
200 qcom,vs-soft-start-strength = <0>;
201 regulator-initial-mode = <1>;
202 };
203 };
204 };
205};
1#include <dt-bindings/iio/qcom,spmi-vadc.h>
2#include <dt-bindings/interrupt-controller/irq.h>
3#include <dt-bindings/spmi/spmi.h>
4
5&spmi_bus {
6
7 pm8941_0: pm8941@0 {
8 compatible = "qcom,pm8941", "qcom,spmi-pmic";
9 reg = <0x0 SPMI_USID>;
10 #address-cells = <1>;
11 #size-cells = <0>;
12
13 rtc@6000 {
14 compatible = "qcom,pm8941-rtc";
15 reg = <0x6000>,
16 <0x6100>;
17 reg-names = "rtc", "alarm";
18 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
19 };
20
21 pwrkey@800 {
22 compatible = "qcom,pm8941-pwrkey";
23 reg = <0x800>;
24 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
25 debounce = <15625>;
26 bias-pull-up;
27 };
28
29 charger@1000 {
30 compatible = "qcom,pm8941-charger";
31 reg = <0x1000>;
32 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
33 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
34 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
35 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
36 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
37 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
38 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
39 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
40 interrupt-names = "chg-done",
41 "chg-fast",
42 "chg-trkl",
43 "bat-temp-ok",
44 "bat-present",
45 "chg-gone",
46 "usb-valid",
47 "dc-valid";
48 };
49
50 pm8941_gpios: gpios@c000 {
51 compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
52 reg = <0xc000>;
53 gpio-controller;
54 #gpio-cells = <2>;
55 interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
56 <0 0xc1 0 IRQ_TYPE_NONE>,
57 <0 0xc2 0 IRQ_TYPE_NONE>,
58 <0 0xc3 0 IRQ_TYPE_NONE>,
59 <0 0xc4 0 IRQ_TYPE_NONE>,
60 <0 0xc5 0 IRQ_TYPE_NONE>,
61 <0 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xa3 0 IRQ_TYPE_NONE>,
102 <0 0xa4 0 IRQ_TYPE_NONE>,
103 <0 0xa5 0 IRQ_TYPE_NONE>,
104 <0 0xa6 0 IRQ_TYPE_NONE>,
105 <0 0xa7 0 IRQ_TYPE_NONE>;
106 };
107
108 pm8941_temp: temp-alarm@2400 {
109 compatible = "qcom,spmi-temp-alarm";
110 reg = <0x2400>;
111 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
112 io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
113 io-channel-names = "thermal";
114 #thermal-sensor-cells = <0>;
115 };
116
117 pm8941_vadc: vadc@3100 {
118 compatible = "qcom,spmi-vadc";
119 reg = <0x3100>;
120 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
121 #address-cells = <1>;
122 #size-cells = <0>;
123 #io-channel-cells = <1>;
124
125 die_temp {
126 reg = <VADC_DIE_TEMP>;
127 };
128 ref_625mv {
129 reg = <VADC_REF_625MV>;
130 };
131 ref_1250v {
132 reg = <VADC_REF_1250MV>;
133 };
134 ref_gnd {
135 reg = <VADC_GND_REF>;
136 };
137 ref_vdd {
138 reg = <VADC_VDD_VADC>;
139 };
140 };
141
142 pm8941_iadc: iadc@3600 {
143 compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
144 reg = <0x3600>;
145 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
146 qcom,external-resistor-micro-ohms = <10000>;
147 };
148
149 coincell@2800 {
150 compatible = "qcom,pm8941-coincell";
151 reg = <0x2800>;
152 status = "disabled";
153 };
154 };
155
156 pm8941_1: pm8941@1 {
157 compatible = "qcom,pm8941", "qcom,spmi-pmic";
158 reg = <0x1 SPMI_USID>;
159 #address-cells = <1>;
160 #size-cells = <0>;
161
162 pm8941_wled: wled@d800 {
163 compatible = "qcom,pm8941-wled";
164 reg = <0xd800>;
165 label = "backlight";
166
167 status = "disabled";
168 };
169 };
170};