Angel Pons | 8a3453f | 2020-04-02 23:48:19 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Patrick Rudolph | ffbc3b5 | 2019-06-06 15:45:51 +0200 | [diff] [blame] | 2 | |
Michael Niewöhner | 31830d3 | 2020-11-23 13:24:40 +0100 | [diff] [blame] | 3 | #include <device/device.h> |
| 4 | |
David Hendricks | c6396a8 | 2022-05-15 14:32:06 -0700 | [diff] [blame] | 5 | #ifndef _IPMI_CHIP_H_ |
Patrick Rudolph | ffbc3b5 | 2019-06-06 15:45:51 +0200 | [diff] [blame] | 6 | #define _IPMI_CHIP_H_ |
| 7 | |
Michael Niewöhner | 31830d3 | 2020-11-23 13:24:40 +0100 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
Patrick Rudolph | ffbc3b5 | 2019-06-06 15:45:51 +0200 | [diff] [blame] | 10 | struct drivers_ipmi_config { |
Sergii Dmytruk | ef7dd5d | 2021-10-22 01:02:32 +0300 | [diff] [blame] | 11 | #if CONFIG(IPMI_KCS) |
Patrick Rudolph | ffbc3b5 | 2019-06-06 15:45:51 +0200 | [diff] [blame] | 12 | u8 bmc_i2c_address; |
| 13 | u8 have_nv_storage; |
| 14 | u8 nv_storage_device_address; |
| 15 | u8 have_gpe; |
| 16 | u8 gpe_interrupt; |
| 17 | u8 have_apic; |
| 18 | u32 apic_interrupt; |
Michael Niewöhner | 31830d3 | 2020-11-23 13:24:40 +0100 | [diff] [blame] | 19 | /* Device to use for GPIO operations */ |
| 20 | DEVTREE_CONST struct device *gpio_dev; |
| 21 | /* |
| 22 | * Jumper GPIO for enabling / disabling BMC/IPMI |
| 23 | * If present, the jumper overrides the devicetree. |
| 24 | */ |
| 25 | u32 bmc_jumper_gpio; |
Michael Niewöhner | 548a3dc | 2020-11-24 12:45:07 +0100 | [diff] [blame] | 26 | /* "POST complete" GPIO and polarity */ |
| 27 | u32 post_complete_gpio; |
| 28 | bool post_complete_invert; |
Sergii Dmytruk | ef7dd5d | 2021-10-22 01:02:32 +0300 | [diff] [blame] | 29 | unsigned int uid; /* Auto-filled by ipmi_ssdt() */ |
| 30 | #endif |
| 31 | |
Patrick Rudolph | 3d41a13 | 2019-07-22 16:31:35 +0200 | [diff] [blame] | 32 | /* |
| 33 | * Wait for BMC to boot. |
| 34 | * This can be used if the BMC takes a long time to boot after PoR: |
| 35 | * AST2400 on Supermicro X11SSH: 34 s |
| 36 | */ |
| 37 | bool wait_for_bmc; |
| 38 | /* |
| 39 | * The timeout in seconds to wait for the IPMI service to be loaded. |
| 40 | * Will be used if wait_for_bmc is true. |
| 41 | */ |
| 42 | u16 bmc_boot_timeout; |
Patrick Rudolph | ffbc3b5 | 2019-06-06 15:45:51 +0200 | [diff] [blame] | 43 | }; |
| 44 | |
| 45 | #endif /* _IMPI_CHIP_H_ */ |