phosphor-ipmi-host: Create system-specific hardcoded.yaml file

Witherspoon has 2-rotor fans, while Swift has single-rotor fans.
Move the sensors for the 2nd rotor to a witherspoon yaml file.
In the future, any system-specific sensors can be added to the
witherspoon/swift_hardcoded.yaml file

Tested: Built swift and witherspoon and verified only witherspoon
        had the new witherspoon_hwmon_sensors.hardcoded.yaml in the
        build directory.

Change-Id: Ie9d0719b17eaa6a3e6cb9457deca32f7f727e546
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/hwmon_sensors.hardcoded.yaml b/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/hwmon_sensors.hardcoded.yaml
index f81159c..8e0634f 100644
--- a/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/hwmon_sensors.hardcoded.yaml
+++ b/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/hwmon_sensors.hardcoded.yaml
@@ -20,28 +20,6 @@
           0xFF:

             type: int64_t

 

-0xde:

-  entityID: 0x1D

-  entityInstance: 2

-  sensorType: 0x04

-  path: /xyz/openbmc_project/sensors/fan_tach/fan0_1

-  sensorReadingType: 0x01

-  multiplierM: 100

-  offsetB: 0

-  bExp: 0

-  rExp: 0

-  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

-  scale: 0

-  serviceInterface: org.freedesktop.DBus.Properties

-  readingType: readingData

-  sensorNamePattern: nameLeaf

-  interfaces:

-    xyz.openbmc_project.Sensor.Value:

-      Value:

-        Offsets:

-          0xFF:

-            type: int64_t

-

 0xdf:

   entityID: 0x1D

   entityInstance: 3

@@ -64,28 +42,6 @@
           0xFF:

             type: int64_t

 

-0xe2:

-  entityID: 0x1D

-  entityInstance: 4

-  sensorType: 0x04

-  path: /xyz/openbmc_project/sensors/fan_tach/fan1_1

-  sensorReadingType: 0x01

-  multiplierM: 100

-  offsetB: 0

-  bExp: 0

-  rExp: 0

-  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

-  scale: 0

-  serviceInterface: org.freedesktop.DBus.Properties

-  readingType: readingData

-  sensorNamePattern: nameLeaf

-  interfaces:

-    xyz.openbmc_project.Sensor.Value:

-      Value:

-        Offsets:

-          0xFF:

-            type: int64_t

-

 0xe3:

   entityID: 0x1D

   entityInstance: 5

@@ -108,28 +64,6 @@
           0xFF:

             type: int64_t

 

-0xe4:

-  entityID: 0x1D

-  entityInstance: 6

-  sensorType: 0x04

-  path: /xyz/openbmc_project/sensors/fan_tach/fan2_1

-  sensorReadingType: 0x01

-  multiplierM: 100

-  offsetB: 0

-  bExp: 0

-  rExp: 0

-  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

-  scale: 0

-  serviceInterface: org.freedesktop.DBus.Properties

-  readingType: readingData

-  sensorNamePattern: nameLeaf

-  interfaces:

-    xyz.openbmc_project.Sensor.Value:

-      Value:

-        Offsets:

-          0xFF:

-            type: int64_t

-

 0xe5:

   entityID: 0x1D

   entityInstance: 7

@@ -152,28 +86,6 @@
           0xFF:

             type: int64_t

 

-0xe6:

-  entityID: 0x1D

-  entityInstance: 8

-  sensorType: 0x04

-  path: /xyz/openbmc_project/sensors/fan_tach/fan3_1

-  sensorReadingType: 0x01

-  multiplierM: 100

-  offsetB: 0

-  bExp: 0

-  rExp: 0

-  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

-  scale: 0

-  serviceInterface: org.freedesktop.DBus.Properties

-  readingType: readingData

-  sensorNamePattern: nameLeaf

-  interfaces:

-    xyz.openbmc_project.Sensor.Value:

-      Value:

-        Offsets:

-          0xFF:

-            type: int64_t

-

 0xe7:

   entityID: 0x0A

   entityInstance: 1

diff --git a/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/witherspoon_hwmon_sensors.hardcoded.yaml b/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/witherspoon_hwmon_sensors.hardcoded.yaml
new file mode 100644
index 0000000..69c4ccd
--- /dev/null
+++ b/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/witherspoon_hwmon_sensors.hardcoded.yaml
@@ -0,0 +1,88 @@
+0xde:

+  entityID: 0x1D

+  entityInstance: 2

+  sensorType: 0x04

+  path: /xyz/openbmc_project/sensors/fan_tach/fan0_1

+  sensorReadingType: 0x01

+  multiplierM: 100

+  offsetB: 0

+  bExp: 0

+  rExp: 0

+  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

+  scale: 0

+  serviceInterface: org.freedesktop.DBus.Properties

+  readingType: readingData

+  sensorNamePattern: nameLeaf

+  interfaces:

+    xyz.openbmc_project.Sensor.Value:

+      Value:

+        Offsets:

+          0xFF:

+            type: int64_t

+

+0xe2:

+  entityID: 0x1D

+  entityInstance: 4

+  sensorType: 0x04

+  path: /xyz/openbmc_project/sensors/fan_tach/fan1_1

+  sensorReadingType: 0x01

+  multiplierM: 100

+  offsetB: 0

+  bExp: 0

+  rExp: 0

+  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

+  scale: 0

+  serviceInterface: org.freedesktop.DBus.Properties

+  readingType: readingData

+  sensorNamePattern: nameLeaf

+  interfaces:

+    xyz.openbmc_project.Sensor.Value:

+      Value:

+        Offsets:

+          0xFF:

+            type: int64_t

+

+0xe4:

+  entityID: 0x1D

+  entityInstance: 6

+  sensorType: 0x04

+  path: /xyz/openbmc_project/sensors/fan_tach/fan2_1

+  sensorReadingType: 0x01

+  multiplierM: 100

+  offsetB: 0

+  bExp: 0

+  rExp: 0

+  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

+  scale: 0

+  serviceInterface: org.freedesktop.DBus.Properties

+  readingType: readingData

+  sensorNamePattern: nameLeaf

+  interfaces:

+    xyz.openbmc_project.Sensor.Value:

+      Value:

+        Offsets:

+          0xFF:

+            type: int64_t

+

+0xe6:

+  entityID: 0x1D

+  entityInstance: 8

+  sensorType: 0x04

+  path: /xyz/openbmc_project/sensors/fan_tach/fan3_1

+  sensorReadingType: 0x01

+  multiplierM: 100

+  offsetB: 0

+  bExp: 0

+  rExp: 0

+  unit: xyz.openbmc_project.Sensor.Value.Unit.RPMS

+  scale: 0

+  serviceInterface: org.freedesktop.DBus.Properties

+  readingType: readingData

+  sensorNamePattern: nameLeaf

+  interfaces:

+    xyz.openbmc_project.Sensor.Value:

+      Value:

+        Offsets:

+          0xFF:

+            type: int64_t

+

diff --git a/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
index e1798ad..5359cc7 100644
--- a/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
+++ b/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -5,6 +5,14 @@
 	file://channel.yaml \
 	"
 
+# System-specific sensors
+SRC_URI_append_witherspoon = " \
+	file://witherspoon_hwmon_sensors.hardcoded.yaml \
+	"
+SRC_URI_append_witherspoon-128 = " \
+	file://witherspoon_hwmon_sensors.hardcoded.yaml \
+	"
+
 EXTRA_OECONF_append = " \
         CHANNEL_YAML_GEN=${WORKDIR}/channel.yaml \
         "