Compare commits

...

5 Commits

Author SHA1 Message Date
Tim Crawford
705e7fd610 mb/system76/rpl: lemp12: Add timeouts for PCIE RPs
The FSP may fail to detect PCIe 4.0 devices in PCIe 3.0 slots on S3
resume.

Change-Id: Ib2efec2febc9f6c25b1dd8766fa08c560365325d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-02-20 11:05:25 -07:00
Tim Crawford
1cb13106c9 drivers/smmstore: Retry APM SCI if it fails
For some reason, the APM SCI to install the SMMSTORE comm buffer
regularly, but not always, fails with 0x4ed on ADL. In this case, a
second attempt seems to always complete successfully.

Tested on system76/darp8 and system76/galp6.

Change-Id: I843116113b8c24f1aee42f9d9042cdc0471a1b43
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-09-08 13:16:09 -04:00
Jeremy Soller
254e7dca82 soc/intel/alderlake: Hack to preserve SBREG
Change-Id: Ie70905d34a4050aeff4b5cda116eb700f19a18ea
2023-08-23 13:55:56 -06:00
Jeremy Soller
f989ae22c9 soc/intel/alderlake: Add RPL-S GPIO ACPI ID
Change-Id: Ib6432147a507efd7fa9514a1def446a1dff9848d
2023-08-23 13:55:56 -06:00
Jeremy Soller
58be66945f mb/system76/adl,rpl,tgl-h: Enable DRIVERS_GENERIC_BAYHUB_LV2 to fix LTR issue
Change-Id: I304bca81533a6d43e3c89f145d90a903dfafe0aa
2023-08-18 11:06:13 -06:00
7 changed files with 30 additions and 11 deletions

View File

@@ -57,18 +57,22 @@ static void init_store(void *unused)
printk(BIOS_INFO, "SMMSTORE: Setting up SMI handler\n"); printk(BIOS_INFO, "SMMSTORE: Setting up SMI handler\n");
/* Issue SMI using APM to update the com buffer and to lock the SMMSTORE */ for (int retries = 0; retries < 3; retries++) {
__asm__ __volatile__ ( /* Issue SMI using APM to update the com buffer and to lock the SMMSTORE */
"outb %%al, %%dx" __asm__ __volatile__ (
: "=a" (eax) "outb %%al, %%dx"
: "a" ((SMMSTORE_CMD_INIT << 8) | APM_CNT_SMMSTORE), : "=a" (eax)
"b" (ebx), : "a" ((SMMSTORE_CMD_INIT << 8) | APM_CNT_SMMSTORE),
"d" (APM_CNT) "b" (ebx),
: "memory"); "d" (APM_CNT)
: "memory");
if (eax != SMMSTORE_RET_SUCCESS) { if (eax == SMMSTORE_RET_SUCCESS) {
printk(BIOS_ERR, "SMMSTORE: Failed to install com buffer\n"); printk(BIOS_INFO, "SMMSTORE: Installed com buffer\n");
return; break;
}
printk(BIOS_ERR, "SMMSTORE: Failed to install com buffer: 0x%x\n", eax);
} }
} }

View File

@@ -1,6 +1,7 @@
config BOARD_SYSTEM76_ADL_COMMON config BOARD_SYSTEM76_ADL_COMMON
def_bool n def_bool n
select BOARD_ROMSIZE_KB_32768 select BOARD_ROMSIZE_KB_32768
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID select DRIVERS_I2C_HID

View File

@@ -1,6 +1,7 @@
config BOARD_SYSTEM76_RPL_COMMON config BOARD_SYSTEM76_RPL_COMMON
def_bool n def_bool n
select BOARD_ROMSIZE_KB_32768 select BOARD_ROMSIZE_KB_32768
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID select DRIVERS_I2C_HID

View File

@@ -77,6 +77,7 @@ chip soc/intel/alderlake
.clk_src = 1, .clk_src = 1,
.clk_req = 1, .clk_req = 1,
.flags = PCIE_RP_LTR, .flags = PCIE_RP_LTR,
.pcie_rp_detect_timeout_ms = 50,
}" }"
end end
end end

View File

@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_GAZE16_3050 || BOARD_SYSTEM76_GAZE16_3060 || BOARD_SYSTEM76_GA
config BOARD_SPECIFIC_OPTIONS config BOARD_SPECIFIC_OPTIONS
def_bool y def_bool y
select BOARD_ROMSIZE_KB_16384 select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA select DRIVERS_GFX_NVIDIA

View File

@@ -5,8 +5,13 @@
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S) #if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
#include <soc/gpio_defs_pch_s.h> #include <soc/gpio_defs_pch_s.h>
#if CONFIG(SOC_INTEL_RAPTORLAKE)
#define CROS_GPIO_NAME "INTC1085"
#define CROS_GPIO_DEVICE_NAME "INTC1085:00"
#else
#define CROS_GPIO_NAME "INTC1056" #define CROS_GPIO_NAME "INTC1056"
#define CROS_GPIO_DEVICE_NAME "INTC1056:00" #define CROS_GPIO_DEVICE_NAME "INTC1056:00"
#endif
#elif CONFIG(SOC_INTEL_ALDERLAKE_PCH_N) #elif CONFIG(SOC_INTEL_ALDERLAKE_PCH_N)
#include <soc/gpio_defs.h> #include <soc/gpio_defs.h>
#define CROS_GPIO_NAME "INTC1057" #define CROS_GPIO_NAME "INTC1057"

View File

@@ -20,8 +20,14 @@
#define PCH_TRACE_HUB_BASE_SIZE 0x00800000 #define PCH_TRACE_HUB_BASE_SIZE 0x00800000
#endif #endif
/* Hack to include SBREG in PCH_RESERVED region on ADL-S/RPL-S */
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
#define PCH_PRESERVED_BASE_ADDRESS 0xe0000000
#define PCH_PRESERVED_BASE_SIZE 0x1e800000
#else
#define PCH_PRESERVED_BASE_ADDRESS 0xfc800000 #define PCH_PRESERVED_BASE_ADDRESS 0xfc800000
#define PCH_PRESERVED_BASE_SIZE 0x02000000 #define PCH_PRESERVED_BASE_SIZE 0x02000000
#endif
#define UART_BASE_SIZE 0x1000 #define UART_BASE_SIZE 0x1000