summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/mfd/ab8500.txt
blob: b6bc30d7777e7b29df19e2196870614fd064446b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
* AB8500 Multi-Functional Device (MFD)

Required parent device properties:
- compatible             : contains "stericsson,ab8500";
- interrupts             : contains the IRQ line for the AB8500
- interrupt-controller   : describes the AB8500 as an Interrupt Controller (has its own domain)
- #interrupt-cells       : should be 2, for 2-cell format
                            - The first cell is the AB8500 local IRQ number
                            - The second cell is used to specify optional parameters
                              - bits[3:0] trigger type and level flags:
                                  1 = low-to-high edge triggered
                                  2 = high-to-low edge triggered
                                  4 = active high level-sensitive
                                  8 = active low level-sensitive

The AB8500 consists of a large and varied group of sub-devices:

Device                     IRQ Names              Supply Names   Description
------                     ---------              ------------   -----------
ab8500-bm                :                      :              : Battery Manager
ab8500-btemp             :                      :              : Battery Temperature
ab8500-charger           :                      :              : Battery Charger
ab8500-codec             :                      :              : Audio Codec
ab8500-fg                : 			: vddadc       : Fuel Gauge
			 : NCONV_ACCU           :	       : Accumulate N Sample Conversion
			 : BATT_OVV		:	       : Battery Over Voltage
			 : LOW_BAT_F		:	       : LOW threshold battery voltage
			 : CC_INT_CALIB		:	       : Coulomb Counter Internal Calibration
			 : CCEOC		:	       : Coulomb Counter End of Conversion
ab8500-btemp		 :			: vtvout       : Battery Temperature
			 : BAT_CTRL_INDB        :              : Battery Removal Indicator
			 : BTEMP_LOW            :              : Btemp < BtempLow, if battery temperature is lower than -10°C
			 : BTEMP_LOW_MEDIUM     :              : BtempLow < Btemp < BtempMedium,if battery temperature is between -10 and 0°C
			 : BTEMP_MEDIUM_HIGH    :	       : BtempMedium < Btemp < BtempHigh,if battery temperature is between 0°C and“MaxTemp
			 : BTEMP_HIGH           :              : Btemp > BtempHigh, if battery temperature is higher than “MaxTemp
ab8500-charger		 :			: vddadc       : Charger interface
			 : MAIN_CH_UNPLUG_DET	:	       : main charger unplug detection management (not in 8505)
			 : MAIN_CHARGE_PLUG_DET	:	       : main charger plug detection management (not in 8505)
			 : MAIN_EXT_CH_NOT_OK	:	       : main charger not OK
			 : MAIN_CH_TH_PROT_R	:	       : Die temp is above main charger
			 : MAIN_CH_TH_PROT_F	:	       : Die temp is below main charger
			 : VBUS_DET_F		:	       : VBUS falling detected
			 : VBUS_DET_R		:	       : VBUS rising detected
			 : USB_LINK_STATUS	:	       : USB link status has changed
			 : USB_CH_TH_PROT_R	:	       : Die temp is above usb charger
			 : USB_CH_TH_PROT_F	:	       : Die temp is below usb charger
			 : USB_CHARGER_NOT_OKR	:	       : allowed USB charger not ok detection
			 : VBUS_OVV		:	       : Overvoltage on Vbus ball detected (USB charge is stopped)
			 : CH_WD_EXP		:	       : Charger watchdog detected
ab8500-gpadc             : HW_CONV_END          : vddadc       : Analogue to Digital Converter
                           SW_CONV_END          :              :
ab8500-gpio              :                      :              : GPIO Controller
ab8500-ponkey            : ONKEY_DBF            :              : Power-on Key
                           ONKEY_DBR            :              :
ab8500-pwm               :                      :              : Pulse Width Modulator
ab8500-regulator         :                      :              : Regulators
ab8500-rtc               : 60S                  :              : Real Time Clock
                         : ALARM                :              :
ab8500-sysctrl           :                      :              : System Control
ab8500-usb               : ID_WAKEUP_R          : vddulpivio18 : Universal Serial Bus
                         : ID_WAKEUP_F          : v-ape        :
                         : VBUS_DET_F           : musb_1v8     :
                         : VBUS_DET_R           :              :
                         : USB_LINK_STATUS      :              :
                         : USB_ADP_PROBE_PLUG   :              :
                         : USB_ADP_PROBE_UNPLUG :              :

Required child device properties:
- compatible             : "stericsson,ab8500-[bm|btemp|charger|fg|gpadc|gpio|ponkey|
                                               pwm|regulator|rtc|sysctrl|usb]";

  A few child devices require ADC channels from the GPADC node. Those follow the
  standard bindings from iio/iio-bindings.txt and iio/adc/adc.txt

  abx500-temp		 : io-channels "aux1" and "aux2" for measuring external
			   temperatures.
  ab8500-fg		 : io-channel "main_bat_v" for measuring main battery voltage,
  ab8500-btemp		 : io-channels "btemp_ball" and "bat_ctrl" for measuring the
			   battery voltage.
  ab8500-charger	 : io-channels "main_charger_v", "main_charger_c", "vbus_v",
			   "usb_charger_c" for measuring voltage and current of the
			   different charging supplies.

Optional child device properties:
- interrupts             : contains the device IRQ(s) using the 2-cell format (see above)
- interrupt-names        : contains names of IRQ resource in the order in which they were
                           supplied in the interrupts property
- <supply_name>-supply   : contains a phandle to the regulator supply node in Device Tree

Non-standard child device properties:
 - Audio CODEC:
   - stericsson,amic[1|2]-type-single-ended : Single-ended Analoge Mic (default: differential)
   - stericsson,amic1a-bias-vamic2          : Analoge Mic wishes to use a non-standard Vamic
   - stericsson,amic1b-bias-vamic2          : Analoge Mic wishes to use a non-standard Vamic
   - stericsson,amic2-bias-vamic1           : Analoge Mic wishes to use a non-standard Vamic
   - stericsson,earpeice-cmv                : Earpeice voltage (only: 950 | 1100 | 1270 | 1580)

ab8500 {
         compatible = "stericsson,ab8500";
         interrupts = <0 40 0x4>;
         interrupt-controller;
         #interrupt-cells = <2>;

         ab8500-rtc {
                 compatible = "stericsson,ab8500-rtc";
                 interrupts = <17 0x4
                               18 0x4>;
                 interrupt-names = "60S", "ALARM";
         };

        ab8500-gpadc {
                compatible = "stericsson,ab8500-gpadc";
                interrupts = <32 0x4
                              39 0x4>;
                interrupt-names = "HW_CONV_END", "SW_CONV_END";
                vddadc-supply = <&ab8500_ldo_tvout_reg>;
		#address-cells = <1>;
		#size-cells = <0>;
		#io-channel-cells = <1>;

		/* GPADC channels */
		bat_ctrl: channel@1 {
			reg = <0x01>;
		};
		btemp_ball: channel@2 {
			reg = <0x02>;
		};
		main_charger_v: channel@3 {
			reg = <0x03>;
		};
		acc_detect1: channel@4 {
			reg = <0x04>;
		};
		acc_detect2: channel@5 {
			reg = <0x05>;
		};
		adc_aux1: channel@6 {
			reg = <0x06>;
		};
		adc_aux2: channel@7 {
			reg = <0x07>;
		};
		main_batt_v: channel@8 {
			reg = <0x08>;
		};
		vbus_v: channel@9 {
			reg = <0x09>;
		};
		main_charger_c: channel@a {
			reg = <0x0a>;
		};
		usb_charger_c: channel@b {
			reg = <0x0b>;
		};
		bk_bat_v: channel@c {
			reg = <0x0c>;
		};
		die_temp: channel@d {
			reg = <0x0d>;
		};
		usb_id: channel@e {
			reg = <0x0e>;
		};
		xtal_temp: channel@12 {
			reg = <0x12>;
		};
		vbat_true_meas: channel@13 {
			reg = <0x13>;
		};
		bat_ctrl_and_ibat: channel@1c {
			reg = <0x1c>;
		};
		vbat_meas_and_ibat: channel@1d {
			reg = <0x1d>;
		};
		vbat_true_meas_and_ibat: channel@1e {
			reg = <0x1e>;
		};
		bat_temp_and_ibat: channel@1f {
			reg = <0x1f>;
		};
        };

	ab8500_temp {
		compatible = "stericsson,abx500-temp";
		io-channels = <&gpadc 0x06>,
			      <&gpadc 0x07>;
		io-channel-name = "aux1", "aux2";
	};

	ab8500_battery: ab8500_battery {
		stericsson,battery-type = "LIPO";
		thermistor-on-batctrl;
	};

	ab8500_fg {
		compatible = "stericsson,ab8500-fg";
		battery	   = <&ab8500_battery>;
		io-channels = <&gpadc 0x08>;
		io-channel-name = "main_bat_v";
	};

	ab8500_btemp {
		compatible = "stericsson,ab8500-btemp";
		battery	   = <&ab8500_battery>;
		io-channels = <&gpadc 0x02>,
			      <&gpadc 0x01>;
		io-channel-name = "btemp_ball",
				"bat_ctrl";
	};

	ab8500_charger {
		compatible	= "stericsson,ab8500-charger";
		battery		= <&ab8500_battery>;
		vddadc-supply	= <&ab8500_ldo_tvout_reg>;
		io-channels = <&gpadc 0x03>,
			      <&gpadc 0x0a>,
			      <&gpadc 0x09>,
			      <&gpadc 0x0b>;
		io-channel-name = "main_charger_v",
				"main_charger_c",
				"vbus_v",
				"usb_charger_c";
	};

        ab8500-usb {
                compatible = "stericsson,ab8500-usb";
                interrupts = < 90 0x4
                               96 0x4
                               14 0x4
                               15 0x4
                               79 0x4
                               74 0x4
                               75 0x4>;
                interrupt-names = "ID_WAKEUP_R",
                                  "ID_WAKEUP_F",
                                  "VBUS_DET_F",
                                  "VBUS_DET_R",
                                  "USB_LINK_STATUS",
                                  "USB_ADP_PROBE_PLUG",
                                  "USB_ADP_PROBE_UNPLUG";
                vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
                v-ape-supply = <&db8500_vape_reg>;
                musb_1v8-supply = <&db8500_vsmps2_reg>;
        };

        ab8500-ponkey {
                compatible = "stericsson,ab8500-ponkey";
                interrupts = <6 0x4
                              7 0x4>;
                interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
        };

        ab8500-sysctrl {
                compatible = "stericsson,ab8500-sysctrl";
        };

        ab8500-pwm {
                compatible = "stericsson,ab8500-pwm";
        };

	codec: ab8500-codec {
		compatible = "stericsson,ab8500-codec";

		stericsson,earpeice-cmv = <950>; /* Units in mV. */
	};

        ab8500-regulators {
                compatible = "stericsson,ab8500-regulator";

                ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
                        /*
                         * See: Documentation/devicetree/bindings/regulator/regulator.txt
                         * for more information on regulators
                         */
                };
        };
};