blob: dcc4a60c0ce2806332692dd2d624bfcb4e2bad85 [file] [log] [blame]
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +01001// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2012 Linaro Ltd
4 */
5
6#include <dt-bindings/clock/ste-ab8500.h>
7
8/ {
9 /* Essential housekeeping hardware monitors */
10 iio-hwmon {
11 compatible = "iio-hwmon";
12 io-channels = <&gpadc 0x02>, /* Battery temperature */
13 <&gpadc 0x03>, /* Main charger voltage */
14 <&gpadc 0x08>, /* Main battery voltage */
15 <&gpadc 0x09>, /* VBUS */
16 <&gpadc 0x0a>, /* Main charger current */
17 <&gpadc 0x0b>, /* USB charger current */
18 <&gpadc 0x0c>, /* Backup battery voltage */
19 <&gpadc 0x0d>, /* Die temperature */
20 <&gpadc 0x12>; /* Crystal temperature */
21 };
22
23 soc {
24 prcmu@80157000 {
25 ab8500 {
26 compatible = "stericsson,ab8500";
27 interrupt-parent = <&intc>;
28 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
29 interrupt-controller;
30 #interrupt-cells = <2>;
31
32 ab8500_clock: clock-controller {
33 compatible = "stericsson,ab8500-clk";
34 #clock-cells = <1>;
35 };
36
37 ab8500_gpio: ab8500-gpio {
38 compatible = "stericsson,ab8500-gpio";
39 gpio-controller;
40 #gpio-cells = <2>;
41 };
42
43 ab8500-rtc {
44 compatible = "stericsson,ab8500-rtc";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +020045 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
46 <18 IRQ_TYPE_LEVEL_HIGH>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +010047 interrupt-names = "60S", "ALARM";
48 };
49
50 gpadc: ab8500-gpadc {
51 compatible = "stericsson,ab8500-gpadc";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +020052 interrupts = <32 IRQ_TYPE_LEVEL_HIGH>,
53 <39 IRQ_TYPE_LEVEL_HIGH>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +010054 interrupt-names = "HW_CONV_END", "SW_CONV_END";
55 vddadc-supply = <&ab8500_ldo_tvout_reg>;
56 #address-cells = <1>;
57 #size-cells = <0>;
58 #io-channel-cells = <1>;
59
60 /* GPADC channels */
61 bat_ctrl: channel@01 {
62 reg = <0x01>;
63 };
64 btemp_ball: channel@02 {
65 reg = <0x02>;
66 };
67 main_charger_v: channel@03 {
68 reg = <0x03>;
69 };
70 acc_detect1: channel@04 {
71 reg = <0x04>;
72 };
73 acc_detect2: channel@05 {
74 reg = <0x05>;
75 };
76 adc_aux1: channel@06 {
77 reg = <0x06>;
78 };
79 adc_aux2: channel@07 {
80 reg = <0x07>;
81 };
82 main_batt_v: channel@08 {
83 reg = <0x08>;
84 };
85 vbus_v: channel@09 {
86 reg = <0x09>;
87 };
88 main_charger_c: channel@0a {
89 reg = <0x0a>;
90 };
91 usb_charger_c: channel@0b {
92 reg = <0x0b>;
93 };
94 bk_bat_v: channel@0c {
95 reg = <0x0c>;
96 };
97 die_temp: channel@0d {
98 reg = <0x0d>;
99 };
100 usb_id: channel@0e {
101 reg = <0x0e>;
102 };
103 xtal_temp: channel@12 {
104 reg = <0x12>;
105 };
106 vbat_true_meas: channel@13 {
107 reg = <0x13>;
108 };
109 bat_ctrl_and_ibat: channel@1c {
110 reg = <0x1c>;
111 };
112 vbat_meas_and_ibat: channel@1d {
113 reg = <0x1d>;
114 };
115 vbat_true_meas_and_ibat: channel@1e {
116 reg = <0x1e>;
117 };
118 bat_temp_and_ibat: channel@1f {
119 reg = <0x1f>;
120 };
121 };
122
123 ab8500_temp {
124 compatible = "stericsson,abx500-temp";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200125 interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
126 interrupt-names = "ABX500_TEMP_WARM";
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100127 io-channels = <&gpadc 0x06>,
128 <&gpadc 0x07>;
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200129 io-channel-names = "aux1", "aux2";
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100130 };
131
132 ab8500_battery: ab8500_battery {
133 stericsson,battery-type = "LIPO";
134 thermistor-on-batctrl;
135 };
136
137 ab8500_fg {
138 compatible = "stericsson,ab8500-fg";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200139 interrupts = <24 IRQ_TYPE_LEVEL_HIGH>,
140 <8 IRQ_TYPE_LEVEL_HIGH>,
141 <28 IRQ_TYPE_LEVEL_HIGH>,
142 <27 IRQ_TYPE_LEVEL_HIGH>,
143 <26 IRQ_TYPE_LEVEL_HIGH>;
144 interrupt-names = "NCONV_ACCU",
145 "BATT_OVV",
146 "LOW_BAT_F",
147 "CC_INT_CALIB",
148 "CCEOC";
149 battery = <&ab8500_battery>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100150 io-channels = <&gpadc 0x08>;
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200151 io-channel-names = "main_bat_v";
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100152 };
153
154 ab8500_btemp {
155 compatible = "stericsson,ab8500-btemp";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200156 interrupts = <20 IRQ_TYPE_LEVEL_HIGH>,
157 <80 IRQ_TYPE_LEVEL_HIGH>,
158 <83 IRQ_TYPE_LEVEL_HIGH>,
159 <81 IRQ_TYPE_LEVEL_HIGH>,
160 <82 IRQ_TYPE_LEVEL_HIGH>;
161 interrupt-names = "BAT_CTRL_INDB",
162 "BTEMP_LOW",
163 "BTEMP_HIGH",
164 "BTEMP_LOW_MEDIUM",
165 "BTEMP_MEDIUM_HIGH";
166 battery = <&ab8500_battery>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100167 io-channels = <&gpadc 0x02>,
168 <&gpadc 0x01>;
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200169 io-channel-names = "btemp_ball",
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100170 "bat_ctrl";
171 };
172
173 ab8500_charger {
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200174 compatible = "stericsson,ab8500-charger";
175 interrupts = <10 IRQ_TYPE_LEVEL_HIGH>,
176 <11 IRQ_TYPE_LEVEL_HIGH>,
177 <0 IRQ_TYPE_LEVEL_HIGH>,
178 <107 IRQ_TYPE_LEVEL_HIGH>,
179 <106 IRQ_TYPE_LEVEL_HIGH>,
180 <14 IRQ_TYPE_LEVEL_HIGH>,
181 <15 IRQ_TYPE_LEVEL_HIGH>,
182 <79 IRQ_TYPE_LEVEL_HIGH>,
183 <105 IRQ_TYPE_LEVEL_HIGH>,
184 <104 IRQ_TYPE_LEVEL_HIGH>,
185 <89 IRQ_TYPE_LEVEL_HIGH>,
186 <22 IRQ_TYPE_LEVEL_HIGH>,
187 <21 IRQ_TYPE_LEVEL_HIGH>,
188 <16 IRQ_TYPE_LEVEL_HIGH>;
189 interrupt-names = "MAIN_CH_UNPLUG_DET",
190 "MAIN_CHARGE_PLUG_DET",
191 "MAIN_EXT_CH_NOT_OK",
192 "MAIN_CH_TH_PROT_R",
193 "MAIN_CH_TH_PROT_F",
194 "VBUS_DET_F",
195 "VBUS_DET_R",
196 "USB_LINK_STATUS",
197 "USB_CH_TH_PROT_R",
198 "USB_CH_TH_PROT_F",
199 "USB_CHARGER_NOT_OKR",
200 "VBUS_OVV",
201 "CH_WD_EXP",
202 "VBUS_CH_DROP_END";
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100203 battery = <&ab8500_battery>;
204 vddadc-supply = <&ab8500_ldo_tvout_reg>;
205 io-channels = <&gpadc 0x03>,
206 <&gpadc 0x0a>,
207 <&gpadc 0x09>,
208 <&gpadc 0x0b>;
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200209 io-channel-names = "main_charger_v",
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100210 "main_charger_c",
211 "vbus_v",
212 "usb_charger_c";
213 };
214
215 ab8500_chargalg {
216 compatible = "stericsson,ab8500-chargalg";
217 battery = <&ab8500_battery>;
218 };
219
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200220 ab8500_usb: ab8500_usb {
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100221 compatible = "stericsson,ab8500-usb";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200222 interrupts = <90 IRQ_TYPE_LEVEL_HIGH>,
223 <96 IRQ_TYPE_LEVEL_HIGH>,
224 <14 IRQ_TYPE_LEVEL_HIGH>,
225 <15 IRQ_TYPE_LEVEL_HIGH>,
226 <79 IRQ_TYPE_LEVEL_HIGH>,
227 <74 IRQ_TYPE_LEVEL_HIGH>,
228 <75 IRQ_TYPE_LEVEL_HIGH>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100229 interrupt-names = "ID_WAKEUP_R",
230 "ID_WAKEUP_F",
231 "VBUS_DET_F",
232 "VBUS_DET_R",
233 "USB_LINK_STATUS",
234 "USB_ADP_PROBE_PLUG",
235 "USB_ADP_PROBE_UNPLUG";
236 vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
237 v-ape-supply = <&db8500_vape_reg>;
238 musb_1v8-supply = <&db8500_vsmps2_reg>;
239 clocks = <&prcmu_clk PRCMU_SYSCLK>;
240 clock-names = "sysclk";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200241 #phy-cells = <0>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100242 };
243
244 ab8500-ponkey {
245 compatible = "stericsson,ab8500-poweron-key";
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200246 interrupts = <6 IRQ_TYPE_LEVEL_HIGH>,
247 <7 IRQ_TYPE_LEVEL_HIGH>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100248 interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
249 };
250
251 ab8500-sysctrl {
252 compatible = "stericsson,ab8500-sysctrl";
253 };
254
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200255 ab8500-pwm-1 {
256 compatible = "stericsson,ab8500-pwm";
257 clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
258 clock-names = "intclk";
259 };
260
261 ab8500-pwm-2 {
262 compatible = "stericsson,ab8500-pwm";
263 clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
264 clock-names = "intclk";
265 };
266
267 ab8500-pwm-3 {
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100268 compatible = "stericsson,ab8500-pwm";
269 clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
270 clock-names = "intclk";
271 };
272
273 ab8500-debugfs {
274 compatible = "stericsson,ab8500-debug";
275 };
276
277 codec: ab8500-codec {
278 compatible = "stericsson,ab8500-codec";
279
280 V-AUD-supply = <&ab8500_ldo_audio_reg>;
281 V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>;
282 V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>;
283 V-DMIC-supply = <&ab8500_ldo_dmic_reg>;
284
285 clocks = <&ab8500_clock AB8500_SYSCLK_AUDIO>;
286 clock-names = "audioclk";
287
288 stericsson,earpeice-cmv = <950>; /* Units in mV. */
289 };
290
291 ext_regulators: ab8500-ext-regulators {
292 compatible = "stericsson,ab8500-ext-regulator";
293
294 ab8500_ext1_reg: ab8500_ext1 {
295 regulator-min-microvolt = <1800000>;
296 regulator-max-microvolt = <1800000>;
297 regulator-boot-on;
298 regulator-always-on;
299 };
300
301 ab8500_ext2_reg: ab8500_ext2 {
302 regulator-min-microvolt = <1360000>;
303 regulator-max-microvolt = <1360000>;
304 regulator-boot-on;
305 regulator-always-on;
306 };
307
308 ab8500_ext3_reg: ab8500_ext3 {
309 regulator-min-microvolt = <3400000>;
310 regulator-max-microvolt = <3400000>;
311 regulator-boot-on;
312 };
313 };
314
315 ab8500-regulators {
316 compatible = "stericsson,ab8500-regulator";
317 vin-supply = <&ab8500_ext3_reg>;
318
319 // supplies to the display/camera
320 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200321 regulator-min-microvolt = <2800000>;
322 regulator-max-microvolt = <3300000>;
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100323 regulator-boot-on;
324 /* BUG: If turned off MMC will be affected. */
325 regulator-always-on;
326 };
327
328 // supplies to the on-board eMMC
329 ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
330 regulator-min-microvolt = <1100000>;
331 regulator-max-microvolt = <3300000>;
332 };
333
334 // supply for VAUX3; SDcard slots
335 ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
336 regulator-min-microvolt = <1100000>;
337 regulator-max-microvolt = <3300000>;
338 };
339
340 // supply for v-intcore12; VINTCORE12 LDO
341 ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
342 };
343
344 // supply for tvout; gpadc; TVOUT LDO
345 ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
346 };
347
348 // supply for ab8500-vaudio; VAUDIO LDO
349 ab8500_ldo_audio_reg: ab8500_ldo_audio {
350 };
351
352 // supply for v-anamic1 VAMIC1 LDO
353 ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
354 };
355
356 // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1
357 ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
358 };
359
360 // supply for v-dmic; VDMIC LDO
361 ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
362 };
363
364 // supply for U8500 CSI/DSI; VANA LDO
365 ab8500_ldo_ana_reg: ab8500_ldo_ana {
366 };
367 };
368 };
369 };
370
371 sound {
372 stericsson,audio-codec = <&codec>;
373 clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>;
374 clock-names = "sysclk", "ulpclk", "intclk";
375 };
376
377 mcde@a0350000 {
378 vana-supply = <&ab8500_ldo_ana_reg>;
379
380 dsi@a0351000 {
381 vana-supply = <&ab8500_ldo_ana_reg>;
382 };
383 dsi@a0352000 {
384 vana-supply = <&ab8500_ldo_ana_reg>;
385 };
386 dsi@a0353000 {
387 vana-supply = <&ab8500_ldo_ana_reg>;
388 };
389 };
Stephan Gerhold1ae43a02021-08-07 15:07:20 +0200390
391 usb_per5@a03e0000 {
392 phys = <&ab8500_usb>;
393 phy-names = "usb";
394 };
Stephan Gerholdf13dc8c2020-01-04 18:45:16 +0100395 };
396};