-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mainboard/system76/gaze16: Add System76 Gazelle (gaze16)
Change-Id: Ifb90f9b73a10abf53a21738e2c466d539df9a37c Co-authored-by: Tim Crawford <[email protected]>
- Loading branch information
Showing
26 changed files
with
1,624 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
if BOARD_SYSTEM76_GAZE16_3050 || BOARD_SYSTEM76_GAZE16_3060 | ||
|
||
config BOARD_SPECIFIC_OPTIONS | ||
def_bool y | ||
select BOARD_ROMSIZE_KB_16384 | ||
select DRIVERS_I2C_HID | ||
select DRIVERS_SYSTEM76_DGPU | ||
select EC_SYSTEM76_EC | ||
select EC_SYSTEM76_EC_BAT_THRESHOLDS | ||
select EC_SYSTEM76_EC_COLOR_KEYBOARD | ||
select EC_SYSTEM76_EC_DGPU | ||
select HAVE_ACPI_RESUME | ||
select HAVE_ACPI_TABLES | ||
select HAVE_CMOS_DEFAULT | ||
select HAVE_OPTION_TABLE | ||
select INTEL_GMA_HAVE_VBT | ||
select INTEL_LPSS_UART_FOR_CONSOLE | ||
select MAINBOARD_HAS_LPC_TPM | ||
select MAINBOARD_HAS_TPM2 | ||
select NO_UART_ON_SUPERIO | ||
select SOC_INTEL_TIGERLAKE | ||
select SOC_INTEL_TIGERLAKE_PCH_H | ||
select SOC_INTEL_COMMON_BLOCK_HDA_VERB | ||
select SPD_READ_BY_WORD | ||
select SYSTEM_TYPE_LAPTOP | ||
select TPM_RDRESP_NEED_DELAY | ||
select USE_OPTION_TABLE | ||
|
||
config MAINBOARD_DIR | ||
string | ||
default "system76/gaze16" | ||
|
||
config MAINBOARD_PART_NUMBER | ||
string | ||
default "gaze16-3050" if BOARD_SYSTEM76_GAZE16_3050 | ||
default "gaze16-3060" if BOARD_SYSTEM76_GAZE16_3060 | ||
|
||
config MAINBOARD_SMBIOS_PRODUCT_NAME | ||
string | ||
default "Gazelle" | ||
|
||
config MAINBOARD_VERSION | ||
string | ||
default "gaze16-3050" if BOARD_SYSTEM76_GAZE16_3050 | ||
default "gaze16-3060" if BOARD_SYSTEM76_GAZE16_3060 | ||
|
||
config VARIANT_DIR | ||
string | ||
default "3050" if BOARD_SYSTEM76_GAZE16_3050 | ||
default "3060" if BOARD_SYSTEM76_GAZE16_3060 | ||
|
||
config OVERRIDE_DEVICETREE | ||
string | ||
default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb" | ||
|
||
config CBFS_SIZE | ||
hex | ||
default 0xA00000 | ||
|
||
config CONSOLE_POST | ||
bool | ||
default y | ||
|
||
config DIMM_MAX | ||
int | ||
default 4 # Hack to make soc code work | ||
|
||
config DIMM_SPD_SIZE | ||
int | ||
default 512 | ||
|
||
config DRIVERS_SYSTEM76_DGPU_DEVICE | ||
hex | ||
default 0x01 | ||
|
||
config MAX_CPUS | ||
int | ||
default 16 | ||
|
||
config ONBOARD_VGA_IS_PRIMARY | ||
bool | ||
default y | ||
|
||
config POST_DEVICE | ||
bool | ||
default n | ||
|
||
config UART_FOR_CONSOLE | ||
int | ||
default 2 | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
config BOARD_SYSTEM76_GAZE16_3050 | ||
bool "gaze16 3050" | ||
|
||
config BOARD_SYSTEM76_GAZE16_3060 | ||
bool "gaze16 3060" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## SPDX-License-Identifier: GPL-2.0-only | ||
|
||
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include | ||
|
||
bootblock-y += bootblock.c | ||
|
||
romstage-y += variants/$(VARIANT_DIR)/romstage.c | ||
|
||
ramstage-y += ramstage.c | ||
ramstage-y += variants/$(VARIANT_DIR)/ramstage.c | ||
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
#include <drivers/intel/gma/acpi/gma.asl> | ||
|
||
Scope (GFX0) { | ||
Name (BRIG, Package (22) { | ||
40, /* default AC */ | ||
40, /* default Battery */ | ||
5, | ||
10, | ||
15, | ||
20, | ||
25, | ||
30, | ||
35, | ||
40, | ||
45, | ||
50, | ||
55, | ||
60, | ||
65, | ||
70, | ||
75, | ||
80, | ||
85, | ||
90, | ||
95, | ||
100 | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
Scope (\_SB.PCI0.RP01) { | ||
Device (DEV0) { | ||
Name(_ADR, 0x00000000) | ||
|
||
OperationRegion (PCIC, PCI_Config, 0x00, 0x50) | ||
Field (PCIC, DwordAcc, NoLock, Preserve) { | ||
Offset (0x40), | ||
SSID, 32 | ||
} | ||
|
||
Name (_PR0, Package () { PWRR }) | ||
Name (_PR3, Package () { PWRR }) | ||
PowerResource (PWRR, 0, 0) { | ||
Name (_STA, 1) | ||
|
||
Method (_ON) { | ||
^^SSID = 0x50171558 | ||
Printf("GPU _ON %o", ToHexString(^^SSID)) | ||
_STA = 1 | ||
} | ||
|
||
Method (_OFF) { | ||
Printf("GPU _OFF %o", ToHexString(^^SSID)) | ||
_STA = 0 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
#include <variant/gpio.h> | ||
#include "dgpu.asl" | ||
|
||
#define EC_GPE_SCI 0x6E | ||
#define EC_GPE_SWI 0x6E | ||
#include <ec/system76/ec/acpi/ec.asl> | ||
|
||
Scope (\_SB) { | ||
#include "sleep.asl" | ||
Scope (PCI0) { | ||
#include "backlight.asl" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
#include <intelblocks/gpio.h> | ||
|
||
Method (PGPM, 1, Serialized) | ||
{ | ||
For (Local0 = 0, Local0 < 6, Local0++) | ||
{ | ||
\_SB.PCI0.CGPM (Local0, Arg0) | ||
} | ||
} | ||
|
||
/* | ||
* Method called from _PTS prior to system sleep state entry | ||
* Enables dynamic clock gating for all 5 GPIO communities | ||
*/ | ||
Method (MPTS, 1, Serialized) | ||
{ | ||
\_SB.PCI0.LPCB.EC0.PTS (Arg0) | ||
PGPM (MISCCFG_ENABLE_GPIO_PM_CONFIG) | ||
} | ||
|
||
/* | ||
* Method called from _WAK prior to system sleep state wakeup | ||
* Disables dynamic clock gating for all 5 GPIO communities | ||
*/ | ||
Method (MWAK, 1, Serialized) | ||
{ | ||
PGPM (0) | ||
\_SB.PCI0.LPCB.EC0.WAK (Arg0) | ||
} | ||
|
||
/* | ||
* S0ix Entry/Exit Notifications | ||
* Called from \_SB.PEPD._DSM | ||
*/ | ||
Method (MS0X, 1, Serialized) | ||
{ | ||
If (Arg0 == 1) { | ||
/* S0ix Entry */ | ||
PGPM (MISCCFG_ENABLE_GPIO_PM_CONFIG) | ||
} Else { | ||
/* S0ix Exit */ | ||
PGPM (0) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Vendor name: System76 | ||
Board name: gaze16 | ||
Category: laptop | ||
Release year: 2021 | ||
ROM package: SOIC-8 | ||
ROM protocol: SPI | ||
ROM socketed: n | ||
Flashrom support: y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
#include <bootblock_common.h> | ||
#include <gpio.h> | ||
#include <variant/gpio.h> | ||
#include <drivers/system76/dgpu/bootblock.c> | ||
|
||
void bootblock_mainboard_init(void) { | ||
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); | ||
dgpu_power_enable(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
boot_option=Fallback | ||
preserve_smmstore=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
|
||
entries | ||
|
||
0 384 r 0 reserved_memory | ||
|
||
# RTC_BOOT_BYTE (coreboot hardcoded) | ||
384 1 e 2 boot_option | ||
388 4 h 0 reboot_counter | ||
|
||
#395 4 e 3 debug_level | ||
408 1 h 1 preserve_smmstore | ||
984 16 h 0 check_sum | ||
|
||
enumerations | ||
|
||
1 0 Disable | ||
1 1 Enable | ||
|
||
2 0 Fallback | ||
2 1 Normal | ||
|
||
3 0 Emergency | ||
3 1 Alert | ||
3 2 Critical | ||
3 3 Error | ||
3 4 Warning | ||
3 5 Notice | ||
3 6 Info | ||
3 7 Debug | ||
3 8 Spew | ||
|
||
checksums | ||
|
||
checksum 392 983 984 |
Oops, something went wrong.