blob: 05d32da5cbf2bf636a059016f110ca8fbd2c9db8 [file] [log] [blame]
Brad Bishopd68c6472016-04-22 11:55:27 -04001HOME_PATH = './'
Brad Bishopd68c6472016-04-22 11:55:27 -04002GPIO_BASE = 320
3SYSTEM_NAME = "Garrison"
4
5
6## System states
7## state can change to next state in 2 ways:
8## - a process emits a GotoSystemState signal with state name to goto
9## - objects specified in EXIT_STATE_DEPEND have started
10SYSTEM_STATES = [
11 'BASE_APPS',
12 'BMC_STARTING',
13 'BMC_READY',
14 'HOST_POWERING_ON',
15 'HOST_POWERED_ON',
16 'HOST_BOOTING',
17 'HOST_BOOTED',
18 'HOST_POWERED_OFF',
19]
20
21EXIT_STATE_DEPEND = {
22 'BASE_APPS' : {
23 '/org/openbmc/sensors': 0,
24 },
25 'BMC_STARTING' : {
26 '/org/openbmc/control/chassis0': 0,
27 '/org/openbmc/control/power0' : 0,
28 '/org/openbmc/control/host0' : 0,
29 '/org/openbmc/control/flash/bios' : 0,
30 },
31}
32
Brad Bishopd68c6472016-04-22 11:55:27 -040033CACHED_INTERFACES = {
34 "org.openbmc.InventoryItem" : True,
35 "org.openbmc.control.Chassis" : True,
36}
37
38INVENTORY_ROOT = '/org/openbmc/inventory'
39
40FRU_INSTANCES = {
41 '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
42 '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
43 '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
44
45 '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
46
47 '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
48
49 '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
50 '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
51 '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
52 '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
53 '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
54
55 '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
56 '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
57 '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
58 '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
59
60 '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
61
62 '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
63 '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
64
65 '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
66 '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
67 '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
68 '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
69 '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
70 '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
71 '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
72 '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
73 '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
74 '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
75 '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, },
76 '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, },
77
78 '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
79 '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
80 '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
81 '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
82 '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
83 '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
84 '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
85 '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
86 '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
87 '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
88 '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
89 '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
90
91 '<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
92 '<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
93 '<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
94 '<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
95 '<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
96 '<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
97 '<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
98 '<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
99
100 '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
101 '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
102 '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
103 '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
104 '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
105 '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
106 '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
107 '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
108 '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
109 '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
110 '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
111 '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
112 '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
113 '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
114 '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
115 '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
116 '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
117 '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
118 '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
119 '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
120 '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
121 '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
122 '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
123 '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
124 '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
125 '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
126 '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
127 '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
128 '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
129 '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
130 '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
131 '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
132}
133
134ID_LOOKUP = {
135 'FRU' : {
136 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
137 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
138 0x03 : '<inventory_root>/system/chassis/motherboard',
139 0x04 : '<inventory_root>/system/chassis/motherboard/membuf0',
140 0x05 : '<inventory_root>/system/chassis/motherboard/membuf1',
141 0x06 : '<inventory_root>/system/chassis/motherboard/membuf2',
142 0x07 : '<inventory_root>/system/chassis/motherboard/membuf3',
143 0x08 : '<inventory_root>/system/chassis/motherboard/membuf4',
144 0x09 : '<inventory_root>/system/chassis/motherboard/membuf5',
145 0x0c : '<inventory_root>/system/chassis/motherboard/dimm0',
146 0x0d : '<inventory_root>/system/chassis/motherboard/dimm1',
147 0x0e : '<inventory_root>/system/chassis/motherboard/dimm2',
148 0x0f : '<inventory_root>/system/chassis/motherboard/dimm3',
149 0x10 : '<inventory_root>/system/chassis/motherboard/dimm4',
150 0x11 : '<inventory_root>/system/chassis/motherboard/dimm5',
151 0x12 : '<inventory_root>/system/chassis/motherboard/dimm6',
152 0x13 : '<inventory_root>/system/chassis/motherboard/dimm7',
153 0x14 : '<inventory_root>/system/chassis/motherboard/dimm8',
154 0x15 : '<inventory_root>/system/chassis/motherboard/dimm9',
155 0x16 : '<inventory_root>/system/chassis/motherboard/dimm10',
156 0x17 : '<inventory_root>/system/chassis/motherboard/dimm11',
157 0x18 : '<inventory_root>/system/chassis/motherboard/dimm12',
158 0x19 : '<inventory_root>/system/chassis/motherboard/dimm13',
159 0x1a : '<inventory_root>/system/chassis/motherboard/dimm14',
160 0x1b : '<inventory_root>/system/chassis/motherboard/dimm15',
161 0x1c : '<inventory_root>/system/chassis/motherboard/dimm16',
162 0x1d : '<inventory_root>/system/chassis/motherboard/dimm17',
163 0x1e : '<inventory_root>/system/chassis/motherboard/dimm18',
164 0x1f : '<inventory_root>/system/chassis/motherboard/dimm19',
165 0x20 : '<inventory_root>/system/chassis/motherboard/dimm20',
166 0x21 : '<inventory_root>/system/chassis/motherboard/dimm21',
167 0x22 : '<inventory_root>/system/chassis/motherboard/dimm22',
168 0x23 : '<inventory_root>/system/chassis/motherboard/dimm23',
169 0x24 : '<inventory_root>/system/chassis/motherboard/dimm24',
170 0x25 : '<inventory_root>/system/chassis/motherboard/dimm25',
171 0x26 : '<inventory_root>/system/chassis/motherboard/dimm26',
172 0x27 : '<inventory_root>/system/chassis/motherboard/dimm27',
173 0x28 : '<inventory_root>/system/chassis/motherboard/dimm28',
174 0x29 : '<inventory_root>/system/chassis/motherboard/dimm29',
175 0x2a : '<inventory_root>/system/chassis/motherboard/dimm30',
176 0x2b : '<inventory_root>/system/chassis/motherboard/dimm31',
177 },
178 'FRU_STR' : {
179 'PRODUCT_0' : '<inventory_root>/system/bios',
180 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
181 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1',
182 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard',
183 'BOARD_3' : '<inventory_root>/system/misc',
184 'BOARD_4' : '<inventory_root>/system/chassis/motherboard/membuf0',
185 'BOARD_5' : '<inventory_root>/system/chassis/motherboard/membuf1',
186 'BOARD_6' : '<inventory_root>/system/chassis/motherboard/membuf2',
187 'BOARD_7' : '<inventory_root>/system/chassis/motherboard/membuf3',
188 'BOARD_8' : '<inventory_root>/system/chassis/motherboard/membuf4',
189 'BOARD_9' : '<inventory_root>/system/chassis/motherboard/membuf5',
190 'BOARD_10' : '<inventory_root>/system/chassis/motherboard/membuf6',
191 'BOARD_11' : '<inventory_root>/system/chassis/motherboard/membuf7',
192 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0',
193 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1',
194 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2',
195 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3',
196 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4',
197 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5',
198 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6',
199 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7',
200 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8',
201 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9',
202 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10',
203 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11',
204 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12',
205 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13',
206 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14',
207 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15',
208 'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16',
209 'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17',
210 'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18',
211 'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19',
212 'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20',
213 'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21',
214 'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22',
215 'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23',
216 'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24',
217 'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25',
218 'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26',
219 'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27',
220 'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28',
221 'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29',
222 'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30',
223 'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31',
224 'PRODUCT_47' : '<inventory_root>/system/misc',
225 },
226 'SENSOR' : {
227 0x04 : '/org/openbmc/sensors/host/HostStatus',
228 0x05 : '/org/openbmc/sensors/host/BootProgress',
229 0x08 : '/org/openbmc/sensors/host/cpu0/OccStatus',
230 0x09 : '/org/openbmc/sensors/host/cpu1/OccStatus',
231 0x0c : '<inventory_root>/system/chassis/motherboard/cpu0',
232 0x0e : '<inventory_root>/system/chassis/motherboard/cpu1',
233 0x1e : '<inventory_root>/system/chassis/motherboard/dimm3',
234 0x1f : '<inventory_root>/system/chassis/motherboard/dimm2',
235 0x20 : '<inventory_root>/system/chassis/motherboard/dimm1',
236 0x21 : '<inventory_root>/system/chassis/motherboard/dimm0',
237 0x22 : '<inventory_root>/system/chassis/motherboard/dimm7',
238 0x23 : '<inventory_root>/system/chassis/motherboard/dimm6',
239 0x24 : '<inventory_root>/system/chassis/motherboard/dimm5',
240 0x25 : '<inventory_root>/system/chassis/motherboard/dimm4',
241 0x26 : '<inventory_root>/system/chassis/motherboard/dimm11',
242 0x27 : '<inventory_root>/system/chassis/motherboard/dimm10',
243 0x28 : '<inventory_root>/system/chassis/motherboard/dimm9',
244 0x29 : '<inventory_root>/system/chassis/motherboard/dimm8',
245 0x2a : '<inventory_root>/system/chassis/motherboard/dimm15',
246 0x2b : '<inventory_root>/system/chassis/motherboard/dimm14',
247 0x2c : '<inventory_root>/system/chassis/motherboard/dimm13',
248 0x2d : '<inventory_root>/system/chassis/motherboard/dimm12',
249 0x2e : '<inventory_root>/system/chassis/motherboard/dimm19',
250 0x2f : '<inventory_root>/system/chassis/motherboard/dimm18',
251 0x30 : '<inventory_root>/system/chassis/motherboard/dimm17',
252 0x31 : '<inventory_root>/system/chassis/motherboard/dimm16',
253 0x32 : '<inventory_root>/system/chassis/motherboard/dimm23',
254 0x33 : '<inventory_root>/system/chassis/motherboard/dimm22',
255 0x34 : '<inventory_root>/system/chassis/motherboard/dimm21',
256 0x35 : '<inventory_root>/system/chassis/motherboard/dimm20',
257 0x36 : '<inventory_root>/system/chassis/motherboard/dimm27',
258 0x37 : '<inventory_root>/system/chassis/motherboard/dimm26',
259 0x38 : '<inventory_root>/system/chassis/motherboard/dimm25',
260 0x39 : '<inventory_root>/system/chassis/motherboard/dimm24',
261 0x3a : '<inventory_root>/system/chassis/motherboard/dimm31',
262 0x3b : '<inventory_root>/system/chassis/motherboard/dimm30',
263 0x3c : '<inventory_root>/system/chassis/motherboard/dimm29',
264 0x3d : '<inventory_root>/system/chassis/motherboard/dimm28',
265 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
266 0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
267 0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
268 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
269 0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
270 0x43 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
271 0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
272 0x45 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
273 0x46 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
274 0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
275 0x48 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
276 0x49 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
277 0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
278 0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
279 0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
280 0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
281 0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
282 0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
283 0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
284 0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
285 0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
286 0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
287 0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
288 0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
289 0x56 : '<inventory_root>/system/chassis/motherboard/membuf0',
290 0x57 : '<inventory_root>/system/chassis/motherboard/membuf1',
291 0x58 : '<inventory_root>/system/chassis/motherboard/membuf2',
292 0x59 : '<inventory_root>/system/chassis/motherboard/membuf3',
293 0x5a : '<inventory_root>/system/chassis/motherboard/membuf4',
294 0x5b : '<inventory_root>/system/chassis/motherboard/membuf5',
295 0x5c : '<inventory_root>/system/chassis/motherboard/membuf6',
296 0x5d : '<inventory_root>/system/chassis/motherboard/membuf7',
297 0x5f : '/org/openbmc/sensors/host/BootCount',
298 0x60 : '<inventory_root>/system/chassis/motherboard',
299 0x61 : '<inventory_root>/system/systemevent',
300 0x62 : '<inventory_root>/system/powerlimit',
301 0x63 : '<inventory_root>/system/chassis/motherboard/refclock',
302 0x64 : '<inventory_root>/system/chassis/motherboard/pcieclock',
303 0xb1 : '<inventory_root>/system/chassis/motherboard/todclock',
304 0xb2 : '<inventory_root>/system/chassis/motherboard/apss',
305 0xb3 : '/org/openbmc/sensors/host/powercap',
306 0xb5 : '/org/openbmc/sensors/host/OperatingSystemStatus',
307 0xb6 : '<inventory_root>/system/chassis/motherboard/pcielink',
308 },
309 'GPIO_PRESENT' : {}
310}
311
312GPIO_CONFIG = {}
313GPIO_CONFIG['BMC_POWER_UP'] = \
314 {'gpio_pin': 'D1', 'direction': 'out'}
315GPIO_CONFIG['SYS_PWROK_BUFF'] = \
316 {'gpio_pin': 'D2', 'direction': 'in'}
317GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
318 {'gpio_pin': 'N4', 'direction': 'out'}
319GPIO_CONFIG['CM1_OE_R_N'] = \
320 {'gpio_pin': 'Q6', 'direction': 'out'}
321GPIO_CONFIG['BMC_CP0_RESET_N'] = \
322 {'gpio_pin': 'O2', 'direction': 'out'}
323GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = \
324 {'gpio_pin': 'J2', 'direction': 'out'}
325GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = \
326 {'gpio_pin': 'B6', 'direction': 'out'}
327GPIO_CONFIG['CP0_DEVICES_RESET_N'] = \
328 {'gpio_pin': 'N3', 'direction': 'out'}
329GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \
330 {'gpio_pin': 'N5', 'direction': 'out'}
331
332GPIO_CONFIG['FSI_DATA'] = \
333 {'gpio_pin': 'A5', 'direction': 'out'}
334GPIO_CONFIG['FSI_CLK'] = \
335 {'gpio_pin': 'A4', 'direction': 'out'}
336GPIO_CONFIG['FSI_ENABLE'] = \
337 {'gpio_pin': 'D0', 'direction': 'out'}
338GPIO_CONFIG['CRONUS_SEL'] = \
339 {'gpio_pin': 'A6', 'direction': 'out'}
340GPIO_CONFIG['BMC_THROTTLE'] = \
341 {'gpio_pin': 'J3', 'direction': 'out'}
342
Chris Austencd6a5602016-05-24 13:33:51 -0500343GPIO_CONFIG['IDBTN'] = \
344 { 'gpio_pin': 'Q7', 'direction': 'out' }
Brad Bishopd68c6472016-04-22 11:55:27 -0400345GPIO_CONFIG['POWER_BUTTON'] = \
346 {'gpio_pin': 'E0', 'direction': 'both'}
347GPIO_CONFIG['RESET_BUTTON'] = \
348 {'gpio_pin': 'E4', 'direction': 'both'}
Adriana Kobylakb4140b82016-07-05 12:57:00 -0500349GPIO_CONFIG['CHECKSTOP'] = \
350 {'gpio_pin': 'H0', 'direction': 'falling'}
Brad Bishopd68c6472016-04-22 11:55:27 -0400351
352GPIO_CONFIG['PS0_PRES_N'] = \
353 {'gpio_pin': 'P7', 'direction': 'in'}
354GPIO_CONFIG['PS1_PRES_N'] = \
355 {'gpio_pin': 'N0', 'direction': 'in'}
356GPIO_CONFIG['CARD_PRES_N'] = \
357 {'gpio_pin': 'J0', 'direction': 'in'}
358
359
360
361
362def convertGpio(name):
363 name = name.upper()
364 c = name[0:1]
365 offset = int(name[1:])
366 a = ord(c)-65
367 base = a*8+GPIO_BASE
368 return base+offset
369
370
371HWMON_CONFIG = {
372 '4-0050' : {
373 'names' : {
374 'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
375 'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
376 'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
377 'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
378 'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
379 'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
380 },
381 'labels' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500382 '176' : { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400383 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500384 '177' : { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400385 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500386 '178' : { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400387 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500388 '179' : { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400389 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500390 '180' : { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400391 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500392 '181' : { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400393 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500394 '182' : { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400395 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500396 '183' : { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400397 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500398 '184' : { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400399 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500400 '185' : { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400401 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500402 '186' : { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400403 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500404 '187' : { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400405 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500406 '102' : { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
407 '103' : { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
408 '104' : { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
409 '105' : { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
410 '106' : { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
411 '107' : { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
412 '108' : { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
413 '109' : { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
414 '110' : { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
415 '111' : { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
416 '112' : { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
417 '113' : { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
418 '114' : { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
419 '115' : { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
420 '116' : { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
421 '117' : { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
422 '94' : { 'object_path' : 'temperature/membuf0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
423 '95' : { 'object_path' : 'temperature/membuf1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
424 '96' : { 'object_path' : 'temperature/membuf2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
425 '97' : { 'object_path' : 'temperature/membuf3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Brad Bishopd68c6472016-04-22 11:55:27 -0400426 }
427 },
428 '5-0050' : {
429 'labels' : {
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500430 '188' : { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400431 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500432 '189' : { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400433 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500434 '190' : { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400435 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500436 '191' : { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400437 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500438 '192' : { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400439 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500440 '193' : { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400441 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500442 '194' : { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400443 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500444 '195' : { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400445 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500446 '196' : { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400447 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500448 '197' : { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400449 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500450 '198' : { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400451 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500452 '199' : { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
Brad Bishopd68c6472016-04-22 11:55:27 -0400453 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
Edward A. Jamesc14f6fe2016-08-11 11:02:15 -0500454 '118' : { 'object_path' : 'temperature/dimm16','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
455 '119' : { 'object_path' : 'temperature/dimm17','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
456 '120' : { 'object_path' : 'temperature/dimm18','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
457 '121' : { 'object_path' : 'temperature/dimm19','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
458 '122' : { 'object_path' : 'temperature/dimm20','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
459 '123' : { 'object_path' : 'temperature/dimm21','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
460 '124' : { 'object_path' : 'temperature/dimm22','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
461 '125' : { 'object_path' : 'temperature/dimm23','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
462 '126' : { 'object_path' : 'temperature/dimm24','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
463 '127' : { 'object_path' : 'temperature/dimm25','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
464 '128' : { 'object_path' : 'temperature/dimm26','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
465 '129' : { 'object_path' : 'temperature/dimm27','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
466 '130' : { 'object_path' : 'temperature/dimm28','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
467 '131' : { 'object_path' : 'temperature/dimm29','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
468 '132' : { 'object_path' : 'temperature/dimm30','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
469 '133' : { 'object_path' : 'temperature/dimm31','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
470 '98' : { 'object_path' : 'temperature/membuf4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
471 '99' : { 'object_path' : 'temperature/membuf5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
472 '100' : { 'object_path' : 'temperature/membuf6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
473 '101' : { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
Brad Bishopd68c6472016-04-22 11:55:27 -0400474 }
475 },
476}
Yi Li54decc82016-05-05 17:42:56 +0800477
478# Miscellaneous non-poll sensor with system specific properties.
479# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
480MISC_SENSORS = {
481 0x5f : { 'class' : 'BootCountSensor' },
482 0x05 : { 'class' : 'BootProgressSensor' },
483 0x08 : { 'class' : 'OccStatusSensor',
Brad Bishop57b53bd2016-06-15 21:19:48 -0400484 'os_path' : '/sys/class/i2c-adapter/i2c-4/4-0050/online' },
Yi Li54decc82016-05-05 17:42:56 +0800485 0x09 : { 'class' : 'OccStatusSensor',
Brad Bishop57b53bd2016-06-15 21:19:48 -0400486 'os_path' : '/sys/class/i2c-adapter/i2c-5/5-0050/online' },
Yi Li54decc82016-05-05 17:42:56 +0800487 0xb5 : { 'class' : 'OperatingSystemStatusSensor' },
488 0xb3 : { 'class' : 'PowerCap',
489 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
490}