diff options
author | John Wang <wangzqbj@inspur.com> | 2018-11-29 06:22:01 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-12-13 15:39:53 +0300 |
commit | af0bc6ee272605c25492fbbe201b513e59a9d61a (patch) | |
tree | a430f0928c1fdc4a8cf80efba88fec6502e1aa59 /meta-inspur/meta-on5263m5/recipes-phosphor | |
parent | b013dd583eb1f46ac54fe016f4d8f0349756183e (diff) | |
download | openbmc-af0bc6ee272605c25492fbbe201b513e59a9d61a.tar.xz |
Add ON5263M5 platform
(From meta-inspur rev: 42e8cb80b7e8344ce9fb6ff0c40f81e0bdd03cbe)
Change-Id: I8affa38b64d7db1f4826718983d049dea5ea2f26
Signed-off-by: John Wang <wangzqbj@inspur.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-inspur/meta-on5263m5/recipes-phosphor')
4 files changed, 134 insertions, 0 deletions
diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/meta-inspur/meta-on5263m5/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json new file mode 100644 index 0000000000..b02709ec2f --- /dev/null +++ b/meta-inspur/meta-on5263m5/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json @@ -0,0 +1,47 @@ +{ + "gpio_configs": { + + "power_config": { + "power_good_in": "PGOOD", + "power_up_outs": [ + {"name": "POWER_UP_PIN", "polarity": true} + ], + "reset_outs": [ + {"name": "RESET_OUT", "polarity": false} + ] + } + }, + + "gpio_definitions": [ + { + "name": "PGOOD", + "pin": "AB3", + "direction": "in" + }, + { + "name": "POWER_BUTTON", + "pin": "E2", + "direction": "both" + }, + { + "name": "POWER_UP_PIN", + "pin": "E3", + "direction": "out" + }, + { + "name": "RESET_BUTTON", + "pin": "E0", + "direction": "both" + }, + { + "name": "RESET_OUT", + "pin": "E1", + "direction": "out" + }, + { + "name": "ID_BUTTON", + "pin": "S6", + "direction": "both" + } + ] +} diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend b/meta-inspur/meta-on5263m5/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend new file mode 100644 index 0000000000..72d991c7e5 --- /dev/null +++ b/meta-inspur/meta-on5263m5/recipes-phosphor/skeleton/obmc-libobmc-intf_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-inspur/meta-on5263m5/recipes-phosphor/workbook/on5263m5-config.bb b/meta-inspur/meta-on5263m5/recipes-phosphor/workbook/on5263m5-config.bb new file mode 100644 index 0000000000..1b6e926b93 --- /dev/null +++ b/meta-inspur/meta-on5263m5/recipes-phosphor/workbook/on5263m5-config.bb @@ -0,0 +1,38 @@ +SUMMARY = "Inspur On5263 board wiring" +DESCRIPTION = "Board wiring information for the On5263 system." +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${INSPURBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +inherit allarch +inherit setuptools +inherit pythonnative + +PROVIDES += "virtual/obmc-inventory-data" +RPROVIDES_${PN} += "virtual-obmc-inventory-data" + +DEPENDS += "python" + +S = "${WORKDIR}" +SRC_URI += "file://On5263m5.py" + +# the following is unnecessary. +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-inspur/meta-on5263m5/recipes-phosphor/workbook/on5263m5-config/On5263m5.py b/meta-inspur/meta-on5263m5/recipes-phosphor/workbook/on5263m5-config/On5263m5.py new file mode 100644 index 0000000000..ca7cb20980 --- /dev/null +++ b/meta-inspur/meta-on5263m5/recipes-phosphor/workbook/on5263m5-config/On5263m5.py @@ -0,0 +1,48 @@ +## 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' : { + '/xyz/openbmc_poroject/sensors': 0, + }, + 'BMC_STARTING' : { + '/xyz/openbmc_project/control/chassis0': 0, + }, +} + +FRU_INSTANCES = {} + +# 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 parameter for it is of type 'y' (unsigned 8-bit integer) presumably decimal? + 'FRU_STR' : {}, + 'SENSOR' : {}, + 'GPIO_PRESENT' : {} +} + +GPIO_CONFIG = {} +HWMON_CONFIG = {} +GPIO_CONFIGS = {} + +# 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 |