summaryrefslogtreecommitdiffstats
path: root/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor
diff options
context:
space:
mode:
authorYuan Yao <yao.yuan@linaro.org>2018-09-12 14:58:22 +0800
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-25 14:17:41 -0400
commit72b8b7c0c8ee21bf8a91fd2e5f51423bb28788ee (patch)
tree6d09ec4e0e09ee9b96dbb809c3ff352562799fff /meta-hxt/meta-stardragon4800-rep2/recipes-phosphor
parent5b9a0fc143ece21f7ae73866a0037dcf4dd13c1a (diff)
downloadtalos-openbmc-72b8b7c0c8ee21bf8a91fd2e5f51423bb28788ee.tar.gz
talos-openbmc-72b8b7c0c8ee21bf8a91fd2e5f51423bb28788ee.zip
Add meta-hxt and meta-stardragon-rep2
Initial a new platfom for ARM system (From meta-hxt rev: a74be8cd66acd132d82daf45b6e92c89578c98b0) Change-Id: Iee29816c86457ac2e07a55184fe7cc1aeb1ba216 Signed-off-by: Yuan Yao <yao.yuan@hxt-semitech.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-hxt/meta-stardragon4800-rep2/recipes-phosphor')
-rw-r--r--meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config.bb37
-rw-r--r--meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config/Stardragon4800-rep2.py81
2 files changed, 118 insertions, 0 deletions
diff --git a/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config.bb b/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config.bb
new file mode 100644
index 000000000..475ee2f9e
--- /dev/null
+++ b/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config.bb
@@ -0,0 +1,37 @@
+SUMMARY = "HXT Rep board wiring"
+DESCRIPTION = "Board wiring information for the HXT Rep system."
+PR = "r1"
+
+inherit allarch
+inherit setuptools
+inherit pythonnative
+inherit obmc-phosphor-license
+
+PROVIDES += "virtual/obmc-inventory-data"
+RPROVIDES_${PN} += "virtual-obmc-inventory-data"
+
+DEPENDS += "python"
+
+S = "${WORKDIR}"
+SRC_URI += "file://Stardragon4800-rep2.py"
+
+python() {
+ machine = d.getVar('MACHINE', True).capitalize() + '.py'
+ d.setVar('_config_in_skeleton', machine)
+}
+
+do_make_setup() {
+ cp ${S}/${_config_in_skeleton} \
+ ${S}/obmc_system_config.py
+ cat <<EOF > ${S}/setup.py
+from distutils.core import setup
+
+setup(name='${BPN}',
+ version='${PR}',
+ py_modules=['obmc_system_config'],
+ )
+EOF
+}
+
+addtask make_setup after do_patch before do_configure
+
diff --git a/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config/Stardragon4800-rep2.py b/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config/Stardragon4800-rep2.py
new file mode 100644
index 000000000..01cff570b
--- /dev/null
+++ b/meta-hxt/meta-stardragon4800-rep2/recipes-phosphor/workbook/stardragon4800-rep2-config/Stardragon4800-rep2.py
@@ -0,0 +1,81 @@
+## System states
+## state can change to next state in 2 ways:
+## - a process emits a GotoSystemState signal with state name to goto
+## - objects specified in EXIT_STATE_DEPEND have started
+SYSTEM_STATES = [
+ 'BASE_APPS',
+ 'BMC_STARTING',
+ 'BMC_READY',
+ 'HOST_POWERING_ON',
+ 'HOST_POWERED_ON',
+ 'HOST_BOOTING',
+ 'HOST_BOOTED',
+ 'HOST_POWERED_OFF',
+]
+
+EXIT_STATE_DEPEND = {
+ 'BASE_APPS' : {
+ '/org/openbmc/sensors': 0,
+ },
+ 'BMC_STARTING' : {
+ '/org/openbmc/control/power0' : 0,
+ '/org/openbmc/control/host0' : 0,
+ '/org/openbmc/control/chassis0' : 0,
+ },
+}
+
+FRU_INSTANCES = {
+'<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
+}
+# I believe these numbers need to match the yaml file used to create the c++ ipmi map.
+# the devices have types, but I don't believe that factors in here, I think these are
+# just unique IDs.
+ID_LOOKUP = {
+ 'FRU' : {},
+ # The number at the end needs to match the FRU ID.
+ # https://github.com/openbmc/skeleton/blob/master/pysystemmgr/system_manager.py#L143
+ # The paramter for it is of type 'y' (unsigned 8-bit integer) presumably decimal?
+ 'FRU_STR' : {},
+ 'SENSOR' : {},
+ 'GPIO_PRESENT' : {}
+}
+
+GPIO_CONFIG = {}
+GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_pin': 'D3', 'direction': 'out' }
+GPIO_CONFIG['PGOOD'] = { 'gpio_pin': 'E2', 'direction': 'in' }
+GPIO_CONFIG['BMC_READY'] = { 'gpio_pin': 'Q4', 'direction': 'out' }
+GPIO_CONFIG['HOST_SPI_SWITCH'] = { 'gpio_pin': 'C7', 'direction': 'out'}
+GPIO_CONFIG['IMC_READY'] = { 'gpio_pin': 'O3', 'direction': 'both' }
+GPIO_CONFIG['IMC_INTERRUPT'] = { 'gpio_pin': 'O4', 'direction': 'both' }
+GPIO_CONFIG['RESET_BUTTON'] = { 'gpio_pin': 'G5', 'direction': 'both' }
+GPIO_CONFIG['QDF_RAS_ERROR_0'] = { 'gpio_pin': 'D6', 'direction': 'in' }
+GPIO_CONFIG['QDF_RAS_ERROR_1'] = { 'gpio_pin': 'D7', 'direction': 'in' }
+GPIO_CONFIG['QDF_RAS_ERROR_2'] = { 'gpio_pin': 'F1', 'direction': 'in' }
+
+GPIO_CONFIGS = {
+ 'power_config' : {
+ 'power_good_in' : 'PGOOD',
+ 'power_up' : [
+#delay in ms
+ ('POWER_BUTTON', 'LOW_HIGH',1000),
+ ],
+ 'power_out' : [
+ ('POWER_BUTTON', 'LOW_HIGH',8000),
+ ],
+ }}
+ 'host_config' : {
+ 'imc_ready' : 'IMC_READY',
+ 'imc_interrupt': 'IMC_INTERRUPT',
+ 'bmc_ready' : 'BMC_READY',
+ 'host_spi_switch' : 'HOST_SPI_SWITCH',
+ },
+}
+
+# Miscellaneous non-poll sensor with system specific properties.
+# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
+
+MISC_SENSORS = {
+
+}
+
+# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
OpenPOWER on IntegriCloud