Merge tag 'drm-next-2020-12-24' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / arch / arm / boot / dts / ste-ab8500.dtsi
1 // 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";
45                                         interrupts = <17 IRQ_TYPE_LEVEL_HIGH
46                                                       18 IRQ_TYPE_LEVEL_HIGH>;
47                                         interrupt-names = "60S", "ALARM";
48                                 };
49
50                                 gpadc: ab8500-gpadc {
51                                         compatible = "stericsson,ab8500-gpadc";
52                                         interrupts = <32 IRQ_TYPE_LEVEL_HIGH
53                                                       39 IRQ_TYPE_LEVEL_HIGH>;
54                                         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";
125                                         io-channels = <&gpadc 0x06>,
126                                                       <&gpadc 0x07>;
127                                         io-channel-name = "aux1", "aux2";
128                                 };
129
130                                 ab8500_battery: ab8500_battery {
131                                         stericsson,battery-type = "LIPO";
132                                         thermistor-on-batctrl;
133                                 };
134
135                                 ab8500_fg {
136                                         compatible = "stericsson,ab8500-fg";
137                                         battery    = <&ab8500_battery>;
138                                         io-channels = <&gpadc 0x08>;
139                                         io-channel-name = "main_bat_v";
140                                 };
141
142                                 ab8500_btemp {
143                                         compatible = "stericsson,ab8500-btemp";
144                                         battery    = <&ab8500_battery>;
145                                         io-channels = <&gpadc 0x02>,
146                                                       <&gpadc 0x01>;
147                                         io-channel-name = "btemp_ball",
148                                                         "bat_ctrl";
149                                 };
150
151                                 ab8500_charger {
152                                         compatible      = "stericsson,ab8500-charger";
153                                         battery         = <&ab8500_battery>;
154                                         vddadc-supply   = <&ab8500_ldo_tvout_reg>;
155                                         io-channels = <&gpadc 0x03>,
156                                                       <&gpadc 0x0a>,
157                                                       <&gpadc 0x09>,
158                                                       <&gpadc 0x0b>;
159                                         io-channel-name = "main_charger_v",
160                                                         "main_charger_c",
161                                                         "vbus_v",
162                                                         "usb_charger_c";
163                                 };
164
165                                 ab8500_chargalg {
166                                         compatible      = "stericsson,ab8500-chargalg";
167                                         battery         = <&ab8500_battery>;
168                                 };
169
170                                 ab8500_usb {
171                                         compatible = "stericsson,ab8500-usb";
172                                         interrupts = < 90 IRQ_TYPE_LEVEL_HIGH
173                                                        96 IRQ_TYPE_LEVEL_HIGH
174                                                        14 IRQ_TYPE_LEVEL_HIGH
175                                                        15 IRQ_TYPE_LEVEL_HIGH
176                                                        79 IRQ_TYPE_LEVEL_HIGH
177                                                        74 IRQ_TYPE_LEVEL_HIGH
178                                                        75 IRQ_TYPE_LEVEL_HIGH>;
179                                         interrupt-names = "ID_WAKEUP_R",
180                                                           "ID_WAKEUP_F",
181                                                           "VBUS_DET_F",
182                                                           "VBUS_DET_R",
183                                                           "USB_LINK_STATUS",
184                                                           "USB_ADP_PROBE_PLUG",
185                                                           "USB_ADP_PROBE_UNPLUG";
186                                         vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
187                                         v-ape-supply = <&db8500_vape_reg>;
188                                         musb_1v8-supply = <&db8500_vsmps2_reg>;
189                                         clocks = <&prcmu_clk PRCMU_SYSCLK>;
190                                         clock-names = "sysclk";
191                                 };
192
193                                 ab8500-ponkey {
194                                         compatible = "stericsson,ab8500-poweron-key";
195                                         interrupts = <6 IRQ_TYPE_LEVEL_HIGH
196                                                       7 IRQ_TYPE_LEVEL_HIGH>;
197                                         interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
198                                 };
199
200                                 ab8500-sysctrl {
201                                         compatible = "stericsson,ab8500-sysctrl";
202                                 };
203
204                                 ab8500-pwm-1 {
205                                         compatible = "stericsson,ab8500-pwm";
206                                         clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
207                                         clock-names = "intclk";
208                                 };
209
210                                 ab8500-pwm-2 {
211                                         compatible = "stericsson,ab8500-pwm";
212                                         clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
213                                         clock-names = "intclk";
214                                 };
215
216                                 ab8500-pwm-3 {
217                                         compatible = "stericsson,ab8500-pwm";
218                                         clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
219                                         clock-names = "intclk";
220                                 };
221
222                                 ab8500-debugfs {
223                                         compatible = "stericsson,ab8500-debug";
224                                 };
225
226                                 codec: ab8500-codec {
227                                         compatible = "stericsson,ab8500-codec";
228
229                                         V-AUD-supply = <&ab8500_ldo_audio_reg>;
230                                         V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>;
231                                         V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>;
232                                         V-DMIC-supply = <&ab8500_ldo_dmic_reg>;
233
234                                         clocks = <&ab8500_clock AB8500_SYSCLK_AUDIO>;
235                                         clock-names = "audioclk";
236
237                                         stericsson,earpeice-cmv = <950>; /* Units in mV. */
238                                 };
239
240                                 ext_regulators: ab8500-ext-regulators {
241                                         compatible = "stericsson,ab8500-ext-regulator";
242
243                                         ab8500_ext1_reg: ab8500_ext1 {
244                                                 regulator-min-microvolt = <1800000>;
245                                                 regulator-max-microvolt = <1800000>;
246                                                 regulator-boot-on;
247                                                 regulator-always-on;
248                                         };
249
250                                         ab8500_ext2_reg: ab8500_ext2 {
251                                                 regulator-min-microvolt = <1360000>;
252                                                 regulator-max-microvolt = <1360000>;
253                                                 regulator-boot-on;
254                                                 regulator-always-on;
255                                         };
256
257                                         ab8500_ext3_reg: ab8500_ext3 {
258                                                 regulator-min-microvolt = <3400000>;
259                                                 regulator-max-microvolt = <3400000>;
260                                                 regulator-boot-on;
261                                         };
262                                 };
263
264                                 ab8500-regulators {
265                                         compatible = "stericsson,ab8500-regulator";
266                                         vin-supply = <&ab8500_ext3_reg>;
267
268                                         // supplies to the display/camera
269                                         ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
270                                                 regulator-min-microvolt = <2500000>;
271                                                 regulator-max-microvolt = <2900000>;
272                                                 regulator-boot-on;
273                                                 /* BUG: If turned off MMC will be affected. */
274                                                 regulator-always-on;
275                                         };
276
277                                         // supplies to the on-board eMMC
278                                         ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
279                                                 regulator-min-microvolt = <1100000>;
280                                                 regulator-max-microvolt = <3300000>;
281                                         };
282
283                                         // supply for VAUX3; SDcard slots
284                                         ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
285                                                 regulator-min-microvolt = <1100000>;
286                                                 regulator-max-microvolt = <3300000>;
287                                         };
288
289                                         // supply for v-intcore12; VINTCORE12 LDO
290                                         ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
291                                         };
292
293                                         // supply for tvout; gpadc; TVOUT LDO
294                                         ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
295                                         };
296
297                                         // supply for ab8500-vaudio; VAUDIO LDO
298                                         ab8500_ldo_audio_reg: ab8500_ldo_audio {
299                                         };
300
301                                         // supply for v-anamic1 VAMIC1 LDO
302                                         ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
303                                         };
304
305                                         // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1
306                                         ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
307                                         };
308
309                                         // supply for v-dmic; VDMIC LDO
310                                         ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
311                                         };
312
313                                         // supply for U8500 CSI/DSI; VANA LDO
314                                         ab8500_ldo_ana_reg: ab8500_ldo_ana {
315                                         };
316                                 };
317                         };
318                 };
319
320                 sound {
321                         stericsson,audio-codec = <&codec>;
322                         clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>;
323                         clock-names = "sysclk", "ulpclk", "intclk";
324                 };
325
326                 mcde@a0350000 {
327                         vana-supply = <&ab8500_ldo_ana_reg>;
328
329                         dsi@a0351000 {
330                                 vana-supply = <&ab8500_ldo_ana_reg>;
331                         };
332                         dsi@a0352000 {
333                                 vana-supply = <&ab8500_ldo_ana_reg>;
334                         };
335                         dsi@a0353000 {
336                                 vana-supply = <&ab8500_ldo_ana_reg>;
337                         };
338                 };
339         };
340 };