Commit Graph

42141 Commits

Author SHA1 Message Date
Angel Pons 348639c460 mb/asus/p8h61-m_lx3_r2_0: List all PCH PCIe RPs in devicetree
Done to preserve reproducibility when switching to overridetrees.
The H61 PCH only supports 6 PCIe root ports anyway.

Change-Id: I926d62dda512e435d44c0646083c7722427dc80b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54386
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 17:47:20 +00:00
Angel Pons 13d5d98bd5 mb/asus/h61-series: Always select `INTEL_INT15`
The mainboard.c guard was only added to preserve reproducibility when
unifying the boards. The `install_intel_vga_int15_handler` function does
nothing when `VGA_ROM_RUN` is not selected. Remove the guard and always
select `INTEL_INT15` for simplicity.

Change-Id: If51a0ab1c57b0856018a62cf669e5d1b53e5333c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54379
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2021-05-20 17:46:41 +00:00
Angel Pons 3ec960a482 mb/asus/h61-series: Consolidate devicetree SATA options
The H61 PCH only supports 4 SATA ports, and does not support Gen3.

Change-Id: I3e060ca6904fd6c773c322988a17bbca28333a3d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54378
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2021-05-20 17:46:17 +00:00
Angel Pons 270ce521de mb/asus/h61-series: Relicense devicetrees as GPL-2.0-or-later
I added these devicetrees in commit 65ddbb720b (mb/asus/p8h61-m_pro:
Add new mainboard) and commit fe7c2b996b (mb/asus/p8h61-m_lx3_r2_0:
Add new mainboard). To ease licensing matters when transforming these
boards to use overridetrees, relicense the devicetrees so that all of
them use the GPL-2.0-or-later license.

Change-Id: Id26d0d9dd6cbb81d6a6a263feab7f36ddb4ff6e6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54377
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2021-05-20 17:45:50 +00:00
Angel Pons 04b2860808 mb/asus/p8h61-m_lx/devicetree.cb: Rewrite number in hex
Done for consistency with the other variants.

Tested with BUILD_TIMELESS=1, Asus P8H61-M LX remains identical.

Change-Id: I440706f6fa11d3c2410c445cb7e946c063578c4e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tristan Corrick <tristan@corrick.kiwi>
2021-05-20 17:45:33 +00:00
Angel Pons ed1e25de52 mb/asus/p8h61-m_lx: Transform into variant setup
Handle some differences in the DSDT code using preprocessor.

Tested with BUILD_TIMELESS=1, coreboot.rom for the Asus P8H61-M LX
remains identical when not adding the .config file in it.

Change-Id: I2a02f32dfd9fa9c1adce3baf0d279ea19db5883f
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54375
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-05-20 17:10:01 +00:00
Arthur Heymans 9d8a4558e3 soc/intel/xeon_sp: Skip locking down TXT related registers
When locking down TXT is skipped, e.g. to do error injection, locking
down DMI3 and IIO DFX related TXT registers should also be skipped.

Change-Id: Ieef25c02ec103eaef65d8b44467ccb9e6917bb6c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50238
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Rocky Phagura
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 16:22:11 +00:00
Arthur Heymans 8c6ee91fcd mb/ocp/deltalake: Implement skipping TXT lockdown via VPD
This allows to skip TXT Lockdown via "skip_intel_txt_lockdown" VPD parameter.

Change-Id: Ic5daf96bdda9c36054c410b07b08bcd3482d777c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50237
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rocky Phagura
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-05-20 16:22:05 +00:00
Arthur Heymans fc6cc717ce security/intel/txt: Add weak function to skip TXT lockdown
RAS error injection requires TXT and other related lockdown steps to
be skipped.

Change-Id: If9193a03be7e1345740ddc705f20dd4d05f3af26
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50236
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-05-20 16:21:59 +00:00
Angel Pons c423ce2f7f soc/intel/broadwell: Use Lynx Point IOBP code
Change-Id: I89832dd6089e1961b4ffdb5661dc98b26a5cb0a2
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52515
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 16:04:15 +00:00
Angel Pons dfb29fd701 sb/intel/lynxpoint: Add pch_iobp_exec() function
Taken from Broadwell. A follow-up will make Broadwell use the IOBP code
from Lynx Point.

Change-Id: Iacc90930ad4c34777c8f1af8b69c060c51a123b5
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52514
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 16:04:05 +00:00
Angel Pons 9ffb57c678 sb/intel/lynxpoint: Relocate SATA clock gating write
Do it in the same place as Broadwell.

Tested on out-of-tree Compal LA-A992P, SATA still works.

Change-Id: I50bd951af52d03ad986dbf4bf70bdae348fa994b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47034
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 16:03:54 +00:00
Ivy Jian 581fd082e2 mb/google/mancomb: Enable GFX HDA device
Enable Display Controller Engine Audio endpoint to enable HDMI audio.

BUG=b:186479763
TEST=Build and boot to OS in mancomb.

Signed-off-by: Ivy Jian <ivy_jian@compal.corp-partner.google.com>
Change-Id: I47cf9a9dc73fd47e390b079bb9eaa14dc364404a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54609
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-05-20 08:01:45 +00:00
Raul E Rangel ba102237e6 mb/google/guybrush: Add SoC thermal zone
The time constant values were taken from the zork thermal.asl.

BUG=b:186166365
TEST=Boot guybrush to OS and verify logs look correct
      thermal-0294 thermal_trips_update  : Found critical threshold [3641]
      thermal-0321 thermal_trips_update  : No hot threshold
      thermal-0200 thermal_get_temperatur: Temperature is 3060 dK
      thermal-0219 thermal_get_polling_fr: Polling frequency is 100 dS
      thermal-0200 thermal_get_temperatur: Temperature is 3060 dK
    thermal LNXTHERM:00: registered as thermal_zone0
    ACPI: Thermal Zone [TM00] (33 C)
      thermal-0200 thermal_get_temperatur: Temperature is 3070 dK

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Iaeed75bdaa16b117d0fa7144ede98db1388f74f3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54134
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-05-20 08:01:26 +00:00
Raul E Rangel cecadfd42a ec/google/chromeec: Implement support for DRIVERS_ACPI_THERMAL_ZONE
This adds the required method to access temperature data from the
ChromeEC.

BUG=b:186166365
TEST=Boot guybrush to the OS and verify temperatures
$ tail /sys/devices/virtual/thermal/thermal_zone*/temp
==> /sys/devices/virtual/thermal/thermal_zone0/temp <==
31900

==> /sys/devices/virtual/thermal/thermal_zone1/temp <==
34900

==> /sys/devices/virtual/thermal/thermal_zone2/temp <==
31900

==> /sys/devices/virtual/thermal/thermal_zone3/temp <==
33900

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I418b6691a7d00a4c2d89c9c1fe8f9416602be0f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54133
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 08:01:19 +00:00
Raul E Rangel 9bf32b9701 drivers/acpi: Add a chip driver to generate thermal zone
Given the following device tree entry:
    chip drivers/acpi/thermal_zone
        register "description" = ""CPU""

        use chrome_ec as temperature_controller

        register "sensor_id" = "0"

        register "polling_period" = "10"

        register "critical_temperature" = "91"

        register "passive_config" = "{
            .temperature = 85,
        }"

        register "use_acpi1_thermal_zone_scope" = "true"

        device generic 0 on end
    end

It will generate the following:
    Scope (\_TZ)
    {
        ThermalZone (TM00)
        {
            Name (_STR, "CPU")  // _STR: Description String
            Name (_RTV, Zero)  // _RTV: Relative Temperature Values
            Name (_TZP, 0x64)  // _TZP: Thermal Zone Polling
            Name (_CRT, 0x0E39)  // _CRT: Critical Temperature
            Name (_PSV, 0x0DFD)  // _PSV: Passive Temperature
            Name (_PSL, Package (0x10)  // _PSL: Passive List
            {
                \_SB.CP00,
                \_SB.CP01,
                \_SB.CP02,
                \_SB.CP03,
                \_SB.CP04,
                \_SB.CP05,
                \_SB.CP06,
                \_SB.CP07,
                \_SB.CP08,
                \_SB.CP09,
            })
            Name (_TC1, 0x02)  // _TC1: Thermal Constant 1
            Name (_TC2, 0x05)  // _TC2: Thermal Constant 2
            Name (_TSP, 0x14)  // _TSP: Thermal Sampling Period
            Method (_TMP, 0, Serialized)  // _TMP: Temperature
            {
                Return (\_SB.PCI0.LPCB.EC0.CREC.TMP (Zero))
            }
        }
    }

BUG=b:186166365
TEST=Boot guybrush to OS and verify thermal zone works

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Iee2a42db749f18eef6c3f73cdbb3441567301e5d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54132
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-05-20 08:01:11 +00:00
Paul Menzel a9efed5fd9 mb/asus/f2a85-m_pro: Set resources for 2e.b
The v4 resource allocator logs the error below:

    […]
    === Resource allocator: DOMAIN: 0000 - Pass 2 (allocating resources) ===
    DOMAIN: 0000 io: base: 0 size: 0 align: 0 gran: 0 limit: ffff
     update_constraints: PCI: 00:14.3 10000000 base 00000000 limit 00000fff io (fixed)
     update_constraints: PNP: 002e.2 60 base 000003f8 limit 000003ff io (fixed)
     update_constraints: PNP: 002e.5 60 base 00000060 limit 00000060 io (fixed)
     update_constraints: PNP: 002e.5 62 base 00000064 limit 00000064 io (fixed)
     update_constraints: PNP: 002e.b 60 base 00000290 limit 00000291 io (fixed)
     DOMAIN: 0000: Resource ranges:
     * Base: 1000, Size: f000, Tag: 100
      PCI: 00:01.0 14 *  [0x1000 - 0x10ff] limit: 10ff io
      PCI: 00:11.0 20 *  [0x1100 - 0x110f] limit: 110f io
      PCI: 00:11.0 10 *  [0x1110 - 0x1117] limit: 1117 io
      PCI: 00:11.0 18 *  [0x1118 - 0x111f] limit: 111f io
      PCI: 00:11.0 14 *  [0x1120 - 0x1123] limit: 1123 io
      PCI: 00:11.0 1c *  [0x1124 - 0x1127] limit: 1127 io
      ERROR: Resource didn't fit!!!   PNP: 002e.b 62 *  size: 0x2 limit: fff io
    DOMAIN: 0000 io: base: 0 size: 0 align: 0 gran: 0 limit: ffff done
    […]
    === Resource allocator: DOMAIN: 0000 - resource allocation complete ===
    […]
    PNP: 002e.b 60 <- [0x0000000290 - 0x0000000291] size 0x00000002 gran 0x01 io
    PNP: 002e.b e2 <- [0x000000007f - 0x000000007e] size 0x00000000 gran 0x00 irq
    PNP: 002e.b e4 <- [0x00000000f1 - 0x00000000f0] size 0x00000000 gran 0x00 irq
    ERROR: PNP: 002e.b 62 io size: 0x0000000002 not assigned in devicetree
    ERROR: PNP: 002e.b 70 irq size: 0x0000000001 not assigned in devicetree
    WARNING: PNP: 002e.b f0 irq size: 0x0000000001 not assigned in devicetree
    […]

So configure it, to use the resources from port 0.

TEST=With CB:54669 boot Asus F2A85-M PRO to SeaBIOS/GRUB and Debian’s
Linux 5.10.28
Solution-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Change-Id: Ibfedca96e4b5ad17f99bc84e2fbf7d0a6aad4484
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54670
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 08:00:54 +00:00
Sunway 650bf65505 mb/google/kukui: Add rt1015 support for katsu
Modify the value of "SPEAKER_GPIO_NAME" in katsu as rt1015p sdb

BUG=None
BRANCH=kukui
TEST=Speaker can work normally in katsu during firmware stage

Signed-off-by: Sunway <lisunwei@huaqin.corp-partner.google.com>
Change-Id: Ib3672383ab34bb07b4e5eb7f7e8b4549e13c67b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54642
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 08:00:32 +00:00
Martin Roth 7a2bfeb466 soc/amd/common: Show espi init in log
BUG=None
TEST=See espi init messages in the log.

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I9f856402ed9a026427d3529e6d61450b0623fe48
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54637
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 08:00:20 +00:00
Paul Menzel 8a6d2ccfa3 mb/google/sarien/var/sarien/hda_verb: Indent unindented comments
Change-Id: I2d08fa7506c6230491273f57ee0116927b29abe3
Fixes: 95370e1f ("mb/google/sarien: Add HD Audio verb table")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54591
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-20 08:00:01 +00:00
Paul Menzel 682eb5fe4d mb/google/drallion/var/drallion/hda_verb: Correct codec name in comment
Correct the Realtek ALC3254 codec name in the comment. The name is used
in the original commit message, and is also present in the Linux kernel
(`sound/pci/hda/patch_realtek.c`).

The file was an exact copy of
`src/mainboard/google/sarien/variants/arcada/include/variant/hda_verb.h`
added in commit 95370e1f (mb/google/sarien: Add HD Audio verb table).

Change-Id: I43cd73a14e07eb4518e3d44b6f81dff5016da721
Fixes: e3443d87 ("mb/google/drallion: Add new mainboard")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54590
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-20 07:59:25 +00:00
Paul Menzel ea568f0808 mb/google/sarien/var/arcada/hda_verb: Correct codec name in comment
Correct the Realtek ALC3254 codec name in the comment. The name is used
in the original commit message, and is also present in the Linux kernel
(`sound/pci/hda/patch_realtek.c`).

Change-Id: Id8a099297bd8bcebf9734e1beee2449fdcca75c5
Fixes: 95370e1f ("mb/google/sarien: Add HD Audio verb table")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54589
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-20 07:59:17 +00:00
Arthur Heymans 057f92902f soc/intel/xeon_sp: Remove superfluous printk
This debug output is not very useful. If CONFIG_BOOTBLOCK_CONSOLE is
enabled there will already be something else printed on the console
before this.

Change-Id: I7c6013805497604bb6a42ed4f9fdc594a73c28f1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47739
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Rocky Phagura
2021-05-20 07:58:57 +00:00
Ivy Jian c4609125bf mb/google/mancomb: Enable AMD I2S Machine Driver
Enable AMD I2S machine driver and configure the devicetree with HID
information so that the machine driver ACPI objects can be passed to the
kernel. Also configure Audio Co-processor(ACP) to operate in I2S TDM mode.

BUG=b:187860242
TEST=Build and boot to OS in Guybrush. Ensure that the ACPD device is
enabled in the appropriate scope in SSDT.

Signed-off-by: Ivy Jian <ivy_jian@compal.corp-partner.google.com>
Change-Id: I528f90d81a418236e512a1e0840ff44c3a3a983e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54549
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-05-20 07:58:20 +00:00
Angel Pons 4cedb8c3a9 baytrail: Factor out INT15 handler
The handler is the same on all Bay Trail mainboards. Factor it out.

Change-Id: Ia1b6faaca4792cda5f14948d23498182bf4bb2c3
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54415
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Máté Kukri <kukri.mate@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-20 07:58:01 +00:00
Aaron Durbin a949e30191 mb/google/dedede: move discrete TPM in overridetree for lalala
Move discrete TPM in the devicetree to avoid emitting the following
message: "Using default TPM ACPI path: '\_SB_.PCI0.LPCB'"

There is no corresonding ACPI device for 1f.5 PCI device. Therefore,
move the discrete TPM to a device that has the corresponding ACPI
device node. Functionality should remain the same.

BUG=b:187518267

Change-Id: Ie9ec70336d5651c87f06f8b357abd1bfdb1cc06b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54634
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Aseda Aboagye <aaboagye@google.com>
2021-05-20 03:14:51 +00:00
Shaik Sajida Bhanu 26ba026265 herobrine: Enable macronix SPI config
Enable macronix SPI config on herobrine board.

BUG=b:182963902

Change-Id: I505ee95d9f2ca16baf244135b3e2e8fe72f93491
Signed-off-by: Shaik Sajida Bhanu <sbhanu@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50583
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2021-05-19 21:03:00 +00:00
Ravi Kumar Bokka 1a47c6a2f7 sc7280: Reserve wlan & wpss dram memory regions
Change-Id: Ic98b5d08a0a7b3f772582bf85d94f901a7c53010
Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50587
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2021-05-19 20:23:55 +00:00
samrab 01158d3bd7 sc7280: memlayout changes for QCSDI & WMM feature
Change-Id: If5ebcc9a35e0b86321045ef44bb4874144c6402f
Signed-off-by: Sudheer Kumar Amrabadi <samrab@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54064
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2021-05-19 20:20:54 +00:00
Ravi Kumar Bokka 86c5bcd9d1 sc7280: add qclib support
* Qclib_Ver: BOOT.MXF.1.0-00745-KODIAKLC-2
  * Chipcode_Release_Tag: r00003.1

Change-Id: I2d400f0ad96dbef2e45cc1f11ed17ea95fc60d16
Signed-off-by: Sudheer Kumar Amrabadi <samrabad@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50582
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2021-05-19 20:20:34 +00:00
Paul Fagerburg de6cbac3c4 tests: improve code coverage support
Fix the exclusion path for lcov; it should exclude the directory
with source code, not object files.

Use the COV environment variable to
* control whether we build for coverage or not
* select the output directory

Add a separate target for generating the report, so we can get a
report for all of the tests together or just a single test.

Add documentation.

Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: I2bd2bfdedfab291aabeaa968c10b17e9b61c9c0a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
2021-05-19 19:56:02 +00:00
Raul E Rangel 12c0542e6f soc/amd/common/block/espi_util: Work around in-band reset race condition
When performing an in-band reset the host controller and the
peripheral can have mismatched IO configs.

i.e., The eSPI peripheral can be in IO-4 mode while, the
eSPI host will be in IO-1. This results in the peripheral
getting invalid packets and thus not responding. This causes the
NO_RESPONSE status bit to be set and cause eSPI init to fail.

If the peripheral is alerting when we perform an in-band
reset, there is a race condition in espi_send_command.
1) espi_send_command clears the interrupt status.
2) eSPI host controller hardware notices the alert and sends
   a GET_STATUS.
3) espi_send_command writes the in-band reset command.
4) eSPI hardware enqueues the in-band reset until GET_STATUS
   is complete.
5) GET_STATUS fails with NO_RESPONSE and sets the interrupt
   status.
6) eSPI hardware performs in-band reset.
7) espi_send_command checks the status and sees a
   NO_RESPONSE bit.

As a workaround we allow the NO_RESPONSE status code when
we perform an in-band reset.

BUG=b:186135022
TEST=suspend_stress_test and S5->S0 tests on guybrush and zork.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I71271377f20eaf29032214be98794e1645d9b70a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54070
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2021-05-19 16:26:44 +00:00
Felix Held 224b578420 soc/amd/cezanne/fch: add PCIe GPP clock generator configuration settings
I'm not 100% sure if this should rather be duplicated from Picasso or
commonized. Checked with the docs and this won't be compatible with
Stoneyridge and one future product's PPR lacked the corresponding
register. Some other chip has a compatible register layout, but a
different number of PCIe GPP clock outputs, so the common code would
need to use some SoC-dependent defines and possibly a SoC-specific
lookup table for the mapping which is also not that great.

TEST=Checked Cezanne PPR

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6b6d0cb8d7eb0288d8a18fcb975dc377b2c6846a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54685
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-19 15:37:39 +00:00
Felix Held 0e099eaf83 soc/amd/picasso: move gpp_clk_req_setting definition to chip.h
Since this enum is only used for the devicetree settings and not for the
hardware itself, move it from the southbridge header to the chip one.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0907fc5cba9315fec5fabff67d279c6d95d1c9f0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54684
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-19 15:37:15 +00:00
Tim Wawrzynczak 2f8a7046bb mb/google/brya/brya0: Manually probe fw_config for DB_LTE
In order to use the USB WWAN module in USB mode (as opposed to PCIe),
the PCIe RP must be turned off at the FSP level. The `probe` statement
in the devicetree unfortunately takes effect too late, because the UPDs
for disabling/enabling PCIE RP belong to FSP-M (romstage), whereas
fw_config probing for devicetree is done in ramstage.

Add a new variant-specific file which will handle manually setting the
UPD based on FW_CONFIG instead.

BUG=b:180166408
TEST=set CBI FW_CONFIG field to LTE_USB, see message in console,
set field to LTE_PCIE, do not see message in console.

Change-Id: Ica2f64ec99fa547e233012dc201577a14f6aa7d7
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54633
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-19 15:13:32 +00:00
John Zhao 8bb83a3456 ec/google/chromeec: Provide EC access for Retimer firmware upgrade
coreboot needs to access EC RFWU entry in order to suspend and resume PD
and modes setting. This change adds ec_retimer_fw_update implementation
for retimer firmware upgrade.

BUG=b:186521258
TEST=Build image successfully.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Ib937d8bd72fc39487854773573b435bf2add672a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52713
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-18 22:00:22 +00:00
John Zhao 7e982b1dd9 mb/intel/shadowmountain: Update mainboard properties
This changes updates mainboard properties by adding DFP number and
power_gpio for each DFP.

BUG=b:186521258
TEST=None

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I29480bf77f7df9890bef64a5f9f02074a34dc131
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54292
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-18 21:59:33 +00:00
John Zhao d4717cf3a4 mb/google/volteer: Update mainboard properties
This changes updates mainboard properties by adding DFP number, PLD
and power_gpio for each DFP.

BUG=b:186521258
TEST=Validated Retimer firmware upgrade along with upstream kernel under
no device attached scenario.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I18f29ce5f8450a8b0f8208a60b8b607f9f0d8817
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52714
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-18 21:58:53 +00:00
John Zhao 0b3f15c259 drivers/intel/usb4: Update driver to support Retimer firmware upgrade
Along with upstream kernel for Retimer firmware upgrade, coreboot
provides DFPx under host router where each DFP has its PLD and DSM. The
DFPx's functions encapsulates power control through GPIO, PD
suspend/resume and modes setting for Retimer firmware update under NDA
scenario.

BUG=b:186521258
TEST=Booted to kernel and validated host router's DFPx properties after
decomposing SSDT table.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I81bef80729f6df57119f5523358620cb015e5406
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52712
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-18 21:58:45 +00:00
John Zhao a7f8fb59e5 mb/intel/shadowmountain: Remove power_gpio from baseboard
Along with upstream kernel for Retimer firmware update, coreboot defines
power control for each DFP respectively under host router. This change
removes the power_gpio from the baseboard. Individual DFPx power_gpio
will be added once the dependent definition is complete.

BUG=b:186521258
TEST=Build image successfully.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I819d2900afabbfdb2713fa8eee35d3c90cb904fd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54290
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-18 21:58:36 +00:00
John Zhao bc9ab17852 mb/google/volteer: Remove power_gpio from baseboard
Along with upstream kernel for Retimer firmware update, coreboot defines
power control for each DFP respectively under host router. This change
removes the power_gpio from baseboard. Individual DFPx power_gpio will
be added once the dependent definition is complete.

BUG=b:186521258
TEST=Build image successfully.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: Iec2437ab20d283d080752a80aa4514aa9af6897e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52711
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-18 21:58:26 +00:00
John Zhao 7d365be915 ec/google/chromeec: Remove ec_retimer_fw_update
Along with upstream kernel for Retimer firmware update, coreboot changes
the ec_retimer_fw_update format. This change removes this API and will
add implementation later once the dependent definition is complete.

BUG=b:186521258
TEST=Build image successfully.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I2d074b84fb3cb87b443871104b72b6c316af5279
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52710
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-18 21:58:14 +00:00
Paul Fagerburg 0d2d9db143 util/mb/google: add support for brya
Add the file templates for creating a new variant of Brya.

BUG=b:177017247

Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: If141d9b43ea5b845c1855f12e03e7d0cf535d2ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54489
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-18 19:20:43 +00:00
Maulik V Vaghela df092c1ded soc/intel/alderlake: Add handling of GPIO_COM3 in gpio.asl
We were not adding power management handling of GPIO_COM3 in gpio.asl
This can affect s0ix flow where platform won't go into s0ix since
GPIO_COM3 is not power gated.

BUG=b:188392183
BRANCH=None
TEST=Platform should enter to s0ix and GPIO COMM3 should not block an
entry to s0ix.

Change-Id: I3f269c66bdd6337adb0d2bd29d0b7d72ced19ec4
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54391
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-05-18 17:03:43 +00:00
Maulik V Vaghela a77eb6e6c3 mb/google/brya: Disable dynamic GPIO PM for community 3
We recently added GPIO definition for PCIE vGPIO for Alder Lake.
We also need to disable GPIO dynamic PM for this community which is
already done for other communities as well.

BUG=b:188392183
BRANCH=None
TEST=Code compiles and Check if dynamic PM for GPIO COMM3 is also
disabled

Change-Id: I2f8645b8f4a9995e727a7623af97531c5de52892
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54383
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-05-18 17:03:36 +00:00
Arthur Heymans 6419cd3335 cpu/x86: Only include smm code if CONFIG_HAVE_SMI_HANDLER=y
This removes the need to include this code separately on each
platform.

Change-Id: I3d848b1adca4921d7ffa2203348073f0a11d090e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46380
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-05-18 16:54:21 +00:00
Aseda Aboagye 3c79777cd6 vboot/secdata_mock: Make v0 kernel secdata context
The new kernel secdata v1 stores the last read EC hash, and reboots the
device during EC software sync when that hash didn't match the currently
active hash on the EC (this is used with TPM_CR50 to support EC-EFS2 and
pretty much a no-op for other devices). Generally, of course the whole
point of secdata is always that it persists across reboots, but with
MOCK_SECDATA we can't do that. Previously we always happened to somewhat
get away with presenting freshly-reinitialized data for MOCK_SECDATA on
every boot, but with the EC hash feature in secdata v1, that would cause
a reboot loop. The simplest solution is to just pretend we're a secdata
v0 device when using MOCK_SECDATA.

This was encountered on using a firmware built with MOCK_SECDATA but had
EC software sync enabled.

BUG=b:187843114
BRANCH=None
TEST=`USE=mocktpm cros build-ap -b keeby`; Flash keeby device, verify
that DUT does not continuously reboot with EC software sync enabled.

Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Id8e81afcddadf27d9eec274f7f85ff1520315aaa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54304
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2021-05-18 15:30:47 +00:00
Angel Pons 9d54a22809 mb/asus/h61m-cs: Transform into variant setup
To preserve reproducibility, temporarily guard mainboard.c contents.
This will be removed once all boards have become variants.

Tested with BUILD_TIMELESS=1, coreboot.rom for the Asus H61M-CS
remains identical when not adding the .config file in it.

Change-Id: I1ffb41470d24713a4a7f0689958b733d4b1bdf52
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54374
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2021-05-18 11:51:02 +00:00
Angel Pons 14b7e655bf mb/asus/p8h61-m_pro: Transform into variant setup
Tested with BUILD_TIMELESS=1, coreboot.rom for the Asus P8H61-M PRO
remains identical when not adding the .config file in it.

Change-Id: Iaa53a8a1b75f4c7359e32c6cd8c8a488c5763bbe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54373
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2021-05-18 11:50:02 +00:00
Angel Pons e94cda578c mb/asus/p8h61-m_lx3_r2_0: Transform into variant setup
Get ready to squash all Asus H61 boards together, so as to factor out
lots of redundant code.

Tested with BUILD_TIMELESS=1, coreboot.rom for the Asus P8H61-M LX3 R2.0
remains identical when not adding the .config file in it.

Change-Id: I738197bf4d5ea8b879ae26ecbcb0cf3714316662
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54372
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2021-05-18 11:49:32 +00:00