meta-bletchley: add phosphor-nvme

Use phosphor-nvme to monitor the temperature of NVMe SSD on each sled

Signed-off-by: Howard Chiu <howard.chiu@quantatw.com>
Change-Id: Ib61dca1742f66b93cab7bee86b27b33cc7dce969
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/images/obmc-phosphor-image.bbappend
new file mode 100644
index 0000000..11096e1
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-phosphor/images/obmc-phosphor-image.bbappend
@@ -0,0 +1 @@
+OBMC_IMAGE_EXTRA_INSTALL:append = " phosphor-nvme"
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json
new file mode 100644
index 0000000..f64382e
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json
@@ -0,0 +1,36 @@
+{
+    "config": [
+        {
+            "NVMeDriveIndex": 0,
+            "NVMeDriveBusID": 0
+        },
+        {
+            "NVMeDriveIndex": 1,
+            "NVMeDriveBusID": 1
+        },
+        {
+            "NVMeDriveIndex": 2,
+            "NVMeDriveBusID": 2
+        },
+        {
+            "NVMeDriveIndex": 3,
+            "NVMeDriveBusID": 3
+        },
+        {
+            "NVMeDriveIndex": 4,
+            "NVMeDriveBusID": 4
+        },
+        {
+            "NVMeDriveIndex": 5,
+            "NVMeDriveBusID": 5
+        }
+    ],
+    "threshold": [
+        {
+            "criticalHigh": 75,
+            "criticalLow": 0,
+            "maxValue": 127,
+            "minValue": -127
+        }
+    ]
+}
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme_%.bbappend
new file mode 100644
index 0000000..919cef1
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://nvme_config.json"
+
+do_install:append() {
+        install -d ${D}/${sysconfdir}/nvme/
+        install -m 0644 ${WORKDIR}/nvme_config.json ${D}/${sysconfdir}/nvme/
+}