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