summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-04-14 21:44:44 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-04-14 21:50:46 -0500
commit2600dc2d0d163121659e5236523f67ebf6b18029 (patch)
treeaa6ca9980f2b1525caa25048d0878abfa28f820d
parenteee1b6549d41ee2b4ef369a50dba6fe2baea65ec (diff)
downloadtalos-openbmc-master.zip
talos-openbmc-master.tar.gz
Allow the on-board VGA device to be enabled or disabled based on FPGA jumper setting readback This requires FPGA version 1.04 or higher to workHEADmaster
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable.bb27
-rwxr-xr-xmeta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check13
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast_vga_disable@.service19
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb2
4 files changed, 60 insertions, 1 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable.bb
new file mode 100644
index 0000000..f2ae45f
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Talos II VGA Disable"
+DESCRIPTION = "Talos II power on VGA disable controller"
+PR = "r0"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+PROVIDES += 'virtual/talos-ast-vga-disable'
+RPROVIDES_${PN} += 'virtual-talos-ast-vga-disable'
+
+RDEPENDS_${PN} += "bash"
+
+S = "${WORKDIR}"
+SRC_URI += "file://ast-vga-disable-check"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/ast-vga-disable-check ${D}${bindir}/ast-vga-disable-check
+}
+
+TMPL = "ast_vga_disable@.service"
+INSTFMT = "ast_vga_disable@{0}.service"
+TGTFMT = "obmc-chassis-poweron@{0}.target"
+FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}"
+
+SYSTEMD_SERVICE_${PN} += "${TMPL}"
+SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check
new file mode 100755
index 0000000..31ed3df
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# Copyright © 2018 Raptor Engineering, LLC
+
+FPGA_STATUS=$(i2cget -y 12 0x31 0x7)
+AST_VGA_DISABLE=$(( FPGA_STATUS & 0x40 ))
+if [[ $AST_VGA_DISABLE == 64 ]]; then
+ # On-board VGA disabled
+ devmem 0x1e6e207c 32 0x00008000
+else
+ # On-board VGA enabled
+ devmem 0x1e6e2070 32 0x00008000
+fi
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast_vga_disable@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast_vga_disable@.service
new file mode 100644
index 0000000..2e52c9e
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast_vga_disable@.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Apply ASpeed VGA disable setting on host%i
+Wants=obmc-host-start-pre@%i.target
+Before=obmc-host-start-pre@%i.target
+Wants=obmc-power-on@%i.target
+After=obmc-power-on@%i.target
+Wants=fsi-scan@%i.service
+After=fsi-scan@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart=/usr/bin/env /usr/bin/ast-vga-disable-check
+SyslogIdentifier=ast-vga-disable-check
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
index 337febf..2e75d1e 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb
@@ -10,7 +10,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:"
PROVIDES += 'virtual/obmc-host-ctl'
RPROVIDES_${PN} += 'virtual-obmc-host-ctl'
-RDEPENDS_${PN} += "op-proc-control"
+RDEPENDS_${PN} += "op-proc-control ast-vga-disable"
S = "${WORKDIR}"
OpenPOWER on IntegriCloud