1c66ec88fSEmmanuel Vadot* AB8500 Multi-Functional Device (MFD) 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotRequired parent device properties: 4c66ec88fSEmmanuel Vadot- compatible : contains "stericsson,ab8500" or "stericsson,ab8505"; 5c66ec88fSEmmanuel Vadot- interrupts : contains the IRQ line for the AB8500 6c66ec88fSEmmanuel Vadot- interrupt-controller : describes the AB8500 as an Interrupt Controller (has its own domain) 7c66ec88fSEmmanuel Vadot- #interrupt-cells : should be 2, for 2-cell format 8c66ec88fSEmmanuel Vadot - The first cell is the AB8500 local IRQ number 9c66ec88fSEmmanuel Vadot - The second cell is used to specify optional parameters 10c66ec88fSEmmanuel Vadot - bits[3:0] trigger type and level flags: 11c66ec88fSEmmanuel Vadot 1 = low-to-high edge triggered 12c66ec88fSEmmanuel Vadot 2 = high-to-low edge triggered 13c66ec88fSEmmanuel Vadot 4 = active high level-sensitive 14c66ec88fSEmmanuel Vadot 8 = active low level-sensitive 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel VadotThe AB8500 consists of a large and varied group of sub-devices: 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel VadotDevice IRQ Names Supply Names Description 19c66ec88fSEmmanuel Vadot------ --------- ------------ ----------- 20c66ec88fSEmmanuel Vadotab8500-bm : : : Battery Manager 21c66ec88fSEmmanuel Vadotab8500-btemp : : : Battery Temperature 22c66ec88fSEmmanuel Vadotab8500-charger : : : Battery Charger 23c66ec88fSEmmanuel Vadotab8500-codec : : : Audio Codec 24c66ec88fSEmmanuel Vadotab8500-fg : : vddadc : Fuel Gauge 25c66ec88fSEmmanuel Vadot : NCONV_ACCU : : Accumulate N Sample Conversion 26c66ec88fSEmmanuel Vadot : BATT_OVV : : Battery Over Voltage 27c66ec88fSEmmanuel Vadot : LOW_BAT_F : : LOW threshold battery voltage 28c66ec88fSEmmanuel Vadot : CC_INT_CALIB : : Coulomb Counter Internal Calibration 29c66ec88fSEmmanuel Vadot : CCEOC : : Coulomb Counter End of Conversion 30c66ec88fSEmmanuel Vadotab8500-btemp : : vtvout : Battery Temperature 31c66ec88fSEmmanuel Vadot : BAT_CTRL_INDB : : Battery Removal Indicator 32c66ec88fSEmmanuel Vadot : BTEMP_LOW : : Btemp < BtempLow, if battery temperature is lower than -10°C 33c66ec88fSEmmanuel Vadot : BTEMP_LOW_MEDIUM : : BtempLow < Btemp < BtempMedium,if battery temperature is between -10 and 0°C 346be33864SEmmanuel Vadot : BTEMP_MEDIUM_HIGH : : BtempMedium < Btemp < BtempHigh,if battery temperature is between 0°C and MaxTemp 356be33864SEmmanuel Vadot : BTEMP_HIGH : : Btemp > BtempHigh, if battery temperature is higher than MaxTemp 36c66ec88fSEmmanuel Vadotab8500-charger : : vddadc : Charger interface 37c66ec88fSEmmanuel Vadot : MAIN_CH_UNPLUG_DET : : main charger unplug detection management (not in 8505) 38c66ec88fSEmmanuel Vadot : MAIN_CHARGE_PLUG_DET : : main charger plug detection management (not in 8505) 39c66ec88fSEmmanuel Vadot : MAIN_EXT_CH_NOT_OK : : main charger not OK 40c66ec88fSEmmanuel Vadot : MAIN_CH_TH_PROT_R : : Die temp is above main charger 41c66ec88fSEmmanuel Vadot : MAIN_CH_TH_PROT_F : : Die temp is below main charger 42c66ec88fSEmmanuel Vadot : VBUS_DET_F : : VBUS falling detected 43c66ec88fSEmmanuel Vadot : VBUS_DET_R : : VBUS rising detected 44c66ec88fSEmmanuel Vadot : USB_LINK_STATUS : : USB link status has changed 45c66ec88fSEmmanuel Vadot : USB_CH_TH_PROT_R : : Die temp is above usb charger 46c66ec88fSEmmanuel Vadot : USB_CH_TH_PROT_F : : Die temp is below usb charger 47c66ec88fSEmmanuel Vadot : USB_CHARGER_NOT_OKR : : allowed USB charger not ok detection 48c66ec88fSEmmanuel Vadot : VBUS_OVV : : Overvoltage on Vbus ball detected (USB charge is stopped) 49c66ec88fSEmmanuel Vadot : CH_WD_EXP : : Charger watchdog detected 50c66ec88fSEmmanuel Vadotab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter 51c66ec88fSEmmanuel Vadot SW_CONV_END : : 52c66ec88fSEmmanuel Vadotab8500-gpio : : : GPIO Controller (AB8500) 53c66ec88fSEmmanuel Vadotab8505-gpio : : : GPIO Controller (AB8505) 54c66ec88fSEmmanuel Vadotab8500-ponkey : ONKEY_DBF : : Power-on Key 55c66ec88fSEmmanuel Vadot ONKEY_DBR : : 56c66ec88fSEmmanuel Vadotab8500-pwm : : : Pulse Width Modulator 57c66ec88fSEmmanuel Vadotab8500-regulator : : : Regulators (AB8500) 58c66ec88fSEmmanuel Vadotab8505-regulator : : : Regulators (AB8505) 59c66ec88fSEmmanuel Vadotab8500-rtc : 60S : : Real Time Clock 60c66ec88fSEmmanuel Vadot : ALARM : : 61c66ec88fSEmmanuel Vadotab8500-sysctrl : : : System Control 62c66ec88fSEmmanuel Vadotab8500-usb : ID_WAKEUP_R : vddulpivio18 : Universal Serial Bus 63c66ec88fSEmmanuel Vadot : ID_WAKEUP_F : v-ape : 64c66ec88fSEmmanuel Vadot : VBUS_DET_F : musb_1v8 : 65c66ec88fSEmmanuel Vadot : VBUS_DET_R : : 66c66ec88fSEmmanuel Vadot : USB_LINK_STATUS : : 67c66ec88fSEmmanuel Vadot : USB_ADP_PROBE_PLUG : : 68c66ec88fSEmmanuel Vadot : USB_ADP_PROBE_UNPLUG : : 69c66ec88fSEmmanuel Vadot 70c66ec88fSEmmanuel VadotRequired child device properties: 71c66ec88fSEmmanuel Vadot- compatible : "stericsson,ab8500-[bm|btemp|charger|fg|gpadc|gpio|ponkey| 72c66ec88fSEmmanuel Vadot pwm|regulator|rtc|sysctrl|usb]"; 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot A few child devices require ADC channels from the GPADC node. Those follow the 75*82ea1a07SEmmanuel Vadot standard bindings from 76*82ea1a07SEmmanuel Vadot https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml 77*82ea1a07SEmmanuel Vadot and Documentation/devicetree/bindings/iio/adc/adc.yaml 78c66ec88fSEmmanuel Vadot 79c66ec88fSEmmanuel Vadot abx500-temp : io-channels "aux1" and "aux2" for measuring external 80c66ec88fSEmmanuel Vadot temperatures. 81c66ec88fSEmmanuel Vadot ab8500-fg : io-channel "main_bat_v" for measuring main battery voltage, 82c66ec88fSEmmanuel Vadot ab8500-btemp : io-channels "btemp_ball" and "bat_ctrl" for measuring the 83c66ec88fSEmmanuel Vadot battery voltage. 84c66ec88fSEmmanuel Vadot ab8500-charger : io-channels "main_charger_v", "main_charger_c", "vbus_v", 85c66ec88fSEmmanuel Vadot "usb_charger_c" for measuring voltage and current of the 86c66ec88fSEmmanuel Vadot different charging supplies. 87c66ec88fSEmmanuel Vadot 88c66ec88fSEmmanuel VadotOptional child device properties: 89c66ec88fSEmmanuel Vadot- interrupts : contains the device IRQ(s) using the 2-cell format (see above) 90c66ec88fSEmmanuel Vadot- interrupt-names : contains names of IRQ resource in the order in which they were 91c66ec88fSEmmanuel Vadot supplied in the interrupts property 92c66ec88fSEmmanuel Vadot- <supply_name>-supply : contains a phandle to the regulator supply node in Device Tree 93c66ec88fSEmmanuel Vadot 94c66ec88fSEmmanuel VadotNon-standard child device properties: 95c66ec88fSEmmanuel Vadot - Audio CODEC: 96c66ec88fSEmmanuel Vadot - stericsson,amic[1|2]-type-single-ended : Single-ended Analoge Mic (default: differential) 97c66ec88fSEmmanuel Vadot - stericsson,amic1a-bias-vamic2 : Analoge Mic wishes to use a non-standard Vamic 98c66ec88fSEmmanuel Vadot - stericsson,amic1b-bias-vamic2 : Analoge Mic wishes to use a non-standard Vamic 99c66ec88fSEmmanuel Vadot - stericsson,amic2-bias-vamic1 : Analoge Mic wishes to use a non-standard Vamic 100c66ec88fSEmmanuel Vadot - stericsson,earpeice-cmv : Earpeice voltage (only: 950 | 1100 | 1270 | 1580) 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadotab8500 { 103c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500"; 104c66ec88fSEmmanuel Vadot interrupts = <0 40 0x4>; 105c66ec88fSEmmanuel Vadot interrupt-controller; 106c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot ab8500-rtc { 109c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-rtc"; 110c66ec88fSEmmanuel Vadot interrupts = <17 0x4 111c66ec88fSEmmanuel Vadot 18 0x4>; 112c66ec88fSEmmanuel Vadot interrupt-names = "60S", "ALARM"; 113c66ec88fSEmmanuel Vadot }; 114c66ec88fSEmmanuel Vadot 115c66ec88fSEmmanuel Vadot ab8500-gpadc { 116c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-gpadc"; 117c66ec88fSEmmanuel Vadot interrupts = <32 0x4 118c66ec88fSEmmanuel Vadot 39 0x4>; 119c66ec88fSEmmanuel Vadot interrupt-names = "HW_CONV_END", "SW_CONV_END"; 120c66ec88fSEmmanuel Vadot vddadc-supply = <&ab8500_ldo_tvout_reg>; 121c66ec88fSEmmanuel Vadot #address-cells = <1>; 122c66ec88fSEmmanuel Vadot #size-cells = <0>; 123c66ec88fSEmmanuel Vadot #io-channel-cells = <1>; 124c66ec88fSEmmanuel Vadot 125c66ec88fSEmmanuel Vadot /* GPADC channels */ 126c66ec88fSEmmanuel Vadot bat_ctrl: channel@1 { 127c66ec88fSEmmanuel Vadot reg = <0x01>; 128c66ec88fSEmmanuel Vadot }; 129c66ec88fSEmmanuel Vadot btemp_ball: channel@2 { 130c66ec88fSEmmanuel Vadot reg = <0x02>; 131c66ec88fSEmmanuel Vadot }; 132c66ec88fSEmmanuel Vadot main_charger_v: channel@3 { 133c66ec88fSEmmanuel Vadot reg = <0x03>; 134c66ec88fSEmmanuel Vadot }; 135c66ec88fSEmmanuel Vadot acc_detect1: channel@4 { 136c66ec88fSEmmanuel Vadot reg = <0x04>; 137c66ec88fSEmmanuel Vadot }; 138c66ec88fSEmmanuel Vadot acc_detect2: channel@5 { 139c66ec88fSEmmanuel Vadot reg = <0x05>; 140c66ec88fSEmmanuel Vadot }; 141c66ec88fSEmmanuel Vadot adc_aux1: channel@6 { 142c66ec88fSEmmanuel Vadot reg = <0x06>; 143c66ec88fSEmmanuel Vadot }; 144c66ec88fSEmmanuel Vadot adc_aux2: channel@7 { 145c66ec88fSEmmanuel Vadot reg = <0x07>; 146c66ec88fSEmmanuel Vadot }; 147c66ec88fSEmmanuel Vadot main_batt_v: channel@8 { 148c66ec88fSEmmanuel Vadot reg = <0x08>; 149c66ec88fSEmmanuel Vadot }; 150c66ec88fSEmmanuel Vadot vbus_v: channel@9 { 151c66ec88fSEmmanuel Vadot reg = <0x09>; 152c66ec88fSEmmanuel Vadot }; 153c66ec88fSEmmanuel Vadot main_charger_c: channel@a { 154c66ec88fSEmmanuel Vadot reg = <0x0a>; 155c66ec88fSEmmanuel Vadot }; 156c66ec88fSEmmanuel Vadot usb_charger_c: channel@b { 157c66ec88fSEmmanuel Vadot reg = <0x0b>; 158c66ec88fSEmmanuel Vadot }; 159c66ec88fSEmmanuel Vadot bk_bat_v: channel@c { 160c66ec88fSEmmanuel Vadot reg = <0x0c>; 161c66ec88fSEmmanuel Vadot }; 162c66ec88fSEmmanuel Vadot die_temp: channel@d { 163c66ec88fSEmmanuel Vadot reg = <0x0d>; 164c66ec88fSEmmanuel Vadot }; 165c66ec88fSEmmanuel Vadot usb_id: channel@e { 166c66ec88fSEmmanuel Vadot reg = <0x0e>; 167c66ec88fSEmmanuel Vadot }; 168c66ec88fSEmmanuel Vadot xtal_temp: channel@12 { 169c66ec88fSEmmanuel Vadot reg = <0x12>; 170c66ec88fSEmmanuel Vadot }; 171c66ec88fSEmmanuel Vadot vbat_true_meas: channel@13 { 172c66ec88fSEmmanuel Vadot reg = <0x13>; 173c66ec88fSEmmanuel Vadot }; 174c66ec88fSEmmanuel Vadot bat_ctrl_and_ibat: channel@1c { 175c66ec88fSEmmanuel Vadot reg = <0x1c>; 176c66ec88fSEmmanuel Vadot }; 177c66ec88fSEmmanuel Vadot vbat_meas_and_ibat: channel@1d { 178c66ec88fSEmmanuel Vadot reg = <0x1d>; 179c66ec88fSEmmanuel Vadot }; 180c66ec88fSEmmanuel Vadot vbat_true_meas_and_ibat: channel@1e { 181c66ec88fSEmmanuel Vadot reg = <0x1e>; 182c66ec88fSEmmanuel Vadot }; 183c66ec88fSEmmanuel Vadot bat_temp_and_ibat: channel@1f { 184c66ec88fSEmmanuel Vadot reg = <0x1f>; 185c66ec88fSEmmanuel Vadot }; 186c66ec88fSEmmanuel Vadot }; 187c66ec88fSEmmanuel Vadot 188c66ec88fSEmmanuel Vadot ab8500_temp { 189c66ec88fSEmmanuel Vadot compatible = "stericsson,abx500-temp"; 190c66ec88fSEmmanuel Vadot io-channels = <&gpadc 0x06>, 191c66ec88fSEmmanuel Vadot <&gpadc 0x07>; 192c66ec88fSEmmanuel Vadot io-channel-name = "aux1", "aux2"; 193c66ec88fSEmmanuel Vadot }; 194c66ec88fSEmmanuel Vadot 195c66ec88fSEmmanuel Vadot ab8500_battery: ab8500_battery { 196c66ec88fSEmmanuel Vadot stericsson,battery-type = "LIPO"; 197c66ec88fSEmmanuel Vadot thermistor-on-batctrl; 198c66ec88fSEmmanuel Vadot }; 199c66ec88fSEmmanuel Vadot 200c66ec88fSEmmanuel Vadot ab8500_fg { 201c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-fg"; 202c66ec88fSEmmanuel Vadot battery = <&ab8500_battery>; 203c66ec88fSEmmanuel Vadot io-channels = <&gpadc 0x08>; 204c66ec88fSEmmanuel Vadot io-channel-name = "main_bat_v"; 205c66ec88fSEmmanuel Vadot }; 206c66ec88fSEmmanuel Vadot 207c66ec88fSEmmanuel Vadot ab8500_btemp { 208c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-btemp"; 209c66ec88fSEmmanuel Vadot battery = <&ab8500_battery>; 210c66ec88fSEmmanuel Vadot io-channels = <&gpadc 0x02>, 211c66ec88fSEmmanuel Vadot <&gpadc 0x01>; 212c66ec88fSEmmanuel Vadot io-channel-name = "btemp_ball", 213c66ec88fSEmmanuel Vadot "bat_ctrl"; 214c66ec88fSEmmanuel Vadot }; 215c66ec88fSEmmanuel Vadot 216c66ec88fSEmmanuel Vadot ab8500_charger { 217c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-charger"; 218c66ec88fSEmmanuel Vadot battery = <&ab8500_battery>; 219c66ec88fSEmmanuel Vadot vddadc-supply = <&ab8500_ldo_tvout_reg>; 220c66ec88fSEmmanuel Vadot io-channels = <&gpadc 0x03>, 221c66ec88fSEmmanuel Vadot <&gpadc 0x0a>, 222c66ec88fSEmmanuel Vadot <&gpadc 0x09>, 223c66ec88fSEmmanuel Vadot <&gpadc 0x0b>; 224c66ec88fSEmmanuel Vadot io-channel-name = "main_charger_v", 225c66ec88fSEmmanuel Vadot "main_charger_c", 226c66ec88fSEmmanuel Vadot "vbus_v", 227c66ec88fSEmmanuel Vadot "usb_charger_c"; 228c66ec88fSEmmanuel Vadot }; 229c66ec88fSEmmanuel Vadot 230c66ec88fSEmmanuel Vadot ab8500-usb { 231c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-usb"; 232c66ec88fSEmmanuel Vadot interrupts = < 90 0x4 233c66ec88fSEmmanuel Vadot 96 0x4 234c66ec88fSEmmanuel Vadot 14 0x4 235c66ec88fSEmmanuel Vadot 15 0x4 236c66ec88fSEmmanuel Vadot 79 0x4 237c66ec88fSEmmanuel Vadot 74 0x4 238c66ec88fSEmmanuel Vadot 75 0x4>; 239c66ec88fSEmmanuel Vadot interrupt-names = "ID_WAKEUP_R", 240c66ec88fSEmmanuel Vadot "ID_WAKEUP_F", 241c66ec88fSEmmanuel Vadot "VBUS_DET_F", 242c66ec88fSEmmanuel Vadot "VBUS_DET_R", 243c66ec88fSEmmanuel Vadot "USB_LINK_STATUS", 244c66ec88fSEmmanuel Vadot "USB_ADP_PROBE_PLUG", 245c66ec88fSEmmanuel Vadot "USB_ADP_PROBE_UNPLUG"; 246c66ec88fSEmmanuel Vadot vddulpivio18-supply = <&ab8500_ldo_intcore_reg>; 247c66ec88fSEmmanuel Vadot v-ape-supply = <&db8500_vape_reg>; 248c66ec88fSEmmanuel Vadot musb_1v8-supply = <&db8500_vsmps2_reg>; 249c66ec88fSEmmanuel Vadot }; 250c66ec88fSEmmanuel Vadot 251c66ec88fSEmmanuel Vadot ab8500-ponkey { 252c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-ponkey"; 253c66ec88fSEmmanuel Vadot interrupts = <6 0x4 254c66ec88fSEmmanuel Vadot 7 0x4>; 255c66ec88fSEmmanuel Vadot interrupt-names = "ONKEY_DBF", "ONKEY_DBR"; 256c66ec88fSEmmanuel Vadot }; 257c66ec88fSEmmanuel Vadot 258c66ec88fSEmmanuel Vadot ab8500-sysctrl { 259c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-sysctrl"; 260c66ec88fSEmmanuel Vadot }; 261c66ec88fSEmmanuel Vadot 262c66ec88fSEmmanuel Vadot ab8500-pwm { 263c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-pwm"; 264c66ec88fSEmmanuel Vadot }; 265c66ec88fSEmmanuel Vadot 266c66ec88fSEmmanuel Vadot codec: ab8500-codec { 267c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-codec"; 268c66ec88fSEmmanuel Vadot 269c66ec88fSEmmanuel Vadot stericsson,earpeice-cmv = <950>; /* Units in mV. */ 270c66ec88fSEmmanuel Vadot }; 271c66ec88fSEmmanuel Vadot 272c66ec88fSEmmanuel Vadot ab8500-regulators { 273c66ec88fSEmmanuel Vadot compatible = "stericsson,ab8500-regulator"; 274c66ec88fSEmmanuel Vadot 275c66ec88fSEmmanuel Vadot ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 276c66ec88fSEmmanuel Vadot /* 277c66ec88fSEmmanuel Vadot * See: Documentation/devicetree/bindings/regulator/regulator.txt 278c66ec88fSEmmanuel Vadot * for more information on regulators 279c66ec88fSEmmanuel Vadot */ 280c66ec88fSEmmanuel Vadot }; 281c66ec88fSEmmanuel Vadot }; 282c66ec88fSEmmanuel Vadot}; 283