summaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/hermes/eeprom.h
AgeCommit message (Collapse)Author
2022-10-20mb/prodrive/hermes: Allow using the Intel iGPU as primaryArthur Heymans
Configure the Intel iGPU as primary video adapter if enabled according to EEPROM settings. The default is to use the ASPEED BMC as primary video adapter, which only has a VGA output and the remote KVM output. For now, use the FSP GOP driver to light up the iGPU. There are several issues with libgfxinit on the Hermes, probably due to the unusual setup of the iGPU's display outputs. They are routed to a mezzanine connector for a piggy-back sub-board, of which there are two models. The Poseidon piggy-back has two DisplayPort outputs and an HDMI output coming from a MegaChips LSPCON. The Avalanche piggy-back routes all three DisplayPort outputs from the iGPU into a FPGA, which acts as a DisplayPort sink. Note that the FSP GOP only initializes at most 2 iGPU display outputs. However, all three outputs function properly once OS (Windows, Linux) graphics drivers take over. Additionally, update the config file that Prodrive uses to build coreboot images so that the iGPU can be used as primary. TEST=Verify that the iGPU's outputs work properly in pre-OS, Windows and Linux, on both the Poseidon and Avalanche piggy-backs. Change-Id: I24d9ebc2055dc246e7f257aa2f3853b22c8af370 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/62649 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-08mb/prodrive/hermes: Write reset cause regs to EEPROMAngel Pons
Write the value for reset cause registers to the EEPROM for debugging. Change-Id: I827f38731fd868aac72103957e01aac8263f1cd3 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67483 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-08mb/prodrive/hermes: Add part numbers to SMBIOSAngel Pons
Adjust the EEPROM layout to account for two new fields: board part number and product part number. In addition, put them in a Type 11 SMBIOS table (OEM Strings). Also, rename a macro to better reflect its purpose. Change-Id: I26c17ab37859c3306fe72c3f0cdc1d3787b48157 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67759 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-07mb/prodrive/hermes: Factor out serial reading logicAngel Pons
Add the `eeprom_read_serial()` function to read serials from the EEPROM. Note that there's only one buffer now: this means only one serial can be accessed at the same time, and the buffer needs to be cleared so that it does not contain old data from other serials. Given that the serials are copied one at a time into SMBIOS tables, having one shared buffer is not a problem. Change-Id: I5c9781e4e599043be756514cfd6dd86dedcf580c Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67275 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-20Revert "mb/prodrive/hermes: Add part numbers to SMBIOS"Angel Pons
This reverts commit d6695626631a86d9613ea7c34ff0e898fbfa443c. Reason for revert: Was submitted out-of-order and with an unresolved TODO in the commit message. Change-Id: Id5a8770226afbfcdf63d451157e4586b6cdd5189 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67284 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-19mb/prodrive/hermes: Add part numbers to SMBIOSAngel Pons
Adjust the EEPROM layout to account for two new fields: board part number and product part number. In addition, put them in a Type 11 SMBIOS table (OEM Strings). TODO: This currently stores the "raw" part numbers, should we add a prefix to the SMBIOS strings? Change-Id: I85fb9dc75f231004ccce2a55ebd9d7a4867fcb93 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67276 Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-04mb/prodrive/hermes: Use snake case for identifiersAngel Pons
There's no reason to use camel case for EEPROM region names or local variables. Use snake case for consistency with coreboot's code style. Change-Id: Id1200a0c778095b109d824a1ca4e3e69591e4165 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67274 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Reviewed-by: Martin L Roth <gaumless@gmail.com>
2022-06-15mb/prodrive/hermes: Add BIOS menu control via EEPROMLean Sheng Tan
Introduce a new field in the board settings EEPROM region to control whether BIOS menu is to be enabled. This field will be used in EDK2 payload. Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com> Change-Id: I0af81c9e70a0088caea6bc7e2b81eab9a123c0f7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65128 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-02-02mb/prodrive/hermes: Add VT-x control via EEPROMAngel Pons
Introduce a new field in the board settings EEPROM region to control whether VT-x is to be enabled. Change-Id: If65c58dd6e5069dba1675ad875c7ac89e704350e Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61507 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Marvin Drees <marvin.drees@9elements.com>
2021-12-03mb/prodrive/hermes: Add VBT for Avalanche systemsAngel Pons
The Hermes mainboard is used in different system configurations. The current VBT for Poseidon systems is unsuitable for Avalanche systems because display ports are connected differently. Add a new field in the BMC config EEPROM layout and use it to choose the correct VBT for every system configuration. Change-Id: I2647f2ae3f496b9ad75980ba86beb7800fdb0668 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59838 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2021-12-03mb/prodrive/hermes: Configure ALC888 port B VrefAngel Pons
Define a new field in the board config EEPROM layout for port B Vref. Write port B Vref settings to unused non-volatile NID 0x12 instead of NID 0x18, the actual port B NID. Because per-port Vref settings don't persist after codec resets, a custom Realtek driver (ab)uses NID 0x12 to restore port B Vref after resetting the codec. Change-Id: Iaa11ba9c74f643e94046d4983fbce65dbedd1025 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58879 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-12-03mb/prodrive/hermes: Clean up some cosmeticsAngel Pons
Use lowercase for hex numbers, sort includes alphabetically and avoid relying on indirect inclusion. Include `<intelblocks/gpio.h>` instead of `<intelblocks/gpio_defs.h>`, as the latter implcitly relies on one definition from `<soc/gpio.h>`. Also drop useless dsdt.asl and fix up the indentation of some includes. Tested with BUILD_TIMELESS=1, Prodrive Hermes remains identical. Change-Id: I3aeb9a644cf33cb4b1987174f40ef0fc7daccfa9 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59672 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2021-12-03mb/prodrive/hermes: Get rid of variant structureAngel Pons
There's no need to use a variant structure here. Only one variant is used, and revision-specific differences are handled at run-time, and it's unlikely that another variant will ever exist. Reorganize the mainboard code to get rid of the variant structure. Change-Id: I1543f5b76975b0e7183fbb759e9bae5c34151d06 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59671 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>