mb/system76: Enable dGPUs
Change-Id: Ie33240ee61f9634202af6fb65a1f8819ae213a3b
This commit is contained in:
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_ADDW1 || BOARD_SYSTEM76_ADDW2
|
|||||||
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_GFX_NVIDIA
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select DRIVERS_I2C_TAS5825M
|
select DRIVERS_I2C_TAS5825M
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
|
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
|
||||||
|
|
||||||
bootblock-y += bootblock.c
|
bootblock-y += bootblock.c
|
||||||
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
|
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
|
||||||
|
@@ -1,11 +1,19 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x03 /* GPP_K3 */
|
#define EC_GPE_SCI 0x03 /* GPP_K3 */
|
||||||
#define EC_GPE_SWI 0x06 /* GPP_K6 */
|
#define EC_GPE_SWI 0x06 /* GPP_K6 */
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
|
|
||||||
Scope (\_SB) {
|
Scope (\_SB) {
|
||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
|
Scope (PCI0) {
|
||||||
|
Device (PEGP) {
|
||||||
|
Name (_ADR, CONFIG_DRIVERS_GFX_NVIDIA_BRIDGE << 16)
|
||||||
|
#include <drivers/gfx/nvidia/acpi/coffeelake.asl>
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Scope (\_GPE) {
|
Scope (\_GPE) {
|
||||||
|
@@ -58,6 +58,12 @@ chip soc/intel/cannonlake
|
|||||||
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
||||||
register "PcieClkSrcUsage[8]" = "0x40"
|
register "PcieClkSrcUsage[8]" = "0x40"
|
||||||
register "PcieClkSrcClkReq[8]" = "8"
|
register "PcieClkSrcClkReq[8]" = "8"
|
||||||
|
chip drivers/gfx/nvidia
|
||||||
|
device pci 00.0 on end # VGA controller
|
||||||
|
device pci 00.1 on end # Audio device
|
||||||
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
|
end
|
||||||
end
|
end
|
||||||
device pci 02.0 on end # Integrated Graphics Device
|
device pci 02.0 on end # Integrated Graphics Device
|
||||||
device pci 04.0 on # SA Thermal device
|
device pci 04.0 on # SA Thermal device
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
#include <soc/cnl_memcfg_init.h>
|
#include <soc/cnl_memcfg_init.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
static const struct cnl_mb_cfg memcfg = {
|
static const struct cnl_mb_cfg memcfg = {
|
||||||
.spd[0] = {
|
.spd[0] = {
|
||||||
@@ -20,6 +22,18 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
{
|
{
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
memupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
// Disable higher memory speeds
|
// Disable higher memory speeds
|
||||||
memupd->FspmConfig.SaOcSupport = 0;
|
memupd->FspmConfig.SaOcSupport = 0;
|
||||||
|
|
||||||
|
@@ -3,7 +3,16 @@
|
|||||||
#ifndef VARIANT_GPIO_H
|
#ifndef VARIANT_GPIO_H
|
||||||
#define VARIANT_GPIO_H
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_C12
|
||||||
|
#define DGPU_SSID 0x65d11558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
void variant_configure_early_gpios(void);
|
void variant_configure_early_gpios(void);
|
||||||
void variant_configure_gpios(void);
|
void variant_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
@@ -3,7 +3,16 @@
|
|||||||
#ifndef VARIANT_GPIO_H
|
#ifndef VARIANT_GPIO_H
|
||||||
#define VARIANT_GPIO_H
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_C12
|
||||||
|
#define DGPU_SSID 0x65e11558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
void variant_configure_early_gpios(void);
|
void variant_configure_early_gpios(void);
|
||||||
void variant_configure_gpios(void);
|
void variant_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_GAZE14 || BOARD_SYSTEM76_GAZE15
|
|||||||
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_GFX_NVIDIA
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
select EC_SYSTEM76_EC_COLOR_KEYBOARD
|
select EC_SYSTEM76_EC_COLOR_KEYBOARD
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
|
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
|
||||||
|
|
||||||
bootblock-y += bootblock.c
|
bootblock-y += bootblock.c
|
||||||
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
|
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x03 /* GPP_K3 */
|
#define EC_GPE_SCI 0x03 /* GPP_K3 */
|
||||||
#define EC_GPE_SWI 0x06 /* GPP_K6 */
|
#define EC_GPE_SWI 0x06 /* GPP_K6 */
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
@@ -8,6 +10,10 @@ Scope (\_SB) {
|
|||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
Scope (PCI0) {
|
Scope (PCI0) {
|
||||||
#include "backlight.asl"
|
#include "backlight.asl"
|
||||||
|
Device (PEGP) {
|
||||||
|
Name (_ADR, CONFIG_DRIVERS_GFX_NVIDIA_BRIDGE << 16)
|
||||||
|
#include <drivers/gfx/nvidia/acpi/coffeelake.asl>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -57,6 +57,12 @@ chip soc/intel/cannonlake
|
|||||||
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
||||||
register "PcieClkSrcUsage[8]" = "0x40"
|
register "PcieClkSrcUsage[8]" = "0x40"
|
||||||
register "PcieClkSrcClkReq[8]" = "8"
|
register "PcieClkSrcClkReq[8]" = "8"
|
||||||
|
chip drivers/gfx/nvidia
|
||||||
|
device pci 00.0 on end # VGA controller
|
||||||
|
device pci 00.1 on end # Audio device
|
||||||
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
|
end
|
||||||
end
|
end
|
||||||
device pci 02.0 on # Integrated Graphics Device
|
device pci 02.0 on # Integrated Graphics Device
|
||||||
register "gfx" = "GMA_DEFAULT_PANEL(0)"
|
register "gfx" = "GMA_DEFAULT_PANEL(0)"
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
#include <soc/cnl_memcfg_init.h>
|
#include <soc/cnl_memcfg_init.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
static const struct cnl_mb_cfg memcfg = {
|
static const struct cnl_mb_cfg memcfg = {
|
||||||
.spd[0] = {
|
.spd[0] = {
|
||||||
@@ -20,5 +22,17 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
{
|
{
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
memupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,16 @@
|
|||||||
#ifndef VARIANT_GPIO_H
|
#ifndef VARIANT_GPIO_H
|
||||||
#define VARIANT_GPIO_H
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_K21
|
||||||
|
#define DGPU_SSID 0x85501558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
void variant_configure_early_gpios(void);
|
void variant_configure_early_gpios(void);
|
||||||
void variant_configure_gpios(void);
|
void variant_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
@@ -0,0 +1,18 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef VARIANT_GPIO_H
|
||||||
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_K21
|
||||||
|
#define DGPU_SSID 0x85201558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
|
void variant_configure_early_gpios(void);
|
||||||
|
void variant_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@@ -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_GFX_NVIDIA
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
select EC_SYSTEM76_EC_COLOR_KEYBOARD
|
select EC_SYSTEM76_EC_COLOR_KEYBOARD
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x6E
|
#define EC_GPE_SCI 0x6E
|
||||||
#define EC_GPE_SWI 0x6B
|
#define EC_GPE_SWI 0x6B
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
@@ -8,5 +10,8 @@ Scope (\_SB) {
|
|||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
Scope (PCI0) {
|
Scope (PCI0) {
|
||||||
#include "backlight.asl"
|
#include "backlight.asl"
|
||||||
|
Scope (PEG1) {
|
||||||
|
#include <drivers/gfx/nvidia/acpi/tigerlake.asl>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,10 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
#include <fsp/util.h>
|
#include <fsp/util.h>
|
||||||
#include <soc/meminit.h>
|
#include <soc/meminit.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
#include <variant/gpio.h>
|
||||||
#include "variant.h"
|
#include "variant.h"
|
||||||
|
|
||||||
static const struct mb_cfg board_cfg = {
|
static const struct mb_cfg board_cfg = {
|
||||||
@@ -22,9 +24,21 @@ static const struct mem_spd spd_info = {
|
|||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *mupd)
|
void mainboard_memory_init_params(FSPM_UPD *mupd)
|
||||||
{
|
{
|
||||||
|
const bool half_populated = false;
|
||||||
|
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
variant_memory_init_params(mupd);
|
variant_memory_init_params(mupd);
|
||||||
|
|
||||||
const bool half_populated = false;
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
mupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
|
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
|
||||||
}
|
}
|
||||||
|
@@ -5,6 +5,13 @@
|
|||||||
|
|
||||||
#include <soc/gpio.h>
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F8
|
||||||
|
#define DGPU_PWR_EN GPP_F9
|
||||||
|
#define DGPU_GC6 GPP_K11
|
||||||
|
#define DGPU_SSID 0x50151558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
|
|
||||||
static const struct pad_config early_gpio_table[] = {
|
static const struct pad_config early_gpio_table[] = {
|
||||||
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), // UART2_RXD
|
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), // UART2_RXD
|
||||||
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), // UART2_TXD
|
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), // UART2_TXD
|
||||||
@@ -285,4 +292,6 @@ static const struct pad_config gpio_table[] = {
|
|||||||
PAD_CFG_GPI(GPP_S7, NONE, DEEP), // DMIC_DAT_PCH
|
PAD_CFG_GPI(GPP_S7, NONE, DEEP), // DMIC_DAT_PCH
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /* __ACPI__ */
|
||||||
|
|
||||||
#endif /* VARIANT_GPIO_H */
|
#endif /* VARIANT_GPIO_H */
|
||||||
|
@@ -6,15 +6,11 @@ chip soc/intel/tigerlake
|
|||||||
# PCIe PEG2 (remapped to PEG1 by FSP) x8, Clock 0 (DGPU)
|
# PCIe PEG2 (remapped to PEG1 by FSP) x8, Clock 0 (DGPU)
|
||||||
register "PcieClkSrcUsage[0]" = "0x42"
|
register "PcieClkSrcUsage[0]" = "0x42"
|
||||||
register "PcieClkSrcClkReq[0]" = "0"
|
register "PcieClkSrcClkReq[0]" = "0"
|
||||||
chip soc/intel/common/block/pcie/rtd3
|
chip drivers/gfx/nvidia
|
||||||
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F9)" # DGPU_PWR_EN
|
device pci 00.0 on end # VGA controller
|
||||||
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_F8)" # DGPU_RST#_PCH
|
device pci 00.1 on end # Audio device
|
||||||
register "enable_delay_ms" = "16"
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
register "enable_off_delay_ms" = "4"
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
register "reset_delay_ms" = "10"
|
|
||||||
register "reset_off_delay_ms" = "4"
|
|
||||||
register "srcclk_pin" = "0" # GFX_CLKREQ0#
|
|
||||||
device generic 0 on end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
device ref peg0 on
|
device ref peg0 on
|
||||||
|
@@ -5,6 +5,13 @@
|
|||||||
|
|
||||||
#include <soc/gpio.h>
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F8
|
||||||
|
#define DGPU_PWR_EN GPP_F9
|
||||||
|
#define DGPU_GC6 GPP_K11
|
||||||
|
#define DGPU_SSID 0x50e11558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
|
|
||||||
static const struct pad_config early_gpio_table[] = {
|
static const struct pad_config early_gpio_table[] = {
|
||||||
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), // UART2_RXD
|
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), // UART2_RXD
|
||||||
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), // UART2_TXD
|
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), // UART2_TXD
|
||||||
@@ -285,4 +292,6 @@ static const struct pad_config gpio_table[] = {
|
|||||||
PAD_CFG_GPI(GPP_S7, NONE, DEEP), // MIC_DATA_PCH
|
PAD_CFG_GPI(GPP_S7, NONE, DEEP), // MIC_DATA_PCH
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /* __ACPI__ */
|
||||||
|
|
||||||
#endif /* VARIANT_GPIO_H */
|
#endif /* VARIANT_GPIO_H */
|
||||||
|
@@ -6,15 +6,11 @@ chip soc/intel/tigerlake
|
|||||||
# PCIe PEG1 x16, Clock 9 (DGPU)
|
# PCIe PEG1 x16, Clock 9 (DGPU)
|
||||||
register "PcieClkSrcUsage[9]" = "0x41"
|
register "PcieClkSrcUsage[9]" = "0x41"
|
||||||
register "PcieClkSrcClkReq[9]" = "9"
|
register "PcieClkSrcClkReq[9]" = "9"
|
||||||
chip soc/intel/common/block/pcie/rtd3
|
chip drivers/gfx/nvidia
|
||||||
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F9)" # DGPU_PWR_EN
|
device pci 00.0 on end # VGA controller
|
||||||
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_F8)" # DGPU_RST#_PCH
|
device pci 00.1 on end # Audio device
|
||||||
register "enable_delay_ms" = "16"
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
register "enable_off_delay_ms" = "4"
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
register "reset_delay_ms" = "10"
|
|
||||||
register "reset_off_delay_ms" = "4"
|
|
||||||
register "srcclk_pin" = "9" # PEG_CLKREQ#
|
|
||||||
device generic 0 on end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
device ref peg0 on
|
device ref peg0 on
|
||||||
|
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_ORYP5
|
|||||||
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_GFX_NVIDIA
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select DRIVERS_I2C_TAS5825M
|
select DRIVERS_I2C_TAS5825M
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <mainboard/gpio.h>
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x17 /* GPP_B23 */
|
#define EC_GPE_SCI 0x17 /* GPP_B23 */
|
||||||
#define EC_GPE_SWI 0x26 /* GPP_G6 */
|
#define EC_GPE_SWI 0x26 /* GPP_G6 */
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
@@ -9,6 +11,10 @@ Scope (\_SB)
|
|||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
Scope (PCI0) {
|
Scope (PCI0) {
|
||||||
#include "backlight.asl"
|
#include "backlight.asl"
|
||||||
|
Device (PEGP) {
|
||||||
|
Name (_ADR, CONFIG_DRIVERS_GFX_NVIDIA_BRIDGE << 16)
|
||||||
|
#include <drivers/gfx/nvidia/acpi/coffeelake.asl>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,6 +65,12 @@ chip soc/intel/cannonlake
|
|||||||
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
||||||
register "PcieClkSrcUsage[8]" = "0x40"
|
register "PcieClkSrcUsage[8]" = "0x40"
|
||||||
register "PcieClkSrcClkReq[8]" = "8"
|
register "PcieClkSrcClkReq[8]" = "8"
|
||||||
|
chip drivers/gfx/nvidia
|
||||||
|
device pci 00.0 on end # VGA controller
|
||||||
|
device pci 00.1 on end # Audio device
|
||||||
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
|
end
|
||||||
end
|
end
|
||||||
device pci 02.0 on # Integrated Graphics Device
|
device pci 02.0 on # Integrated Graphics Device
|
||||||
register "gfx" = "GMA_DEFAULT_PANEL(0)"
|
register "gfx" = "GMA_DEFAULT_PANEL(0)"
|
||||||
|
@@ -3,7 +3,16 @@
|
|||||||
#ifndef MAINBOARD_GPIO_H
|
#ifndef MAINBOARD_GPIO_H
|
||||||
#define MAINBOARD_GPIO_H
|
#define MAINBOARD_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_C12
|
||||||
|
#define DGPU_SSID 0x95e61558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
void mainboard_configure_early_gpios(void);
|
void mainboard_configure_early_gpios(void);
|
||||||
void mainboard_configure_gpios(void);
|
void mainboard_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
|
#include <mainboard/gpio.h>
|
||||||
#include <soc/cnl_memcfg_init.h>
|
#include <soc/cnl_memcfg_init.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
|
||||||
@@ -20,6 +22,18 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
{
|
{
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
memupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
// Allow memory speeds higher than 2666 MT/s
|
// Allow memory speeds higher than 2666 MT/s
|
||||||
memupd->FspmConfig.SaOcSupport = 1;
|
memupd->FspmConfig.SaOcSupport = 1;
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_ORYP6 || BOARD_SYSTEM76_ORYP7
|
|||||||
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_GFX_NVIDIA
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select DRIVERS_I2C_TAS5825M
|
select DRIVERS_I2C_TAS5825M
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
|
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
|
||||||
|
|
||||||
bootblock-y += bootblock.c
|
bootblock-y += bootblock.c
|
||||||
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
|
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x03 /* GPP_K3 */
|
#define EC_GPE_SCI 0x03 /* GPP_K3 */
|
||||||
#define EC_GPE_SWI 0x06 /* GPP_K6 */
|
#define EC_GPE_SWI 0x06 /* GPP_K6 */
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
@@ -8,6 +10,10 @@ Scope (\_SB) {
|
|||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
Scope (PCI0) {
|
Scope (PCI0) {
|
||||||
#include "backlight.asl"
|
#include "backlight.asl"
|
||||||
|
Device (PEGP) {
|
||||||
|
Name (_ADR, CONFIG_DRIVERS_GFX_NVIDIA_BRIDGE << 16)
|
||||||
|
#include <drivers/gfx/nvidia/acpi/coffeelake.asl>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -62,6 +62,12 @@ chip soc/intel/cannonlake
|
|||||||
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
|
||||||
register "PcieClkSrcUsage[8]" = "0x40"
|
register "PcieClkSrcUsage[8]" = "0x40"
|
||||||
register "PcieClkSrcClkReq[8]" = "8"
|
register "PcieClkSrcClkReq[8]" = "8"
|
||||||
|
chip drivers/gfx/nvidia
|
||||||
|
device pci 00.0 on end # VGA controller
|
||||||
|
device pci 00.1 on end # Audio device
|
||||||
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
|
end
|
||||||
end
|
end
|
||||||
device pci 02.0 on # Integrated Graphics Device
|
device pci 02.0 on # Integrated Graphics Device
|
||||||
register "gfx" = "GMA_DEFAULT_PANEL(0)"
|
register "gfx" = "GMA_DEFAULT_PANEL(0)"
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
#include <soc/cnl_memcfg_init.h>
|
#include <soc/cnl_memcfg_init.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
#include <variant/gpio.h>
|
||||||
#include <variant/romstage.h>
|
#include <variant/romstage.h>
|
||||||
|
|
||||||
static const struct cnl_mb_cfg memcfg = {
|
static const struct cnl_mb_cfg memcfg = {
|
||||||
@@ -21,6 +23,18 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
{
|
{
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
memupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
variant_configure_fspm(memupd);
|
variant_configure_fspm(memupd);
|
||||||
|
|
||||||
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef VARIANT_GPIO_H
|
||||||
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_K21
|
||||||
|
#define DGPU_SSID 0x50d31558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
|
void variant_configure_early_gpios(void);
|
||||||
|
void variant_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@@ -0,0 +1,18 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef VARIANT_GPIO_H
|
||||||
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F22
|
||||||
|
#define DGPU_PWR_EN GPP_F23
|
||||||
|
#define DGPU_GC6 GPP_K21
|
||||||
|
#define DGPU_SSID 0x65e51558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
|
void variant_configure_early_gpios(void);
|
||||||
|
void variant_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@@ -0,0 +1,10 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef VARIANT_ROMSTAGE_H
|
||||||
|
#define VARIANT_ROMSTAGE_H
|
||||||
|
|
||||||
|
#include <fsp/soc_binding.h>
|
||||||
|
|
||||||
|
void variant_configure_fspm(FSPM_UPD *memupd);
|
||||||
|
|
||||||
|
#endif
|
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_ORYP8
|
|||||||
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_GFX_NVIDIA
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select DRIVERS_I2C_TAS5825M
|
select DRIVERS_I2C_TAS5825M
|
||||||
select EC_SYSTEM76_EC
|
select EC_SYSTEM76_EC
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <mainboard/gpio.h>
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x6E
|
#define EC_GPE_SCI 0x6E
|
||||||
#define EC_GPE_SWI 0x6B
|
#define EC_GPE_SWI 0x6B
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
@@ -8,5 +10,8 @@ Scope (\_SB) {
|
|||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
Scope (PCI0) {
|
Scope (PCI0) {
|
||||||
#include "backlight.asl"
|
#include "backlight.asl"
|
||||||
|
Scope (PEG1) {
|
||||||
|
#include <drivers/gfx/nvidia/acpi/tigerlake.asl>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -92,15 +92,11 @@ chip soc/intel/tigerlake
|
|||||||
# PCIe PEG1 x16, Clock 9 (DGPU)
|
# PCIe PEG1 x16, Clock 9 (DGPU)
|
||||||
register "PcieClkSrcUsage[9]" = "0x41"
|
register "PcieClkSrcUsage[9]" = "0x41"
|
||||||
register "PcieClkSrcClkReq[9]" = "9"
|
register "PcieClkSrcClkReq[9]" = "9"
|
||||||
chip soc/intel/common/block/pcie/rtd3
|
chip drivers/gfx/nvidia
|
||||||
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F9)" # DGPU_PWR_EN
|
device pci 00.0 on end # VGA controller
|
||||||
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_F8)" # DGPU_RST#_PCH
|
device pci 00.1 on end # Audio device
|
||||||
register "enable_delay_ms" = "16"
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
register "enable_off_delay_ms" = "4"
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
register "reset_delay_ms" = "10"
|
|
||||||
register "reset_off_delay_ms" = "4"
|
|
||||||
register "srcclk_pin" = "9" # PEG_CLKREQ#
|
|
||||||
device generic 0 on end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
device ref igpu on
|
device ref igpu on
|
||||||
|
@@ -3,7 +3,16 @@
|
|||||||
#ifndef MAINBOARD_GPIO_H
|
#ifndef MAINBOARD_GPIO_H
|
||||||
#define MAINBOARD_GPIO_H
|
#define MAINBOARD_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#define DGPU_RST_N GPP_F8
|
||||||
|
#define DGPU_PWR_EN GPP_F9
|
||||||
|
#define DGPU_GC6 GPP_K11
|
||||||
|
#define DGPU_SSID 0x65f11558
|
||||||
|
|
||||||
|
#ifndef __ACPI__
|
||||||
void mainboard_configure_early_gpios(void);
|
void mainboard_configure_early_gpios(void);
|
||||||
void mainboard_configure_gpios(void);
|
void mainboard_configure_gpios(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
|
#include <mainboard/gpio.h>
|
||||||
#include <fsp/util.h>
|
#include <fsp/util.h>
|
||||||
#include <soc/meminit.h>
|
#include <soc/meminit.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
@@ -23,6 +25,18 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
|||||||
{
|
{
|
||||||
const bool half_populated = false;
|
const bool half_populated = false;
|
||||||
|
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
mupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
// Enable M.2 PCIE 4.0 and PEG1
|
// Enable M.2 PCIE 4.0 and PEG1
|
||||||
mupd->FspmConfig.CpuPcieRpEnableMask = 0x3;
|
mupd->FspmConfig.CpuPcieRpEnableMask = 0x3;
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ if BOARD_SYSTEM76_DARP7 || BOARD_SYSTEM76_GALP5 || BOARD_SYSTEM76_LEMP10
|
|||||||
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_GFX_NVIDIA if BOARD_SYSTEM76_GALP5
|
||||||
select DRIVERS_I2C_HID
|
select DRIVERS_I2C_HID
|
||||||
select DRIVERS_INTEL_PMC
|
select DRIVERS_INTEL_PMC
|
||||||
select DRIVERS_INTEL_USB4_RETIMER
|
select DRIVERS_INTEL_USB4_RETIMER
|
||||||
@@ -69,4 +70,15 @@ config UART_FOR_CONSOLE
|
|||||||
config USE_PM_ACPI_TIMER
|
config USE_PM_ACPI_TIMER
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
# For galp5 with dGPU
|
||||||
|
if DRIVERS_GFX_NVIDIA
|
||||||
|
|
||||||
|
config ONBOARD_VGA_IS_PRIMARY
|
||||||
|
default y
|
||||||
|
|
||||||
|
config DRIVERS_GFX_NVIDIA_BRIDGE
|
||||||
|
default 0x1c
|
||||||
|
|
||||||
|
endif # DRIVERS_GFX_NVIDIA
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#if CONFIG(BOARD_SYSTEM76_GALP5)
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define EC_GPE_SCI 0x6E
|
#define EC_GPE_SCI 0x6E
|
||||||
#define EC_GPE_SWI 0x6B
|
#define EC_GPE_SWI 0x6B
|
||||||
#include <ec/system76/ec/acpi/ec.asl>
|
#include <ec/system76/ec/acpi/ec.asl>
|
||||||
@@ -8,5 +12,10 @@ Scope (\_SB) {
|
|||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
Scope (PCI0) {
|
Scope (PCI0) {
|
||||||
#include "backlight.asl"
|
#include "backlight.asl"
|
||||||
|
#if CONFIG(BOARD_SYSTEM76_GALP5)
|
||||||
|
Scope (RP01) { // Remapped from RP05
|
||||||
|
#include <drivers/gfx/nvidia/acpi/tigerlake.asl>
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -143,15 +143,11 @@ chip soc/intel/tigerlake
|
|||||||
register "PcieRpLtrEnable[4]" = "1"
|
register "PcieRpLtrEnable[4]" = "1"
|
||||||
register "PcieClkSrcUsage[2]" = "4"
|
register "PcieClkSrcUsage[2]" = "4"
|
||||||
register "PcieClkSrcClkReq[2]" = "2"
|
register "PcieClkSrcClkReq[2]" = "2"
|
||||||
chip soc/intel/common/block/pcie/rtd3
|
chip drivers/gfx/nvidia
|
||||||
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_U5)" # DGPU_PWR_EN
|
device pci 00.0 on end # VGA controller
|
||||||
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_U4)" # DGPU_RST#_PCH
|
device pci 00.1 on end # Audio device
|
||||||
register "enable_delay_ms" = "16"
|
device pci 00.2 on end # USB xHCI Host controller
|
||||||
register "enable_off_delay_ms" = "4"
|
device pci 00.3 on end # USB Type-C UCSI controller
|
||||||
register "reset_delay_ms" = "10"
|
|
||||||
register "reset_off_delay_ms" = "4"
|
|
||||||
register "srcclk_pin" = "2" # PEG_CLKREQ#
|
|
||||||
device generic 0 on end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
device ref pcie_rp9 on
|
device ref pcie_rp9 on
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
#include <drivers/gfx/nvidia/gpu.h>
|
||||||
#include <fsp/util.h>
|
#include <fsp/util.h>
|
||||||
#include <soc/meminit.h>
|
#include <soc/meminit.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
@@ -18,5 +20,20 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
|
|||||||
};
|
};
|
||||||
const bool half_populated = false;
|
const bool half_populated = false;
|
||||||
|
|
||||||
|
const struct nvidia_gpu_config config = {
|
||||||
|
.power_gpio = DGPU_PWR_EN,
|
||||||
|
.reset_gpio = DGPU_RST_N,
|
||||||
|
.enable = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Enable dGPU power
|
||||||
|
nvidia_set_power(&config);
|
||||||
|
|
||||||
|
// Set primary display to internal graphics
|
||||||
|
mupd->FspmConfig.PrimaryDisplay = 0;
|
||||||
|
|
||||||
|
// Allow memory clocks higher than 2933 MHz
|
||||||
|
mupd->FspmConfig.SaOcSupport = 1;
|
||||||
|
|
||||||
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
|
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user