blob: f38fd73977a7b80ce1b948b43edb00fd795a472d [file] [log] [blame]
Norman Jamesc9239a32015-10-06 16:54:31 -05001#! /usr/bin/python
2
3import dbus
4import Openbmc
5
6HOME_PATH = './'
Norman Jamesc9239a32015-10-06 16:54:31 -05007CACHE_PATH = HOME_PATH+'cache/'
Norman James25d80dd2015-10-08 07:02:25 -05008FLASH_DOWNLOAD_PATH = "/tmp"
9
Norman James969227c2015-10-08 15:10:47 -050010SYSTEM_NAME = "Palmetto"
Norman Jamesc9239a32015-10-06 16:54:31 -050011
Norman Jamesa3e47c42015-10-18 14:43:10 -050012
13## System states
14## state can change to next state in 2 ways:
15## - a process emits a GotoSystemState signal with state name to goto
16## - objects specified in EXIT_STATE_DEPEND have started
Norman Jamesc9239a32015-10-06 16:54:31 -050017SYSTEM_STATES = [
Norman Jamesb714eb22015-10-26 17:12:57 -050018 'BASE_APPS',
Norman Jamesa3e47c42015-10-18 14:43:10 -050019 'BMC_INIT',
20 'BMC_STARTING',
21 'BMC_READY',
22 'HOST_POWERING_ON',
23 'HOST_POWERED_ON',
24 'HOST_BOOTING',
Norman James2656f332015-10-26 06:42:41 -050025 'HOST_BOOTED',
Norman Jamesa3e47c42015-10-18 14:43:10 -050026 'HOST_POWERED_DOWN',
Norman Jamesc9239a32015-10-06 16:54:31 -050027]
28
Norman Jamesa3e47c42015-10-18 14:43:10 -050029EXIT_STATE_DEPEND = {
Norman Jamesb714eb22015-10-26 17:12:57 -050030 'BASE_APPS' : {
31 '/org/openbmc/managers/Property': 0,
32 },
Norman Jamesa3e47c42015-10-18 14:43:10 -050033 'BMC_STARTING' : {
34 '/org/openbmc/control/chassis0': 0,
35 '/org/openbmc/control/power0' : 0,
36 '/org/openbmc/control/led/BMC_READY' : 0,
37 '/org/openbmc/control/Host_0' : 0,
38 }
39}
40
41## method will be called when state is entered
Norman Jamesc9239a32015-10-06 16:54:31 -050042ENTER_STATE_CALLBACK = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050043 'HOST_POWERED_ON' : {
Norman Jamesc9239a32015-10-06 16:54:31 -050044 'bus_name' : 'org.openbmc.control.Host',
45 'obj_name' : '/org/openbmc/control/Host_0',
46 'interface_name' : 'org.openbmc.control.Host',
47 'method_name' : 'boot'
Norman Jamesa3e47c42015-10-18 14:43:10 -050048 },
49 'BMC_READY' : {
50 'bus_name' : 'org.openbmc.control.led',
51 'obj_name' : '/org/openbmc/control/led/BMC_READY',
52 'interface_name' : 'org.openbmc.Led',
53 'method_name' : 'setOn'
Norman Jamesc9239a32015-10-06 16:54:31 -050054 }
55}
56
57SYSTEM_CONFIG = {}
58
Norman James2656f332015-10-26 06:42:41 -050059SYSTEM_CONFIG['org.openbmc.managers.Property'] = {
Norman Jamesb714eb22015-10-26 17:12:57 -050060 'system_state' : 'BASE_APPS',
61 'start_process' : True,
62 'monitor_process' : True,
Norman James2656f332015-10-26 06:42:41 -050063 'process_name' : 'property_manager.py',
Norman James2656f332015-10-26 06:42:41 -050064 'instances' : [ { 'name' : SYSTEM_NAME } ]
65 }
66
Norman Jamesc9239a32015-10-06 16:54:31 -050067SYSTEM_CONFIG['org.openbmc.control.Bmc'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050068 'system_state' : 'BMC_INIT',
Norman Jamesc9239a32015-10-06 16:54:31 -050069 'start_process' : True,
70 'monitor_process' : True,
71 'process_name' : 'control_bmc.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -050072 'instances' : [ { 'name' : 'Bmc_0' } ]
73 }
74
75SYSTEM_CONFIG['org.openbmc.managers.Inventory'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050076 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -050077 'start_process' : True,
78 'monitor_process' : True,
79 'process_name' : 'inventory_items.py',
Norman James25d80dd2015-10-08 07:02:25 -050080 'instances' : [ { 'name' : SYSTEM_NAME } ]
Norman Jamesc9239a32015-10-06 16:54:31 -050081 }
82SYSTEM_CONFIG['org.openbmc.control.PciePresent'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050083 'system_state' : 'HOST_POWERED_ON',
Norman Jamesc9239a32015-10-06 16:54:31 -050084 'start_process' : True,
85 'monitor_process' : False,
86 'process_name' : 'pcie_slot_present.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -050087 'instances' : [ { 'name' : 'Slots_0' } ]
88 }
Norman James0ee61922015-10-14 09:39:11 -050089SYSTEM_CONFIG['org.openbmc.sensor.Power8Virtual'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050090 'system_state' : 'BMC_STARTING',
Norman James0ee61922015-10-14 09:39:11 -050091 'start_process' : True,
92 'monitor_process' : True,
93 'process_name' : 'sensors_virtual_p8.py',
Norman Jamesa3e47c42015-10-18 14:43:10 -050094 'instances' : [ { 'name' : 'virtual' } ]
Norman James0ee61922015-10-14 09:39:11 -050095 }
Norman Jamesc9239a32015-10-06 16:54:31 -050096
97SYSTEM_CONFIG['org.openbmc.managers.Sensors'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050098 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -050099 'start_process' : True,
100 'monitor_process' : True,
101 'process_name' : 'sensor_manager.py',
Norman James25d80dd2015-10-08 07:02:25 -0500102 'instances' : [ { 'name' : SYSTEM_NAME } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500103 }
104
105SYSTEM_CONFIG['org.openbmc.watchdog.Host'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500106 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500107 'start_process' : True,
108 'monitor_process' : True,
109 'process_name' : 'host_watchdog.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500110 'instances' : [
111 {
112 'name' : 'HostWatchdog_0',
113 'properties' : {
114 'org.openbmc.Watchdog' : {
Norman James6ebd39a2015-10-22 07:13:23 -0500115 'poll_interval': 30000,
Norman Jamesc9239a32015-10-06 16:54:31 -0500116 }
117 }
118 }
119 ]
120 }
121
122SYSTEM_CONFIG['org.openbmc.control.Power'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500123 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500124 'start_process' : True,
125 'monitor_process' : True,
126 'process_name' : 'power_control.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500127 'instances' : [
128 {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500129 'name' : 'power0',
Norman Jamesc9239a32015-10-06 16:54:31 -0500130 'user_label': 'Power control',
131 'properties' : {
132 'org.openbmc.Control': {
133 'poll_interval' : 3000
134 },
135 'org.openbmc.control.Power': {
136 'pgood_timeout' : 10
137 }
138 }
139 }
140 ]
141 }
142
Norman Jamesc9239a32015-10-06 16:54:31 -0500143SYSTEM_CONFIG['org.openbmc.buttons.Power'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500144 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500145 'start_process' : True,
146 'monitor_process' : True,
147 'process_name' : 'button_power.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500148 'instances' : [ { 'name' : 'PowerButton_0' } ]
149 }
Norman Jamesa3e47c42015-10-18 14:43:10 -0500150SYSTEM_CONFIG['org.openbmc.control.led'] = {
151 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500152 'start_process' : True,
153 'monitor_process' : True,
Norman Jamesa3e47c42015-10-18 14:43:10 -0500154 'process_name' : 'led_controller.exe',
Norman Jamesa3e47c42015-10-18 14:43:10 -0500155 'instances' : [ { 'name' : 'Dummy' } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500156 }
Norman James6ebd39a2015-10-22 07:13:23 -0500157SYSTEM_CONFIG['org.openbmc.control.Flash'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500158 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500159 'start_process' : True,
160 'monitor_process' : True,
161 'process_name' : 'flash_bios.exe',
Norman James6ebd39a2015-10-22 07:13:23 -0500162 'instances' : [ { 'name' : 'dummy' } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500163 }
164
Norman Jamesf066e872015-10-07 15:29:51 -0500165SYSTEM_CONFIG['org.openbmc.manager.Download'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500166 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500167 'start_process' : True,
168 'monitor_process' : True,
Norman Jamesf066e872015-10-07 15:29:51 -0500169 'process_name' : 'download_manager.py',
Norman James25d80dd2015-10-08 07:02:25 -0500170 'instances' : [ { 'name' : SYSTEM_NAME } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500171 }
172
173SYSTEM_CONFIG['org.openbmc.control.Host'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500174 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500175 'start_process' : True,
176 'monitor_process' : True,
177 'process_name' : 'control_host.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500178 'instances' : [ { 'name' : 'Host_0' } ]
179 }
180SYSTEM_CONFIG['org.openbmc.control.Chassis'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500181 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500182 'start_process' : True,
183 'monitor_process' : True,
184 'process_name' : 'chassis_control.py',
Norman Jamesa3e47c42015-10-18 14:43:10 -0500185 'instances' : [ { 'name' : 'chassis0' } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500186 }
187
188SYSTEM_CONFIG['org.openbmc.vpd'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500189 'system_state' : 'HOST_POWERED_ON',
190 'start_process' : False,
Norman Jamesc9239a32015-10-06 16:54:31 -0500191 'monitor_process' : False,
192 'process_name' : 'board_vpd.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500193 'instances' : [ { 'name' : 'MBVPD_0' } ]
194 }
195
Norman Jamesc9239a32015-10-06 16:54:31 -0500196SYSTEM_CONFIG['org.openbmc.sensors.Fan'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500197 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500198 'start_process' : True,
199 'monitor_process' : True,
200 'process_name' : 'fan.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500201 'instances' : [ {'name' : 'Fan_0' }, {'name' : 'Fan_1'}, {'name' : 'Fan_2'} ]
202 }
203
Norman James2656f332015-10-26 06:42:41 -0500204CACHED_INTERFACES = {
205 "org.openbmc.InventoryItem" : True,
206 "org.openbmc.control.Chassis" : True,
207 }
Norman Jamesa3e47c42015-10-18 14:43:10 -0500208INVENTORY_ROOT = '/org/openbmc/inventory'
Norman Jamesc9239a32015-10-06 16:54:31 -0500209
210FRU_INSTANCES = {
211 '<inventory_root>/system' :
Norman James0706ae02015-10-19 16:09:47 -0500212 { 'fru_type' : 'SYSTEM','is_fru' : True, },
Norman Jamesc9239a32015-10-06 16:54:31 -0500213
Norman Jamesa42446a2015-10-19 11:12:45 -0500214 '<inventory_root>/system/chassis' :
Norman James0706ae02015-10-19 16:09:47 -0500215 { 'fru_type' : 'SYSTEM','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500216
217 '<inventory_root>/system/chassis/motherboard' :
Norman James0706ae02015-10-19 16:09:47 -0500218 { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500219
220 '<inventory_root>/system/chassis/fan0' :
Norman James0706ae02015-10-19 16:09:47 -0500221 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500222 '<inventory_root>/system/chassis/fan1' :
Norman James0706ae02015-10-19 16:09:47 -0500223 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500224 '<inventory_root>/system/chassis/fan2' :
Norman James0706ae02015-10-19 16:09:47 -0500225 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500226 '<inventory_root>/system/chassis/fan3' :
Norman James0706ae02015-10-19 16:09:47 -0500227 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500228 '<inventory_root>/system/chassis/fan4' :
Norman James0706ae02015-10-19 16:09:47 -0500229 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500230
231 '<inventory_root>/system/chassis/motherboard/bmc' :
Norman James0706ae02015-10-19 16:09:47 -0500232 { 'fru_type' : 'BMC','is_fru' : False,
Norman Jamesa42446a2015-10-19 11:12:45 -0500233 'manufacturer' : 'ASPEED' },
234 '<inventory_root>/system/chassis/motherboard/cpu0' :
Norman James0706ae02015-10-19 16:09:47 -0500235 { 'fru_type' : 'CPU', 'is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500236
237 '<inventory_root>/system/chassis/motherboard/cpu0/core0' :
Norman James0706ae02015-10-19 16:09:47 -0500238 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500239
240 '<inventory_root>/system/chassis/motherboard/cpu0/core1' :
Norman James0706ae02015-10-19 16:09:47 -0500241 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500242
243 '<inventory_root>/system/chassis/motherboard/cpu0/core2' :
Norman James0706ae02015-10-19 16:09:47 -0500244 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500245
246 '<inventory_root>/system/chassis/motherboard/cpu0/core3' :
Norman James0706ae02015-10-19 16:09:47 -0500247 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500248
249 '<inventory_root>/system/chassis/motherboard/cpu0/core4' :
Norman James0706ae02015-10-19 16:09:47 -0500250 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500251
252 '<inventory_root>/system/chassis/motherboard/cpu0/core5' :
Norman James0706ae02015-10-19 16:09:47 -0500253 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500254
255 '<inventory_root>/system/chassis/motherboard/cpu0/core6' :
Norman James0706ae02015-10-19 16:09:47 -0500256 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500257
258 '<inventory_root>/system/chassis/motherboard/cpu0/core7' :
Norman James0706ae02015-10-19 16:09:47 -0500259 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500260
261 '<inventory_root>/system/chassis/motherboard/cpu0/core8' :
Norman James0706ae02015-10-19 16:09:47 -0500262 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500263
264 '<inventory_root>/system/chassis/motherboard/cpu0/core9' :
Norman James0706ae02015-10-19 16:09:47 -0500265 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500266
267 '<inventory_root>/system/chassis/motherboard/cpu0/core10' :
Norman James0706ae02015-10-19 16:09:47 -0500268 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500269
270 '<inventory_root>/system/chassis/motherboard/cpu0/core11' :
Norman James0706ae02015-10-19 16:09:47 -0500271 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500272
273 '<inventory_root>/system/chassis/motherboard/centaur0' :
Norman James0706ae02015-10-19 16:09:47 -0500274 { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500275
276 '<inventory_root>/system/chassis/motherboard/dimm0' :
Norman James0706ae02015-10-19 16:09:47 -0500277 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500278
279 '<inventory_root>/system/chassis/motherboard/dimm1' :
Norman James0706ae02015-10-19 16:09:47 -0500280 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500281
282 '<inventory_root>/system/chassis/motherboard/dimm2' :
Norman James0706ae02015-10-19 16:09:47 -0500283 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500284
285 '<inventory_root>/system/chassis/motherboard/dimm3' :
Norman James0706ae02015-10-19 16:09:47 -0500286 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500287
288 '<inventory_root>/system/chassis/io_board/pcie_slot0' :
Norman James0706ae02015-10-19 16:09:47 -0500289 { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500290
291 '<inventory_root>/system/chassis/io_board/pcie_slot1' :
Norman James0706ae02015-10-19 16:09:47 -0500292 { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500293
Norman Jamesc9239a32015-10-06 16:54:31 -0500294}
295
296ID_LOOKUP = {
297 'FRU' : {
Norman Jamesa42446a2015-10-19 11:12:45 -0500298 0x0d : '<inventory_root>/system/chassis',
299 0x34 : '<inventory_root>/system/chassis/motherboard',
300 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
301 0x02 : '<inventory_root>/system/chassis/motherboard/centaur0',
302 0x03 : '<inventory_root>/system/chassis/motherboard/dimm0',
303 0x04 : '<inventory_root>/system/chassis/motherboard/dimm1',
304 0x05 : '<inventory_root>/system/chassis/motherboard/dimm2',
305 0x06 : '<inventory_root>/system/chassis/motherboard/dimm3',
Norman James2656f332015-10-26 06:42:41 -0500306 0x35 : '<inventory_root>/system',
Norman Jamesc9239a32015-10-06 16:54:31 -0500307 },
Norman Jamesa42446a2015-10-19 11:12:45 -0500308 'FRU_STR' : {
Norman Jamesfe635e82015-10-20 07:47:22 -0500309 'PRODUCT_15' : '<inventory_root>/system',
310 'CHASSIS_2' : '<inventory_root>/system/chassis',
311 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
312 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/centaur0',
313 'PRODUCT_3' : '<inventory_root>/system/chassis/motherboard/dimm0',
314 'PRODUCT_4' : '<inventory_root>/system/chassis/motherboard/dimm1',
315 'PRODUCT_5' : '<inventory_root>/system/chassis/motherboard/dimm2',
316 'PRODUCT_6' : '<inventory_root>/system/chassis/motherboard/dimm3',
Norman Jamesa42446a2015-10-19 11:12:45 -0500317 },
Norman Jamesc9239a32015-10-06 16:54:31 -0500318 'SENSOR' : {
Norman Jamesa42446a2015-10-19 11:12:45 -0500319 0x2f : '<inventory_root>/system/chassis/motherboard/cpu0',
320 0x22 : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
321 0x23 : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
322 0x24 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
323 0x25 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
324 0x26 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
325 0x27 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
326 0x28 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
327 0x29 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
328 0x2a : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
329 0x2b : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
330 0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
331 0x2d : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
332 0x2e : '<inventory_root>/system/chassis/motherboard/centaur0',
333 0x1e : '<inventory_root>/system/chassis/motherboard/dimm0',
334 0x1f : '<inventory_root>/system/chassis/motherboard/dimm1',
335 0x20 : '<inventory_root>/system/chassis/motherboard/dimm2',
336 0x21 : '<inventory_root>/system/chassis/motherboard/dimm3',
Norman James0ee61922015-10-14 09:39:11 -0500337 0x09 : '/org/openbmc/sensor/virtual/BootCount',
338 0x05 : '/org/openbmc/sensor/virtual/BootProgress',
339 0x04 : '/org/openbmc/sensor/virtual/HostStatus',
340 0x08 : '/org/openbmc/sensor/virtual/OccStatus',
341 0x32 : '/org/openbmc/sensor/virtual/OperatingSystemStatus',
Norman Jamesc9239a32015-10-06 16:54:31 -0500342 },
343 'GPIO_PRESENT' : {
Norman Jamesa42446a2015-10-19 11:12:45 -0500344 'SLOT0_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot0',
345 'SLOT1_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot1',
Norman Jamesc9239a32015-10-06 16:54:31 -0500346 }
347}
348
349GPIO_CONFIG = {}
Norman James25d80dd2015-10-08 07:02:25 -0500350GPIO_CONFIG['FSI_CLK'] = { 'gpio_num': 484, 'direction': 'out' }
351GPIO_CONFIG['FSI_DATA'] = { 'gpio_num': 485, 'direction': 'out' }
352GPIO_CONFIG['FSI_ENABLE'] = { 'gpio_num': 504, 'direction': 'out' }
353GPIO_CONFIG['POWER_PIN'] = { 'gpio_num': 449, 'direction': 'out' }
354GPIO_CONFIG['CRONUS_SEL'] = { 'gpio_num': 486, 'direction': 'out' }
355GPIO_CONFIG['PGOOD'] = { 'gpio_num': 503, 'direction': 'in' }
356GPIO_CONFIG['IDENTIFY'] = { 'gpio_num': 365, 'direction': 'out' }
Norman Jamesa3e47c42015-10-18 14:43:10 -0500357GPIO_CONFIG['BMC_READY'] = { 'gpio_num': 365, 'direction': 'out' }
Norman James25d80dd2015-10-08 07:02:25 -0500358GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_num': 448, 'direction': 'falling' }
Norman Jamesc9239a32015-10-06 16:54:31 -0500359GPIO_CONFIG['SLOT0_RISER_PRESENT'] = { 'gpio_num': 104, 'direction': 'in' }
360GPIO_CONFIG['SLOT1_RISER_PRESENT'] = { 'gpio_num': 105, 'direction': 'in' }
361GPIO_CONFIG['SLOT2_RISER_PRESENT'] = { 'gpio_num': 106, 'direction': 'in' }
Norman Jamesa42446a2015-10-19 11:12:45 -0500362GPIO_CONFIG['SLOT0_PRESENT'] = { 'gpio_num': 470, 'direction': 'in' }
363GPIO_CONFIG['SLOT1_PRESENT'] = { 'gpio_num': 471, 'direction': 'in' }
Norman Jamesc9239a32015-10-06 16:54:31 -0500364GPIO_CONFIG['SLOT2_PRESENT'] = { 'gpio_num': 109, 'direction': 'in' }
365GPIO_CONFIG['MEZZ0_PRESENT'] = { 'gpio_num': 112, 'direction': 'in' }
366GPIO_CONFIG['MEZZ1_PRESENT'] = { 'gpio_num': 113, 'direction': 'in' }
367
368