1*8506f281SKen Chen## System states 2*8506f281SKen Chen## state can change to next state in 2 ways: 3*8506f281SKen Chen## - a process emits a GotoSystemState signal with state name to goto 4*8506f281SKen Chen## - objects specified in EXIT_STATE_DEPEND have started 5*8506f281SKen ChenSYSTEM_STATES = [ 6*8506f281SKen Chen 'BASE_APPS', 7*8506f281SKen Chen 'BMC_STARTING', 8*8506f281SKen Chen 'BMC_READY', 9*8506f281SKen Chen 'HOST_POWERING_ON', 10*8506f281SKen Chen 'HOST_POWERED_ON', 11*8506f281SKen Chen 'HOST_BOOTING', 12*8506f281SKen Chen 'HOST_BOOTED', 13*8506f281SKen Chen 'HOST_POWERED_OFF', 14*8506f281SKen Chen] 15*8506f281SKen Chen 16*8506f281SKen ChenEXIT_STATE_DEPEND = { 17*8506f281SKen Chen 'BASE_APPS' : { 18*8506f281SKen Chen '/org/openbmc/sensors': 0, 19*8506f281SKen Chen }, 20*8506f281SKen Chen 'BMC_STARTING' : { 21*8506f281SKen Chen '/org/openbmc/control/chassis0': 0, 22*8506f281SKen Chen '/org/openbmc/control/power0' : 0, 23*8506f281SKen Chen '/org/openbmc/control/flash/bios' : 0, 24*8506f281SKen Chen }, 25*8506f281SKen Chen} 26*8506f281SKen Chen 27*8506f281SKen ChenFRU_INSTANCES = { 28*8506f281SKen Chen '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, 29*8506f281SKen Chen '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, 30*8506f281SKen Chen '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, }, 31*8506f281SKen Chen 32*8506f281SKen Chen '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, 33*8506f281SKen Chen 34*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, }, 35*8506f281SKen Chen 36*8506f281SKen Chen '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, }, 37*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 38*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 39*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 40*8506f281SKen Chen 41*8506f281SKen Chen '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, }, 42*8506f281SKen Chen '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, }, 43*8506f281SKen Chen '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, }, 44*8506f281SKen Chen 45*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' }, 46*8506f281SKen Chen 47*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, }, 48*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, }, 49*8506f281SKen Chen 50*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 51*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 52*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 53*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 54*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 55*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 56*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 57*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 58*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 59*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 60*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, }, 61*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, }, 62*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core12' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 63*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core13' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 64*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core14' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 65*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core15' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 66*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core16' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 67*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core17' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 68*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core18' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 69*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core19' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 70*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core20' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 71*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core21' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 72*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core22': { 'fru_type' : 'CORE', 'is_fru' : False, }, 73*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu0/core23': { 'fru_type' : 'CORE', 'is_fru' : False, }, 74*8506f281SKen Chen 75*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 76*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 77*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 78*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 79*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 80*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 81*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 82*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 83*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 84*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 85*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 86*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 87*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core12' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 88*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core13' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 89*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core14' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 90*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core15' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 91*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core16' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 92*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core17' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 93*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core18' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 94*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core19' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 95*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core20' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 96*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core21' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 97*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core22' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 98*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/cpu1/core23' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 99*8506f281SKen Chen 100*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 101*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 102*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 103*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 104*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 105*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 106*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 107*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 108*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 109*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 110*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 111*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 112*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 113*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 114*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 115*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 116*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 117*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 118*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 119*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 120*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 121*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 122*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 123*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 124*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 125*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 126*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 127*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 128*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 129*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 130*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 131*8506f281SKen Chen '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 132*8506f281SKen Chen} 133*8506f281SKen Chen 134*8506f281SKen ChenID_LOOKUP = { 135*8506f281SKen Chen 'FRU' : { 136*8506f281SKen Chen 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0', 137*8506f281SKen Chen 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1', 138*8506f281SKen Chen 0x03 : '<inventory_root>/system/chassis/motherboard', 139*8506f281SKen Chen 0x04 : '<inventory_root>/system/chassis/motherboard/membuf0', 140*8506f281SKen Chen 0x05 : '<inventory_root>/system/chassis/motherboard/membuf1', 141*8506f281SKen Chen 0x06 : '<inventory_root>/system/chassis/motherboard/membuf2', 142*8506f281SKen Chen 0x07 : '<inventory_root>/system/chassis/motherboard/membuf3', 143*8506f281SKen Chen 0x08 : '<inventory_root>/system/chassis/motherboard/membuf4', 144*8506f281SKen Chen 0x09 : '<inventory_root>/system/chassis/motherboard/membuf5', 145*8506f281SKen Chen 0x0c : '<inventory_root>/system/chassis/motherboard/dimm0', 146*8506f281SKen Chen 0x0d : '<inventory_root>/system/chassis/motherboard/dimm1', 147*8506f281SKen Chen 0x0e : '<inventory_root>/system/chassis/motherboard/dimm2', 148*8506f281SKen Chen 0x0f : '<inventory_root>/system/chassis/motherboard/dimm3', 149*8506f281SKen Chen 0x10 : '<inventory_root>/system/chassis/motherboard/dimm4', 150*8506f281SKen Chen 0x11 : '<inventory_root>/system/chassis/motherboard/dimm5', 151*8506f281SKen Chen 0x12 : '<inventory_root>/system/chassis/motherboard/dimm6', 152*8506f281SKen Chen 0x13 : '<inventory_root>/system/chassis/motherboard/dimm7', 153*8506f281SKen Chen 0x14 : '<inventory_root>/system/chassis/motherboard/dimm8', 154*8506f281SKen Chen 0x15 : '<inventory_root>/system/chassis/motherboard/dimm9', 155*8506f281SKen Chen 0x16 : '<inventory_root>/system/chassis/motherboard/dimm10', 156*8506f281SKen Chen 0x17 : '<inventory_root>/system/chassis/motherboard/dimm11', 157*8506f281SKen Chen 0x18 : '<inventory_root>/system/chassis/motherboard/dimm12', 158*8506f281SKen Chen 0x19 : '<inventory_root>/system/chassis/motherboard/dimm13', 159*8506f281SKen Chen 0x1a : '<inventory_root>/system/chassis/motherboard/dimm14', 160*8506f281SKen Chen 0x1b : '<inventory_root>/system/chassis/motherboard/dimm15', 161*8506f281SKen Chen 0x1c : '<inventory_root>/system/chassis/motherboard/dimm16', 162*8506f281SKen Chen 0x1d : '<inventory_root>/system/chassis/motherboard/dimm17', 163*8506f281SKen Chen 0x1e : '<inventory_root>/system/chassis/motherboard/dimm18', 164*8506f281SKen Chen 0x1f : '<inventory_root>/system/chassis/motherboard/dimm19', 165*8506f281SKen Chen 0x20 : '<inventory_root>/system/chassis/motherboard/dimm20', 166*8506f281SKen Chen 0x21 : '<inventory_root>/system/chassis/motherboard/dimm21', 167*8506f281SKen Chen 0x22 : '<inventory_root>/system/chassis/motherboard/dimm22', 168*8506f281SKen Chen 0x23 : '<inventory_root>/system/chassis/motherboard/dimm23', 169*8506f281SKen Chen 0x24 : '<inventory_root>/system/chassis/motherboard/dimm24', 170*8506f281SKen Chen 0x25 : '<inventory_root>/system/chassis/motherboard/dimm25', 171*8506f281SKen Chen 0x26 : '<inventory_root>/system/chassis/motherboard/dimm26', 172*8506f281SKen Chen 0x27 : '<inventory_root>/system/chassis/motherboard/dimm27', 173*8506f281SKen Chen 0x28 : '<inventory_root>/system/chassis/motherboard/dimm28', 174*8506f281SKen Chen 0x29 : '<inventory_root>/system/chassis/motherboard/dimm29', 175*8506f281SKen Chen 0x2a : '<inventory_root>/system/chassis/motherboard/dimm30', 176*8506f281SKen Chen 0x2b : '<inventory_root>/system/chassis/motherboard/dimm31', 177*8506f281SKen Chen }, 178*8506f281SKen Chen 'FRU_STR' : { 179*8506f281SKen Chen 'PRODUCT_0' : '<inventory_root>/system/bios', 180*8506f281SKen Chen 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0', 181*8506f281SKen Chen 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1', 182*8506f281SKen Chen 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard', 183*8506f281SKen Chen 'BOARD_3' : '<inventory_root>/system/misc', 184*8506f281SKen Chen 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0', 185*8506f281SKen Chen 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1', 186*8506f281SKen Chen 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2', 187*8506f281SKen Chen 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3', 188*8506f281SKen Chen 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4', 189*8506f281SKen Chen 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5', 190*8506f281SKen Chen 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6', 191*8506f281SKen Chen 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7', 192*8506f281SKen Chen 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8', 193*8506f281SKen Chen 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9', 194*8506f281SKen Chen 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10', 195*8506f281SKen Chen 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11', 196*8506f281SKen Chen 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12', 197*8506f281SKen Chen 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13', 198*8506f281SKen Chen 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14', 199*8506f281SKen Chen 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15', 200*8506f281SKen Chen 'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16', 201*8506f281SKen Chen 'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17', 202*8506f281SKen Chen 'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18', 203*8506f281SKen Chen 'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19', 204*8506f281SKen Chen 'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20', 205*8506f281SKen Chen 'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21', 206*8506f281SKen Chen 'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22', 207*8506f281SKen Chen 'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23', 208*8506f281SKen Chen 'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24', 209*8506f281SKen Chen 'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25', 210*8506f281SKen Chen 'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26', 211*8506f281SKen Chen 'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27', 212*8506f281SKen Chen 'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28', 213*8506f281SKen Chen 'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29', 214*8506f281SKen Chen 'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30', 215*8506f281SKen Chen 'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31', 216*8506f281SKen Chen 'PRODUCT_47' : '<inventory_root>/system/misc', 217*8506f281SKen Chen }, 218*8506f281SKen Chen 'SENSOR' : { 219*8506f281SKen Chen 0x02 : '/org/openbmc/sensors/host/HostStatus', 220*8506f281SKen Chen 0x03 : '/org/openbmc/sensors/host/BootProgress', 221*8506f281SKen Chen 0x21 : '<inventory_root>/system/chassis/motherboard/cpu0', 222*8506f281SKen Chen 0x71 : '<inventory_root>/system/chassis/motherboard/cpu1', 223*8506f281SKen Chen 0xc7 : '<inventory_root>/system/chassis/motherboard/dimm3', 224*8506f281SKen Chen 0xc5 : '<inventory_root>/system/chassis/motherboard/dimm2', 225*8506f281SKen Chen 0xc3 : '<inventory_root>/system/chassis/motherboard/dimm1', 226*8506f281SKen Chen 0xc1 : '<inventory_root>/system/chassis/motherboard/dimm0', 227*8506f281SKen Chen 0xcf : '<inventory_root>/system/chassis/motherboard/dimm7', 228*8506f281SKen Chen 0xcd : '<inventory_root>/system/chassis/motherboard/dimm6', 229*8506f281SKen Chen 0xcb : '<inventory_root>/system/chassis/motherboard/dimm5', 230*8506f281SKen Chen 0xc9 : '<inventory_root>/system/chassis/motherboard/dimm4', 231*8506f281SKen Chen 0xd7 : '<inventory_root>/system/chassis/motherboard/dimm11', 232*8506f281SKen Chen 0xd5 : '<inventory_root>/system/chassis/motherboard/dimm10', 233*8506f281SKen Chen 0xd3 : '<inventory_root>/system/chassis/motherboard/dimm9', 234*8506f281SKen Chen 0xd1 : '<inventory_root>/system/chassis/motherboard/dimm8', 235*8506f281SKen Chen 0xdf : '<inventory_root>/system/chassis/motherboard/dimm15', 236*8506f281SKen Chen 0xdd : '<inventory_root>/system/chassis/motherboard/dimm14', 237*8506f281SKen Chen 0xdb : '<inventory_root>/system/chassis/motherboard/dimm13', 238*8506f281SKen Chen 0xd9 : '<inventory_root>/system/chassis/motherboard/dimm12', 239*8506f281SKen Chen 0xe7 : '<inventory_root>/system/chassis/motherboard/dimm19', 240*8506f281SKen Chen 0xe5 : '<inventory_root>/system/chassis/motherboard/dimm18', 241*8506f281SKen Chen 0xe3 : '<inventory_root>/system/chassis/motherboard/dimm17', 242*8506f281SKen Chen 0xe1 : '<inventory_root>/system/chassis/motherboard/dimm16', 243*8506f281SKen Chen 0xef : '<inventory_root>/system/chassis/motherboard/dimm23', 244*8506f281SKen Chen 0xed : '<inventory_root>/system/chassis/motherboard/dimm22', 245*8506f281SKen Chen 0xeb : '<inventory_root>/system/chassis/motherboard/dimm21', 246*8506f281SKen Chen 0xe9 : '<inventory_root>/system/chassis/motherboard/dimm20', 247*8506f281SKen Chen 0xf7 : '<inventory_root>/system/chassis/motherboard/dimm27', 248*8506f281SKen Chen 0xf5 : '<inventory_root>/system/chassis/motherboard/dimm26', 249*8506f281SKen Chen 0xf3 : '<inventory_root>/system/chassis/motherboard/dimm25', 250*8506f281SKen Chen 0xf1 : '<inventory_root>/system/chassis/motherboard/dimm24', 251*8506f281SKen Chen 0xff : '<inventory_root>/system/chassis/motherboard/dimm31', 252*8506f281SKen Chen 0xfd : '<inventory_root>/system/chassis/motherboard/dimm30', 253*8506f281SKen Chen 0xfb : '<inventory_root>/system/chassis/motherboard/dimm29', 254*8506f281SKen Chen 0xf9 : '<inventory_root>/system/chassis/motherboard/dimm28', 255*8506f281SKen Chen 0x23 : '<inventory_root>/system/chassis/motherboard/cpu0/core0', 256*8506f281SKen Chen 0x26 : '<inventory_root>/system/chassis/motherboard/cpu0/core1', 257*8506f281SKen Chen 0x29 : '<inventory_root>/system/chassis/motherboard/cpu0/core2', 258*8506f281SKen Chen 0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core3', 259*8506f281SKen Chen 0x2f : '<inventory_root>/system/chassis/motherboard/cpu0/core4', 260*8506f281SKen Chen 0x32 : '<inventory_root>/system/chassis/motherboard/cpu0/core5', 261*8506f281SKen Chen 0x35 : '<inventory_root>/system/chassis/motherboard/cpu0/core6', 262*8506f281SKen Chen 0x38 : '<inventory_root>/system/chassis/motherboard/cpu0/core7', 263*8506f281SKen Chen 0x3b : '<inventory_root>/system/chassis/motherboard/cpu0/core8', 264*8506f281SKen Chen 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core9', 265*8506f281SKen Chen 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core10', 266*8506f281SKen Chen 0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core11', 267*8506f281SKen Chen 0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core12', 268*8506f281SKen Chen 0x4a : '<inventory_root>/system/chassis/motherboard/cpu0/core13', 269*8506f281SKen Chen 0x4d : '<inventory_root>/system/chassis/motherboard/cpu0/core14', 270*8506f281SKen Chen 0x50 : '<inventory_root>/system/chassis/motherboard/cpu0/core15', 271*8506f281SKen Chen 0x53 : '<inventory_root>/system/chassis/motherboard/cpu0/core16', 272*8506f281SKen Chen 0x56 : '<inventory_root>/system/chassis/motherboard/cpu0/core17', 273*8506f281SKen Chen 0x59 : '<inventory_root>/system/chassis/motherboard/cpu0/core18', 274*8506f281SKen Chen 0x5c : '<inventory_root>/system/chassis/motherboard/cpu0/core19', 275*8506f281SKen Chen 0x5f : '<inventory_root>/system/chassis/motherboard/cpu0/core20', 276*8506f281SKen Chen 0x62 : '<inventory_root>/system/chassis/motherboard/cpu0/core21', 277*8506f281SKen Chen 0x65 : '<inventory_root>/system/chassis/motherboard/cpu1/core22', 278*8506f281SKen Chen 0x68 : '<inventory_root>/system/chassis/motherboard/cpu1/core23', 279*8506f281SKen Chen 0x73 : '<inventory_root>/system/chassis/motherboard/cpu1/core0', 280*8506f281SKen Chen 0x76 : '<inventory_root>/system/chassis/motherboard/cpu1/core1', 281*8506f281SKen Chen 0x79 : '<inventory_root>/system/chassis/motherboard/cpu1/core2', 282*8506f281SKen Chen 0x7c : '<inventory_root>/system/chassis/motherboard/cpu1/core3', 283*8506f281SKen Chen 0x7f : '<inventory_root>/system/chassis/motherboard/cpu1/core4', 284*8506f281SKen Chen 0x82 : '<inventory_root>/system/chassis/motherboard/cpu1/core5', 285*8506f281SKen Chen 0x85 : '<inventory_root>/system/chassis/motherboard/cpu1/core6', 286*8506f281SKen Chen 0x88 : '<inventory_root>/system/chassis/motherboard/cpu1/core7', 287*8506f281SKen Chen 0x8b : '<inventory_root>/system/chassis/motherboard/cpu1/core8', 288*8506f281SKen Chen 0x8e : '<inventory_root>/system/chassis/motherboard/cpu1/core9', 289*8506f281SKen Chen 0x91 : '<inventory_root>/system/chassis/motherboard/cpu1/core10', 290*8506f281SKen Chen 0x94 : '<inventory_root>/system/chassis/motherboard/cpu1/core11', 291*8506f281SKen Chen 0x97 : '<inventory_root>/system/chassis/motherboard/cpu1/core12', 292*8506f281SKen Chen 0x9a : '<inventory_root>/system/chassis/motherboard/cpu1/core13', 293*8506f281SKen Chen 0x9d : '<inventory_root>/system/chassis/motherboard/cpu1/core14', 294*8506f281SKen Chen 0xa0 : '<inventory_root>/system/chassis/motherboard/cpu1/core15', 295*8506f281SKen Chen 0xa3 : '<inventory_root>/system/chassis/motherboard/cpu1/core16', 296*8506f281SKen Chen 0xa6 : '<inventory_root>/system/chassis/motherboard/cpu1/core17', 297*8506f281SKen Chen 0xa9 : '<inventory_root>/system/chassis/motherboard/cpu1/core18', 298*8506f281SKen Chen 0xac : '<inventory_root>/system/chassis/motherboard/cpu1/core19', 299*8506f281SKen Chen 0xaf : '<inventory_root>/system/chassis/motherboard/cpu1/core20', 300*8506f281SKen Chen 0xb2 : '<inventory_root>/system/chassis/motherboard/cpu1/core21', 301*8506f281SKen Chen 0xb5 : '<inventory_root>/system/chassis/motherboard/cpu1/core22', 302*8506f281SKen Chen 0xb8 : '<inventory_root>/system/chassis/motherboard/cpu1/core23', 303*8506f281SKen Chen 0x07 : '/org/openbmc/sensors/host/BootCount', 304*8506f281SKen Chen 0x10 : '<inventory_root>/system/chassis/motherboard', 305*8506f281SKen Chen 0x01 : '<inventory_root>/system/systemevent', 306*8506f281SKen Chen 0x11 : '<inventory_root>/system/chassis/motherboard/refclock', 307*8506f281SKen Chen 0x12 : '<inventory_root>/system/chassis/motherboard/pcieclock', 308*8506f281SKen Chen 0x13 : '<inventory_root>/system/chassis/motherboard/todclock', 309*8506f281SKen Chen 0x02 : '/org/openbmc/sensors/host/OperatingSystemStatus', 310*8506f281SKen Chen 0x04 : '<inventory_root>/system/chassis/motherboard/pcielink', 311*8506f281SKen Chen }, 312*8506f281SKen Chen 'GPIO_PRESENT' : {} 313*8506f281SKen Chen} 314*8506f281SKen Chen 315*8506f281SKen ChenGPIO_CONFIG = {} 316*8506f281SKen ChenGPIO_CONFIG['SOFTWARE_PGOOD'] = \ 317*8506f281SKen Chen {'gpio_pin': 'M6', 'direction': 'out'} 318*8506f281SKen ChenGPIO_CONFIG['BMC_POWER_UP'] = \ 319*8506f281SKen Chen {'gpio_pin': 'E2', 'direction': 'out'} # BMC_PWR_BTN_OUT_N 320*8506f281SKen ChenGPIO_CONFIG['SYS_PWROK_BUFF'] = \ 321*8506f281SKen Chen {'gpio_pin': 'F6', 'direction': 'in'} # BMC_UCD_PGOOD 322*8506f281SKen ChenGPIO_CONFIG['PHY_RST_N'] = \ 323*8506f281SKen Chen {'gpio_pin': 'D6', 'direction': 'out'} 324*8506f281SKen ChenGPIO_CONFIG['HDD_PWR_EN'] = \ 325*8506f281SKen Chen {'gpio_pin': 'B0', 'direction': 'out'} # BMC_HDD1_PWR_EN 326*8506f281SKen ChenGPIO_CONFIG['CP0_DEVICES_RESET_N'] = \ 327*8506f281SKen Chen {'gpio_pin': 'AA6', 'direction': 'out'} # BMC_CP0_RESET_N 328*8506f281SKen ChenGPIO_CONFIG['BMC_CP0_PERST_ENABLE'] = \ 329*8506f281SKen Chen {'gpio_pin': 'H3', 'direction': 'out'} # BMC_CP0_PERST_ENABLE_R 330*8506f281SKen ChenGPIO_CONFIG['BMC_UCD_LATCH_LE'] = \ 331*8506f281SKen Chen {'gpio_pin': 'P4', 'direction': 'out'} # BMC_UCD90160_GPIO 332*8506f281SKen ChenGPIO_CONFIG['FSI_ENABLE'] = \ 333*8506f281SKen Chen {'gpio_pin': 'D0', 'direction': 'out'} # BMC_FSI_IN_ENA 334*8506f281SKen ChenGPIO_CONFIG['CRONUS_SEL'] = \ 335*8506f281SKen Chen {'gpio_pin': 'H2', 'direction': 'out'} # BMC_FSI_DBG_PRSNT_N 336*8506f281SKen ChenGPIO_CONFIG['POWER_BUTTON'] = \ 337*8506f281SKen Chen {'gpio_pin': 'E4', 'direction': 'both'} # PWR_BTN_D_N 338*8506f281SKen ChenGPIO_CONFIG['RESET_BUTTON'] = \ 339*8506f281SKen Chen {'gpio_pin': 'E3', 'direction': 'both'} # RST_BTN_D_N 340*8506f281SKen ChenGPIO_CONFIG['PE_MEZZB_PRSNT_N'] = \ 341*8506f281SKen Chen {'gpio_pin': 'P6', 'direction': 'in'} 342*8506f281SKen ChenGPIO_CONFIG['CHECKSTOP'] = \ 343*8506f281SKen Chen {'gpio_pin': 'F3', 'direction': 'falling'} # BMC_CPU0_JTAG_PRES_N 344*8506f281SKen ChenHWMON_CONFIG = { 345*8506f281SKen Chen '0-0064': { 346*8506f281SKen Chen 'names': { 347*8506f281SKen Chen 'temp1_input' : { 'object_path' : 'temperature/rtc','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 348*8506f281SKen Chen } 349*8506f281SKen Chen }, 350*8506f281SKen Chen '9-0048': { 351*8506f281SKen Chen 'names': { 352*8506f281SKen Chen 'temp1_input' : { 'object_path' : 'temperature/ambient0','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 353*8506f281SKen Chen } 354*8506f281SKen Chen }, 355*8506f281SKen Chen '9-0049': { 356*8506f281SKen Chen 'names': { 357*8506f281SKen Chen 'temp1_input' : { 'object_path' : 'temperature/ambient1','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 358*8506f281SKen Chen } 359*8506f281SKen Chen }, 360*8506f281SKen Chen '9-004a': { 361*8506f281SKen Chen 'names': { 362*8506f281SKen Chen 'temp1_input' : { 'object_path' : 'temperature/ambient2','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 363*8506f281SKen Chen } 364*8506f281SKen Chen }, 365*8506f281SKen Chen '3-006b': { 366*8506f281SKen Chen 'names': { 367*8506f281SKen Chen } 368*8506f281SKen Chen }, 369*8506f281SKen Chen} 370*8506f281SKen Chen 371*8506f281SKen ChenGPIO_CONFIGS = { 372*8506f281SKen Chen 'power_config' : { 373*8506f281SKen Chen 'latch_out': 'BMC_UCD_LATCH_LE', 374*8506f281SKen Chen 'power_good_in' : 'SYS_PWROK_BUFF', 375*8506f281SKen Chen 'power_up_outs' : [ 376*8506f281SKen Chen ('SOFTWARE_PGOOD', True), 377*8506f281SKen Chen ('BMC_POWER_UP', False), 378*8506f281SKen Chen ], 379*8506f281SKen Chen 'reset_outs' : [ 380*8506f281SKen Chen ], 381*8506f281SKen Chen }, 382*8506f281SKen Chen 'hostctl_config' : { 383*8506f281SKen Chen 'fsi_data' : 'FSI_DATA', 384*8506f281SKen Chen 'fsi_clk' : 'FSI_CLK', 385*8506f281SKen Chen 'fsi_enable' : 'FSI_ENABLE', 386*8506f281SKen Chen 'cronus_sel' : 'CRONUS_SEL', 387*8506f281SKen Chen 'optionals' : [ 388*8506f281SKen Chen ], 389*8506f281SKen Chen }, 390*8506f281SKen Chen} 391*8506f281SKen Chen 392*8506f281SKen Chen# Miscellaneous non-poll sensor with system specific properties. 393*8506f281SKen Chen# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. 394*8506f281SKen ChenMISC_SENSORS = { 395*8506f281SKen Chen 0x07 : { 'class' : 'BootCountSensor' }, 396*8506f281SKen Chen 0x03 : { 'class' : 'BootProgressSensor' }, 397*8506f281SKen Chen 0x02 : { 'class' : 'OperatingSystemStatusSensor' }, 398*8506f281SKen Chen} 399*8506f281SKen Chen 400*8506f281SKen Chen# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 401