meta-yadro: vegman: ipmi: enable hybrid-sensors

The phosphor-ipmi-host has two implemetations of SDR: static and
dynamic. Static SDR implementation requires us to set all coefs manually
for all sensors in the system, while dynamic implementation doesn't
support discrete sensors.

Enable support for mixed mode where both static and dynamic
implementations work at the same time.

Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: I27df9e083f0bd816b9a02515e75a3dea69ea20bb
diff --git a/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb
new file mode 100644
index 0000000..f2936dc
--- /dev/null
+++ b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config.bb
@@ -0,0 +1,23 @@
+SUMMARY = "YAML configuration for VEGMAN"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch
+
+SRC_URI = " \
+    file://vegman-ipmi-sensors-static.yaml \
+    "
+
+S = "${WORKDIR}"
+
+do_install() {
+    install -m 0644 -D vegman-ipmi-sensors-static.yaml \
+        ${D}${datadir}/${BPN}/ipmi-sensors-static.yaml
+}
+
+FILES:${PN}-dev = " \
+    ${datadir}/${BPN}/ipmi-sensors-static.yaml \
+    "
+
+ALLOW_EMPTY:${PN} = "1"
diff --git a/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml
new file mode 100755
index 0000000..f4def89
--- /dev/null
+++ b/meta-yadro/meta-vegman/recipes-phosphor/configuration/vegman-yaml-config/vegman-ipmi-sensors-static.yaml
@@ -0,0 +1,17 @@
+0x01:
+  entityID: 0x07
+  entityInstance: 1
+  sensorType: 0x21
+  path: /xyz/openbmc_project/led/groups/enclosure_identify_blink
+  sensorReadingType: 0x6F
+  mutability: Mutability::Read
+  serviceInterface: org.freedesktop.DBus.Properties
+  readingType: assertion
+  sensorNamePattern: nameLeaf
+  interfaces:
+    xyz.openbmc_project.Led.Group:
+      Asserted:
+        Offsets:
+          0x00:
+            type: bool
+            assert: true
diff --git a/meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
new file mode 100644
index 0000000..b549a7a
--- /dev/null
+++ b/meta-yadro/meta-vegman/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+PACKAGECONFIG:append = " dynamic-sensors hybrid-sensors"
+
+DEPENDS:append= " vegman-yaml-config"
+EXTRA_OECONF= " \
+    SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/vegman-yaml-config/ipmi-sensors-static.yaml \
+    "