kbl-u: Sync some changes from whl-u

This commit is contained in:
Jeremy Soller 2020-06-04 08:56:09 -06:00
parent 5c6c34c32b
commit 37dc6de31d
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
20 changed files with 906 additions and 1160 deletions

View File

@ -2,27 +2,26 @@ if BOARD_SYSTEM76_GALP2 || BOARD_SYSTEM76_GALP3 || BOARD_SYSTEM76_GALP3_B
config BOARD_SPECIFIC_OPTIONS config BOARD_SPECIFIC_OPTIONS
def_bool y def_bool y
select ADD_FSP_BINARIES
select BOARD_ROMSIZE_KB_8192 select BOARD_ROMSIZE_KB_8192
select EC_ACPI select EC_ACPI
select EXCLUDE_EMMC_INTERFACE
select FSP_USE_REPO
select HAVE_ACPI_RESUME select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE select HAVE_OPTION_TABLE
select HAVE_SMI_HANDLER select HAVE_SMI_HANDLER
select INTEL_GMA_HAVE_VBT select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LPC_TPM select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM2 select MAINBOARD_HAS_TPM2
select MAINBOARD_USES_FSP2_0 select MAINBOARD_USES_FSP2_0
select NO_UART_ON_SUPERIO select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_HDA_VERB select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SOC_INTEL_KABYLAKE select SOC_INTEL_KABYLAKE
select SPD_READ_BY_WORD select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP select SYSTEM_TYPE_LAPTOP
select USE_BLOBS
select USE_OPTION_TABLE select USE_OPTION_TABLE
select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
Device (AC) Device (AC)
{ {

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
Device (BAT0) Device (BAT0)
{ {

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
Device (PWRB) Device (PWRB)
{ {

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
Device (EC0) Device (EC0)
{ {
@ -129,14 +116,18 @@ Device (EC0)
Method (_Q11, 0, NotSerialized) // Brightness Down Method (_Q11, 0, NotSerialized) // Brightness Down
{ {
Debug = "EC: Brightness Down" Debug = "EC: Brightness Down"
if (^^^^HIDD.HRDY) {
^^^^HIDD.HPEM (20) ^^^^HIDD.HPEM (20)
} }
}
Method (_Q12, 0, NotSerialized) // Brightness Up Method (_Q12, 0, NotSerialized) // Brightness Up
{ {
Debug = "EC: Brightness Up" Debug = "EC: Brightness Up"
if (^^^^HIDD.HRDY) {
^^^^HIDD.HPEM (19) ^^^^HIDD.HPEM (19)
} }
}
Method (_Q13, 0, NotSerialized) // Camera Toggle Method (_Q13, 0, NotSerialized) // Camera Toggle
{ {
@ -146,10 +137,10 @@ Device (EC0)
Method (_Q14, 0, NotSerialized) // Airplane Mode Method (_Q14, 0, NotSerialized) // Airplane Mode
{ {
Debug = "EC: Airplane Mode" Debug = "EC: Airplane Mode"
// Only send HIDD message when hardware airplane mode not in use if (^^^^HIDD.HRDY) {
If (ECOS == 2) {
^^^^HIDD.HPEM (8) ^^^^HIDD.HPEM (8)
} }
// TODO: hardware airplane mode
} }
Method (_Q15, 0, NotSerialized) // Suspend Button Method (_Q15, 0, NotSerialized) // Suspend Button

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF) OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
Field (ERAM, ByteAcc, Lock, Preserve) Field (ERAM, ByteAcc, Lock, Preserve)

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// GPP_C19 SCI // GPP_C19 SCI
Method (_L13, 0, Serialized) { Method (_L13, 0, Serialized) {

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
Device (HIDD) Device (HIDD)
{ {

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
Device (LID0) Device (LID0)
{ {

View File

@ -1,19 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#define COLOR_KEYBOARD 0
Scope (\_SB) { Scope (\_SB) {
#include "ac.asl" #include "ac.asl"

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
// Notifications: // Notifications:
// 0x80 - hardware backlight toggle // 0x80 - hardware backlight toggle
@ -27,9 +14,6 @@ Device (S76D) {
Debug = "S76D: RSET" Debug = "S76D: RSET"
SAPL(0) SAPL(0)
SKBL(0) SKBL(0)
#if COLOR_KEYBOARD
SKBC(0xFFFFFF)
#endif
} }
Method (INIT, 0, Serialized) { Method (INIT, 0, Serialized) {
@ -77,32 +61,6 @@ Device (S76D) {
} }
} }
#if COLOR_KEYBOARD
// Set KB LED Brightness
Method (SKBL, 1, Serialized) {
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 6
^^PCI0.LPCB.EC0.FBUF = Arg0
^^PCI0.LPCB.EC0.FBF1 = 0
^^PCI0.LPCB.EC0.FBF2 = Arg0
^^PCI0.LPCB.EC0.FCMD = 0xCA
}
}
// Set Keyboard Color
Method (SKBC, 1, Serialized) {
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 0x3
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
^^PCI0.LPCB.EC0.FCMD = 0xCA
Return (Arg0)
} Else {
Return (0)
}
}
#else
// Get KB LED // Get KB LED
Method (GKBL, 0, Serialized) { Method (GKBL, 0, Serialized) {
Local0 = 0 Local0 = 0
@ -123,5 +81,4 @@ Device (S76D) {
^^PCI0.LPCB.EC0.FCMD = 0xCA ^^PCI0.LPCB.EC0.FCMD = 0xCA
} }
} }
#endif
} }

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/* Method called from _PTS prior to enter sleep state */ /* Method called from _PTS prior to enter sleep state */
Method (MPTS, 1) { Method (MPTS, 1) {

View File

@ -1,16 +0,0 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2016 Google Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <drivers/pc80/pc/ps2_controller.asl>

View File

@ -1,22 +1,10 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <bootblock_common.h> #include <bootblock_common.h>
#include <gpio.h> #include <gpio.h>
#include "gpio.h" #include "gpio.h"
void bootblock_mainboard_init(void) { void bootblock_mainboard_init(void)
{
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
} }

View File

@ -1,19 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2007-2009 coresystems GmbH
* Copyright (C) 2015 Google Inc.
* Copyright (C) 2015 Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <acpi/acpi.h> #include <acpi/acpi.h>
DefinitionBlock( DefinitionBlock(

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*/
#ifndef MAINBOARD_GPIO_H #ifndef MAINBOARD_GPIO_H
#define MAINBOARD_GPIO_H #define MAINBOARD_GPIO_H

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <console/console.h> #include <console/console.h>
#include <device/device.h> #include <device/device.h>

View File

@ -1,17 +1,4 @@
/* /* SPDX-License-Identifier: GPL-2.0-only */
* This file is part of the coreboot project.
*
* Copyright (C) 2009 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>