blob: aef072040c7e02e2a2e52230170e6b023fcbceb9 [file] [log] [blame]
Brad Bishopd68c6472016-04-22 11:55:27 -04001## System states
2## state can change to next state in 2 ways:
3## - a process emits a GotoSystemState signal with state name to goto
4## - objects specified in EXIT_STATE_DEPEND have started
5SYSTEM_STATES = [
6 'BASE_APPS',
7 'BMC_STARTING',
8 'BMC_READY',
9 'HOST_POWERING_ON',
10 'HOST_POWERED_ON',
11 'HOST_BOOTING',
12 'HOST_BOOTED',
13 'HOST_POWERED_OFF',
14]
15
16EXIT_STATE_DEPEND = {
17 'BASE_APPS' : {
18 '/org/openbmc/sensors': 0,
19 },
20 'BMC_STARTING' : {
21 '/org/openbmc/control/chassis0': 0,
22 '/org/openbmc/control/power0' : 0,
23 '/org/openbmc/control/host0' : 0,
24 '/org/openbmc/control/flash/bios' : 0,
25 },
26}
27
Brad Bishopd68c6472016-04-22 11:55:27 -040028FRU_INSTANCES = {
29 '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
30 '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
31 '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
32
33 '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
34
35 '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
36
37 '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
38 '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
39 '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
40 '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
41 '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
42
43 '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
44 '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
45 '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
46 '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
47
48 '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
49
50 '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
51 '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
52
53 '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
54 '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
55 '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
56 '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
57 '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
58 '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
59 '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
60 '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
61 '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
62 '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
63 '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, },
64 '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, },
65
66 '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
67 '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
68 '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
69 '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
70 '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
71 '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
72 '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
73 '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
74 '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
75 '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
76 '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
77 '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
78
79 '<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
80 '<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
81 '<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
82 '<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
83 '<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
84 '<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
85 '<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
86 '<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
87
88 '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
89 '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
90 '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
91 '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
92 '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
93 '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
94 '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
95 '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
96 '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
97 '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
98 '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
99 '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
100 '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
101 '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
102 '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
103 '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
104 '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
105 '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
106 '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
107 '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
108 '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
109 '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
110 '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
111 '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
112 '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
113 '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
114 '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
115 '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
116 '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
117 '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
118 '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
119 '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
120}
121
122ID_LOOKUP = {
123 'FRU' : {
124 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
125 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
126 0x03 : '<inventory_root>/system/chassis/motherboard',
127 0x04 : '<inventory_root>/system/chassis/motherboard/membuf0',
128 0x05 : '<inventory_root>/system/chassis/motherboard/membuf1',
129 0x06 : '<inventory_root>/system/chassis/motherboard/membuf2',
130 0x07 : '<inventory_root>/system/chassis/motherboard/membuf3',
131 0x08 : '<inventory_root>/system/chassis/motherboard/membuf4',
132 0x09 : '<inventory_root>/system/chassis/motherboard/membuf5',
133 0x0c : '<inventory_root>/system/chassis/motherboard/dimm0',
134 0x0d : '<inventory_root>/system/chassis/motherboard/dimm1',
135 0x0e : '<inventory_root>/system/chassis/motherboard/dimm2',
136 0x0f : '<inventory_root>/system/chassis/motherboard/dimm3',
137 0x10 : '<inventory_root>/system/chassis/motherboard/dimm4',
138 0x11 : '<inventory_root>/system/chassis/motherboard/dimm5',
139 0x12 : '<inventory_root>/system/chassis/motherboard/dimm6',
140 0x13 : '<inventory_root>/system/chassis/motherboard/dimm7',
141 0x14 : '<inventory_root>/system/chassis/motherboard/dimm8',
142 0x15 : '<inventory_root>/system/chassis/motherboard/dimm9',
143 0x16 : '<inventory_root>/system/chassis/motherboard/dimm10',
144 0x17 : '<inventory_root>/system/chassis/motherboard/dimm11',
145 0x18 : '<inventory_root>/system/chassis/motherboard/dimm12',
146 0x19 : '<inventory_root>/system/chassis/motherboard/dimm13',
147 0x1a : '<inventory_root>/system/chassis/motherboard/dimm14',
148 0x1b : '<inventory_root>/system/chassis/motherboard/dimm15',
149 0x1c : '<inventory_root>/system/chassis/motherboard/dimm16',
150 0x1d : '<inventory_root>/system/chassis/motherboard/dimm17',
151 0x1e : '<inventory_root>/system/chassis/motherboard/dimm18',
152 0x1f : '<inventory_root>/system/chassis/motherboard/dimm19',
153 0x20 : '<inventory_root>/system/chassis/motherboard/dimm20',
154 0x21 : '<inventory_root>/system/chassis/motherboard/dimm21',
155 0x22 : '<inventory_root>/system/chassis/motherboard/dimm22',
156 0x23 : '<inventory_root>/system/chassis/motherboard/dimm23',
157 0x24 : '<inventory_root>/system/chassis/motherboard/dimm24',
158 0x25 : '<inventory_root>/system/chassis/motherboard/dimm25',
159 0x26 : '<inventory_root>/system/chassis/motherboard/dimm26',
160 0x27 : '<inventory_root>/system/chassis/motherboard/dimm27',
161 0x28 : '<inventory_root>/system/chassis/motherboard/dimm28',
162 0x29 : '<inventory_root>/system/chassis/motherboard/dimm29',
163 0x2a : '<inventory_root>/system/chassis/motherboard/dimm30',
164 0x2b : '<inventory_root>/system/chassis/motherboard/dimm31',
165 },
166 'FRU_STR' : {
167 'PRODUCT_0' : '<inventory_root>/system/bios',
168 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
169 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1',
170 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard',
171 'BOARD_3' : '<inventory_root>/system/misc',
172 'BOARD_4' : '<inventory_root>/system/chassis/motherboard/membuf0',
173 'BOARD_5' : '<inventory_root>/system/chassis/motherboard/membuf1',
174 'BOARD_6' : '<inventory_root>/system/chassis/motherboard/membuf2',
175 'BOARD_7' : '<inventory_root>/system/chassis/motherboard/membuf3',
176 'BOARD_8' : '<inventory_root>/system/chassis/motherboard/membuf4',
177 'BOARD_9' : '<inventory_root>/system/chassis/motherboard/membuf5',
178 'BOARD_10' : '<inventory_root>/system/chassis/motherboard/membuf6',
179 'BOARD_11' : '<inventory_root>/system/chassis/motherboard/membuf7',
180 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0',
181 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1',
182 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2',
183 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3',
184 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4',
185 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5',
186 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6',
187 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7',
188 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8',
189 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9',
190 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10',
191 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11',
192 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12',
193 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13',
194 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14',
195 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15',
196 'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16',
197 'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17',
198 'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18',
199 'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19',
200 'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20',
201 'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21',
202 'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22',
203 'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23',
204 'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24',
205 'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25',
206 'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26',
207 'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27',
208 'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28',
209 'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29',
210 'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30',
211 'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31',
212 'PRODUCT_47' : '<inventory_root>/system/misc',
213 },
214 'SENSOR' : {
215 0x04 : '/org/openbmc/sensors/host/HostStatus',
216 0x05 : '/org/openbmc/sensors/host/BootProgress',
217 0x08 : '/org/openbmc/sensors/host/cpu0/OccStatus',
218 0x09 : '/org/openbmc/sensors/host/cpu1/OccStatus',
219 0x0c : '<inventory_root>/system/chassis/motherboard/cpu0',
220 0x0e : '<inventory_root>/system/chassis/motherboard/cpu1',
221 0x1e : '<inventory_root>/system/chassis/motherboard/dimm3',
222 0x1f : '<inventory_root>/system/chassis/motherboard/dimm2',
223 0x20 : '<inventory_root>/system/chassis/motherboard/dimm1',
224 0x21 : '<inventory_root>/system/chassis/motherboard/dimm0',
225 0x22 : '<inventory_root>/system/chassis/motherboard/dimm7',
226 0x23 : '<inventory_root>/system/chassis/motherboard/dimm6',
227 0x24 : '<inventory_root>/system/chassis/motherboard/dimm5',
228 0x25 : '<inventory_root>/system/chassis/motherboard/dimm4',
229 0x26 : '<inventory_root>/system/chassis/motherboard/dimm11',
230 0x27 : '<inventory_root>/system/chassis/motherboard/dimm10',
231 0x28 : '<inventory_root>/system/chassis/motherboard/dimm9',
232 0x29 : '<inventory_root>/system/chassis/motherboard/dimm8',
233 0x2a : '<inventory_root>/system/chassis/motherboard/dimm15',
234 0x2b : '<inventory_root>/system/chassis/motherboard/dimm14',
235 0x2c : '<inventory_root>/system/chassis/motherboard/dimm13',
236 0x2d : '<inventory_root>/system/chassis/motherboard/dimm12',
237 0x2e : '<inventory_root>/system/chassis/motherboard/dimm19',
238 0x2f : '<inventory_root>/system/chassis/motherboard/dimm18',
239 0x30 : '<inventory_root>/system/chassis/motherboard/dimm17',
240 0x31 : '<inventory_root>/system/chassis/motherboard/dimm16',
241 0x32 : '<inventory_root>/system/chassis/motherboard/dimm23',
242 0x33 : '<inventory_root>/system/chassis/motherboard/dimm22',
243 0x34 : '<inventory_root>/system/chassis/motherboard/dimm21',
244 0x35 : '<inventory_root>/system/chassis/motherboard/dimm20',
245 0x36 : '<inventory_root>/system/chassis/motherboard/dimm27',
246 0x37 : '<inventory_root>/system/chassis/motherboard/dimm26',
247 0x38 : '<inventory_root>/system/chassis/motherboard/dimm25',
248 0x39 : '<inventory_root>/system/chassis/motherboard/dimm24',
249 0x3a : '<inventory_root>/system/chassis/motherboard/dimm31',
250 0x3b : '<inventory_root>/system/chassis/motherboard/dimm30',
251 0x3c : '<inventory_root>/system/chassis/motherboard/dimm29',
252 0x3d : '<inventory_root>/system/chassis/motherboard/dimm28',
253 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
254 0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
255 0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
256 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
257 0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
258 0x43 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
259 0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
260 0x45 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
261 0x46 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
262 0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
263 0x48 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
264 0x49 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
265 0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
266 0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
267 0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
268 0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
269 0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
270 0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
271 0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
272 0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
273 0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
274 0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
275 0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
276 0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
277 0x56 : '<inventory_root>/system/chassis/motherboard/membuf0',
278 0x57 : '<inventory_root>/system/chassis/motherboard/membuf1',
279 0x58 : '<inventory_root>/system/chassis/motherboard/membuf2',
280 0x59 : '<inventory_root>/system/chassis/motherboard/membuf3',
281 0x5a : '<inventory_root>/system/chassis/motherboard/membuf4',
282 0x5b : '<inventory_root>/system/chassis/motherboard/membuf5',
283 0x5c : '<inventory_root>/system/chassis/motherboard/membuf6',
284 0x5d : '<inventory_root>/system/chassis/motherboard/membuf7',
285 0x5f : '/org/openbmc/sensors/host/BootCount',
286 0x60 : '<inventory_root>/system/chassis/motherboard',
287 0x61 : '<inventory_root>/system/systemevent',
288 0x62 : '<inventory_root>/system/powerlimit',
289 0x63 : '<inventory_root>/system/chassis/motherboard/refclock',
290 0x64 : '<inventory_root>/system/chassis/motherboard/pcieclock',
291 0xb1 : '<inventory_root>/system/chassis/motherboard/todclock',
292 0xb2 : '<inventory_root>/system/chassis/motherboard/apss',
293 0xb3 : '/org/openbmc/sensors/host/powercap',
294 0xb5 : '/org/openbmc/sensors/host/OperatingSystemStatus',
295 0xb6 : '<inventory_root>/system/chassis/motherboard/pcielink',
296 },
297 'GPIO_PRESENT' : {}
298}
299
300GPIO_CONFIG = {}
301GPIO_CONFIG['BMC_POWER_UP'] = \
302 {'gpio_pin': 'D1', 'direction': 'out'}
303GPIO_CONFIG['SYS_PWROK_BUFF'] = \
304 {'gpio_pin': 'D2', 'direction': 'in'}
305GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
306 {'gpio_pin': 'N4', 'direction': 'out'}
307GPIO_CONFIG['CM1_OE_R_N'] = \
308 {'gpio_pin': 'Q6', 'direction': 'out'}
309GPIO_CONFIG['BMC_CP0_RESET_N'] = \
310 {'gpio_pin': 'O2', 'direction': 'out'}
311GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = \
312 {'gpio_pin': 'J2', 'direction': 'out'}
313GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = \
314 {'gpio_pin': 'B6', 'direction': 'out'}
315GPIO_CONFIG['CP0_DEVICES_RESET_N'] = \
316 {'gpio_pin': 'N3', 'direction': 'out'}
317GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \
318 {'gpio_pin': 'N5', 'direction': 'out'}
319
320GPIO_CONFIG['FSI_DATA'] = \
321 {'gpio_pin': 'A5', 'direction': 'out'}
322GPIO_CONFIG['FSI_CLK'] = \
323 {'gpio_pin': 'A4', 'direction': 'out'}
324GPIO_CONFIG['FSI_ENABLE'] = \
325 {'gpio_pin': 'D0', 'direction': 'out'}
326GPIO_CONFIG['CRONUS_SEL'] = \
327 {'gpio_pin': 'A6', 'direction': 'out'}
328GPIO_CONFIG['BMC_THROTTLE'] = \
329 {'gpio_pin': 'J3', 'direction': 'out'}
330
Chris Austencd6a5602016-05-24 13:33:51 -0500331GPIO_CONFIG['IDBTN'] = \
332 { 'gpio_pin': 'Q7', 'direction': 'out' }
Brad Bishopd68c6472016-04-22 11:55:27 -0400333GPIO_CONFIG['POWER_BUTTON'] = \
334 {'gpio_pin': 'E0', 'direction': 'both'}
335GPIO_CONFIG['RESET_BUTTON'] = \
336 {'gpio_pin': 'E4', 'direction': 'both'}
Adriana Kobylakb4140b82016-07-05 12:57:00 -0500337GPIO_CONFIG['CHECKSTOP'] = \
338 {'gpio_pin': 'H0', 'direction': 'falling'}
Brad Bishopd68c6472016-04-22 11:55:27 -0400339
340GPIO_CONFIG['PS0_PRES_N'] = \
341 {'gpio_pin': 'P7', 'direction': 'in'}
342GPIO_CONFIG['PS1_PRES_N'] = \
343 {'gpio_pin': 'N0', 'direction': 'in'}
344GPIO_CONFIG['CARD_PRES_N'] = \
345 {'gpio_pin': 'J0', 'direction': 'in'}
346
Brad Bishopd68c6472016-04-22 11:55:27 -0400347HWMON_CONFIG = {
348 '4-0050' : {
349 'names' : {
350 'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
351 'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
352 'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
353 'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
354 'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
355 'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
356 },
357 'labels' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500358 '176' : { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400359 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500360 '177' : { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400361 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500362 '178' : { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400363 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500364 '179' : { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400365 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500366 '180' : { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400367 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500368 '181' : { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400369 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500370 '182' : { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400371 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500372 '183' : { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400373 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500374 '184' : { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400375 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500376 '185' : { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400377 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500378 '186' : { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400379 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500380 '187' : { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400381 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500382 '102' : { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
383 '103' : { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
384 '104' : { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
385 '105' : { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
386 '106' : { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
387 '107' : { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
388 '108' : { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
389 '109' : { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
390 '110' : { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
391 '111' : { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
392 '112' : { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
393 '113' : { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
394 '114' : { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
395 '115' : { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
396 '116' : { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
397 '117' : { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
398 '94' : { 'object_path' : 'temperature/membuf0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
399 '95' : { 'object_path' : 'temperature/membuf1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
400 '96' : { 'object_path' : 'temperature/membuf2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
401 '97' : { 'object_path' : 'temperature/membuf3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Brad Bishopd68c6472016-04-22 11:55:27 -0400402 }
403 },
404 '5-0050' : {
405 'labels' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500406 '188' : { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400407 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500408 '189' : { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400409 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500410 '190' : { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400411 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500412 '191' : { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400413 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500414 '192' : { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400415 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500416 '193' : { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400417 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500418 '194' : { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400419 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500420 '195' : { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400421 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500422 '196' : { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400423 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500424 '197' : { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400425 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500426 '198' : { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400427 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500428 '199' : { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400429 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500430 '118' : { 'object_path' : 'temperature/dimm16','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
431 '119' : { 'object_path' : 'temperature/dimm17','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
432 '120' : { 'object_path' : 'temperature/dimm18','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
433 '121' : { 'object_path' : 'temperature/dimm19','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
434 '122' : { 'object_path' : 'temperature/dimm20','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
435 '123' : { 'object_path' : 'temperature/dimm21','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
436 '124' : { 'object_path' : 'temperature/dimm22','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
437 '125' : { 'object_path' : 'temperature/dimm23','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
438 '126' : { 'object_path' : 'temperature/dimm24','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
439 '127' : { 'object_path' : 'temperature/dimm25','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
440 '128' : { 'object_path' : 'temperature/dimm26','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
441 '129' : { 'object_path' : 'temperature/dimm27','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
442 '130' : { 'object_path' : 'temperature/dimm28','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
443 '131' : { 'object_path' : 'temperature/dimm29','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
444 '132' : { 'object_path' : 'temperature/dimm30','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
445 '133' : { 'object_path' : 'temperature/dimm31','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
446 '98' : { 'object_path' : 'temperature/membuf4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
447 '99' : { 'object_path' : 'temperature/membuf5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
448 '100' : { 'object_path' : 'temperature/membuf6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
449 '101' : { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Brad Bishopd68c6472016-04-22 11:55:27 -0400450 }
451 },
452}
Yi Li54decc82016-05-05 17:42:56 +0800453
Xo Wang4088ec32016-09-22 13:00:58 -0700454
455POWER_CONFIG = {
456 'power_good_in' : 'SYS_PWROK_BUFF',
457 'power_up_outs' : [
458 ('BMC_POWER_UP', True),
459 ],
460 'reset_outs' : [
461 ('CM1_OE_R_N', True),
462 ('BMC_CP0_RESET_N', False),
463 ('BMC_CFAM_RESET_N_R', False),
Yi Li0475f652016-10-25 13:19:59 +0800464 ],
465 'pci_reset_outs' : [
466 # net name, polarity, reset hold
467 # if 'reset hold' set to 'True', BMC will hold pci reset until host CPU ready to drive PCI
468 ('PEX8718_DEVICES_RESET_N', False, True),
469 ('CP0_DEVICES_RESET_N', False, True),
470 ('CP1_DEVICES_RESET_N', False, True),
Xo Wang4088ec32016-09-22 13:00:58 -0700471 ],
472}
473
474
Yi Li54decc82016-05-05 17:42:56 +0800475# Miscellaneous non-poll sensor with system specific properties.
476# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
477MISC_SENSORS = {
478 0x5f : { 'class' : 'BootCountSensor' },
479 0x05 : { 'class' : 'BootProgressSensor' },
480 0x08 : { 'class' : 'OccStatusSensor',
Brad Bishop57b53bd2016-06-15 21:19:48 -0400481 'os_path' : '/sys/class/i2c-adapter/i2c-4/4-0050/online' },
Yi Li54decc82016-05-05 17:42:56 +0800482 0x09 : { 'class' : 'OccStatusSensor',
Brad Bishop57b53bd2016-06-15 21:19:48 -0400483 'os_path' : '/sys/class/i2c-adapter/i2c-5/5-0050/online' },
Yi Li54decc82016-05-05 17:42:56 +0800484 0xb5 : { 'class' : 'OperatingSystemStatusSensor' },
485 0xb3 : { 'class' : 'PowerCap',
486 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
487}
Brad Bishop53066752016-09-21 08:48:04 -0400488
489# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4