Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 1 | # Romulus.py |
| 2 | # |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 3 | |
| 4 | SYSTEM_STATES = [ |
| 5 | 'BASE_APPS', |
| 6 | 'BMC_STARTING', |
| 7 | 'BMC_READY', |
| 8 | 'HOST_POWERING_ON', |
| 9 | 'HOST_POWERED_ON', |
| 10 | 'HOST_BOOTING', |
| 11 | 'HOST_BOOTED', |
| 12 | 'HOST_POWERED_OFF', |
| 13 | ] |
| 14 | |
| 15 | EXIT_STATE_DEPEND = { |
| 16 | 'BASE_APPS' : { |
| 17 | '/org/openbmc/sensors': 0, |
| 18 | }, |
| 19 | 'BMC_STARTING' : { |
| 20 | '/org/openbmc/control/chassis0': 0, |
| 21 | '/org/openbmc/control/power0' : 0, |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 22 | '/org/openbmc/control/flash/bios' : 0, |
| 23 | }, |
| 24 | } |
| 25 | |
| 26 | FRU_INSTANCES = { |
| 27 | '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, |
| 28 | '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, |
| 29 | '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, }, |
| 30 | |
| 31 | '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, |
| 32 | |
| 33 | '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, }, |
| 34 | |
| 35 | '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, }, |
| 36 | '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, |
| 37 | '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, |
| 38 | '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, |
| 39 | '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, |
| 40 | |
| 41 | '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, }, |
| 42 | '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, }, |
| 43 | '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, }, |
| 44 | '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, }, |
| 45 | |
| 46 | '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' }, |
| 47 | |
| 48 | '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, }, |
| 49 | '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, }, |
| 50 | |
| 51 | '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 52 | '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 53 | '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 54 | '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 55 | '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 56 | '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 57 | '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 58 | '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 59 | '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 60 | '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 61 | '<inventory_root>/system/chassis/motherboard/cpu0/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 62 | '<inventory_root>/system/chassis/motherboard/cpu0/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 63 | '<inventory_root>/system/chassis/motherboard/cpu0/core12' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 64 | '<inventory_root>/system/chassis/motherboard/cpu0/core13' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 65 | '<inventory_root>/system/chassis/motherboard/cpu0/core14' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 66 | '<inventory_root>/system/chassis/motherboard/cpu0/core15' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 67 | '<inventory_root>/system/chassis/motherboard/cpu0/core16' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 68 | '<inventory_root>/system/chassis/motherboard/cpu0/core17' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 69 | '<inventory_root>/system/chassis/motherboard/cpu0/core18' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 70 | '<inventory_root>/system/chassis/motherboard/cpu0/core19' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 71 | '<inventory_root>/system/chassis/motherboard/cpu0/core20' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 72 | '<inventory_root>/system/chassis/motherboard/cpu0/core21' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 73 | '<inventory_root>/system/chassis/motherboard/cpu0/core22' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 74 | '<inventory_root>/system/chassis/motherboard/cpu0/core23' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 75 | |
| 76 | '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 77 | '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 78 | '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 79 | '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 80 | '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 81 | '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 82 | '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 83 | '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 84 | '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 85 | '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 86 | '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 87 | '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 88 | '<inventory_root>/system/chassis/motherboard/cpu1/core12' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 89 | '<inventory_root>/system/chassis/motherboard/cpu1/core13' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 90 | '<inventory_root>/system/chassis/motherboard/cpu1/core14' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 91 | '<inventory_root>/system/chassis/motherboard/cpu1/core15' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 92 | '<inventory_root>/system/chassis/motherboard/cpu1/core16' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 93 | '<inventory_root>/system/chassis/motherboard/cpu1/core17' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 94 | '<inventory_root>/system/chassis/motherboard/cpu1/core18' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 95 | '<inventory_root>/system/chassis/motherboard/cpu1/core19' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 96 | '<inventory_root>/system/chassis/motherboard/cpu1/core20' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 97 | '<inventory_root>/system/chassis/motherboard/cpu1/core21' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 98 | '<inventory_root>/system/chassis/motherboard/cpu1/core22' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
| 99 | '<inventory_root>/system/chassis/motherboard/cpu1/core23' : { 'fru_type' : 'CORE', 'is_fru' : False, }, |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 100 | |
| 101 | '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 102 | '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 103 | '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 104 | '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 105 | '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 106 | '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 107 | '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 108 | '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 109 | '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 110 | '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 111 | '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 112 | '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 113 | '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 114 | '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 115 | '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 116 | '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, |
| 117 | } |
| 118 | |
| 119 | ID_LOOKUP = { |
| 120 | 'FRU' : { |
| 121 | 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0', |
| 122 | 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1', |
| 123 | 0x03 : '<inventory_root>/system/chassis/motherboard', |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 124 | 0x04 : '<inventory_root>/system/chassis/motherboard/dimm0', |
| 125 | 0x05 : '<inventory_root>/system/chassis/motherboard/dimm1', |
| 126 | 0x06 : '<inventory_root>/system/chassis/motherboard/dimm2', |
| 127 | 0x07 : '<inventory_root>/system/chassis/motherboard/dimm3', |
| 128 | 0x08 : '<inventory_root>/system/chassis/motherboard/dimm4', |
| 129 | 0x09 : '<inventory_root>/system/chassis/motherboard/dimm5', |
| 130 | 0x0a : '<inventory_root>/system/chassis/motherboard/dimm6', |
| 131 | 0x0b : '<inventory_root>/system/chassis/motherboard/dimm7', |
| 132 | 0x0c : '<inventory_root>/system/chassis/motherboard/dimm8', |
| 133 | 0x0d : '<inventory_root>/system/chassis/motherboard/dimm9', |
| 134 | 0x0e : '<inventory_root>/system/chassis/motherboard/dimm10', |
| 135 | 0x0f : '<inventory_root>/system/chassis/motherboard/dimm11', |
| 136 | 0x10 : '<inventory_root>/system/chassis/motherboard/dimm12', |
| 137 | 0x11 : '<inventory_root>/system/chassis/motherboard/dimm13', |
| 138 | 0x12 : '<inventory_root>/system/chassis/motherboard/dimm14', |
| 139 | 0x13 : '<inventory_root>/system/chassis/motherboard/dimm15', |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 140 | }, |
| 141 | 'FRU_STR' : { |
| 142 | 'PRODUCT_0' : '<inventory_root>/system/bios', |
| 143 | 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0', |
| 144 | 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1', |
| 145 | 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard', |
| 146 | 'BOARD_3' : '<inventory_root>/system/misc', |
| 147 | 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0', |
| 148 | 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1', |
| 149 | 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2', |
| 150 | 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3', |
| 151 | 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4', |
| 152 | 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5', |
| 153 | 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6', |
| 154 | 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7', |
| 155 | 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8', |
| 156 | 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9', |
| 157 | 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10', |
| 158 | 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11', |
| 159 | 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12', |
| 160 | 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13', |
| 161 | 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14', |
| 162 | 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15', |
| 163 | 'PRODUCT_47' : '<inventory_root>/system/misc', |
| 164 | }, |
| 165 | 'SENSOR' : { |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 166 | 0x01 : '/org/openbmc/sensors/host/HostStatus', |
| 167 | 0x02 : '/org/openbmc/sensors/host/BootProgress', |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 168 | 0x08 : '<inventory_root>/system/chassis/motherboard/cpu0', |
| 169 | 0x09 : '<inventory_root>/system/chassis/motherboard/cpu1', |
| 170 | 0x0b : '<inventory_root>/system/chassis/motherboard/dimm0', |
| 171 | 0x0c : '<inventory_root>/system/chassis/motherboard/dimm1', |
| 172 | 0x0d : '<inventory_root>/system/chassis/motherboard/dimm2', |
| 173 | 0x0e : '<inventory_root>/system/chassis/motherboard/dimm3', |
| 174 | 0x0f : '<inventory_root>/system/chassis/motherboard/dimm4', |
| 175 | 0x10 : '<inventory_root>/system/chassis/motherboard/dimm5', |
| 176 | 0x11 : '<inventory_root>/system/chassis/motherboard/dimm6', |
| 177 | 0x12 : '<inventory_root>/system/chassis/motherboard/dimm7', |
| 178 | 0x13 : '<inventory_root>/system/chassis/motherboard/dimm8', |
| 179 | 0x14 : '<inventory_root>/system/chassis/motherboard/dimm9', |
| 180 | 0x15 : '<inventory_root>/system/chassis/motherboard/dimm10', |
| 181 | 0x16 : '<inventory_root>/system/chassis/motherboard/dimm11', |
| 182 | 0x17 : '<inventory_root>/system/chassis/motherboard/dimm12', |
| 183 | 0x18 : '<inventory_root>/system/chassis/motherboard/dimm13', |
| 184 | 0x19 : '<inventory_root>/system/chassis/motherboard/dimm14', |
| 185 | 0x1a : '<inventory_root>/system/chassis/motherboard/dimm15', |
| 186 | 0x2b : '<inventory_root>/system/chassis/motherboard/cpu0/core0', |
| 187 | 0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core1', |
| 188 | 0x2d : '<inventory_root>/system/chassis/motherboard/cpu0/core2', |
| 189 | 0x2e : '<inventory_root>/system/chassis/motherboard/cpu0/core3', |
| 190 | 0x2f : '<inventory_root>/system/chassis/motherboard/cpu0/core4', |
| 191 | 0x30 : '<inventory_root>/system/chassis/motherboard/cpu0/core5', |
| 192 | 0x31 : '<inventory_root>/system/chassis/motherboard/cpu0/core6', |
| 193 | 0x32 : '<inventory_root>/system/chassis/motherboard/cpu0/core7', |
| 194 | 0x33 : '<inventory_root>/system/chassis/motherboard/cpu0/core8', |
| 195 | 0x34 : '<inventory_root>/system/chassis/motherboard/cpu0/core9', |
| 196 | 0x35 : '<inventory_root>/system/chassis/motherboard/cpu0/core10', |
| 197 | 0x36 : '<inventory_root>/system/chassis/motherboard/cpu0/core11', |
| 198 | 0x37 : '<inventory_root>/system/chassis/motherboard/cpu0/core12', |
| 199 | 0x38 : '<inventory_root>/system/chassis/motherboard/cpu0/core13', |
| 200 | 0x39 : '<inventory_root>/system/chassis/motherboard/cpu0/core14', |
| 201 | 0x3a : '<inventory_root>/system/chassis/motherboard/cpu0/core15', |
| 202 | 0x3b : '<inventory_root>/system/chassis/motherboard/cpu0/core16', |
| 203 | 0x3c : '<inventory_root>/system/chassis/motherboard/cpu0/core17', |
| 204 | 0x3d : '<inventory_root>/system/chassis/motherboard/cpu0/core18', |
| 205 | 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core19', |
| 206 | 0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core20', |
| 207 | 0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core21', |
| 208 | 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core22', |
| 209 | 0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core23', |
| 210 | 0x43 : '<inventory_root>/system/chassis/motherboard/cpu1/core0', |
| 211 | 0x44 : '<inventory_root>/system/chassis/motherboard/cpu1/core1', |
| 212 | 0x45 : '<inventory_root>/system/chassis/motherboard/cpu1/core2', |
| 213 | 0x46 : '<inventory_root>/system/chassis/motherboard/cpu1/core3', |
| 214 | 0x47 : '<inventory_root>/system/chassis/motherboard/cpu1/core4', |
| 215 | 0x48 : '<inventory_root>/system/chassis/motherboard/cpu1/core5', |
| 216 | 0x49 : '<inventory_root>/system/chassis/motherboard/cpu1/core6', |
| 217 | 0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core7', |
| 218 | 0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core8', |
| 219 | 0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core9', |
| 220 | 0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core10', |
| 221 | 0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core11', |
| 222 | 0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core12', |
| 223 | 0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core13', |
| 224 | 0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core14', |
| 225 | 0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core15', |
| 226 | 0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core16', |
| 227 | 0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core17', |
| 228 | 0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core18', |
| 229 | 0x56 : '<inventory_root>/system/chassis/motherboard/cpu1/core19', |
| 230 | 0x57 : '<inventory_root>/system/chassis/motherboard/cpu1/core20', |
| 231 | 0x58 : '<inventory_root>/system/chassis/motherboard/cpu1/core21', |
| 232 | 0x59 : '<inventory_root>/system/chassis/motherboard/cpu1/core22', |
| 233 | 0x5a : '<inventory_root>/system/chassis/motherboard/cpu1/core23', |
| 234 | 0x8b : '/org/openbmc/sensors/host/BootCount', |
| 235 | 0x8c : '<inventory_root>/system/chassis/motherboard', |
| 236 | 0x8d : '<inventory_root>/system/chassis/motherboard/refclock', |
| 237 | 0x8e : '<inventory_root>/system/chassis/motherboard/pcieclock', |
| 238 | 0x8f : '<inventory_root>/system/chassis/motherboard/todclock', |
| 239 | 0x90 : '<inventory_root>/system/systemevent', |
| 240 | 0x91 : '/org/openbmc/sensors/host/OperatingSystemStatus', |
| 241 | 0x92 : '<inventory_root>/system/chassis/motherboard/pcielink', |
| 242 | # 0x08 : '<inventory_root>/system/powerlimit', |
| 243 | # 0x10 : '<inventory_root>/system/chassis/motherboard/apss', |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 244 | }, |
| 245 | 'GPIO_PRESENT' : {} |
| 246 | } |
| 247 | |
| 248 | GPIO_CONFIG = {} |
| 249 | GPIO_CONFIG['SOFTWARE_PGOOD'] = \ |
| 250 | {'gpio_pin': 'R1', 'direction': 'out'} |
| 251 | GPIO_CONFIG['BMC_POWER_UP'] = \ |
| 252 | {'gpio_pin': 'D1', 'direction': 'out'} |
| 253 | GPIO_CONFIG['SYS_PWROK_BUFF'] = \ |
| 254 | {'gpio_pin': 'D2', 'direction': 'in'} |
| 255 | GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \ |
| 256 | {'gpio_pin': 'N5', 'direction': 'out'} |
| 257 | GPIO_CONFIG['CHECKSTOP'] = \ |
| 258 | {'gpio_pin': 'J2', 'direction': 'falling'} |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 259 | GPIO_CONFIG['BMC_CP0_RESET_N'] = \ |
| 260 | {'gpio_pin': 'A1', 'direction': 'out'} |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 261 | GPIO_CONFIG['BMC_CP0_PERST_ENABLE_R'] = \ |
| 262 | {'gpio_pin': 'A3', 'direction': 'out'} |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 263 | GPIO_CONFIG['FSI_DATA'] = \ |
| 264 | {'gpio_pin': 'AA2', 'direction': 'out'} |
| 265 | GPIO_CONFIG['FSI_CLK'] = \ |
| 266 | {'gpio_pin': 'AA0', 'direction': 'out'} |
| 267 | GPIO_CONFIG['FSI_ENABLE'] = \ |
| 268 | {'gpio_pin': 'D0', 'direction': 'out'} |
| 269 | |
Lei YU | aab6199 | 2016-11-03 22:52:36 +0800 | [diff] [blame] | 270 | # DBG_CP0_MUX_SEL |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 271 | GPIO_CONFIG['CRONUS_SEL'] = \ |
| 272 | {'gpio_pin': 'A6', 'direction': 'out'} |
Lei YU | aab6199 | 2016-11-03 22:52:36 +0800 | [diff] [blame] | 273 | GPIO_CONFIG['BMC_THROTTLE'] = \ |
| 274 | {'gpio_pin': 'J3', 'direction': 'out'} |
| 275 | GPIO_CONFIG['IDBTN'] = \ |
| 276 | {'gpio_pin': 'Q7', 'direction': 'out'} |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 277 | |
Lei YU | aab6199 | 2016-11-03 22:52:36 +0800 | [diff] [blame] | 278 | # PM_FP_PWRBTN_IN_L |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 279 | GPIO_CONFIG['POWER_BUTTON'] = \ |
Lei YU | b72169d | 2017-04-06 15:08:50 +0800 | [diff] [blame] | 280 | {'gpio_pin': 'I3', 'direction': 'both'} |
Lei YU | aab6199 | 2016-11-03 22:52:36 +0800 | [diff] [blame] | 281 | |
| 282 | # PM_NMIBTN_IN_L |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 283 | GPIO_CONFIG['RESET_BUTTON'] = \ |
Lei YU | b72169d | 2017-04-06 15:08:50 +0800 | [diff] [blame] | 284 | {'gpio_pin': 'J1', 'direction': 'both'} |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 285 | |
Lei YU | e2691e7 | 2017-11-09 16:08:01 +0800 | [diff] [blame] | 286 | # TODO openbmc/openbmc#2288 - Determine if any pci resets needed |
Lei YU | 75a18a2 | 2016-11-22 01:47:47 +0800 | [diff] [blame] | 287 | GPIO_CONFIGS = { |
| 288 | 'power_config' : { |
| 289 | 'power_good_in' : 'SYS_PWROK_BUFF', |
| 290 | 'power_up_outs' : [ |
| 291 | ('SOFTWARE_PGOOD', True), |
| 292 | ('BMC_POWER_UP', True), |
| 293 | ], |
| 294 | 'reset_outs' : [ |
Lei YU | 75a18a2 | 2016-11-22 01:47:47 +0800 | [diff] [blame] | 295 | ], |
| 296 | }, |
| 297 | 'hostctl_config' : { |
| 298 | 'fsi_data' : 'FSI_DATA', |
| 299 | 'fsi_clk' : 'FSI_CLK', |
| 300 | 'fsi_enable' : 'FSI_ENABLE', |
| 301 | 'cronus_sel' : 'CRONUS_SEL', |
| 302 | 'optionals' : [ |
| 303 | ], |
| 304 | }, |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 305 | } |
| 306 | |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 307 | |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 308 | # Miscellaneous non-poll sensor with system specific properties. |
| 309 | # The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. |
| 310 | MISC_SENSORS = { |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 311 | 0x8b : { 'class' : 'BootCountSensor' }, |
| 312 | 0x02 : { 'class' : 'BootProgressSensor' }, |
Lei YU | b44db26 | 2017-03-06 14:52:00 +0800 | [diff] [blame] | 313 | 0x91 : { 'class' : 'OperatingSystemStatusSensor' }, |
Joel Stanley | da7aad0 | 2016-10-24 17:23:15 +1030 | [diff] [blame] | 314 | } |
| 315 | |
| 316 | # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |