1# Romulus.py
2#
3
4SYSTEM_STATES = [
5    'BASE_APPS',
6    'BMC_STARTING',
7    'BMC_READY',
8    'HOST_POWERING_ON',
9    'HOST_POWERED_ON',
10    'HOST_BOOTING',
11    'HOST_BOOTED',
12    'HOST_POWERED_OFF',
13]
14
15EXIT_STATE_DEPEND = {
16    'BASE_APPS': {
17        '/org/openbmc/sensors': 0,
18    },
19    'BMC_STARTING': {
20        '/org/openbmc/control/chassis0': 0,
21        '/org/openbmc/control/power0': 0,
22        '/org/openbmc/control/flash/bios': 0,
23    },
24}
25
26INVENTORY_ROOT = '/org/openbmc/inventory'
27
28FRU_INSTANCES = {
29    '<inventory_root>/system': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
30    '<inventory_root>/system/bios': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
31    '<inventory_root>/system/misc': {'fru_type': 'SYSTEM', 'is_fru': False, },
32
33    '<inventory_root>/system/chassis': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
34
35    '<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, },
36
37    '<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
38    '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR',
39                                                             'is_fru': False, },
40    '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR',
41                                                              'is_fru': False, },
42    '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR',
43                                                             'is_fru': False, },
44    '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR',
45                                                         'is_fru': False, },
46
47    '<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, },
48    '<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, },
49    '<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True, },
50    '<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True, },
51
52    '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False,
53                                                        'manufacturer': 'ASPEED'},
54
55    '<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, },
56    '<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, },
57
58    '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', 'is_fru': False, },
59    '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', 'is_fru': False, },
60    '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', 'is_fru': False, },
61    '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', 'is_fru': False, },
62    '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', 'is_fru': False, },
63    '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', 'is_fru': False, },
64    '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', 'is_fru': False, },
65    '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', 'is_fru': False, },
66    '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', 'is_fru': False, },
67    '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', 'is_fru': False, },
68    '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', 'is_fru': False, },
69    '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', 'is_fru': False, },
70    '<inventory_root>/system/chassis/motherboard/cpu0/core12': {'fru_type': 'CORE', 'is_fru': False, },
71    '<inventory_root>/system/chassis/motherboard/cpu0/core13': {'fru_type': 'CORE', 'is_fru': False, },
72    '<inventory_root>/system/chassis/motherboard/cpu0/core14': {'fru_type': 'CORE', 'is_fru': False, },
73    '<inventory_root>/system/chassis/motherboard/cpu0/core15': {'fru_type': 'CORE', 'is_fru': False, },
74    '<inventory_root>/system/chassis/motherboard/cpu0/core16': {'fru_type': 'CORE', 'is_fru': False, },
75    '<inventory_root>/system/chassis/motherboard/cpu0/core17': {'fru_type': 'CORE', 'is_fru': False, },
76    '<inventory_root>/system/chassis/motherboard/cpu0/core18': {'fru_type': 'CORE', 'is_fru': False, },
77    '<inventory_root>/system/chassis/motherboard/cpu0/core19': {'fru_type': 'CORE', 'is_fru': False, },
78    '<inventory_root>/system/chassis/motherboard/cpu0/core20': {'fru_type': 'CORE', 'is_fru': False, },
79    '<inventory_root>/system/chassis/motherboard/cpu0/core21': {'fru_type': 'CORE', 'is_fru': False, },
80    '<inventory_root>/system/chassis/motherboard/cpu0/core22': {'fru_type': 'CORE', 'is_fru': False, },
81    '<inventory_root>/system/chassis/motherboard/cpu0/core23': {'fru_type': 'CORE', 'is_fru': False, },
82
83    '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', 'is_fru': False, },
84    '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', 'is_fru': False, },
85    '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', 'is_fru': False, },
86    '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', 'is_fru': False, },
87    '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', 'is_fru': False, },
88    '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', 'is_fru': False, },
89    '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', 'is_fru': False, },
90    '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', 'is_fru': False, },
91    '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', 'is_fru': False, },
92    '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', 'is_fru': False, },
93    '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', 'is_fru': False, },
94    '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', 'is_fru': False, },
95    '<inventory_root>/system/chassis/motherboard/cpu1/core12': {'fru_type': 'CORE', 'is_fru': False, },
96    '<inventory_root>/system/chassis/motherboard/cpu1/core13': {'fru_type': 'CORE', 'is_fru': False, },
97    '<inventory_root>/system/chassis/motherboard/cpu1/core14': {'fru_type': 'CORE', 'is_fru': False, },
98    '<inventory_root>/system/chassis/motherboard/cpu1/core15': {'fru_type': 'CORE', 'is_fru': False, },
99    '<inventory_root>/system/chassis/motherboard/cpu1/core16': {'fru_type': 'CORE', 'is_fru': False, },
100    '<inventory_root>/system/chassis/motherboard/cpu1/core17': {'fru_type': 'CORE', 'is_fru': False, },
101    '<inventory_root>/system/chassis/motherboard/cpu1/core18': {'fru_type': 'CORE', 'is_fru': False, },
102    '<inventory_root>/system/chassis/motherboard/cpu1/core19': {'fru_type': 'CORE', 'is_fru': False, },
103    '<inventory_root>/system/chassis/motherboard/cpu1/core20': {'fru_type': 'CORE', 'is_fru': False, },
104    '<inventory_root>/system/chassis/motherboard/cpu1/core21': {'fru_type': 'CORE', 'is_fru': False, },
105    '<inventory_root>/system/chassis/motherboard/cpu1/core22': {'fru_type': 'CORE', 'is_fru': False, },
106    '<inventory_root>/system/chassis/motherboard/cpu1/core23': {'fru_type': 'CORE', 'is_fru': False, },
107
108    '<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, },
109    '<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, },
110    '<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True, },
111    '<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True, },
112    '<inventory_root>/system/chassis/motherboard/dimm4': {'fru_type': 'DIMM', 'is_fru': True, },
113    '<inventory_root>/system/chassis/motherboard/dimm5': {'fru_type': 'DIMM', 'is_fru': True, },
114    '<inventory_root>/system/chassis/motherboard/dimm6': {'fru_type': 'DIMM', 'is_fru': True, },
115    '<inventory_root>/system/chassis/motherboard/dimm7': {'fru_type': 'DIMM', 'is_fru': True, },
116    '<inventory_root>/system/chassis/motherboard/dimm8': {'fru_type': 'DIMM', 'is_fru': True, },
117    '<inventory_root>/system/chassis/motherboard/dimm9': {'fru_type': 'DIMM', 'is_fru': True, },
118    '<inventory_root>/system/chassis/motherboard/dimm10': {'fru_type': 'DIMM', 'is_fru': True, },
119    '<inventory_root>/system/chassis/motherboard/dimm11': {'fru_type': 'DIMM', 'is_fru': True, },
120    '<inventory_root>/system/chassis/motherboard/dimm12': {'fru_type': 'DIMM', 'is_fru': True, },
121    '<inventory_root>/system/chassis/motherboard/dimm13': {'fru_type': 'DIMM', 'is_fru': True, },
122    '<inventory_root>/system/chassis/motherboard/dimm14': {'fru_type': 'DIMM', 'is_fru': True, },
123    '<inventory_root>/system/chassis/motherboard/dimm15': {'fru_type': 'DIMM', 'is_fru': True, },
124}
125
126ID_LOOKUP = {
127    'FRU': {
128        0x01: '<inventory_root>/system/chassis/motherboard/cpu0',
129        0x02: '<inventory_root>/system/chassis/motherboard/cpu1',
130        0x03: '<inventory_root>/system/chassis/motherboard',
131        0x04: '<inventory_root>/system/chassis/motherboard/dimm0',
132        0x05: '<inventory_root>/system/chassis/motherboard/dimm1',
133        0x06: '<inventory_root>/system/chassis/motherboard/dimm2',
134        0x07: '<inventory_root>/system/chassis/motherboard/dimm3',
135        0x08: '<inventory_root>/system/chassis/motherboard/dimm4',
136        0x09: '<inventory_root>/system/chassis/motherboard/dimm5',
137        0x0a: '<inventory_root>/system/chassis/motherboard/dimm6',
138        0x0b: '<inventory_root>/system/chassis/motherboard/dimm7',
139        0x0c: '<inventory_root>/system/chassis/motherboard/dimm8',
140        0x0d: '<inventory_root>/system/chassis/motherboard/dimm9',
141        0x0e: '<inventory_root>/system/chassis/motherboard/dimm10',
142        0x0f: '<inventory_root>/system/chassis/motherboard/dimm11',
143        0x10: '<inventory_root>/system/chassis/motherboard/dimm12',
144        0x11: '<inventory_root>/system/chassis/motherboard/dimm13',
145        0x12: '<inventory_root>/system/chassis/motherboard/dimm14',
146        0x13: '<inventory_root>/system/chassis/motherboard/dimm15',
147    },
148    'FRU_STR': {
149        'PRODUCT_0': '<inventory_root>/system/bios',
150        'BOARD_1': '<inventory_root>/system/chassis/motherboard/cpu0',
151        'BOARD_2': '<inventory_root>/system/chassis/motherboard/cpu1',
152        'CHASSIS_3': '<inventory_root>/system/chassis/motherboard',
153        'BOARD_3': '<inventory_root>/system/misc',
154        'PRODUCT_12': '<inventory_root>/system/chassis/motherboard/dimm0',
155        'PRODUCT_13': '<inventory_root>/system/chassis/motherboard/dimm1',
156        'PRODUCT_14': '<inventory_root>/system/chassis/motherboard/dimm2',
157        'PRODUCT_15': '<inventory_root>/system/chassis/motherboard/dimm3',
158        'PRODUCT_16': '<inventory_root>/system/chassis/motherboard/dimm4',
159        'PRODUCT_17': '<inventory_root>/system/chassis/motherboard/dimm5',
160        'PRODUCT_18': '<inventory_root>/system/chassis/motherboard/dimm6',
161        'PRODUCT_19': '<inventory_root>/system/chassis/motherboard/dimm7',
162        'PRODUCT_20': '<inventory_root>/system/chassis/motherboard/dimm8',
163        'PRODUCT_21': '<inventory_root>/system/chassis/motherboard/dimm9',
164        'PRODUCT_22': '<inventory_root>/system/chassis/motherboard/dimm10',
165        'PRODUCT_23': '<inventory_root>/system/chassis/motherboard/dimm11',
166        'PRODUCT_24': '<inventory_root>/system/chassis/motherboard/dimm12',
167        'PRODUCT_25': '<inventory_root>/system/chassis/motherboard/dimm13',
168        'PRODUCT_26': '<inventory_root>/system/chassis/motherboard/dimm14',
169        'PRODUCT_27': '<inventory_root>/system/chassis/motherboard/dimm15',
170        'PRODUCT_47': '<inventory_root>/system/misc',
171    },
172    'SENSOR': {
173        0x01: '/org/openbmc/sensors/host/HostStatus',
174        0x02: '/org/openbmc/sensors/host/BootProgress',
175        0x03: '/org/openbmc/sensors/host/cpu0/OccStatus',
176        0x04: '/org/openbmc/sensors/host/cpu1/OccStatus',
177        0x08: '<inventory_root>/system/chassis/motherboard/cpu0',
178        0x09: '<inventory_root>/system/chassis/motherboard/cpu1',
179        0x0b: '<inventory_root>/system/chassis/motherboard/dimm0',
180        0x0c: '<inventory_root>/system/chassis/motherboard/dimm1',
181        0x0d: '<inventory_root>/system/chassis/motherboard/dimm2',
182        0x0e: '<inventory_root>/system/chassis/motherboard/dimm3',
183        0x0f: '<inventory_root>/system/chassis/motherboard/dimm4',
184        0x10: '<inventory_root>/system/chassis/motherboard/dimm5',
185        0x11: '<inventory_root>/system/chassis/motherboard/dimm6',
186        0x12: '<inventory_root>/system/chassis/motherboard/dimm7',
187        0x13: '<inventory_root>/system/chassis/motherboard/dimm8',
188        0x14: '<inventory_root>/system/chassis/motherboard/dimm9',
189        0x15: '<inventory_root>/system/chassis/motherboard/dimm10',
190        0x16: '<inventory_root>/system/chassis/motherboard/dimm11',
191        0x17: '<inventory_root>/system/chassis/motherboard/dimm12',
192        0x18: '<inventory_root>/system/chassis/motherboard/dimm13',
193        0x19: '<inventory_root>/system/chassis/motherboard/dimm14',
194        0x1a: '<inventory_root>/system/chassis/motherboard/dimm15',
195        0x2b: '<inventory_root>/system/chassis/motherboard/cpu0/core0',
196        0x2c: '<inventory_root>/system/chassis/motherboard/cpu0/core1',
197        0x2d: '<inventory_root>/system/chassis/motherboard/cpu0/core2',
198        0x2e: '<inventory_root>/system/chassis/motherboard/cpu0/core3',
199        0x2f: '<inventory_root>/system/chassis/motherboard/cpu0/core4',
200        0x30: '<inventory_root>/system/chassis/motherboard/cpu0/core5',
201        0x31: '<inventory_root>/system/chassis/motherboard/cpu0/core6',
202        0x32: '<inventory_root>/system/chassis/motherboard/cpu0/core7',
203        0x33: '<inventory_root>/system/chassis/motherboard/cpu0/core8',
204        0x34: '<inventory_root>/system/chassis/motherboard/cpu0/core9',
205        0x35: '<inventory_root>/system/chassis/motherboard/cpu0/core10',
206        0x36: '<inventory_root>/system/chassis/motherboard/cpu0/core11',
207        0x37: '<inventory_root>/system/chassis/motherboard/cpu0/core12',
208        0x38: '<inventory_root>/system/chassis/motherboard/cpu0/core13',
209        0x39: '<inventory_root>/system/chassis/motherboard/cpu0/core14',
210        0x3a: '<inventory_root>/system/chassis/motherboard/cpu0/core15',
211        0x3b: '<inventory_root>/system/chassis/motherboard/cpu0/core16',
212        0x3c: '<inventory_root>/system/chassis/motherboard/cpu0/core17',
213        0x3d: '<inventory_root>/system/chassis/motherboard/cpu0/core18',
214        0x3e: '<inventory_root>/system/chassis/motherboard/cpu0/core19',
215        0x3f: '<inventory_root>/system/chassis/motherboard/cpu0/core20',
216        0x40: '<inventory_root>/system/chassis/motherboard/cpu0/core21',
217        0x41: '<inventory_root>/system/chassis/motherboard/cpu0/core22',
218        0x42: '<inventory_root>/system/chassis/motherboard/cpu0/core23',
219        0x43: '<inventory_root>/system/chassis/motherboard/cpu1/core0',
220        0x44: '<inventory_root>/system/chassis/motherboard/cpu1/core1',
221        0x45: '<inventory_root>/system/chassis/motherboard/cpu1/core2',
222        0x46: '<inventory_root>/system/chassis/motherboard/cpu1/core3',
223        0x47: '<inventory_root>/system/chassis/motherboard/cpu1/core4',
224        0x48: '<inventory_root>/system/chassis/motherboard/cpu1/core5',
225        0x49: '<inventory_root>/system/chassis/motherboard/cpu1/core6',
226        0x4a: '<inventory_root>/system/chassis/motherboard/cpu1/core7',
227        0x4b: '<inventory_root>/system/chassis/motherboard/cpu1/core8',
228        0x4c: '<inventory_root>/system/chassis/motherboard/cpu1/core9',
229        0x4d: '<inventory_root>/system/chassis/motherboard/cpu1/core10',
230        0x4e: '<inventory_root>/system/chassis/motherboard/cpu1/core11',
231        0x4f: '<inventory_root>/system/chassis/motherboard/cpu1/core12',
232        0x50: '<inventory_root>/system/chassis/motherboard/cpu1/core13',
233        0x51: '<inventory_root>/system/chassis/motherboard/cpu1/core14',
234        0x52: '<inventory_root>/system/chassis/motherboard/cpu1/core15',
235        0x53: '<inventory_root>/system/chassis/motherboard/cpu1/core16',
236        0x54: '<inventory_root>/system/chassis/motherboard/cpu1/core17',
237        0x55: '<inventory_root>/system/chassis/motherboard/cpu1/core18',
238        0x56: '<inventory_root>/system/chassis/motherboard/cpu1/core19',
239        0x57: '<inventory_root>/system/chassis/motherboard/cpu1/core20',
240        0x58: '<inventory_root>/system/chassis/motherboard/cpu1/core21',
241        0x59: '<inventory_root>/system/chassis/motherboard/cpu1/core22',
242        0x5a: '<inventory_root>/system/chassis/motherboard/cpu1/core23',
243        0x8b: '/org/openbmc/sensors/host/BootCount',
244        0x8c: '<inventory_root>/system/chassis/motherboard',
245        0x8d: '<inventory_root>/system/chassis/motherboard/refclock',
246        0x8e: '<inventory_root>/system/chassis/motherboard/pcieclock',
247        0x8f: '<inventory_root>/system/chassis/motherboard/todclock',
248        0x90: '<inventory_root>/system/systemevent',
249        0x91: '/org/openbmc/sensors/host/OperatingSystemStatus',
250        0x92: '<inventory_root>/system/chassis/motherboard/pcielink',
251        #        0x08 : '<inventory_root>/system/powerlimit',
252        #        0x10 : '<inventory_root>/system/chassis/motherboard/apss',
253        #        0x06 : '/org/openbmc/sensors/host/powercap',
254    },
255    'GPIO_PRESENT': {}
256}
257
258GPIO_CONFIG = {}
259GPIO_CONFIG['SOFTWARE_PGOOD'] = \
260    {'gpio_pin': 'R1', 'direction': 'out'}
261GPIO_CONFIG['BMC_POWER_UP'] = \
262    {'gpio_pin': 'D1', 'direction': 'out'}
263GPIO_CONFIG['SYS_PWROK_BUFF'] = \
264    {'gpio_pin': 'D2', 'direction': 'in'}
265GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
266    {'gpio_pin': 'N5', 'direction': 'out'}
267GPIO_CONFIG['CHECKSTOP'] = \
268    {'gpio_pin': 'J2', 'direction': 'falling'}
269GPIO_CONFIG['BMC_CP0_RESET_N'] = \
270    {'gpio_pin': 'A1', 'direction': 'out'}
271GPIO_CONFIG['BMC_CP0_PERST_ENABLE_R'] = \
272    {'gpio_pin': 'A3', 'direction': 'out'}
273GPIO_CONFIG['FSI_DATA'] = \
274    {'gpio_pin': 'AA2', 'direction': 'out'}
275GPIO_CONFIG['FSI_CLK'] = \
276    {'gpio_pin': 'AA0', 'direction': 'out'}
277GPIO_CONFIG['FSI_ENABLE'] = \
278    {'gpio_pin': 'D0', 'direction': 'out'}
279
280# DBG_CP0_MUX_SEL
281GPIO_CONFIG['CRONUS_SEL'] = \
282    {'gpio_pin': 'A6', 'direction': 'out'}
283GPIO_CONFIG['BMC_THROTTLE'] = \
284    {'gpio_pin': 'J3', 'direction': 'out'}
285GPIO_CONFIG['IDBTN'] = \
286    {'gpio_pin': 'Q7', 'direction': 'out'}
287
288# PM_FP_PWRBTN_IN_L
289GPIO_CONFIG['POWER_BUTTON'] = \
290    {'gpio_pin': 'I3', 'direction': 'both'}
291
292# PM_NMIBTN_IN_L
293GPIO_CONFIG['RESET_BUTTON'] = \
294    {'gpio_pin': 'J1', 'direction': 'both'}
295
296HWMON_CONFIG = {
297    '4-0050': {
298        'names': {
299            'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000,
300                                   'scale': 1, 'units': 'W'},
301            'caps_curr_powerreading': {'object_path': 'powercap/system_power',
302                                       'poll_interval': 10000, 'scale': 1, 'units': 'W'},
303            'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000,
304                                  'scale': 1, 'units': 'W'},
305            'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000,
306                                  'scale': 1, 'units': 'W'},
307            'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000,
308                                   'scale': 1, 'units': 'W'},
309            'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000,
310                                     'scale': 1, 'units': 'W'},
311        },
312        'labels': {
313            '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': -3,
314                    'units': 'C',
315                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
316                    'warning_lower': -99, 'emergency_enabled': True},
317            '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': -3,
318                    'units': 'C',
319                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
320                    'warning_lower': -99, 'emergency_enabled': True},
321            '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': -3,
322                    'units': 'C',
323                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
324                    'warning_lower': -99, 'emergency_enabled': True},
325            '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': -3,
326                    'units': 'C',
327                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
328                    'warning_lower': -99, 'emergency_enabled': True},
329            '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': -3,
330                    'units': 'C',
331                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
332                    'warning_lower': -99, 'emergency_enabled': True},
333            '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': -3,
334                    'units': 'C',
335                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
336                    'warning_lower': -99, 'emergency_enabled': True},
337            '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': -3,
338                    'units': 'C',
339                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
340                    'warning_lower': -99, 'emergency_enabled': True},
341            '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': -3,
342                    'units': 'C',
343                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
344                    'warning_lower': -99, 'emergency_enabled': True},
345            '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': -3,
346                    'units': 'C',
347                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
348                    'warning_lower': -99, 'emergency_enabled': True},
349            '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': -3,
350                    'units': 'C',
351                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
352                    'warning_lower': -99, 'emergency_enabled': True},
353            '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': -3,
354                    'units': 'C',
355                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
356                    'warning_lower': -99, 'emergency_enabled': True},
357            '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': -3,
358                    'units': 'C',
359                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
360                    'warning_lower': -99, 'emergency_enabled': True},
361            '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': -3,
362                    'units': 'C'},
363            '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': -3,
364                    'units': 'C'},
365            '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': -3,
366                    'units': 'C'},
367            '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': -3,
368                    'units': 'C'},
369            '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': -3,
370                    'units': 'C'},
371            '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': -3,
372                    'units': 'C'},
373            '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': -3,
374                    'units': 'C'},
375            '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': -3,
376                    'units': 'C'},
377        }
378    },
379    '5-0050': {
380        'labels': {
381            '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': -3,
382                    'units': 'C',
383                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
384                    'warning_lower': -99, 'emergency_enabled': True},
385            '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': -3,
386                    'units': 'C',
387                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
388                    'warning_lower': -99, 'emergency_enabled': True},
389            '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': -3,
390                    'units': 'C',
391                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
392                    'warning_lower': -99, 'emergency_enabled': True},
393            '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': -3,
394                    'units': 'C',
395                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
396                    'warning_lower': -99, 'emergency_enabled': True},
397            '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': -3,
398                    'units': 'C',
399                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
400                    'warning_lower': -99, 'emergency_enabled': True},
401            '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': -3,
402                    'units': 'C',
403                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
404                    'warning_lower': -99, 'emergency_enabled': True},
405            '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': -3,
406                    'units': 'C',
407                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
408                    'warning_lower': -99, 'emergency_enabled': True},
409            '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': -3,
410                    'units': 'C',
411                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
412                    'warning_lower': -99, 'emergency_enabled': True},
413            '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': -3,
414                    'units': 'C',
415                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
416                    'warning_lower': -99, 'emergency_enabled': True},
417            '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': -3,
418                    'units': 'C',
419                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
420                    'warning_lower': -99, 'emergency_enabled': True},
421            '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': -3,
422                    'units': 'C',
423                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
424                    'warning_lower': -99, 'emergency_enabled': True},
425            '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': -3,
426                    'units': 'C',
427                    'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
428                    'warning_lower': -99, 'emergency_enabled': True},
429            '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': -3,
430                    'units': 'C'},
431            '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': -3,
432                    'units': 'C'},
433            '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': -3,
434                    'units': 'C'},
435            '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': -3,
436                    'units': 'C'},
437            '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': -3,
438                    'units': 'C'},
439            '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': -3,
440                    'units': 'C'},
441            '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': -3,
442                    'units': 'C'},
443            '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': -3,
444                    'units': 'C'},
445        }
446    },
447}
448
449
450GPIO_CONFIGS = {
451    'power_config': {
452        'power_good_in': 'SYS_PWROK_BUFF',
453        'power_up_outs': [
454            ('SOFTWARE_PGOOD', True),
455            ('BMC_POWER_UP', True),
456        ],
457        'reset_outs': [
458            ('BMC_CP0_RESET_N', False),
459            ('BMC_CP0_PERST_ENABLE_R', False),
460        ],
461    },
462    'hostctl_config': {
463        'fsi_data': 'FSI_DATA',
464        'fsi_clk': 'FSI_CLK',
465        'fsi_enable': 'FSI_ENABLE',
466        'cronus_sel': 'CRONUS_SEL',
467        'optionals': [
468        ],
469    },
470}
471
472
473# Miscellaneous non-poll sensor with system specific properties.
474# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
475MISC_SENSORS = {
476    0x8b: {'class': 'BootCountSensor'},
477    0x02: {'class': 'BootProgressSensor'},
478    # OCC active sensors aren't in the P9 XML yet.  These are wrong.
479    0x03: {'class': 'OccStatusSensor',
480           'os_path': '/sys/bus/i2c/devices/3-0050/online'},
481    0x04: {'class': 'OccStatusSensor',
482           'os_path': '/sys/bus/i2c/devices/3-0051/online'},
483    0x91: {'class': 'OperatingSystemStatusSensor'},
484    # 0x06 : { 'class' : 'PowerCap',
485    #    'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
486}
487
488# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
489