meta-facebook: sensors: Add nvme sensors

Added phosphor nvme sensors for tiogapass platform to read
ssd cards sensors over NVME-MI interface.

(From meta-facebook rev: 45dcaede279fa03ace2b4f5b8306bdabab90f8f6)

Change-Id: I6b696470a091dc9f43f3da2be24200f26761be22
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-facebook/recipes-phosphor/sensors/phosphor-nvme/tiogapass/nvme_config.json b/meta-facebook/recipes-phosphor/sensors/phosphor-nvme/tiogapass/nvme_config.json
new file mode 100644
index 0000000..fefa711
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/sensors/phosphor-nvme/tiogapass/nvme_config.json
@@ -0,0 +1,36 @@
+{
+    "config": [
+        {
+            "NVMeDriveIndex": 0,
+            "NVMeDriveBusID": 20
+        },
+        {
+            "NVMeDriveIndex": 1,
+            "NVMeDriveBusID": 21
+        },
+        {
+            "NVMeDriveIndex": 4,
+            "NVMeDriveBusID": 24
+        },
+        {
+            "NVMeDriveIndex": 5,
+            "NVMeDriveBusID": 25
+        },
+        {
+            "NVMeDriveIndex": 6,
+            "NVMeDriveBusID": 26
+        },
+        {
+            "NVMeDriveIndex": 7,
+            "NVMeDriveBusID": 27
+        }
+    ],
+    "threshold": [
+        {
+            "criticalHigh": 75,
+            "criticalLow": 0,
+            "maxValue": 127,
+            "minValue": -127
+        }
+    ]
+}
diff --git a/meta-facebook/recipes-phosphor/sensors/phosphor-nvme_%.bbappend b/meta-facebook/recipes-phosphor/sensors/phosphor-nvme_%.bbappend
new file mode 100644
index 0000000..95a5907
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/sensors/phosphor-nvme_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/${MACHINE}:"
+
+SRC_URI_append = " file://nvme_config.json"
+
+do_install_append() {
+    install -m 0644 -D ${WORKDIR}/nvme_config.json \
+                   ${D}/etc/nvme
+}