meta-on5263m5: Add sensor configs

tmp421 tmp112 adm1278 adc fan-tach

Tested: Build on5263m5 board and load on the target hardware

(From meta-inspur rev: cfb537ae3d5d9f4e0ca922880752dbf472cb6801)

Change-Id: Ide9f3ea2314f518c2381b2258dbe97af04d14a9e
Signed-off-by: John Wang <wangzqbj@inspur.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@1c0/tmp112@48.conf b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@1c0/tmp112@48.conf
new file mode 100644
index 0000000..eebfaed
--- /dev/null
+++ b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@1c0/tmp112@48.conf
@@ -0,0 +1,5 @@
+LABEL_temp1 = "inlet"
+WARNHI_temp1 = "60000"
+WARNLO_temp1 = "0"
+CRITHI_temp1 = "70000"
+CRITLO_temp1 = "0"
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@1c0/tmp421@4e.conf b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@1c0/tmp421@4e.conf
new file mode 100644
index 0000000..f2bf06d
--- /dev/null
+++ b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@1c0/tmp421@4e.conf
@@ -0,0 +1,7 @@
+LABEL_temp1 = "outlet"
+CRITLO_temp1 = "0"
+CRITHI_temp1 = "100000"
+
+LABEL_temp2 = "outlet2"
+CRITLO_temp2 = "0"
+CRITHI_temp2 = "100000"
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/adm1278@11.conf b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/adm1278@11.conf
new file mode 100644
index 0000000..b6da9d7
--- /dev/null
+++ b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@300/adm1278@11.conf
@@ -0,0 +1,4 @@
+LABEL_in1 = "vin"
+LABEL_in2 = "vout"
+LABEL_curr1 = "iout1"
+LABEL_power1 = "pin"
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf
new file mode 100644
index 0000000..1523539
--- /dev/null
+++ b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf
@@ -0,0 +1,9 @@
+LABEL_fan1 = "fan0"
+LABEL_fan2 = "fan1"
+LABEL_fan3 = "fan2"
+LABEL_fan4 = "fan3"
+
+PWM_TARGET_fan1 = "1"
+PWM_TARGET_fan2 = "1"
+PWM_TARGET_fan3 = "2"
+PWM_TARGET_fan4 = "2"
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon.conf b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon.conf
new file mode 100644
index 0000000..fba435e
--- /dev/null
+++ b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/iio-hwmon.conf
@@ -0,0 +1,8 @@
+LABEL_in1="P3V3"
+GAIN_in1 = 2.0
+LABEL_in2="P5V"
+GAIN_in2 = 3.7
+LABEL_in3="P12V_STBY"
+GAIN_in3 = 9.2
+LABEL_in4="P1V05"
+LABEL_in5="PVNN"
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
new file mode 100644
index 0000000..74695bf
--- /dev/null
+++ b/meta-inspur/meta-on5263m5/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend
@@ -0,0 +1,19 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+EXTRA_OECONF_append_on5263m5= " --enable-negative-errno-on-fail"
+
+CHIPS = " \
+        i2c@1e78a000/i2c-bus@1c0/tmp112@48 \
+        i2c@1e78a000/i2c-bus@1c0/tmp421@4e \
+        i2c@1e78a000/i2c-bus@300/adm1278@11 \
+        pwm-tacho-controller@1e786000 \
+        "
+ITEMSFMT = "ahb/apb/{0}.conf"
+
+ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
+
+ITEMS += "iio-hwmon.conf"
+
+
+ENVS = "obmc/hwmon/{0}"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'ITEMS')}"