xref: /openbmc/skeleton/configs/Witherspoon.py (revision c14f6fec)
1e5fe522aSYi Li#! /usr/bin/python
2e5fe522aSYi Li
3e5fe522aSYi LiHOME_PATH = './'
4e5fe522aSYi LiGPIO_BASE = 320
5e5fe522aSYi LiSYSTEM_NAME = "Witherspoon"
6e5fe522aSYi Li
7e5fe522aSYi Li
8e5fe522aSYi Li## System states
9e5fe522aSYi Li##   state can change to next state in 2 ways:
10e5fe522aSYi Li##   - a process emits a GotoSystemState signal with state name to goto
11e5fe522aSYi Li##   - objects specified in EXIT_STATE_DEPEND have started
12e5fe522aSYi LiSYSTEM_STATES = [
13e5fe522aSYi Li    'BASE_APPS',
14e5fe522aSYi Li    'BMC_STARTING',
15e5fe522aSYi Li    'BMC_READY',
16e5fe522aSYi Li    'HOST_POWERING_ON',
17e5fe522aSYi Li    'HOST_POWERED_ON',
18e5fe522aSYi Li    'HOST_BOOTING',
19e5fe522aSYi Li    'HOST_BOOTED',
20e5fe522aSYi Li    'HOST_POWERED_OFF',
21e5fe522aSYi Li]
22e5fe522aSYi Li
23e5fe522aSYi LiEXIT_STATE_DEPEND = {
24e5fe522aSYi Li    'BASE_APPS' : {
25e5fe522aSYi Li        '/org/openbmc/sensors': 0,
26e5fe522aSYi Li    },
27e5fe522aSYi Li    'BMC_STARTING' : {
28e5fe522aSYi Li        '/org/openbmc/control/chassis0': 0,
29e5fe522aSYi Li        '/org/openbmc/control/power0' : 0,
30e5fe522aSYi Li        '/org/openbmc/control/host0' : 0,
31e5fe522aSYi Li        '/org/openbmc/control/flash/bios' : 0,
32e5fe522aSYi Li    },
33e5fe522aSYi Li}
34e5fe522aSYi Li
35e5fe522aSYi Li## method will be called when state is entered
36e5fe522aSYi LiENTER_STATE_CALLBACK = {
37e5fe522aSYi Li    'HOST_POWERED_ON' : {
38e5fe522aSYi Li        'boot' : {
39e5fe522aSYi Li            'bus_name'    : 'org.openbmc.control.Host',
40e5fe522aSYi Li            'obj_name'    : '/org/openbmc/control/host0',
41e5fe522aSYi Li            'interface_name' : 'org.openbmc.control.Host',
42e5fe522aSYi Li        },
43e5fe522aSYi Li    },
44e5fe522aSYi Li    'HOST_POWERED_OFF' : {
45e5fe522aSYi Li        'setOff' : {
46e5fe522aSYi Li            'bus_name'   : 'org.openbmc.control.led',
47e5fe522aSYi Li            'obj_name'   : '/org/openbmc/control/led/identify',
48e5fe522aSYi Li            'interface_name' : 'org.openbmc.Led',
49e5fe522aSYi Li        }
50e5fe522aSYi Li    },
51e5fe522aSYi Li    'BMC_READY' : {
52e5fe522aSYi Li        'setOn' : {
53e5fe522aSYi Li            'bus_name'   : 'org.openbmc.control.led',
54e5fe522aSYi Li            'obj_name'   : '/org/openbmc/control/led/beep',
55e5fe522aSYi Li            'interface_name' : 'org.openbmc.Led',
56e5fe522aSYi Li        },
57e5fe522aSYi Li        'init' : {
58e5fe522aSYi Li            'bus_name'   : 'org.openbmc.control.Flash',
59e5fe522aSYi Li            'obj_name'   : '/org/openbmc/control/flash/bios',
60e5fe522aSYi Li            'interface_name' : 'org.openbmc.Flash',
61e5fe522aSYi Li        }
62e5fe522aSYi Li    }
63e5fe522aSYi Li}
64e5fe522aSYi Li
65e5fe522aSYi LiAPPS = {
66e5fe522aSYi Li    'startup_hacks' : {
67e5fe522aSYi Li        'system_state'    : 'BASE_APPS',
68e5fe522aSYi Li        'start_process'   : True,
69e5fe522aSYi Li        'monitor_process' : False,
70e5fe522aSYi Li        'process_name'    : 'startup_hacks.sh',
71e5fe522aSYi Li    },
72e5fe522aSYi Li    'inventory' : {
73e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
74e5fe522aSYi Li        'start_process'   : True,
75e5fe522aSYi Li        'monitor_process' : True,
76e5fe522aSYi Li        'process_name'    : 'inventory_items.py',
77e5fe522aSYi Li        'args'            : [ SYSTEM_NAME ]
78e5fe522aSYi Li    },
79e5fe522aSYi Li    'hwmon' : {
80e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
81e5fe522aSYi Li        'start_process'   : True,
82e5fe522aSYi Li        'monitor_process' : True,
83e5fe522aSYi Li        'process_name'    : 'hwmon.py',
84e5fe522aSYi Li        'args'            : [ SYSTEM_NAME ]
85e5fe522aSYi Li    },
86e5fe522aSYi Li    'sensor_manager' : {
87e5fe522aSYi Li        'system_state'    : 'BASE_APPS',
88e5fe522aSYi Li        'start_process'   : True,
89e5fe522aSYi Li        'monitor_process' : True,
90e5fe522aSYi Li        'process_name'    : 'sensor_manager2.py',
91e5fe522aSYi Li        'args'            : [ SYSTEM_NAME ]
92e5fe522aSYi Li    },
93e5fe522aSYi Li    'host_watchdog' : {
94e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
95e5fe522aSYi Li        'start_process'   : True,
96e5fe522aSYi Li        'monitor_process' : True,
97e5fe522aSYi Li        'process_name'    : 'host_watchdog.exe',
98e5fe522aSYi Li    },
99e5fe522aSYi Li    'power_control' : {
100e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
101e5fe522aSYi Li        'start_process'   : True,
102e5fe522aSYi Li        'monitor_process' : True,
103e5fe522aSYi Li        'process_name' : 'power_control.exe',
104e5fe522aSYi Li        'args' : [ '3000', '10' ]
105e5fe522aSYi Li    },
106e5fe522aSYi Li    'power_button' : {
107e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
108e5fe522aSYi Li        'start_process'   : True,
109e5fe522aSYi Li        'monitor_process' : True,
110e5fe522aSYi Li        'process_name'    : 'button_power.exe',
111e5fe522aSYi Li    },
112e5fe522aSYi Li    'reset_button' : {
113e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
114e5fe522aSYi Li        'start_process'   : True,
115e5fe522aSYi Li        'monitor_process' : True,
116e5fe522aSYi Li        'process_name'    : 'button_reset.exe',
117e5fe522aSYi Li    },
118b4140b88SAdriana Kobylak    'host_checkstop' : {
119b4140b88SAdriana Kobylak        'system_state'    : 'BMC_STARTING',
120b4140b88SAdriana Kobylak        'start_process'   : True,
121b4140b88SAdriana Kobylak        'monitor_process' : True,
122b4140b88SAdriana Kobylak        'process_name'    : 'host_checkstop.exe',
123b4140b88SAdriana Kobylak    },
124e5fe522aSYi Li    'led_control' : {
125e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
126e5fe522aSYi Li        'start_process'   : True,
127e5fe522aSYi Li        'monitor_process' : True,
128e5fe522aSYi Li        'process_name'    : 'led_controller.exe',
129e5fe522aSYi Li    },
130e5fe522aSYi Li    'flash_control' : {
131e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
132e5fe522aSYi Li        'start_process'   : True,
133e5fe522aSYi Li        'monitor_process' : True,
134e5fe522aSYi Li        'process_name'    : 'flash_bios.exe',
135e5fe522aSYi Li    },
136e5fe522aSYi Li    'bmc_flash_control' : {
137e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
138e5fe522aSYi Li        'start_process'   : True,
139e5fe522aSYi Li        'monitor_process' : True,
140e5fe522aSYi Li        'process_name'    : 'bmc_update.py',
141e5fe522aSYi Li    },
142e5fe522aSYi Li    'download_manager' : {
143e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
144e5fe522aSYi Li        'start_process'   : True,
145e5fe522aSYi Li        'monitor_process' : True,
146e5fe522aSYi Li        'process_name'    : 'download_manager.py',
147e5fe522aSYi Li        'args'            : [ SYSTEM_NAME ]
148e5fe522aSYi Li    },
149e5fe522aSYi Li    'host_control' : {
150e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
151e5fe522aSYi Li        'start_process'   : True,
152e5fe522aSYi Li        'monitor_process' : True,
153e5fe522aSYi Li        'process_name'    : 'control_host.exe',
154e5fe522aSYi Li    },
155e5fe522aSYi Li    'chassis_control' : {
156e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
157e5fe522aSYi Li        'start_process'   : True,
158e5fe522aSYi Li        'monitor_process' : True,
159e5fe522aSYi Li        'process_name'    : 'chassis_control.py',
160e5fe522aSYi Li    },
161e5fe522aSYi Li    'restore' : {
162e5fe522aSYi Li        'system_state'    : 'BMC_READY',
163e5fe522aSYi Li        'start_process'   : True,
164e5fe522aSYi Li        'monitor_process' : False,
165e5fe522aSYi Li        'process_name'    : 'discover_system_state.py',
166e5fe522aSYi Li    },
167e5fe522aSYi Li    'bmc_control' : {
168e5fe522aSYi Li        'system_state'    : 'BMC_STARTING',
169e5fe522aSYi Li        'start_process'   : True,
170e5fe522aSYi Li        'monitor_process' : True,
171e5fe522aSYi Li        'process_name'    : 'control_bmc.exe',
172e5fe522aSYi Li    },
173e5fe522aSYi Li}
174e5fe522aSYi Li
175e5fe522aSYi LiCACHED_INTERFACES = {
176e5fe522aSYi Li        "org.openbmc.InventoryItem" : True,
177e5fe522aSYi Li        "org.openbmc.control.Chassis" : True,
178e5fe522aSYi Li}
179e5fe522aSYi Li
180e5fe522aSYi LiINVENTORY_ROOT = '/org/openbmc/inventory'
181e5fe522aSYi Li
182e5fe522aSYi LiFRU_INSTANCES = {
183e5fe522aSYi Li    '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
184e5fe522aSYi Li    '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
185e5fe522aSYi Li    '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
186e5fe522aSYi Li
187e5fe522aSYi Li    '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
188e5fe522aSYi Li
189e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
190e5fe522aSYi Li
191e5fe522aSYi Li    '<inventory_root>/system/systemevent'                  : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
192e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
193e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
194e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
195e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/apss'     : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
196e5fe522aSYi Li
197e5fe522aSYi Li    '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
198e5fe522aSYi Li    '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
199e5fe522aSYi Li    '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
200e5fe522aSYi Li    '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
201e5fe522aSYi Li
202e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
203e5fe522aSYi Li
204e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
205e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
206e5fe522aSYi Li
207e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
208e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
209e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
210e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
211e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
212e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
213e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
214e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
215e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
216e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
217e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, },
218e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, },
219e5fe522aSYi Li
220e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
221e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
222e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
223e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
224e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
225e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
226e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
227e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
228e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
229e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
230e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
231e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
232e5fe522aSYi Li
233e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
234e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
235e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
236e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
237e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
238e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
239e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
240e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
241e5fe522aSYi Li
242e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
243e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
244e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
245e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
246e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
247e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
248e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
249e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
250e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
251e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
252e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
253e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
254e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
255e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
256e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
257e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
258e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
259e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
260e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
261e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
262e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
263e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
264e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
265e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
266e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
267e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
268e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
269e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
270e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
271e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
272e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
273e5fe522aSYi Li    '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
274e5fe522aSYi Li}
275e5fe522aSYi Li
276e5fe522aSYi LiID_LOOKUP = {
277e5fe522aSYi Li    'FRU' : {
278e5fe522aSYi Li        0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
279e5fe522aSYi Li        0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
280e5fe522aSYi Li        0x03 : '<inventory_root>/system/chassis/motherboard',
281e5fe522aSYi Li        0x04 : '<inventory_root>/system/chassis/motherboard/membuf0',
282e5fe522aSYi Li        0x05 : '<inventory_root>/system/chassis/motherboard/membuf1',
283e5fe522aSYi Li        0x06 : '<inventory_root>/system/chassis/motherboard/membuf2',
284e5fe522aSYi Li        0x07 : '<inventory_root>/system/chassis/motherboard/membuf3',
285e5fe522aSYi Li        0x08 : '<inventory_root>/system/chassis/motherboard/membuf4',
286e5fe522aSYi Li        0x09 : '<inventory_root>/system/chassis/motherboard/membuf5',
287e5fe522aSYi Li        0x0c : '<inventory_root>/system/chassis/motherboard/dimm0',
288e5fe522aSYi Li        0x0d : '<inventory_root>/system/chassis/motherboard/dimm1',
289e5fe522aSYi Li        0x0e : '<inventory_root>/system/chassis/motherboard/dimm2',
290e5fe522aSYi Li        0x0f : '<inventory_root>/system/chassis/motherboard/dimm3',
291e5fe522aSYi Li        0x10 : '<inventory_root>/system/chassis/motherboard/dimm4',
292e5fe522aSYi Li        0x11 : '<inventory_root>/system/chassis/motherboard/dimm5',
293e5fe522aSYi Li        0x12 : '<inventory_root>/system/chassis/motherboard/dimm6',
294e5fe522aSYi Li        0x13 : '<inventory_root>/system/chassis/motherboard/dimm7',
295e5fe522aSYi Li        0x14 : '<inventory_root>/system/chassis/motherboard/dimm8',
296e5fe522aSYi Li        0x15 : '<inventory_root>/system/chassis/motherboard/dimm9',
297e5fe522aSYi Li        0x16 : '<inventory_root>/system/chassis/motherboard/dimm10',
298e5fe522aSYi Li        0x17 : '<inventory_root>/system/chassis/motherboard/dimm11',
299e5fe522aSYi Li        0x18 : '<inventory_root>/system/chassis/motherboard/dimm12',
300e5fe522aSYi Li        0x19 : '<inventory_root>/system/chassis/motherboard/dimm13',
301e5fe522aSYi Li        0x1a : '<inventory_root>/system/chassis/motherboard/dimm14',
302e5fe522aSYi Li        0x1b : '<inventory_root>/system/chassis/motherboard/dimm15',
303e5fe522aSYi Li        0x1c : '<inventory_root>/system/chassis/motherboard/dimm16',
304e5fe522aSYi Li        0x1d : '<inventory_root>/system/chassis/motherboard/dimm17',
305e5fe522aSYi Li        0x1e : '<inventory_root>/system/chassis/motherboard/dimm18',
306e5fe522aSYi Li        0x1f : '<inventory_root>/system/chassis/motherboard/dimm19',
307e5fe522aSYi Li        0x20 : '<inventory_root>/system/chassis/motherboard/dimm20',
308e5fe522aSYi Li        0x21 : '<inventory_root>/system/chassis/motherboard/dimm21',
309e5fe522aSYi Li        0x22 : '<inventory_root>/system/chassis/motherboard/dimm22',
310e5fe522aSYi Li        0x23 : '<inventory_root>/system/chassis/motherboard/dimm23',
311e5fe522aSYi Li        0x24 : '<inventory_root>/system/chassis/motherboard/dimm24',
312e5fe522aSYi Li        0x25 : '<inventory_root>/system/chassis/motherboard/dimm25',
313e5fe522aSYi Li        0x26 : '<inventory_root>/system/chassis/motherboard/dimm26',
314e5fe522aSYi Li        0x27 : '<inventory_root>/system/chassis/motherboard/dimm27',
315e5fe522aSYi Li        0x28 : '<inventory_root>/system/chassis/motherboard/dimm28',
316e5fe522aSYi Li        0x29 : '<inventory_root>/system/chassis/motherboard/dimm29',
317e5fe522aSYi Li        0x2a : '<inventory_root>/system/chassis/motherboard/dimm30',
318e5fe522aSYi Li        0x2b : '<inventory_root>/system/chassis/motherboard/dimm31',
319e5fe522aSYi Li    },
320e5fe522aSYi Li    'FRU_STR' : {
321e5fe522aSYi Li        'PRODUCT_0'  : '<inventory_root>/system/bios',
322e5fe522aSYi Li        'BOARD_1'    : '<inventory_root>/system/chassis/motherboard/cpu0',
323e5fe522aSYi Li        'BOARD_2'    : '<inventory_root>/system/chassis/motherboard/cpu1',
324e5fe522aSYi Li        'CHASSIS_3'  : '<inventory_root>/system/chassis/motherboard',
325e5fe522aSYi Li        'BOARD_3'    : '<inventory_root>/system/misc',
326e5fe522aSYi Li        'BOARD_4'    : '<inventory_root>/system/chassis/motherboard/membuf0',
327e5fe522aSYi Li        'BOARD_5'    : '<inventory_root>/system/chassis/motherboard/membuf1',
328e5fe522aSYi Li        'BOARD_6'    : '<inventory_root>/system/chassis/motherboard/membuf2',
329e5fe522aSYi Li        'BOARD_7'    : '<inventory_root>/system/chassis/motherboard/membuf3',
330e5fe522aSYi Li        'BOARD_8'    : '<inventory_root>/system/chassis/motherboard/membuf4',
331e5fe522aSYi Li        'BOARD_9'    : '<inventory_root>/system/chassis/motherboard/membuf5',
332e5fe522aSYi Li        'BOARD_10'   : '<inventory_root>/system/chassis/motherboard/membuf6',
333e5fe522aSYi Li        'BOARD_11'   : '<inventory_root>/system/chassis/motherboard/membuf7',
334e5fe522aSYi Li        'PRODUCT_12'   : '<inventory_root>/system/chassis/motherboard/dimm0',
335e5fe522aSYi Li        'PRODUCT_13'   : '<inventory_root>/system/chassis/motherboard/dimm1',
336e5fe522aSYi Li        'PRODUCT_14'   : '<inventory_root>/system/chassis/motherboard/dimm2',
337e5fe522aSYi Li        'PRODUCT_15'   : '<inventory_root>/system/chassis/motherboard/dimm3',
338e5fe522aSYi Li        'PRODUCT_16'   : '<inventory_root>/system/chassis/motherboard/dimm4',
339e5fe522aSYi Li        'PRODUCT_17'   : '<inventory_root>/system/chassis/motherboard/dimm5',
340e5fe522aSYi Li        'PRODUCT_18'   : '<inventory_root>/system/chassis/motherboard/dimm6',
341e5fe522aSYi Li        'PRODUCT_19'   : '<inventory_root>/system/chassis/motherboard/dimm7',
342e5fe522aSYi Li        'PRODUCT_20'   : '<inventory_root>/system/chassis/motherboard/dimm8',
343e5fe522aSYi Li        'PRODUCT_21'   : '<inventory_root>/system/chassis/motherboard/dimm9',
344e5fe522aSYi Li        'PRODUCT_22'   : '<inventory_root>/system/chassis/motherboard/dimm10',
345e5fe522aSYi Li        'PRODUCT_23'   : '<inventory_root>/system/chassis/motherboard/dimm11',
346e5fe522aSYi Li        'PRODUCT_24'   : '<inventory_root>/system/chassis/motherboard/dimm12',
347e5fe522aSYi Li        'PRODUCT_25'   : '<inventory_root>/system/chassis/motherboard/dimm13',
348e5fe522aSYi Li        'PRODUCT_26'   : '<inventory_root>/system/chassis/motherboard/dimm14',
349e5fe522aSYi Li        'PRODUCT_27'   : '<inventory_root>/system/chassis/motherboard/dimm15',
350e5fe522aSYi Li        'PRODUCT_28'   : '<inventory_root>/system/chassis/motherboard/dimm16',
351e5fe522aSYi Li        'PRODUCT_29'   : '<inventory_root>/system/chassis/motherboard/dimm17',
352e5fe522aSYi Li        'PRODUCT_30'   : '<inventory_root>/system/chassis/motherboard/dimm18',
353e5fe522aSYi Li        'PRODUCT_31'   : '<inventory_root>/system/chassis/motherboard/dimm19',
354e5fe522aSYi Li        'PRODUCT_32'   : '<inventory_root>/system/chassis/motherboard/dimm20',
355e5fe522aSYi Li        'PRODUCT_33'   : '<inventory_root>/system/chassis/motherboard/dimm21',
356e5fe522aSYi Li        'PRODUCT_34'   : '<inventory_root>/system/chassis/motherboard/dimm22',
357e5fe522aSYi Li        'PRODUCT_35'   : '<inventory_root>/system/chassis/motherboard/dimm23',
358e5fe522aSYi Li        'PRODUCT_36'   : '<inventory_root>/system/chassis/motherboard/dimm24',
359e5fe522aSYi Li        'PRODUCT_37'   : '<inventory_root>/system/chassis/motherboard/dimm25',
360e5fe522aSYi Li        'PRODUCT_38'   : '<inventory_root>/system/chassis/motherboard/dimm26',
361e5fe522aSYi Li        'PRODUCT_39'   : '<inventory_root>/system/chassis/motherboard/dimm27',
362e5fe522aSYi Li        'PRODUCT_40'   : '<inventory_root>/system/chassis/motherboard/dimm28',
363e5fe522aSYi Li        'PRODUCT_41'   : '<inventory_root>/system/chassis/motherboard/dimm29',
364e5fe522aSYi Li        'PRODUCT_42'   : '<inventory_root>/system/chassis/motherboard/dimm30',
365e5fe522aSYi Li        'PRODUCT_43'   : '<inventory_root>/system/chassis/motherboard/dimm31',
366e5fe522aSYi Li        'PRODUCT_47'   : '<inventory_root>/system/misc',
367e5fe522aSYi Li    },
368e5fe522aSYi Li    'SENSOR' : {
369e5fe522aSYi Li        0x04 : '/org/openbmc/sensors/host/HostStatus',
370e5fe522aSYi Li        0x05 : '/org/openbmc/sensors/host/BootProgress',
371e5fe522aSYi Li        0x08 : '/org/openbmc/sensors/host/cpu0/OccStatus',
372e5fe522aSYi Li        0x09 : '/org/openbmc/sensors/host/cpu1/OccStatus',
373e5fe522aSYi Li        0x0c : '<inventory_root>/system/chassis/motherboard/cpu0',
374e5fe522aSYi Li        0x0e : '<inventory_root>/system/chassis/motherboard/cpu1',
375e5fe522aSYi Li        0x1e : '<inventory_root>/system/chassis/motherboard/dimm3',
376e5fe522aSYi Li        0x1f : '<inventory_root>/system/chassis/motherboard/dimm2',
377e5fe522aSYi Li        0x20 : '<inventory_root>/system/chassis/motherboard/dimm1',
378e5fe522aSYi Li        0x21 : '<inventory_root>/system/chassis/motherboard/dimm0',
379e5fe522aSYi Li        0x22 : '<inventory_root>/system/chassis/motherboard/dimm7',
380e5fe522aSYi Li        0x23 : '<inventory_root>/system/chassis/motherboard/dimm6',
381e5fe522aSYi Li        0x24 : '<inventory_root>/system/chassis/motherboard/dimm5',
382e5fe522aSYi Li        0x25 : '<inventory_root>/system/chassis/motherboard/dimm4',
383e5fe522aSYi Li        0x26 : '<inventory_root>/system/chassis/motherboard/dimm11',
384e5fe522aSYi Li        0x27 : '<inventory_root>/system/chassis/motherboard/dimm10',
385e5fe522aSYi Li        0x28 : '<inventory_root>/system/chassis/motherboard/dimm9',
386e5fe522aSYi Li        0x29 : '<inventory_root>/system/chassis/motherboard/dimm8',
387e5fe522aSYi Li        0x2a : '<inventory_root>/system/chassis/motherboard/dimm15',
388e5fe522aSYi Li        0x2b : '<inventory_root>/system/chassis/motherboard/dimm14',
389e5fe522aSYi Li        0x2c : '<inventory_root>/system/chassis/motherboard/dimm13',
390e5fe522aSYi Li        0x2d : '<inventory_root>/system/chassis/motherboard/dimm12',
391e5fe522aSYi Li        0x2e : '<inventory_root>/system/chassis/motherboard/dimm19',
392e5fe522aSYi Li        0x2f : '<inventory_root>/system/chassis/motherboard/dimm18',
393e5fe522aSYi Li        0x30 : '<inventory_root>/system/chassis/motherboard/dimm17',
394e5fe522aSYi Li        0x31 : '<inventory_root>/system/chassis/motherboard/dimm16',
395e5fe522aSYi Li        0x32 : '<inventory_root>/system/chassis/motherboard/dimm23',
396e5fe522aSYi Li        0x33 : '<inventory_root>/system/chassis/motherboard/dimm22',
397e5fe522aSYi Li        0x34 : '<inventory_root>/system/chassis/motherboard/dimm21',
398e5fe522aSYi Li        0x35 : '<inventory_root>/system/chassis/motherboard/dimm20',
399e5fe522aSYi Li        0x36 : '<inventory_root>/system/chassis/motherboard/dimm27',
400e5fe522aSYi Li        0x37 : '<inventory_root>/system/chassis/motherboard/dimm26',
401e5fe522aSYi Li        0x38 : '<inventory_root>/system/chassis/motherboard/dimm25',
402e5fe522aSYi Li        0x39 : '<inventory_root>/system/chassis/motherboard/dimm24',
403e5fe522aSYi Li        0x3a : '<inventory_root>/system/chassis/motherboard/dimm31',
404e5fe522aSYi Li        0x3b : '<inventory_root>/system/chassis/motherboard/dimm30',
405e5fe522aSYi Li        0x3c : '<inventory_root>/system/chassis/motherboard/dimm29',
406e5fe522aSYi Li        0x3d : '<inventory_root>/system/chassis/motherboard/dimm28',
407e5fe522aSYi Li        0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
408e5fe522aSYi Li        0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
409e5fe522aSYi Li        0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
410e5fe522aSYi Li        0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
411e5fe522aSYi Li        0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
412e5fe522aSYi Li        0x43 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
413e5fe522aSYi Li        0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
414e5fe522aSYi Li        0x45 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
415e5fe522aSYi Li        0x46 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
416e5fe522aSYi Li        0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
417e5fe522aSYi Li        0x48 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
418e5fe522aSYi Li        0x49 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
419e5fe522aSYi Li        0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
420e5fe522aSYi Li        0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
421e5fe522aSYi Li        0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
422e5fe522aSYi Li        0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
423e5fe522aSYi Li        0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
424e5fe522aSYi Li        0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
425e5fe522aSYi Li        0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
426e5fe522aSYi Li        0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
427e5fe522aSYi Li        0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
428e5fe522aSYi Li        0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
429e5fe522aSYi Li        0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
430e5fe522aSYi Li        0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
431e5fe522aSYi Li        0x56 : '<inventory_root>/system/chassis/motherboard/membuf0',
432e5fe522aSYi Li        0x57 : '<inventory_root>/system/chassis/motherboard/membuf1',
433e5fe522aSYi Li        0x58 : '<inventory_root>/system/chassis/motherboard/membuf2',
434e5fe522aSYi Li        0x59 : '<inventory_root>/system/chassis/motherboard/membuf3',
435e5fe522aSYi Li        0x5a : '<inventory_root>/system/chassis/motherboard/membuf4',
436e5fe522aSYi Li        0x5b : '<inventory_root>/system/chassis/motherboard/membuf5',
437e5fe522aSYi Li        0x5c : '<inventory_root>/system/chassis/motherboard/membuf6',
438e5fe522aSYi Li        0x5d : '<inventory_root>/system/chassis/motherboard/membuf7',
439e5fe522aSYi Li        0x5f : '/org/openbmc/sensors/host/BootCount',
440e5fe522aSYi Li        0x60 : '<inventory_root>/system/chassis/motherboard',
441e5fe522aSYi Li        0x61 : '<inventory_root>/system/systemevent',
442e5fe522aSYi Li        0x62 : '<inventory_root>/system/powerlimit',
443e5fe522aSYi Li        0x63 : '<inventory_root>/system/chassis/motherboard/refclock',
444e5fe522aSYi Li        0x64 : '<inventory_root>/system/chassis/motherboard/pcieclock',
445e5fe522aSYi Li        0xb1 : '<inventory_root>/system/chassis/motherboard/todclock',
446e5fe522aSYi Li        0xb2 : '<inventory_root>/system/chassis/motherboard/apss',
447e5fe522aSYi Li        0xb3 : '/org/openbmc/sensors/host/powercap',
448e5fe522aSYi Li        0xb5 : '/org/openbmc/sensors/host/OperatingSystemStatus',
449e5fe522aSYi Li        0xb6 : '<inventory_root>/system/chassis/motherboard/pcielink',
450e5fe522aSYi Li    },
451e5fe522aSYi Li    'GPIO_PRESENT' : {}
452e5fe522aSYi Li}
453e5fe522aSYi Li
454e5fe522aSYi LiGPIO_CONFIG = {}
455e5fe522aSYi LiGPIO_CONFIG['BMC_POWER_UP'] = \
456e5fe522aSYi Li        {'gpio_pin': 'D1', 'direction': 'out'}
457e5fe522aSYi LiGPIO_CONFIG['SYS_PWROK_BUFF'] = \
458e5fe522aSYi Li        {'gpio_pin': 'D2', 'direction': 'in'}
459e5fe522aSYi LiGPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
460e5fe522aSYi Li        {'gpio_pin': 'N5', 'direction': 'out'}
461b4140b88SAdriana KobylakGPIO_CONFIG['CHECKSTOP'] = \
462b4140b88SAdriana Kobylak        {'gpio_pin': 'J2', 'direction': 'falling'}
463e5fe522aSYi Li
464e5fe522aSYi Li# witherspoon: not connect
465e5fe522aSYi Li#GPIO_CONFIG['CM1_OE_R_N'] = \
466e5fe522aSYi Li#        {'gpio_pin': 'A2', 'direction': 'out'}
467e5fe522aSYi Li
468e5fe522aSYi LiGPIO_CONFIG['BMC_CP0_RESET_N'] = \
469e5fe522aSYi Li        {'gpio_pin': 'A1', 'direction': 'out'}
470e5fe522aSYi Li
471e5fe522aSYi Li# witherspoon: No centaur
472e5fe522aSYi Li#GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = \
473e5fe522aSYi Li#        {'gpio_pin': 'J2', 'direction': 'out'}
474e5fe522aSYi Li
475e5fe522aSYi Li
476e5fe522aSYi Li# FIXME: reset pcie switch, looks like BMC_VS1_PERST_N , see workbook fig.46
477e5fe522aSYi Li#GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = \
478e5fe522aSYi Li#        {'gpio_pin': 'B7', 'direction': 'out'}
479e5fe522aSYi LiGPIO_CONFIG['BMC_VS1_PERST_N'] = \
480e5fe522aSYi Li        {'gpio_pin': 'B7', 'direction': 'out'}
481e5fe522aSYi Li
482e5fe522aSYi Li# FIXME: reset pcie slots, looks like BMC_CP0_PERST_ENABLE_R, see workbook fig.46
483e5fe522aSYi Li# firestone: gpiog1, gpiog2
484e5fe522aSYi Li#GPIO_CONFIG['CP0_DEVICES_RESET_N'] = \
485e5fe522aSYi Li#        {'gpio_pin': 'B1', 'direction': 'out'}
486e5fe522aSYi Li# FIXME: G2 for Firestone.. Witherspoon: no
487e5fe522aSYi Li#GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \
488e5fe522aSYi Li#        {'gpio_pin': 'A1', 'direction': 'out'}
489e5fe522aSYi LiGPIO_CONFIG['BMC_CP0_PERST_ENABLE_R'] = \
490e5fe522aSYi Li        {'gpio_pin': 'A3', 'direction': 'out'}
491e5fe522aSYi Li
492e5fe522aSYi Li#FIXME: witherspoon: SOFT_FSI_CLK: AA0, SOFT_FSI_DAT: E0, see workbook fig.44
493e5fe522aSYi LiGPIO_CONFIG['FSI_DATA'] = \
494e5fe522aSYi Li        {'gpio_pin': 'E0', 'direction': 'out'}
495e5fe522aSYi LiGPIO_CONFIG['FSI_CLK'] = \
496e5fe522aSYi Li        {'gpio_pin': 'AA0', 'direction': 'out'}
497e5fe522aSYi LiGPIO_CONFIG['FSI_ENABLE'] = \
498e5fe522aSYi Li        {'gpio_pin': 'D0', 'direction': 'out'}
499e5fe522aSYi Li
500e5fe522aSYi Li# FIXME: both witherspoon and garrison, gpioa6 is FSI_JMFG0_PRSNT_N
501e5fe522aSYi LiGPIO_CONFIG['CRONUS_SEL'] = \
502e5fe522aSYi Li        {'gpio_pin': 'A6', 'direction': 'out'}
503e5fe522aSYi Li
504e5fe522aSYi Li# FIXME: ?? firestone gpioj3 is NC
505e5fe522aSYi Li#GPIO_CONFIG['BMC_THROTTLE'] = \
506e5fe522aSYi Li#        {'gpio_pin': 'J3', 'direction': 'out'}
507e5fe522aSYi Li
508e5fe522aSYi Li#FIXME: ?? witherspoon: FP_ID_BTN_N_R, firestone: PD_BMC_IDBTN_IN_OUT_N - it is not connected
509e5fe522aSYi LiGPIO_CONFIG['IDBTN']       = \
510e5fe522aSYi Li    { 'gpio_pin': 'Q7', 'direction': 'out' }
511e5fe522aSYi Li
512e5fe522aSYi Li#FIXME: witherspoon: FP_PWR_BTN_N, firstone: NC_BMC_PWBTN_IN_N gpioe0 - not connected
513e5fe522aSYi LiGPIO_CONFIG['POWER_BUTTON'] = \
514e5fe522aSYi Li        {'gpio_pin': 'I3', 'direction': 'both'}
515e5fe522aSYi Li# witherspoon: BMC_NMIBTN_IN_N, firestone: BMC_NMIBTN_IN_N
516e5fe522aSYi LiGPIO_CONFIG['RESET_BUTTON'] = \
517e5fe522aSYi Li        {'gpio_pin': 'J1', 'direction': 'both'}
518e5fe522aSYi Li
519e5fe522aSYi LiGPIO_CONFIG['PS0_PRES_N'] = \
520e5fe522aSYi Li        {'gpio_pin': 'P7', 'direction': 'in'}
521e5fe522aSYi LiGPIO_CONFIG['PS1_PRES_N'] = \
522e5fe522aSYi Li        {'gpio_pin': 'N0', 'direction': 'in'}
523e5fe522aSYi Li# witherspoon: CARD_PRES_N
524e5fe522aSYi LiGPIO_CONFIG['CARD_PRES_N'] = \
525e5fe522aSYi Li        {'gpio_pin': 'I0', 'direction': 'in'}
526e5fe522aSYi Li
527e5fe522aSYi Lidef convertGpio(name):
528e5fe522aSYi Li    name = name.upper()
529e5fe522aSYi Li    c = name[0:1]
530e5fe522aSYi Li    offset = int(name[1:])
531e5fe522aSYi Li    a = ord(c)-65
532e5fe522aSYi Li    base = a*8+GPIO_BASE
533e5fe522aSYi Li    return base+offset
534e5fe522aSYi Li
535e5fe522aSYi Li
536e5fe522aSYi LiHWMON_CONFIG = {
537e5fe522aSYi Li    '4-0050' : {
538e5fe522aSYi Li        'names' : {
539e5fe522aSYi Li            'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
540e5fe522aSYi Li            'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
541e5fe522aSYi Li            'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
542e5fe522aSYi Li            'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
543e5fe522aSYi Li            'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
544e5fe522aSYi Li            'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
545e5fe522aSYi Li        },
546e5fe522aSYi Li        'labels' : {
547*c14f6fecSEdward A. James        '176' :  { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
548e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
549*c14f6fecSEdward A. James        '177' :  { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
550e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
551*c14f6fecSEdward A. James        '178' :  { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
552e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
553*c14f6fecSEdward A. James        '179' :  { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
554e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
555*c14f6fecSEdward A. James        '180' :  { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
556e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
557*c14f6fecSEdward A. James        '181' :  { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
558e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
559*c14f6fecSEdward A. James        '182' :  { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
560e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
561*c14f6fecSEdward A. James        '183' :  { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
562e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
563*c14f6fecSEdward A. James        '184' :  { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
564e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
565*c14f6fecSEdward A. James        '185' :  { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
566e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
567*c14f6fecSEdward A. James        '186' :  { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
568e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
569*c14f6fecSEdward A. James        '187' :  { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
570e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
571*c14f6fecSEdward A. James        '102' :  { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
572*c14f6fecSEdward A. James        '103' :  { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
573*c14f6fecSEdward A. James        '104' :  { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
574*c14f6fecSEdward A. James        '105' :  { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
575*c14f6fecSEdward A. James        '106' :  { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
576*c14f6fecSEdward A. James        '107' :  { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
577*c14f6fecSEdward A. James        '108' :  { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
578*c14f6fecSEdward A. James        '109' :  { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
579*c14f6fecSEdward A. James        '110' :  { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
580*c14f6fecSEdward A. James        '111' :  { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
581*c14f6fecSEdward A. James        '112' :  { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
582*c14f6fecSEdward A. James        '113' :  { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
583*c14f6fecSEdward A. James        '114' :  { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
584*c14f6fecSEdward A. James        '115' :  { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
585*c14f6fecSEdward A. James        '116' :  { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
586*c14f6fecSEdward A. James        '117' :  { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
587*c14f6fecSEdward A. James        '94' :  { 'object_path' : 'temperature/membuf0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
588*c14f6fecSEdward A. James        '95' :  { 'object_path' : 'temperature/membuf1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
589*c14f6fecSEdward A. James        '96' :  { 'object_path' : 'temperature/membuf2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
590*c14f6fecSEdward A. James        '97' :  { 'object_path' : 'temperature/membuf3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
591e5fe522aSYi Li        }
592e5fe522aSYi Li    },
593e5fe522aSYi Li    '5-0050' : {
594e5fe522aSYi Li        'labels' :  {
595*c14f6fecSEdward A. James        '188' :  { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
596e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
597*c14f6fecSEdward A. James        '189' :  { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
598e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
599*c14f6fecSEdward A. James        '190' :  { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
600e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
601*c14f6fecSEdward A. James        '191' :  { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
602e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
603*c14f6fecSEdward A. James        '192' :  { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
604e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
605*c14f6fecSEdward A. James        '193' :  { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
606e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
607*c14f6fecSEdward A. James        '194' :  { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
608e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
609*c14f6fecSEdward A. James        '195' :  { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
610e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
611*c14f6fecSEdward A. James        '196' :  { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
612e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
613*c14f6fecSEdward A. James        '197' :  { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
614e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
615*c14f6fecSEdward A. James        '198' :  { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
616e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
617*c14f6fecSEdward A. James        '199' :  { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
618e5fe522aSYi Li            'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
619*c14f6fecSEdward A. James        '118' :  { 'object_path' : 'temperature/dimm16','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
620*c14f6fecSEdward A. James        '119' :  { 'object_path' : 'temperature/dimm17','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
621*c14f6fecSEdward A. James        '120' :  { 'object_path' : 'temperature/dimm18','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
622*c14f6fecSEdward A. James        '121' :  { 'object_path' : 'temperature/dimm19','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
623*c14f6fecSEdward A. James        '122' :  { 'object_path' : 'temperature/dimm20','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
624*c14f6fecSEdward A. James        '123' :  { 'object_path' : 'temperature/dimm21','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
625*c14f6fecSEdward A. James        '124' :  { 'object_path' : 'temperature/dimm22','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
626*c14f6fecSEdward A. James        '125' :  { 'object_path' : 'temperature/dimm23','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
627*c14f6fecSEdward A. James        '126' :  { 'object_path' : 'temperature/dimm24','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
628*c14f6fecSEdward A. James        '127' :  { 'object_path' : 'temperature/dimm25','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
629*c14f6fecSEdward A. James        '128' :  { 'object_path' : 'temperature/dimm26','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
630*c14f6fecSEdward A. James        '129' :  { 'object_path' : 'temperature/dimm27','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
631*c14f6fecSEdward A. James        '130' :  { 'object_path' : 'temperature/dimm28','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
632*c14f6fecSEdward A. James        '131' :  { 'object_path' : 'temperature/dimm29','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
633*c14f6fecSEdward A. James        '132' :  { 'object_path' : 'temperature/dimm30','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
634*c14f6fecSEdward A. James        '133' :  { 'object_path' : 'temperature/dimm31','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
635*c14f6fecSEdward A. James        '98' :  { 'object_path' : 'temperature/membuf4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
636*c14f6fecSEdward A. James        '99' :  { 'object_path' : 'temperature/membuf5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
637*c14f6fecSEdward A. James        '100' :  { 'object_path' : 'temperature/membuf6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
638*c14f6fecSEdward A. James        '101' :  { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
639e5fe522aSYi Li        }
640e5fe522aSYi Li    },
641e5fe522aSYi Li}
642e5fe522aSYi Li
643e5fe522aSYi Li# Miscellaneous non-poll sensor with system specific properties.
644e5fe522aSYi Li# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
645e5fe522aSYi LiMISC_SENSORS = {
646e5fe522aSYi Li    0x5f : { 'class' : 'BootCountSensor' },
647e5fe522aSYi Li    0x05 : { 'class' : 'BootProgressSensor' },
648e5fe522aSYi Li    0x08 : { 'class' : 'OccStatusSensor',
649e5fe522aSYi Li        'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0050/online' },
650e5fe522aSYi Li    0x09 : { 'class' : 'OccStatusSensor',
651e5fe522aSYi Li        'os_path' : '/sys/class/i2c-adapter/i2c-3/3-0051/online' },
652e5fe522aSYi Li    0xb5 : { 'class' : 'OperatingSystemStatusSensor' },
653e5fe522aSYi Li    0xb3 : { 'class' : 'PowerCap',
654e5fe522aSYi Li        'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
655e5fe522aSYi Li}
656