summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/system76/lemp10/Makefile.inc10
-rw-r--r--src/mainboard/system76/tgl-u/Kconfig (renamed from src/mainboard/system76/lemp10/Kconfig)16
-rw-r--r--src/mainboard/system76/tgl-u/Kconfig.name (renamed from src/mainboard/system76/lemp10/Kconfig.name)0
-rw-r--r--src/mainboard/system76/tgl-u/Makefile.inc12
-rw-r--r--src/mainboard/system76/tgl-u/acpi/mainboard.asl (renamed from src/mainboard/system76/lemp10/acpi/mainboard.asl)0
-rw-r--r--src/mainboard/system76/tgl-u/acpi/sleep.asl (renamed from src/mainboard/system76/lemp10/acpi/sleep.asl)0
-rw-r--r--src/mainboard/system76/tgl-u/board_info.txt (renamed from src/mainboard/system76/lemp10/board_info.txt)2
-rw-r--r--src/mainboard/system76/tgl-u/bootblock.c (renamed from src/mainboard/system76/lemp10/bootblock.c)0
-rw-r--r--src/mainboard/system76/tgl-u/cmos.default (renamed from src/mainboard/system76/lemp10/cmos.default)0
-rw-r--r--src/mainboard/system76/tgl-u/cmos.layout (renamed from src/mainboard/system76/lemp10/cmos.layout)0
-rw-r--r--src/mainboard/system76/tgl-u/devicetree.cb134
-rw-r--r--src/mainboard/system76/tgl-u/dsdt.asl (renamed from src/mainboard/system76/lemp10/dsdt.asl)0
-rw-r--r--src/mainboard/system76/tgl-u/include/mainboard/gpio.h (renamed from src/mainboard/system76/lemp10/include/mainboard/gpio.h)0
-rw-r--r--src/mainboard/system76/tgl-u/ramstage.c (renamed from src/mainboard/system76/lemp10/ramstage.c)0
-rw-r--r--src/mainboard/system76/tgl-u/spd/samsung-M471A1G44AB0-CWE.spd.hex (renamed from src/mainboard/system76/lemp10/spd/samsung-M471A1G44AB0-CWE.spd.hex)0
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/board_info.txt2
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/data.vbt (renamed from src/mainboard/system76/lemp10/data.vbt)bin8704 -> 8704 bytes
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/gpio.c (renamed from src/mainboard/system76/lemp10/gpio.c)0
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/gpio_early.c (renamed from src/mainboard/system76/lemp10/gpio_early.c)0
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/hda_verb.c (renamed from src/mainboard/system76/lemp10/hda_verb.c)0
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/overridetree.cb (renamed from src/mainboard/system76/lemp10/devicetree.cb)134
-rw-r--r--src/mainboard/system76/tgl-u/variants/lemp10/romstage.c (renamed from src/mainboard/system76/lemp10/romstage.c)0
22 files changed, 159 insertions, 151 deletions
diff --git a/src/mainboard/system76/lemp10/Makefile.inc b/src/mainboard/system76/lemp10/Makefile.inc
deleted file mode 100644
index c92ea5b939..0000000000
--- a/src/mainboard/system76/lemp10/Makefile.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
-
-bootblock-y += bootblock.c
-bootblock-y += gpio_early.c
-
-ramstage-y += ramstage.c
-ramstage-y += gpio.c
-ramstage-y += hda_verb.c
-
-SPD_SOURCES = samsung-M471A1G44AB0-CWE
diff --git a/src/mainboard/system76/lemp10/Kconfig b/src/mainboard/system76/tgl-u/Kconfig
index 8a43a4fee2..fdf7a5c6d3 100644
--- a/src/mainboard/system76/lemp10/Kconfig
+++ b/src/mainboard/system76/tgl-u/Kconfig
@@ -10,7 +10,7 @@ config BOARD_SPECIFIC_OPTIONS
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
- select HAVE_SPD_IN_CBFS
+ select HAVE_SPD_IN_CBFS if BOARD_SYSTEM76_LEMP10
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MEMORY_MAPPED_TPM
@@ -26,16 +26,22 @@ config BOARD_SPECIFIC_OPTIONS
select TPM_RDRESP_NEED_DELAY
config MAINBOARD_DIR
- default "system76/lemp10"
+ default "system76/tgl-u"
+
+config VARIANT_DIR
+ default "lemp10" if BOARD_SYSTEM76_LEMP10
+
+config OVERRIDE_DEVICETREE
+ default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
config MAINBOARD_PART_NUMBER
- default "lemp10"
+ default "lemp10" if BOARD_SYSTEM76_LEMP10
config MAINBOARD_SMBIOS_PRODUCT_NAME
- default "Lemur Pro"
+ default "Lemur Pro" if BOARD_SYSTEM76_LEMP10
config MAINBOARD_VERSION
- default "lemp10"
+ default "lemp10" if BOARD_SYSTEM76_LEMP10
config CBFS_SIZE
default 0xA00000
diff --git a/src/mainboard/system76/lemp10/Kconfig.name b/src/mainboard/system76/tgl-u/Kconfig.name
index 43aae91b99..43aae91b99 100644
--- a/src/mainboard/system76/lemp10/Kconfig.name
+++ b/src/mainboard/system76/tgl-u/Kconfig.name
diff --git a/src/mainboard/system76/tgl-u/Makefile.inc b/src/mainboard/system76/tgl-u/Makefile.inc
new file mode 100644
index 0000000000..8857a3bf66
--- /dev/null
+++ b/src/mainboard/system76/tgl-u/Makefile.inc
@@ -0,0 +1,12 @@
+CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
+
+bootblock-y += bootblock.c
+bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
+
+romstage-y += variants/$(VARIANT_DIR)/romstage.c
+
+ramstage-y += ramstage.c
+ramstage-y += variants/$(VARIANT_DIR)/gpio.c
+ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
+
+SPD_SOURCES = samsung-M471A1G44AB0-CWE
diff --git a/src/mainboard/system76/lemp10/acpi/mainboard.asl b/src/mainboard/system76/tgl-u/acpi/mainboard.asl
index 4675bc94b8..4675bc94b8 100644
--- a/src/mainboard/system76/lemp10/acpi/mainboard.asl
+++ b/src/mainboard/system76/tgl-u/acpi/mainboard.asl
diff --git a/src/mainboard/system76/lemp10/acpi/sleep.asl b/src/mainboard/system76/tgl-u/acpi/sleep.asl
index 83888f3e59..83888f3e59 100644
--- a/src/mainboard/system76/lemp10/acpi/sleep.asl
+++ b/src/mainboard/system76/tgl-u/acpi/sleep.asl
diff --git a/src/mainboard/system76/lemp10/board_info.txt b/src/mainboard/system76/tgl-u/board_info.txt
index 511458fec5..badfb66706 100644
--- a/src/mainboard/system76/lemp10/board_info.txt
+++ b/src/mainboard/system76/tgl-u/board_info.txt
@@ -1,7 +1,5 @@
Vendor name: System76
-Board name: lemp10
Category: laptop
-Release year: 2020
ROM package: SOIC-8
ROM protocol: SPI
ROM socketed: n
diff --git a/src/mainboard/system76/lemp10/bootblock.c b/src/mainboard/system76/tgl-u/bootblock.c
index ae416b4e77..ae416b4e77 100644
--- a/src/mainboard/system76/lemp10/bootblock.c
+++ b/src/mainboard/system76/tgl-u/bootblock.c
diff --git a/src/mainboard/system76/lemp10/cmos.default b/src/mainboard/system76/tgl-u/cmos.default
index 62715bc6ba..62715bc6ba 100644
--- a/src/mainboard/system76/lemp10/cmos.default
+++ b/src/mainboard/system76/tgl-u/cmos.default
diff --git a/src/mainboard/system76/lemp10/cmos.layout b/src/mainboard/system76/tgl-u/cmos.layout
index a53c3f4bba..a53c3f4bba 100644
--- a/src/mainboard/system76/lemp10/cmos.layout
+++ b/src/mainboard/system76/tgl-u/cmos.layout
diff --git a/src/mainboard/system76/tgl-u/devicetree.cb b/src/mainboard/system76/tgl-u/devicetree.cb
new file mode 100644
index 0000000000..9c91c17368
--- /dev/null
+++ b/src/mainboard/system76/tgl-u/devicetree.cb
@@ -0,0 +1,134 @@
+chip soc/intel/tigerlake
+ register "common_soc_config" = "{
+ // Touchpad I2C bus
+ .i2c[0] = {
+ .speed = I2C_SPEED_FAST,
+ .rise_time_ns = 80,
+ .fall_time_ns = 110,
+ },
+ }"
+
+# ACPI (soc/intel/tigerlake/acpi.c)
+ # Enable Enhanced Intel SpeedStep
+ register "eist_enable" = "1"
+
+ # Enable s0ix, required for TGL-U
+ register "s0ix_enable" = "1"
+
+# FSP Memory (soc/intel/tigerlake/romstage/fsp_params.c)
+ # Enable C6 DRAM
+ register "enable_c6dram" = "1"
+
+ # System Agent dynamic frequency support
+ register "SaGv" = "SaGv_Enabled"
+
+# FSP Silicon (soc/intel/tigerlake/fsp_params.c)
+ # Acoustic settings
+ register "AcousticNoiseMitigation" = "1"
+ register "SlowSlewRate" = "SLEW_FAST_8"
+ register "FastPkgCRampDisable" = "1"
+
+ # FIVR configuration
+ # Read EXT_RAIL_CONFIG to determine bitmaps
+ # sudo devmem2 0xfe0011b8
+ # 0x0
+ # Read EXT_V1P05_VR_CONFIG
+ # sudo devmem2 0xfe0011c0
+ # 0x1a42000
+ # Read EXT_VNN_VR_CONFIG0
+ # sudo devmem2 0xfe0011c4
+ # 0x1a42000
+ # TODO: v1p05 voltage and vnn icc max?
+ register "ext_fivr_settings" = "{
+ .configure_ext_fivr = 1,
+ .v1p05_enable_bitmap = 0,
+ .vnn_enable_bitmap = 0,
+ .v1p05_supported_voltage_bitmap = 0,
+ .vnn_supported_voltage_bitmap = 0,
+ .v1p05_icc_max_ma = 500,
+ .vnn_sx_voltage_mv = 1050,
+ }"
+
+ # Read LPM_EN, make sure to invert the bits
+ register "LpmStateDisableMask" = "
+ LPM_S0i2_1 |
+ LPM_S0i2_2 |
+ LPM_S0i3_1 |
+ LPM_S0i3_2 |
+ LPM_S0i3_3 |
+ LPM_S0i3_4
+ "
+
+ # Thermal
+ register "tcc_offset" = "12"
+
+ # Enable CNVi BT
+ register "CnviBtCore" = "true"
+
+# Actual device tree
+ device cpu_cluster 0 on
+ device lapic 0 on end
+ end
+
+ device domain 0 on
+ device ref system_agent on end
+ device ref igpu on
+ # DDIA is eDP
+ register "DdiPortAConfig" = "DDI_PORT_CFG_EDP"
+ register "DdiPortAHpd" = "1"
+ register "DdiPortADdc" = "0"
+
+ # DDIB is HDMI
+ register "DdiPortBConfig" = "DDI_PORT_CFG_NO_LFP"
+ register "DdiPortBHpd" = "1"
+ register "DdiPortBDdc" = "1"
+
+ register "gfx" = "GMA_DEFAULT_PANEL(0)"
+ end
+ device ref dptf on end
+ device ref tbt_pcie_rp0 on end
+ device ref gna on end
+ device ref shared_ram on end
+ device ref cnvi_wifi on
+ chip drivers/wifi/generic
+ register "wake" = "GPE0_PME_B0"
+ device generic 0 on end
+ end
+ end
+ device ref i2c0 on
+ # Touchpad I2C bus
+ register "SerialIoI2cMode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
+ chip drivers/i2c/hid
+ register "generic.hid" = ""ELAN0412""
+ register "generic.desc" = ""ELAN Touchpad""
+ register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_B3)"
+ register "generic.probed" = "1"
+ register "hid_desc_reg_offset" = "0x01"
+ device i2c 15 on end
+ end
+ end
+ device ref i2c1 on
+ # TODO: USB-PD?
+ register "SerialIoI2cMode[PchSerialIoIndexI2C1]" = "PchSerialIoPci"
+ end
+ device ref heci1 on end
+ device ref uart2 on
+ # Debug console
+ register "SerialIoUartMode[PchSerialIoIndexUART2]" = "PchSerialIoSkipInit"
+ end
+ device ref pch_espi on
+ register "gen1_dec" = "0x00040069"
+ register "gen2_dec" = "0x00fc0E01"
+ register "gen3_dec" = "0x00fc0F01"
+ chip drivers/pc80/tpm
+ device pnp 0c31.0 on end
+ end
+ end
+ device ref p2sb on end
+ device ref hda on
+ register "PchHdaAudioLinkHdaEnable" = "1"
+ end
+ device ref smbus on end
+ device ref fast_spi on end
+ end
+end
diff --git a/src/mainboard/system76/lemp10/dsdt.asl b/src/mainboard/system76/tgl-u/dsdt.asl
index fb40a5d67f..fb40a5d67f 100644
--- a/src/mainboard/system76/lemp10/dsdt.asl
+++ b/src/mainboard/system76/tgl-u/dsdt.asl
diff --git a/src/mainboard/system76/lemp10/include/mainboard/gpio.h b/src/mainboard/system76/tgl-u/include/mainboard/gpio.h
index c6393beebb..c6393beebb 100644
--- a/src/mainboard/system76/lemp10/include/mainboard/gpio.h
+++ b/src/mainboard/system76/tgl-u/include/mainboard/gpio.h
diff --git a/src/mainboard/system76/lemp10/ramstage.c b/src/mainboard/system76/tgl-u/ramstage.c
index dd7e73c595..dd7e73c595 100644
--- a/src/mainboard/system76/lemp10/ramstage.c
+++ b/src/mainboard/system76/tgl-u/ramstage.c
diff --git a/src/mainboard/system76/lemp10/spd/samsung-M471A1G44AB0-CWE.spd.hex b/src/mainboard/system76/tgl-u/spd/samsung-M471A1G44AB0-CWE.spd.hex
index d07aee2572..d07aee2572 100644
--- a/src/mainboard/system76/lemp10/spd/samsung-M471A1G44AB0-CWE.spd.hex
+++ b/src/mainboard/system76/tgl-u/spd/samsung-M471A1G44AB0-CWE.spd.hex
diff --git a/src/mainboard/system76/tgl-u/variants/lemp10/board_info.txt b/src/mainboard/system76/tgl-u/variants/lemp10/board_info.txt
new file mode 100644
index 0000000000..abdde03ff4
--- /dev/null
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/board_info.txt
@@ -0,0 +1,2 @@
+Board name: lemp10
+Release year: 2020
diff --git a/src/mainboard/system76/lemp10/data.vbt b/src/mainboard/system76/tgl-u/variants/lemp10/data.vbt
index 7c29ceda62..7c29ceda62 100644
--- a/src/mainboard/system76/lemp10/data.vbt
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/data.vbt
Binary files differ
diff --git a/src/mainboard/system76/lemp10/gpio.c b/src/mainboard/system76/tgl-u/variants/lemp10/gpio.c
index cca2056450..cca2056450 100644
--- a/src/mainboard/system76/lemp10/gpio.c
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/gpio.c
diff --git a/src/mainboard/system76/lemp10/gpio_early.c b/src/mainboard/system76/tgl-u/variants/lemp10/gpio_early.c
index 80f37c6553..80f37c6553 100644
--- a/src/mainboard/system76/lemp10/gpio_early.c
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/gpio_early.c
diff --git a/src/mainboard/system76/lemp10/hda_verb.c b/src/mainboard/system76/tgl-u/variants/lemp10/hda_verb.c
index 1259ba10ff..1259ba10ff 100644
--- a/src/mainboard/system76/lemp10/hda_verb.c
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/hda_verb.c
diff --git a/src/mainboard/system76/lemp10/devicetree.cb b/src/mainboard/system76/tgl-u/variants/lemp10/overridetree.cb
index 4e57fedd18..3be5b5ceab 100644
--- a/src/mainboard/system76/lemp10/devicetree.cb
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/overridetree.cb
@@ -1,21 +1,4 @@
chip soc/intel/tigerlake
- register "common_soc_config" = "{
- // Touchpad I2C bus
- .i2c[0] = {
- .speed = I2C_SPEED_FAST,
- .rise_time_ns = 80,
- .fall_time_ns = 110,
- },
- }"
-
-# ACPI (soc/intel/tigerlake/acpi.c)
- # Enable Enhanced Intel SpeedStep
- register "eist_enable" = "1"
-
- # Enable s0ix, required for TGL-U
- register "s0ix_enable" = "1"
-
-# CPU (soc/intel/tigerlake/cpu.c)
# Power limits
register "power_limits_config[POWER_LIMITS_U_4_CORE]" = "{
.tdp_pl1_override = 20,
@@ -26,86 +9,14 @@ chip soc/intel/tigerlake
.tdp_pl2_override = 30,
}"
-# FSP Memory (soc/intel/tigerlake/romstage/fsp_params.c)
- # Enable C6 DRAM
- register "enable_c6dram" = "1"
-
- # System Agent dynamic frequency support
- register "SaGv" = "SaGv_Enabled"
-
-# FSP Silicon (soc/intel/tigerlake/fsp_params.c)
- # Acoustic settings
- register "AcousticNoiseMitigation" = "1"
- register "SlowSlewRate" = "SLEW_FAST_8"
- register "FastPkgCRampDisable" = "1"
-
- # FIVR configuration
- # Read EXT_RAIL_CONFIG to determine bitmaps
- # sudo devmem2 0xfe0011b8
- # 0x0
- # Read EXT_V1P05_VR_CONFIG
- # sudo devmem2 0xfe0011c0
- # 0x1a42000
- # Read EXT_VNN_VR_CONFIG0
- # sudo devmem2 0xfe0011c4
- # 0x1a42000
- # TODO: v1p05 voltage and vnn icc max?
- register "ext_fivr_settings" = "{
- .configure_ext_fivr = 1,
- .v1p05_enable_bitmap = 0,
- .vnn_enable_bitmap = 0,
- .v1p05_supported_voltage_bitmap = 0,
- .vnn_supported_voltage_bitmap = 0,
- .v1p05_icc_max_ma = 500,
- .vnn_sx_voltage_mv = 1050,
- }"
-
- # Read LPM_EN, make sure to invert the bits
- register "LpmStateDisableMask" = "
- LPM_S0i2_1 |
- LPM_S0i2_2 |
- LPM_S0i3_1 |
- LPM_S0i3_2 |
- LPM_S0i3_3 |
- LPM_S0i3_4
- "
-
- # Thermal
- register "tcc_offset" = "12"
-
- # Enable CNVi BT
- register "CnviBtCore" = "true"
-
-# PM Util (soc/intel/tigerlake/pmutil.c)
# GPE configuration
register "pmc_gpe0_dw0" = "PMC_GPP_R"
register "pmc_gpe0_dw1" = "PMC_GPP_B"
register "pmc_gpe0_dw2" = "PMC_GPP_D"
-# Actual device tree
- device cpu_cluster 0 on
- device lapic 0 on end
- end
-
device domain 0 on
subsystemid 0x1558 0x14a1 inherit
- # From CPU EDS(575683)
- device ref system_agent on end
- device ref igpu on
- # DDIA is eDP
- register "DdiPortAConfig" = "DDI_PORT_CFG_EDP"
- register "DdiPortAHpd" = "1"
- register "DdiPortADdc" = "0"
-
- # DDIB is HDMI
- register "DdiPortBConfig" = "DDI_PORT_CFG_NO_LFP"
- register "DdiPortBHpd" = "1"
- register "DdiPortBDdc" = "1"
-
- register "gfx" = "GMA_DEFAULT_PANEL(0)"
- end
- device ref dptf on end
device ref peg on
# PCIe PEG0 x4, Clock 3 (SSD1)
# Despite the name, SSD2_CLKREQ# is used for SSD1
@@ -118,8 +29,6 @@ chip soc/intel/tigerlake
device generic 0 on end
end
end
- device ref tbt_pcie_rp0 on end # J_TYPEC1
- device ref gna on end
device ref north_xhci on # J_TYPEC1
register "UsbTcPortEn" = "1"
register "TcssXhciEn" = "1"
@@ -142,7 +51,6 @@ chip soc/intel/tigerlake
end
end
- # From PCH EDS(576591)
device ref south_xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # J_USB3_1
@@ -199,34 +107,6 @@ chip soc/intel/tigerlake
end
end
end
- device ref shared_ram on end
- device ref cnvi_wifi on
- chip drivers/wifi/generic
- register "wake" = "GPE0_PME_B0"
- device generic 0 on end
- end
- end
- device ref i2c0 on
- # Touchpad I2C bus
- register "SerialIoI2cMode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
- chip drivers/i2c/hid
- register "generic.hid" = ""ELAN0412""
- register "generic.desc" = ""ELAN Touchpad""
- register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_B3)"
- register "generic.probed" = "1"
- register "hid_desc_reg_offset" = "0x01"
- device i2c 15 on end
- end
- end
- device ref i2c1 on
- # TODO: USB-PD?
- register "SerialIoI2cMode[PchSerialIoIndexI2C1]" = "PchSerialIoPci"
- end
- device ref heci1 on end
- device ref uart2 on
- # Debug console
- register "SerialIoUartMode[PchSerialIoIndexUART2]" = "PchSerialIoSkipInit"
- end
device ref sata on
# SATA1 (SSD2)
register "SataPortsEnable[1]" = "1"
@@ -264,15 +144,6 @@ chip soc/intel/tigerlake
device generic 0 on end
end
end
- device ref pch_espi on
- register "gen1_dec" = "0x00040069"
- register "gen2_dec" = "0x00fc0E01"
- register "gen3_dec" = "0x00fc0F01"
- chip drivers/pc80/tpm
- device pnp 0c31.0 on end
- end
- end
- device ref p2sb on end
device ref pmc hidden
# The pmc_mux chip driver is a placeholder for the
# PMC.MUX device in the ACPI hierarchy.
@@ -288,10 +159,5 @@ chip soc/intel/tigerlake
end
end
end
- device ref hda on
- register "PchHdaAudioLinkHdaEnable" = "1"
- end
- device ref smbus on end
- device ref fast_spi on end
end
end
diff --git a/src/mainboard/system76/lemp10/romstage.c b/src/mainboard/system76/tgl-u/variants/lemp10/romstage.c
index 749efe668f..749efe668f 100644
--- a/src/mainboard/system76/lemp10/romstage.c
+++ b/src/mainboard/system76/tgl-u/variants/lemp10/romstage.c