forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/Documentation/devicetree/bindings/mfd/ab8500.txt
....@@ -1,7 +1,7 @@
11 * AB8500 Multi-Functional Device (MFD)
22
33 Required parent device properties:
4
-- compatible : contains "stericsson,ab8500";
4
+- compatible : contains "stericsson,ab8500" or "stericsson,ab8505";
55 - interrupts : contains the IRQ line for the AB8500
66 - interrupt-controller : describes the AB8500 as an Interrupt Controller (has its own domain)
77 - #interrupt-cells : should be 2, for 2-cell format
....@@ -31,8 +31,8 @@
3131 : BAT_CTRL_INDB : : Battery Removal Indicator
3232 : BTEMP_LOW : : Btemp < BtempLow, if battery temperature is lower than -10°C
3333 : 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
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
3636 ab8500-charger : : vddadc : Charger interface
3737 : MAIN_CH_UNPLUG_DET : : main charger unplug detection management (not in 8505)
3838 : MAIN_CHARGE_PLUG_DET : : main charger plug detection management (not in 8505)
....@@ -49,11 +49,13 @@
4949 : CH_WD_EXP : : Charger watchdog detected
5050 ab8500-gpadc : HW_CONV_END : vddadc : Analogue to Digital Converter
5151 SW_CONV_END : :
52
-ab8500-gpio : : : GPIO Controller
52
+ab8500-gpio : : : GPIO Controller (AB8500)
53
+ab8505-gpio : : : GPIO Controller (AB8505)
5354 ab8500-ponkey : ONKEY_DBF : : Power-on Key
5455 ONKEY_DBR : :
5556 ab8500-pwm : : : Pulse Width Modulator
56
-ab8500-regulator : : : Regulators
57
+ab8500-regulator : : : Regulators (AB8500)
58
+ab8505-regulator : : : Regulators (AB8505)
5759 ab8500-rtc : 60S : : Real Time Clock
5860 : ALARM : :
5961 ab8500-sysctrl : : : System Control
....@@ -68,6 +70,18 @@
6870 Required child device properties:
6971 - compatible : "stericsson,ab8500-[bm|btemp|charger|fg|gpadc|gpio|ponkey|
7072 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 iio/iio-bindings.txt and iio/adc/adc.txt
76
+
77
+ abx500-temp : io-channels "aux1" and "aux2" for measuring external
78
+ temperatures.
79
+ ab8500-fg : io-channel "main_bat_v" for measuring main battery voltage,
80
+ ab8500-btemp : io-channels "btemp_ball" and "bat_ctrl" for measuring the
81
+ battery voltage.
82
+ ab8500-charger : io-channels "main_charger_v", "main_charger_c", "vbus_v",
83
+ "usb_charger_c" for measuring voltage and current of the
84
+ different charging supplies.
7185
7286 Optional child device properties:
7387 - interrupts : contains the device IRQ(s) using the 2-cell format (see above)
....@@ -102,8 +116,115 @@
102116 39 0x4>;
103117 interrupt-names = "HW_CONV_END", "SW_CONV_END";
104118 vddadc-supply = <&ab8500_ldo_tvout_reg>;
119
+ #address-cells = <1>;
120
+ #size-cells = <0>;
121
+ #io-channel-cells = <1>;
122
+
123
+ /* GPADC channels */
124
+ bat_ctrl: channel@1 {
125
+ reg = <0x01>;
126
+ };
127
+ btemp_ball: channel@2 {
128
+ reg = <0x02>;
129
+ };
130
+ main_charger_v: channel@3 {
131
+ reg = <0x03>;
132
+ };
133
+ acc_detect1: channel@4 {
134
+ reg = <0x04>;
135
+ };
136
+ acc_detect2: channel@5 {
137
+ reg = <0x05>;
138
+ };
139
+ adc_aux1: channel@6 {
140
+ reg = <0x06>;
141
+ };
142
+ adc_aux2: channel@7 {
143
+ reg = <0x07>;
144
+ };
145
+ main_batt_v: channel@8 {
146
+ reg = <0x08>;
147
+ };
148
+ vbus_v: channel@9 {
149
+ reg = <0x09>;
150
+ };
151
+ main_charger_c: channel@a {
152
+ reg = <0x0a>;
153
+ };
154
+ usb_charger_c: channel@b {
155
+ reg = <0x0b>;
156
+ };
157
+ bk_bat_v: channel@c {
158
+ reg = <0x0c>;
159
+ };
160
+ die_temp: channel@d {
161
+ reg = <0x0d>;
162
+ };
163
+ usb_id: channel@e {
164
+ reg = <0x0e>;
165
+ };
166
+ xtal_temp: channel@12 {
167
+ reg = <0x12>;
168
+ };
169
+ vbat_true_meas: channel@13 {
170
+ reg = <0x13>;
171
+ };
172
+ bat_ctrl_and_ibat: channel@1c {
173
+ reg = <0x1c>;
174
+ };
175
+ vbat_meas_and_ibat: channel@1d {
176
+ reg = <0x1d>;
177
+ };
178
+ vbat_true_meas_and_ibat: channel@1e {
179
+ reg = <0x1e>;
180
+ };
181
+ bat_temp_and_ibat: channel@1f {
182
+ reg = <0x1f>;
183
+ };
105184 };
106185
186
+ ab8500_temp {
187
+ compatible = "stericsson,abx500-temp";
188
+ io-channels = <&gpadc 0x06>,
189
+ <&gpadc 0x07>;
190
+ io-channel-name = "aux1", "aux2";
191
+ };
192
+
193
+ ab8500_battery: ab8500_battery {
194
+ stericsson,battery-type = "LIPO";
195
+ thermistor-on-batctrl;
196
+ };
197
+
198
+ ab8500_fg {
199
+ compatible = "stericsson,ab8500-fg";
200
+ battery = <&ab8500_battery>;
201
+ io-channels = <&gpadc 0x08>;
202
+ io-channel-name = "main_bat_v";
203
+ };
204
+
205
+ ab8500_btemp {
206
+ compatible = "stericsson,ab8500-btemp";
207
+ battery = <&ab8500_battery>;
208
+ io-channels = <&gpadc 0x02>,
209
+ <&gpadc 0x01>;
210
+ io-channel-name = "btemp_ball",
211
+ "bat_ctrl";
212
+ };
213
+
214
+ ab8500_charger {
215
+ compatible = "stericsson,ab8500-charger";
216
+ battery = <&ab8500_battery>;
217
+ vddadc-supply = <&ab8500_ldo_tvout_reg>;
218
+ io-channels = <&gpadc 0x03>,
219
+ <&gpadc 0x0a>,
220
+ <&gpadc 0x09>,
221
+ <&gpadc 0x0b>;
222
+ io-channel-name = "main_charger_v",
223
+ "main_charger_c",
224
+ "vbus_v",
225
+ "usb_charger_c";
226
+ };
227
+
107228 ab8500-usb {
108229 compatible = "stericsson,ab8500-usb";
109230 interrupts = < 90 0x4