From 31830d3c2c853a8c61acf7cea99bf81ec72b5de1 Mon Sep 17 00:00:00 2001 From: Michael Niewöhner Date: Mon, 23 Nov 2020 13:24:40 +0100 Subject: drivers/ipmi: add code to set BMC/IPMI enablement from jumper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some boards, like the Supermicro X11SSM-F, have a jumper for enabling or disabling the BMC and IPMI. Add a new devicetree driver option to set the GPIO used for the jumper and enable or disable IPMI according to its value. This gets used in a follow-up change by Supermicro X11SSM-F. Test: Boot with jumper set to each enabled and disabled and check debug log if IPMI gets enabled/disabled accordingly. Successfully tested on Supermicro X11SSM-F with CB:48095. Signed-off-by: Michael Niewöhner Tested-by: Michael Niewöhner Change-Id: Icde3232843a7138797a4b106560f170972edeb9c Reviewed-on: https://review.coreboot.org/c/coreboot/+/48094 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/drivers/ipmi/chip.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/drivers/ipmi/chip.h') diff --git a/src/drivers/ipmi/chip.h b/src/drivers/ipmi/chip.h index f561bcd893..11bef9b02f 100644 --- a/src/drivers/ipmi/chip.h +++ b/src/drivers/ipmi/chip.h @@ -1,8 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include + #ifndef _IMPI_CHIP_H_ #define _IPMI_CHIP_H_ +#include + struct drivers_ipmi_config { u8 bmc_i2c_address; u8 have_nv_storage; @@ -11,6 +15,13 @@ struct drivers_ipmi_config { u8 gpe_interrupt; u8 have_apic; u32 apic_interrupt; + /* Device to use for GPIO operations */ + DEVTREE_CONST struct device *gpio_dev; + /* + * Jumper GPIO for enabling / disabling BMC/IPMI + * If present, the jumper overrides the devicetree. + */ + u32 bmc_jumper_gpio; /* * Wait for BMC to boot. * This can be used if the BMC takes a long time to boot after PoR: -- cgit v1.2.3