Reto Buerki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80261?usp=email )
Change subject: mb/up/squared: Make mini PCIe port mode configurable ......................................................................
mb/up/squared: Make mini PCIe port mode configurable
Add ENABLE_MSATA config knob and pad configuration to put Mini PCIe port into mSATA mode.
Tested with Kingston SUV500MS120G mSATA SSD. The pad configuration has been deduced via inteltool/intelp2m by toggling the stock BIOS setting.
Change-Id: Ic2da1dd4252ebb5e373bc65418e321f566d4c10f Signed-off-by: Reto Buerki reet@codelabs.ch --- M src/mainboard/up/squared/Kconfig M src/mainboard/up/squared/gpio.h M src/mainboard/up/squared/romstage.c 3 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/80261/1
diff --git a/src/mainboard/up/squared/Kconfig b/src/mainboard/up/squared/Kconfig index 91b1cbb..ee2dd12 100644 --- a/src/mainboard/up/squared/Kconfig +++ b/src/mainboard/up/squared/Kconfig @@ -74,4 +74,8 @@ bool default y
+config ENABLE_MSATA + bool "Use mini-PCIe port for mSATA" + default n + endif diff --git a/src/mainboard/up/squared/gpio.h b/src/mainboard/up/squared/gpio.h index 1aecc18..876b326 100644 --- a/src/mainboard/up/squared/gpio.h +++ b/src/mainboard/up/squared/gpio.h @@ -777,4 +777,14 @@ PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_43, UP_20K, DEEP, NF1, HIZCRx0, DISPUPD), };
+/* + * Pad configuration to put MiniPCIe port into mSATA mode. + */ +static const struct pad_config msata_mode_gpio_table[] = { + /* ------- GPIO Group North-West ------- */ + + /* GPIO_213 - GPIO */ + PAD_CFG_TERM_GPO(GPIO_213, 0, UP_20K, DEEP), +}; + #endif /* CFG_GPIO_H */ diff --git a/src/mainboard/up/squared/romstage.c b/src/mainboard/up/squared/romstage.c index 12e4135..bc7a13d 100644 --- a/src/mainboard/up/squared/romstage.c +++ b/src/mainboard/up/squared/romstage.c @@ -103,6 +103,8 @@ FSP_M_CONFIG *config = &memupd->FspmConfig;
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); + if (CONFIG(ENABLE_MSATA)) + gpio_configure_pads(msata_mode_gpio_table, ARRAY_SIZE(msata_mode_gpio_table));
uint8_t memory_skuid = get_memory_skuid(); printk(BIOS_DEBUG, "MAINBOARD: Found memory SKU ID: 0x%02x\n", memory_skuid);