Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | #! /usr/bin/python |
| 2 | |
| 3 | HOME_PATH = './' |
| 4 | CACHE_PATH = '/var/cache/obmc/' |
| 5 | FLASH_DOWNLOAD_PATH = "/tmp" |
| 6 | GPIO_BASE = 320 |
| 7 | SYSTEM_NAME = "Barreleye" |
| 8 | |
| 9 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 10 | # 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 Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | SYSTEM_STATES = [ |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 15 | 'BASE_APPS', |
| 16 | 'BMC_STARTING', |
| 17 | 'BMC_STARTING2', |
| 18 | 'BMC_READY', |
| 19 | 'HOST_POWERING_ON', |
| 20 | 'HOST_POWERED_ON', |
| 21 | 'HOST_BOOTING', |
| 22 | 'HOST_BOOTED', |
| 23 | 'HOST_POWERED_OFF', |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 24 | ] |
| 25 | |
| 26 | EXIT_STATE_DEPEND = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 27 | 'BASE_APPS': { |
| 28 | '/org/openbmc/sensors': 0, |
| 29 | }, |
| 30 | 'BMC_STARTING': { |
| 31 | '/org/openbmc/control/power0': 0, |
| 32 | '/org/openbmc/control/host0': 0, |
| 33 | '/org/openbmc/control/flash/bios': 0, |
| 34 | '/org/openbmc/sensors/speed/fan5': 0, |
| 35 | '/org/openbmc/inventory/system/chassis/io_board': 0, |
| 36 | }, |
| 37 | 'BMC_STARTING2': { |
| 38 | '/org/openbmc/control/fans': 0, |
| 39 | '/org/openbmc/control/chassis0': 0, |
| 40 | }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 41 | } |
| 42 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 43 | # method will be called when state is entered |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 44 | ENTER_STATE_CALLBACK = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 45 | 'HOST_POWERED_ON': { |
| 46 | 'boot': { |
| 47 | 'bus_name': 'org.openbmc.control.Host', |
| 48 | 'obj_name': '/org/openbmc/control/host0', |
| 49 | 'interface_name': 'org.openbmc.control.Host', |
| 50 | }, |
| 51 | 'setMax': { |
| 52 | 'bus_name': 'org.openbmc.control.Fans', |
| 53 | 'obj_name': '/org/openbmc/control/fans', |
| 54 | 'interface_name': 'org.openbmc.control.Fans', |
| 55 | }, |
| 56 | 'setOn': { |
| 57 | 'bus_name': 'org.openbmc.control.led', |
| 58 | 'obj_name': '/org/openbmc/control/led/identify', |
| 59 | 'interface_name': 'org.openbmc.Led', |
| 60 | } |
| 61 | }, |
| 62 | 'HOST_POWERED_OFF': { |
| 63 | 'setOff': { |
| 64 | 'bus_name': 'org.openbmc.control.led', |
| 65 | 'obj_name': '/org/openbmc/control/led/identify', |
| 66 | 'interface_name': 'org.openbmc.Led', |
| 67 | } |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 68 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 69 | }, |
| 70 | 'BMC_READY': { |
| 71 | 'setOn': { |
| 72 | 'bus_name': 'org.openbmc.control.led', |
| 73 | 'obj_name': '/org/openbmc/control/led/beep', |
| 74 | 'interface_name': 'org.openbmc.Led', |
| 75 | }, |
| 76 | 'init': { |
| 77 | 'bus_name': 'org.openbmc.control.Flash', |
| 78 | 'obj_name': '/org/openbmc/control/flash/bios', |
| 79 | 'interface_name': 'org.openbmc.Flash', |
| 80 | } |
| 81 | } |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | APPS = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 85 | 'startup_hacks': { |
| 86 | 'system_state': 'BASE_APPS', |
| 87 | 'start_process': True, |
| 88 | 'monitor_process': False, |
| 89 | 'process_name': 'startup_hacks.sh', |
| 90 | }, |
| 91 | 'inventory': { |
| 92 | 'system_state': 'BMC_STARTING', |
| 93 | 'start_process': True, |
| 94 | 'monitor_process': True, |
| 95 | 'process_name': 'inventory_items.py', |
| 96 | 'args': [SYSTEM_NAME] |
| 97 | }, |
| 98 | 'pcie_present': { |
| 99 | 'system_state': 'HOST_POWERED_ON', |
| 100 | 'start_process': True, |
| 101 | 'monitor_process': False, |
| 102 | 'process_name': 'pcie_slot_present.exe', |
| 103 | }, |
| 104 | 'fan_control': { |
| 105 | 'system_state': 'BMC_STARTING2', |
| 106 | 'start_process': True, |
| 107 | 'monitor_process': True, |
| 108 | 'process_name': 'fan_control.py', |
| 109 | }, |
| 110 | 'hwmon': { |
| 111 | 'system_state': 'BMC_STARTING', |
| 112 | 'start_process': True, |
| 113 | 'monitor_process': True, |
| 114 | 'process_name': 'hwmon.py', |
| 115 | 'args': [SYSTEM_NAME] |
| 116 | }, |
| 117 | 'sensor_manager': { |
| 118 | 'system_state': 'BASE_APPS', |
| 119 | 'start_process': True, |
| 120 | 'monitor_process': True, |
| 121 | 'process_name': 'sensor_manager2.py', |
| 122 | 'args': [SYSTEM_NAME] |
| 123 | }, |
| 124 | 'host_watchdog': { |
| 125 | 'system_state': 'BMC_STARTING', |
| 126 | 'start_process': True, |
| 127 | 'monitor_process': True, |
| 128 | 'process_name': 'host_watchdog.exe', |
| 129 | }, |
| 130 | 'power_control': { |
| 131 | 'system_state': 'BMC_STARTING', |
| 132 | 'start_process': True, |
| 133 | 'monitor_process': True, |
| 134 | 'process_name': 'power_control.exe', |
| 135 | 'args': ['3000', '10'] |
| 136 | }, |
| 137 | 'power_button': { |
| 138 | 'system_state': 'BMC_STARTING', |
| 139 | 'start_process': True, |
| 140 | 'monitor_process': True, |
| 141 | 'process_name': 'button_power.exe', |
| 142 | }, |
| 143 | 'reset_button': { |
| 144 | 'system_state': 'BMC_STARTING', |
| 145 | 'start_process': True, |
| 146 | 'monitor_process': True, |
| 147 | 'process_name': 'button_reset.exe', |
| 148 | }, |
| 149 | 'led_control': { |
| 150 | 'system_state': 'BMC_STARTING', |
| 151 | 'start_process': True, |
| 152 | 'monitor_process': True, |
| 153 | 'process_name': 'led_controller.exe', |
| 154 | }, |
| 155 | 'flash_control': { |
| 156 | 'system_state': 'BMC_STARTING', |
| 157 | 'start_process': True, |
| 158 | 'monitor_process': True, |
| 159 | 'process_name': 'flash_bios.exe', |
| 160 | }, |
| 161 | 'bmc_flash_control': { |
| 162 | 'system_state': 'BMC_STARTING', |
| 163 | 'start_process': True, |
| 164 | 'monitor_process': True, |
| 165 | 'process_name': 'bmc_update.py', |
| 166 | }, |
| 167 | 'download_manager': { |
| 168 | 'system_state': 'BMC_STARTING', |
| 169 | 'start_process': True, |
| 170 | 'monitor_process': True, |
| 171 | 'process_name': 'download_manager.py', |
| 172 | 'args': [SYSTEM_NAME] |
| 173 | }, |
| 174 | 'host_control': { |
| 175 | 'system_state': 'BMC_STARTING', |
| 176 | 'start_process': True, |
| 177 | 'monitor_process': True, |
| 178 | 'process_name': 'control_host.exe', |
| 179 | }, |
| 180 | 'chassis_control': { |
| 181 | 'system_state': 'BMC_STARTING2', |
| 182 | 'start_process': True, |
| 183 | 'monitor_process': True, |
| 184 | 'process_name': 'chassis_control.py', |
| 185 | }, |
| 186 | 'board_vpd': { |
| 187 | 'system_state': 'BMC_STARTING2', |
| 188 | 'start_process': True, |
| 189 | 'monitor_process': False, |
| 190 | 'process_name': 'phosphor-read-eeprom', |
| 191 | 'args': ['--eeprom', '/sys/bus/i2c/devices/0-0050/eeprom', '--fruid', '64'], |
| 192 | }, |
| 193 | 'exp_vpd': { |
| 194 | 'system_state': 'BMC_STARTING2', |
| 195 | 'start_process': True, |
| 196 | 'monitor_process': False, |
| 197 | 'process_name': 'phosphor-read-eeprom', |
| 198 | 'args': ['--eeprom', '/sys/bus/i2c/devices/6-0051/eeprom', '--fruid', '65'], |
| 199 | }, |
| 200 | 'hdd_vpd': { |
| 201 | 'system_state': 'BMC_STARTING2', |
| 202 | 'start_process': True, |
| 203 | 'monitor_process': False, |
| 204 | 'process_name': 'phosphor-read-eeprom', |
| 205 | 'args': ['--eeprom', '/sys/bus/i2c/devices/6-0055/eeprom', '--fruid', '66'], |
| 206 | }, |
| 207 | 'restore': { |
| 208 | 'system_state': 'BMC_READY', |
| 209 | 'start_process': True, |
| 210 | 'monitor_process': False, |
| 211 | 'process_name': 'discover_system_state.py', |
| 212 | }, |
| 213 | 'bmc_control': { |
| 214 | 'system_state': 'BMC_STARTING', |
| 215 | 'start_process': True, |
| 216 | 'monitor_process': True, |
| 217 | 'process_name': 'control_bmc.exe', |
| 218 | }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | CACHED_INTERFACES = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 222 | "org.openbmc.InventoryItem": True, |
| 223 | "org.openbmc.control.Chassis": True, |
| 224 | } |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 225 | INVENTORY_ROOT = '/org/openbmc/inventory' |
| 226 | |
| 227 | FRU_INSTANCES = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 228 | '<inventory_root>/system': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"}, |
| 229 | '<inventory_root>/system/bios': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"}, |
| 230 | '<inventory_root>/system/misc': {'fru_type': 'SYSTEM', 'is_fru': False, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 231 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 232 | '<inventory_root>/system/chassis': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"}, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 233 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 234 | '<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, }, |
| 235 | '<inventory_root>/system/chassis/io_board': {'fru_type': 'DAUGHTER_CARD', 'is_fru': True, }, |
| 236 | '<inventory_root>/system/chassis/sas_expander': {'fru_type': 'DAUGHTER_CARD', 'is_fru': True, }, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 237 | '<inventory_root>/system/chassis/hdd_backplane': {'fru_type': 'DAUGHTER_CARD', |
| 238 | 'is_fru': True, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 239 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 240 | '<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, }, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 241 | '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', |
| 242 | 'is_fru': False, }, |
| 243 | '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', |
| 244 | 'is_fru': False, }, |
| 245 | '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', |
| 246 | 'is_fru': False, }, |
| 247 | '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', |
| 248 | 'is_fru': False, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 249 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 250 | '<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, }, |
| 251 | '<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, }, |
| 252 | '<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True, }, |
| 253 | '<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True, }, |
| 254 | '<inventory_root>/system/chassis/fan4': {'fru_type': 'FAN', 'is_fru': True, }, |
| 255 | '<inventory_root>/system/chassis/fan5': {'fru_type': 'FAN', 'is_fru': True, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 256 | |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 257 | '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False, |
| 258 | 'manufacturer': 'ASPEED'}, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 259 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 260 | '<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, }, |
| 261 | '<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 262 | |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 263 | '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', |
| 264 | 'is_fru': False, }, |
| 265 | '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', |
| 266 | 'is_fru': False, }, |
| 267 | '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', |
| 268 | 'is_fru': False, }, |
| 269 | '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', |
| 270 | 'is_fru': False, }, |
| 271 | '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', |
| 272 | 'is_fru': False, }, |
| 273 | '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', |
| 274 | 'is_fru': False, }, |
| 275 | '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', |
| 276 | 'is_fru': False, }, |
| 277 | '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', |
| 278 | 'is_fru': False, }, |
| 279 | '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', |
| 280 | 'is_fru': False, }, |
| 281 | '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', |
| 282 | 'is_fru': False, }, |
| 283 | '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', |
| 284 | 'is_fru': False, }, |
| 285 | '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', |
| 286 | 'is_fru': False, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 287 | |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 288 | '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', |
| 289 | 'is_fru': False, }, |
| 290 | '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', |
| 291 | 'is_fru': False, }, |
| 292 | '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', |
| 293 | 'is_fru': False, }, |
| 294 | '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', |
| 295 | 'is_fru': False, }, |
| 296 | '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', |
| 297 | 'is_fru': False, }, |
| 298 | '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', |
| 299 | 'is_fru': False, }, |
| 300 | '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', |
| 301 | 'is_fru': False, }, |
| 302 | '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', |
| 303 | 'is_fru': False, }, |
| 304 | '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', |
| 305 | 'is_fru': False, }, |
| 306 | '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', |
| 307 | 'is_fru': False, }, |
| 308 | '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', |
| 309 | 'is_fru': False, }, |
| 310 | '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', |
| 311 | 'is_fru': False, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 312 | |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 313 | '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER', |
| 314 | 'is_fru': False, }, |
| 315 | '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER', |
| 316 | 'is_fru': False, }, |
| 317 | '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER', |
| 318 | 'is_fru': False, }, |
| 319 | '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER', |
| 320 | 'is_fru': False, }, |
| 321 | '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER', |
| 322 | 'is_fru': False, }, |
| 323 | '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER', |
| 324 | 'is_fru': False, }, |
| 325 | '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER', |
| 326 | 'is_fru': False, }, |
| 327 | '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER', |
| 328 | 'is_fru': False, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 329 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 330 | '<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 331 | '<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 332 | '<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 333 | '<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 334 | '<inventory_root>/system/chassis/motherboard/dimm4': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 335 | '<inventory_root>/system/chassis/motherboard/dimm5': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 336 | '<inventory_root>/system/chassis/motherboard/dimm6': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 337 | '<inventory_root>/system/chassis/motherboard/dimm7': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 338 | '<inventory_root>/system/chassis/motherboard/dimm8': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 339 | '<inventory_root>/system/chassis/motherboard/dimm9': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 340 | '<inventory_root>/system/chassis/motherboard/dimm10': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 341 | '<inventory_root>/system/chassis/motherboard/dimm11': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 342 | '<inventory_root>/system/chassis/motherboard/dimm12': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 343 | '<inventory_root>/system/chassis/motherboard/dimm13': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 344 | '<inventory_root>/system/chassis/motherboard/dimm14': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 345 | '<inventory_root>/system/chassis/motherboard/dimm15': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 346 | '<inventory_root>/system/chassis/motherboard/dimm16': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 347 | '<inventory_root>/system/chassis/motherboard/dimm17': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 348 | '<inventory_root>/system/chassis/motherboard/dimm18': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 349 | '<inventory_root>/system/chassis/motherboard/dimm19': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 350 | '<inventory_root>/system/chassis/motherboard/dimm20': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 351 | '<inventory_root>/system/chassis/motherboard/dimm21': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 352 | '<inventory_root>/system/chassis/motherboard/dimm22': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 353 | '<inventory_root>/system/chassis/motherboard/dimm23': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 354 | '<inventory_root>/system/chassis/motherboard/dimm24': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 355 | '<inventory_root>/system/chassis/motherboard/dimm25': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 356 | '<inventory_root>/system/chassis/motherboard/dimm26': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 357 | '<inventory_root>/system/chassis/motherboard/dimm27': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 358 | '<inventory_root>/system/chassis/motherboard/dimm28': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 359 | '<inventory_root>/system/chassis/motherboard/dimm29': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 360 | '<inventory_root>/system/chassis/motherboard/dimm30': {'fru_type': 'DIMM', 'is_fru': True, }, |
| 361 | '<inventory_root>/system/chassis/motherboard/dimm31': {'fru_type': 'DIMM', 'is_fru': True, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 362 | |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 363 | '<inventory_root>/system/chassis/io_board/pcie_slot0_riser': {'fru_type': 'PCIE_RISER', |
| 364 | 'is_fru': True, }, |
| 365 | '<inventory_root>/system/chassis/io_board/pcie_slot1_riser': {'fru_type': 'PCIE_RISER', |
| 366 | 'is_fru': True, }, |
| 367 | '<inventory_root>/system/chassis/io_board/pcie_slot2_riser': {'fru_type': 'PCIE_RISER', |
| 368 | 'is_fru': True, }, |
| 369 | '<inventory_root>/system/chassis/io_board/pcie_slot0': {'fru_type': 'PCIE_CARD', |
| 370 | 'is_fru': True, }, |
| 371 | '<inventory_root>/system/chassis/io_board/pcie_slot1': {'fru_type': 'PCIE_CARD', |
| 372 | 'is_fru': True, }, |
| 373 | '<inventory_root>/system/chassis/io_board/pcie_slot2': {'fru_type': 'PCIE_CARD', |
| 374 | 'is_fru': True, }, |
| 375 | '<inventory_root>/system/chassis/io_board/pcie_mezz0': {'fru_type': 'PCIE_CARD', |
| 376 | 'is_fru': True, }, |
| 377 | '<inventory_root>/system/chassis/io_board/pcie_mezz1': {'fru_type': 'PCIE_CARD', |
| 378 | 'is_fru': True, }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 379 | } |
| 380 | |
| 381 | ID_LOOKUP = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 382 | 'FRU': { |
| 383 | 0x03: '<inventory_root>/system/chassis/motherboard', |
| 384 | 0x40: '<inventory_root>/system/chassis/io_board', |
| 385 | 0x01: '<inventory_root>/system/chassis/motherboard/cpu0', |
| 386 | 0x02: '<inventory_root>/system/chassis/motherboard/cpu1', |
| 387 | 0x04: '<inventory_root>/system/chassis/motherboard/membuf0', |
| 388 | 0x05: '<inventory_root>/system/chassis/motherboard/membuf1', |
| 389 | 0x06: '<inventory_root>/system/chassis/motherboard/membuf2', |
| 390 | 0x07: '<inventory_root>/system/chassis/motherboard/membuf3', |
| 391 | 0x08: '<inventory_root>/system/chassis/motherboard/membuf4', |
| 392 | 0x09: '<inventory_root>/system/chassis/motherboard/membuf5', |
| 393 | 0x0a: '<inventory_root>/system/chassis/motherboard/membuf6', |
| 394 | 0x0b: '<inventory_root>/system/chassis/motherboard/membuf7', |
| 395 | 0x0c: '<inventory_root>/system/chassis/motherboard/dimm0', |
| 396 | 0x0d: '<inventory_root>/system/chassis/motherboard/dimm1', |
| 397 | 0x0e: '<inventory_root>/system/chassis/motherboard/dimm2', |
| 398 | 0x0f: '<inventory_root>/system/chassis/motherboard/dimm3', |
| 399 | 0x10: '<inventory_root>/system/chassis/motherboard/dimm4', |
| 400 | 0x11: '<inventory_root>/system/chassis/motherboard/dimm5', |
| 401 | 0x12: '<inventory_root>/system/chassis/motherboard/dimm6', |
| 402 | 0x13: '<inventory_root>/system/chassis/motherboard/dimm7', |
| 403 | 0x14: '<inventory_root>/system/chassis/motherboard/dimm8', |
| 404 | 0x15: '<inventory_root>/system/chassis/motherboard/dimm9', |
| 405 | 0x16: '<inventory_root>/system/chassis/motherboard/dimm10', |
| 406 | 0x17: '<inventory_root>/system/chassis/motherboard/dimm11', |
| 407 | 0x18: '<inventory_root>/system/chassis/motherboard/dimm12', |
| 408 | 0x19: '<inventory_root>/system/chassis/motherboard/dimm13', |
| 409 | 0x1a: '<inventory_root>/system/chassis/motherboard/dimm14', |
| 410 | 0x1b: '<inventory_root>/system/chassis/motherboard/dimm15', |
| 411 | 0x1c: '<inventory_root>/system/chassis/motherboard/dimm16', |
| 412 | 0x1d: '<inventory_root>/system/chassis/motherboard/dimm17', |
| 413 | 0x1e: '<inventory_root>/system/chassis/motherboard/dimm18', |
| 414 | 0x1f: '<inventory_root>/system/chassis/motherboard/dimm19', |
| 415 | 0x20: '<inventory_root>/system/chassis/motherboard/dimm20', |
| 416 | 0x21: '<inventory_root>/system/chassis/motherboard/dimm21', |
| 417 | 0x22: '<inventory_root>/system/chassis/motherboard/dimm22', |
| 418 | 0x23: '<inventory_root>/system/chassis/motherboard/dimm23', |
| 419 | 0x24: '<inventory_root>/system/chassis/motherboard/dimm24', |
| 420 | 0x25: '<inventory_root>/system/chassis/motherboard/dimm25', |
| 421 | 0x26: '<inventory_root>/system/chassis/motherboard/dimm26', |
| 422 | 0x27: '<inventory_root>/system/chassis/motherboard/dimm27', |
| 423 | 0x28: '<inventory_root>/system/chassis/motherboard/dimm28', |
| 424 | 0x29: '<inventory_root>/system/chassis/motherboard/dimm29', |
| 425 | 0x2a: '<inventory_root>/system/chassis/motherboard/dimm30', |
| 426 | 0x2b: '<inventory_root>/system/chassis/motherboard/dimm31', |
| 427 | 0x33: '<inventory_root>/system', |
| 428 | }, |
| 429 | 'FRU_STR': { |
| 430 | 'PRODUCT_0': '<inventory_root>/system/bios', |
| 431 | 'BOARD_3': '<inventory_root>/system/misc', |
| 432 | 'PRODUCT_51': '<inventory_root>/system/misc', |
| 433 | 'PRODUCT_100': '<inventory_root>/system', |
| 434 | 'CHASSIS_100': '<inventory_root>/system/chassis', |
| 435 | 'BOARD_100': '<inventory_root>/system/chassis/io_board', |
| 436 | 'BOARD_101': '<inventory_root>/system/chassis/sas_expander', |
| 437 | 'BOARD_102': '<inventory_root>/system/chassis/hdd_backplane', |
| 438 | 'CHASSIS_3': '<inventory_root>/system/chassis/motherboard', |
| 439 | 'BOARD_1': '<inventory_root>/system/chassis/motherboard/cpu0', |
| 440 | 'BOARD_2': '<inventory_root>/system/chassis/motherboard/cpu1', |
| 441 | 'BOARD_4': '<inventory_root>/system/chassis/motherboard/membuf0', |
| 442 | 'BOARD_5': '<inventory_root>/system/chassis/motherboard/membuf1', |
| 443 | 'BOARD_6': '<inventory_root>/system/chassis/motherboard/membuf2', |
| 444 | 'BOARD_7': '<inventory_root>/system/chassis/motherboard/membuf3', |
| 445 | 'BOARD_8': '<inventory_root>/system/chassis/motherboard/membuf4', |
| 446 | 'BOARD_9': '<inventory_root>/system/chassis/motherboard/membuf5', |
| 447 | 'BOARD_10': '<inventory_root>/system/chassis/motherboard/membuf6', |
| 448 | 'BOARD_11': '<inventory_root>/system/chassis/motherboard/membuf7', |
| 449 | 'PRODUCT_12': '<inventory_root>/system/chassis/motherboard/dimm0', |
| 450 | 'PRODUCT_13': '<inventory_root>/system/chassis/motherboard/dimm1', |
| 451 | 'PRODUCT_14': '<inventory_root>/system/chassis/motherboard/dimm2', |
| 452 | 'PRODUCT_15': '<inventory_root>/system/chassis/motherboard/dimm3', |
| 453 | 'PRODUCT_16': '<inventory_root>/system/chassis/motherboard/dimm4', |
| 454 | 'PRODUCT_17': '<inventory_root>/system/chassis/motherboard/dimm5', |
| 455 | 'PRODUCT_18': '<inventory_root>/system/chassis/motherboard/dimm6', |
| 456 | 'PRODUCT_19': '<inventory_root>/system/chassis/motherboard/dimm7', |
| 457 | 'PRODUCT_20': '<inventory_root>/system/chassis/motherboard/dimm8', |
| 458 | 'PRODUCT_21': '<inventory_root>/system/chassis/motherboard/dimm9', |
| 459 | 'PRODUCT_22': '<inventory_root>/system/chassis/motherboard/dimm10', |
| 460 | 'PRODUCT_23': '<inventory_root>/system/chassis/motherboard/dimm11', |
| 461 | 'PRODUCT_24': '<inventory_root>/system/chassis/motherboard/dimm12', |
| 462 | 'PRODUCT_25': '<inventory_root>/system/chassis/motherboard/dimm13', |
| 463 | 'PRODUCT_26': '<inventory_root>/system/chassis/motherboard/dimm14', |
| 464 | 'PRODUCT_27': '<inventory_root>/system/chassis/motherboard/dimm15', |
| 465 | 'PRODUCT_28': '<inventory_root>/system/chassis/motherboard/dimm16', |
| 466 | 'PRODUCT_29': '<inventory_root>/system/chassis/motherboard/dimm17', |
| 467 | 'PRODUCT_30': '<inventory_root>/system/chassis/motherboard/dimm18', |
| 468 | 'PRODUCT_31': '<inventory_root>/system/chassis/motherboard/dimm19', |
| 469 | 'PRODUCT_32': '<inventory_root>/system/chassis/motherboard/dimm20', |
| 470 | 'PRODUCT_33': '<inventory_root>/system/chassis/motherboard/dimm21', |
| 471 | 'PRODUCT_34': '<inventory_root>/system/chassis/motherboard/dimm22', |
| 472 | 'PRODUCT_35': '<inventory_root>/system/chassis/motherboard/dimm23', |
| 473 | 'PRODUCT_36': '<inventory_root>/system/chassis/motherboard/dimm24', |
| 474 | 'PRODUCT_37': '<inventory_root>/system/chassis/motherboard/dimm25', |
| 475 | 'PRODUCT_38': '<inventory_root>/system/chassis/motherboard/dimm26', |
| 476 | 'PRODUCT_39': '<inventory_root>/system/chassis/motherboard/dimm27', |
| 477 | 'PRODUCT_40': '<inventory_root>/system/chassis/motherboard/dimm28', |
| 478 | 'PRODUCT_41': '<inventory_root>/system/chassis/motherboard/dimm29', |
| 479 | 'PRODUCT_42': '<inventory_root>/system/chassis/motherboard/dimm30', |
| 480 | 'PRODUCT_43': '<inventory_root>/system/chassis/motherboard/dimm31', |
| 481 | }, |
| 482 | 'SENSOR': { |
| 483 | 0x35: '<inventory_root>/system/systemevent', |
| 484 | 0x36: '<inventory_root>/system/powerlimit', |
| 485 | 0x34: '<inventory_root>/system/chassis/motherboard', |
| 486 | 0x31: '<inventory_root>/system/chassis/motherboard/pcielink', |
| 487 | 0x37: '<inventory_root>/system/chassis/motherboard/refclock', |
| 488 | 0x38: '<inventory_root>/system/chassis/motherboard/pcieclock', |
| 489 | 0x39: '<inventory_root>/system/chassis/motherboard/todclock', |
| 490 | 0x3A: '<inventory_root>/system/chassis/motherboard/apss', |
| 491 | 0x0c: '<inventory_root>/system/chassis/motherboard/cpu0', |
| 492 | 0x0e: '<inventory_root>/system/chassis/motherboard/cpu1', |
| 493 | 0xc8: '<inventory_root>/system/chassis/motherboard/cpu0/core0', |
| 494 | 0xc9: '<inventory_root>/system/chassis/motherboard/cpu0/core1', |
| 495 | 0xca: '<inventory_root>/system/chassis/motherboard/cpu0/core2', |
| 496 | 0xcb: '<inventory_root>/system/chassis/motherboard/cpu0/core3', |
| 497 | 0xcc: '<inventory_root>/system/chassis/motherboard/cpu0/core4', |
| 498 | 0xcd: '<inventory_root>/system/chassis/motherboard/cpu0/core5', |
| 499 | 0xce: '<inventory_root>/system/chassis/motherboard/cpu0/core6', |
| 500 | 0xcf: '<inventory_root>/system/chassis/motherboard/cpu0/core7', |
| 501 | 0xd0: '<inventory_root>/system/chassis/motherboard/cpu0/core8', |
| 502 | 0xd1: '<inventory_root>/system/chassis/motherboard/cpu0/core9', |
| 503 | 0xd2: '<inventory_root>/system/chassis/motherboard/cpu0/core10', |
| 504 | 0xd3: '<inventory_root>/system/chassis/motherboard/cpu0/core11', |
| 505 | 0xd4: '<inventory_root>/system/chassis/motherboard/cpu1/core0', |
| 506 | 0xd5: '<inventory_root>/system/chassis/motherboard/cpu1/core1', |
| 507 | 0xd6: '<inventory_root>/system/chassis/motherboard/cpu1/core2', |
| 508 | 0xd7: '<inventory_root>/system/chassis/motherboard/cpu1/core3', |
| 509 | 0xd8: '<inventory_root>/system/chassis/motherboard/cpu1/core4', |
| 510 | 0xd9: '<inventory_root>/system/chassis/motherboard/cpu1/core5', |
| 511 | 0xda: '<inventory_root>/system/chassis/motherboard/cpu1/core6', |
| 512 | 0xdb: '<inventory_root>/system/chassis/motherboard/cpu1/core7', |
| 513 | 0xdc: '<inventory_root>/system/chassis/motherboard/cpu1/core8', |
| 514 | 0xdd: '<inventory_root>/system/chassis/motherboard/cpu1/core9', |
| 515 | 0xde: '<inventory_root>/system/chassis/motherboard/cpu1/core10', |
| 516 | 0xdf: '<inventory_root>/system/chassis/motherboard/cpu1/core11', |
| 517 | 0x40: '<inventory_root>/system/chassis/motherboard/membuf0', |
| 518 | 0x41: '<inventory_root>/system/chassis/motherboard/membuf1', |
| 519 | 0x42: '<inventory_root>/system/chassis/motherboard/membuf2', |
| 520 | 0x43: '<inventory_root>/system/chassis/motherboard/membuf3', |
| 521 | 0x44: '<inventory_root>/system/chassis/motherboard/membuf4', |
| 522 | 0x45: '<inventory_root>/system/chassis/motherboard/membuf5', |
| 523 | 0x46: '<inventory_root>/system/chassis/motherboard/membuf6', |
| 524 | 0x47: '<inventory_root>/system/chassis/motherboard/membuf7', |
| 525 | 0x10: '<inventory_root>/system/chassis/motherboard/dimm0', |
| 526 | 0x11: '<inventory_root>/system/chassis/motherboard/dimm1', |
| 527 | 0x12: '<inventory_root>/system/chassis/motherboard/dimm2', |
| 528 | 0x13: '<inventory_root>/system/chassis/motherboard/dimm3', |
| 529 | 0x14: '<inventory_root>/system/chassis/motherboard/dimm4', |
| 530 | 0x15: '<inventory_root>/system/chassis/motherboard/dimm5', |
| 531 | 0x16: '<inventory_root>/system/chassis/motherboard/dimm6', |
| 532 | 0x17: '<inventory_root>/system/chassis/motherboard/dimm7', |
| 533 | 0x18: '<inventory_root>/system/chassis/motherboard/dimm8', |
| 534 | 0x19: '<inventory_root>/system/chassis/motherboard/dimm9', |
| 535 | 0x1a: '<inventory_root>/system/chassis/motherboard/dimm10', |
| 536 | 0x1b: '<inventory_root>/system/chassis/motherboard/dimm11', |
| 537 | 0x1c: '<inventory_root>/system/chassis/motherboard/dimm12', |
| 538 | 0x1d: '<inventory_root>/system/chassis/motherboard/dimm13', |
| 539 | 0x1e: '<inventory_root>/system/chassis/motherboard/dimm14', |
| 540 | 0x1f: '<inventory_root>/system/chassis/motherboard/dimm15', |
| 541 | 0x20: '<inventory_root>/system/chassis/motherboard/dimm16', |
| 542 | 0x21: '<inventory_root>/system/chassis/motherboard/dimm17', |
| 543 | 0x22: '<inventory_root>/system/chassis/motherboard/dimm18', |
| 544 | 0x23: '<inventory_root>/system/chassis/motherboard/dimm19', |
| 545 | 0x24: '<inventory_root>/system/chassis/motherboard/dimm20', |
| 546 | 0x25: '<inventory_root>/system/chassis/motherboard/dimm21', |
| 547 | 0x26: '<inventory_root>/system/chassis/motherboard/dimm22', |
| 548 | 0x27: '<inventory_root>/system/chassis/motherboard/dimm23', |
| 549 | 0x28: '<inventory_root>/system/chassis/motherboard/dimm24', |
| 550 | 0x29: '<inventory_root>/system/chassis/motherboard/dimm25', |
| 551 | 0x2a: '<inventory_root>/system/chassis/motherboard/dimm26', |
| 552 | 0x2b: '<inventory_root>/system/chassis/motherboard/dimm27', |
| 553 | 0x2c: '<inventory_root>/system/chassis/motherboard/dimm28', |
| 554 | 0x2d: '<inventory_root>/system/chassis/motherboard/dimm29', |
| 555 | 0x2e: '<inventory_root>/system/chassis/motherboard/dimm30', |
| 556 | 0x2f: '<inventory_root>/system/chassis/motherboard/dimm31', |
| 557 | 0x09: '/org/openbmc/sensors/host/BootCount', |
| 558 | 0x05: '/org/openbmc/sensors/host/BootProgress', |
| 559 | 0x04: '/org/openbmc/sensors/host/HostStatus', |
| 560 | 0x08: '/org/openbmc/sensors/host/cpu0/OccStatus', |
| 561 | 0x0A: '/org/openbmc/sensors/host/cpu1/OccStatus', |
| 562 | 0x32: '/org/openbmc/sensors/host/OperatingSystemStatus', |
| 563 | 0x33: '/org/openbmc/sensors/host/powercap', |
| 564 | }, |
| 565 | 'GPIO_PRESENT': { |
| 566 | 'SLOT0_RISER_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_slot0_riser', |
| 567 | 'SLOT1_RISER_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_slot1_riser', |
| 568 | 'SLOT2_RISER_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_slot2_riser', |
| 569 | 'SLOT0_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_slot0', |
| 570 | 'SLOT1_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_slot1', |
| 571 | 'SLOT2_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_slot2', |
| 572 | 'MEZZ0_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_mezz0', |
| 573 | 'MEZZ1_PRESENT': '<inventory_root>/system/chassis/io_board/pcie_mezz1', |
| 574 | } |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 575 | } |
| 576 | |
| 577 | GPIO_CONFIG = {} |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 578 | GPIO_CONFIG['FSI_CLK'] = {'gpio_pin': 'A4', 'direction': 'out'} |
| 579 | GPIO_CONFIG['FSI_DATA'] = {'gpio_pin': 'A5', 'direction': 'out'} |
| 580 | GPIO_CONFIG['FSI_ENABLE'] = {'gpio_pin': 'D0', 'direction': 'out'} |
| 581 | GPIO_CONFIG['POWER_PIN'] = {'gpio_pin': 'E1', 'direction': 'out'} |
| 582 | GPIO_CONFIG['CRONUS_SEL'] = {'gpio_pin': 'A6', 'direction': 'out'} |
| 583 | GPIO_CONFIG['PGOOD'] = {'gpio_pin': 'C7', 'direction': 'in'} |
| 584 | GPIO_CONFIG['POWER_BUTTON'] = {'gpio_pin': 'E0', 'direction': 'both'} |
| 585 | GPIO_CONFIG['PCIE_RESET'] = {'gpio_pin': 'B5', 'direction': 'out'} |
| 586 | GPIO_CONFIG['USB_RESET'] = {'gpio_pin': 'B6', 'direction': 'out'} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 587 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 588 | GPIO_CONFIG['IDBTN'] = {'gpio_pin': 'Q7', 'direction': 'out'} |
| 589 | GPIO_CONFIG['BMC_THROTTLE'] = {'gpio_pin': 'J3', 'direction': 'out'} |
| 590 | GPIO_CONFIG['RESET_BUTTON'] = {'gpio_pin': 'E2', 'direction': 'both'} |
| 591 | GPIO_CONFIG['CPLD_TCK'] = {'gpio_pin': 'P0', 'direction': 'out'} |
| 592 | GPIO_CONFIG['CPLD_TDO'] = {'gpio_pin': 'P1', 'direction': 'out'} |
| 593 | GPIO_CONFIG['CPLD_TDI'] = {'gpio_pin': 'P2', 'direction': 'out'} |
| 594 | GPIO_CONFIG['CPLD_TMS'] = {'gpio_pin': 'P3', 'direction': 'out'} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 595 | |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 596 | GPIO_CONFIG['SLOT0_RISER_PRESENT'] = {'gpio_pin': 'N0', 'direction': 'in'} |
| 597 | GPIO_CONFIG['SLOT1_RISER_PRESENT'] = {'gpio_pin': 'N1', 'direction': 'in'} |
| 598 | GPIO_CONFIG['SLOT2_RISER_PRESENT'] = {'gpio_pin': 'N2', 'direction': 'in'} |
| 599 | GPIO_CONFIG['SLOT0_PRESENT'] = {'gpio_pin': 'N3', 'direction': 'in'} |
| 600 | GPIO_CONFIG['SLOT1_PRESENT'] = {'gpio_pin': 'N4', 'direction': 'in'} |
| 601 | GPIO_CONFIG['SLOT2_PRESENT'] = {'gpio_pin': 'N5', 'direction': 'in'} |
| 602 | GPIO_CONFIG['MEZZ0_PRESENT'] = {'gpio_pin': 'O0', 'direction': 'in'} |
| 603 | GPIO_CONFIG['MEZZ1_PRESENT'] = {'gpio_pin': 'O1', 'direction': 'in'} |
| 604 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 605 | |
| 606 | def convertGpio(name): |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 607 | name = name.upper() |
| 608 | c = name[0:1] |
| 609 | offset = int(name[1:]) |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 610 | a = ord(c) - 65 |
| 611 | base = a * 8 + GPIO_BASE |
| 612 | return base + offset |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 613 | |
| 614 | |
| 615 | HWMON_CONFIG = { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 616 | '0-004a': { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 617 | 'names': { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 618 | 'temp1_input': {'object_path': 'temperature/ambient', 'poll_interval': 5000, |
| 619 | 'scale': 1000, 'units': 'C'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 620 | } |
| 621 | }, |
| 622 | '6-002d': { |
| 623 | 'names': { |
| 624 | 'pwm1': {'object_path': 'speed/fan0', 'poll_interval': 10000, 'scale': 1, 'units': ''}, |
| 625 | 'pwm2': {'object_path': 'speed/fan1', 'poll_interval': 10000, 'scale': 1, 'units': ''}, |
| 626 | 'pwm3': {'object_path': 'speed/fan2', 'poll_interval': 10000, 'scale': 1, 'units': ''}, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 627 | 'in1_input': {'object_path': 'voltage/P1V35_CPU0_BUF4', 'poll_interval': 10000, |
| 628 | 'scale': 1, 'units': ''}, |
| 629 | 'in2_input': {'object_path': 'voltage/P0V9_CPU0_BUF1', 'poll_interval': 10000, |
| 630 | 'scale': 1, 'units': ''}, |
| 631 | 'in3_input': {'object_path': 'voltage/P0V9_CPU0_BUF2', 'poll_interval': 10000, |
| 632 | 'scale': 1, 'units': ''}, |
| 633 | 'in4_input': {'object_path': 'voltage/P0V9_CPU0_BUF3', 'poll_interval': 10000, |
| 634 | 'scale': 1, 'units': ''}, |
| 635 | 'in5_input': {'object_path': 'voltage/P0V9_CPU0_BUF4', 'poll_interval': 10000, |
| 636 | 'scale': 1, 'units': ''}, |
| 637 | 'in6_input': {'object_path': 'voltage/P1V09_CPU0_BUF1', 'poll_interval': 10000, |
| 638 | 'scale': 1, 'units': ''}, |
| 639 | 'in7_input': {'object_path': 'voltage/P1V09_CPU0_BUF2', 'poll_interval': 10000, |
| 640 | 'scale': 1, 'units': ''}, |
| 641 | 'in8_input': {'object_path': 'voltage/P1V09_CPU0_BUF3', 'poll_interval': 10000, |
| 642 | 'scale': 1, 'units': ''}, |
| 643 | 'in9_input': {'object_path': 'voltage/P1V09_CPU0_BUF4', 'poll_interval': 10000, |
| 644 | 'scale': 1, 'units': ''}, |
| 645 | 'in10_input': {'object_path': 'voltage/P0V97_CPU0', 'poll_interval': 10000, |
| 646 | 'scale': 1, 'units': ''}, |
| 647 | 'in11_input': {'object_path': 'voltage/P1V1_MEM0', 'poll_interval': 10000, |
| 648 | 'scale': 1, 'units': ''}, |
| 649 | 'in12_input': {'object_path': 'voltage/P1V35_CPU0_BUF1', 'poll_interval': 10000, |
| 650 | 'scale': 1, 'units': ''}, |
| 651 | 'in13_input': {'object_path': 'voltage/P1V35_CPU0_BUF2', 'poll_interval': 10000, |
| 652 | 'scale': 1, 'units': ''}, |
| 653 | 'in14_input': {'object_path': 'voltage/P1V35_CPU0_BUF3', 'poll_interval': 10000, |
| 654 | 'scale': 1, 'units': ''}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 655 | } |
| 656 | }, |
| 657 | '6-002e': { |
| 658 | 'names': { |
| 659 | 'pwm1': {'object_path': 'speed/fan3', 'poll_interval': 10000, 'scale': 1, 'units': ''}, |
| 660 | 'pwm2': {'object_path': 'speed/fan4', 'poll_interval': 10000, 'scale': 1, 'units': ''}, |
| 661 | 'pwm3': {'object_path': 'speed/fan5', 'poll_interval': 10000, 'scale': 1, 'units': ''}, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 662 | 'in1_input': {'object_path': 'voltage/P1V35_CPU1_BUF4', 'poll_interval': 10000, |
| 663 | 'scale': 1, 'units': ''}, |
| 664 | 'in2_input': {'object_path': 'voltage/P0V9_CPU1_BUF1', 'poll_interval': 10000, |
| 665 | 'scale': 1, 'units': ''}, |
| 666 | 'in3_input': {'object_path': 'voltage/P0V9_CPU1_BUF2', 'poll_interval': 10000, |
| 667 | 'scale': 1, 'units': ''}, |
| 668 | 'in4_input': {'object_path': 'voltage/P0V9_CPU1_BUF3', 'poll_interval': 10000, |
| 669 | 'scale': 1, 'units': ''}, |
| 670 | 'in5_input': {'object_path': 'voltage/P0V9_CPU1_BUF4', 'poll_interval': 10000, |
| 671 | 'scale': 1, 'units': ''}, |
| 672 | 'in6_input': {'object_path': 'voltage/P1V09_CPU1_BUF1', 'poll_interval': 10000, |
| 673 | 'scale': 1, 'units': ''}, |
| 674 | 'in7_input': {'object_path': 'voltage/P1V09_CPU1_BUF2', 'poll_interval': 10000, |
| 675 | 'scale': 1, 'units': ''}, |
| 676 | 'in8_input': {'object_path': 'voltage/P1V09_CPU1_BUF3', 'poll_interval': 10000, |
| 677 | 'scale': 1, 'units': ''}, |
| 678 | 'in9_input': {'object_path': 'voltage/P1V09_CPU1_BUF4', 'poll_interval': 10000, |
| 679 | 'scale': 1, 'units': ''}, |
| 680 | 'in10_input': {'object_path': 'voltage/P0V97_CPU1', 'poll_interval': 10000, |
| 681 | 'scale': 1, 'units': ''}, |
| 682 | 'in11_input': {'object_path': 'voltage/P1V1_MEM1', 'poll_interval': 10000, |
| 683 | 'scale': 1, 'units': ''}, |
| 684 | 'in12_input': {'object_path': 'voltage/P1V35_CPU1_BUF1', 'poll_interval': 10000, |
| 685 | 'scale': 1, 'units': ''}, |
| 686 | 'in13_input': {'object_path': 'voltage/P1V35_CPU1_BUF2', 'poll_interval': 10000, |
| 687 | 'scale': 1, 'units': ''}, |
| 688 | 'in14_input': {'object_path': 'voltage/P1V35_CPU1_BUF3', 'poll_interval': 10000, |
| 689 | 'scale': 1, 'units': ''}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 690 | } |
| 691 | }, |
| 692 | '3-0050': { |
| 693 | 'names': { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 694 | 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000, |
| 695 | 'scale': 1, 'units': 'W'}, |
| 696 | 'caps_curr_powerreading': {'object_path': 'powercap/system_power', |
| 697 | 'poll_interval': 10000, 'scale': 1, 'units': 'W'}, |
| 698 | 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000, |
| 699 | 'scale': 1, 'units': 'W'}, |
| 700 | 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000, |
| 701 | 'scale': 1, 'units': 'W'}, |
| 702 | 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000, |
| 703 | 'scale': 1, 'units': 'W'}, |
| 704 | 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000, |
| 705 | 'scale': 1, 'units': 'W'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 706 | }, |
| 707 | 'labels': { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 708 | '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': 1000, |
| 709 | 'units': 'C', |
| 710 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 711 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 712 | '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': 1000, |
| 713 | 'units': 'C', |
| 714 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 715 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 716 | '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': 1000, |
| 717 | 'units': 'C', |
| 718 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 719 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 720 | '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': 1000, |
| 721 | 'units': 'C', |
| 722 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 723 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 724 | '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': 1000, |
| 725 | 'units': 'C', |
| 726 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 727 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 728 | '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': 1000, |
| 729 | 'units': 'C', |
| 730 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 731 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 732 | '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': 1000, |
| 733 | 'units': 'C', |
| 734 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 735 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 736 | '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': 1000, |
| 737 | 'units': 'C', |
| 738 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 739 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 740 | '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': 1000, |
| 741 | 'units': 'C', |
| 742 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 743 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 744 | '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': 1000, |
| 745 | 'units': 'C', |
| 746 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 747 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 748 | '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': 1000, |
| 749 | 'units': 'C', |
| 750 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 751 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 752 | '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': 1000, |
| 753 | 'units': 'C', |
| 754 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 755 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 756 | '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': 1000, |
| 757 | 'units': 'C'}, |
| 758 | '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': 1000, |
| 759 | 'units': 'C'}, |
| 760 | '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': 1000, |
| 761 | 'units': 'C'}, |
| 762 | '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': 1000, |
| 763 | 'units': 'C'}, |
| 764 | '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': 1000, |
| 765 | 'units': 'C'}, |
| 766 | '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': 1000, |
| 767 | 'units': 'C'}, |
| 768 | '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': 1000, |
| 769 | 'units': 'C'}, |
| 770 | '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': 1000, |
| 771 | 'units': 'C'}, |
| 772 | '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': 1000, |
| 773 | 'units': 'C'}, |
| 774 | '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': 1000, |
| 775 | 'units': 'C'}, |
| 776 | '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': 1000, |
| 777 | 'units': 'C'}, |
| 778 | '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': 1000, |
| 779 | 'units': 'C'}, |
| 780 | '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': 1000, |
| 781 | 'units': 'C'}, |
| 782 | '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': 1000, |
| 783 | 'units': 'C'}, |
| 784 | '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': 1000, |
| 785 | 'units': 'C'}, |
| 786 | '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': 1000, |
| 787 | 'units': 'C'}, |
| 788 | '94': {'object_path': 'temperature/membuf0', 'poll_interval': 5000, 'scale': 1000, |
| 789 | 'units': 'C'}, |
| 790 | '95': {'object_path': 'temperature/membuf1', 'poll_interval': 5000, 'scale': 1000, |
| 791 | 'units': 'C'}, |
| 792 | '96': {'object_path': 'temperature/membuf2', 'poll_interval': 5000, 'scale': 1000, |
| 793 | 'units': 'C'}, |
| 794 | '97': {'object_path': 'temperature/membuf3', 'poll_interval': 5000, 'scale': 1000, |
| 795 | 'units': 'C'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 796 | } |
| 797 | }, |
| 798 | '3-0051': { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 799 | 'labels': { |
| 800 | '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': 1000, |
| 801 | 'units': 'C', |
| 802 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 803 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 804 | '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': 1000, |
| 805 | 'units': 'C', |
| 806 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 807 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 808 | '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': 1000, |
| 809 | 'units': 'C', |
| 810 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 811 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 812 | '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': 1000, |
| 813 | 'units': 'C', |
| 814 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 815 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 816 | '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': 1000, |
| 817 | 'units': 'C', |
| 818 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 819 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 820 | '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': 1000, |
| 821 | 'units': 'C', |
| 822 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 823 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 824 | '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': 1000, |
| 825 | 'units': 'C', |
| 826 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 827 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 828 | '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': 1000, |
| 829 | 'units': 'C', |
| 830 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 831 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 832 | '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': 1000, |
| 833 | 'units': 'C', |
| 834 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 835 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 836 | '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': 1000, |
| 837 | 'units': 'C', |
| 838 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 839 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 840 | '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': 1000, |
| 841 | 'units': 'C', |
| 842 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 843 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 844 | '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': 1000, |
| 845 | 'units': 'C', |
| 846 | 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, |
| 847 | 'warning_lower': -99, 'emergency_enabled': True}, |
| 848 | '118': {'object_path': 'temperature/dimm16', 'poll_interval': 5000, 'scale': 1000, |
| 849 | 'units': 'C'}, |
| 850 | '119': {'object_path': 'temperature/dimm17', 'poll_interval': 5000, 'scale': 1000, |
| 851 | 'units': 'C'}, |
| 852 | '120': {'object_path': 'temperature/dimm18', 'poll_interval': 5000, 'scale': 1000, |
| 853 | 'units': 'C'}, |
| 854 | '121': {'object_path': 'temperature/dimm19', 'poll_interval': 5000, 'scale': 1000, |
| 855 | 'units': 'C'}, |
| 856 | '122': {'object_path': 'temperature/dimm20', 'poll_interval': 5000, 'scale': 1000, |
| 857 | 'units': 'C'}, |
| 858 | '123': {'object_path': 'temperature/dimm21', 'poll_interval': 5000, 'scale': 1000, |
| 859 | 'units': 'C'}, |
| 860 | '124': {'object_path': 'temperature/dimm22', 'poll_interval': 5000, 'scale': 1000, |
| 861 | 'units': 'C'}, |
| 862 | '125': {'object_path': 'temperature/dimm23', 'poll_interval': 5000, 'scale': 1000, |
| 863 | 'units': 'C'}, |
| 864 | '126': {'object_path': 'temperature/dimm24', 'poll_interval': 5000, 'scale': 1000, |
| 865 | 'units': 'C'}, |
| 866 | '127': {'object_path': 'temperature/dimm25', 'poll_interval': 5000, 'scale': 1000, |
| 867 | 'units': 'C'}, |
| 868 | '128': {'object_path': 'temperature/dimm26', 'poll_interval': 5000, 'scale': 1000, |
| 869 | 'units': 'C'}, |
| 870 | '129': {'object_path': 'temperature/dimm27', 'poll_interval': 5000, 'scale': 1000, |
| 871 | 'units': 'C'}, |
| 872 | '130': {'object_path': 'temperature/dimm28', 'poll_interval': 5000, 'scale': 1000, |
| 873 | 'units': 'C'}, |
| 874 | '131': {'object_path': 'temperature/dimm29', 'poll_interval': 5000, 'scale': 1000, |
| 875 | 'units': 'C'}, |
| 876 | '132': {'object_path': 'temperature/dimm30', 'poll_interval': 5000, 'scale': 1000, |
| 877 | 'units': 'C'}, |
| 878 | '133': {'object_path': 'temperature/dimm31', 'poll_interval': 5000, 'scale': 1000, |
| 879 | 'units': 'C'}, |
| 880 | '98': {'object_path': 'temperature/membuf4', 'poll_interval': 5000, 'scale': 1000, |
| 881 | 'units': 'C'}, |
| 882 | '99': {'object_path': 'temperature/membuf5', 'poll_interval': 5000, 'scale': 1000, |
| 883 | 'units': 'C'}, |
| 884 | '100': {'object_path': 'temperature/membuf6', 'poll_interval': 5000, 'scale': 1000, |
| 885 | 'units': 'C'}, |
| 886 | '101': {'object_path': 'temperature/membuf7', 'poll_interval': 5000, 'scale': 1000, |
| 887 | 'units': 'C'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 888 | } |
| 889 | }, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 890 | '4-0010': { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 891 | 'names': { |
| 892 | # Barreleye uses 0.25 millioohms sense resistor for adm1278 |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 893 | # To convert Iout register value Y to real-world value X, use an |
| 894 | # equation: |
| 895 | # X= 1/m * (Y * 10^-R - b), here m = 800 * R_sense, and R_sense |
| 896 | # is expressed in milliohms. |
| 897 | # The adm1278 driver did the conversion, but the R_sense is set |
| 898 | # here as a scale factor. |
| 899 | 'curr1_input': {'object_path': 'HSCA/Iout', 'poll_interval': 5000, 'scale': 0.25, |
| 900 | 'units': 'mA'}, |
| 901 | 'in2_input': {'object_path': 'HSCA/Vout', 'poll_interval': 5000, 'scale': 1, |
| 902 | 'units': 'mV'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 903 | } |
| 904 | }, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 905 | '5-0010': { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 906 | 'names': { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 907 | 'curr1_input': {'object_path': 'HSCB/Iout', 'poll_interval': 5000, 'scale': 0.25, |
| 908 | 'units': 'mA'}, |
| 909 | 'in2_input': {'object_path': 'HSCB/Vout', 'poll_interval': 5000, 'scale': 1, |
| 910 | 'units': 'mV'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 911 | } |
| 912 | }, |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 913 | '6-0010': { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 914 | 'names': { |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 915 | 'curr1_input': {'object_path': 'HSCC/Iout', 'poll_interval': 5000, 'scale': 0.25, |
| 916 | 'units': 'mA'}, |
| 917 | 'in2_input': {'object_path': 'HSCC/Vout', 'poll_interval': 5000, 'scale': 1, |
| 918 | 'units': 'mV'}, |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 919 | } |
| 920 | }, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 921 | } |
| 922 | |
| 923 | # Miscellaneous non-poll sensor with system specific properties. |
| 924 | # The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. |
| 925 | MISC_SENSORS = { |
Gunnar Mills | dca3579 | 2018-03-26 10:05:38 -0500 | [diff] [blame] | 926 | 0x09: {'class': 'BootCountSensor'}, |
| 927 | 0x05: {'class': 'BootProgressSensor'}, |
| 928 | 0x08: {'class': 'OccStatusSensor', |
| 929 | 'os_path': '/sys/class/i2c-adapter/i2c-3/3-0050/online'}, |
| 930 | 0x0A: {'class': 'OccStatusSensor', |
| 931 | 'os_path': '/sys/class/i2c-adapter/i2c-3/3-0051/online'}, |
| 932 | 0x32: {'class': 'OperatingSystemStatusSensor'}, |
| 933 | 0x33: {'class': 'PowerCap', |
| 934 | 'os_path': '/sys/class/hwmon/hwmon3/user_powercap'}, |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 935 | } |