Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 1 | #! /usr/bin/python |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 2 | |
| 3 | ## todos: event logger, |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 4 | import dbus |
| 5 | import Openbmc |
| 6 | |
Norman James | 8887267 | 2015-09-21 16:51:35 -0500 | [diff] [blame^] | 7 | HOME_PATH = './' |
| 8 | BIN_PATH = HOME_PATH |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 9 | CACHE_PATH = HOME_PATH+'cache/' |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 10 | FRU_PATH = CACHE_PATH+'frus/' |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 11 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 12 | SYSTEM_STATES = [ |
| 13 | 'INIT', |
| 14 | 'STANDBY', |
| 15 | 'POWERING_ON', |
| 16 | 'POWERED_ON', |
| 17 | 'BOOTING', |
| 18 | 'HOST_UP', |
| 19 | 'SHUTTING_DOWN', |
| 20 | 'POWERING_DOWN' |
| 21 | ] |
| 22 | |
| 23 | ENTER_STATE_CALLBACK = { |
| 24 | 'POWERED_ON' : { |
| 25 | 'bus_name' : 'org.openbmc.control.Host', |
| 26 | 'obj_name' : '/org/openbmc/control/Host_0', |
| 27 | 'interface_name' : 'org.openbmc.control.Host', |
| 28 | 'method_name' : 'boot' |
| 29 | } |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 30 | } |
| 31 | |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 32 | SYSTEM_CONFIG = {} |
| 33 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 34 | SYSTEM_CONFIG['org.openbmc.control.Bmc'] = { |
| 35 | 'system_state' : 'INIT', |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 36 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 37 | 'monitor_process' : True, |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 38 | 'process_name' : 'control_bmc.exe', |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 39 | 'heartbeat' : 'no', |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 40 | 'instances' : [ |
| 41 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 42 | 'name' : 'Bmc_0', |
| 43 | 'user_label': 'Master Bmc', |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 44 | } |
| 45 | ] |
| 46 | } |
| 47 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 48 | SYSTEM_CONFIG['org.openbmc.managers.Frus'] = { |
| 49 | 'system_state' : 'STANDBY', |
| 50 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 51 | 'monitor_process' : True, |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 52 | 'process_name' : 'fru_manager.py', |
| 53 | 'heartbeat' : 'no', |
| 54 | 'rest_name' : 'frus', |
| 55 | 'instances' : [ |
| 56 | { |
| 57 | 'name' : 'Barreleye', |
| 58 | 'user_label': 'Fru Manager', |
| 59 | } |
| 60 | ] |
| 61 | } |
| 62 | |
| 63 | SYSTEM_CONFIG['org.openbmc.managers.Ipmi'] = { |
| 64 | 'system_state' : 'STANDBY', |
| 65 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 66 | 'monitor_process' : True, |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 67 | 'process_name' : 'ipmi_manager.py', |
| 68 | 'heartbeat' : 'no', |
| 69 | 'rest_name' : 'frus', |
| 70 | 'instances' : [ |
| 71 | { |
| 72 | 'name' : 'Barreleye', |
Norman James | 8887267 | 2015-09-21 16:51:35 -0500 | [diff] [blame^] | 73 | 'user_label': 'Ipmi Manager', |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 74 | } |
| 75 | ] |
| 76 | } |
| 77 | |
| 78 | |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 79 | SYSTEM_CONFIG['org.openbmc.managers.Sensors'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 80 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 81 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 82 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 83 | 'process_name' : 'sensor_manager.py', |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 84 | 'heartbeat' : 'no', |
| 85 | 'rest_name' : 'sensors', |
| 86 | 'instances' : [ |
| 87 | { |
| 88 | 'name' : 'Barreleye', |
| 89 | 'user_label': 'Sensor Manager', |
| 90 | } |
| 91 | ] |
| 92 | } |
| 93 | |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 94 | SYSTEM_CONFIG['org.openbmc.loggers.EventLogger'] = { |
Norman James | 8887267 | 2015-09-21 16:51:35 -0500 | [diff] [blame^] | 95 | 'system_state' : 'INIT', |
| 96 | 'start_process' : False, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 97 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 98 | 'process_name' : 'eventlogger.py', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 99 | 'heartbeat' : 'no', |
| 100 | 'rest_name' : 'events', |
| 101 | 'instances' : [ |
| 102 | { |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 103 | 'name' : 'Barreleye', |
| 104 | 'user_label': 'Event Logger', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 105 | } |
| 106 | ] |
| 107 | } |
| 108 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 109 | SYSTEM_CONFIG['org.openbmc.watchdog.Host'] = { |
| 110 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 111 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 112 | 'monitor_process' : True, |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 113 | 'process_name' : 'host_watchdog.exe', |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 114 | 'heartbeat' : 'no', |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 115 | 'rest_name' : 'watchdog', |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 116 | 'instances' : [ |
| 117 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 118 | 'name' : 'HostWatchdog_0', |
| 119 | 'user_label': 'Host Watchdog', |
| 120 | 'properties' : { |
| 121 | 'org.openbmc.Watchdog' : { |
| 122 | 'poll_interval': 3000, |
| 123 | } |
| 124 | } |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 125 | } |
| 126 | ] |
| 127 | } |
| 128 | |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 129 | SYSTEM_CONFIG['org.openbmc.control.Power'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 130 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 131 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 132 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 133 | 'process_name' : 'power_control.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 134 | 'heartbeat' : 'yes', |
| 135 | 'instances' : [ |
| 136 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 137 | 'name' : 'SystemPower_0', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 138 | 'user_label': 'Power control', |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 139 | 'properties' : { |
| 140 | 'org.openbmc.Control': { |
| 141 | 'poll_interval' : 3000 |
Norman James | 32e74e2 | 2015-09-15 21:28:06 -0500 | [diff] [blame] | 142 | }, |
| 143 | 'org.openbmc.control.Power': { |
Norman James | 8887267 | 2015-09-21 16:51:35 -0500 | [diff] [blame^] | 144 | 'pgood_timeout' : 10 |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 145 | } |
| 146 | } |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 147 | } |
| 148 | ] |
| 149 | } |
| 150 | |
| 151 | SYSTEM_CONFIG['org.openbmc.sensors.Temperature.Ambient'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 152 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 153 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 154 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 155 | 'process_name' : 'sensor_ambient.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 156 | 'heartbeat' : 'yes', |
| 157 | 'instances' : [ |
| 158 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 159 | 'name' : 'FrontChassis', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 160 | 'user_label': 'Ambient Temperature 1', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 161 | 'properties' : { |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 162 | 'org.openbmc.SensorValue': { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 163 | 'poll_interval' : 5000, |
Norman James | 9e6acf9 | 2015-09-08 07:00:04 -0500 | [diff] [blame] | 164 | }, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 165 | 'org.openbmc.SensorThreshold' : { |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 166 | 'lower_critical': 5, |
| 167 | 'lower_warning' : 10, |
| 168 | 'upper_warning' : 15, |
| 169 | 'upper_critical': 20 |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 170 | }, |
| 171 | 'org.openbmc.SensorI2c' : { |
| 172 | 'dev_path' : '/dev/i2c/i2c0', |
| 173 | 'address' : '0xA0' |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 174 | } |
| 175 | } |
| 176 | }, |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 177 | ] |
| 178 | } |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 179 | SYSTEM_CONFIG['org.openbmc.buttons.Power'] = { |
| 180 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 181 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 182 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 183 | 'process_name' : 'button_power.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 184 | 'heartbeat' : 'no', |
| 185 | 'instances' : [ |
| 186 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 187 | 'name' : 'PowerButton_0', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 188 | 'user_label': 'Main Power Button', |
| 189 | } |
| 190 | ] |
| 191 | } |
| 192 | SYSTEM_CONFIG['org.openbmc.sensors.HostStatus'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 193 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 194 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 195 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 196 | 'process_name' : 'sensor_host_status.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 197 | 'heartbeat' : "no", |
| 198 | 'instances' : [ |
| 199 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 200 | 'name' : 'HostStatus_0', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 201 | 'user_label': 'Host Status', |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 202 | 'properties' : { |
| 203 | 'org.openbmc.SensorValue': { |
| 204 | 'ipmi_id' : 43, |
| 205 | }, |
| 206 | } |
| 207 | |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 208 | } |
| 209 | ] |
| 210 | } |
| 211 | SYSTEM_CONFIG['org.openbmc.leds.ChassisIdentify'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 212 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 213 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 214 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 215 | 'process_name' : 'chassis_identify.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 216 | 'heartbeat' : 'no', |
| 217 | 'instances' : [ |
| 218 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 219 | 'name' : 'ChassisIdentify_0', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 220 | 'user_label': 'Chassis Identify LED', |
| 221 | } |
| 222 | ] |
| 223 | } |
| 224 | SYSTEM_CONFIG['org.openbmc.flash.BIOS'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 225 | 'system_state' : 'STANDBY', |
Norman James | 8887267 | 2015-09-21 16:51:35 -0500 | [diff] [blame^] | 226 | 'start_process' : False, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 227 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 228 | 'process_name' : 'flash_bios.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 229 | 'heartbeat' : 'no', |
| 230 | 'rest_name' : 'flash', |
| 231 | 'instances' : [ |
| 232 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 233 | 'name' : 'BIOS_0', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 234 | 'user_label': 'BIOS SPI Flash', |
| 235 | } |
| 236 | ] |
| 237 | } |
| 238 | SYSTEM_CONFIG['org.openbmc.control.Host'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 239 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 240 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 241 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 242 | 'process_name' : 'control_host.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 243 | 'heartbeat' : 'no', |
| 244 | 'instances' : [ |
| 245 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 246 | 'name' : 'Host_0', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 247 | 'user_label': 'Host Control', |
| 248 | } |
| 249 | ] |
| 250 | } |
| 251 | SYSTEM_CONFIG['org.openbmc.control.Chassis'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 252 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 253 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 254 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 255 | 'process_name' : 'chassis_control.py', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 256 | 'heartbeat' : 'no', |
| 257 | 'rest_name' : 'chassis', |
| 258 | 'instances' : [ |
| 259 | { |
| 260 | 'name' : 'Chassis', |
| 261 | 'user_label': 'Chassis Control', |
| 262 | } |
| 263 | ] |
| 264 | } |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 265 | |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 266 | SYSTEM_CONFIG['org.openbmc.vpd'] = { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 267 | 'system_state' : 'POWERED_ON', |
| 268 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 269 | 'monitor_process' : False, |
| 270 | 'process_name' : 'board_vpd.exe', |
| 271 | 'heartbeat' : 'no', |
| 272 | 'instances' : [ |
| 273 | { |
| 274 | 'name' : 'MBVPD_0', |
| 275 | 'user_label': 'VPD', |
| 276 | }, |
| 277 | |
| 278 | ] |
| 279 | } |
| 280 | |
| 281 | SYSTEM_CONFIG['org.openbmc.sensors.Occ'] = { |
Norman James | 2d1ee89 | 2015-09-16 23:13:45 -0500 | [diff] [blame] | 282 | 'system_state' : 'BOOTED', |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 283 | 'start_process' : True, |
| 284 | 'monitor_process' : True, |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 285 | 'process_name' : 'sensor_occ.exe', |
| 286 | 'heartbeat' : 'no', |
| 287 | 'instances' : [ |
| 288 | { |
| 289 | 'name' : 'Occ_0', |
| 290 | 'user_label': 'CPU0', |
| 291 | 'properties' : { |
| 292 | 'org.openbmc.Occ' : { |
| 293 | 'poll_interval' : 3000, |
| 294 | } |
| 295 | } |
| 296 | }, |
| 297 | |
| 298 | ] |
| 299 | } |
| 300 | |
| 301 | SYSTEM_CONFIG['org.openbmc.sensors.Fan'] = { |
| 302 | 'system_state' : 'STANDBY', |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 303 | 'start_process' : True, |
Norman James | 6f8d042 | 2015-09-14 18:48:00 -0500 | [diff] [blame] | 304 | 'monitor_process' : True, |
Norman James | 5d78b4d | 2015-09-05 13:34:34 -0500 | [diff] [blame] | 305 | 'process_name' : 'fan.exe', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 306 | 'heartbeat' : 'no', |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 307 | 'instances' : [ |
| 308 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 309 | 'name' : 'Fan_0', |
| 310 | 'user_label': 'FAN 0', |
Norman James | 90baede | 2015-09-02 20:32:49 -0500 | [diff] [blame] | 311 | }, |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 312 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 313 | 'name' : 'Fan_1', |
| 314 | 'user_label': 'FAN 1', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 315 | }, |
| 316 | { |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 317 | 'name' : 'Fan_2', |
| 318 | 'user_label': 'FAN 2', |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 319 | }, |
| 320 | |
| 321 | ] |
| 322 | } |
| 323 | |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 324 | NON_CACHABLE_PROPERTIES = { |
| 325 | 'name' : True, |
| 326 | 'user_label' : True, |
| 327 | 'location' : True, |
| 328 | 'cache' : True |
| 329 | } |
| 330 | |
Norman James | 8887267 | 2015-09-21 16:51:35 -0500 | [diff] [blame^] | 331 | FRU_INSTANCES = { |
| 332 | '/system' : |
| 333 | { |
| 334 | 'ftype' : Openbmc.FRU_TYPES['SYSTEM'], |
| 335 | 'fru' : True, |
| 336 | }, |
| 337 | '/system/motherboard' : |
| 338 | { |
| 339 | 'ftype' : Openbmc.FRU_TYPES['MAIN_PLANAR'], |
| 340 | 'manufacturer' : 'FOXCONN', |
| 341 | 'fru' : True, |
| 342 | 'fru_id' : 31, |
| 343 | 'location' : 'C0', |
| 344 | }, |
| 345 | '/system/fan0' : |
| 346 | { |
| 347 | 'ftype' : Openbmc.FRU_TYPES['FAN'], |
| 348 | 'manufacturer' : 'DELTA', |
| 349 | 'fru' : True, |
| 350 | 'location' : 'F0', |
| 351 | 'sensor_link' : 'fans/Fan_0', |
| 352 | }, |
| 353 | '/system/fan1' : |
| 354 | { |
| 355 | 'ftype' : Openbmc.FRU_TYPES['FAN'], |
| 356 | 'manufacturer' : 'DELTA', |
| 357 | 'fru' : True, |
| 358 | 'location' : 'F1', |
| 359 | 'sensor_link' : 'fans/Fan_1', |
| 360 | }, |
| 361 | '/system/motherboard/bmc' : |
| 362 | { |
| 363 | 'ftype' : Openbmc.FRU_TYPES['BMC'], |
| 364 | 'manufacturer' : 'ASPEED', |
| 365 | 'fru' : True, |
| 366 | }, |
| 367 | '/system/motherboard/cpu0' : |
| 368 | { |
| 369 | 'ftype' : Openbmc.FRU_TYPES['CPU'], |
| 370 | 'manufacturer' : 'IBM', |
| 371 | 'fru' : True, |
| 372 | 'location' : 'P0', |
| 373 | 'fru_id' : 10, |
| 374 | }, |
| 375 | '/system/motherboard/cpu0/core0' : |
| 376 | { |
| 377 | 'ftype' : Openbmc.FRU_TYPES['CORE'], |
| 378 | 'fru' : False, |
| 379 | 'sensor_link' : 1, |
| 380 | }, |
| 381 | '/system/motherboard/cpu0/core1' : |
| 382 | { |
| 383 | 'ftype' : Openbmc.FRU_TYPES['CORE'], |
| 384 | 'fru' : False, |
| 385 | 'sensor_link' : 2, |
| 386 | }, |
| 387 | '/system/motherboard/dimm0' : |
| 388 | { |
| 389 | 'ftype' : Openbmc.FRU_TYPES['DIMM'], |
| 390 | 'fru' : True, |
| 391 | 'fru_id' : 12, |
| 392 | 'sensor_link' : 20, |
| 393 | }, |
| 394 | '/system/motherboard/dimm1' : |
| 395 | { |
| 396 | 'ftype' : Openbmc.FRU_TYPES['DIMM'], |
| 397 | 'fru' : True, |
| 398 | 'fru_id' : 13, |
| 399 | 'sensor_link' : 21, |
| 400 | }, |
| 401 | } |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 402 | |
| 403 | |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 404 | GPIO_CONFIG = {} |
Norman James | 362a80f | 2015-09-14 14:04:39 -0500 | [diff] [blame] | 405 | GPIO_CONFIG['FSI_CLK'] = { 'gpio_num': 4, 'direction': 'out' } |
| 406 | GPIO_CONFIG['FSI_DATA'] = { 'gpio_num': 5, 'direction': 'out' } |
| 407 | GPIO_CONFIG['FSI_ENABLE'] = { 'gpio_num': 24, 'direction': 'out' } |
| 408 | GPIO_CONFIG['POWER_PIN'] = { 'gpio_num': 33, 'direction': 'out' } |
| 409 | GPIO_CONFIG['CRONUS_SEL'] = { 'gpio_num': 6, 'direction': 'out' } |
| 410 | GPIO_CONFIG['PGOOD'] = { 'gpio_num': 23, 'direction': 'in' } |
| 411 | GPIO_CONFIG['IDENTIFY'] = { 'gpio_num': 34, 'direction': 'out' } |
| 412 | GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_num': 32, 'direction': 'in' } |
Norman James | ce46e3e | 2015-08-30 22:25:55 -0500 | [diff] [blame] | 413 | |