blob: fb95bd739f6044df424a0d423f5ab78fde0cceff [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001#! /usr/bin/python
2
3HOME_PATH = './'
4CACHE_PATH = '/var/cache/obmc/'
5FLASH_DOWNLOAD_PATH = "/tmp"
6GPIO_BASE = 320
7SYSTEM_NAME = "Firestone"
8
9
Gunnar Millsdca35792018-03-26 10:05:38 -050010# System states
11# state can change to next state in 2 ways:
12# - a process emits a GotoSystemState signal with state name to goto
13# - objects specified in EXIT_STATE_DEPEND have started
Chris Austenb29d2e82016-06-07 12:25:35 -050014SYSTEM_STATES = [
15 'BASE_APPS',
16 'BMC_STARTING',
17 'BMC_READY',
18 'HOST_POWERING_ON',
19 'HOST_POWERED_ON',
20 'HOST_BOOTING',
21 'HOST_BOOTED',
22 'HOST_POWERED_OFF',
23]
24
25EXIT_STATE_DEPEND = {
Gunnar Millsdca35792018-03-26 10:05:38 -050026 'BASE_APPS': {
Chris Austenb29d2e82016-06-07 12:25:35 -050027 '/org/openbmc/sensors': 0,
28 },
Gunnar Millsdca35792018-03-26 10:05:38 -050029 'BMC_STARTING': {
Chris Austenb29d2e82016-06-07 12:25:35 -050030 '/org/openbmc/control/chassis0': 0,
Gunnar Millsdca35792018-03-26 10:05:38 -050031 '/org/openbmc/control/power0': 0,
32 '/org/openbmc/control/host0': 0,
33 '/org/openbmc/control/flash/bios': 0,
Chris Austenb29d2e82016-06-07 12:25:35 -050034 },
35}
36
Gunnar Millsdca35792018-03-26 10:05:38 -050037# method will be called when state is entered
Chris Austenb29d2e82016-06-07 12:25:35 -050038ENTER_STATE_CALLBACK = {
Gunnar Millsdca35792018-03-26 10:05:38 -050039 'HOST_POWERED_ON': {
40 'boot': {
41 'bus_name': 'org.openbmc.control.Host',
42 'obj_name': '/org/openbmc/control/host0',
43 'interface_name': 'org.openbmc.control.Host',
Chris Austenb29d2e82016-06-07 12:25:35 -050044 },
45 },
Gunnar Millsdca35792018-03-26 10:05:38 -050046 'HOST_POWERED_OFF': {
47 'setOff': {
48 'bus_name': 'org.openbmc.control.led',
49 'obj_name': '/org/openbmc/control/led/identify',
50 'interface_name': 'org.openbmc.Led',
Chris Austenb29d2e82016-06-07 12:25:35 -050051 }
52 },
Gunnar Millsdca35792018-03-26 10:05:38 -050053 'BMC_READY': {
54 'setOn': {
55 'bus_name': 'org.openbmc.control.led',
56 'obj_name': '/org/openbmc/control/led/beep',
57 'interface_name': 'org.openbmc.Led',
Chris Austenb29d2e82016-06-07 12:25:35 -050058 },
Gunnar Millsdca35792018-03-26 10:05:38 -050059 'init': {
60 'bus_name': 'org.openbmc.control.Flash',
61 'obj_name': '/org/openbmc/control/flash/bios',
62 'interface_name': 'org.openbmc.Flash',
Chris Austenb29d2e82016-06-07 12:25:35 -050063 }
64 }
65}
66
67APPS = {
Gunnar Millsdca35792018-03-26 10:05:38 -050068 'startup_hacks': {
69 'system_state': 'BASE_APPS',
70 'start_process': True,
71 'monitor_process': False,
72 'process_name': 'startup_hacks.sh',
Chris Austenb29d2e82016-06-07 12:25:35 -050073 },
Gunnar Millsdca35792018-03-26 10:05:38 -050074 'inventory': {
75 'system_state': 'BMC_STARTING',
76 'start_process': True,
77 'monitor_process': True,
78 'process_name': 'inventory_items.py',
79 'args': [SYSTEM_NAME]
Chris Austenb29d2e82016-06-07 12:25:35 -050080 },
Gunnar Millsdca35792018-03-26 10:05:38 -050081 'hwmon': {
82 'system_state': 'BMC_STARTING',
83 'start_process': True,
84 'monitor_process': True,
85 'process_name': 'hwmon.py',
86 'args': [SYSTEM_NAME]
Chris Austenb29d2e82016-06-07 12:25:35 -050087 },
Gunnar Millsdca35792018-03-26 10:05:38 -050088 'sensor_manager': {
89 'system_state': 'BASE_APPS',
90 'start_process': True,
91 'monitor_process': True,
92 'process_name': 'sensor_manager2.py',
93 'args': [SYSTEM_NAME]
Chris Austenb29d2e82016-06-07 12:25:35 -050094 },
Gunnar Millsdca35792018-03-26 10:05:38 -050095 'host_watchdog': {
96 'system_state': 'BMC_STARTING',
97 'start_process': True,
98 'monitor_process': True,
99 'process_name': 'host_watchdog.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500100 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500101 'power_control': {
102 'system_state': 'BMC_STARTING',
103 'start_process': True,
104 'monitor_process': True,
105 'process_name': 'power_control.exe',
106 'args': ['3000', '10']
Chris Austenb29d2e82016-06-07 12:25:35 -0500107 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500108 'power_button': {
109 'system_state': 'BMC_STARTING',
110 'start_process': True,
111 'monitor_process': True,
112 'process_name': 'button_power.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500113 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500114 'reset_button': {
115 'system_state': 'BMC_STARTING',
116 'start_process': True,
117 'monitor_process': True,
118 'process_name': 'button_reset.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500119 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500120 'led_control': {
121 'system_state': 'BMC_STARTING',
122 'start_process': True,
123 'monitor_process': True,
124 'process_name': 'led_controller.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500125 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500126 'flash_control': {
127 'system_state': 'BMC_STARTING',
128 'start_process': True,
129 'monitor_process': True,
130 'process_name': 'flash_bios.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500131 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500132 'bmc_flash_control': {
133 'system_state': 'BMC_STARTING',
134 'start_process': True,
135 'monitor_process': True,
136 'process_name': 'bmc_update.py',
Chris Austenb29d2e82016-06-07 12:25:35 -0500137 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500138 'download_manager': {
139 'system_state': 'BMC_STARTING',
140 'start_process': True,
141 'monitor_process': True,
142 'process_name': 'download_manager.py',
143 'args': [SYSTEM_NAME]
Chris Austenb29d2e82016-06-07 12:25:35 -0500144 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500145 'host_control': {
146 'system_state': 'BMC_STARTING',
147 'start_process': True,
148 'monitor_process': True,
149 'process_name': 'control_host.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500150 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500151 'chassis_control': {
152 'system_state': 'BMC_STARTING',
153 'start_process': True,
154 'monitor_process': True,
155 'process_name': 'chassis_control.py',
Chris Austenb29d2e82016-06-07 12:25:35 -0500156 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500157 'restore': {
158 'system_state': 'BMC_READY',
159 'start_process': True,
160 'monitor_process': False,
161 'process_name': 'discover_system_state.py',
Chris Austenb29d2e82016-06-07 12:25:35 -0500162 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500163 'bmc_control': {
164 'system_state': 'BMC_STARTING',
165 'start_process': True,
166 'monitor_process': True,
167 'process_name': 'control_bmc.exe',
Chris Austenb29d2e82016-06-07 12:25:35 -0500168 },
169}
170
171CACHED_INTERFACES = {
Gunnar Millsdca35792018-03-26 10:05:38 -0500172 "org.openbmc.InventoryItem": True,
173 "org.openbmc.control.Chassis": True,
Chris Austenb29d2e82016-06-07 12:25:35 -0500174}
175
176INVENTORY_ROOT = '/org/openbmc/inventory'
177
178FRU_INSTANCES = {
Gunnar Millsdca35792018-03-26 10:05:38 -0500179 '<inventory_root>/system': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
180 '<inventory_root>/system/bios': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
181 '<inventory_root>/system/misc': {'fru_type': 'SYSTEM', 'is_fru': False, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500182
Gunnar Millsdca35792018-03-26 10:05:38 -0500183 '<inventory_root>/system/chassis': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
Chris Austenb29d2e82016-06-07 12:25:35 -0500184
Gunnar Millsdca35792018-03-26 10:05:38 -0500185 '<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500186
Gunnar Millsdca35792018-03-26 10:05:38 -0500187 '<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
188 '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
189 '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
190 '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
191 '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500192
Gunnar Millsdca35792018-03-26 10:05:38 -0500193 '<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, },
194 '<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, },
195 '<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True, },
196 '<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500197
Gunnar Millsdca35792018-03-26 10:05:38 -0500198 '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False, 'manufacturer': 'ASPEED'},
Chris Austenb29d2e82016-06-07 12:25:35 -0500199
Gunnar Millsdca35792018-03-26 10:05:38 -0500200 '<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, },
201 '<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500202
Gunnar Millsdca35792018-03-26 10:05:38 -0500203 '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', 'is_fru': False, },
204 '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', 'is_fru': False, },
205 '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', 'is_fru': False, },
206 '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', 'is_fru': False, },
207 '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', 'is_fru': False, },
208 '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', 'is_fru': False, },
209 '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', 'is_fru': False, },
210 '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', 'is_fru': False, },
211 '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', 'is_fru': False, },
212 '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', 'is_fru': False, },
213 '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', 'is_fru': False, },
214 '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', 'is_fru': False, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500215
Gunnar Millsdca35792018-03-26 10:05:38 -0500216 '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', 'is_fru': False, },
217 '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', 'is_fru': False, },
218 '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', 'is_fru': False, },
219 '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', 'is_fru': False, },
220 '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', 'is_fru': False, },
221 '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', 'is_fru': False, },
222 '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', 'is_fru': False, },
223 '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', 'is_fru': False, },
224 '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', 'is_fru': False, },
225 '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', 'is_fru': False, },
226 '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', 'is_fru': False, },
227 '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', 'is_fru': False, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500228
Gunnar Millsdca35792018-03-26 10:05:38 -0500229 '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
230 '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
231 '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
232 '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
233 '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
234 '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
235 '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
236 '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500237
Gunnar Millsdca35792018-03-26 10:05:38 -0500238 '<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, },
239 '<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, },
240 '<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True, },
241 '<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True, },
242 '<inventory_root>/system/chassis/motherboard/dimm4': {'fru_type': 'DIMM', 'is_fru': True, },
243 '<inventory_root>/system/chassis/motherboard/dimm5': {'fru_type': 'DIMM', 'is_fru': True, },
244 '<inventory_root>/system/chassis/motherboard/dimm6': {'fru_type': 'DIMM', 'is_fru': True, },
245 '<inventory_root>/system/chassis/motherboard/dimm7': {'fru_type': 'DIMM', 'is_fru': True, },
246 '<inventory_root>/system/chassis/motherboard/dimm8': {'fru_type': 'DIMM', 'is_fru': True, },
247 '<inventory_root>/system/chassis/motherboard/dimm9': {'fru_type': 'DIMM', 'is_fru': True, },
248 '<inventory_root>/system/chassis/motherboard/dimm10': {'fru_type': 'DIMM', 'is_fru': True, },
249 '<inventory_root>/system/chassis/motherboard/dimm11': {'fru_type': 'DIMM', 'is_fru': True, },
250 '<inventory_root>/system/chassis/motherboard/dimm12': {'fru_type': 'DIMM', 'is_fru': True, },
251 '<inventory_root>/system/chassis/motherboard/dimm13': {'fru_type': 'DIMM', 'is_fru': True, },
252 '<inventory_root>/system/chassis/motherboard/dimm14': {'fru_type': 'DIMM', 'is_fru': True, },
253 '<inventory_root>/system/chassis/motherboard/dimm15': {'fru_type': 'DIMM', 'is_fru': True, },
254 '<inventory_root>/system/chassis/motherboard/dimm16': {'fru_type': 'DIMM', 'is_fru': True, },
255 '<inventory_root>/system/chassis/motherboard/dimm17': {'fru_type': 'DIMM', 'is_fru': True, },
256 '<inventory_root>/system/chassis/motherboard/dimm18': {'fru_type': 'DIMM', 'is_fru': True, },
257 '<inventory_root>/system/chassis/motherboard/dimm19': {'fru_type': 'DIMM', 'is_fru': True, },
258 '<inventory_root>/system/chassis/motherboard/dimm20': {'fru_type': 'DIMM', 'is_fru': True, },
259 '<inventory_root>/system/chassis/motherboard/dimm21': {'fru_type': 'DIMM', 'is_fru': True, },
260 '<inventory_root>/system/chassis/motherboard/dimm22': {'fru_type': 'DIMM', 'is_fru': True, },
261 '<inventory_root>/system/chassis/motherboard/dimm23': {'fru_type': 'DIMM', 'is_fru': True, },
262 '<inventory_root>/system/chassis/motherboard/dimm24': {'fru_type': 'DIMM', 'is_fru': True, },
263 '<inventory_root>/system/chassis/motherboard/dimm25': {'fru_type': 'DIMM', 'is_fru': True, },
264 '<inventory_root>/system/chassis/motherboard/dimm26': {'fru_type': 'DIMM', 'is_fru': True, },
265 '<inventory_root>/system/chassis/motherboard/dimm27': {'fru_type': 'DIMM', 'is_fru': True, },
266 '<inventory_root>/system/chassis/motherboard/dimm28': {'fru_type': 'DIMM', 'is_fru': True, },
267 '<inventory_root>/system/chassis/motherboard/dimm29': {'fru_type': 'DIMM', 'is_fru': True, },
268 '<inventory_root>/system/chassis/motherboard/dimm30': {'fru_type': 'DIMM', 'is_fru': True, },
269 '<inventory_root>/system/chassis/motherboard/dimm31': {'fru_type': 'DIMM', 'is_fru': True, },
Chris Austenb29d2e82016-06-07 12:25:35 -0500270}
271
272ID_LOOKUP = {
Gunnar Millsdca35792018-03-26 10:05:38 -0500273 'FRU': {
274 0x01: '<inventory_root>/system/chassis/motherboard/cpu0',
275 0x02: '<inventory_root>/system/chassis/motherboard/cpu1',
276 0x03: '<inventory_root>/system/chassis/motherboard',
277 0x04: '<inventory_root>/system/chassis/motherboard/membuf0',
278 0x05: '<inventory_root>/system/chassis/motherboard/membuf1',
279 0x06: '<inventory_root>/system/chassis/motherboard/membuf2',
280 0x07: '<inventory_root>/system/chassis/motherboard/membuf3',
281 0x08: '<inventory_root>/system/chassis/motherboard/membuf4',
282 0x09: '<inventory_root>/system/chassis/motherboard/membuf5',
283 0x0c: '<inventory_root>/system/chassis/motherboard/dimm0',
284 0x0d: '<inventory_root>/system/chassis/motherboard/dimm1',
285 0x0e: '<inventory_root>/system/chassis/motherboard/dimm2',
286 0x0f: '<inventory_root>/system/chassis/motherboard/dimm3',
287 0x10: '<inventory_root>/system/chassis/motherboard/dimm4',
288 0x11: '<inventory_root>/system/chassis/motherboard/dimm5',
289 0x12: '<inventory_root>/system/chassis/motherboard/dimm6',
290 0x13: '<inventory_root>/system/chassis/motherboard/dimm7',
291 0x14: '<inventory_root>/system/chassis/motherboard/dimm8',
292 0x15: '<inventory_root>/system/chassis/motherboard/dimm9',
293 0x16: '<inventory_root>/system/chassis/motherboard/dimm10',
294 0x17: '<inventory_root>/system/chassis/motherboard/dimm11',
295 0x18: '<inventory_root>/system/chassis/motherboard/dimm12',
296 0x19: '<inventory_root>/system/chassis/motherboard/dimm13',
297 0x1a: '<inventory_root>/system/chassis/motherboard/dimm14',
298 0x1b: '<inventory_root>/system/chassis/motherboard/dimm15',
299 0x1c: '<inventory_root>/system/chassis/motherboard/dimm16',
300 0x1d: '<inventory_root>/system/chassis/motherboard/dimm17',
301 0x1e: '<inventory_root>/system/chassis/motherboard/dimm18',
302 0x1f: '<inventory_root>/system/chassis/motherboard/dimm19',
303 0x20: '<inventory_root>/system/chassis/motherboard/dimm20',
304 0x21: '<inventory_root>/system/chassis/motherboard/dimm21',
305 0x22: '<inventory_root>/system/chassis/motherboard/dimm22',
306 0x23: '<inventory_root>/system/chassis/motherboard/dimm23',
307 0x24: '<inventory_root>/system/chassis/motherboard/dimm24',
308 0x25: '<inventory_root>/system/chassis/motherboard/dimm25',
309 0x26: '<inventory_root>/system/chassis/motherboard/dimm26',
310 0x27: '<inventory_root>/system/chassis/motherboard/dimm27',
311 0x28: '<inventory_root>/system/chassis/motherboard/dimm28',
312 0x29: '<inventory_root>/system/chassis/motherboard/dimm29',
313 0x2a: '<inventory_root>/system/chassis/motherboard/dimm30',
314 0x2b: '<inventory_root>/system/chassis/motherboard/dimm31',
Chris Austenb29d2e82016-06-07 12:25:35 -0500315 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500316 'FRU_STR': {
317 'PRODUCT_0': '<inventory_root>/system/bios',
318 'BOARD_1': '<inventory_root>/system/chassis/motherboard/cpu0',
319 'BOARD_2': '<inventory_root>/system/chassis/motherboard/cpu1',
320 'CHASSIS_3': '<inventory_root>/system/chassis/motherboard',
321 'BOARD_3': '<inventory_root>/system/misc',
322 'BOARD_4': '<inventory_root>/system/chassis/motherboard/membuf0',
323 'BOARD_5': '<inventory_root>/system/chassis/motherboard/membuf1',
324 'BOARD_6': '<inventory_root>/system/chassis/motherboard/membuf2',
325 'BOARD_7': '<inventory_root>/system/chassis/motherboard/membuf3',
326 'BOARD_8': '<inventory_root>/system/chassis/motherboard/membuf4',
327 'BOARD_9': '<inventory_root>/system/chassis/motherboard/membuf5',
328 'BOARD_10': '<inventory_root>/system/chassis/motherboard/membuf6',
329 'BOARD_11': '<inventory_root>/system/chassis/motherboard/membuf7',
330 'PRODUCT_12': '<inventory_root>/system/chassis/motherboard/dimm0',
331 'PRODUCT_13': '<inventory_root>/system/chassis/motherboard/dimm1',
332 'PRODUCT_14': '<inventory_root>/system/chassis/motherboard/dimm2',
333 'PRODUCT_15': '<inventory_root>/system/chassis/motherboard/dimm3',
334 'PRODUCT_16': '<inventory_root>/system/chassis/motherboard/dimm4',
335 'PRODUCT_17': '<inventory_root>/system/chassis/motherboard/dimm5',
336 'PRODUCT_18': '<inventory_root>/system/chassis/motherboard/dimm6',
337 'PRODUCT_19': '<inventory_root>/system/chassis/motherboard/dimm7',
338 'PRODUCT_20': '<inventory_root>/system/chassis/motherboard/dimm8',
339 'PRODUCT_21': '<inventory_root>/system/chassis/motherboard/dimm9',
340 'PRODUCT_22': '<inventory_root>/system/chassis/motherboard/dimm10',
341 'PRODUCT_23': '<inventory_root>/system/chassis/motherboard/dimm11',
342 'PRODUCT_24': '<inventory_root>/system/chassis/motherboard/dimm12',
343 'PRODUCT_25': '<inventory_root>/system/chassis/motherboard/dimm13',
344 'PRODUCT_26': '<inventory_root>/system/chassis/motherboard/dimm14',
345 'PRODUCT_27': '<inventory_root>/system/chassis/motherboard/dimm15',
346 'PRODUCT_28': '<inventory_root>/system/chassis/motherboard/dimm16',
347 'PRODUCT_29': '<inventory_root>/system/chassis/motherboard/dimm17',
348 'PRODUCT_30': '<inventory_root>/system/chassis/motherboard/dimm18',
349 'PRODUCT_31': '<inventory_root>/system/chassis/motherboard/dimm19',
350 'PRODUCT_32': '<inventory_root>/system/chassis/motherboard/dimm20',
351 'PRODUCT_33': '<inventory_root>/system/chassis/motherboard/dimm21',
352 'PRODUCT_34': '<inventory_root>/system/chassis/motherboard/dimm22',
353 'PRODUCT_35': '<inventory_root>/system/chassis/motherboard/dimm23',
354 'PRODUCT_36': '<inventory_root>/system/chassis/motherboard/dimm24',
355 'PRODUCT_37': '<inventory_root>/system/chassis/motherboard/dimm25',
356 'PRODUCT_38': '<inventory_root>/system/chassis/motherboard/dimm26',
357 'PRODUCT_39': '<inventory_root>/system/chassis/motherboard/dimm27',
358 'PRODUCT_40': '<inventory_root>/system/chassis/motherboard/dimm28',
359 'PRODUCT_41': '<inventory_root>/system/chassis/motherboard/dimm29',
360 'PRODUCT_42': '<inventory_root>/system/chassis/motherboard/dimm30',
361 'PRODUCT_43': '<inventory_root>/system/chassis/motherboard/dimm31',
362 'PRODUCT_47': '<inventory_root>/system/misc',
Chris Austenb29d2e82016-06-07 12:25:35 -0500363 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500364 'SENSOR': {
365 0x04: '/org/openbmc/sensors/host/HostStatus',
366 0x05: '/org/openbmc/sensors/host/BootProgress',
367 0x08: '/org/openbmc/sensors/host/cpu0/OccStatus',
368 0x09: '/org/openbmc/sensors/host/cpu1/OccStatus',
369 0x0c: '<inventory_root>/system/chassis/motherboard/cpu0',
370 0x0e: '<inventory_root>/system/chassis/motherboard/cpu1',
371 0x1e: '<inventory_root>/system/chassis/motherboard/dimm3',
372 0x1f: '<inventory_root>/system/chassis/motherboard/dimm2',
373 0x20: '<inventory_root>/system/chassis/motherboard/dimm1',
374 0x21: '<inventory_root>/system/chassis/motherboard/dimm0',
375 0x22: '<inventory_root>/system/chassis/motherboard/dimm7',
376 0x23: '<inventory_root>/system/chassis/motherboard/dimm6',
377 0x24: '<inventory_root>/system/chassis/motherboard/dimm5',
378 0x25: '<inventory_root>/system/chassis/motherboard/dimm4',
379 0x26: '<inventory_root>/system/chassis/motherboard/dimm11',
380 0x27: '<inventory_root>/system/chassis/motherboard/dimm10',
381 0x28: '<inventory_root>/system/chassis/motherboard/dimm9',
382 0x29: '<inventory_root>/system/chassis/motherboard/dimm8',
383 0x2a: '<inventory_root>/system/chassis/motherboard/dimm15',
384 0x2b: '<inventory_root>/system/chassis/motherboard/dimm14',
385 0x2c: '<inventory_root>/system/chassis/motherboard/dimm13',
386 0x2d: '<inventory_root>/system/chassis/motherboard/dimm12',
387 0x2e: '<inventory_root>/system/chassis/motherboard/dimm19',
388 0x2f: '<inventory_root>/system/chassis/motherboard/dimm18',
389 0x30: '<inventory_root>/system/chassis/motherboard/dimm17',
390 0x31: '<inventory_root>/system/chassis/motherboard/dimm16',
391 0x32: '<inventory_root>/system/chassis/motherboard/dimm23',
392 0x33: '<inventory_root>/system/chassis/motherboard/dimm22',
393 0x34: '<inventory_root>/system/chassis/motherboard/dimm21',
394 0x35: '<inventory_root>/system/chassis/motherboard/dimm20',
395 0x36: '<inventory_root>/system/chassis/motherboard/dimm27',
396 0x37: '<inventory_root>/system/chassis/motherboard/dimm26',
397 0x38: '<inventory_root>/system/chassis/motherboard/dimm25',
398 0x39: '<inventory_root>/system/chassis/motherboard/dimm24',
399 0x3a: '<inventory_root>/system/chassis/motherboard/dimm31',
400 0x3b: '<inventory_root>/system/chassis/motherboard/dimm30',
401 0x3c: '<inventory_root>/system/chassis/motherboard/dimm29',
402 0x3d: '<inventory_root>/system/chassis/motherboard/dimm28',
403 0x3e: '<inventory_root>/system/chassis/motherboard/cpu0/core0',
404 0x3f: '<inventory_root>/system/chassis/motherboard/cpu0/core1',
405 0x40: '<inventory_root>/system/chassis/motherboard/cpu0/core2',
406 0x41: '<inventory_root>/system/chassis/motherboard/cpu0/core3',
407 0x42: '<inventory_root>/system/chassis/motherboard/cpu0/core4',
408 0x43: '<inventory_root>/system/chassis/motherboard/cpu0/core5',
409 0x44: '<inventory_root>/system/chassis/motherboard/cpu0/core6',
410 0x45: '<inventory_root>/system/chassis/motherboard/cpu0/core7',
411 0x46: '<inventory_root>/system/chassis/motherboard/cpu0/core8',
412 0x47: '<inventory_root>/system/chassis/motherboard/cpu0/core9',
413 0x48: '<inventory_root>/system/chassis/motherboard/cpu0/core10',
414 0x49: '<inventory_root>/system/chassis/motherboard/cpu0/core11',
415 0x4a: '<inventory_root>/system/chassis/motherboard/cpu1/core0',
416 0x4b: '<inventory_root>/system/chassis/motherboard/cpu1/core1',
417 0x4c: '<inventory_root>/system/chassis/motherboard/cpu1/core2',
418 0x4d: '<inventory_root>/system/chassis/motherboard/cpu1/core3',
419 0x4e: '<inventory_root>/system/chassis/motherboard/cpu1/core4',
420 0x4f: '<inventory_root>/system/chassis/motherboard/cpu1/core5',
421 0x50: '<inventory_root>/system/chassis/motherboard/cpu1/core6',
422 0x51: '<inventory_root>/system/chassis/motherboard/cpu1/core7',
423 0x52: '<inventory_root>/system/chassis/motherboard/cpu1/core8',
424 0x53: '<inventory_root>/system/chassis/motherboard/cpu1/core9',
425 0x54: '<inventory_root>/system/chassis/motherboard/cpu1/core10',
426 0x55: '<inventory_root>/system/chassis/motherboard/cpu1/core11',
427 0x56: '<inventory_root>/system/chassis/motherboard/membuf0',
428 0x57: '<inventory_root>/system/chassis/motherboard/membuf1',
429 0x58: '<inventory_root>/system/chassis/motherboard/membuf2',
430 0x59: '<inventory_root>/system/chassis/motherboard/membuf3',
431 0x5a: '<inventory_root>/system/chassis/motherboard/membuf4',
432 0x5b: '<inventory_root>/system/chassis/motherboard/membuf5',
433 0x5c: '<inventory_root>/system/chassis/motherboard/membuf6',
434 0x5d: '<inventory_root>/system/chassis/motherboard/membuf7',
435 0x5f: '/org/openbmc/sensors/host/BootCount',
436 0x60: '<inventory_root>/system/chassis/motherboard',
437 0x61: '<inventory_root>/system/systemevent',
438 0x62: '<inventory_root>/system/powerlimit',
439 0x63: '<inventory_root>/system/chassis/motherboard/refclock',
440 0x64: '<inventory_root>/system/chassis/motherboard/pcieclock',
441 0xb1: '<inventory_root>/system/chassis/motherboard/todclock',
442 0xb2: '<inventory_root>/system/chassis/motherboard/apss',
443 0xb3: '/org/openbmc/sensors/host/powercap',
444 0xb5: '/org/openbmc/sensors/host/OperatingSystemStatus',
445 0xb6: '<inventory_root>/system/chassis/motherboard/pcielink',
Chris Austenb29d2e82016-06-07 12:25:35 -0500446 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500447 'GPIO_PRESENT': {}
Chris Austenb29d2e82016-06-07 12:25:35 -0500448}
449
450GPIO_CONFIG = {}
451GPIO_CONFIG['BMC_POWER_UP'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500452 {'gpio_pin': 'D1', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500453GPIO_CONFIG['SYS_PWROK_BUFF'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500454 {'gpio_pin': 'D2', 'direction': 'in'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500455GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500456 {'gpio_pin': 'N4', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500457GPIO_CONFIG['CM1_OE_R_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500458 {'gpio_pin': 'Q6', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500459GPIO_CONFIG['BMC_CP0_RESET_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500460 {'gpio_pin': 'O2', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500461GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500462 {'gpio_pin': 'J2', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500463GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500464 {'gpio_pin': 'B6', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500465GPIO_CONFIG['CP0_DEVICES_RESET_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500466 {'gpio_pin': 'N3', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500467GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500468 {'gpio_pin': 'N5', 'direction': 'out'}
469GPIO_CONFIG['IDBTN'] = \
470 {'gpio_pin': 'Q7', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500471GPIO_CONFIG['FSI_DATA'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500472 {'gpio_pin': 'A5', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500473GPIO_CONFIG['FSI_CLK'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500474 {'gpio_pin': 'A4', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500475GPIO_CONFIG['FSI_ENABLE'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500476 {'gpio_pin': 'D0', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500477GPIO_CONFIG['CRONUS_SEL'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500478 {'gpio_pin': 'A6', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500479GPIO_CONFIG['BMC_THROTTLE'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500480 {'gpio_pin': 'J3', 'direction': 'out'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500481
482GPIO_CONFIG['POWER_BUTTON'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500483 {'gpio_pin': 'E0', 'direction': 'both'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500484GPIO_CONFIG['RESET_BUTTON'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500485 {'gpio_pin': 'E4', 'direction': 'both'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500486
487GPIO_CONFIG['PS0_PRES_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500488 {'gpio_pin': 'P7', 'direction': 'in'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500489GPIO_CONFIG['PS1_PRES_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500490 {'gpio_pin': 'N0', 'direction': 'in'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500491GPIO_CONFIG['CARD_PRES_N'] = \
Gunnar Millsdca35792018-03-26 10:05:38 -0500492 {'gpio_pin': 'J0', 'direction': 'in'}
Chris Austenb29d2e82016-06-07 12:25:35 -0500493
494
495def convertGpio(name):
496 name = name.upper()
497 c = name[0:1]
498 offset = int(name[1:])
499 a = ord(c)-65
500 base = a*8+GPIO_BASE
501 return base+offset
502
503
504HWMON_CONFIG = {
Gunnar Millsdca35792018-03-26 10:05:38 -0500505 '4-0050': {
506 'names': {
507 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
508 'caps_curr_powerreading': {'object_path': 'powercap/system_power', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
509 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
510 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
511 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
512 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
Chris Austenb29d2e82016-06-07 12:25:35 -0500513 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500514 'labels': {
515 '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
516 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
517 '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
518 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
519 '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
520 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
521 '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
522 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
523 '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
524 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
525 '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
526 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
527 '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
528 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
529 '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
530 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
531 '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
532 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
533 '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
534 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
535 '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
536 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
537 '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
538 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
539 '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
540 '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
541 '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
542 '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
543 '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
544 '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
545 '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
546 '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
547 '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
548 '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
549 '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
550 '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
551 '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
552 '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
553 '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
554 '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
555 '94': {'object_path': 'temperature/membuf0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
556 '95': {'object_path': 'temperature/membuf1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
557 '96': {'object_path': 'temperature/membuf2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
558 '97': {'object_path': 'temperature/membuf3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
Chris Austenb29d2e82016-06-07 12:25:35 -0500559 }
560 },
Gunnar Millsdca35792018-03-26 10:05:38 -0500561 '5-0050': {
562 'labels': {
563 '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
564 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
565 '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
566 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
567 '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
568 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
569 '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
570 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
571 '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
572 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
573 '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
574 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
575 '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
576 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
577 '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
578 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
579 '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
580 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
581 '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
582 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
583 '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
584 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
585 '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
586 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
587 '118': {'object_path': 'temperature/dimm16', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
588 '119': {'object_path': 'temperature/dimm17', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
589 '120': {'object_path': 'temperature/dimm18', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
590 '121': {'object_path': 'temperature/dimm19', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
591 '122': {'object_path': 'temperature/dimm20', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
592 '123': {'object_path': 'temperature/dimm21', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
593 '124': {'object_path': 'temperature/dimm22', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
594 '125': {'object_path': 'temperature/dimm23', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
595 '126': {'object_path': 'temperature/dimm24', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
596 '127': {'object_path': 'temperature/dimm25', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
597 '128': {'object_path': 'temperature/dimm26', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
598 '129': {'object_path': 'temperature/dimm27', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
599 '130': {'object_path': 'temperature/dimm28', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
600 '131': {'object_path': 'temperature/dimm29', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
601 '132': {'object_path': 'temperature/dimm30', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
602 '133': {'object_path': 'temperature/dimm31', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
603 '98': {'object_path': 'temperature/membuf4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
604 '99': {'object_path': 'temperature/membuf5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
605 '100': {'object_path': 'temperature/membuf6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
606 '101': {'object_path': 'temperature/membuf7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
Chris Austenb29d2e82016-06-07 12:25:35 -0500607 }
608 },
609}
610
611
612# Miscellaneous non-poll sensor with system specific properties.
613# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
614MISC_SENSORS = {
Gunnar Millsdca35792018-03-26 10:05:38 -0500615 0x5f: {'class': 'BootCountSensor'},
616 0x05: {'class': 'BootProgressSensor'},
617 0x08: {'class': 'OccStatusSensor',
618 'os_path': '/sys/class/i2c-adapter/i2c-3/3-0050/online'},
619 0x09: {'class': 'OccStatusSensor',
620 'os_path': '/sys/class/i2c-adapter/i2c-3/3-0051/online'},
621 0xb5: {'class': 'OperatingSystemStatusSensor'},
622 0xb3: {'class': 'PowerCap',
623 'os_path': '/sys/class/hwmon/hwmon3/user_powercap'},
Chris Austenb29d2e82016-06-07 12:25:35 -0500624}