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