blob: 13ae9752bf94a40f8ff362642dc866963e53583a [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/'
8FRU_PATH = CACHE_PATH+'frus/'
Norman James25d80dd2015-10-08 07:02:25 -05009FLASH_DOWNLOAD_PATH = "/tmp"
10
Norman James969227c2015-10-08 15:10:47 -050011SYSTEM_NAME = "Palmetto"
Norman Jamesc9239a32015-10-06 16:54:31 -050012
Norman Jamesa3e47c42015-10-18 14:43:10 -050013
14## System states
15## state can change to next state in 2 ways:
16## - a process emits a GotoSystemState signal with state name to goto
17## - objects specified in EXIT_STATE_DEPEND have started
Norman Jamesc9239a32015-10-06 16:54:31 -050018SYSTEM_STATES = [
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 = {
30 'BMC_STARTING' : {
31 '/org/openbmc/control/chassis0': 0,
32 '/org/openbmc/control/power0' : 0,
33 '/org/openbmc/control/led/BMC_READY' : 0,
34 '/org/openbmc/control/Host_0' : 0,
35 }
36}
37
38## method will be called when state is entered
Norman Jamesc9239a32015-10-06 16:54:31 -050039ENTER_STATE_CALLBACK = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050040 'HOST_POWERED_ON' : {
Norman Jamesc9239a32015-10-06 16:54:31 -050041 'bus_name' : 'org.openbmc.control.Host',
42 'obj_name' : '/org/openbmc/control/Host_0',
43 'interface_name' : 'org.openbmc.control.Host',
44 'method_name' : 'boot'
Norman Jamesa3e47c42015-10-18 14:43:10 -050045 },
46 'BMC_READY' : {
47 'bus_name' : 'org.openbmc.control.led',
48 'obj_name' : '/org/openbmc/control/led/BMC_READY',
49 'interface_name' : 'org.openbmc.Led',
50 'method_name' : 'setOn'
Norman Jamesc9239a32015-10-06 16:54:31 -050051 }
52}
53
54SYSTEM_CONFIG = {}
55
Norman James2656f332015-10-26 06:42:41 -050056SYSTEM_CONFIG['org.openbmc.managers.Property'] = {
57 'system_state' : 'BMC_INIT',
58 'start_process' : False,
59 'monitor_process' : False,
60 'process_name' : 'property_manager.py',
61 'heartbeat' : 'no',
62 'instances' : [ { 'name' : SYSTEM_NAME } ]
63 }
64
Norman Jamesc9239a32015-10-06 16:54:31 -050065SYSTEM_CONFIG['org.openbmc.control.Bmc'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050066 'system_state' : 'BMC_INIT',
Norman Jamesc9239a32015-10-06 16:54:31 -050067 'start_process' : True,
68 'monitor_process' : True,
69 'process_name' : 'control_bmc.exe',
70 'heartbeat' : 'no',
71 'instances' : [ { 'name' : 'Bmc_0' } ]
72 }
73
74SYSTEM_CONFIG['org.openbmc.managers.Inventory'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050075 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -050076 'start_process' : True,
77 'monitor_process' : True,
78 'process_name' : 'inventory_items.py',
79 'heartbeat' : 'no',
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',
87 'heartbeat' : 'no',
88 'instances' : [ { 'name' : 'Slots_0' } ]
89 }
Norman James0ee61922015-10-14 09:39:11 -050090SYSTEM_CONFIG['org.openbmc.sensor.Power8Virtual'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -050091 'system_state' : 'BMC_STARTING',
Norman James0ee61922015-10-14 09:39:11 -050092 'start_process' : True,
93 'monitor_process' : True,
94 'process_name' : 'sensors_virtual_p8.py',
95 'heartbeat' : 'no',
Norman Jamesa3e47c42015-10-18 14:43:10 -050096 'instances' : [ { 'name' : 'virtual' } ]
Norman James0ee61922015-10-14 09:39:11 -050097 }
Norman Jamesc9239a32015-10-06 16:54:31 -050098
99SYSTEM_CONFIG['org.openbmc.managers.Sensors'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500100 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500101 'start_process' : True,
102 'monitor_process' : True,
103 'process_name' : 'sensor_manager.py',
104 'heartbeat' : 'no',
Norman James25d80dd2015-10-08 07:02:25 -0500105 'instances' : [ { 'name' : SYSTEM_NAME } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500106 }
107
108SYSTEM_CONFIG['org.openbmc.watchdog.Host'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500109 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500110 'start_process' : True,
111 'monitor_process' : True,
112 'process_name' : 'host_watchdog.exe',
113 'heartbeat' : 'no',
114 'instances' : [
115 {
116 'name' : 'HostWatchdog_0',
117 'properties' : {
118 'org.openbmc.Watchdog' : {
Norman James6ebd39a2015-10-22 07:13:23 -0500119 'poll_interval': 30000,
Norman Jamesc9239a32015-10-06 16:54:31 -0500120 }
121 }
122 }
123 ]
124 }
125
126SYSTEM_CONFIG['org.openbmc.control.Power'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500127 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500128 'start_process' : True,
129 'monitor_process' : True,
130 'process_name' : 'power_control.exe',
Norman James4fa99d42015-10-08 09:21:17 -0500131 'heartbeat' : 'no',
Norman Jamesc9239a32015-10-06 16:54:31 -0500132 'instances' : [
133 {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500134 'name' : 'power0',
Norman Jamesc9239a32015-10-06 16:54:31 -0500135 'user_label': 'Power control',
136 'properties' : {
137 'org.openbmc.Control': {
138 'poll_interval' : 3000
139 },
140 'org.openbmc.control.Power': {
141 'pgood_timeout' : 10
142 }
143 }
144 }
145 ]
146 }
147
Norman Jamesc9239a32015-10-06 16:54:31 -0500148SYSTEM_CONFIG['org.openbmc.buttons.Power'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500149 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500150 'start_process' : True,
151 'monitor_process' : True,
152 'process_name' : 'button_power.exe',
153 'heartbeat' : 'no',
154 'instances' : [ { 'name' : 'PowerButton_0' } ]
155 }
Norman Jamesa3e47c42015-10-18 14:43:10 -0500156SYSTEM_CONFIG['org.openbmc.control.led'] = {
157 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500158 'start_process' : True,
159 'monitor_process' : True,
Norman Jamesa3e47c42015-10-18 14:43:10 -0500160 'process_name' : 'led_controller.exe',
Norman Jamesc9239a32015-10-06 16:54:31 -0500161 'heartbeat' : 'no',
Norman Jamesa3e47c42015-10-18 14:43:10 -0500162 'instances' : [ { 'name' : 'Dummy' } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500163 }
Norman James6ebd39a2015-10-22 07:13:23 -0500164SYSTEM_CONFIG['org.openbmc.control.Flash'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500165 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500166 'start_process' : True,
167 'monitor_process' : True,
168 'process_name' : 'flash_bios.exe',
169 'heartbeat' : 'no',
Norman James6ebd39a2015-10-22 07:13:23 -0500170 'instances' : [ { 'name' : 'dummy' } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500171 }
172
Norman Jamesf066e872015-10-07 15:29:51 -0500173SYSTEM_CONFIG['org.openbmc.manager.Download'] = {
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,
Norman Jamesf066e872015-10-07 15:29:51 -0500177 'process_name' : 'download_manager.py',
Norman Jamesc9239a32015-10-06 16:54:31 -0500178 'heartbeat' : 'no',
Norman James25d80dd2015-10-08 07:02:25 -0500179 'instances' : [ { 'name' : SYSTEM_NAME } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500180 }
181
182SYSTEM_CONFIG['org.openbmc.control.Host'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500183 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500184 'start_process' : True,
185 'monitor_process' : True,
186 'process_name' : 'control_host.exe',
187 'heartbeat' : 'no',
188 'instances' : [ { 'name' : 'Host_0' } ]
189 }
190SYSTEM_CONFIG['org.openbmc.control.Chassis'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500191 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500192 'start_process' : True,
193 'monitor_process' : True,
194 'process_name' : 'chassis_control.py',
195 'heartbeat' : 'no',
Norman Jamesa3e47c42015-10-18 14:43:10 -0500196 'instances' : [ { 'name' : 'chassis0' } ]
Norman Jamesc9239a32015-10-06 16:54:31 -0500197 }
198
199SYSTEM_CONFIG['org.openbmc.vpd'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500200 'system_state' : 'HOST_POWERED_ON',
201 'start_process' : False,
Norman Jamesc9239a32015-10-06 16:54:31 -0500202 'monitor_process' : False,
203 'process_name' : 'board_vpd.exe',
204 'heartbeat' : 'no',
205 'instances' : [ { 'name' : 'MBVPD_0' } ]
206 }
207
Norman Jamesc9239a32015-10-06 16:54:31 -0500208SYSTEM_CONFIG['org.openbmc.sensors.Fan'] = {
Norman Jamesa3e47c42015-10-18 14:43:10 -0500209 'system_state' : 'BMC_STARTING',
Norman Jamesc9239a32015-10-06 16:54:31 -0500210 'start_process' : True,
211 'monitor_process' : True,
212 'process_name' : 'fan.exe',
213 'heartbeat' : 'no',
214 'instances' : [ {'name' : 'Fan_0' }, {'name' : 'Fan_1'}, {'name' : 'Fan_2'} ]
215 }
216
Norman James2656f332015-10-26 06:42:41 -0500217CACHED_INTERFACES = {
218 "org.openbmc.InventoryItem" : True,
219 "org.openbmc.control.Chassis" : True,
220 }
Norman Jamesa3e47c42015-10-18 14:43:10 -0500221INVENTORY_ROOT = '/org/openbmc/inventory'
Norman Jamesc9239a32015-10-06 16:54:31 -0500222
223FRU_INSTANCES = {
224 '<inventory_root>/system' :
Norman James0706ae02015-10-19 16:09:47 -0500225 { 'fru_type' : 'SYSTEM','is_fru' : True, },
Norman Jamesc9239a32015-10-06 16:54:31 -0500226
Norman Jamesa42446a2015-10-19 11:12:45 -0500227 '<inventory_root>/system/chassis' :
Norman James0706ae02015-10-19 16:09:47 -0500228 { 'fru_type' : 'SYSTEM','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500229
230 '<inventory_root>/system/chassis/motherboard' :
Norman James0706ae02015-10-19 16:09:47 -0500231 { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500232
233 '<inventory_root>/system/chassis/fan0' :
Norman James0706ae02015-10-19 16:09:47 -0500234 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500235 '<inventory_root>/system/chassis/fan1' :
Norman James0706ae02015-10-19 16:09:47 -0500236 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500237 '<inventory_root>/system/chassis/fan2' :
Norman James0706ae02015-10-19 16:09:47 -0500238 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500239 '<inventory_root>/system/chassis/fan3' :
Norman James0706ae02015-10-19 16:09:47 -0500240 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500241 '<inventory_root>/system/chassis/fan4' :
Norman James0706ae02015-10-19 16:09:47 -0500242 { 'fru_type' : 'FAN','is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500243
244 '<inventory_root>/system/chassis/motherboard/bmc' :
Norman James0706ae02015-10-19 16:09:47 -0500245 { 'fru_type' : 'BMC','is_fru' : False,
Norman Jamesa42446a2015-10-19 11:12:45 -0500246 'manufacturer' : 'ASPEED' },
247 '<inventory_root>/system/chassis/motherboard/cpu0' :
Norman James0706ae02015-10-19 16:09:47 -0500248 { 'fru_type' : 'CPU', 'is_fru' : True, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500249
250 '<inventory_root>/system/chassis/motherboard/cpu0/core0' :
Norman James0706ae02015-10-19 16:09:47 -0500251 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500252
253 '<inventory_root>/system/chassis/motherboard/cpu0/core1' :
Norman James0706ae02015-10-19 16:09:47 -0500254 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500255
256 '<inventory_root>/system/chassis/motherboard/cpu0/core2' :
Norman James0706ae02015-10-19 16:09:47 -0500257 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500258
259 '<inventory_root>/system/chassis/motherboard/cpu0/core3' :
Norman James0706ae02015-10-19 16:09:47 -0500260 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500261
262 '<inventory_root>/system/chassis/motherboard/cpu0/core4' :
Norman James0706ae02015-10-19 16:09:47 -0500263 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500264
265 '<inventory_root>/system/chassis/motherboard/cpu0/core5' :
Norman James0706ae02015-10-19 16:09:47 -0500266 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500267
268 '<inventory_root>/system/chassis/motherboard/cpu0/core6' :
Norman James0706ae02015-10-19 16:09:47 -0500269 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500270
271 '<inventory_root>/system/chassis/motherboard/cpu0/core7' :
Norman James0706ae02015-10-19 16:09:47 -0500272 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500273
274 '<inventory_root>/system/chassis/motherboard/cpu0/core8' :
Norman James0706ae02015-10-19 16:09:47 -0500275 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500276
277 '<inventory_root>/system/chassis/motherboard/cpu0/core9' :
Norman James0706ae02015-10-19 16:09:47 -0500278 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500279
280 '<inventory_root>/system/chassis/motherboard/cpu0/core10' :
Norman James0706ae02015-10-19 16:09:47 -0500281 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500282
283 '<inventory_root>/system/chassis/motherboard/cpu0/core11' :
Norman James0706ae02015-10-19 16:09:47 -0500284 { 'fru_type' : 'CORE', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500285
286 '<inventory_root>/system/chassis/motherboard/centaur0' :
Norman James0706ae02015-10-19 16:09:47 -0500287 { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
Norman Jamesa42446a2015-10-19 11:12:45 -0500288
289 '<inventory_root>/system/chassis/motherboard/dimm0' :
Norman James0706ae02015-10-19 16:09:47 -0500290 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500291
292 '<inventory_root>/system/chassis/motherboard/dimm1' :
Norman James0706ae02015-10-19 16:09:47 -0500293 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500294
295 '<inventory_root>/system/chassis/motherboard/dimm2' :
Norman James0706ae02015-10-19 16:09:47 -0500296 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500297
298 '<inventory_root>/system/chassis/motherboard/dimm3' :
Norman James0706ae02015-10-19 16:09:47 -0500299 { 'fru_type' : 'DIMM', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500300
301 '<inventory_root>/system/chassis/io_board/pcie_slot0' :
Norman James0706ae02015-10-19 16:09:47 -0500302 { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500303
304 '<inventory_root>/system/chassis/io_board/pcie_slot1' :
Norman James0706ae02015-10-19 16:09:47 -0500305 { 'fru_type' : 'PCIE_CARD', 'is_fru' : True,},
Norman Jamesa42446a2015-10-19 11:12:45 -0500306
Norman Jamesc9239a32015-10-06 16:54:31 -0500307}
308
309ID_LOOKUP = {
310 'FRU' : {
Norman Jamesa42446a2015-10-19 11:12:45 -0500311 0x0d : '<inventory_root>/system/chassis',
312 0x34 : '<inventory_root>/system/chassis/motherboard',
313 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
314 0x02 : '<inventory_root>/system/chassis/motherboard/centaur0',
315 0x03 : '<inventory_root>/system/chassis/motherboard/dimm0',
316 0x04 : '<inventory_root>/system/chassis/motherboard/dimm1',
317 0x05 : '<inventory_root>/system/chassis/motherboard/dimm2',
318 0x06 : '<inventory_root>/system/chassis/motherboard/dimm3',
Norman James2656f332015-10-26 06:42:41 -0500319 0x35 : '<inventory_root>/system',
Norman Jamesc9239a32015-10-06 16:54:31 -0500320 },
Norman Jamesa42446a2015-10-19 11:12:45 -0500321 'FRU_STR' : {
Norman Jamesfe635e82015-10-20 07:47:22 -0500322 'PRODUCT_15' : '<inventory_root>/system',
323 'CHASSIS_2' : '<inventory_root>/system/chassis',
324 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
325 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/centaur0',
326 'PRODUCT_3' : '<inventory_root>/system/chassis/motherboard/dimm0',
327 'PRODUCT_4' : '<inventory_root>/system/chassis/motherboard/dimm1',
328 'PRODUCT_5' : '<inventory_root>/system/chassis/motherboard/dimm2',
329 'PRODUCT_6' : '<inventory_root>/system/chassis/motherboard/dimm3',
Norman Jamesa42446a2015-10-19 11:12:45 -0500330 },
Norman Jamesc9239a32015-10-06 16:54:31 -0500331 'SENSOR' : {
Norman Jamesa42446a2015-10-19 11:12:45 -0500332 0x2f : '<inventory_root>/system/chassis/motherboard/cpu0',
333 0x22 : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
334 0x23 : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
335 0x24 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
336 0x25 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
337 0x26 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
338 0x27 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
339 0x28 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
340 0x29 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
341 0x2a : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
342 0x2b : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
343 0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
344 0x2d : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
345 0x2e : '<inventory_root>/system/chassis/motherboard/centaur0',
346 0x1e : '<inventory_root>/system/chassis/motherboard/dimm0',
347 0x1f : '<inventory_root>/system/chassis/motherboard/dimm1',
348 0x20 : '<inventory_root>/system/chassis/motherboard/dimm2',
349 0x21 : '<inventory_root>/system/chassis/motherboard/dimm3',
Norman James0ee61922015-10-14 09:39:11 -0500350 0x09 : '/org/openbmc/sensor/virtual/BootCount',
351 0x05 : '/org/openbmc/sensor/virtual/BootProgress',
352 0x04 : '/org/openbmc/sensor/virtual/HostStatus',
353 0x08 : '/org/openbmc/sensor/virtual/OccStatus',
354 0x32 : '/org/openbmc/sensor/virtual/OperatingSystemStatus',
Norman Jamesc9239a32015-10-06 16:54:31 -0500355 },
356 'GPIO_PRESENT' : {
Norman Jamesa42446a2015-10-19 11:12:45 -0500357 'SLOT0_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot0',
358 'SLOT1_PRESENT' : '<inventory_root>/system/chassis/io_board/pcie_slot1',
Norman Jamesc9239a32015-10-06 16:54:31 -0500359 }
360}
361
362GPIO_CONFIG = {}
Norman James25d80dd2015-10-08 07:02:25 -0500363GPIO_CONFIG['FSI_CLK'] = { 'gpio_num': 484, 'direction': 'out' }
364GPIO_CONFIG['FSI_DATA'] = { 'gpio_num': 485, 'direction': 'out' }
365GPIO_CONFIG['FSI_ENABLE'] = { 'gpio_num': 504, 'direction': 'out' }
366GPIO_CONFIG['POWER_PIN'] = { 'gpio_num': 449, 'direction': 'out' }
367GPIO_CONFIG['CRONUS_SEL'] = { 'gpio_num': 486, 'direction': 'out' }
368GPIO_CONFIG['PGOOD'] = { 'gpio_num': 503, 'direction': 'in' }
369GPIO_CONFIG['IDENTIFY'] = { 'gpio_num': 365, 'direction': 'out' }
Norman Jamesa3e47c42015-10-18 14:43:10 -0500370GPIO_CONFIG['BMC_READY'] = { 'gpio_num': 365, 'direction': 'out' }
Norman James25d80dd2015-10-08 07:02:25 -0500371GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_num': 448, 'direction': 'falling' }
Norman Jamesc9239a32015-10-06 16:54:31 -0500372GPIO_CONFIG['SLOT0_RISER_PRESENT'] = { 'gpio_num': 104, 'direction': 'in' }
373GPIO_CONFIG['SLOT1_RISER_PRESENT'] = { 'gpio_num': 105, 'direction': 'in' }
374GPIO_CONFIG['SLOT2_RISER_PRESENT'] = { 'gpio_num': 106, 'direction': 'in' }
Norman Jamesa42446a2015-10-19 11:12:45 -0500375GPIO_CONFIG['SLOT0_PRESENT'] = { 'gpio_num': 470, 'direction': 'in' }
376GPIO_CONFIG['SLOT1_PRESENT'] = { 'gpio_num': 471, 'direction': 'in' }
Norman Jamesc9239a32015-10-06 16:54:31 -0500377GPIO_CONFIG['SLOT2_PRESENT'] = { 'gpio_num': 109, 'direction': 'in' }
378GPIO_CONFIG['MEZZ0_PRESENT'] = { 'gpio_num': 112, 'direction': 'in' }
379GPIO_CONFIG['MEZZ1_PRESENT'] = { 'gpio_num': 113, 'direction': 'in' }
380
381