meta-zaius: phosphor-hwmon: add iio-hwmon confs
The zaius device tree specifies two groups of iio-hwmon adc sensors split
into a primary set and a secondary set. This adds the phosphor-hwmon
configuration for each.
(From meta-ingrasys rev: f87d0f0897c8493cd93ad3d662ccb421ae7a95d0)
Change-Id: I7fd2d2f744082d397b88d4ce4dff06a9dcc1e40b
Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend b/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
index f7e8cd5..de6dff1 100644
--- a/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
+++ b/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
@@ -4,6 +4,7 @@
ZAIUS_ITEMSFMT = "ahb/apb/{0}.conf"
ZAIUS_ITEMS = "${@compose_list(d, 'ZAIUS_ITEMSFMT', 'ZAIUS_CHIPS')}"
+ZAIUS_ITEMS += "iio-hwmon.conf iio-hwmon-battery.conf"
ZAIUS_OCCS = " \
00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
diff --git a/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/iio-hwmon-battery.conf b/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/iio-hwmon-battery.conf
new file mode 100644
index 0000000..172fb20
--- /dev/null
+++ b/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/iio-hwmon-battery.conf
@@ -0,0 +1,7 @@
+LABEL_in1=vbat
+GAIN_in1=2.30
+# The battery read is controlled by P2
+GPIOCHIP_in1=0
+GPIO_in1=122
+# Sleep in microseconds (stored into a uint64_t)
+INTERVAL=86400000000
diff --git a/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/iio-hwmon.conf b/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/iio-hwmon.conf
new file mode 100644
index 0000000..c7e2eed
--- /dev/null
+++ b/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/phosphor-hwmon%/obmc/hwmon/iio-hwmon.conf
@@ -0,0 +1,24 @@
+LABEL_in1=p5v_aux
+GAIN_in1=4.30
+LABEL_in2=p2v5_aux
+GAIN_in2=2.00
+LABEL_in3=p3v3_aux
+GAIN_in3=2.47
+LABEL_in4=p1v1_aux
+LABEL_in5=cpu0_vpp1
+GAIN_in5=2.00
+LABEL_in6=cpu0_vpp2
+GAIN_in6=2.00
+LABEL_in7=cpu1_vpp1
+GAIN_in7=2.00
+LABEL_in8=cpu1_vpp2
+GAIN_in8=2.00
+LABEL_in9=cpu0_vddq1
+LABEL_in10=cpu0_vddq2
+LABEL_in11=cpu1_vddq1
+LABEL_in12=cpu1_vddq2
+LABEL_in13=p1v2_aux
+LABEL_in14=vendor_id
+LABEL_in15=board_id
+# Sleep in microseconds (stored into a uint64_t)
+INTERVAL=86400000000