Norman James | cc7ae12 | 2015-08-24 14:26:09 -0500 | [diff] [blame] | 1 | #! /usr/bin/python |
| 2 | |
Norman James | eb6ed1b | 2015-08-27 14:25:54 -0500 | [diff] [blame] | 3 | def BarreleyeProcesses(): |
Norman James | cc7ae12 | 2015-08-24 14:26:09 -0500 | [diff] [blame] | 4 | config = {} |
| 5 | |
Norman James | bedbe58 | 2015-08-26 17:42:27 -0500 | [diff] [blame] | 6 | config['org.openbmc.sensors.Temperature.Ambient'] = { |
Norman James | eb6ed1b | 2015-08-27 14:25:54 -0500 | [diff] [blame] | 7 | 'exe_name' : 'bin/sensor_ambient.exe', |
| 8 | 'watchdog' : "yes", |
| 9 | 'instances' : [ |
| 10 | { |
| 11 | 'name' : 'AmbientTemperature1', |
| 12 | 'user_label': 'Ambient Temperature 1', |
| 13 | 'parameters': ['/dev/i2c0','0xA0'], |
| 14 | 'poll_interval': 5000, |
| 15 | 'lower_critical': 5, |
| 16 | 'lower_warning' : 10, |
| 17 | 'upper_warning' : 15, |
| 18 | 'upper_critical': 20 |
| 19 | }, |
| 20 | { |
| 21 | 'name' : 'AmbientTemperature2', |
| 22 | 'user_label': 'Ambient Temperature 2', |
| 23 | 'parameters': ['/dev/i2c0','0xA2'], |
| 24 | 'poll_interval': 5000, |
| 25 | 'lower_critical': 5, |
| 26 | 'lower_warning' : 10, |
| 27 | 'upper_warning' : 15, |
| 28 | 'upper_critical': 20 |
| 29 | } |
| 30 | ] |
Norman James | cc7ae12 | 2015-08-24 14:26:09 -0500 | [diff] [blame] | 31 | } |
Norman James | eb6ed1b | 2015-08-27 14:25:54 -0500 | [diff] [blame] | 32 | config['org.openbmc.buttons.ButtonPower'] = { |
| 33 | 'exe_name' : 'bin/button_power.exe', |
| 34 | 'watchdog' : 'no', |
| 35 | 'instances' : [ |
| 36 | { |
| 37 | 'name' : 'PowerButton1', |
| 38 | 'user_label': 'Main Power Button', |
| 39 | } |
| 40 | ] |
| 41 | } |
| 42 | config['org.openbmc.leds.ChassisIdentify'] = { |
| 43 | 'exe_name' : 'bin/chassis_identify.exe', |
| 44 | 'watchdog' : "no", |
| 45 | 'instances' : [ |
| 46 | { |
| 47 | 'name' : 'ChassisIdentify', |
| 48 | 'user_label': 'Chassis Identify LED', |
| 49 | } |
| 50 | ] |
| 51 | } |
| 52 | |
| 53 | |
Norman James | cc7ae12 | 2015-08-24 14:26:09 -0500 | [diff] [blame] | 54 | return config |
| 55 | |
Norman James | bedbe58 | 2015-08-26 17:42:27 -0500 | [diff] [blame] | 56 | def BarreleyeGpios(): |
| 57 | gpio = {} |
| 58 | gpio['FSI_CLK'] = { 'gpio_num': 23, 'direction': 'out' } |
| 59 | gpio['FSI_DATA'] = { 'gpio_num': 24, 'direction': 'out' } |
| 60 | gpio['FSI_ENABLE'] = { 'gpio_num': 25, 'direction': 'out' } |
| 61 | gpio['POWER_PIN'] = { 'gpio_num': 26, 'direction': 'out' } |
| 62 | gpio['CRONUS_SEL'] = { 'gpio_num': 27, 'direction': 'out' } |
| 63 | gpio['PGOOD'] = { 'gpio_num': 28, 'direction': 'in' } |
| 64 | |
| 65 | |
| 66 | return gpio |
| 67 | |