Some server boards like OCP Tiogapass and X11-LGA1151 boards use a gpio for signalling "POST complete" to BMC/IPMI. Add a new driver devicetree option to set the gpio and configure a callback that pulls the gpio low right before jumping to the payload. Test: Check that sensor readings appear in BMC web interface when the payload gets executed. Successfully tested on Supermicro X11SSM-F with CB:48097, X11SSH-TF with CB:48711 and OCP DeltaLake with CB:48672. Change-Id: I34764858be9c7f7f1110ce885fa056591164f148 Tested-by: Johnny Lin <Johnny_Lin@wiwynn.com> Tested-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: Patrick Rudolph <siro@das-labor.org> Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48096 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
42 lines
1,009 B
C
42 lines
1,009 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <device/device.h>
|
|
|
|
#ifndef _IMPI_CHIP_H_
|
|
#define _IPMI_CHIP_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
struct drivers_ipmi_config {
|
|
u8 bmc_i2c_address;
|
|
u8 have_nv_storage;
|
|
u8 nv_storage_device_address;
|
|
u8 have_gpe;
|
|
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;
|
|
/* "POST complete" GPIO and polarity */
|
|
u32 post_complete_gpio;
|
|
bool post_complete_invert;
|
|
/*
|
|
* Wait for BMC to boot.
|
|
* This can be used if the BMC takes a long time to boot after PoR:
|
|
* AST2400 on Supermicro X11SSH: 34 s
|
|
*/
|
|
bool wait_for_bmc;
|
|
/*
|
|
* The timeout in seconds to wait for the IPMI service to be loaded.
|
|
* Will be used if wait_for_bmc is true.
|
|
*/
|
|
u16 bmc_boot_timeout;
|
|
unsigned int uid; /* Auto-filled by ipmi_ssdt() */
|
|
};
|
|
|
|
#endif /* _IMPI_CHIP_H_ */
|