Skip to content

Commit f9396b2

Browse files
committed
mb/novacustom/mtl-h/ramstage.c: Configure TBT force power properly
The default state of TBT force power GPIO was not consistent across variants. Assert TBT force power by default before FSP so that the initialization will be done when the retimer is active. De-assert TBT force power before handing off to the payload, so that the RTD3 logic will work in OS. Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
1 parent aac2e16 commit f9396b2

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/mainboard/novacustom/mtl-h/ramstage.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <ec/acpi/ec.h>
66
#include <ec/dasharo/ec/acpi.h>
77
#include <fmap.h>
8+
#include <gpio.h>
89
#include <lib.h>
910
#include <mainboard/variants.h>
1011
#include <security/vboot/vboot_common.h>
@@ -235,6 +236,12 @@ void __weak variant_final(void)
235236
static void mainboard_final(void *chip_info)
236237
{
237238
variant_final();
239+
240+
/*
241+
* De-assert TBT force power to allow RTD3.
242+
* It is asserted by default in gpio tables.
243+
*/
244+
gpio_set(GPP_B21, 0);
238245
}
239246

240247
struct chip_operations mainboard_ops = {

src/mainboard/novacustom/mtl-h/variants/dgpu/gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static const struct pad_config gpio_table[] = {
234234
PAD_CFG_GPO(GPP_B18, 1, DEEP), /* GPIO - PCH_BT_EN */
235235
PAD_CFG_GPO(GPP_B19, 1, DEEP), /* GPIO - WIFI_RF_EN */
236236
PAD_CFG_GPO(GPP_B20, 0, DEEP), /* GPIO */
237-
PAD_CFG_GPO(GPP_B21, 0, PLTRST), /* GPIO - TBT_FORCE_PWR */
237+
PAD_CFG_GPO(GPP_B21, 1, PLTRST), /* GPIO - TBT_FORCE_PWR */
238238
PAD_CFG_GPO(GPP_B22, 0, DEEP), /* GPIO */
239239
PAD_CFG_TERM_GPO(GPP_B23, 0, DN_20K, DEEP), /* GPIO */
240240
PAD_CFG_NF(GPP_ACI3C0_CLK_LPBK, NATIVE, DEEP, NF4), /* n/a */

0 commit comments

Comments
 (0)