meta-romulus: Add CPLD workaround

Romulus power on scripts requires a workaround to trigger CPLD to give
pgood signal after vcs_workaround.
Add this as cpld_trigger service that runs after vcs_workaround and
before obmc-host-start-pre.

Change-Id: I0723bad38a5832f0bb2a8776129885308a8e644a
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/meta-romulus/recipes-phosphor/chassis/cpld-trigger.bb b/meta-romulus/recipes-phosphor/chassis/cpld-trigger.bb
new file mode 100644
index 0000000..4fb9e20
--- /dev/null
+++ b/meta-romulus/recipes-phosphor/chassis/cpld-trigger.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Romulus CPLD Trigger"
+DESCRIPTION = "Romulus power on workaround to trigger CPLD to continue power sequence"
+PR = "r0"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+RDEPENDS_${PN} += "obmc-pydevtools"
+
+PROVIDES += 'virtual/p9-vcs-workaround'
+RPROVIDES_${PN} += 'virtual-p9-vcs-workaround'
+
+S = "${WORKDIR}"
+SRC_URI += "file://cpld_trigger.sh"
+
+do_install() {
+        install -d ${D}${bindir}
+        install -m 0755 ${WORKDIR}/cpld_trigger.sh ${D}${bindir}/cpld_trigger.sh
+}
+
+TMPL = "cpld_trigger@.service"
+INSTFMT = "cpld_trigger@{0}.service"
+TGTFMT = "obmc-chassis-start@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
+