meta-quanta: q71l: add psus to dbus
Add the PSUs to dbus.
Change-Id: I1d8ddfb70f4ffe6a6890d2628cd231da9b39fbb9
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@0/psu@59.conf b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@0/psu@59.conf
new file mode 100644
index 0000000..3416d32
--- /dev/null
+++ b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@0/psu@59.conf
@@ -0,0 +1,15 @@
+# PSU4
+LABEL_in1=psu4_vin
+LABEL_curr1=psu4_iin
+LABEL_power1=psu4_pin
+LABEL_in2=psu4_vout
+#GAIN_in2=0.001953125
+#GAIN is only required for AC PSUs.
+LABEL_curr2=psu4_iout
+LABEL_power2=psu4_pout
+LABEL_temp1=psu4_temp1
+LABEL_temp2=psu4_temp2
+LABEL_temp3=psu4_temp3
+LABEL_fan1=psu4_fan
+# 1 minute interval
+INTERVAL=60000000
diff --git a/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@1/psu@58.conf b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@1/psu@58.conf
new file mode 100644
index 0000000..261a0b0
--- /dev/null
+++ b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@1/psu@58.conf
@@ -0,0 +1,15 @@
+# PSU1
+LABEL_in1=psu1_vin
+LABEL_curr1=psu1_iin
+LABEL_power1=psu1_pin
+LABEL_in2=psu1_vout
+#GAIN_in2=0.001953125
+#GAIN only required for AC PSUs.
+LABEL_curr2=psu1_iout
+LABEL_power2=psu1_pout
+LABEL_temp1=psu1_temp1
+LABEL_temp2=psu1_temp2
+LABEL_temp3=psu1_temp3
+LABEL_fan1=psu1_fan
+# 1 minute interval
+INTERVAL=60000000
diff --git a/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@2/psu@58.conf b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@2/psu@58.conf
new file mode 100644
index 0000000..8749d4a
--- /dev/null
+++ b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@2/psu@58.conf
@@ -0,0 +1,15 @@
+# PSU3
+LABEL_in1=psu3_vin
+LABEL_curr1=psu3_iin
+LABEL_power1=psu3_pin
+LABEL_in2=psu3_vout
+#GAIN_in2=0.001953125
+#GAIN only required for AC PSUs
+LABEL_curr2=psu3_iout
+LABEL_power2=psu3_pout
+LABEL_temp1=psu3_temp1
+LABEL_temp2=psu3_temp2
+LABEL_temp3=psu3_temp3
+LABEL_fan1=psu3_fan
+# 1 minute interval
+INTERVAL=60000000
diff --git a/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@3/psu@59.conf b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@3/psu@59.conf
new file mode 100644
index 0000000..9a314f7
--- /dev/null
+++ b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@3/psu@59.conf
@@ -0,0 +1,15 @@
+# PSU2
+LABEL_in1=psu2_vin
+LABEL_curr1=psu2_iin
+LABEL_power1=psu2_pin
+LABEL_in2=psu2_vout
+#GAIN_in2=0.001953125
+#GAIN is only required for AC PSUs.
+LABEL_curr2=psu2_iout
+LABEL_power2=psu2_pout
+LABEL_temp1=psu2_temp1
+LABEL_temp2=psu2_temp2
+LABEL_temp3=psu2_temp3
+LABEL_fan1=psu2_fan
+# 1 minute interval
+INTERVAL=60000000
diff --git a/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
index 6c36686..577fa64 100644
--- a/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
+++ b/meta-q71l/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
@@ -16,6 +16,10 @@
Q71L_ITEMS += "iio-hwmon.conf"
Q71L_ITEMS += "iio-hwmon-battery.conf"
+Q71L_PSUS = "0/psu@59 1/psu@58 2/psu@58 3/psu@59"
+Q71L_PSUBASE = "ahb/apb/i2c@1e78a000/i2c-bus@300/i2c-switch@70/i2c@{0}.conf"
+Q71L_ITEMS += "${@compose_list(d, 'Q71L_PSUBASE', 'Q71L_PSUS')}"
+
ENVS = "obmc/hwmon/{0}"
SYSTEMD_ENVIRONMENT_FILE_${PN}_append_quanta-q71l := " ${@compose_list(d, 'ENVS', 'Q71L_ITEMS')}"