Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 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 0x08>, /* Main battery voltage */ |
| 14 | <&gpadc 0x09>, /* VBUS */ |
| 15 | <&gpadc 0x0b>, /* Charger current */ |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 16 | <&gpadc 0x0c>, /* Backup battery voltage */ |
| 17 | <&gpadc 0x0d>; /* Die temperature */ |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | soc { |
| 21 | prcmu@80157000 { |
| 22 | ab8505 { |
| 23 | compatible = "stericsson,ab8505"; |
| 24 | interrupt-parent = <&intc>; |
| 25 | interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; |
| 26 | interrupt-controller; |
| 27 | #interrupt-cells = <2>; |
| 28 | |
| 29 | ab8500_clock: clock-controller { |
| 30 | compatible = "stericsson,ab8500-clk"; |
| 31 | #clock-cells = <1>; |
| 32 | }; |
| 33 | |
| 34 | ab8505_gpio: ab8505-gpio { |
| 35 | compatible = "stericsson,ab8505-gpio"; |
| 36 | gpio-controller; |
| 37 | #gpio-cells = <2>; |
| 38 | }; |
| 39 | |
| 40 | ab8500-rtc { |
| 41 | compatible = "stericsson,ab8500-rtc"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 42 | interrupts = <17 IRQ_TYPE_LEVEL_HIGH>, |
| 43 | <18 IRQ_TYPE_LEVEL_HIGH>; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 44 | interrupt-names = "60S", "ALARM"; |
| 45 | }; |
| 46 | |
| 47 | gpadc: ab8500-gpadc { |
| 48 | compatible = "stericsson,ab8500-gpadc"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 49 | interrupts = <39 IRQ_TYPE_LEVEL_HIGH>; |
| 50 | interrupt-names = "SW_CONV_END"; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 51 | vddadc-supply = <&ab8500_ldo_adc_reg>; |
| 52 | #address-cells = <1>; |
| 53 | #size-cells = <0>; |
| 54 | #io-channel-cells = <1>; |
| 55 | |
| 56 | /* GPADC channels */ |
| 57 | bat_ctrl: channel@01 { |
| 58 | reg = <0x01>; |
| 59 | }; |
| 60 | btemp_ball: channel@02 { |
| 61 | reg = <0x02>; |
| 62 | }; |
| 63 | acc_detect1: channel@04 { |
| 64 | reg = <0x04>; |
| 65 | }; |
| 66 | acc_detect2: channel@05 { |
| 67 | reg = <0x05>; |
| 68 | }; |
| 69 | adc_aux1: channel@06 { |
| 70 | reg = <0x06>; |
| 71 | }; |
| 72 | adc_aux2: channel@07 { |
| 73 | reg = <0x07>; |
| 74 | }; |
| 75 | main_batt_v: channel@08 { |
| 76 | reg = <0x08>; |
| 77 | }; |
| 78 | vbus_v: channel@09 { |
| 79 | reg = <0x09>; |
| 80 | }; |
| 81 | charger_c: channel@0b { |
| 82 | reg = <0x0b>; |
| 83 | }; |
| 84 | bk_bat_v: channel@0c { |
| 85 | reg = <0x0c>; |
| 86 | }; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 87 | die_temp: channel@0d { |
| 88 | reg = <0x0d>; |
| 89 | }; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 90 | usb_id: channel@0e { |
| 91 | reg = <0x0e>; |
| 92 | }; |
| 93 | }; |
| 94 | |
| 95 | ab8500_battery: ab8500_battery { |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 96 | stericsson,battery-type = "LIPO"; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 97 | thermistor-on-batctrl; |
| 98 | }; |
| 99 | |
| 100 | ab8500_fg { |
| 101 | status = "disabled"; |
| 102 | compatible = "stericsson,ab8500-fg"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 103 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, |
| 104 | <8 IRQ_TYPE_LEVEL_HIGH>, |
| 105 | <28 IRQ_TYPE_LEVEL_HIGH>, |
| 106 | <27 IRQ_TYPE_LEVEL_HIGH>, |
| 107 | <26 IRQ_TYPE_LEVEL_HIGH>; |
| 108 | interrupt-names = "NCONV_ACCU", |
| 109 | "BATT_OVV", |
| 110 | "LOW_BAT_F", |
| 111 | "CC_INT_CALIB", |
| 112 | "CCEOC"; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 113 | battery = <&ab8500_battery>; |
| 114 | io-channels = <&gpadc 0x08>; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 115 | io-channel-names = "main_bat_v"; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 116 | }; |
| 117 | |
| 118 | ab8500_btemp { |
| 119 | status = "disabled"; |
| 120 | compatible = "stericsson,ab8500-btemp"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 121 | interrupts = <20 IRQ_TYPE_LEVEL_HIGH>, |
| 122 | <80 IRQ_TYPE_LEVEL_HIGH>, |
| 123 | <83 IRQ_TYPE_LEVEL_HIGH>, |
| 124 | <81 IRQ_TYPE_LEVEL_HIGH>, |
| 125 | <82 IRQ_TYPE_LEVEL_HIGH>; |
| 126 | interrupt-names = "BAT_CTRL_INDB", |
| 127 | "BTEMP_LOW", |
| 128 | "BTEMP_HIGH", |
| 129 | "BTEMP_LOW_MEDIUM", |
| 130 | "BTEMP_MEDIUM_HIGH"; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 131 | battery = <&ab8500_battery>; |
| 132 | io-channels = <&gpadc 0x02>, |
| 133 | <&gpadc 0x01>; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 134 | io-channel-names = "btemp_ball", |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 135 | "bat_ctrl"; |
| 136 | }; |
| 137 | |
| 138 | ab8500_charger { |
| 139 | status = "disabled"; |
| 140 | compatible = "stericsson,ab8500-charger"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 141 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, |
| 142 | <11 IRQ_TYPE_LEVEL_HIGH>, |
| 143 | <0 IRQ_TYPE_LEVEL_HIGH>, |
| 144 | <107 IRQ_TYPE_LEVEL_HIGH>, |
| 145 | <106 IRQ_TYPE_LEVEL_HIGH>, |
| 146 | <14 IRQ_TYPE_LEVEL_HIGH>, |
| 147 | <15 IRQ_TYPE_LEVEL_HIGH>, |
| 148 | <79 IRQ_TYPE_LEVEL_HIGH>, |
| 149 | <105 IRQ_TYPE_LEVEL_HIGH>, |
| 150 | <104 IRQ_TYPE_LEVEL_HIGH>, |
| 151 | <89 IRQ_TYPE_LEVEL_HIGH>, |
| 152 | <22 IRQ_TYPE_LEVEL_HIGH>, |
| 153 | <21 IRQ_TYPE_LEVEL_HIGH>, |
| 154 | <16 IRQ_TYPE_LEVEL_HIGH>; |
| 155 | interrupt-names = "MAIN_CH_UNPLUG_DET", |
| 156 | "MAIN_CHARGE_PLUG_DET", |
| 157 | "MAIN_EXT_CH_NOT_OK", |
| 158 | "MAIN_CH_TH_PROT_R", |
| 159 | "MAIN_CH_TH_PROT_F", |
| 160 | "VBUS_DET_F", |
| 161 | "VBUS_DET_R", |
| 162 | "USB_LINK_STATUS", |
| 163 | "USB_CH_TH_PROT_R", |
| 164 | "USB_CH_TH_PROT_F", |
| 165 | "USB_CHARGER_NOT_OKR", |
| 166 | "VBUS_OVV", |
| 167 | "CH_WD_EXP", |
| 168 | "VBUS_CH_DROP_END"; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 169 | battery = <&ab8500_battery>; |
| 170 | vddadc-supply = <&ab8500_ldo_adc_reg>; |
| 171 | io-channels = <&gpadc 0x09>, |
| 172 | <&gpadc 0x0b>; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 173 | io-channel-names = "vbus_v", |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 174 | "usb_charger_c"; |
| 175 | }; |
| 176 | |
| 177 | ab8500_chargalg { |
| 178 | status = "disabled"; |
| 179 | compatible = "stericsson,ab8500-chargalg"; |
| 180 | battery = <&ab8500_battery>; |
| 181 | }; |
| 182 | |
| 183 | ab8500_usb: ab8500_usb { |
| 184 | compatible = "stericsson,ab8500-usb"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 185 | interrupts = <90 IRQ_TYPE_LEVEL_HIGH>, |
| 186 | <96 IRQ_TYPE_LEVEL_HIGH>, |
| 187 | <14 IRQ_TYPE_LEVEL_HIGH>, |
| 188 | <15 IRQ_TYPE_LEVEL_HIGH>, |
| 189 | <79 IRQ_TYPE_LEVEL_HIGH>, |
| 190 | <74 IRQ_TYPE_LEVEL_HIGH>, |
| 191 | <75 IRQ_TYPE_LEVEL_HIGH>; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 192 | interrupt-names = "ID_WAKEUP_R", |
| 193 | "ID_WAKEUP_F", |
| 194 | "VBUS_DET_F", |
| 195 | "VBUS_DET_R", |
| 196 | "USB_LINK_STATUS", |
| 197 | "USB_ADP_PROBE_PLUG", |
| 198 | "USB_ADP_PROBE_UNPLUG"; |
| 199 | vddulpivio18-supply = <&ab8500_ldo_intcore_reg>; |
| 200 | v-ape-supply = <&db8500_vape_reg>; |
| 201 | musb_1v8-supply = <&db8500_vsmps2_reg>; |
| 202 | clocks = <&prcmu_clk PRCMU_SYSCLK>; |
| 203 | clock-names = "sysclk"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 204 | #phy-cells = <0>; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 205 | }; |
| 206 | |
| 207 | ab8500-ponkey { |
| 208 | compatible = "stericsson,ab8500-poweron-key"; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 209 | interrupts = <6 IRQ_TYPE_LEVEL_HIGH>, |
| 210 | <7 IRQ_TYPE_LEVEL_HIGH>; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 211 | interrupt-names = "ONKEY_DBF", "ONKEY_DBR"; |
| 212 | }; |
| 213 | |
| 214 | ab8500-sysctrl { |
| 215 | compatible = "stericsson,ab8500-sysctrl"; |
| 216 | }; |
| 217 | |
| 218 | ab8500-pwm { |
| 219 | compatible = "stericsson,ab8500-pwm"; |
| 220 | clocks = <&ab8500_clock AB8500_SYSCLK_INT>; |
| 221 | clock-names = "intclk"; |
| 222 | }; |
| 223 | |
| 224 | ab8500-debugfs { |
| 225 | compatible = "stericsson,ab8500-debug"; |
| 226 | }; |
| 227 | |
| 228 | codec: ab8500-codec { |
| 229 | compatible = "stericsson,ab8500-codec"; |
| 230 | |
| 231 | V-AUD-supply = <&ab8500_ldo_audio_reg>; |
| 232 | V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>; |
| 233 | V-AMIC2-supply = <&ab8500_ldo_anamic2_reg>; |
| 234 | |
| 235 | clocks = <&ab8500_clock AB8500_SYSCLK_AUDIO>; |
| 236 | clock-names = "audioclk"; |
| 237 | |
| 238 | stericsson,earpeice-cmv = <950>; /* Units in mV. */ |
| 239 | }; |
| 240 | |
| 241 | ab8505-regulators { |
| 242 | compatible = "stericsson,ab8505-regulator"; |
| 243 | |
| 244 | ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { |
| 245 | regulator-min-microvolt = <2800000>; |
| 246 | regulator-max-microvolt = <3300000>; |
| 247 | }; |
| 248 | |
| 249 | ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { |
| 250 | regulator-min-microvolt = <1100000>; |
| 251 | regulator-max-microvolt = <3300000>; |
| 252 | }; |
| 253 | |
| 254 | ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { |
| 255 | regulator-min-microvolt = <1100000>; |
| 256 | regulator-max-microvolt = <3300000>; |
| 257 | }; |
| 258 | |
| 259 | ab8500_ldo_aux4_reg: ab8500_ldo_aux4 { |
| 260 | regulator-min-microvolt = <1100000>; |
| 261 | regulator-max-microvolt = <3300000>; |
| 262 | }; |
| 263 | |
| 264 | ab8500_ldo_aux5_reg: ab8500_ldo_aux5 { |
| 265 | regulator-min-microvolt = <1050000>; |
| 266 | regulator-max-microvolt = <2790000>; |
| 267 | }; |
| 268 | |
| 269 | ab8500_ldo_aux6_reg: ab8500_ldo_aux6 { |
| 270 | regulator-min-microvolt = <1050000>; |
| 271 | regulator-max-microvolt = <2790000>; |
| 272 | }; |
| 273 | |
| 274 | // supply for v-intcore12; VINTCORE12 LDO |
| 275 | ab8500_ldo_intcore_reg: ab8500_ldo_intcore { |
| 276 | regulator-min-microvolt = <1250000>; |
| 277 | regulator-max-microvolt = <1350000>; |
| 278 | }; |
| 279 | |
| 280 | // supply for gpadc; ADC LDO |
| 281 | ab8500_ldo_adc_reg: ab8500_ldo_adc { |
| 282 | }; |
| 283 | |
| 284 | // supply for ab8500-vaudio; VAUDIO LDO |
| 285 | ab8500_ldo_audio_reg: ab8500_ldo_audio { |
| 286 | }; |
| 287 | |
| 288 | // supply for v-anamic1 VAMIC1 LDO |
| 289 | ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { |
| 290 | }; |
| 291 | |
| 292 | // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1 |
| 293 | ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 { |
| 294 | }; |
| 295 | |
| 296 | // supply for v-aux8; VAUX8 LDO |
| 297 | ab8500_ldo_aux8_reg: ab8500_ldo_aux8 { |
| 298 | }; |
| 299 | |
| 300 | // supply for U8500 CSI/DSI; VANA LDO |
| 301 | ab8500_ldo_ana_reg: ab8500_ldo_ana { |
| 302 | }; |
| 303 | }; |
| 304 | }; |
| 305 | }; |
| 306 | |
| 307 | sound { |
| 308 | stericsson,audio-codec = <&codec>; |
| 309 | clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>; |
| 310 | clock-names = "sysclk", "ulpclk", "intclk"; |
| 311 | }; |
| 312 | |
| 313 | mcde@a0350000 { |
| 314 | vana-supply = <&ab8500_ldo_ana_reg>; |
| 315 | |
| 316 | dsi@a0351000 { |
| 317 | vana-supply = <&ab8500_ldo_ana_reg>; |
| 318 | }; |
| 319 | dsi@a0352000 { |
| 320 | vana-supply = <&ab8500_ldo_ana_reg>; |
| 321 | }; |
| 322 | dsi@a0353000 { |
| 323 | vana-supply = <&ab8500_ldo_ana_reg>; |
| 324 | }; |
| 325 | }; |
Stephan Gerhold | 1ae43a0 | 2021-08-07 15:07:20 +0200 | [diff] [blame] | 326 | |
| 327 | usb_per5@a03e0000 { |
| 328 | phys = <&ab8500_usb>; |
| 329 | phy-names = "usb"; |
| 330 | }; |
Stephan Gerhold | f13dc8c | 2020-01-04 18:45:16 +0100 | [diff] [blame] | 331 | }; |
| 332 | }; |