blob: 6ae00fc6e4ad0d83dd30c30a08b1f5af4d6b9a67 [file] [log] [blame]
George Keishing3bd8cf22016-09-01 00:04:19 -05001#! /usr/bin/python
2
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -05003# System states
4# state can change to next state in 2 ways:
5# - a process emits a GotoSystemState signal with state name to goto
6# - objects specified in EXIT_STATE_DEPEND have started
George Keishing3bd8cf22016-09-01 00:04:19 -05007SYSTEM_STATES = [
8 'BASE_APPS',
9 'BMC_STARTING',
10 'BMC_READY',
11 'HOST_POWERING_ON',
12 'HOST_POWERED_ON',
13 'HOST_BOOTING',
14 'HOST_BOOTED',
15 'HOST_POWERED_OFF',
16]
17
18EXIT_STATE_DEPEND = {
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050019 'BASE_APPS': {
George Keishing3bd8cf22016-09-01 00:04:19 -050020 '/org/openbmc/sensors': 0,
21 },
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050022 'BMC_STARTING': {
George Keishing3bd8cf22016-09-01 00:04:19 -050023 '/org/openbmc/control/chassis0': 0,
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050024 '/org/openbmc/control/power0': 0,
25 '/org/openbmc/control/flash/bios': 0,
George Keishing3bd8cf22016-09-01 00:04:19 -050026 },
27}
28
George Keishing3bd8cf22016-09-01 00:04:19 -050029FRU_INSTANCES = {
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050030 '<inventory_root>/system': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
31 '<inventory_root>/system/bios': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
32 '<inventory_root>/system/misc': {'fru_type': 'SYSTEM', 'is_fru': False, },
George Keishing3bd8cf22016-09-01 00:04:19 -050033
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050034 '<inventory_root>/system/chassis': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
George Keishing3bd8cf22016-09-01 00:04:19 -050035
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050036 '<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, },
George Keishing3bd8cf22016-09-01 00:04:19 -050037
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050038 '<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
39 '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
40 '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
41 '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
42 '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
George Keishing3bd8cf22016-09-01 00:04:19 -050043
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050044 '<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, },
45 '<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, },
46 '<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True, },
47 '<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True, },
George Keishing3bd8cf22016-09-01 00:04:19 -050048
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050049 '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False,
50 'manufacturer': 'ASPEED'},
George Keishing3bd8cf22016-09-01 00:04:19 -050051
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050052 '<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, },
53 '<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, },
George Keishing3bd8cf22016-09-01 00:04:19 -050054
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050055 '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', 'is_fru': False, },
56 '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', 'is_fru': False, },
57 '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', 'is_fru': False, },
58 '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', 'is_fru': False, },
59 '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', 'is_fru': False, },
60 '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', 'is_fru': False, },
61 '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', 'is_fru': False, },
62 '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', 'is_fru': False, },
63 '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', 'is_fru': False, },
64 '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', 'is_fru': False, },
65 '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', 'is_fru': False, },
66 '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', 'is_fru': False, },
George Keishing3bd8cf22016-09-01 00:04:19 -050067
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050068 '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', 'is_fru': False, },
69 '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', 'is_fru': False, },
70 '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', 'is_fru': False, },
71 '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', 'is_fru': False, },
72 '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', 'is_fru': False, },
73 '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', 'is_fru': False, },
74 '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', 'is_fru': False, },
75 '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', 'is_fru': False, },
76 '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', 'is_fru': False, },
77 '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', 'is_fru': False, },
78 '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', 'is_fru': False, },
79 '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', 'is_fru': False, },
George Keishing3bd8cf22016-09-01 00:04:19 -050080
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050081 '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
82 '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
83 '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
84 '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
85 '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
86 '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
87 '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
88 '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
George Keishing3bd8cf22016-09-01 00:04:19 -050089
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050090 '<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, },
91 '<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, },
92 '<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True, },
93 '<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True, },
94 '<inventory_root>/system/chassis/motherboard/dimm4': {'fru_type': 'DIMM', 'is_fru': True, },
95 '<inventory_root>/system/chassis/motherboard/dimm5': {'fru_type': 'DIMM', 'is_fru': True, },
96 '<inventory_root>/system/chassis/motherboard/dimm6': {'fru_type': 'DIMM', 'is_fru': True, },
97 '<inventory_root>/system/chassis/motherboard/dimm7': {'fru_type': 'DIMM', 'is_fru': True, },
98 '<inventory_root>/system/chassis/motherboard/dimm8': {'fru_type': 'DIMM', 'is_fru': True, },
99 '<inventory_root>/system/chassis/motherboard/dimm9': {'fru_type': 'DIMM', 'is_fru': True, },
100 '<inventory_root>/system/chassis/motherboard/dimm10': {'fru_type': 'DIMM', 'is_fru': True, },
101 '<inventory_root>/system/chassis/motherboard/dimm11': {'fru_type': 'DIMM', 'is_fru': True, },
102 '<inventory_root>/system/chassis/motherboard/dimm12': {'fru_type': 'DIMM', 'is_fru': True, },
103 '<inventory_root>/system/chassis/motherboard/dimm13': {'fru_type': 'DIMM', 'is_fru': True, },
104 '<inventory_root>/system/chassis/motherboard/dimm14': {'fru_type': 'DIMM', 'is_fru': True, },
105 '<inventory_root>/system/chassis/motherboard/dimm15': {'fru_type': 'DIMM', 'is_fru': True, },
106 '<inventory_root>/system/chassis/motherboard/dimm16': {'fru_type': 'DIMM', 'is_fru': True, },
107 '<inventory_root>/system/chassis/motherboard/dimm17': {'fru_type': 'DIMM', 'is_fru': True, },
108 '<inventory_root>/system/chassis/motherboard/dimm18': {'fru_type': 'DIMM', 'is_fru': True, },
109 '<inventory_root>/system/chassis/motherboard/dimm19': {'fru_type': 'DIMM', 'is_fru': True, },
110 '<inventory_root>/system/chassis/motherboard/dimm20': {'fru_type': 'DIMM', 'is_fru': True, },
111 '<inventory_root>/system/chassis/motherboard/dimm21': {'fru_type': 'DIMM', 'is_fru': True, },
112 '<inventory_root>/system/chassis/motherboard/dimm22': {'fru_type': 'DIMM', 'is_fru': True, },
113 '<inventory_root>/system/chassis/motherboard/dimm23': {'fru_type': 'DIMM', 'is_fru': True, },
114 '<inventory_root>/system/chassis/motherboard/dimm24': {'fru_type': 'DIMM', 'is_fru': True, },
115 '<inventory_root>/system/chassis/motherboard/dimm25': {'fru_type': 'DIMM', 'is_fru': True, },
116 '<inventory_root>/system/chassis/motherboard/dimm26': {'fru_type': 'DIMM', 'is_fru': True, },
117 '<inventory_root>/system/chassis/motherboard/dimm27': {'fru_type': 'DIMM', 'is_fru': True, },
118 '<inventory_root>/system/chassis/motherboard/dimm28': {'fru_type': 'DIMM', 'is_fru': True, },
119 '<inventory_root>/system/chassis/motherboard/dimm29': {'fru_type': 'DIMM', 'is_fru': True, },
120 '<inventory_root>/system/chassis/motherboard/dimm30': {'fru_type': 'DIMM', 'is_fru': True, },
121 '<inventory_root>/system/chassis/motherboard/dimm31': {'fru_type': 'DIMM', 'is_fru': True, },
George Keishing3bd8cf22016-09-01 00:04:19 -0500122}
123
124ID_LOOKUP = {
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500125 'FRU': {
126 0x01: '<inventory_root>/system/chassis/motherboard/cpu0',
127 0x02: '<inventory_root>/system/chassis/motherboard/cpu1',
128 0x03: '<inventory_root>/system/chassis/motherboard',
129 0x04: '<inventory_root>/system/chassis/motherboard/membuf0',
130 0x05: '<inventory_root>/system/chassis/motherboard/membuf1',
131 0x06: '<inventory_root>/system/chassis/motherboard/membuf2',
132 0x07: '<inventory_root>/system/chassis/motherboard/membuf3',
133 0x08: '<inventory_root>/system/chassis/motherboard/membuf4',
134 0x09: '<inventory_root>/system/chassis/motherboard/membuf5',
135 0x0c: '<inventory_root>/system/chassis/motherboard/dimm0',
136 0x0d: '<inventory_root>/system/chassis/motherboard/dimm1',
137 0x0e: '<inventory_root>/system/chassis/motherboard/dimm2',
138 0x0f: '<inventory_root>/system/chassis/motherboard/dimm3',
139 0x10: '<inventory_root>/system/chassis/motherboard/dimm4',
140 0x11: '<inventory_root>/system/chassis/motherboard/dimm5',
141 0x12: '<inventory_root>/system/chassis/motherboard/dimm6',
142 0x13: '<inventory_root>/system/chassis/motherboard/dimm7',
143 0x14: '<inventory_root>/system/chassis/motherboard/dimm8',
144 0x15: '<inventory_root>/system/chassis/motherboard/dimm9',
145 0x16: '<inventory_root>/system/chassis/motherboard/dimm10',
146 0x17: '<inventory_root>/system/chassis/motherboard/dimm11',
147 0x18: '<inventory_root>/system/chassis/motherboard/dimm12',
148 0x19: '<inventory_root>/system/chassis/motherboard/dimm13',
149 0x1a: '<inventory_root>/system/chassis/motherboard/dimm14',
150 0x1b: '<inventory_root>/system/chassis/motherboard/dimm15',
151 0x1c: '<inventory_root>/system/chassis/motherboard/dimm16',
152 0x1d: '<inventory_root>/system/chassis/motherboard/dimm17',
153 0x1e: '<inventory_root>/system/chassis/motherboard/dimm18',
154 0x1f: '<inventory_root>/system/chassis/motherboard/dimm19',
155 0x20: '<inventory_root>/system/chassis/motherboard/dimm20',
156 0x21: '<inventory_root>/system/chassis/motherboard/dimm21',
157 0x22: '<inventory_root>/system/chassis/motherboard/dimm22',
158 0x23: '<inventory_root>/system/chassis/motherboard/dimm23',
159 0x24: '<inventory_root>/system/chassis/motherboard/dimm24',
160 0x25: '<inventory_root>/system/chassis/motherboard/dimm25',
161 0x26: '<inventory_root>/system/chassis/motherboard/dimm26',
162 0x27: '<inventory_root>/system/chassis/motherboard/dimm27',
163 0x28: '<inventory_root>/system/chassis/motherboard/dimm28',
164 0x29: '<inventory_root>/system/chassis/motherboard/dimm29',
165 0x2a: '<inventory_root>/system/chassis/motherboard/dimm30',
166 0x2b: '<inventory_root>/system/chassis/motherboard/dimm31',
George Keishing3bd8cf22016-09-01 00:04:19 -0500167 },
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500168 'FRU_STR': {
169 'PRODUCT_0': '<inventory_root>/system/bios',
170 'BOARD_1': '<inventory_root>/system/chassis/motherboard/cpu0',
171 'BOARD_2': '<inventory_root>/system/chassis/motherboard/cpu1',
172 'CHASSIS_3': '<inventory_root>/system/chassis/motherboard',
173 'BOARD_3': '<inventory_root>/system/misc',
174 'BOARD_4': '<inventory_root>/system/chassis/motherboard/membuf0',
175 'BOARD_5': '<inventory_root>/system/chassis/motherboard/membuf1',
176 'BOARD_6': '<inventory_root>/system/chassis/motherboard/membuf2',
177 'BOARD_7': '<inventory_root>/system/chassis/motherboard/membuf3',
178 'BOARD_8': '<inventory_root>/system/chassis/motherboard/membuf4',
179 'BOARD_9': '<inventory_root>/system/chassis/motherboard/membuf5',
180 'BOARD_10': '<inventory_root>/system/chassis/motherboard/membuf6',
181 'BOARD_11': '<inventory_root>/system/chassis/motherboard/membuf7',
182 'PRODUCT_12': '<inventory_root>/system/chassis/motherboard/dimm0',
183 'PRODUCT_13': '<inventory_root>/system/chassis/motherboard/dimm1',
184 'PRODUCT_14': '<inventory_root>/system/chassis/motherboard/dimm2',
185 'PRODUCT_15': '<inventory_root>/system/chassis/motherboard/dimm3',
186 'PRODUCT_16': '<inventory_root>/system/chassis/motherboard/dimm4',
187 'PRODUCT_17': '<inventory_root>/system/chassis/motherboard/dimm5',
188 'PRODUCT_18': '<inventory_root>/system/chassis/motherboard/dimm6',
189 'PRODUCT_19': '<inventory_root>/system/chassis/motherboard/dimm7',
190 'PRODUCT_20': '<inventory_root>/system/chassis/motherboard/dimm8',
191 'PRODUCT_21': '<inventory_root>/system/chassis/motherboard/dimm9',
192 'PRODUCT_22': '<inventory_root>/system/chassis/motherboard/dimm10',
193 'PRODUCT_23': '<inventory_root>/system/chassis/motherboard/dimm11',
194 'PRODUCT_24': '<inventory_root>/system/chassis/motherboard/dimm12',
195 'PRODUCT_25': '<inventory_root>/system/chassis/motherboard/dimm13',
196 'PRODUCT_26': '<inventory_root>/system/chassis/motherboard/dimm14',
197 'PRODUCT_27': '<inventory_root>/system/chassis/motherboard/dimm15',
198 'PRODUCT_28': '<inventory_root>/system/chassis/motherboard/dimm16',
199 'PRODUCT_29': '<inventory_root>/system/chassis/motherboard/dimm17',
200 'PRODUCT_30': '<inventory_root>/system/chassis/motherboard/dimm18',
201 'PRODUCT_31': '<inventory_root>/system/chassis/motherboard/dimm19',
202 'PRODUCT_32': '<inventory_root>/system/chassis/motherboard/dimm20',
203 'PRODUCT_33': '<inventory_root>/system/chassis/motherboard/dimm21',
204 'PRODUCT_34': '<inventory_root>/system/chassis/motherboard/dimm22',
205 'PRODUCT_35': '<inventory_root>/system/chassis/motherboard/dimm23',
206 'PRODUCT_36': '<inventory_root>/system/chassis/motherboard/dimm24',
207 'PRODUCT_37': '<inventory_root>/system/chassis/motherboard/dimm25',
208 'PRODUCT_38': '<inventory_root>/system/chassis/motherboard/dimm26',
209 'PRODUCT_39': '<inventory_root>/system/chassis/motherboard/dimm27',
210 'PRODUCT_40': '<inventory_root>/system/chassis/motherboard/dimm28',
211 'PRODUCT_41': '<inventory_root>/system/chassis/motherboard/dimm29',
212 'PRODUCT_42': '<inventory_root>/system/chassis/motherboard/dimm30',
213 'PRODUCT_43': '<inventory_root>/system/chassis/motherboard/dimm31',
214 'PRODUCT_47': '<inventory_root>/system/misc',
George Keishing3bd8cf22016-09-01 00:04:19 -0500215 },
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500216 'SENSOR': {
217 0x02: '/org/openbmc/sensors/host/HostStatus',
218 0x03: '/org/openbmc/sensors/host/BootProgress',
219 0x5a: '<inventory_root>/system/chassis/motherboard/cpu0',
220 0xa4: '<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 0x07: '/org/openbmc/sensors/host/BootCount',
286 0x0c: '<inventory_root>/system/chassis/motherboard',
287 0x01: '<inventory_root>/system/systemevent',
288 0x08: '<inventory_root>/system/powerlimit',
289 0x0d: '<inventory_root>/system/chassis/motherboard/refclock',
290 0x0e: '<inventory_root>/system/chassis/motherboard/pcieclock',
291 0x0f: '<inventory_root>/system/chassis/motherboard/todclock',
292 0x10: '<inventory_root>/system/chassis/motherboard/apss',
293 0x02: '/org/openbmc/sensors/host/OperatingSystemStatus',
294 0x04: '<inventory_root>/system/chassis/motherboard/pcielink',
295 0x0b: '/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy',
296 0xda: '/org/openbmc/sensors/host/TurboAllowed',
297 0xD8: '/org/openbmc/sensors/host/PowerSupplyDerating',
George Keishing3bd8cf22016-09-01 00:04:19 -0500298 },
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500299 'GPIO_PRESENT': {}
George Keishing3bd8cf22016-09-01 00:04:19 -0500300}
301
302GPIO_CONFIG = {}
303GPIO_CONFIG['BMC_POWER_UP'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500304 {'gpio_pin': 'D1', 'direction': 'out'}
George Keishing301e7ac2018-06-01 12:06:33 -0500305GPIO_CONFIG['SOFTWARE_PGOOD'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500306 {'gpio_pin': 'R1', 'direction': 'out'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500307GPIO_CONFIG['SYS_PWROK_BUFF'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500308 {'gpio_pin': 'D2', 'direction': 'in'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500309
George Keishing301e7ac2018-06-01 12:06:33 -0500310# PV_CP_MD_JTAG_ATTENTION_N
311GPIO_CONFIG['CHECKSTOP'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500312 {'gpio_pin': 'J2', 'direction': 'falling'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500313
314GPIO_CONFIG['BMC_CP0_RESET_N'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500315 {'gpio_pin': 'A1', 'direction': 'out'}
George Keishing301e7ac2018-06-01 12:06:33 -0500316# pcie switch reset
George Keishing3bd8cf22016-09-01 00:04:19 -0500317GPIO_CONFIG['BMC_VS1_PERST_N'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500318 {'gpio_pin': 'B7', 'direction': 'out'}
George Keishing301e7ac2018-06-01 12:06:33 -0500319# pcie slots reset - not connected?
George Keishing3bd8cf22016-09-01 00:04:19 -0500320GPIO_CONFIG['BMC_CP0_PERST_ENABLE_R'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500321 {'gpio_pin': 'A3', 'direction': 'out'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500322
George Keishing301e7ac2018-06-01 12:06:33 -0500323# SOFT_FSI_DAT
George Keishing3bd8cf22016-09-01 00:04:19 -0500324GPIO_CONFIG['FSI_DATA'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500325 {'gpio_pin': 'E0', 'direction': 'out'}
George Keishing301e7ac2018-06-01 12:06:33 -0500326# SOFT_FSI_CLK
George Keishing3bd8cf22016-09-01 00:04:19 -0500327GPIO_CONFIG['FSI_CLK'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500328 {'gpio_pin': 'AA0', 'direction': 'out'}
George Keishing301e7ac2018-06-01 12:06:33 -0500329# BMC_FSI_IN_ENA
George Keishing3bd8cf22016-09-01 00:04:19 -0500330GPIO_CONFIG['FSI_ENABLE'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500331 {'gpio_pin': 'D0', 'direction': 'out'}
George Keishing301e7ac2018-06-01 12:06:33 -0500332# FSI_JMFG0_PRSNT_N
George Keishing3bd8cf22016-09-01 00:04:19 -0500333GPIO_CONFIG['CRONUS_SEL'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500334 {'gpio_pin': 'A6', 'direction': 'out'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500335
George Keishing301e7ac2018-06-01 12:06:33 -0500336# FP_PWR_BTN_N
337GPIO_CONFIG['POWER_BUTTON'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500338 {'gpio_pin': 'I3', 'direction': 'both'}
George Keishing301e7ac2018-06-01 12:06:33 -0500339# BMC_NMIBTN_IN_N
340GPIO_CONFIG['RESET_BUTTON'] = \
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500341 {'gpio_pin': 'J1', 'direction': 'both'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500342
George Keishing301e7ac2018-06-01 12:06:33 -0500343# FIXME: needed for Witherspoon?
344# Tracked by openbmc/openbmc#814
345# FP_ID_BTN_N
Gunnar Millsdca35792018-03-26 10:05:38 -0500346GPIO_CONFIG['IDBTN'] = \
347 {'gpio_pin': 'Q7', 'direction': 'out'}
George Keishing3bd8cf22016-09-01 00:04:19 -0500348
George Keishing301e7ac2018-06-01 12:06:33 -0500349# TODO openbmc/openbmc#2288 - Determine if any pci resets needed
350GPIO_CONFIGS = {
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500351 'power_config': {
352 'power_good_in': 'SYS_PWROK_BUFF',
353 'power_up_outs': [
George Keishing301e7ac2018-06-01 12:06:33 -0500354 ('SOFTWARE_PGOOD', True),
355 ('BMC_POWER_UP', True),
356 ],
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500357 'reset_outs': [
George Keishing301e7ac2018-06-01 12:06:33 -0500358 ('BMC_CP0_RESET_N', False),
359 ],
George Keishing3bd8cf22016-09-01 00:04:19 -0500360 },
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500361 'hostctl_config': {
362 'fsi_data': 'FSI_DATA',
363 'fsi_clk': 'FSI_CLK',
364 'fsi_enable': 'FSI_ENABLE',
365 'cronus_sel': 'CRONUS_SEL',
366 'optionals': [
George Keishing301e7ac2018-06-01 12:06:33 -0500367 ],
George Keishing3bd8cf22016-09-01 00:04:19 -0500368 },
369}
370
George Keishing301e7ac2018-06-01 12:06:33 -0500371
George Keishing3bd8cf22016-09-01 00:04:19 -0500372# Miscellaneous non-poll sensor with system specific properties.
373# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
374MISC_SENSORS = {
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500375 0x07: {'class': 'BootCountSensor'},
376 0x03: {'class': 'BootProgressSensor'},
377 0x02: {'class': 'OperatingSystemStatusSensor'},
George Keishing301e7ac2018-06-01 12:06:33 -0500378 # Garrison value is used, Not in P9 XML yet.
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -0500379 0x0b: {'class': 'PowerSupplyRedundancySensor'},
380 0xda: {'class': 'TurboAllowedSensor'},
381 0xD8: {'class': 'PowerSupplyDeratingSensor'},
George Keishing3bd8cf22016-09-01 00:04:19 -0500382}
George Keishing301e7ac2018-06-01 12:06:33 -0500383
384# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4