From 75a18a232ea7fe25b9a3b0b5b02c202fa0b300ea Mon Sep 17 00:00:00 2001 From: Lei YU Date: Tue, 22 Nov 2016 01:47:47 +0800 Subject: GPIO abstraction for power and host control In libopenbmc_intf/power_gpio.c there are GPIO abstractions for power related GPIOs. Host control related GPIOs need to do the same abstraction. The changes include: 1. Add host control related GPIOs in gpio_configs and update system_manager.py 2. Update control_host_obj.c to use the abstracted GPIOs 3. Update GPIO_CONFIGS for all machines and add host control related GPIOs power_gpio will be renamed to gpio_configs in next commit; Resolves openbmc/openbmc#814 Change-Id: I7832065d495d7d64c5df2f5b177005b97e68900a Signed-off-by: Lei YU --- configs/Firestone.py | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) (limited to 'configs/Firestone.py') diff --git a/configs/Firestone.py b/configs/Firestone.py index 285c397..6c7c908 100644 --- a/configs/Firestone.py +++ b/configs/Firestone.py @@ -451,23 +451,35 @@ HWMON_CONFIG = { } -POWER_CONFIG = { - 'power_good_in' : 'SYS_PWROK_BUFF', - 'power_up_outs' : [ - ('BMC_POWER_UP', True), - ], - 'reset_outs' : [ - ('CM1_OE_R_N', True), - ('BMC_CP0_RESET_N', False), - ('BMC_CFAM_RESET_N_R', False), - ], - 'pci_reset_outs' : [ - # net name, polarity, reset hold - # if 'reset hold' set to 'True', BMC will hold pci reset until host CPU ready to drive PCI - ('PEX8718_DEVICES_RESET_N', False, True), - ('CP0_DEVICES_RESET_N', False, True), - ('CP1_DEVICES_RESET_N', False, True), - ], +GPIO_CONFIGS = { + 'power_config' : { + 'power_good_in' : 'SYS_PWROK_BUFF', + 'power_up_outs' : [ + ('BMC_POWER_UP', True), + ], + 'reset_outs' : [ + ('CM1_OE_R_N', True), + ('BMC_CP0_RESET_N', False), + ('BMC_CFAM_RESET_N_R', False), + ], + 'pci_reset_outs': [ + # net name, polarity, reset hold + # if 'reset hold' set to 'True', BMC will hold pci reset until host CPU ready to drive PCI + ('PEX8718_DEVICES_RESET_N', False, True), + ('CP0_DEVICES_RESET_N', False, True), + ('CP1_DEVICES_RESET_N', False, True), + ], + }, + 'hostctl_config' : { + 'fsi_data' : 'FSI_DATA', + 'fsi_clk' : 'FSI_CLK', + 'fsi_enable' : 'FSI_ENABLE', + 'cronus_sel' : 'CRONUS_SEL', + 'optionals' : [ + ('BMC_THROTTLE', True), + ('IDBTN', False), + ], + }, } -- cgit v1.2.1