Commit 70016ef0 authored by Linus Walleij's avatar Linus Walleij

ARM: dts: ux500: declare GPADC IIO ADC channels

This adds the IIO channels for the GPADC after converting it
to using the standard IIO ADC bindings and moving the driver
over to the IIO subsystem. We also add IIO hwmon standard
driver node to support reading channels in a standard manner.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e42617b8
......@@ -6,6 +6,20 @@
#include <dt-bindings/clock/ste-ab8500.h>
/ {
/* Essential housekeeping hardware monitors */
iio-hwmon {
compatible = "iio-hwmon";
io-channels = <&gpadc 0x02>, /* Battery temperature */
<&gpadc 0x03>, /* Main charger voltage */
<&gpadc 0x08>, /* Main battery voltage */
<&gpadc 0x09>, /* VBUS */
<&gpadc 0x0a>, /* Main charger current */
<&gpadc 0x0b>, /* USB charger current */
<&gpadc 0x0c>, /* Backup battery voltage */
<&gpadc 0x0d>, /* Die temperature */
<&gpadc 0x12>; /* Crystal temperature */
};
soc {
prcmu@80157000 {
ab8500 {
......@@ -33,12 +47,84 @@ ab8500-rtc {
interrupt-names = "60S", "ALARM";
};
ab8500-gpadc {
gpadc: ab8500-gpadc {
compatible = "stericsson,ab8500-gpadc";
interrupts = <32 IRQ_TYPE_LEVEL_HIGH
39 IRQ_TYPE_LEVEL_HIGH>;
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@01 {
reg = <0x01>;
};
btemp_ball: channel@02 {
reg = <0x02>;
};
main_charger_v: channel@03 {
reg = <0x03>;
};
acc_detect1: channel@04 {
reg = <0x04>;
};
acc_detect2: channel@05 {
reg = <0x05>;
};
adc_aux1: channel@06 {
reg = <0x06>;
};
adc_aux2: channel@07 {
reg = <0x07>;
};
main_batt_v: channel@08 {
reg = <0x08>;
};
vbus_v: channel@09 {
reg = <0x09>;
};
main_charger_c: channel@0a {
reg = <0x0a>;
};
usb_charger_c: channel@0b {
reg = <0x0b>;
};
bk_bat_v: channel@0c {
reg = <0x0c>;
};
die_temp: channel@0d {
reg = <0x0d>;
};
usb_id: channel@0e {
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 {
......@@ -49,17 +135,31 @@ ab8500_battery: ab8500_battery {
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_chargalg {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment