Commit Graph

44772 Commits

Author SHA1 Message Date
Tim Wawrzynczak 277334e9f2 soc/intel/skylake: Switch to runtime generation of Intel Power Engine
The pep.asl file is being obsoleted by runtime generation, therefore
switch skylake boards to this method.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I7c7cb424278946a9767ea329d18fb03d4e57dce8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56014
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:58:23 +00:00
Tim Wawrzynczak 6c6eb652d5 soc/intel/common: Add Intel Power Engine support to discoverable PMC
In order to get rid of pep.asl, skylake also needs to support runtime
generation of the Intel Power Engine, therefore add this support to
devices that have a discoverable PMC as well.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I4bf0c4a338301b335fa78617e0f2ed5a9f4360ed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56013
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:58:08 +00:00
Tim Wawrzynczak 46c5f8f1d6 soc/intel/elkhartlake: Switch to runtime generation of Power Engine
The pep.asl file is being obsoleted by runtime generation, therefore
switch elkhartlake boards to this method.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I47f03b440729d4b37ae0abc84bd1d18c4e01657d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:57:43 +00:00
Tim Wawrzynczak 77b36abcf6 soc/intel/jasperlake: Switch to runtime generation of Intel Power Engine
The pep.asl file is being obsoleted by runtime generation, therefore
switch jasperlake boards to this method.

soc/intel/jasperlake: Switch to acpigen PEPD

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ib7f17f9b3b1396708ba68fa7a6d199d6e8b0ba11
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56011
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-09-10 21:57:35 +00:00
Tim Wawrzynczak 6d44437ec1 soc/intel/cannonlake: Switch to runtime generation of Intel Power Engine
The pep.asl file is being obsoleted by runtime generation, therefore
switch cannonlake boards to this method.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ic5343b0fd37eafac29a23846c8cfc3ca93d1821d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56010
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-09-10 21:57:20 +00:00
Tim Wawrzynczak bd5b4aa683 soc/intel/cannonlake: Switch PMC to use device callbacks
Now that the PMC device is marked as hidden in devicetrees, the device
callbacks can be used instead of BOOT_STATE_INIT_ENTRY callbacks.

Note that this moves PMC initialization from BS_DEV_INIT_CHIPS to
BS_DEV_ENUMERATE, which aligns with other Intel SoCs.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: If292728ad975ba803fed6abea879f6f634470a11
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:54:44 +00:00
Tim Wawrzynczak b7b5115360 cannonlake mainboards: Set PMC as hidden in devicetree
FSP-S hides the PMC from the PCI bus when it runs, but there are still
initialization steps coreboot programs for the PMC. Therefore, change
all of the cannonlake mainboards to set the PMC as hidden in the
devicetree, which means the device will be skipped during enumeration,
but device callbacks are still issued as if the device were enabled.

TEST=Ran full patch train on google/dratini, disassembled SSDT and the
PEPD device matches what is in pep.asl. Also verified via dmesg that the
INT33A1 device is still initialized by the kernel.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ib4a20ce9075ce7653388a5d3e281fe774bf89355
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56008
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2021-09-10 21:54:23 +00:00
Tim Wawrzynczak 72d94026ce soc/intel/tigerlake: Switch to runtime generation of Intel Power Engine
The pep.asl file is being obsoleted by runtime generation, therefore
switch tigerlake boards to this method.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I8e97c589273e934e89d69d8829680b9cac1ff9f5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56007
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:54:01 +00:00
Tim Wawrzynczak 90f9cbbfc4 soc/intel/tigerlake: Move LPM functions to new file
The LPM enable mask is useful to have in more than one place, therefore
more the get_disable_mask() function and its helpers to lpm.c

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ibe83dc106f5f37baf9d5c64f68c47d85ea4e6dd4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56460
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:53:48 +00:00
Tim Wawrzynczak 5faee2ed0f soc/intel/alderlake: Switch to runtime generation of Intel Power Engine
The pep.asl file is being obsoleted by runtime generation, therefore
switch alderlake boards to this method.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I617bc3d1c3cf4ac6b6cbbd790dcf62e731024834
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56006
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 21:53:32 +00:00
Tim Wawrzynczak 2eb100dd12 soc/intel/common/block/acpi: Add LPM requirements support to PEPD _DSM
This patch adds support for the S0ix UUID in the Intel Power Engine _DSM
method. This allows the ACPI tables to expose device/IP power states
requirements for different system low power states

BUG=b:185437326
TEST=Along with following patch on brya0 after resume from s0ix,
cat /sys/kernel/debug/pmc_core/substate_requirements
                       Element |    S0i2.0 |    S0i3.0 |    Status |
               USB2PLL_OFF_STS |  Required |  Required |       Yes |
   PCIe/USB3.1_Gen2PLL_OFF_STS |  Required |  Required |       Yes |
          PCIe_Gen3PLL_OFF_STS |  Required |  Required |       Yes |
               OPIOPLL_OFF_STS |  Required |  Required |       Yes |
                 OCPLL_OFF_STS |  Required |  Required |       Yes |
               MainPLL_OFF_STS |           |  Required |           |
               MIPIPLL_OFF_STS |  Required |  Required |       Yes |
         Fast_XTAL_Osc_OFF_STS |           |  Required |           |
           AC_Ring_Osc_OFF_STS |  Required |  Required |       Yes |
               SATAPLL_OFF_STS |  Required |  Required |       Yes |
          XTAL_USB2PLL_OFF_STS |           |  Required |       Yes |
                   CSME_PG_STS |  Required |  Required |       Yes |
                   SATA_PG_STS |  Required |  Required |       Yes |
                   xHCI_PG_STS |  Required |  Required |       Yes |
                  UFSX2_PG_STS |  Required |  Required |       Yes |
                    OTG_PG_STS |  Required |  Required |       Yes |
                    SPA_PG_STS |  Required |  Required |       Yes |
                    SPB_PG_STS |  Required |  Required |       Yes |
                    SPC_PG_STS |  Required |  Required |       Yes |
                   THC0_PG_STS |  Required |  Required |       Yes |
                   THC1_PG_STS |  Required |  Required |       Yes |
                 GBETSN_PG_STS |  Required |  Required |       Yes |
                    GBE_PG_STS |  Required |  Required |       Yes |
                   LPSS_PG_STS |  Required |  Required |       Yes |
                   ADSP_D3_STS |           |  Required |       Yes |
                  xHCI0_D3_STS |  Required |  Required |       Yes |
                  xDCI1_D3_STS |  Required |  Required |       Yes |
                     IS_D3_STS |  Required |  Required |       Yes |
                GBE_TSN_D3_STS |  Required |  Required |       Yes |
             CPU_C10_REQ_STS_0 |  Required |  Required |       Yes |
                CNVI_REQ_STS_6 |           |  Required |       Yes |
                 ISH_REQ_STS_7 |           |  Required |       Yes |
       MPHY_Core_DL_REQ_STS_16 |  Required |  Required |       Yes |
      Break-even_En_REQ_STS_17 |  Required |  Required |       Yes |
       Auto-demo_En_REQ_STS_18 |  Required |  Required |       Yes |
    Int_Timer_SS_Wake0_Pol_STS |  Required |  Required |           |
    Int_Timer_SS_Wake1_Pol_STS |  Required |  Required |           |
    Int_Timer_SS_Wake2_Pol_STS |  Required |  Required |           |
    Int_Timer_SS_Wake3_Pol_STS |  Required |  Required |           |
    Int_Timer_SS_Wake4_Pol_STS |  Required |  Required |           |
    Int_Timer_SS_Wake5_Pol_STS |  Required |  Required |           |

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I542290bd5490aa6580a5ae2b266da3d78bc17e6b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56005
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-10 20:56:54 +00:00
Felix Singer 593941b600 util/liveiso/console.nix: Remove unneeded argument body
Change-Id: Iebd994a46e870e42431d0fc71dd14b1c2b01f9aa
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57536
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-10 20:09:08 +00:00
Felix Singer 46e109f274 util/liveiso: Disable strict checking of access to MMIO memory
Change-Id: Ie859490d3cb3b8c56437cbd6c3e46525c580d3f4
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57535
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-10 20:09:02 +00:00
Tim Wawrzynczak 64246480a6 soc/intel/common/block/acpi: Move pep.asl to acpigen
There is a use-case for generating the AML bytecode at runtime for the
Intel Power Engine device, which comes in a followup patch.

BUG=b:185437326
TEST=verified on google/brya and google/dratini by dumping SSDT and
verifying the PEPD device matches what was previously in the DSDT:
    Scope (\_SB.PCI0)
    {
        Device (PEPD)
        {
            Name (_HID, "INT33A1")
            Name (_CID, EisaId ("PNP0D80")
            Method (_DSM, 4, Serialized)
            {
                ToBuffer (Arg0, Local0)
                If ((Local0 == ToUUID ("c4eb40a0-6cd2-11e2-bcfd-0800200c9a66")))
                {
                    ToInteger (Arg2, Local1)
                    If ((Local1 == Zero))
                    {
                        Return (Buffer (One)
                        {
                             0x63
                        })
                    }
		    If ((Local1 == One))
                    {
                        Return (Package (0x01)
                        {
                            Package (0x03)
                            {
                                \NULL,
                                Zero,
                                Package (0x02)
                                {
                                    Zero,
                                    Package (0x02)
                                    {
                                        0xFF,
                                        Zero
                                    }
                                }
			   }
                       })
                    }
                    If ((Local1 == 0x02)){}
                    If ((Local1 == 0x03)){}
                    If ((Local1 == 0x04)){}
                    If ((Local1 == 0x05))
                    {
                        If (CondRefOf (\_SB.PCI0.LPCB.EC0.S0IX))
                        {
                            \_SB.PCI0.LPCB.EC0.S0IX (One)
                        }

                        If (CondRefOf (\_SB.MS0X))
                        {
                            \_SB.MS0X (One)
                        }

                        If (CondRefOf (\_SB.PCI0.EGPM))
                        {
                            \_SB.PCI0.EGPM ()
                        }
                    }

                    If ((Local1 == 0x06))
                    {
                        If (CondRefOf (\_SB.PCI0.LPCB.EC0.S0IX))
                        {
                            \_SB.PCI0.LPCB.EC0.S0IX (Zero)
                        }

                        If (CondRefOf (\_SB.MS0X))
                        {
                            \_SB.MS0X (Zero)
                        }

                        If (CondRefOf (\_SB.PCI0.RGPM))
                        {
                            \_SB.PCI0.RGPM ()
                        }
                    }

                    Return (Buffer (One)
                    {
                         0x00
                    })
                }

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ie83722e0ed5792e338fc5c39a57eef43b7464e3b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56004
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 19:39:42 +00:00
Tim Wawrzynczak d96f3a25b4 acpigen: Add ability to auto-generate _DSM Function 0
Since the value returned by _DSM function 0 for a given UUID is trivial
to calculate, add the ability to do so to the
acpigen_write_dsm() functions.

Change-Id: Id9be050442485b42202cf91649aa94e56f35032a
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56459
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 19:39:09 +00:00
Tim Wawrzynczak e2b8f30bee soc/intel/alderlake: Set LpmStateEnableMask UPD
Use the get_supported_lpm_states() function to set the respective FSP
UPD.

TEST=with patchtrain on brya0,
/sys/kernel/debug/pmc_core/substate_requirements shows only the
substates that are applicable to the design (S0i2.0, S0i3.0).

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I5bb8b3671e78c5f2706db2d3a21b25cf90a14275
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56458
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 19:38:46 +00:00
Tim Wawrzynczak 6cf79d9d14 soc/intel/alderlake: Add get_adl_cpu_type function
This function searches the known MCH device IDs for Alder Lake and
returns the appropriate enum value representing ADL-P, ADL-M, ADL-S, or
unknown.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I26354b340e0c5f15ba246c1cb831d7feaf62d2ee
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57151
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-09-10 19:36:07 +00:00
Hung-Te Lin 1fc92dee52 mb/google/asurada: enable MIPI_DSI_MODE_LINE_END to fix display issues
The ANX7625 needs explicit LINE_END to output proper
display data.

This patch is based on CB:51435 (commit b923931,
"mb/google/kukui: Add flag for MIPI_DSI_MODE_LINE_END ANX7625")

BUG=b:198558237
TEST=emerge-asurada coreboot
BRANCH=asurada

Change-Id: Id5666fa1bcf96002725509d7436ea1ff5febef93
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57486
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-10 13:24:24 +00:00
Hung-Te Lin 5e8af51d1e mb/google/asurada: power on panel after DSI is ready
Some bridge chips or panels require DSI signal output
before the DSI receiver is ready to work.

This patch is based on CB:47380 (commit b32e4d6,
"mb/google/kukui: Add panel api after dsi start")

BUG=b:198558237
TEST=emerge-asurada coreboot
BRANCH=asurada

Change-Id: Id72560caee9352f88db2de7269b1472f56ac1bdf
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57485
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-10 13:24:10 +00:00
Julius Werner 8202fc42d4 util/cbmem: Add -2/--2ndtolast option to print second-to-last boot log
On some platforms, runtime firmware crashes write logs to the CBMEM
console. For those, since a crash reboots the system, by the time we
have a chance to run `cbmem` again the boot where the crash happened
will be the one before the "last" (current) boot. So cbmem -1 doesn't
show the interesting part, and cbmem -c potentially shows a lot that is
cumbersome to dig through. This patch introduces a new option cbmem -2
to explicitly show only the boot cycle before the last one.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I6725698f4c9ae07011cbacf0928544cebb4ad6f8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57510
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2021-09-09 23:05:03 +00:00
Karthikeyan Ramasubramanian 2c59a3884d Revert "soc/amd/common: Skip psp_verstage on S0i3 resume"
This reverts commit b90e6fdd25. Latest
releases of PSP does not load PSP verstage on S0i3 resume. Hence no need
to skip PSP verstage on S0i3 resume.

BUG=b:196400450
TEST=Build and boot to OS in Guybrush. Trigger a suspend/resume cycle
and then a reboot and ensure that the system boots to OS.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: Iaeb92edb69662e6c06f4d0e3d7b760d4597bf650
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-09-09 20:41:31 +00:00
Kevin Chiu 36aab93072 mb/google/guybrush/var/nipperkin: Add ELAN TS support
ELAN TS: eKT3644

BUG=b:194961444
TEST=emerge-guybrush coreboot chromeos-bootimage
     TS is functional

Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Change-Id: Id1601efbbe419bb28233a2678fdde005a55da671
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57482
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-09-09 20:41:20 +00:00
Stanley Wu 5140dd263b mb/google/dedede/var/gooey: Add fw_config probe for ALC5682-VD & VS
ALC5682-VD/ALC5682-VS load different kernel driver by different hid
name. Update hid name depending on the AUDIO_CODEC_SOURCE field of
fw_config. Define SSFC bit 9-11 in coreboot for codec within ec.

ALC5682-VD: _HID = "10EC5682"
ALC5682I-VS: _HID = "RTL5682"

BUG=b:193694180
TEST=ALC5682-VD/ALC5682-VS audio codec can work

Signed-off-by: Stanley Wu <stanley1.wu@lcfc.corp-partner.google.com>
Change-Id: Ib458cf47909a2d7a65f086c5f30f85a16f78d589
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57367
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-09-09 20:40:37 +00:00
Felix Held f4e6466924 soc/amd/cezanne/include/gpio: add remote GPIO pin mux definitions
Add the pin definitions for the remote GPIOs and the GPIO pin mux values
for the GPIO mode of those pins. For now, accessing the remote GPIOs is
only supported from the native coreboot code running on the x86 cores
and not from verstage on PSP or ACPI.

BUG=b:194524995
TEST=On Majolica with a Cezanne APU configuring GPIO 262 as output and
then toggling that GPIO in an infinite loop in the mainboard's bootblock
code results in GPIO 262 toggling as expected.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0e57042e74da88503b36d6065e9500876287f8bb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56811
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-09-09 17:49:48 +00:00
Felix Held 7110235902 soc/amd/common/block/acpi/gpio: add warning for remote GPIO usage
Right now the ACPI code doesn't support accessing the remote GPIO block
yet, so don't generate invalid remote GPIO access functions and warn
about those being unsupported.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id364a59c9650bf4e3633b494b01ab23c0bbc50b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56817
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
2021-09-09 17:49:23 +00:00
Felix Held b4fe8c5948 soc/amd/common/block/gpio_banks: add remote GPIO support
Some AMD SoCs have a 5th GPIO bank, the remote GPIO bank, which isn't
located right after the 4th GPIO bank, but instead at a different
location inside the APCIMMIO region. A difference to the first 4 GPIO
banks is that the corresponding GPIO MUX registers aren't in a separate
bank, but at the end of the remote GPIO region. So this remote GPIO
region only supports 48 GPIOs with a 32 bit configuration register each
and has the 8 bit GPIO MUX registers beginning at offset 0xc0 in the
remote GPIO region.

For now using the remote GPIOs from verstage on PSP isn't supported. To
support this, it would need to map acpimmio_remote_gpio and update the
pointer like it already does for acpimmio_gpio0, acpimmio_iomux and a
few others.

BUG=b:194524995

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic8d7ff677a99381a5558782b80b0c4cae67602db
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56810
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-09-09 17:49:11 +00:00
Sugnan Prabhu S 627c8443a3 wifi: Update deny list entry size to uint16_t
As per the connectivity document deny list entry size should be uint16
559910_Intel_Connectivity_Platforms_BIOS_Guidelines_Rev6_4.pdf

Fixes: cc50770cd0("wifi: Add support for wifi time average SAR config")
Change-Id: I045c21350cf4c2266df108eede6350d090322ba0
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-09 15:01:35 +00:00
David Wu 7181cd28f2 mb/google/brya/variants/kano: Update GPIOs config for kano
Update the GPIO configuration to match the latest schematic.

BUG=b:192370253
BRANCH=None
TEST=FW_NAME=kano emerge-brya coreboot

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I96be95a127f42b005d97a3c02650af13419524a3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57438
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-09 15:00:41 +00:00
Malik_Hsu e42634b059 mb/google/brya/variants/primus: update for next build phase
According to the schematic diagram of version C14_MB_20210902A_SB,
modify the settings of GPIO and fw_config.

BUG=b:197700276
BRANCH=none
TEST=emerge-brya coreboot

Signed-off-by: Malik_Hsu <malik_hsu@wistron.corp-partner.google.com>
Change-Id: I14907faeb631193715b1e0e451e427fb79a68279
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-09 15:00:21 +00:00
Joey Peng fe2d0ec029 mb/google/brya/variants/taeko: Add initial fw config for taeko
According to config.star fw mask definition, add initial FW_CONFIG id.

BUG=b:194649740
TEST=FW_NAME=taeko emerge-brya coreboot chromeos-bootimage

Cq-Depend: chrome-internal:4072654
Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: Ifef750338d777b76e9710d6bca9a166120db6a0a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-09 15:00:08 +00:00
MAULIK V VAGHELA 84532dae14 soc/intel/alderlake: Change VBOOT_HASH_BLOCK_SIZE to 4 KiB
Default VBOOT_HASH_BLOCK_SIZE is 1 KiB and increasing it to 4 KiB
helps in improving overall boot time since it reduces hashing and
body loading time.

Increasing it over 4 KiB doesn't result in significant improvement,
thus keeping the value at 4 KiB as of now.

Timing data:
Note that before Data is with 1 KiB block size.
|------------------------------------------------------|
|        Stage        | Block Size | Before  |  After  |
|finished loading body|     4 KiB  | 205,187 | 189,947 |
|finished loading body|     8 KiB  | 205,187 | 188,708 |
|finished loading body|    16 KiB  | 205,187 | 188,085 |
|finished loading body|    32 KiB  | 205,187 | 187,793 |
|------------------------------------------------------|

BUG=b:188577893
BRANCH=None
TEST=Boot time for Brya improves by 20 - 25 msec

Change-Id: I9222761c7d58e4a370d3a41c651b6c169599d792
Signed-off-by: MAULIK V VAGHELA <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57141
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-09 14:46:46 +00:00
Ronak Kanabar 1f88a71aa8 soc/intel/alderlake: Enable Irms UPD for ADL
This change sets Irms config in FSP if TdcTimeWindow and TdcCurrentLimit
is set to non zero. It results VR TDC Input current to be treated as it
is root mean square.

This change also optimizes the check of TdcTimeWindow and TdcCurrentLimit
for TdcEnable UPD.

BRANCH=None
TEST=Build and boot brya with debug FSP and verify Irms UPD value
from logs

Change-Id: Ice5c775ef9560503109957a1ed994af1d287aafc
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56330
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2021-09-09 14:41:52 +00:00
Arthur Heymans 5eb5f863b5 mb/ocp: Remove superfluous FSP header CPP inclusion
This is already done in drivers/intel/fsp2_0/Makefile.inc.

Change-Id: Idfd15d0a9d2cb15e613881f80bb25c18bd7454bb
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57484
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-09-09 14:41:07 +00:00
Arthur Heymans c2d0a494a3 intel/xeon_sp/cpx: Hook up public microcode release
Change-Id: I7e575cb17e2004bd931f4fa1d05f17c4cdca29ba
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-09-09 14:40:37 +00:00
Angel Pons efebedd3fb sb/intel/lynxpoint: Drop `config_t` typedef
Tested with BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical.

Change-Id: I550198aae22fbe39f4b461332a10de82c78cd191
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57498
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-09 14:38:21 +00:00
Angel Pons e8c6586163 sb/intel/lynxpoint/fadt.c: Reuse length fields
Compute the bit width of FADT register blocks using their length in
bytes, which is readily available from a different field.

Change-Id: I4dafa3546714ae46946d6502598e4b945c2a77a0
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57494
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-09-09 14:38:00 +00:00
Angel Pons e9b71d91c2 soc/intel/broadwell: Set FADT `duty_offset` to 0
From ACPI specification, version 6.2 Errata A:

 A `duty_width` value of 0 indicates that processor duty cycle is not
 supported and the processor continuously runs at its base frequency.

Because Broadwell sets `duty_width` to 0, processor duty cycle is not
supported, and the value of `duty_offset` is ignored. For consistency
with Lynx Point, set `duty_offset` to 0.

Change-Id: I68cb85ec32a6cceda0cea29d76df6c6219b78a40
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57493
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-09-09 14:37:42 +00:00
Felix Held 467eb569c0 soc/amd/common/block/acpimmio: add remote GPIO bank ACPIMMIO region
Currently coreboot for the AMD SOCs only supports accessing the up to 4
main GPIO banks of up to 64 GPIOs each. Some AMD SoCs including Cezanne
have another GPIO bank in the ACPIMMIO region that can contain up to 48
GPIOs beginning with GPIO 256 which is called the remote GPIO bank. The
first 48 DWORDs of that ACPIMMIO bank are the 32 bit wide GPIO registers
and beginning at offset 0xc0 it has the corresponding 8 bit wide GPIO
MUX registers.

BUG=b:194524995

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ice4e3358de17ac2601621814978cdb70e6f2c926
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-09-09 14:20:55 +00:00
Felix Held 7bbde76014 soc/amd/common/block/include/i2c: introduce I2C_RESET_SCL_PIN macro
Add and use the I2C_RESET_SCL_PIN macro for populating the i2c_scl_pins
array that is used for the sb_reset_i2c_peripherals call to bring the
I2C buses into a defined state.

TEST=Timeless build results in identical image for Mandolin.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ifedc09d0bf745545fa0510df7d5037f02b9012a6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57479
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-09-09 14:20:35 +00:00
Angel Pons fd63e11f71 drivers/intel/fsp2_0: Retype loop variable from int to uint32_t
Retype loop variable `i` to `uint32_t` for consistency with the types of
the `number_of_phases` and `phase_index` struct fields and the parameter
of the `platform_fsp_multi_phase_init_cb()` function.

Change-Id: I82916f33c2dc5dab6a31111c9acba2a18a5cfb0b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57491
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-09 06:21:20 +00:00
Tyler Wang 8d8a98650b mb/google/dedede/var/magolor: Generate SPD ID for supported part
Add supported memory parts in mem_parts_used.txt, and generate
SPD id for this part.

MT53E512M32D1NP-046 WT:B

BUG=b:199032134
TEST=emerge-dedede coreboot

Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Change-Id: Ic9ccee7c0957119a69ee179854cf13d30db40621
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-09-08 22:02:15 +00:00
Dtrain Hsu 287a944d0b mb/google/dedede/var/cret: Update DPTF parameters
Update DPTF parameters from internal thermal team and Intel suggestion.

BUG=b:198249129
BRANCH=dedede
TEST=emerge-dedede coreboot

Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I25d3909144d6e38d7a6eb859d33585c319a84b04
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Paul Yang <paul.f.yang@intel.corp-partner.google.com>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-09-08 22:01:27 +00:00
John Zhao 8557613617 soc/intel/common: Avoid NULL pointer deference
Coverity detects dereference pointers req and res that are NULL when
calling the pmc_send_ipc_cmd function. This change prevents NULL
pointers dereference.

Found-by: Coverity CID 1458068, 1458070, 1458971, 1458073, 1458075,
1458076
TEST=None

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ib88fa5f44dd33ad1ad2e763d79438b5c5b78acb4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56124
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-08 22:01:11 +00:00
Julian Schroeder 4671983401 soc/amd/cezanne/fsp_m_params: set usb_phy version and length.
Setting the usb_phy version and length in the soc code instead of devicetree.
That way the devicetree code does not have to reapeat it for different
AMD Cezanne based systems.

Tested on guybrush by changing phy settings in devicetree and then checking
the usb phy register.

Signed-off-by: Julian Schroeder <julianmarcusschroeder@gmail.com>
Change-Id: I2db49e095672054b9b15042fb003a93b67e3a4c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57478
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-09-08 20:45:33 +00:00
Julian Schroeder f4a992cca7 mb/google/guybrush/variants/baseboard/devicetree: update usb_phy version
The AMD Cezanne FSP expects a usb phy config structure ID of 0xd 0x6.
If the ID does not match, the FSP USB will not set up the phy.

Tested on guybrush by changing phy settings in devicetree and then checking
the usb phy register.

Cq-Depend: chrome-internal:4087511

Signed-off-by: Julian Schroeder <julianmarcusschroeder@gmail.com>
Change-Id: I4fdb5af1cbc3c70cc113ef6f0fd9332e1a27f142
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57215
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-09-08 20:44:55 +00:00
Martin Roth a95cd265bd util/amdtools: Add script to update the SPI speed in the EFS header
The update_efs_spi_speed allows changing the SPI speed manually in a
binary that has already been built.  This will allow binaries not built
for the EM100 SPI ROM emulator to be updated so that they will work.
There is a corresponding change that will check to see if the EFS value
has been modified from the original speed and will prevent coreboot from
updating the SPI speed and mode.

BUG=b:177233017
TEST=Update SPI speed in existing binary.  See that SPI speed has
changed.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I905a9fd8bd93a28aab927dffecbbcf24934b9e03
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56644
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-08 19:41:31 +00:00
Nico Huber 859ecdf517 sconfig: Ensure at least one `device` node below each `chip`
Even though `device` entries are children of `chip` entries in the
devicetree source format, the chips in the translated C structures
are only hooked up to device nodes. Hence, any chip with all its
settings will be silently dropped by sconfig if there is no device
node below it.

Let's adapt the parser to ensure that there is at least one `device`
entry. The intermediate `chipchildren_dev` rule applies until the
first `device` entry is found, then everything continues as before
with the `chipchildren` rule.

Change-Id: I54830bc1fc7d00a0605f3fe4d36a83ef57ef3312
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51119
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-08 19:03:20 +00:00
Wisley Chen e708468df9 mb/google/brya/var/redrix: Enable SaGv support
Enable SaGv support for redrix

BUG=b:198536984
TEST=FW_NAME=redrix emerge-brya coreboot

Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Change-Id: I54402dfde5db4106a4e0d891c19592fda39a1099
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57432
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-09-08 18:55:48 +00:00
Sunwei Li a26b7a7a55 mb/google/dedede/var/cappy2: Add fw_config probe for ALC5682I-VS
Based on commit b9c22e09 (util/sconfig: Compare probe conditions for override device match), add fw_config probe for ALC5682I-VS headphone Audio Codec.

BUG=b:197546020
BRANCH=dedede
TEST=ALC5682I-VD/VS and CS42l42 work normally according fw_config

Signed-off-by: Sunwei Li <lisunwei@huaqin.corp-partner.google.com>
Change-Id: Iac09663b095e758f1bc0cfaf7adb6e84d203788a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57105
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-08 18:55:03 +00:00
Nico Huber 81d4c80a81 mb/system76/whl-u: Add missing device node
All `chip` entries need a device node below them to actually get hooked
up. Add a dummy generic device like other instances of this driver use.

Change-Id: Ifbb5c9a6b389a2c809ce654d584d5197af764893
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57475
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-09-08 18:52:35 +00:00