blob: bb124ce72e39c06bfee81a87191bdc250fede1c1 [file] [log] [blame]
Joel Stanleyda7aad02016-10-24 17:23:15 +10301# Romulus.py
2#
Joel Stanleyda7aad02016-10-24 17:23:15 +10303
4SYSTEM_STATES = [
5 'BASE_APPS',
6 'BMC_STARTING',
7 'BMC_READY',
8 'HOST_POWERING_ON',
9 'HOST_POWERED_ON',
10 'HOST_BOOTING',
11 'HOST_BOOTED',
12 'HOST_POWERED_OFF',
13]
14
15EXIT_STATE_DEPEND = {
16 'BASE_APPS' : {
17 '/org/openbmc/sensors': 0,
18 },
19 'BMC_STARTING' : {
20 '/org/openbmc/control/chassis0': 0,
21 '/org/openbmc/control/power0' : 0,
Joel Stanleyda7aad02016-10-24 17:23:15 +103022 '/org/openbmc/control/flash/bios' : 0,
23 },
24}
25
26FRU_INSTANCES = {
27 '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
28 '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
29 '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
30
31 '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
32
33 '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
34
35 '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
36 '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
37 '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
38 '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
39 '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
40
41 '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
42 '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
43 '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
44 '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
45
46 '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
47
48 '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
49 '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
50
51 '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
52 '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
53 '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
54 '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
55 '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
56 '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
57 '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
58 '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
59 '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
60 '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
Lei YUb44db262017-03-06 14:52:00 +080061 '<inventory_root>/system/chassis/motherboard/cpu0/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
62 '<inventory_root>/system/chassis/motherboard/cpu0/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
63 '<inventory_root>/system/chassis/motherboard/cpu0/core12' : { 'fru_type' : 'CORE', 'is_fru' : False, },
64 '<inventory_root>/system/chassis/motherboard/cpu0/core13' : { 'fru_type' : 'CORE', 'is_fru' : False, },
65 '<inventory_root>/system/chassis/motherboard/cpu0/core14' : { 'fru_type' : 'CORE', 'is_fru' : False, },
66 '<inventory_root>/system/chassis/motherboard/cpu0/core15' : { 'fru_type' : 'CORE', 'is_fru' : False, },
67 '<inventory_root>/system/chassis/motherboard/cpu0/core16' : { 'fru_type' : 'CORE', 'is_fru' : False, },
68 '<inventory_root>/system/chassis/motherboard/cpu0/core17' : { 'fru_type' : 'CORE', 'is_fru' : False, },
69 '<inventory_root>/system/chassis/motherboard/cpu0/core18' : { 'fru_type' : 'CORE', 'is_fru' : False, },
70 '<inventory_root>/system/chassis/motherboard/cpu0/core19' : { 'fru_type' : 'CORE', 'is_fru' : False, },
71 '<inventory_root>/system/chassis/motherboard/cpu0/core20' : { 'fru_type' : 'CORE', 'is_fru' : False, },
72 '<inventory_root>/system/chassis/motherboard/cpu0/core21' : { 'fru_type' : 'CORE', 'is_fru' : False, },
73 '<inventory_root>/system/chassis/motherboard/cpu0/core22' : { 'fru_type' : 'CORE', 'is_fru' : False, },
74 '<inventory_root>/system/chassis/motherboard/cpu0/core23' : { 'fru_type' : 'CORE', 'is_fru' : False, },
Joel Stanleyda7aad02016-10-24 17:23:15 +103075
76 '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
77 '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
78 '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
79 '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
80 '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
81 '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
82 '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
83 '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
84 '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
85 '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
86 '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
87 '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
Lei YUb44db262017-03-06 14:52:00 +080088 '<inventory_root>/system/chassis/motherboard/cpu1/core12' : { 'fru_type' : 'CORE', 'is_fru' : False, },
89 '<inventory_root>/system/chassis/motherboard/cpu1/core13' : { 'fru_type' : 'CORE', 'is_fru' : False, },
90 '<inventory_root>/system/chassis/motherboard/cpu1/core14' : { 'fru_type' : 'CORE', 'is_fru' : False, },
91 '<inventory_root>/system/chassis/motherboard/cpu1/core15' : { 'fru_type' : 'CORE', 'is_fru' : False, },
92 '<inventory_root>/system/chassis/motherboard/cpu1/core16' : { 'fru_type' : 'CORE', 'is_fru' : False, },
93 '<inventory_root>/system/chassis/motherboard/cpu1/core17' : { 'fru_type' : 'CORE', 'is_fru' : False, },
94 '<inventory_root>/system/chassis/motherboard/cpu1/core18' : { 'fru_type' : 'CORE', 'is_fru' : False, },
95 '<inventory_root>/system/chassis/motherboard/cpu1/core19' : { 'fru_type' : 'CORE', 'is_fru' : False, },
96 '<inventory_root>/system/chassis/motherboard/cpu1/core20' : { 'fru_type' : 'CORE', 'is_fru' : False, },
97 '<inventory_root>/system/chassis/motherboard/cpu1/core21' : { 'fru_type' : 'CORE', 'is_fru' : False, },
98 '<inventory_root>/system/chassis/motherboard/cpu1/core22' : { 'fru_type' : 'CORE', 'is_fru' : False, },
99 '<inventory_root>/system/chassis/motherboard/cpu1/core23' : { 'fru_type' : 'CORE', 'is_fru' : False, },
Joel Stanleyda7aad02016-10-24 17:23:15 +1030100
101 '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
102 '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
103 '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
104 '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
105 '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
106 '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
107 '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
108 '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
109 '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
110 '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
111 '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
112 '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
113 '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
114 '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
115 '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
116 '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
117}
118
119ID_LOOKUP = {
120 'FRU' : {
121 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
122 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
123 0x03 : '<inventory_root>/system/chassis/motherboard',
Lei YUb44db262017-03-06 14:52:00 +0800124 0x04 : '<inventory_root>/system/chassis/motherboard/dimm0',
125 0x05 : '<inventory_root>/system/chassis/motherboard/dimm1',
126 0x06 : '<inventory_root>/system/chassis/motherboard/dimm2',
127 0x07 : '<inventory_root>/system/chassis/motherboard/dimm3',
128 0x08 : '<inventory_root>/system/chassis/motherboard/dimm4',
129 0x09 : '<inventory_root>/system/chassis/motherboard/dimm5',
130 0x0a : '<inventory_root>/system/chassis/motherboard/dimm6',
131 0x0b : '<inventory_root>/system/chassis/motherboard/dimm7',
132 0x0c : '<inventory_root>/system/chassis/motherboard/dimm8',
133 0x0d : '<inventory_root>/system/chassis/motherboard/dimm9',
134 0x0e : '<inventory_root>/system/chassis/motherboard/dimm10',
135 0x0f : '<inventory_root>/system/chassis/motherboard/dimm11',
136 0x10 : '<inventory_root>/system/chassis/motherboard/dimm12',
137 0x11 : '<inventory_root>/system/chassis/motherboard/dimm13',
138 0x12 : '<inventory_root>/system/chassis/motherboard/dimm14',
139 0x13 : '<inventory_root>/system/chassis/motherboard/dimm15',
Joel Stanleyda7aad02016-10-24 17:23:15 +1030140 },
141 'FRU_STR' : {
142 'PRODUCT_0' : '<inventory_root>/system/bios',
143 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
144 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1',
145 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard',
146 'BOARD_3' : '<inventory_root>/system/misc',
147 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0',
148 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1',
149 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2',
150 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3',
151 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4',
152 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5',
153 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6',
154 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7',
155 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8',
156 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9',
157 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10',
158 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11',
159 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12',
160 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13',
161 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14',
162 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15',
163 'PRODUCT_47' : '<inventory_root>/system/misc',
164 },
165 'SENSOR' : {
Lei YUb44db262017-03-06 14:52:00 +0800166 0x01 : '/org/openbmc/sensors/host/HostStatus',
167 0x02 : '/org/openbmc/sensors/host/BootProgress',
168 0x03 : '/org/openbmc/sensors/host/cpu0/OccStatus',
169 0x04 : '/org/openbmc/sensors/host/cpu1/OccStatus',
170 0x08 : '<inventory_root>/system/chassis/motherboard/cpu0',
171 0x09 : '<inventory_root>/system/chassis/motherboard/cpu1',
172 0x0b : '<inventory_root>/system/chassis/motherboard/dimm0',
173 0x0c : '<inventory_root>/system/chassis/motherboard/dimm1',
174 0x0d : '<inventory_root>/system/chassis/motherboard/dimm2',
175 0x0e : '<inventory_root>/system/chassis/motherboard/dimm3',
176 0x0f : '<inventory_root>/system/chassis/motherboard/dimm4',
177 0x10 : '<inventory_root>/system/chassis/motherboard/dimm5',
178 0x11 : '<inventory_root>/system/chassis/motherboard/dimm6',
179 0x12 : '<inventory_root>/system/chassis/motherboard/dimm7',
180 0x13 : '<inventory_root>/system/chassis/motherboard/dimm8',
181 0x14 : '<inventory_root>/system/chassis/motherboard/dimm9',
182 0x15 : '<inventory_root>/system/chassis/motherboard/dimm10',
183 0x16 : '<inventory_root>/system/chassis/motherboard/dimm11',
184 0x17 : '<inventory_root>/system/chassis/motherboard/dimm12',
185 0x18 : '<inventory_root>/system/chassis/motherboard/dimm13',
186 0x19 : '<inventory_root>/system/chassis/motherboard/dimm14',
187 0x1a : '<inventory_root>/system/chassis/motherboard/dimm15',
188 0x2b : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
189 0x2c : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
190 0x2d : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
191 0x2e : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
192 0x2f : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
193 0x30 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
194 0x31 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
195 0x32 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
196 0x33 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
197 0x34 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
198 0x35 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
199 0x36 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
200 0x37 : '<inventory_root>/system/chassis/motherboard/cpu0/core12',
201 0x38 : '<inventory_root>/system/chassis/motherboard/cpu0/core13',
202 0x39 : '<inventory_root>/system/chassis/motherboard/cpu0/core14',
203 0x3a : '<inventory_root>/system/chassis/motherboard/cpu0/core15',
204 0x3b : '<inventory_root>/system/chassis/motherboard/cpu0/core16',
205 0x3c : '<inventory_root>/system/chassis/motherboard/cpu0/core17',
206 0x3d : '<inventory_root>/system/chassis/motherboard/cpu0/core18',
207 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core19',
208 0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core20',
209 0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core21',
210 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core22',
211 0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core23',
212 0x43 : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
213 0x44 : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
214 0x45 : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
215 0x46 : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
216 0x47 : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
217 0x48 : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
218 0x49 : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
219 0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
220 0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
221 0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
222 0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
223 0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
224 0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core12',
225 0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core13',
226 0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core14',
227 0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core15',
228 0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core16',
229 0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core17',
230 0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core18',
231 0x56 : '<inventory_root>/system/chassis/motherboard/cpu1/core19',
232 0x57 : '<inventory_root>/system/chassis/motherboard/cpu1/core20',
233 0x58 : '<inventory_root>/system/chassis/motherboard/cpu1/core21',
234 0x59 : '<inventory_root>/system/chassis/motherboard/cpu1/core22',
235 0x5a : '<inventory_root>/system/chassis/motherboard/cpu1/core23',
236 0x8b : '/org/openbmc/sensors/host/BootCount',
237 0x8c : '<inventory_root>/system/chassis/motherboard',
238 0x8d : '<inventory_root>/system/chassis/motherboard/refclock',
239 0x8e : '<inventory_root>/system/chassis/motherboard/pcieclock',
240 0x8f : '<inventory_root>/system/chassis/motherboard/todclock',
241 0x90 : '<inventory_root>/system/systemevent',
242 0x91 : '/org/openbmc/sensors/host/OperatingSystemStatus',
243 0x92 : '<inventory_root>/system/chassis/motherboard/pcielink',
244# 0x08 : '<inventory_root>/system/powerlimit',
245# 0x10 : '<inventory_root>/system/chassis/motherboard/apss',
246# 0x06 : '/org/openbmc/sensors/host/powercap',
Joel Stanleyda7aad02016-10-24 17:23:15 +1030247 },
248 'GPIO_PRESENT' : {}
249}
250
251GPIO_CONFIG = {}
252GPIO_CONFIG['SOFTWARE_PGOOD'] = \
253 {'gpio_pin': 'R1', 'direction': 'out'}
254GPIO_CONFIG['BMC_POWER_UP'] = \
255 {'gpio_pin': 'D1', 'direction': 'out'}
256GPIO_CONFIG['SYS_PWROK_BUFF'] = \
257 {'gpio_pin': 'D2', 'direction': 'in'}
258GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \
259 {'gpio_pin': 'N5', 'direction': 'out'}
260GPIO_CONFIG['CHECKSTOP'] = \
261 {'gpio_pin': 'J2', 'direction': 'falling'}
Joel Stanleyda7aad02016-10-24 17:23:15 +1030262GPIO_CONFIG['BMC_CP0_RESET_N'] = \
263 {'gpio_pin': 'A1', 'direction': 'out'}
Joel Stanleyda7aad02016-10-24 17:23:15 +1030264GPIO_CONFIG['BMC_CP0_PERST_ENABLE_R'] = \
265 {'gpio_pin': 'A3', 'direction': 'out'}
Joel Stanleyda7aad02016-10-24 17:23:15 +1030266GPIO_CONFIG['FSI_DATA'] = \
267 {'gpio_pin': 'AA2', 'direction': 'out'}
268GPIO_CONFIG['FSI_CLK'] = \
269 {'gpio_pin': 'AA0', 'direction': 'out'}
270GPIO_CONFIG['FSI_ENABLE'] = \
271 {'gpio_pin': 'D0', 'direction': 'out'}
272
Lei YUaab61992016-11-03 22:52:36 +0800273# DBG_CP0_MUX_SEL
Joel Stanleyda7aad02016-10-24 17:23:15 +1030274GPIO_CONFIG['CRONUS_SEL'] = \
275 {'gpio_pin': 'A6', 'direction': 'out'}
Lei YUaab61992016-11-03 22:52:36 +0800276GPIO_CONFIG['BMC_THROTTLE'] = \
277 {'gpio_pin': 'J3', 'direction': 'out'}
278GPIO_CONFIG['IDBTN'] = \
279 {'gpio_pin': 'Q7', 'direction': 'out'}
Joel Stanleyda7aad02016-10-24 17:23:15 +1030280
Lei YUaab61992016-11-03 22:52:36 +0800281# PM_FP_PWRBTN_IN_L
Joel Stanleyda7aad02016-10-24 17:23:15 +1030282GPIO_CONFIG['POWER_BUTTON'] = \
283 {'gpio_pin': 'I3', 'direction': 'in'}
Lei YUaab61992016-11-03 22:52:36 +0800284
285# PM_NMIBTN_IN_L
Joel Stanleyda7aad02016-10-24 17:23:15 +1030286GPIO_CONFIG['RESET_BUTTON'] = \
287 {'gpio_pin': 'J1', 'direction': 'in'}
288
Joel Stanleyda7aad02016-10-24 17:23:15 +1030289HWMON_CONFIG = {
290 '4-0050' : {
291 'names' : {
292 'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
293 'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
294 'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
295 'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
296 'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
297 'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' },
298 },
299 'labels' : {
300 '176' : { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
301 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
302 '177' : { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
303 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
304 '178' : { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
305 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
306 '179' : { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
307 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
308 '180' : { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
309 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
310 '181' : { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
311 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
312 '182' : { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
313 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
314 '183' : { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
315 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
316 '184' : { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
317 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
318 '185' : { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
319 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
320 '186' : { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
321 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
322 '187' : { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
323 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
324 '102' : { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
325 '103' : { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
326 '104' : { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
327 '105' : { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
328 '106' : { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
329 '107' : { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
330 '108' : { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
331 '109' : { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
332 }
333 },
334 '5-0050' : {
335 'labels' : {
336 '188' : { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C',
337 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
338 '189' : { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C',
339 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
340 '190' : { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C',
341 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
342 '191' : { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C',
343 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
344 '192' : { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C',
345 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
346 '193' : { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C',
347 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
348 '194' : { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C',
349 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
350 '195' : { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C',
351 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
352 '196' : { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C',
353 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
354 '197' : { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C',
355 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
356 '198' : { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C',
357 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
358 '199' : { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C',
359 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True },
360 '110' : { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
361 '111' : { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
362 '112' : { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
363 '113' : { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
364 '114' : { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
365 '115' : { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
366 '116' : { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
367 '117' : { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : -3,'units' : 'C' },
368 }
369 },
370}
371
Lei YUb44db262017-03-06 14:52:00 +0800372
Lei YU75a18a22016-11-22 01:47:47 +0800373GPIO_CONFIGS = {
374 'power_config' : {
375 'power_good_in' : 'SYS_PWROK_BUFF',
376 'power_up_outs' : [
377 ('SOFTWARE_PGOOD', True),
378 ('BMC_POWER_UP', True),
379 ],
380 'reset_outs' : [
381 ('BMC_CP0_RESET_N', False),
382 ('BMC_CP0_PERST_ENABLE_R', False),
383 ],
384 },
385 'hostctl_config' : {
386 'fsi_data' : 'FSI_DATA',
387 'fsi_clk' : 'FSI_CLK',
388 'fsi_enable' : 'FSI_ENABLE',
389 'cronus_sel' : 'CRONUS_SEL',
390 'optionals' : [
391 ],
392 },
Joel Stanleyda7aad02016-10-24 17:23:15 +1030393}
394
Lei YUb44db262017-03-06 14:52:00 +0800395
Joel Stanleyda7aad02016-10-24 17:23:15 +1030396# Miscellaneous non-poll sensor with system specific properties.
397# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
398MISC_SENSORS = {
Lei YUb44db262017-03-06 14:52:00 +0800399 0x8b : { 'class' : 'BootCountSensor' },
400 0x02 : { 'class' : 'BootProgressSensor' },
401 #OCC active sensors aren't in the P9 XML yet. These are wrong.
402 0x03 : { 'class' : 'OccStatusSensor',
Joel Stanleyd4bca7b2017-03-06 14:42:10 +1030403 'os_path' : '/sys/bus/i2c/devices/3-0050/online' },
Lei YUb44db262017-03-06 14:52:00 +0800404 0x04 : { 'class' : 'OccStatusSensor',
Joel Stanleyd4bca7b2017-03-06 14:42:10 +1030405 'os_path' : '/sys/bus/i2c/devices/3-0051/online' },
Lei YUb44db262017-03-06 14:52:00 +0800406 0x91 : { 'class' : 'OperatingSystemStatusSensor' },
407 #0x06 : { 'class' : 'PowerCap',
408 # 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' },
Joel Stanleyda7aad02016-10-24 17:23:15 +1030409}
410
411# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4