blob: 65d868341bf171a14e85339c7f3a3c62e5b41cd0 [file] [log] [blame]
Norman Jamesce46e3e2015-08-30 22:25:55 -05001#! /usr/bin/python
2import dbus
3import Openbmc
4
Norman James5d78b4d2015-09-05 13:34:34 -05005HOME_PATH = '/media/sf_vbox/openbmc/'
6BIN_PATH = HOME_PATH+'bin/'
7CACHE_PATH = HOME_PATH+'cache/'
8
Norman James90baede2015-09-02 20:32:49 -05009CACHED_INTERFACES = {
10 'org.openbmc.Fru' : True
11}
12
Norman Jamesce46e3e2015-08-30 22:25:55 -050013SYSTEM_CONFIG = {}
14
Norman James90baede2015-09-02 20:32:49 -050015SYSTEM_CONFIG['org.openbmc.managers.Sensors'] = {
Norman James5d78b4d2015-09-05 13:34:34 -050016 'start_process' : True,
17 'process_name' : 'sensor_manager.py',
Norman James90baede2015-09-02 20:32:49 -050018 'heartbeat' : 'no',
19 'rest_name' : 'sensors',
20 'instances' : [
21 {
22 'name' : 'Barreleye',
23 'user_label': 'Sensor Manager',
24 }
25 ]
26 }
27
Norman Jamesce46e3e2015-08-30 22:25:55 -050028SYSTEM_CONFIG['org.openbmc.loggers.EventLogger'] = {
Norman James5d78b4d2015-09-05 13:34:34 -050029 'start_process' : True,
30 'process_name' : 'eventlogger.py',
Norman Jamesce46e3e2015-08-30 22:25:55 -050031 'heartbeat' : 'no',
32 'rest_name' : 'events',
33 'instances' : [
34 {
Norman James90baede2015-09-02 20:32:49 -050035 'name' : 'Barreleye',
36 'user_label': 'Event Logger',
Norman Jamesce46e3e2015-08-30 22:25:55 -050037 }
38 ]
39 }
40
Norman James90baede2015-09-02 20:32:49 -050041SYSTEM_CONFIG['org.openbmc.managers.IpmiTranslator'] = {
Norman James5d78b4d2015-09-05 13:34:34 -050042 'start_process' : True,
43 'process_name' : 'ipmi_translator.py',
Norman James90baede2015-09-02 20:32:49 -050044 'heartbeat' : 'no',
45 'instances' : [
46 {
47 'name' : 'Barreleye',
48 'user_label': 'IPMI Translator',
49 }
50 ]
51 }
52
53
Norman Jamesce46e3e2015-08-30 22:25:55 -050054SYSTEM_CONFIG['org.openbmc.control.Power'] = {
Norman James5d78b4d2015-09-05 13:34:34 -050055 'start_process' : True,
56 'process_name' : 'power_control.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -050057 'heartbeat' : 'yes',
58 'instances' : [
59 {
60 'name' : 'PowerControl1',
61 'user_label': 'Power control',
62 }
63 ]
64 }
65
66SYSTEM_CONFIG['org.openbmc.sensors.Temperature.Ambient'] = {
Norman James5d78b4d2015-09-05 13:34:34 -050067 'start_process' : True,
68 'process_name' : 'sensor_ambient.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -050069 'heartbeat' : 'yes',
Norman James5d78b4d2015-09-05 13:34:34 -050070 'init_methods' : ['org.openbmc.SensorValue'],
Norman James90baede2015-09-02 20:32:49 -050071 'poll_interval': 5000,
Norman Jamesce46e3e2015-08-30 22:25:55 -050072 'instances' : [
73 {
74 'name' : 'AmbientTemperature1',
75 'user_label': 'Ambient Temperature 1',
Norman James90baede2015-09-02 20:32:49 -050076 'sensor_id' : 41,
Norman Jamesce46e3e2015-08-30 22:25:55 -050077 'properties' : {
Norman James5d78b4d2015-09-05 13:34:34 -050078 'org.openbmc.SensorThreshold' : {
Norman Jamesce46e3e2015-08-30 22:25:55 -050079 'lower_critical': 5,
80 'lower_warning' : 10,
81 'upper_warning' : 15,
82 'upper_critical': 20
Norman James90baede2015-09-02 20:32:49 -050083 },
84 'org.openbmc.SensorI2c' : {
85 'dev_path' : '/dev/i2c/i2c0',
86 'address' : '0xA0'
Norman Jamesce46e3e2015-08-30 22:25:55 -050087 }
88 }
89 },
90 {
91 'name' : 'AmbientTemperature2',
92 'user_label': 'Ambient Temperature 2',
Norman Jamesce46e3e2015-08-30 22:25:55 -050093 'properties' : {
Norman James5d78b4d2015-09-05 13:34:34 -050094 'org.openbmc.SensorThreshold' : {
Norman Jamesce46e3e2015-08-30 22:25:55 -050095 'lower_critical': 5,
96 'lower_warning' : 10,
97 'upper_warning' : 15,
98 'upper_critical': 20
Norman James90baede2015-09-02 20:32:49 -050099 },
100 'org.openbmc.SensorI2c' : {
101 'dev_path' : '/dev/i2c/i2c0',
102 'address' : '0xA2'
Norman Jamesce46e3e2015-08-30 22:25:55 -0500103 }
104 }
Norman Jamesce46e3e2015-08-30 22:25:55 -0500105 }
106 ]
107 }
108SYSTEM_CONFIG['org.openbmc.buttons.ButtonPower'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500109 'start_process' : True,
110 'process_name' : 'button_power.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500111 'heartbeat' : 'no',
112 'instances' : [
113 {
114 'name' : 'PowerButton1',
115 'user_label': 'Main Power Button',
116 }
117 ]
118 }
119SYSTEM_CONFIG['org.openbmc.sensors.HostStatus'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500120 'start_process' : True,
121 'process_name' : 'sensor_host_status.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500122 'heartbeat' : "no",
123 'instances' : [
124 {
125 'name' : 'HostStatus1',
126 'user_label': 'Host Status',
Norman James90baede2015-09-02 20:32:49 -0500127 'sensor_id' : 43,
Norman Jamesce46e3e2015-08-30 22:25:55 -0500128 }
129 ]
130 }
131SYSTEM_CONFIG['org.openbmc.leds.ChassisIdentify'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500132 'start_process' : True,
133 'process_name' : 'chassis_identify.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500134 'heartbeat' : 'no',
135 'instances' : [
136 {
137 'name' : 'ChassisIdentify1',
138 'user_label': 'Chassis Identify LED',
139 }
140 ]
141 }
142SYSTEM_CONFIG['org.openbmc.flash.BIOS'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500143 'start_process' : True,
144 'process_name' : 'flash_bios.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500145 'heartbeat' : 'no',
146 'rest_name' : 'flash',
147 'instances' : [
148 {
149 'name' : 'BIOS1',
150 'user_label': 'BIOS SPI Flash',
151 }
152 ]
153 }
154SYSTEM_CONFIG['org.openbmc.control.Host'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500155 'start_process' : True,
156 'process_name' : 'control_host.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500157 'heartbeat' : 'no',
158 'instances' : [
159 {
160 'name' : 'HostControl1',
161 'user_label': 'Host Control',
162 }
163 ]
164 }
165SYSTEM_CONFIG['org.openbmc.control.Chassis'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500166 'start_process' : True,
167 'process_name' : 'chassis_control.py',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500168 'heartbeat' : 'no',
169 'rest_name' : 'chassis',
170 'instances' : [
171 {
172 'name' : 'Chassis',
173 'user_label': 'Chassis Control',
174 }
175 ]
176 }
177SYSTEM_CONFIG['org.openbmc.frus.Fan'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500178 'start_process' : True,
179 'process_name' : 'fan.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500180 'heartbeat' : 'no',
181 'instances' : [
182 {
183 'name' : 'Fan0',
184 'user_label': 'Fan 0',
185 'properties' : {
186 'org.openbmc.Fru' : {
187 'label' : 'FAN0',
188 'location' : 'F0',
189 'type' : Openbmc.FRU_TYPES['FAN'],
190 }
191 }
192
193 },
194 {
195 'name' : 'Fan1',
196 'user_label': 'Fan 1',
197 'properties' : {
198 'org.openbmc.Fru' : {
199 'label' : 'FAN1',
200 'location' : 'F1',
201 'type' : Openbmc.FRU_TYPES['FAN'],
202 }
203 }
204
205 },
206 {
207 'name' : 'Fan2',
208 'user_label': 'Fan 2',
209 'properties' : {
210 'org.openbmc.Fru' : {
211 'label' : 'FAN2',
212 'location' : 'F2',
213 'type' : Openbmc.FRU_TYPES['FAN'],
214 }
215 }
216
217 },
218 {
219 'name' : 'Fan3',
220 'user_label': 'Fan 3',
221 'properties' : {
222 'org.openbmc.Fru' : {
223 'label' : 'FAN3',
224 'location' : 'F3',
225 'type' : Openbmc.FRU_TYPES['FAN'],
226 }
227 }
228
229 },
230 {
231 'name' : 'Fan4',
232 'user_label': 'Fan 4',
233 'properties' : {
234 'org.openbmc.Fru' : {
235 'label' : 'FAN4',
236 'location' : 'F4',
237 'type' : Openbmc.FRU_TYPES['FAN'],
238 }
239 }
240
241 },
242 {
243 'name' : 'Fan5',
244 'user_label': 'Fan 5',
245 'properties' : {
246 'org.openbmc.Fru' : {
247 'label' : 'FAN5',
248 'location' : 'F5',
249 'type' : Openbmc.FRU_TYPES['FAN'],
250 }
251 }
252
253 }
254
255 ]
256 }
257
Norman James90baede2015-09-02 20:32:49 -0500258SYSTEM_CONFIG['org.openbmc.frus.Board'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500259 'start_process' : True,
260 'process_name' : 'fru_board.exe',
Norman James90baede2015-09-02 20:32:49 -0500261 'init_methods' : ['org.openbmc.Fru'],
262 'heartbeat' : 'no',
263 'instances' : [
264 {
265 'name' : 'IO_Planer',
266 'user_label': 'IO Planar',
267 'fru_id' : 61,
268 'properties' : {
269 'org.openbmc.Fru' : {
270 'label' : 'IO Planar',
271 'location' : 'IO_PLANAR',
272 'type' : Openbmc.FRU_TYPES['BACKPLANE']
273 },
274 'org.openbmc.Fru.Eeprom' : {
275 'i2c_address' : '0xA8',
276 'i2c_dev_path' : '/dev/i2c/i2c5'
277 }
278 }
279 }
280 ]
281 }
282
Norman Jamesce46e3e2015-08-30 22:25:55 -0500283SYSTEM_CONFIG['org.openbmc.frus.Fru'] = {
Norman James5d78b4d2015-09-05 13:34:34 -0500284 'start_process' : True,
285 'process_name' : 'fru_generic.exe',
Norman Jamesce46e3e2015-08-30 22:25:55 -0500286 'heartbeat' : 'no',
Norman James90baede2015-09-02 20:32:49 -0500287 'instances' : [
288 {
289 'name' : 'Backplane',
290 'user_label': '2S Motherboard',
291 'fru_id' : 60,
292 'properties' : {
293 'org.openbmc.Fru' : {
294 'label' : 'MAIN_PLANAR',
295 'location' : 'C0',
296 'type' : Openbmc.FRU_TYPES['BACKPLANE'],
297 }
298 }
299 },
Norman Jamesce46e3e2015-08-30 22:25:55 -0500300 {
301 'name' : 'DIMM0',
302 'user_label': 'DIMM A0 Slot 0',
Norman James90baede2015-09-02 20:32:49 -0500303 'fru_id' : 12,
Norman Jamesce46e3e2015-08-30 22:25:55 -0500304 'properties' : {
305 'org.openbmc.Fru' : {
306 'label' : 'DIMM0',
307 'location' : 'A0',
308 'type' : Openbmc.FRU_TYPES['DIMM'],
309 }
310 }
311 },
312 {
313 'name' : 'DIMM1',
314 'user_label': 'DIMM A1 Slot 0',
315 'properties' : {
316 'org.openbmc.Fru' : {
317 'label' : 'DIMM1',
318 'location' : 'A1',
319 'type' : Openbmc.FRU_TYPES['DIMM'],
320 }
321 }
322 },
323 {
324 'name' : 'CPU0',
325 'user_label': 'CPU0',
326 'properties' : {
327 'org.openbmc.Fru' : {
328 'label' : 'CPU0',
329 'location' : 'CPU0',
330 'type' : Openbmc.FRU_TYPES['CPU'],
331 }
332 }
333 },
334
335 ]
336 }
337
338GPIO_CONFIG = {}
339GPIO_CONFIG['FSI_CLK'] = { 'gpio_num': 23, 'direction': 'out' }
340GPIO_CONFIG['FSI_DATA'] = { 'gpio_num': 24, 'direction': 'out' }
341GPIO_CONFIG['FSI_ENABLE'] = { 'gpio_num': 25, 'direction': 'out' }
342GPIO_CONFIG['POWER_PIN'] = { 'gpio_num': 26, 'direction': 'out' }
343GPIO_CONFIG['CRONUS_SEL'] = { 'gpio_num': 27, 'direction': 'out' }
344GPIO_CONFIG['PGOOD'] = { 'gpio_num': 28, 'direction': 'in' }
345GPIO_CONFIG['IDENTIFY'] = { 'gpio_num': 30, 'direction': 'out' }
346GPIO_CONFIG['POWER_BUTTON'] = { 'gpio_num': 31, 'direction': 'in' }
347