blob: 01cff570b2d17997f5e9d16cf34fa8b00349289a [file] [log] [blame]
Yuan Yaoa74be8c2018-09-12 14:58:22 +08001## System states
2## state can change to next state in 2 ways:
3## - a process emits a GotoSystemState signal with state name to goto
4## - objects specified in EXIT_STATE_DEPEND have started
5SYSTEM_STATES = [
6 'BASE_APPS',
7 'BMC_STARTING',
8 'BMC_READY',
9 'HOST_POWERING_ON',
10 'HOST_POWERED_ON',
11 'HOST_BOOTING',
12 'HOST_BOOTED',
13 'HOST_POWERED_OFF',
14]
15
16EXIT_STATE_DEPEND = {
17 'BASE_APPS' : {
18 '/org/openbmc/sensors': 0,
19 },
20 'BMC_STARTING' : {
21 '/org/openbmc/control/power0' : 0,
22 '/org/openbmc/control/host0' : 0,
23 '/org/openbmc/control/chassis0' : 0,
24 },
25}
26
27FRU_INSTANCES = {
28'<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
29}
30# I believe these numbers need to match the yaml file used to create the c++ ipmi map.
31# the devices have types, but I don't believe that factors in here, I think these are
32# just unique IDs.
33ID_LOOKUP = {
34 'FRU' : {},
35 # The number at the end needs to match the FRU ID.
36 # https://github.com/openbmc/skeleton/blob/master/pysystemmgr/system_manager.py#L143
37 # The paramter for it is of type 'y' (unsigned 8-bit integer) presumably decimal?
38 'FRU_STR' : {},
39 'SENSOR' : {},
40 'GPIO_PRESENT' : {}
41}
42
43GPIO_CONFIG = {}
44GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_pin': 'D3', 'direction': 'out' }
45GPIO_CONFIG['PGOOD'] = { 'gpio_pin': 'E2', 'direction': 'in' }
46GPIO_CONFIG['BMC_READY'] = { 'gpio_pin': 'Q4', 'direction': 'out' }
47GPIO_CONFIG['HOST_SPI_SWITCH'] = { 'gpio_pin': 'C7', 'direction': 'out'}
48GPIO_CONFIG['IMC_READY'] = { 'gpio_pin': 'O3', 'direction': 'both' }
49GPIO_CONFIG['IMC_INTERRUPT'] = { 'gpio_pin': 'O4', 'direction': 'both' }
50GPIO_CONFIG['RESET_BUTTON'] = { 'gpio_pin': 'G5', 'direction': 'both' }
51GPIO_CONFIG['QDF_RAS_ERROR_0'] = { 'gpio_pin': 'D6', 'direction': 'in' }
52GPIO_CONFIG['QDF_RAS_ERROR_1'] = { 'gpio_pin': 'D7', 'direction': 'in' }
53GPIO_CONFIG['QDF_RAS_ERROR_2'] = { 'gpio_pin': 'F1', 'direction': 'in' }
54
55GPIO_CONFIGS = {
56 'power_config' : {
57 'power_good_in' : 'PGOOD',
58 'power_up' : [
59#delay in ms
60 ('POWER_BUTTON', 'LOW_HIGH',1000),
61 ],
62 'power_out' : [
63 ('POWER_BUTTON', 'LOW_HIGH',8000),
64 ],
65 }}
66 'host_config' : {
67 'imc_ready' : 'IMC_READY',
68 'imc_interrupt': 'IMC_INTERRUPT',
69 'bmc_ready' : 'BMC_READY',
70 'host_spi_switch' : 'HOST_SPI_SWITCH',
71 },
72}
73
74# Miscellaneous non-poll sensor with system specific properties.
75# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
76
77MISC_SENSORS = {
78
79}
80
81# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4