Compare commits

...

166 Commits

Author SHA1 Message Date
Tim Crawford
83083250f9 mb/system76/tgl-u: darp7: Re-add CPU PCIe RTD3
Change-Id: I2df115c323a4fa50ffac191461060df9059381f7
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-19 09:15:55 -07:00
Tim Crawford
49c455b353 mb/system76/tgl-u: galp5: Re-add CPU PCIe RTD3
Tested with the following drives:

- Crucial P5 Plus (CT500P5PSSD8)
- Kingston KC3000 (SKC3000S/512G)
- Sabrent Rocket NVMe 4.0 (SB-ROCKET-NVMEe4-500)
- Samsung 970 EVO (MZ-V7E250)
- Samsung 970 EVO Plus (MZ-V7S250)
- Samsung 980 PRO (MZ-V8P2T0)
- WD Black SN850X (WDS100T2XD0E)
- WD Blue SN580 (WDS500G2B0C)
- WD Green SN350 (WDS240G2G0C)

Test:

- PCH asserts `SLP_S0#` during suspend (power LED blinks)
- `slp_s0_residency_usec` increases after suspend

Change-Id: I7491c4ffd62b284ba47fded70793830f63cb9c5f
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-19 09:15:44 -07:00
Tim Crawford
b3e9fbe971 mb/system76/tgl-u: lemp10: Re-add CPU PCIe RTD3
Tested with the following drives:

- Crucial P5 Plus (CT500P5PSSD8)
- Kingston KC3000 (SKC3000S/512G)
- Sabrent Rocket NVMe 4.0 (SB-ROCKET-NVMEe4-500)
- Samsung 970 EVO (MZ-V7E250)
- Samsung 970 EVO Plus (MZ-V7S250)
- Samsung 980 PRO (MZ-V8P2T0)
- WD Black SN850X (WDS100T2XD0E-00BCA0)
- WD Blue SN580 (WDS500G2B0C-00PXH0)
- WD Green SN350 (WDS240G2G0C-00AJM0)

Test:

- PCH asserts `SLP_S0#` during suspend (power LED blinks)
- `slp_s0_residency_usec` increases after suspend

Change-Id: I8e2d23fff9c89aa1364c5f982d227ec52e3ac8a2
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-19 09:15:33 -07:00
Tim Crawford
ddfd79d8c7 mb/system76: Reset Realtek codec before configuring
Change-Id: I64c1fd23f708f77a81fad0bc889f42d4df3f6e61
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-19 09:13:54 -07:00
Anil Kumar
900962f8d5 soc/intel/adl/acpi: add entries for HEC1 and SRAM to DSDT
HEC1 and SRAM are defined in src/soc/intel/alderlake/chipset.cb:

device pci 16.0 alias heci1 on  end
device pci 14.2 alias shared_sram off end

This patch adds entries for these devices in DSDT to prevent "AE_NOT_FOUND" errors from kernel

TEST=Built and tested on brya to confirm errors are not seen.
BUG=b:260258765

Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
Change-Id: Ifd9c509e82ccf02a7801d51513597fe2e5d9e631
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70454
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eran Mitrani <mitrani@google.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-01-17 07:54:54 -07:00
Eran Mitrani
8f668295e2 soc/intel/alderlake: skip external buses for D-states list
The devices in the list that was introduced in commit c66ea98577
("soc/intel/alderlake: provide a list of D-states to enter
LPM") are all internal. This CL skips the external buses (which caused
the addition of packages to non-existant paths such as
"_SB.PCI0.RP1.MCHC", and warnings from the kernel)

BUG=b:231582182
TEST=Built and tested on anahera by verifying SSDT contents

Change-Id: I3785b2b2af85d96e2e1296b6cfdefcd72080b5fe
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70163
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-01-17 07:54:54 -07:00
Tim Crawford
3dacf7f26b mb/system76/adl-p: darp8: Enable AER on CPU PCIe RP
Change-Id: Ia2979038f19e1af536d216b5867db2aeff9558ad
2023-01-12 09:13:19 -07:00
Tim Crawford
d78cc205c2 mb/system76/adl-p: darp8: Re-add CPU PCIe RTD3
Tested with the following drives:

- Crucial P5 Plus (CT500P5PSSD8)
- Kingston KC3000 (SKC3000S/512G)
- Sabrent Rocket NVMe 4.0 (SB-ROCKET-NVMEe4-500)
- Samsung 970 EVO (MZ-V7E250)
- Samsung 970 EVO Plus (MZ-V7S250)
- Samsung 980 PRO (MZ-V8P2T0)
- WD Black SN850X (WDS100T2XD0E)
- WD Blue SN580 (WDS500G2B0C)
- WD Green SN350 (WDS240G2G0C)

Test:

- PCH asserts `SLP_S0#` during suspend (power LED blinks)
- `slp_s0_residency_usec` increases after suspend

Change-Id: I9251034ccd52d7b7b37358991978933c7b733ca7
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-12 09:13:19 -07:00
Tim Crawford
6734cf0eef mb/system76/adl-p: galp6: Enable AER on CPU PCIe RP
Change-Id: Ia9cb20a73bfc2bc8b856dbcf16d632c8640cc4bb
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-11 12:46:07 -07:00
Tim Crawford
4416e2bc7a mb/system76/adl-p: galp6: Re-add CPU PCIe RTD3
Tested with the following drives:

- Crucial P5 Plus (CT500P5PSSD8)
- Kingston KC3000 (SKC3000S/512G)
- Sabrent Rocket NVMe 4.0 (SB-ROCKET-NVMEe4-500)
- Samsung 970 EVO (MZ-V7E250)
- Samsung 970 EVO Plus (MZ-V7S250)
- Samsung 980 PRO (MZ-V8P2T0)
- WD Black SN850X (WDS100T2XD0E)
- WD Blue SN580 (WDS500G2B0C)
- WD Green SN350 (WDS240G2G0C)

Test:

- PCH asserts `SLP_S0#` during suspend (power LED blinks)
- `slp_s0_residency_usec` increases after suspend

Change-Id: I51eec89444cd0b7bc7834ee52c3b17ca0b3bf9ac
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-11 12:46:07 -07:00
Tim Crawford
0a440232f4 mb/system76/adl-p: lemp11: Enable AER on CPU PCIe RP
The WD Black SN850X (WDS100T2XD0E) reports corrected RX errors on
suspend/resume.

Change-Id: I570ce0c392003f5514931272664bb4f9ec3c0803
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-06 13:49:40 -07:00
Tim Crawford
789de6a7d7 mb/system76/adl-p: lemp11: Re-add CPU PCIe RTD3
Tested with the following drives:

- Crucial P5 Plus (CT500P5PSSD8)
- Kingston KC3000 (SKC3000S/512G)
- Sabrent Rocket NVMe 4.0 (SB-ROCKET-NVMEe4-500)
- Samsung 970 EVO (MZ-V7E250)
- Samsung 970 EVO Plus (MZ-V7S250)
- Samsung 980 PRO (MZ-V8P2T0)
- WD Black SN850X (WDS100T2XD0E)
- WD Blue SN580 (WDS500G2B0C)
- WD Green SN350 (WDS240G2G0C)

Test:

- PCH asserts `SLP_S0#` during suspend (power LED blinks)
- `slp_s0_residency_usec` increases after suspend

Change-Id: Ib94665f2504200388c093600e8b359fde092bd79
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-06 13:49:40 -07:00
Eran Mitrani
a6635a0e50 soc/intel/adl/acpi: add FSPI to DSDT
A previous CL ("Add missing ACPI device path names",
commit d22500f0c61f8c8e10d8f4a24e3e2bf031163c07) caused some errors
from the Kernel on Brya devices (see Tim's comment on patchset 8):
> ACPI Error: AE_NOT_FOUND, While resolving a named reference
> package element - \_SB_.PCI0.FSPI

FSPI is defined in src/soc/intel/alderlake/chipset.cb:
device pci 1f.5 alias fast_spi on end

This CL adds the corresponding FSPI device to the DSDT to prevent
the error mentioned above.

TEST=Built and tested on brya by verifying the error is gone.
BUG=b:231582182

Change-Id: I11e89ad2a5d47f6b579f755b0a41399ee3cb856c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69920
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-29 11:41:41 -07:00
Tim Crawford
421b2ecbb0 mb/system76/tgl-u: Disable SATA DevSlp
After changing EC detection of S0ix from CPU_C10_GATE# to SLP_S0#,
DevSlp blocks suspend entry. Disable it for now.

Change-Id: I3ac796f1fcdd201bcfc0bff4f02dca379b5b8234
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-14 12:56:53 -07:00
Tim Crawford
10bd2a294f mb/system76/adl-p: galp6: Disable SATA
galp6 only has one SSD slot connected to the CPU, which doesn't support
SATA.

Change-Id: If42b4b0c8d47d2205e1784bed98e45159ede6b8a
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-14 12:56:53 -07:00
Tim Crawford
84813664f6 mb/system76/adl-p: Disable SATA DevSlp
After changing EC detection of S0ix from CPU_C10_GATE# to SLP_S0#,
DevSlp blocks suspend entry. Disable it for now.

Change-Id: If1e1be78e36edaae74755686ec58772b122c41d1
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-14 12:56:53 -07:00
Tim Crawford
923476d15a mb/system76: ADL: Add gfx register for GMA ACPI
Add gfx register to System76 ADL boards so GMA ACPI data is generated.
Fixes backlight controls on Windows 10 and Linux 6.1.

Change-Id: I356e09350ee0f1412409509a2b1695642ae210b3
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-07 11:18:36 -07:00
Tim Crawford
3af06b307f soc/intel/alderlake: Hook up GMA ACPI brightness controls
Add function needed to generate ACPI backlight control SSDT, along with
Kconfig values for accessing the registers.

Tested by adding gfx register on system76/lemp11 and booting Windows.
Display settings has a brightness setting, and can change the brightness
level.

Change-Id: Ia29fb2adde1ec90ed8b0757a4d81e54240ee7575
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-07 11:18:36 -07:00
Tim Crawford
a3b0137431 mb/system76/adl-p: Remove CPU PCIe RP RTD3 config
This has caused nothing but issues trying to get different drives to
behave correctly. Just remove it.

Change-Id: I5ed36c519fa7757034172f146fb5e03a15f40ede
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-10-31 11:31:26 -06:00
Tim Crawford
509a5160a6 mb/system76/tgl-u: Remove CPU PCIe RP RTD3 config
This has caused nothing but issues trying to get different drives to
behave correctly. Just remove it.

Change-Id: I72216960f9445e357b9c51faf3735f232adec78c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-10-31 11:31:26 -06:00
Tim Crawford
ca16834a9b mb/system76/adl-p: Always send signal for PMC hack
Other boards may have the S0ix issue. Always send PTS and let the EC
choose to apply the hack.

Change-Id: I0fc6e7ceac9fb79457a2ec35693c9d40afafae55
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-10-22 02:19:07 -06:00
Tim Crawford
4aeeb2ba4d mb/system76/adl-p: HACK: Fix S0ix on lemp11
Inform the EC to apply the PMC hack to allow the CPU to go to C10 during
suspend.

Change-Id: Id124b2e9249403cebf0038a172d2a324b81c433f
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-10-17 18:36:52 -06:00
Tim Crawford
f518736078 mb/system76/adl-p: lemp11: Remove CARD RTD3 config
The RTD3 config is wrong, but the "correct" config uses BUF_PLT_RST#.

lemp11 still sometimes fails to reach C10, but plugging/removing AC
adapter still works to fix it.

Change-Id: I084bc4bf21d550822586092a4d1be384d2ca180b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-10-10 08:15:53 -06:00
Jeremy Soller
206cd72f72 oryp10: Do not set EC_SYSTEM76_EC_OLED so non-OLED screen is supported
Change-Id: If20f605614f5db6ecf0f07b43f1d5095db702d3e
2022-09-26 12:10:17 -06:00
Jeremy Soller
1d1faabe66 oryp10: Disable LTR on SD card to fix suspend when AC is plugged in
Change-Id: I3e509d1db8ca429ffefcb40d9dfbb73c4435535e
2022-09-26 12:10:17 -06:00
Tim Crawford
c3a2caad9e mb/system76: Set gfx register
`gfx` got dropped during some rebase. Add them back.

Fixes brightness controls on Windows 10.

Change-Id: Ifd2553e3929962598185cc553c480dcb0087af5c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-09-20 10:34:24 -06:00
Tim Crawford
9ae1bd8cda mb/system76/tgl-u: Let FSP configure TBT LSX0
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: I5e34f7de199ab7b1b326baf40604fe2388775567
2022-09-06 09:47:41 -06:00
Tim Crawford
b0a67a4cf0 mb/system76/adl-p: Let FSP configure TBT LSX0
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: Iac2450543d422910725ce50df175dc455422f8b0
2022-09-06 09:47:41 -06:00
Tim Crawford
56d9711a08 mb/system76/adl-p: oryp10: Configure meminit
- Enable early command training to fix FSP-M init of 8 GB DIMMs
- Preserve FSP-M default of 1 for LpDdrDqDqsReTraining

Change-Id: Iee6eccc6545f2920514018eff163e690f5ab6c01
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-09-06 09:47:41 -06:00
Tim Crawford
99f63c4c4a mb/system76/adl-p: oryp10: Enable ALC1306 smart amp
Config dumped from proprietary firmware.

Change-Id: I5f97445b19fa06b0c911111f5f81ff3bf41c61bf
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-09-06 09:47:41 -06:00
Tim Crawford
cbb020e6f7 mb/system76/adl-p: Add Oryx Pro 10
oryp10 is nearly identical to the oryp9, with the differences being:

- Uses DDR5 RAM instead of DDR4 RAM
- Uses Realtek ALC1306 instead of TI TAS5825M
- Has an OLED display

Change-Id: If2617095e2ac1cb3ce7ccf27ebe35128e825b55b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-09-06 09:47:41 -06:00
Subrata Banik
1470125228 soc/intel/alderlake: Fill ucode loading UPD if USE_FSP_MP_INIT enable
This patch calls into a helper function to fill `2nd microcode loading
FSP UPD` if FSP is running CPU feature programming.

TEST=Able to build and boot Google/Kano.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I8534305e4e973c975ad271b181a2ea767c840ae3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66686
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-06 09:47:41 -06:00
Jeremy Compostella
83d3a35c4b Revert "soc/intel/alderlake: Enable energy efficiency turbo mode"
This reverts commit 844dcb3725.

A power and performance analysis performed on Alder Lake demonstrated
that with an EPP (Energy Performance Preference) at 50% along with
EET (Energy Efficient Turbo) disabled, the overall SoC performance are
similar or better and the SoC uses less power.

For instance some browser benchmark results improved by 2% and some
multi-core tests by 4% while at the same time power consumption
lowered by approximately 7.6%.

BRANCH=firmware-brya-14505.B
BUG=b:240669428
TEST=verify that ETT is disabled
     `iotools rdmsr 0 0x1fc'

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: I96a72009aaf96d4237d57f4d5c8b1f41f87174d1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66281
Reviewed-by: Zhixing Ma <zhixing.ma@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Selma Bensaid <selma.bensaid@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-06 09:47:41 -06:00
Angel Pons
f4095e60eb soc/intel/alderlake: Fix DDR5 channel mapping
DDR5 memory modules have two separate 32-bit channels (40-bit on ECC
memory modules), and the SPD info refers to one channel: the primary
bus width is 32 (or 40) bits and the "DIMM size" is halved. On Alder
Lake, there are 2 memory controllers with 4 32-bit channels each for
DDR5. FSP has 16 positions to store SPD data, some of which are only
used with LPDDR4/LPDDR5.

To try to make things less confusing, FSP abstracts the DDR5 channels
so that the configuration works like on DDR4. This is done by copying
each DIMM's SPD data to the other half-channel. Thus, fix the wrapper
parameters for DDR5 accordingly.

Tested on AlderLake-P DDR5 RVP (board ID 0x12), both DIMM slots now
function properly. Without this patch, only the top slot would work.

Change-Id: I5f01cd77388b89ba34d91c2dc5fb843fe9db9826
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66608
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-09-06 09:47:41 -06:00
Meera Ravindranath
6f87ebe472 soc/intel/alderlake: Configure DDR5 Physical channel width to 64
A DDR5 DIMM internally has two channels each of width 32 bit.
But the total physical channel width is 64 bit.

BUG=b:180458099
TEST=Boot DDR5 to kernel

Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Change-Id: Ic5e9c58f255bdf86a68ce90a4f853bf4e7c7ccfe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52730
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-09-06 09:47:41 -06:00
Tim Crawford
20db8fe3c3 mb/system76: Set SMBIOS wakeup type to power switch
Change-Id: I87c4f1d17fcf43563a6f450799d917786efa1f2f
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-17 13:55:57 -06:00
Tim Crawford
ff76b4dbc4 soc/intel/alderlake: Only use CH0 for mixed-topo
Fixes booting lemp11 with no DIMM installed.

Change-Id: Id86f3a5c976a86d245202a1c23023472df6d845d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-17 07:31:12 -06:00
Tim Crawford
0f777cf9ae Revert "soc/intel/alderlake: Remove some ACPI device names"
This reverts commit 884467a2b5.

Without these names, Windows fails with INTERNAL_POWER_ERROR (0xA0)
bugcheck with paramter 0x680. Linux reports errors for the devices, but
continues to work.

Change-Id: I5ced77f23929c39cc50276b17ac4b469c93fc250
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-16 08:00:46 -06:00
Tim Crawford
6d5521c76e soc/intel/alderlake: Add IRQ for non-existent CPU PCIe device
Device 0:01.1 does not exist on ADL-P. I assume this works because the
bridged device has function 1.

Fixes the following error in Linux:

    pcieport 0000:00:01.0: can't derive routing for PCI INT B
    snd_hda_intel 0000:01:00.1: PCI INT B: no GSI - using ISA IRQ 10

Which in turn resolves the conflict with the PCH HDA device...again:

    irq 10: nobody cared (try booting with the "irqpoll" option)
    <snip>
    [<00000000bf549647>] azx_interrupt [snd_hda_codec]
    Disabling IRQ #10

Change-Id: I9d9a0003764a1e031be578c1f406b2a5d7512de7
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-15 11:31:50 -06:00
Tim Crawford
4ff2471d29 3rdparty/intel-microcode: Use microcode-20220510 release
Intel rewrote the git history with the latest release. The following 2
commits no longer exist:

* 6c0c469 Merge pull request #59 from esyr-rh/microcode-20220510-releasenote-fixes
* 6ff5aa2 releasenote.md: changes summary fixes for microcode-20220510

Fixes building new checkouts of coreboot the require microcode blobs.

Change-Id: Id206bff57038178a362acf5ca2cdbe998381535d
Ref: commit 97144eee85 ("3rdparty/intel-microcode: Update submodule to recent main branch")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-09 13:55:56 -06:00
Tim Crawford
d2a57693df mb/system76/adl-p: galp6: Fix PCIe port registers
Correct the PCH PCIe RP indexes, which were copied from darp8.

Fixes using Ethernet and the SD card reader.

Change-Id: If14dea0492f6b7bea62d482ab970fe43e17c107b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-02 13:22:23 -06:00
Tim Crawford
57eae8e37a mb/system76/adl-p: Add Galago Pro 6 as a variant
Change-Id: I9d5a93b37ce22cc80dc83c2d8ad7987bfeaff7ed
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-02 11:32:30 -06:00
Tim Crawford
884467a2b5 soc/intel/alderlake: Remove some ACPI device names
This partial reverts commit d8d522884b.

These devices names cause ACPI errors in Linux as they are missing from
the DSDT.

    ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - \_SB_.PCI0.SRAM (20211217/dspkginit-438)
    ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - \_SB_.PCI0.HEC1 (20211217/dspkginit-438)
    ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - \_SB_.PCI0.FSPI (20211217/dspkginit-438)

Ref: https://review.coreboot.org/c/coreboot/+/63984
Change-Id: I644d2363d7e3c64af1d21e2a44bc3463819dd860
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:04 -06:00
Tim Crawford
836ca1b6bb soc/intel/alderlake: Fix IRQ for PEG0, PEG1
Fixes the following warnings on Linux:

    pcieport 0000:00:06.0: can't derive routing for PCI INT D
    pcieport 0000:00:06.2: can't derive routing for PCI INT B

Change-Id: I49406e0db77cf2391972f6660729bd0a41a34f13
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:04 -06:00
Tim Crawford
8e30d03b4f soc/intel/alderlake: Add IRQ constraints for CPU PCIe ports
Copy the constraints from ADL-S to ADL-P.

Fixes the following warning in Linux on System76 oryp9, which has an
NVIDIA GPU on the bridge.

    pcieport 0000:00:01.0: can't derive routing for PCI INT A

This, in turn, resolves an IRQ conflict with the PCH HDA device that
would cause a stack track on every boot.

    irq 10: nobody cared (try booting with the "irqpoll" option)
    <snip>
    [<00000000bf549647>] azx_interrupt [snd_hda_codec]
    Disabling IRQ #10

Change-Id: I550c80105ff861d051170ed748149aeb25a545db
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:04 -06:00
Tim Crawford
86845bdb12 mb/system76/gaze16: Split gpio.h into data files
Split `gpio.h` into `gpio_early.c` for bootblock and `gpio.c` for
ramstage to match other System76 boards.

Change-Id: I24398ad459754ac80d92d70687ab70b22894a01c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:04 -06:00
Tim Crawford
aebdd3750c mb/system76/gaze16: Rename variant dir
Use the actual model name for the variant dir.

Change-Id: I199b8efb5c3cddb8943ba4b761546caa11c67a30
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:04 -06:00
Tim Crawford
5e5d610dc5 mb/system76: Change touchpad detection method
Use the new "detect" method instead of "probed". Fixes an uncommon issue
where I2C HID fails to initialize the device in Linux.

Change-Id: I6a899c64a6d77b65a2ae57ab8df81cd84b568184
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
1e7386989b mb/system76/tgl-u: Restore old FSP configs
Re-add FSP-S configs from the 4.13 branch, which were not included when
upstreamed.

Change-Id: I5f99d088190df07213c5b615f36fde29831aad86
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
d4407b563f mb/system76/gaze17: Enable dGPU
Change-Id: I08781b6e91917b8ca92fc216c580befdd75cb994
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Jeremy Soller
ef3ef9b9b7 mb/system76/gaze17: Add Gazelle 17
The gaze17 comes in 2 variants due to differences in the discrete GPU
and network controller used.

- NVIDIA RTX 3050, using Realtek Ethernet Controller
- NVIDIA RTX 3060, using onboard I219-V Ethernet Controller

Tested with a custom TianoCore UefiPayloadPkg payload.

Working:

- PS/2 keyboard, touchpad
- Both DIMM slots
- M.2 NVMe SSD
- M.2 SATA SSD
- MicroSD card reader
- All USB ports
- Webcam
- Ethernet
- WiFi/Bluetooth
- Integrated graphics using Intel GOP driver
- Internal microphone
- Internal speakers
- Combined headphone + mic 3.5mm audio
- 3.5mm microphone input
- S0ix suspend/resume
- Booting to Pop!_OS Linux 22.04 with kernel 5.18.10
- Internal flashing with flashrom v1.2-703-g76118a7c10ed

Not working:

- Discrete/Hybrid graphics: Requires NVIDIA driver
- mDP/HDMI displays on 3060 variant: Requires NVIDIA driver
- Detection of devices in TBT slot on boot
- S3 suspend: MP init eventually fails

Not tested:

- Thunderbolt devices

Change-Id: Ib12ac47e8f34004f72e6234039823530511baea7
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
c6a45cdef5 mb/system76/adl-p: oryp9: Enable dGPU
Change-Id: If78241c197a552a5d93e4bfdadcb175d68194e3d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
0ec21e466e mb/system76/adl-p: Add Oryx Pro 9 as a variant
The Oryx Pro 9 (oryp9) is an Alder Lake-P board.

Tested with a custom TianoCore UefiPayloadPkg.

Working:

- PS/2 keyboard, touchpad
- Both DIMM slots (with NMSO480E82-3200EA00)
- Both M.2 NVME SSD slots (with MZVL2500HCJQ)
- All USB ports
- SD card reader
- Webcam
- Ethernet
- WiFi/Bluetooth
- Integrated graphics using Intel GOP driver
- Internal microphone
- Internal speakers
- Combined headphone + mic 3.5mm audio
- 3.5mm microphone input
- S0ix suspend/resume
- Booting Pop!_OS Linux 22.04 with kernel 5.18.6
- Internal flashing with flashrom v1.2-703-g76118a7c10ed

Not working:

- Discrete/Hybrid graphics
- HDMI output (requires NVIDIA GPU)
- Mini DisplayPort output (requires NVIDIA GPU)
- Detection of devices in TBT slot on boot

Change-Id: I8aac3e83f4423f444cb9ce8aa562ba465eb718c1
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
cac0a4e740 mb/system76/adl-p: Add Lemur Pro 11 as a variant
The Lemur Pro 11 (lemp11) is an Alder Lake-U board.

Tested with a custom TianoCore UefiPayloadPkg.

Working:

- PS/2 keyboard, touchpad
- DIMM slot (with NMSO480E82-3200EA00)
- M.2 NVMe SSD (with MZVL2500HCJQ)
- M.2 SATA SSD (with WDS100T2B0B)
- All USB ports
- SD card reader
- Webcam
- WiFi/Bluetooth
- Integrated graphics using Intel GOP driver
- HDMI output
- DisplayPort output over USB-C
- Internal microphone
- Internal speakers
- Combined headset + mic 3.5mm audio
- S0ix suspend/resume
- Booting Pop!_OS Linux 22.04 with kernel 5.18.5
- Internal flashing with flashrom v1.2-703-g76118a7c10ed

Not working:

- On-board RAM
- Detection of devices in TBT slot on boot

Change-Id: Ic930df1ebacc8c7ef14dbb6c67a97eddb918b365
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
60bd775b0b mb/system76/adl-p: Add Darter Pro 8
The Darter Pro 8 (darp8) is an Alder Lake-P board.

Tested with a custom TianoCore UefiPayloadPkg.

Working:

- PS/2 keyboard, touchpad
- Both DIMM slots (with NMSO480E82-3200EA00)
- M.2 NVMe SSD (with MZVL2500HCJQ)
- M.2 SATA SSD (with WDS100T2B0B)
- All USB ports
- SD card reader
- Webcam
- Ethernet
- WiFi/Bluetooth
- Integrated graphics using Intel GOP driver
- HDMI output
- DisplayPort output over USB-C
- Internal microphone
- Internal speakers
- Combined header + mic 3.5mm audio
- S0ix suspend/resume
- Booting Pop!_OS Linux 22.04 with kernel 5.18.5
- Internal flashing with flashrom v1.2-703-g76118a7c10ed

Not working:

- Detection of devices in TBT slot on boot

Change-Id: Icc84d6cc3aec7149d9b538305288bbe2b56d53e4
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:03 -06:00
Tim Crawford
7bb5d11b60 mb/system76/bonw14: Enable TAS5825M smart amp
The Bonobo has 2 AMPs: one for the speakers and one for the subwoofer.

Smart AMP data was collected using a logic analyzer connected to the IC
during system start on proprietary firmware. This data is then used to
generate a C file [1].

[1]: https://github.com/system76/smart-amp

Change-Id: I5389a9890563ebd3adb20096b6225f474bc006f9
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:02 -06:00
Tim Crawford
9325f1d6e3 mb/system76: TGL-H: Disable D3cold for TCSS
The TGL-H boards use S3 instead of S0ix.

Change-Id: Ib4362783546aa01f0f8f5baaad817ee76be9c39c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:02 -06:00
Jeremy Soller
07c2f1c0c1 mb/system76/lemp9: Fix TPM error message
Change-Id: Id5456c0d6abee6d79761fae0bed78cc6def351f3
2022-08-01 08:12:02 -06:00
Jeremy Soller
13be9f55d6 mb/system76: select TPM_RDRESP_NEED_DELAY
Change-Id: I7909b05e9203ce9ad07c8e87a847bc46cf281b34
2022-08-01 08:12:02 -06:00
Tim Crawford
b1e9b8bf76 mb/system76: Enable dGPUs
Change-Id: Ie33240ee61f9634202af6fb65a1f8819ae213a3b
2022-08-01 08:12:02 -06:00
Jeremy Soller
e67e83cd0e mb/system76/addw1: Disable SaOcSupport to eliminate hangs with 3200MT/s memory
Change-Id: I586e8cf97a52b2fa8386ce3742a4f4ae9465bbcf
2022-08-01 08:12:02 -06:00
Tim Crawford
d7abe1a4c3 mb/system76: Add custom backlight levels for Intel GMA
Add custom backlight levels for all models except:

- addw1
- bonw14: Does not use the iGPU

Change-Id: Ibea37f19acca0d718211fc41706019a92a240c70
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:02 -06:00
Jeremy Soller
32c624ddae drivers/gfx/nvidia: Add driver for NVIDIA GPU
Add a driver for laptops with NVIDIA Optimus (hybrid) graphics. The
driver provides ACPI support for dynamically powering on and off the
GPU, and a function for enabling the GPU power in romstage.

Tested on system76/gaze15.

References:
- DG-09845-001: NVIDIA GN20/QN20 Hardware Design Guide
- DG-09954-001: NVIDIA GN20/QN20 Software Design Guide

Change-Id: I2dec7aa2c8db7994f78a7cc1220502676e248465
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:02 -06:00
Tim Crawford
03d35a86b6 soc/intel/alderlake: Don't send EOP early
Early EOP prevents disabling CSME.

Disabling CSME now occurs, but checking the result fails:

    [DEBUG]  HECI: ME state change send success!
    [DEBUG]  HECI: ME state change result failure!

CSME is disabled on subsequent boots.

Change-Id: I1c1416bb6537774f4bf09820c551b3b4ca7d1a38
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:02 -06:00
Tim Crawford
5905e138bd soc/intel/alderlake: Allow channel 0 for memory-down
Fixes detection of the on-board RAM (Samsung K4AAG165WA-BCWE) on the
System76 Lemur Pro 11 (lemp11).

Change-Id: Ibe56c0f2b81d660303429cd2e21a7bb6cd433da5
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:01 -06:00
Jeremy Soller
68db581c09 soc/intel/alderlake: Set FSP-S GnaEnable based on devicetree
Change-Id: Ifd25416c55c4dba1709f74cdedc0c58e881d6266
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-08-01 08:12:01 -06:00
Michał Żygowski
b500ce5f1c soc/intel/alderlake/hsphy: Add support for HSPHY firmware loading
BIOS must send the IP_LOAD HECI command to fetch the firmware for CPU
PCIe Gen5 and upload it via CPU REG BAR prior FSP Silicon Init.
Implementation based on public Slimbootloader's
"Silicon/AlderlakePkg/Library/CpuPcieHsPhyInitLib".

TEST=Boot MSI PRO Z690-A and see the HSPHY FW is loaded.
PCIe x16 Gen3 GPU card started working in the PCIE 5.0 slot.

[DEBUG]  HECI: Sending Get IP firmware command
[DEBUG]  HECI: Get IP firmware success. Response:
[DEBUG]    Payload size = 0x6944
[DEBUG]    Hash type used for signing payload = 0x3

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I6c6c11581e3d3d9bab0131fae6ef487cafe98080
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-08-01 08:12:01 -06:00
Jeremy Soller
4cae6164d5 intel/block/pcie/rtd3: ACPI debug messages
Change-Id: Icc4a882ff73f62a134b92f1afb0dc298ea809189
2022-08-01 08:12:01 -06:00
Jeremy Soller
6c1f2a864c intel/block/pcie/rtd3: Also implement _PR3
Change-Id: Id7f4373989dffe8c3bc68a034f59a94d2160dd15
Signed-off-by: Jeremy Soller <jeremy@system76.com>
2022-08-01 08:12:01 -06:00
Jeremy Soller
ecd6515f13 soc/intel/cannonlake: Add Cometlake-H/S Q0 (10+2) CPU
Change-Id: Id1da42aa93ab3440ae743d943a00713b7df3f453
2022-07-30 17:01:16 -06:00
Tim Crawford
c16ad53c8f submodules: Use absolute paths
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: If03415f80a6028e263e76a9e3cc10df0cde5cc3c
2022-07-30 17:01:16 -06:00
Sean Rhodes
37bf8c6dd5 payloads/tianocore: Update MrChromebox’ default branch to 202207
Update MrChromebox’ default branch from uefipayload_202107 to
uefipayload_202207.

This is based on upstream edk2, commit f26b70c (UefiPayloadPkg:
Add support for logging to CBMEM console).

Tested on:
* StarBook Mk V
* StarLite Mk III

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I16a012485e4b4957439e776914ffd016b4506a47
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66083
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-07-30 18:43:09 +00:00
Matt DeVillier
38a682fe92 payloads/tianocore: Use SMMSTORE when branch is MrChromeBox
SMMSTORE support in edk2 was not allowed in upstream edk2
as it was bootloader specific.

Shortly, it will be built from edk2-platforms and then,
it will be retired.

For now, the patches exist in the MrChromeBox fork (TIANOCORE_UEFIPAYLOAD), so enable
these by default when SMMSTORE_v2 is enabled.

Change-Id: I1861bf739c2e25f661b4f06a303348f0537dc8b3
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65867
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-30 18:41:55 +00:00
Sean Rhodes
c5055883eb payloads/tianocore: Allow passing custom build params to all versions
Allow passing custom build parameters to any version of edk2, not
just forks.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I4eed535415ba15ae73e22cada9153820538f5f6d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-30 18:40:58 +00:00
Bora Guvendik
85c9a7320f vendorcode/intel/fsp: Fix wrong license
Fix the license in header file.

BUG=none
BRANCH=firmware-brya-14505.B
TEST=none

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I025f7c571d09e4cc63a659279e63d17c098c01cf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66253
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-30 18:40:10 +00:00
Bill XIE
4e43abf9c1 mb/hp/z220_series: Improve the port for z220_sff_workstation
- Move configs for PCIe ports not present on z220_sff_workstation
  from the devicetree.cb of base board to the overridetree.cb of
  z220_cmt_workstation.

- Add a note for ME/AMT Flash Override jumper, for it is hard to
  flash from OEM firmware either internally or externally without
  closing this jumper.

- Add a side note for similar HP Compaq Elite 8300 SFF.

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: I35d8b97f52a83910a61c12b1f7367ee7a19a9ad7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65703
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-30 18:39:31 +00:00
Raihow Shi
a955efc190 mb/google/brask/variants/moli: Add DPTF setting in Moli
DPTF Policy and temperature sensor values from thermal team.

BUG=b:236294162
TEST=emerge-brask coreboot

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: Iebcfb74c4bc719e6d8d8d9317435becd912eaf85
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65657
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-07-30 18:30:06 +00:00
Jakub Czapiga
190afda543 security/vboot: Simplify image signing
futility now supports image truncation and signing of whole images with
a single command invocation. Use it for vboot-enabled coreboot images.

TEST=Build and run coreboot on google/volteer

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I49eb7e977b635ccb9f6c1b76e53c36e82be1d795
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-30 18:29:25 +00:00
Elyes Haouas
ae157d38e3 crossgcc: Upgrade LLVM from 13.0.1 to 14.0.6
Test build for QEMU x86 i440fx/piix4.

Change-Id: I97d059947f7049b2491a98985795a4655891c3b3
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64991
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2022-07-30 18:27:30 +00:00
Felix Singer
a44620dea9 arch/x86/acpi: Replace Store() with ASL 2.0 syntax
Change-Id: I30bbd0288475fbefec55ce294e7963df1de6aa6a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60720
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-30 00:11:58 +00:00
Felix Singer
311981ef48 arch/x86/acpi: Replace And() with ASL 2.0 syntax
Change-Id: I21b954ce62259bb77d88775c3086cfac17dd90c7
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60719
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-30 00:11:36 +00:00
Felix Singer
b4a7f74436 arch/x86/acpi: Replace LNotEqual(a,b) with ASL 2.0 syntax
Replace `LNotEqual(a, b)` with `a != b`.

Change-Id: If0e9fcea680d487c28a965e944b3333bb5a07026
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60696
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-30 00:11:08 +00:00
Felix Singer
7ee6b5a3a5 arch/x86/acpi: Replace LLess(a,b) with ASL 2.0 syntax
Replace `LLess(a, b)` with `a < b`.

Change-Id: Ief1d069ae0fb19a2179f08c2e9cf416367661e69
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60674
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-30 00:10:27 +00:00
Felix Singer
50002b7fac arch/x86/acpi: Replace Add(a,b,c) with ASL 2.0 syntax
Replace `Add (a, b, c)` with `c = a + b`.

Change-Id: If848d391e5ec33ebfb08515414739dbdd5011e08
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-29 23:58:51 +00:00
Subrata Banik
8072b420a6 mb/google/rex: Perform display configuration override
This patch enables display port configuration as per the Rex
schematics.

TEST=Able to dump FSP UPD to ensure the override is successful.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I9e81d037416e46e52cb72344425d6d8725dae192
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2022-07-29 19:58:01 +00:00
Stanley Wu
828243ebca mb/google/nissa/var/pujjo: Enable OZ711LV2LN SD card controller
Pujjoflex support OZ711LV2LN SD card controller,
Select the Bayhub LV2 driver for OZ711LV2LN SD card.

BUG=b:215487382
TEST=Build FW and checking SD card work as expected in OS.

Signed-off-by: Stanley Wu <stanley1.wu@lcfc.corp-partner.google.com>
Change-Id: I6759fde1eaf24599a1fdb364d6e78f4e4e12f311
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66178
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-07-29 15:06:46 +00:00
Tarun Tuli
5c83d5efb7 mb/google/rex: Add LP5 RAM IDs
Create RAM IDs for:
DRAM Part Name                 ID to assign
MT62F512M32D2DR-031 WT:B       0 (0000)
MT62F1G32D2DS-026 WT:B         1 (0001)
MT62F2G32D4DS-026 WT:B         2 (0010)

BUG=b:240289148
TEST=emerge-rex coreboot

Signed-off-by: Tarun Tuli <taruntuli@google.com>
Change-Id: Ib24e07bca363984db3484aa500f7d6ea4817e517
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66164
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
2022-07-29 15:06:17 +00:00
Liya Li
0d13e80852 soc/mediatek/mt8188: Add SPI support
The gpios and the tick delay register are different between MT8188
and previous MediaTek SoCs, so we need to add this patch to support
SPI.

TEST=build pass
BUG=b:236331724

Signed-off-by: Liya Li <ot_liya.li@mediatek.corp-partner.google.com>
Change-Id: I6065b9d285dfd36c191f274f500fdb694920276e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66185
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:05:48 +00:00
Rex-BC Chen
00324b20e1 soc/mediatek: Create GET_TICK_DLY_REG macro for SPI tick delay setting
MT8188 SPI tick delay setting is moved to `spi_cmd_reg` register which
is different from previous SoCs, so we define a macro to get the
designated register.

TEST=build pass.
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Ia30e94a8688c0e1c1d4b3d15206f28e5bd8c9bd4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66184
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:05:33 +00:00
Rex-BC Chen
d699de071f mb/google/geralt: Initialize RTC and clk_buf in romstage
TEST=build pass.
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I869c0879d09e00cf66882adb728c9ccb6ac57e03
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66183
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:05:14 +00:00
Song Fan
86dde5fe72 soc/mediatek/mt8188: Add clk_buf support in romstage
TEST=build pass.
BUG=b:233720142

Signed-off-by: Song Fan <ot_song.fan@mediatek.corp-partner.google.com>
Change-Id: Ic300b70a38ac204b098ca9ab15cf7045b66fd76d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66182
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:04:57 +00:00
Song Fan
11089e2fcd soc/mediatek/mt8188: Add RTC support
Add RTC header file for SoC-specific settings. Add RTC support in
romstage.

TEST=build pass.
BUG=b:233720142

Signed-off-by: Song Fan <ot_song.fan@mediatek.corp-partner.google.com>
Change-Id: I38115ce0c9a4e1c1b2b7c8e6d40f47e99f7f86b3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66181
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:04:43 +00:00
Rex-BC Chen
9f81a8fc08 soc/mediatek: Move common definitions from rtc.h to rtc_reg_common.h
Move the common definitions to rtc_reg_common.h, so we can reuse those
definitions on MT8188.

TEST=build pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Ia1d916a88b7cb875b35ee5813b7b52d9e98f5009
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66180
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:04:27 +00:00
Hui Liu
feb573e395 soc/mediatek/mt8188: Add AUXADC support
TEST=get voltage as 340mV for channel 0 in MTK EVB.
BUG=b:233720142

Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com>
Change-Id: Idd1edcce6cb62fcf6991bb9342c409150989c5ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66121
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-29 15:04:10 +00:00
Rex-BC Chen
a8c9674c42 soc/mediatek: Move struct mtk_auxadc_regs to auxadc_common.h
The AUXADC register definitions are the same for all MediaTek SoCs, so
we move struct mtk_auxadc_regs to auxadc_common.h.

TEST=build pass.
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I48978a93137a7de42f8ea2873be3130cb8f534f3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-29 15:03:56 +00:00
Subrata Banik
8a039031dd mb/google/rex: Enable CNVi BT Core
This patch override `CnviBtCore` FSP UPD.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I90c9b360969aada0b0e031d62b48476fac5cee0e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66208
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-29 15:03:01 +00:00
Eric Lai
ff424fbe6b mb/google/brya/var/ghost: Enable CS42L42 codec
Add CS42L42 support in device tree.

BUG=b:240006200
BRANCH=firmware-brya-14505.B
TEST=Check cs42l42 driver can probe successfully in kernel.
cs42l42 i2c-10134242:00: Cirrus Logic CS42L42, Revision: B1

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: I861f47c12f4cebb016a4cfbe225f97d34d55e233
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2022-07-29 15:02:35 +00:00
Eric Lai
e5a9cdc615 mb/google/brya/var/ghost: Update all I2C buses speed to fast
Remove the parameter and set I2C bus speed to fast. Will fill the
tuning value after real tuning.

BUG=b:240006200
BRANCH=firmware-brya-14505.B
TEST=build passed.

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: Iba7fe4551959617ecfa49719c1124bf85d624c31
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66220
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2022-07-29 15:02:24 +00:00
Raymond Chung
e59c5f8f06 mb/google/brya: Create gaelin variant
Create the gaelin variant of the brask reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.5.0).

BUG=b:239514438
BRANCH=None
TEST=util/abuild/abuild -p none -t google/brya -x -a
make sure the build includes GOOGLE_GAELIN

Signed-off-by: Raymond Chung <raymondchung@ami.corp-partner.google.com>
Change-Id: I7f1ff8690c7c57f8960e004d0490d5cede8667f3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66177
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
2022-07-29 15:02:05 +00:00
Michał Żygowski
82043f5a36 soc/intel/alderlake: Add missing TDP and Power Limits for ADL-S
Add TDP and Power Limit settings for ADL-S 8+8 150W, 4+0 and 2+0.
The System Agent PCI IDs were not present in older 2.1 revision of
DOC #619501. Now that the mapping of these IDs to SKUs is known, fill
the missing TDPs and Power Limit settings based on DOC #626343.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I23dd8478e60bcc81a1048f2f6e6717dd281d1a69
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66053
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-07-29 15:01:55 +00:00
Michał Żygowski
a01b62a573 soc/intel/alderlake: Set VccIn Aux Imon IccMax for ADL-S 4+0 and 2+0
Add missing System Agent PCI IDs for ADL-S 4+0 and 2+0 to configure
VccIn Aux Imon IccMax. They were not present in older 2.1 revision of
DOC #619501. Based on DOC #619501 rev 2.6.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Idfd57ce9b63db5d5fcc9d4efb8aa27ed7cc6222d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66052
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-07-29 15:01:36 +00:00
Michał Żygowski
4b9508b64c soc/intel/alderlake/vr_config.c: Add VR params for ADL-S
Based on DOC #619501, #634885, #626343.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ib50db521e4d127a773f903b45d4bec5c5cc180d4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63840
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2022-07-29 15:01:28 +00:00
Harsha B R
5754eade4a intel/pmclib: Avoid PMC ABASE read of SLP_TYP and STATUS in ramstage
The patch updates platform_is_resuming() API such that platform resume
state is determined from the saved state (CBMEM) instead of checking PMC
registers (PM1_STS & PM1_CNT) as they are getting cleared (before/early)
ramstage.

coreboot sends DISCONNECT IPC command which times out during resume (S3)
if system has servoV4 connected on port0. The issue occurs only during
the first cycle of resume (S3) test cycle after cold boot due to side
effect of platform_is_resuming() API that is not determining the resume
(S3) state correctly in ramstage.

PM1_STS and PM1_CNT register gets cleared at the start of ramstage.
platform_is_resuming() function was checks the cleared register value
and fails the condition of resume (S3) resulting in sending DISCONNECT
IPC command. Checking the platform resume state from the CBMEM saved
state using acpe_get_sleep_type() function helps cross verify the
system previous state at the later part of ramstage.

localhost ~ # cbmem -c | grep ERROR
[ERROR]  EC returned error result code 3
[ERROR]  PMC IPC timeout after 1000 ms
[ERROR]  PMC IPC command 0x200a7 failed
[ERROR]  pmc_send_ipc_cmd failed
[ERROR]  Failed to setup port:0 to initial state
[ERROR]  PMC IPC timeout after 1000 ms
[ERROR]  PMC IPC command 0x200a7 failed
[ERROR]  pmc_send_ipc_cmd failed
[ERROR]  Failed to setup port:1 to initial state
[ERROR]  GENERIC: 0.0 missing read_resources
[ERROR]  PMC IPC timeout after 1000 ms
[ERROR]  PMC IPC command 0xd0 failed
[ERROR]  PMC: Failed sending PCI Enumeration Done Command

BUG=b:227289581
TEST=Verified system boots to OS and verified below tests on
Redrix (ADL-P) and Nivviks (ADL-N)
1. coreboot doesn't send the DISCONNECT during S3 resume
2. suspend S3 passes with both suzyq and servoV4 connected
3. After S3 resume, system detects the pen drive with Superspeed
4. After system resumes from S3, hot-plug the pen drive, system detects
   the pen drive

Signed-off-by: Harsha B R <harsha.b.r@intel.com>
Change-Id: I353ab49073bc4b5288943e19a75efa04bd809227
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66126
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-29 15:01:03 +00:00
Tarun Tuli
59b9d96d62 spd/lp5: Add SPD for Micron MT62F2G32D4DS-026
This adds support for Micron MT62F2G32D4DS-026 chips.

BUG=b:240289148
TEST=util/spd_tools/bin/spd_gen spd/lp5/memory_parts.json lp5

Signed-off-by: Tarun Tuli <taruntuli@google.com>
Change-Id: I1212506d742178803a7e7bf7e0236d1095f7af9d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66163
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-07-29 15:00:33 +00:00
Shon Wang
38777e5cc2 mb/google/dedede/var/drawcia: Enable weida touchscreen
Add weida touchscreen support for drawcia.

BRANCH=dedede
TEST=Build and verify that touchscreen works on drawcia.

Change-Id: Ic76f3529771c6eeeafef7ca50fc400065aac2211
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65471
Reviewed-by: Ivan Chen <yulunchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-07-29 15:00:26 +00:00
Felix Singer
f333a442a3 sb/intel/bd82x6x/acpi: Replace LEqual(a,b) with ASL 2.0 syntax
Replace `LEqual(a, b)` with `a == b`.

Change-Id: I4e219bea8df64db1d49beb8534f0f37fee0df5b6
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60668
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-29 10:16:25 +00:00
Felix Singer
644e59b7ba sb/intel/i82801ix/acpi: Replace LEqual(a,b) with ASL 2.0 syntax
Replace `LEqual(a, b)` with `a == b`.

Change-Id: Ifffd21a663739f72a5584e26b79b0627dd532d9e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-29 10:16:08 +00:00
Felix Singer
a41716fadc sb/intel/i82801jx/acpi: Replace LEqual(a,b) with ASL 2.0 syntax
Replace `LEqual(a, b)` with `a == b`.

Change-Id: I3aebd29bba285229979b79867c881018f61e2060
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60666
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
2022-07-29 10:15:39 +00:00
Sean Rhodes
561f7df3bd soc/intel/common/sata: Add APL and GLK SATA PCI IDs
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I0ae8c6624b79ce6c269244bd1435900d4d7f997a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65953
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-07-29 10:13:52 +00:00
Mark Hsieh
f84f3e7451 mb/google/nissa/var/joxer: Correct i2c address for touchscreen
set i2c address to 0x14 for Goodix touchscreen

BUG=b:239180430
TEST=USE="project_joxer emerge-nissa coreboot"

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I11a2d9c684bc511b3942f88f74a2495e796bc3c2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66192
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2022-07-28 23:25:17 +00:00
Tim Wawrzynczak
5625dace84 mb/google/brya/acpi: Add L23 entry/exit sequences during dGPU GCOFF
When the dGPU is entering GCOFF, the link should first be placed into
L2/L3 as appropriate for the design, then when exiting, the link should
be placed back into L0. This patch fixes that oversight.

BUG=b:239719056
TEST=build

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ia3bdfe5641216675e06ebe82ffe58bf8c049b26b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66200
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-07-28 20:02:56 +00:00
Tim Wawrzynczak
460fea6523 mb/google/brya/var/agah: Modify GPP_A8 programming
The EEs noticed this pin was misbehaving; it was accidentally set to a
low output, but should be open-drain (NC). This patch fixes that.

BUG=b:237837108
TEST=verified by EEs

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ie76a951320c49b9fbc1f23b96f04c9f86ad44d42
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-07-28 20:02:53 +00:00
Tim Wawrzynczak
86b517f88e mb/google/brya/var/agah: Modify GPP_F14 programming
For some yet unknown reason, when this GPIO is locked, there is an
interrupt storm for IRQ #9 apparently caused by GPE 0x66. GPP_F14 is set
to GPE 0x64 on the ADL platform, so this doesn't quite make sense. This
patch removes the lock and fixes this IRQ storm, but the root cause is
not identified yet.

BUG=b:236997604
TEST=`grep ' 9:' /proc/interrupts` shows a reasonable value now

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I3d1c66fac80a173798ae33e48b1776d9f4fb5eaa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66201
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
2022-07-28 20:02:45 +00:00
Tim Wawrzynczak
17d71937a1 mb/google/brya/var/agah: Optimize dGPU GCOFF entry
After staring at lots of scope shots, the EE has determined that a few
modifications to the GCOFF sequence can be made:

 - Remove delay between PERST# assertion and GPU_ALLRAILS_PG deassertion
 - Remove delay after ramping down FBVDD

This patch implements these minor changes.

BUG=b:240199017
TEST=verified by EE

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I7d492b3e65a231bc5f64fe9c3add60b5e72eb072
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66199
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-07-28 20:02:42 +00:00
Tim Wawrzynczak
1523742d4c mb/google/brya/var/agah: Update ASPM settings for dGPU
After some debugging, it has been determined that the ASPM L0s substate
is functional, but there is still some problem with ASPM L1 substates,
so this patch updates ASPM status for the dGPU from disabled to L0s
only.

BUG=b:240390998
TEST=tested with nvidia tools

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I584bdbf26eda20246034263446492bf4daf5f3b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-07-28 20:02:24 +00:00
Tim Wawrzynczak
d6b763ca63 soc/intel/alderlake: Add support for more CPU PCIe RP UPDs
There are 3 more CPU PCIe RP UPDs that are the current code is not setting,
and some boards may want to set these, so this patch adds support to set
these UPDs. The default values for any existing boards using these UPDs
should not change with this patch.

The UPDs are:
 - CpuPcieRpDetectTimeoutMs
 - CpuPcieRpAspm
 - CpuPcieRpSlotImplemented

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Id48019f984e8e53ff3ce0c3c23e02dab65112c99
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66197
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-28 20:02:20 +00:00
Wisley Chen
05f0e3fe86 mb/google/brya/var/anahera{4es}: Add H54G68CYRBX248 support
Generate SPD id for hynix H54G68CYRBX248

BUG=b:239899929
BRANCH=firmware-brya-14505.B
TEST=run part_id_gen to generate SPD id

Change-Id: I96babe340678ca9b82b06d3193b93a7676f23fef
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-28 20:00:25 +00:00
Wisley Chen
ec61d7a776 mb/google/brya/var/redrix{4es}: Add H54G68CYRBX248 support
Generate SPD id for Hynix H54G68CYRBX248

BUG=b:239888704
BRANCH=firmware-brya-14505.B
TEST=run part_id_gen to generate SPD id

Change-Id: I9412b988bcdb0c744e016f3add6dacda8185d6db
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66071
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-28 20:00:14 +00:00
Wisley Chen
c23ff72cd7 spd/lp4x: Generate initial SPD for H54G68CYRBX248
Generate initial SPD for H54G68CYRBX248

BUG=b:239888704
BRANCH=firmware-brya-14505.B
TEST=util/spd_tools/bin/spd_gen spd/lp4x/memory_parts.json lp4x

Change-Id: Iae75391938446e9ee387b779ddcaa378a23ee52e
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66070
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-28 20:00:05 +00:00
Eric Lai
9473154497 mb/google/brya/var/ghost: Correct CNVi pins
GPP_F0 to GPP_F4 is for CNVi and should be NF1.
GPP_F5 is for CNVi CLK_REQ, and should be NF3 CRF_XTAL_CLKREQ.

BUG=b:240006200
BRANCH=firmware-brya-14505.B
TEST=CNVi wifi can get probed in kernel.

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: Ice3fde3a457f6f5c058c0a7d3ca2e63775bda96c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66175
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2022-07-28 19:59:54 +00:00
Jeremy Soller
5219ee160e soc/intel/alderlake: Enable LPIT support
Add SLP_S0 residency register and enable LPIT support.

Change-Id: I45e1fc9df3e782cdaac810af3189c5797b1fe413
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66091
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-28 19:59:44 +00:00
Felix Singer
dca8583f17 util/liveiso/common: Install devmem2 and pcimem
devmem2 and pcimem are useful tools which allow working (reading and
writing) with memory mapped IO.

Change-Id: Ifda547b44af3c8e11cd4171a1dfbce3713455303
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66171
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-28 18:28:24 +00:00
Jeremy Compostella
cd6a2ad1b2 soc/intel/alderlake: Set Energy Perf Bias appropriate default value
The current "normal" EPB (six) setting resulted in the desired out of
box power and performance for several CPU generations.

However, a power and performance analysis on Alder Lake and Raptor
Lake CPUs demonstrates that this value results in undesirable higher
uncore power and that seven is a more appropriate value.

Note: the Linux kernel "4ecc933b x86: intel_epb: Allow model specific
      normal EPB value" patch sets the EPB to 7 for Alder Lake.

BRANCH=firmware-brya-14505.B
BUG=b:239853069
TEST=verify that EPB is set by coreboot

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: I5784656903d4c58bedc5063ee3ef310a99711050
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66059
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-28 14:57:59 +00:00
Jeremy Compostella
117770d324 soc/intel/alderlake: Enable Energy/Performance Bias control
According to document 619503 ADL EDS Vol2, bit 18 of MSR_POWER_CTL
must be set to be able to set the Energy/Performance Bias using MSR
IA32_ENERGY_PERF_BIAS.

Note that since this bit was not set until this patch, the
`set_energy_perf_bias(ENERGY_POLICY_NORMAL);' call in
`soc_core_init()` was systematically failing.

BRANCH=firmware-brya-14505.B
BUG=b:239853069
TEST=verify that EPB is set by coreboot

Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Change-Id: Ic24abdd7f63f4707b8996da4755a26be148efe4a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66058
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-28 14:57:54 +00:00
Yunlong Jia
ccbf27cbe7 google/trogdor: Add new variant Pazquel360
This patch adds a new variant called Pazquel360 \
that is identical to Pazquel for now.

BUG=b:239987191
TEST=make

Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
Change-Id: I0a9ca4a59fb44256d0d8fcdbdf2a7db533c84412
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66150
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Bob Moragues <moragues@google.com>
2022-07-28 14:53:29 +00:00
Paul Menzel
47eb1321c8 commonlib: compiler.h: Use non-concise comment style
The concise multi-line comment style is for inside function bodies to
save space. Outside of it, use non-concise style.

Change-Id: I34d9ec6984b598a37c438fa3c395b5478207e31d
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65885
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-07-28 12:32:56 +00:00
Tarun Tuli
646802c598 mb/google/rex: Initial setup for ramstage/early gpio config
This adds the initial gpio configuration for the rex initial variant.

BUG=b:238165977
TEST=Boots and no errors on simics

Change-Id: I55ab31c7943e22df9cec8db4a9f0c3ab6f065ae1
Signed-off-by: Tarun Tuli <taruntuli@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65952
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-28 11:14:01 +00:00
Subrata Banik
a459d360e4 soc/intel/meteorlake: Fix GPIO reset mapping as per GPIO BWG
This patch fixes the documentation discrepancy of GPIO reset type
between PCH EDS and GPIO BWG.

As per GPIO BWG, there are four GPIO reset types in Meteor Lake as
below:
- Power Good - (Value 00)
- Deep - (Value 01)
- Host Reset/PLTRST - (Value 10)
- Global Reset for GPP - (Value 11)

Also, dropped the need for having dedicated reset type for GPIO
community 3. As per the MTL EDS, all GPIO communities have the same
reset type.

BUG=b:213293047
TEST=Able to build and boot Google/Rex without below error msg.
[ERROR] gpio_pad_reset_config_override: Logical to Chipset mapping
        not found

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Id7ea16d89b6f01b00a7b7c52945f6e01e8db6cbd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66155
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Will Kim <norwayforest92@gmail.com>
2022-07-28 11:13:34 +00:00
Subrata Banik
2ba4bfef7e soc/intel/gpio: Add new macro for GPP PAD reset type as Global Reset
This patch introduces a new macro for GPP PAD reset type as
`Global Reset` as documented in Alder Lake EDS doc 630603.

BUG=b:213293047
TEST=Able to build Google/Kano with this change.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I39428911babc393dd10750801522a00d0b26d3e5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66154
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-28 11:13:07 +00:00
Michał Żygowski
4a12f54654 MAINTAINERS: Add M. Żygowski and M. Kopeć as MSI MS-7D25 maintainers
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Id7fe11269276f0752545a51d92395cfc03445471
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66124
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-07-28 10:13:01 +00:00
Sean Rhodes
c14bbbc47b payloads/tianocore: Bind the PCDs for screen size to Kconfig
Bind the PCDs that allow edk2 to use the whole display to a
Kconfig option called TIANOCORE_FULL_SCREEN_SETUP.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ic977a199f3b308c566391e37f126c4fe518b2eb6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 14:01:15 +00:00
Sean Rhodes
6388a5b892 payloads/tianocore: Correct the multiplication of the SD/MMC timeout
The `call int-multiply` couldn't handle the Kconfig option being a
string so do the calculation in bash.

Tested on:
* Qemu
* StarLite Mk III

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1879d7efd504e2c42dadb12d2d8add4f69ca7b9c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66161
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:59:57 +00:00
Sean Rhodes
ce6f63a898 payloads/tianocore: Add missing CONFIG for SERIAL_SUPPORT
This caused edk2 serial output to be disabled 100% of the time.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: If272369b405e7745fe82f49026cbed0abc50f355
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66160
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:59:19 +00:00
Matt DeVillier
7b087c0594 payloads/tianocore: use BMP (vs SVG) logo file as default
converting the SVG logo to BMP at compile time using 'convert'
introduces terrible aliasing artifacts, so use a properly converted
BMP file as the default instead.

Test: boot qemu w/Tianocore, observe lack of aliasing in coreboot logo

Change-Id: I62d643c24abca57fa35b79732d8cedc83b94815f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-07-27 13:58:58 +00:00
Matt DeVillier
a9bdb4c15e Documentation: Add coreboot logo in BMP format for payload use
Using 'convert' to convert the SVG logo to BMP for Tianocore
introduces terrible aliasing, so add a logo in BMP format
(converted using GIMP).

The default logo file used by Tianocore will be changed in a
subsequent commit.

Change-Id: I2490707a330713709dd4ba8ae99b22b123ba64da
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66143
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:58:27 +00:00
Karthikeyan Ramasubramanian
153f976fff soc/amd/sabrina: Disable CCP DMA and HW MODEXP
Enabling them causes firmware keyblock/preamble and/or body verification
failure. Hence disabling them to use software based verification.
Re-enable them once the issue is root-caused.

BUG=b:217414563
TEST=Build and boot to OS in Skyrim with PSP and x86 verstage.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I7e259ae5d790977d08afcb0a77f8d4f38c85f39e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66134
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-27 13:41:30 +00:00
Karthikeyan Ramasubramanian
b5ff9b9f3f soc/amd/sabrina: Do not pass SHA operation mode
Currently only SHA_GENERIC is used and does not need to be passed.

BUG=b:217414563
TEST=Build and boot to OS in Skyrim with PSP and x86 verstage.

Change-Id: Id705b1361fffaf940c51515e7f77d7fb0677fc4a
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-27 13:41:19 +00:00
Franklin Lin
573fa36c3a mb/google/brya/crota: Remove MAC address passthru support
ChromeOS connection manager (shill) already
has support for dock MAC address passthrough, therefore remove the
code to pass a dock's MAC address in ACPI.

BUG=b:235045188
TEST=build coreboot

Signed-off-by: Franklin Lin <franklin_lin@wistron.corp-partner.google.com>
Change-Id: I78320a7c6b0fd5392e24b63bff234229a3f4b9bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66040
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-27 13:41:06 +00:00
Eric Lai
c1b01ea9f5 mb/google/brya/var/ghost: Update memory DQ map
Follow latest schematic 6/27 to update the DQ map.

BUG=b:240006200
BRANCH=firmware-brya-14505.B
TEST=build passed.

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: I8d0de04a001cab53a245185707ebc9da7a501ec4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66122
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2022-07-27 13:40:50 +00:00
Reka Norman
93928194c4 drivers/wifi/generic: Revert changes to generate missing SSDT for PCIe
wifi

This reverts commit 5e6fd360de.

On nereid, the SSDT entry for the PCIe wifi device is missing, causing
wake-on-WLAN not to work since the _PRW is missing.

It seems like when commit 5e6fd360de changed the SSDT generation logic
for CNVi and PCIe wifi, it broke the PCIe case. `wifi_pcie_ops` are
never assigned to any device, so
`parent && parent->ops == &wifi_pcie_ops` always returns false, and the
`wifi_cnvi_ops` are used even for PCIe devices.

Undo the changes in that CL. This allows both the CNVi and PCIe cases to
work. That CL was meant to fix an issue with the CNVi _PRW containing
garbage, but I can't reproduce this when the change is undone.

It was also meant to fix the following error on CNVi devices, but I
don't see any errors with this change:
[ERROR]  NONE missing set_resources

BUB=b:233325709
TEST=On both nivviks (CNVi) and nereid (PCIe), check that the SSDT
contains the correct wifi device entries (below), including a _PRW
containing the correct GPE, and check that wake-on-WLAN works.

nivviks:
```
    Scope (\_SB.PCI0.CNVW)
    {
        Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
        {
            0x6D,
            0x03
        })
        Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
        {
            <snip>
        }
    }
```

nereid:
```
    Device (\_SB.PCI0.RP01.WF00)
    {
        Name (_UID, 0x923ACF1C)  // _UID: Unique ID
        Name (_DDN, "WIFI Device")  // _DDN: DOS Device Name
        Name (_ADR, 0x0000000000000000)  // _ADR: Address
    }

    Scope (\_SB.PCI0.RP01.WF00)
    {
        Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
        {
            0x23,
            0x03
        })
        Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
        {
            <snip>
        }
    }
```

Fixes: 5e6fd360de ("drivers/wifi/generic: Fix properties in generic-under-PCI device case")
Change-Id: I100c5ee3842997c50444e5ce68d583834ed3a8ad
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66063
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-27 13:39:54 +00:00
Tyler Wang
238c199c79 mb/google/nissa/var/craask: Add DPTF passive and critical policies
Add critical, passive policy, and pl values from thermal team.

BUG=b:239495499
TEST=Build and test on MB, system can boot to OS.

Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Change-Id: I8beb3b57ff56c6fe413bb0e3dd43d693aee08e36
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66125
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-07-27 13:39:43 +00:00
Srinidhi N Kaushik
9a69002311 soc/intel/meteorlake: Use coreboot native event handler for FSP-S
Beginning FSP 2.2 specifications Fsps Config Upd "FspEventHandler"
was moved to Fsps Arch Upd. Hence we were not seeing Fsps Debug
log was not using coreboot debug library.

This change assigns Fspd Arch Upd FspEventHandler with coreboot
ramstage debug handler when FSP_USES_CB_DEBUG_EVENT_HANDLER
Kconfig is enabled.

Before:

Dumping FSPS_UPD - Size: 0x00001510
0x00000000: 0x41 0x44 0x4C 0x55 0x50 0x44 0x5F 0x53 0x02 0x00 0x00
0x00000010: 0x00

With the fix:

[SPEW ]  Dumping FSPS_UPD - Size: 0x00001528
[SPEW ]  0x00000000: 0x41 0x44 0x4C 0x55 0x50 0x44 0x5F 0x53 0x02
[SPEW ]  0x00000010: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[SPEW ]  0x00000020: 0x01 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0xAA
[SPEW ]  0x00000030: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[SPEW ]  0x00000040: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

BUG=b:237263080
TEST=Able to build and boot MTL RVP, verified the FSP-S debug
log is using coreboot debug library.

Signed-off-by: Srinidhi N Kaushik <srinidhi.n.kaushik@intel.com>
Change-Id: Ie63258f6427b3da7927a866bc3767f548b16e3e2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66146
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-07-27 13:39:25 +00:00
Matt DeVillier
845222f739 payloads/tianocore: Fix bootsplash/logo handling
commit 108e537928
("payloads/tianocore: Add a proper target for the Boot Splash")
introduced 2 bugs in bootsplash handling:

- the "logo" make target added a spurious "/edk2" to the project dir
- the "logo" make target failed to account for the case where no user-
  defined logo file is used (the upstream Tianocore one will be used
  in this case)

Fix both these issues.

Test: build/boot qemu w/Tianocore w/o user-defined bootsplash file.

Change-Id: Ieebc547670213459823f58956ae87c6bf94b74ef
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66142
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:39:17 +00:00
Leo Chou
f92ea61e84 mb/google/nissa/var/pujjo: Enable PCIe port 4 for WLAN
Pujjo support WLAN device, enable PCIe port 4 for WLAN device

BUG=b:239899932
TEST=Build and boot on pujjo

Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Change-Id: Ic8b7240941cf87a4f27963d50fffe28875114a81
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66073
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-27 13:37:23 +00:00
Angel Pons
7127013f7c payloads/ext/tianocore/Makefile: Fix word in comment
revalant ---> relevant

Change-Id: Id31a57644947bf8c0f461dbfc9ca8b1984e9acb8
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66151
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-27 13:37:03 +00:00
Yu-Ping Wu
3b9d6a41b3 soc/mediatek/mt8195: Skip PCIe ops for eMMC SKUs
To avoid unnecessary PCIe early initialization for non-NVMe devices
(which would take about 150ms on dojo), skip setting PCIe ops when
initializing mt8195 SoC.

BUG=b:238850212
TEST=emerge-cherry coreboot
TEST=Dojo SKU1 (eMMC) boot time <= 1s
BRANCH=cherry

Change-Id: I8945890ba422c0c4eb42683935220b7afbb80dfd
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2022-07-27 13:00:05 +00:00
Yu-Ping Wu
7b7250dfae mb/google/cherry: Introduce mainboard_needs_pcie_init
Implement mainboard_needs_pcie_init() for cherry as a callback for
mt8195 SoC to determine whether to initialize PCIe. When the SKU id is
unknown or unprovisioned (for example at the beginning of the factory
flow), we should still initialize PCIe. Otherwise the devices with NVMe
will fail to boot.

BUG=b:238850212
TEST=emerge-cherry coreboot
BRANCH=cherry

Change-Id: I2ed0ceeb37d2924ca16485fb2d130959a7eff102
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65992
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2022-07-27 12:59:59 +00:00
David Wu
df721bd0c3 mb/google/brask/var/kuldax: correct Type-A USB3 port0/1 tx_de_emp
1. Set Type-A USB3 port0/1 tx_de_emp to 0x2B to fix the USB3 Gen2 RX
   signal integrity issue.
2. Disable unused USB port.

BUG=b:238230292
TEST=build FW and check Type-A USB3 port0/port1 RX pass

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I8356ca30a965e5774a1556c5cb81e1586c55496c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66118
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-26 20:36:31 +00:00
Karthikeyan Ramasubramanian
234e37099a util/amdfwtool: Update the location of PSP verstage and signing key
On SoCs which use A/B recovery layout, PSP verstage and signing keys are
expected to be present only in PSP L2 directory. Update amdfwtool to
include the PSP verstage and signing key only in PSP L2 directory.

BUG=b:239519603, b:238938623
TEST=Build and boot to OS in Skyrim with PSP verstage.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: Ieeb415be800b7ccf10d6983eb0b567e0a5eaa955
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66128
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-26 20:36:04 +00:00
Reka Norman
1411ecf6f0 mb/google/nissa/var/joxer: Configure descriptor for eMMC or UFS
Joxer will have both eMMC and UFS SKUs, which require different
settings in the descriptor. So update the descriptor at run-time based
on fw_config.

By default, the descriptor is configured for UFS. This configuration
still boots fine on eMMC SKUs, it just might cause problems with S0ix.

This is a temporary workaround. It will be removed once we've
implemented a proper solution for configuring the descriptor differently
for different SKUs.

BUG=b:238234376
TEST=Make an identical change for nivviks. On both nivviks (eMMC) and
nirwen (UFS), check that it boots and that the logs show the descriptor
being configured as expected.

Change-Id: I14232eb773936f2ecd183687208d332136935601
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65870
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-07-26 12:42:24 +00:00
Rex-BC Chen
202f60b960 soc/mediatek/mt8188: Initialize SSPM
SSPM is "Secure System Power Manager" that provides power control in
secure domain. The initialization flow is to load SSPM firmware to
its SRAM space and then enable.

It takes 21 ms to load sspm.bin.

coreboot logs:
CBFS: Found 'sspm.bin' @0x21680 size 0xa815 in mcache @0xffffeac4
mtk_init_mcu: Loaded (and reset) sspm.bin in 21 msecs (137348 bytes)

TEST=we can see the sspm logs.
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Ib6443b64734048c1d71eeac650f36d7c4ac709cf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66067
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-26 12:41:36 +00:00
Rex-BC Chen
0c7a0f9638 soc/mediatek/mt8188: Initialize MCUPM
Load MCUPM firmware and boot up MCUPM in ramstage.

It takes 41 ms to load mcupm.bin.

coreboot logs:
CBFS: Found 'mcupm.bin' @0x12580 size 0xf0c6 in mcache @0xffffead0
mtk_init_mcu: Loaded (and reset) mcupm.bin in 41 msecs (122184 bytes)

TEST=we can see the mcupm logs after reset releases.
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Id1e62d9d6ede1c453e03eeda0d9b16fafa9e2372
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66066
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-26 12:40:59 +00:00
Sean Rhodes
108e537928 payloads/tianocore: Add a proper target for the Boot Splash
edk2's default is to show a Boot Splash with their own logo which
looks like it's from the 1960's. Therefore, we replace this image
with coreboot's logo, taken from https://coreboot.org unless a
custom one is specified.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1b133e2a2cfd45a6650e4523b267f7508974137b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65881
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-07-25 23:46:11 +00:00
Kapil Porwal
b1c9f7fd12 mb/google/rex: Set GPIO Tier-1 GPEs in devicetree
Set GPE route as
GPE0_DW0 -> GPP_A
GPE0_DW1 -> GPP_E
GPE0_DW2 -> GPP_F

BUG=b:224325352
TEST=Verified in emulator that there is no regression

Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: I5e3e09cfc06d2556ea32cca23b3dae114a510498
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66011
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-25 21:15:32 +00:00
Subrata Banik
15faf7ea6a Revert "soc/intel/meteorlake: Align TCSS functions through SBI"
This reverts commit b57d172fbb.

Reason for revert: Results into hard hang with serial debug msg as
below:
`[EMERG]  Unable to unhide the P2SB device!`

Intel team is working towards to fix this issue.

BUG=b:239806774
TEST=Able to boot the Intel/MTLRVP with this revert.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ic6be37c000afdf4f0c6c22497c233aa0bbc49d48
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65500
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-25 21:15:04 +00:00
Subrata Banik
8795c42d29 mb/google/rex: Override LP5 CCC config
This patch overrides `Lp5CccConfig` UPD as per the CCC mapping data
captured from the Rex schematics dated 07/16.

BUG=b:224325352
TEST=Able to build Google/Rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ia1d9e3665cff74a803e730c76f62773996efb3dd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66049
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-25 15:30:22 +00:00
Subrata Banik
bae1de1ac0 soc/intel/meteorlake: Choose PCR write to lock GPIO PAD
Set the SOC_INTEL_COMMON_BLOCK_GPIO_LOCK_USING_PCR config on Meteor Lake
to instruct Pad Configuration Lock.

BUG=b:211573253, b:211950520, b:213596994
TEST=Able to perform GPIO lock programming without error on MTLRVP.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Icd123adb02716149fa51c9e4c987c281f9de2f43
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66048
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-07-25 15:30:07 +00:00
Sean Rhodes
5f40fc61c6 mb/starlabs/lite: Add support for VBOOT
Add the required files to support VBOOT for when it is enabled.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I083107b21c23f42193fc88aa174ec22850f45bc8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65705
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-07-25 10:07:03 +00:00
Subrata Banik
fb28799ed5 arch/x86: Fix MAX_CPUS check proper for late X2APIC config
The X2APIC_LATE_WORKAROUND kconfig allows bringing APs in XAPIC mode initially hence, it won't work if LAPIC ID is > 0xff.

This patch ensures the MAX_CPUS logic is appropriate while selecting X2APIC_LATE_WORKAROUND kconfig from SoC.

BUG=b:219061518, b:219053812
TEST=Able to build Google/Rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I466e6cc568024a9dea80af21e0ebf3572e74a1f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66110
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-07-25 10:06:18 +00:00
Leo Chou
4b31af493d mb/google/nissa/var/pujjo: Add new supported memory part
Add pujjo new supported memory parts in mem_parts_used.txt.
Generate SPD id for this part.

Micron MT62F1G32D4DR-031 WT:B

BUG=b:239776504
TEST=Use part_id_gen to generate related settings

Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Change-Id: I95eb194ecbd5d39f66eb566132e75af056899325
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66039
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-07-25 01:03:52 +00:00
Subrata Banik
222852a264 soc/intel/gpio: Update GPIO Lock configuration recommendation
This patch updates the GPIO lock configuration recommendation
kconfig string to ensure the SoC user can select the correct
config as applicable for the SoC.

Note: From MTL onwards GPIO lock config can be performed using
PCR write (MMIO write) and the GPIO team has confirmed this.

BUG=b:213596994
TEST=Able to fix below GPIO lock config error msg on MTL with
`SOC_INTEL_COMMON_BLOCK_GPIO_LOCK_USING_PCR` kconfig enabled.
[INFO ]  Locking pad configuration using SBI
[INFO ]  gpio_pad_config_lock_using_sbi: Locking pad 73
         configuration
[ERROR]  SBI Failure: Transaction Status = 1
[ERROR]  Failed to lock GPIO PAD, response = 1

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Icab1e4849b8e08ee1c695c924599f1513774178f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66113
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-25 01:01:58 +00:00
Subrata Banik
471e24e987 mb/google/rex: Add memory configuration board straps
This patch reads various memory configuration GPIOs to fill in below
details:
1. variant_memory_sku()
2. variant_is_half_populated()

BUG=b:224325352
TEST=Able to build Google/Rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I23bad8c78523cb56008e6d67e7776e57e42fbeb9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66041
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2022-07-25 01:01:19 +00:00
Subrata Banik
653e157eea soc/intel/meteorlake: Debug consent is set to 3 (USB3 DbC)
This patch ensures the debug consent value is matching with the
inline comment.

TEST=Able to build the Google/Rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Icf72eb2aa4064fd78f4f99570a4cf44e41932ec3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66008
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-25 01:00:35 +00:00
Felix Singer
c5f7055746 mb/lenovo: Integrate W541 into haswell mainboard
Lots of code from lenovo/haswell can be reused for lenovo/w541. Thus,
integrate it into lenovo/haswell and make it a variant.

Change-Id: If99d842cff777fe27ff63baabc447e69b9d0333c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-07-24 22:24:49 +00:00
Felix Singer
b5bdd70758 mb/lenovo/haswell: Make INT15 support T440p specific
In preparation to CB:63514, make the INT15 support specific for the
T440p variant since the W541 doesn't support it currently.

Change-Id: I8dfcc061e1b8a831f75bf9a8035770cb678a85d4
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66106
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-24 22:24:24 +00:00
Felix Singer
104b7db894 mb/lenovo/haswell: Hook up variants Makefile
Change-Id: I36091118d98f71dc4141aca4e45858a22d519a9b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66107
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-07-24 22:24:13 +00:00
413 changed files with 12220 additions and 1461 deletions

32
.gitmodules vendored
View File

@@ -1,63 +1,63 @@
[submodule "3rdparty/blobs"]
path = 3rdparty/blobs
url = ../blobs.git
url = https://review.coreboot.org/blobs.git
update = none
ignore = dirty
[submodule "util/nvidia-cbootimage"]
path = util/nvidia/cbootimage
url = ../nvidia-cbootimage.git
url = https://review.coreboot.org/nvidia-cbootimage.git
[submodule "vboot"]
path = 3rdparty/vboot
url = ../vboot.git
url = https://review.coreboot.org/vboot.git
branch = main
[submodule "arm-trusted-firmware"]
path = 3rdparty/arm-trusted-firmware
url = ../arm-trusted-firmware.git
url = https://review.coreboot.org/arm-trusted-firmware.git
[submodule "3rdparty/chromeec"]
path = 3rdparty/chromeec
url = ../chrome-ec.git
url = https://review.coreboot.org/chrome-ec.git
[submodule "libhwbase"]
path = 3rdparty/libhwbase
url = ../libhwbase.git
url = https://review.coreboot.org/libhwbase.git
[submodule "libgfxinit"]
path = 3rdparty/libgfxinit
url = ../libgfxinit.git
url = https://review.coreboot.org/libgfxinit.git
[submodule "3rdparty/fsp"]
path = 3rdparty/fsp
url = ../fsp.git
url = https://review.coreboot.org/fsp.git
update = none
ignore = dirty
[submodule "opensbi"]
path = 3rdparty/opensbi
url = ../opensbi.git
url = https://review.coreboot.org/opensbi.git
[submodule "intel-microcode"]
path = 3rdparty/intel-microcode
url = ../intel-microcode.git
url = https://review.coreboot.org/intel-microcode.git
update = none
ignore = dirty
branch = main
[submodule "3rdparty/ffs"]
path = 3rdparty/ffs
url = ../ffs.git
url = https://review.coreboot.org/ffs.git
[submodule "3rdparty/amd_blobs"]
path = 3rdparty/amd_blobs
url = ../amd_blobs
url = https://review.coreboot.org/amd_blobs
update = none
ignore = dirty
[submodule "3rdparty/cmocka"]
path = 3rdparty/cmocka
url = ../cmocka.git
url = https://review.coreboot.org/cmocka.git
update = none
branch = stable-1.1
[submodule "3rdparty/qc_blobs"]
path = 3rdparty/qc_blobs
url = ../qc_blobs.git
url = https://review.coreboot.org/qc_blobs.git
update = none
ignore = dirty
[submodule "3rdparty/intel-sec-tools"]
path = 3rdparty/intel-sec-tools
url = ../9esec-security-tooling.git
url = https://review.coreboot.org/9esec-security-tooling.git
[submodule "3rdparty/stm"]
path = 3rdparty/stm
url = ../STM
url = https://review.coreboot.org/STM
branch = stmpe

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

View File

@@ -44,8 +44,17 @@ The SPI flash can be accessed using [flashrom].
External programming with an SPI adapter and [flashrom] does work, but it powers the
whole southbridge complex. You need to supply enough current through the programming adapter.
If you want to use a SOIC pomona test clip, you have to cut the 2nd DRAM DIMM holder,
as otherwise there's not enough space near the flash.
If you want to use a SOIC pomona test clip, you have to cut the 2nd DRAM DIMM holder, as
otherwise there's not enough space near the flash.
In both case, if ME has not been completely disabled, ME/AMT Flash Override jumper had better
be temporary closed for flashing to disable the locking of regions, and prevent ME to run and
interfere.
## Side note
The mainboard of [HP Compaq Elite 8300 SFF] is very similar to the one of Z220 SFF, except
that Compaq Elite 8300 uses Q77 instead of C216 for its PCH, and their boot firmwares are
even interchangeable, so should do coreboot images built for them.
## Technology
@@ -66,5 +75,6 @@ as otherwise there's not enough space near the flash.
```
[HP Z220 SFF Workstation]: https://support.hp.com/za-en/document/c03386950
[HP Compaq Elite 8300 SFF]: https://support.hp.com/us-en/document/c03345460
[HP]: https://www.hp.com/
[flashrom]: https://flashrom.org/Flashrom

View File

@@ -202,16 +202,20 @@ The boards in this section are not real mainboards, but emulators.
- [Bonobo Workstation 14](system76/bonw14.md)
- [Darter Pro 6](system76/darp6.md)
- [Darter Pro 7](system76/darp7.md)
- [Darter Pro 8](system76/darp8.md)
- [Galago Pro 4](system76/galp4.md)
- [Galago Pro 5](system76/galp5.md)
- [Gazelle 15](system76/gaze15.md)
- [Gazelle 16](system76/gaze16.md)
- [Gazelle 17](system76/gaze17.md)
- [Lemur Pro 9](system76/lemp9.md)
- [Lemur Pro 10](system76/lemp10.md)
- [Lemur Pro 11](system76/lemp11.md)
- [Oryx Pro 5](system76/oryp5.md)
- [Oryx Pro 6](system76/oryp6.md)
- [Oryx Pro 7](system76/oryp7.md)
- [Oryx Pro 8](system76/oryp8.md)
- [Oryx Pro 9](system76/oryp9.md)
## Texas Instruments

View File

@@ -0,0 +1,82 @@
# Syste76 Darter Pro 8 (darp8)
## Specs
- CPU
- Intel Core i5-1240P
- Intel Core i7-1260P
- EC
- ITE IT5570E running [System76 EC](https://github.com/system76/ec)
- Graphics
- Intel Iris Xe Graphics
- eDP 15.6" 1920x1080@60Hz LCD
- 1x HDMI
- 1x DisplayPort 1.4 over USB-C
- Memory
- Up to 64GB (2x32GB) dual-channel DDR4 SO-DIMMs @ 3200 MHz
- Networking
- Gigabit Ethernet
- M.2 NVMe/CNVi WiFi/Bluetooth (Intel Wi-Fi 6 AX200/201)
- Power
- 90W (19V, 4.74A) AC barrel adapter (Chicony A16-090P1A)
- USB-C charging, compatible with 65W+ chargers
- 73Wh 4-cell Lithium-ion battery (L140BAT-4)
- Sound
- Realtek ALC256 codec
- Internal speakers and microphone
- Combined 3.5mm headphone/microphone jack
- HDMI, USB-C DisplayPort audio
- Storage
- M.2 PCIe NVMe Gen 4 SSD
- M.2 PCIe NVMe Gen 3 or SATA 3 SSD
- MicroSD card reader (OZ711LV2)
- USB
- 1x USB-C Type-C with Thunderbolt 4
- 1x USB 3.2 (Gen 2) Type-C
- 1x USB 3.2 (Gen 2) Type-A
- 1x USB 2.0 Type-A
- Dimensions
- 35.7cm x 22.05cm x 1.99cm, 1.74kg
## Flashing coreboot
```eval_rst
+---------------------+---------------------+
| Type | Value |
+=====================+=====================+
| Socketed flash | no |
+---------------------+---------------------+
| Vendor | GigaDevice |
+---------------------+---------------------+
| Model | GD25B256E |
+---------------------+---------------------+
| Size | 32 MiB |
+---------------------+---------------------+
| Package | WSON-8 |
+---------------------+---------------------+
| Internal flashing | yes |
+---------------------+---------------------+
| External flashing | yes |
+---------------------+---------------------+
```
```eval_rst
+---------------------+---------------------+
| Type | Value |
+=====================+=====================+
| Socketed flash | no |
+---------------------+---------------------+
| Vendor | Winbond |
+---------------------+---------------------+
| Model | W25Q256.V |
+---------------------+---------------------+
| Size | 32 MiB |
+---------------------+---------------------+
| Package | WSON-8 |
+---------------------+---------------------+
| Internal flashing | yes |
+---------------------+---------------------+
| External flashing | yes |
+---------------------+---------------------+
```
The flash chip (U19) is above the left DIMM slot.

View File

@@ -0,0 +1,65 @@
# System76 Gazelle 17 (gaze17)
The gaze17 comes in 2 variants: gaze17-3050 and gaze17-3060-b.
## Specs
- CPU
- Intel Core i5-12500H
- Intel Core i7-12700H
- EC
- ITE IT5570E running [System76 EC](https://github.com/system76/ec)
- Graphics
- dGPU options
- NVIDIA GeForce RTX 3050
- NVIDIA GeForce RTX 3050 Ti
- NVIDIA GeForce RTX 3060
- Memory
- Up to 64GB (2x32GB) dual-channel DDR4 SO-DIMMs @ 3200 MT/s
- Networking
- Gigabit Ethernet
- 3050: Realtek RTL8111H controller
- 3060: Onboard Intel I219-V
- M.2 PCIe/CNVi WiFi/Bluetooth
- Intel Wi-Fi 6 AX201
- Power
- 3050: 150W (20V, 7.5A) AC barrel adapter
- 3060: 180W (20V, 9A) AC barrel adapter
- Lite-On PA-1181-76, using a C5 power cord
- 54Wh 4-cell Li-ion battery (NP50BAT-4-54)
- Sound
- Realtek ALC256 codec
- Internal speakers and microphone
- Combined 3.5mm headphone/microphone jack
- Dedicated 3.5mm microphone jack
- Storage
- 1x M.2 PCIe NVMe Gen 4 SSD
- 1x M.2 PCIe NVMe Gen 3 or SATA 3 SSD
- MicroSD card reader (Realtek RTS5227S/OZ711LV2)
## Flashing coreboot
```eval_rst
+---------------------+---------------------+
| Type | Value |
+=====================+=====================+
| Socketed flash | no |
+---------------------+---------------------+
| Vendor | GigaDevice |
+---------------------+---------------------+
| Model | GD25B256E |
+---------------------+---------------------+
| Size | 32 MiB |
+---------------------+---------------------+
| Package | WSON-8 |
+---------------------+---------------------+
| Internal flashing | yes |
+---------------------+---------------------+
| External flashing | yes |
+---------------------+---------------------+
```
The position of the flash chip depends on the variant:
- 3050: U24, below the bottom DIMM slot.
- 3060: U55, left of the PCIe 4.0 M.2 slot.

View File

@@ -0,0 +1,62 @@
# System76 Lemur Pro 11 (lemp11)
## Specs
- CPU
- Intel Core i5-1235U
- Intel Core i7-1255U
- EC
- ITE IT5570E running [System76 EC](https://github.com/system76/ec)
- Graphics
- Intel Iris Xe Graphics
- eDP 14.0" 1920x1080@60Hz LCD
- 1x HDMI 2.1
- 1x DisplayPort 1.4 over USB-C
- Memory
- Channel 0: 8-GB on-board DDR4 (Samsung K4AAG165WA-BCWE)
- Channel 1: 8-GB/16-GB/32-GB DDR4 SO-DIMM @ 3200 MHz
- Networking
- M.2 NVMe/CNVi WiFi/Bluetooth (Intel Wi-Fi 6 AX200/201)
- Power
- 65W (19V, 3.42A) AC barrel adapter (AcBel ADA012)
- USB-C charging, compatible with 65W+ chargers
- 73Wh 4-cell Lithium-ion battery (L140BAT-4)
- Sound
- Realtek ALC256 codec
- Internal speakers and microphone
- Combined 3.5 mm headphone/microphone jack
- HDMI, USB-C DisplayPort audio
- Storage
- M.2 PCIe NVMe Gen 4 SSD
- M.2 PCIe NVMe Gen 3 or SATA 3 SSD
- MicroSD card reader (RTS5227S)
- USB
- 1x USB Type-C with Thunderbolt 4
- 1x USB 3.2 (Gen 2) Type-A
- 1x USB 3.2 (Gen 1) Type-A
- Dimensions
- 1.65cm x 32.2cm x 21.68cm, 1.15kg
## Flashing coreboot
```eval_rst
+---------------------+---------------------+
| Type | Value |
+=====================+=====================+
| Socketed flash | no |
+---------------------+---------------------+
| Vendor | Macronix |
+---------------------+---------------------+
| Model | MX25L25673G |
+---------------------+---------------------+
| Size | 32 MiB |
+---------------------+---------------------+
| Package | WSON-8 |
+---------------------+---------------------+
| Internal flashing | yes |
+---------------------+---------------------+
| External flashing | yes |
+---------------------+---------------------+
```
The flash chip (U41) is left of the DIMM slot.

View File

@@ -0,0 +1,44 @@
# System76 Oryx Pro 9 (oryp9)
## Specs
- CPU
- Intel Core i7-12700H
- EC
- ITE IT5570E running [System76 EC](https://github.com/system76/ec)
- Graphics
- Memory
- Up to 64GB (2x32GB) dual-channel DDR4 SO-DIMMs @ 3200 MHz
- Networking
- Gigabit Ethernet
- M.2 NVMe/CNVi WiFi/Bluetooth (Intel Wi-Fi 6 AX200/201)
- Power
- Sound
- Storage
- USB
- Dimensions
- 35.8cm x 24.0cm x 2.49cm, 2.4kg
## Flashing coreboot
```eval_rst
+---------------------+---------------------+
| Type | Value |
+=====================+=====================+
| Socketed flash | no |
+---------------------+---------------------+
| Vendor | Macronix |
+---------------------+---------------------+
| Model | MX25L25673G |
+---------------------+---------------------+
| Size | 32 MiB |
+---------------------+---------------------+
| Package | WSON-8 |
+---------------------+---------------------+
| Internal flashing | yes |
+---------------------+---------------------+
| External flashing | yes |
+---------------------+---------------------+
```
The flash chip (U61) is left of the DIMM slots.

View File

@@ -211,6 +211,7 @@
- Marzipan
- Mrbland
- Pazquel
- Pazquel360
- Pompom
- Quackingstick
- Wormdingler

View File

@@ -362,7 +362,11 @@ M: Angel Pons <th3fanbus@gmail.com>
S: Maintained
F: src/mainboard/msi/h81m-p33/
MSI MS-7D25 MAINBOARDS
M: Michał Żygowski <michal.zygowski@3mdeb.com>
M: Michał Kopeć <michal.kopec@3mdeb.com>
S: Maintained
F: src/mainboard/msi/ms7d25/
OCP DELTALAKE MAINBOARD
M: Arthur Heymans <arthur@aheymans.xyz>

View File

@@ -173,14 +173,16 @@ $(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG)
CONFIG_TIANOCORE_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT) \
CONFIG_TIANOCORE_CBMEM_LOGGING=$(CONFIG_TIANOCORE_CBMEM_LOGGING) \
CONFIG_TIANOCORE_FOLLOW_BGRT_SPEC=$(CONFIG_TIANOCORE_FOLLOW_BGRT_SPEC) \
CONFIG_TIANOCORE_FULL_SCREEN_SETUP=$(CONFIG_TIANOCORE_FULL_SCREEN_SETUP) \
CONFIG_TIANOCORE_HAVE_EFI_SHELL=$(CONFIG_TIANOCORE_HAVE_EFI_SHELL) \
CONFIG_TIANOCORE_PRIORITIZE_INTERNAL=$(CONFIG_TIANOCORE_PRIORITIZE_INTERNAL) \
CONFIG_TIANOCORE_PS2_SUPPORT=$(CONFIG_TIANOCORE_PS2_SUPPORT) \
CONFIG_TIANOCORE_SERIAL_SUPPORT=$(TIANOCORE_SERIAL_SUPPORT) \
CONFIG_TIANOCORE_SERIAL_SUPPORT=$(CONFIG_TIANOCORE_SERIAL_SUPPORT) \
CONFIG_TIANOCORE_SD_MMC_TIMEOUT=$(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) \
CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \
CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \
CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \
GCC_CC_x86_32=$(GCC_CC_x86_32) \
GCC_CC_x86_64=$(GCC_CC_x86_64) \
GCC_CC_arm=$(GCC_CC_arm) \

View File

@@ -52,7 +52,7 @@ config TIANOCORE_REPOSITORY
config TIANOCORE_TAG_OR_REV
string "Insert a commit's SHA-1 or a branch name"
default "origin/uefipayload_202107" if TIANOCORE_UEFIPAYLOAD
default "origin/uefipayload_202207" if TIANOCORE_UEFIPAYLOAD
default "origin/master" if TIANOCORE_UPSTREAM
default "origin/coreboot_fb" if TIANOCORE_COREBOOTPAYLOAD
help
@@ -94,17 +94,25 @@ config TIANOCORE_ABOVE_4G_MEMORY
config TIANOCORE_BOOTSPLASH_FILE
string "Tianocore Bootsplash path and filename"
default "bootsplash.bmp"
default "Documentation/coreboot_logo.bmp"
help
Select this option if you have a bootsplash image that you would
like to be used. If this option is not selected, the default
The path and filename of the file to use as graphical bootsplash
image. If this option is not configured, the default
coreboot logo (European Brown Hare) will used.
The path and filename of the file to use as graphical bootsplash
image. The file must be an uncompressed BMP, in BMP 3 format.
You can use any image format supported by imagemagick, a list of which
can be found [here](https://imagemagick.org/script/formats.php).
Linux can create these with the below command:
`convert splosh.bmp BMP3:splash.bmp`
The build process will automatically convert this to the format that
EDK2 requires, which is an uncompressed BMP, in BMP3 format. It does
this using imagemagick (`convert splosh.bmp BMP3:splash.bmp`).
The newly formatted file will be the dimensions size as the original
one.
The build process will automatically do this conversion, so it can
be supplied with any format that imagemagick can process (which is
pretty much any!).
This image will also be used as the BGRT boot image, which may
persist through your OS boot process.
@@ -150,6 +158,14 @@ config TIANOCORE_FOLLOW_BGRT_SPEC
the Boot Logo 38.2% will be vertically centered 38.2% from
the top of the display.
config TIANOCORE_FULL_SCREEN_SETUP
bool "Use the full screen for the edk2 frontpage"
default y
help
Allow edk2 to use the full screen to display the frontpage
(aka "Boot Menu"). With this option disable, it will be
limited to 640x480.
config TIANOCORE_HAVE_EFI_SHELL
bool "Include EFI Shell"
default y
@@ -194,15 +210,14 @@ config TIANOCORE_USE_8254_TIMER
endif
if TIANOCORE_CUSTOM
config TIANOCORE_CUSTOM_BUILD_PARAMS
string "TianoCore additional custom build parameters"
default "-D VARIABLE_SUPPORT=SMMSTORE" if TIANOCORE_UEFIPAYLOAD && SMMSTORE_V2
help
Custom TianoCore forks may have different sets of parameters passed
to build command. You may specify additional parameters to the custom
TianoCore build
endif
edk2 has build options that are not modified by coreboot, and these can be
found in `UefiPayloadPkg/UefiPayloadPkg.dsc`. Forks may also support
additional build options that should have been upstreamed but have not.
This option can support both macros `-D` and Pcds `--pcd`.
endif

View File

@@ -78,16 +78,18 @@ BUILD_STR += -D USE_CBMEM_FOR_CONSOLE=TRUE
endif
# SD_MMC_TIMEOUT = 1000000
ifneq ($(CONFIG_TIANOCORE_SD_MMC_TIMEOUT),)
BUILD_STR += -D SD_MMC_TIMEOUT=$(call int-multiply, $(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) 1000)
BUILD_STR += -D SD_MMC_TIMEOUT=$(shell echo $$(( $(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) * 1000)) )
endif
#
# EDKII has the below PCDs that are revalant to coreboot:
# EDKII has the below PCDs that are relevant to coreboot:
#
# Allows EDKII to use the full framebuffer
ifeq ($(CONFIG_TIANOCORE_FULL_SCREEN_SETUP),y)
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow=0
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn=0
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow=0
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn=0
endif
#
# The below are legacy options only available in CorebootPayloadPkg:
#
@@ -104,11 +106,9 @@ endif # CONFIG_TIANOCORE_COREBOOTPAYLOAD
bootloader = $(word 8,$(subst /, ,$(BUILD_STR)))
ifeq ($(CONFIG_TIANOCORE_CUSTOM),y)
ifneq ($(CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS),)
BUILD_STR += $(CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS)
endif
endif
all: clean build
@@ -136,18 +136,37 @@ update: $(project_dir)
fi; \
git submodule update --init --checkout
logo: $(project_dir)
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
"") ;; \
/*) convert -background None $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
*) convert -background None $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
esac \
checktools:
echo "Checking uuid-dev..."
echo -n "EDK2: Checking uuid-dev:"
echo "#include <uuid/uuid.h>" > libtest.c
echo "int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }" >> libtest.c
$(HOSTCC) $(HOSTCCFLAGS) libtest.c -o libtest >/dev/null 2>&1 && echo " found uuid-dev." || \
( echo " Not found."; echo "ERROR: please_install uuid-dev (libuuid-devel)"; exit 1 )
$(HOSTCC) $(HOSTCCFLAGS) libtest.c -o libtest >/dev/null 2>&1 && echo " Found!" || \
( echo " Not found!"; \
echo "ERROR: please_install uuid-dev (libuuid-devel)"; exit 1 )
rm -rf libtest.c libtest
echo "Checking nasm..."
type nasm > /dev/null 2>&1 && echo " found nasm." || \
( echo " Not found."; echo "Error: Please install nasm."; exit 1 )
echo -n "EDK2: Checking nasm:"
type nasm > /dev/null 2>&1 && echo " Found!" || \
( echo " Not found!"; echo "ERROR: Please install nasm."; exit 1 )
echo -n "EDK2: Checking imagemagick:"
-convert -size 1x1 xc: test.png &> /dev/null;
if [ -f test.png ]; then \
rm test.png && echo " Found!"; \
else \
echo " Not found!"; \
echo "ERROR: Please install imagemagick"; \
exit 1; \
fi
build: update checktools
build: update logo checktools
echo " ##### $(project_name) Build Summary #####"
echo " Repository: $(CONFIG_TIANOCORE_REPOSITORY)"
echo " Branch: $(CONFIG_TIANOCORE_TAG_OR_REV)"
@@ -160,15 +179,6 @@ build: update checktools
-e 's/q /Build: Quiet/' \
-e 's/t /Toolchain: /'
unset CC; $(MAKE) -C $(project_dir)/BaseTools 2>&1
if [ -n "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" ]; then \
echo " Copying custom bootsplash image"; \
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
/*) convert $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
*) convert $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
esac \
fi; \
cd $(project_dir); \
export EDK_TOOLS_PATH=$(project_dir)/BaseTools; \
export WORKSPACE=$(project_dir); \
@@ -188,4 +198,4 @@ clean:
distclean:
rm -rf */
.PHONY: all update checktools config build clean distclean
.PHONY: all update checktools config build clean distclean logo

View File

@@ -351,6 +351,18 @@
"ranksPerChannel": 2,
"speedMbps": 4267
}
},
{
"name": "H54G68CYRBX248",
"attribs": {
"densityPerChannelGb": 8,
"banks": 8,
"channelsPerDie": 4,
"diesPerPackage": 2,
"bitWidthPerChannel": 8,
"ranksPerChannel": 2,
"speedMbps": 4267
}
}
]
}

View File

@@ -30,3 +30,4 @@ H54G56CYRBX247,spd-3.hex
K4U6E3S4AB-MGCL,spd-1.hex
K4UBE3D4AB-MGCL,spd-3.hex
MT53E2G32D4NQ-046 WT:C,spd-7.hex
H54G68CYRBX248,spd-2.hex

View File

@@ -30,3 +30,4 @@ H54G56CYRBX247,spd-3.hex
K4U6E3S4AB-MGCL,spd-1.hex
K4UBE3D4AB-MGCL,spd-3.hex
MT53E2G32D4NQ-046 WT:C,spd-10.hex
H54G68CYRBX248,spd-2.hex

View File

@@ -109,6 +109,16 @@
"ranksPerChannel": 1,
"speedMbps": 7500
}
},
{
"name": "MT62F2G32D4DS-026 WT:B",
"attribs": {
"densityPerDieGb": 16,
"diesPerPackage": 4,
"bitWidthPerChannel": 16,
"ranksPerChannel": 2,
"speedMbps": 7500
}
}
]
}

View File

@@ -12,3 +12,4 @@ H58G56AK6BX069,spd-3.hex
MT62F1G32D4DS-031 WT:B,spd-2.hex
K3LKCKC0BM-MGCP,spd-6.hex
MT62F1G32D2DS-026 WT:B,spd-7.hex
MT62F2G32D4DS-026 WT:B,spd-8.hex

32
spd/lp5/set-0/spd-8.hex Normal file
View File

@@ -0,0 +1,32 @@
23 10 13 0E 16 22 B5 08 00 00 00 00 0A 01 00 00
00 00 09 00 00 00 00 00 AB 00 90 A8 90 C0 08 60
04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 C9 00 C5 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

View File

@@ -12,3 +12,4 @@ H58G56AK6BX069,spd-3.hex
MT62F1G32D4DS-031 WT:B,spd-2.hex
K3LKCKC0BM-MGCP,spd-5.hex
MT62F1G32D2DS-026 WT:B,spd-3.hex
MT62F2G32D4DS-026 WT:B,spd-5.hex

View File

@@ -27,12 +27,12 @@ OperationRegion(CREG, SystemIO, 0x3F8, 8)
*/
Method(DINI)
{
store(0x83, DLCR)
store(0x01, CDAT) /* 115200 baud (low) */
store(0x00, CDLM) /* 115200 baud (high) */
store(0x03, DLCR) /* word=8 stop=1 parity=none */
store(0x03, CMCR) /* DTR=1 RTS=1 Out2=Off Loop=Off */
store(0x00, CDLM) /* turn off interrupts */
DLCR = 0x83
CDAT = 1 /* 115200 baud (low) */
CDLM = 0 /* 115200 baud (high) */
DLCR = 3 /* word=8 stop=1 parity=none */
CMCR = 3 /* DTR=1 RTS=1 Out2=Off Loop=Off */
CDLM = 0 /* turn off interrupts */
}
/*
@@ -41,9 +41,9 @@ Method(DINI)
*/
Method(THRE)
{
and(CLSR, 0x20, local0)
local0 = CLSR & 0x20
while (local0 == 0) {
and(CLSR, 0x20, local0)
local0 = CLSR & 0x20
}
}
@@ -54,7 +54,7 @@ Method(THRE)
Method(OUTX, 1)
{
THRE()
store(Arg0, CDAT)
CDAT = Arg0
}
/*
@@ -75,11 +75,11 @@ Method(OUTC, 1)
*/
Method(DBGN, 1)
{
and(Arg0, 0x0f, Local0)
if (LLess(Local0, 10)) {
add(Local0, 0x30, Local0)
Local0 = Arg0 & 0x0f
if (Local0 < 10) {
Local0 += 0x30
} else {
add(Local0, 0x37, Local0)
Local0 += 0x37
}
OUTC(Local0)
}
@@ -136,10 +136,10 @@ Method(DBGO, 1)
}
} else {
Name(BDBG, Buffer(80) {})
store(Arg0, BDBG)
store(0, Local1)
BDBG = Arg0
Local1 = 0
while (One) {
store(GETC(BDBG, Local1), Local0)
Local0 = GETC(BDBG, Local1)
if (Local0 == 0) {
return (0)
}

View File

@@ -9,7 +9,7 @@ Scope(\_SB) {
/* string compare functions */
Method(MIN, 2)
{
if (LLess(Arg0, Arg1)) {
if (Arg0 < Arg1) {
Return(Arg0)
} else {
Return(Arg1)
@@ -18,7 +18,7 @@ Method(MIN, 2)
Method(SLEN, 1)
{
Store(Arg0, Local0)
Local0 = Arg0
Return(Sizeof(Local0))
}
@@ -26,36 +26,36 @@ Method(S2BF, 1, Serialized)
{
Local0 = SLEN(Arg0) + 1
Name(BUFF, Buffer(Local0) {})
Store(Arg0, BUFF)
BUFF = Arg0
Return(BUFF)
}
/* Strong string compare. Checks both length and content */
Method(SCMP, 2)
{
Store(S2BF(Arg0), Local0)
Store(S2BF(Arg1), Local1)
Store(Zero, Local4)
Store(SLEN(Arg0), Local5)
Store(SLEN(Arg1), Local6)
Store(MIN(Local5, Local6), Local7)
Local0 = S2BF(Arg0)
Local1 = S2BF(Arg1)
Local4 = 0
Local5 = SLEN(Arg0)
Local6 = SLEN(Arg1)
Local7 = MIN(Local5, Local6)
While(LLess(Local4, Local7)) {
Store(Derefof(Local0[Local4]), Local2)
Store(Derefof(Local1[Local4]), Local3)
While(Local4 < Local7) {
Local2 = Derefof(Local0[Local4])
Local3 = Derefof(Local1[Local4])
if (Local2 > Local3) {
Return(One)
} else {
if (LLess(Local2, Local3)) {
if (Local2 < Local3) {
Return(Ones)
}
}
Local4++
}
if (LLess(Local4, Local5)) {
if (Local4 < Local5) {
Return(One)
} else {
if (LLess(Local4, Local6)) {
if (Local4 < Local6) {
Return(Ones)
} else {
Return(Zero)
@@ -69,17 +69,16 @@ Method(SCMP, 2)
*/
Method(WCMP, 2)
{
Store(S2BF(Arg0), Local0)
Store(S2BF(Arg1), Local1)
if (LLess(SLEN(Arg0), SLEN(Arg1))) {
Local0 = S2BF(Arg0)
Local1 = S2BF(Arg1)
if (SLEN(Arg0) < SLEN(Arg1)) {
Return(0)
}
Store(Zero, Local2)
Store(SLEN(Arg1), Local3)
Local2 = 0
Local3 = SLEN(Arg1)
While(LLess(Local2, Local3)) {
if (LNotEqual(Derefof(Local0[Local2]),
Derefof(Local1[Local2]))) {
While(Local2 < Local3) {
if (Derefof(Local0[Local2]) != Derefof(Local1[Local2])) {
Return(0)
}
Local2++
@@ -92,9 +91,9 @@ Method(WCMP, 2)
*/
Method(I2BM, 1)
{
Store(0, Local0)
if (LNotEqual(ARG0, 0)) {
Store(1, Local1)
Local0 = 0
if (ARG0 != 0) {
Local1 = 1
Local0 = Local1 << ARG0
}
Return(Local0)

View File

@@ -15,19 +15,25 @@
#define __aligned(x) __attribute__((__aligned__(x)))
#endif
/* Because there may be variables/parameters whose name contains "__unused" in
header files of libc, namely musl, names consistent with the ones in the
Linux kernel may be a better choice. */
/*
* Because there may be variables/parameters whose name contains "__unused" in
* header files of libc, namely musl, names consistent with the ones in the
* Linux kernel may be a better choice.
*/
/* This is used to mark identifiers unused in all conditions, e.g. a parameter
completely unused in all code branch, only present to fit an API. */
/*
* This is used to mark identifiers unused in all conditions, e.g. a parameter
* completely unused in all code branch, only present to fit an API.
*/
#ifndef __always_unused
#define __always_unused __attribute__((__unused__))
#endif
/* This is used to mark identifiers unused in some conditions, e.g. a parameter
only unused in some code branches, a global variable only accessed with code
being conditionally preprocessed, etc. */
/*
* This is used to mark identifiers unused in some conditions, e.g. a parameter
* only unused in some code branches, a global variable only accessed with code
* being conditionally preprocessed, etc.
*/
#ifndef __maybe_unused
#define __maybe_unused __attribute__((__unused__))
#endif
@@ -52,13 +58,15 @@
#define __fallthrough __attribute__((__fallthrough__))
#endif
/* This evaluates to the type of the first expression, unless that is constant
in which case it evaluates to the type of the second. This is useful when
assigning macro parameters to temporary variables, because that would
normally circumvent the special loosened type promotion rules for integer
literals. By using this macro, the promotion can happen at the time the
literal is assigned to the temporary variable. If the literal doesn't fit in
the chosen type, -Werror=overflow will catch it, so this should be safe. */
/*
* This evaluates to the type of the first expression, unless that is constant
* in which case it evaluates to the type of the second. This is useful when
* assigning macro parameters to temporary variables, because that would
* normally circumvent the special loosened type promotion rules for integer
* literals. By using this macro, the promotion can happen at the time the
* literal is assigned to the temporary variable. If the literal doesn't fit in
* the chosen type, -Werror=overflow will catch it, so this should be safe.
*/
#define __TYPEOF_UNLESS_CONST(expr, fallback_expr) __typeof__( \
__builtin_choose_expr(__builtin_constant_p(expr), fallback_expr, expr))

View File

@@ -60,7 +60,7 @@ config X2APIC_RUNTIME
config X2APIC_LATE_WORKAROUND
prompt "Use XAPIC for AP bringup, then change to X2APIC"
bool
depends on PARALLEL_MP && MAX_CPUS < 255
depends on PARALLEL_MP && MAX_CPUS < 256
help
Choose this option if the platform supports dynamic switching between
XAPIC to X2APIC. The initial Application Processors (APs) are configured

View File

@@ -0,0 +1,10 @@
config DRIVERS_GFX_NVIDIA
bool
default n
help
Support for NVIDIA Optimus graphics
config DRIVERS_GFX_NVIDIA_BRIDGE
hex "PCI bridge for the GPU device"
default 0x01
depends on DRIVERS_GFX_NVIDIA

View File

@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
romstage-$(CONFIG_DRIVERS_GFX_NVIDIA) += romstage.c
ramstage-$(CONFIG_DRIVERS_GFX_NVIDIA) += nvidia.c

View File

@@ -0,0 +1,96 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* NVIDIA GC6 on CFL and CML CPU PCIe ports */
// Memory mapped PCI express config space
OperationRegion (PCIC, SystemMemory, CONFIG_ECAM_MMCONF_BASE_ADDRESS + (CONFIG_DRIVERS_GFX_NVIDIA_BRIDGE << 15), 0x1000)
Field (PCIC, ByteAcc, NoLock, Preserve) {
PVID, 16,
PDID, 16,
Offset (0x248),
, 7,
L23E, 1, /* L23_Rdy Entry Request */
L23R, 1, /* L23_Rdy to Detect Transition */
Offset (0xC20),
, 4,
P0AP, 2, /* Additional power savings */
Offset (0xC38),
, 3,
P0RM, 1, /* Robust squelch mechanism */
}
// Enter L23
Method (DL23, 0, Serialized) {
Printf(" GPU PORT DL23 START")
L23E = 1
Sleep (16)
Local0 = 0
While (L23E) {
If ((Local0 > 4)) {
Break
}
Sleep (16)
Local0++
}
P0RM = 1
P0AP = 3
Printf(" GPU PORT DL23 FINISH")
}
// Exit L23
Method (L23D, 0, Serialized) {
Printf(" GPU PORT L23D START")
L23R = 1
Sleep (16)
Local0 = 0
While (L23R) {
If ((Local0 > 4)) {
Break
}
Sleep (16)
Local0++
}
P0RM = 0
P0AP = 0
Printf(" GPU PORT L23D FINISH")
}
// Main power resource
PowerResource (PWRR, 0, 0) {
Name (_STA, 1)
Method (_ON, 0, Serialized) {
Printf("GPU PORT PWRR._ON")
^^DEV0._ON()
_STA = 1
}
Method (_OFF, 0, Serialized) {
Printf("GPU PORT PWRR._OFF")
^^DEV0._OFF()
_STA = 0
}
}
// Power resources for entering D0
Name (_PR0, Package () { PWRR })
// Power resources for entering D3
Name (_PR3, Package () { PWRR })
#include "common/gpu.asl"

View File

@@ -0,0 +1,22 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#define NV_ERROR_SUCCESS 0x0
#define NV_ERROR_UNSPECIFIED 0x80000001
#define NV_ERROR_UNSUPPORTED 0x80000002
#include "nvjt.asl"
Method (_DSM, 4, Serialized) {
Printf("GPU _DSM")
If (Arg0 == ToUUID (JT_DSM_GUID)) {
If (ToInteger(Arg1) >= JT_REVISION_ID_MIN) {
Return (NVJT(Arg2, Arg3))
} Else {
Printf(" Unsupported JT revision: %o", SFST(Arg1))
Return (NV_ERROR_UNSUPPORTED)
}
} Else {
Printf(" Unsupported GUID: %o", IDST(Arg0))
Return (NV_ERROR_UNSPECIFIED)
}
}

View File

@@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
Device (DEV0) {
Name(_ADR, 0x00000000)
#include "utility.asl"
#include "dsm.asl"
#include "power.asl"
}

View File

@@ -0,0 +1,152 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#define JT_DSM_GUID "CBECA351-067B-4924-9CBD-B46B00B86F34"
#define JT_REVISION_ID_MIN 0x00000100
#define JT_REVISION_ID_MAX 0x00000200
#define JT_FUNC_SUPPORT 0x00000000
#define JT_FUNC_CAPS 0x00000001
#define JT_FUNC_POWERCONTROL 0x00000003
//TODO: SMI traps and EGIN/XCLM
#define JT_GPC_GSS 0 // Get current GPU GCx sleep status
#define JT_GPC_EGNS 1 // Enter GC6 without self-refresh
#define JT_GPC_EGIS 2 // Enter GC6 with self-refresh
#define JT_GPC_XGXS 3 // Exit GC6 and stop self-refresh
#define JT_GPC_XGIS 4 // Exit GC6 for self-refresh update
#define JT_DFGC_NONE 0 // Handle request immediately
#define JT_DFGC_DEFER 1 // Defer GPC and GPCX
//TODO #define JT_DFGC_CLEAR 2 // Clear pending requests
// Deferred GC6 enter/exit until D3-cold (saved DFGC)
Name(DFEN, 0)
// Deferred GC6 enter control (saved GPC)
Name(DFCI, 0)
// Deferred GC6 exit control (saved GPCX)
Name(DFCO, 0)
Method (NVJT, 2, Serialized) {
Printf(" GPU NVJT")
Switch (ToInteger(Arg0)) {
Case (JT_FUNC_SUPPORT) {
Printf(" Supported Functions")
Return(ITOB(
(1 << JT_FUNC_SUPPORT) |
(1 << JT_FUNC_CAPS) |
(1 << JT_FUNC_POWERCONTROL)
))
}
Case (JT_FUNC_CAPS) {
Printf(" Capabilities")
Return(ITOB(
(1 << 0) | // G-SYNC NSVR power-saving features are enabled
(1 << 1) | // NVSR disabled
(2 << 3) | // Panel power and backlight are on the suspend rail
(0 << 5) | // self-refresh controller remains powered while panel is powered
(0 << 6) | // FB is not on the suspend rail but is powered on in GC6
(0 << 8) | // Combined power rail for all GPUs
(0 << 10) | // External SPI ROM
(1 << 11) | // No SMI handler for kernel panic exit while in GC6
(0 << 12) | // Supports notify on GC6 state done
(1 << 13) | // Support deferred GC6
(1 << 14) | // Support fine-grained root port control
(2 << 15) | // GC6 version is GC6-R
(0 << 17) | // GC6 exit ISR is not supported
(0 << 18) | // GC6 self wakeup not supported
(JT_REVISION_ID_MAX << 20) // Highest revision supported
))
}
Case (JT_FUNC_POWERCONTROL) {
Printf(" Power Control: %o", SFST(Arg1))
CreateField (Arg1, 0, 3, GPC) // GPU power control
CreateField (Arg1, 4, 1, PPC) // Panel power control
CreateField (Arg1, 14, 2, DFGC) // Defer GC6 enter/exit until D3 cold
CreateField (Arg1, 16, 3, GPCX) // Deferred GC6 exit control
// Save deferred GC6 request
If ((ToInteger(GPC) != 0) || (ToInteger(DFGC) != 0)) {
DFEN = DFGC
DFCI = GPC
DFCO = GPCX
}
// Buffer to cache current state
Name (JTBF, Buffer (4) { 0, 0, 0, 0 })
CreateField (JTBF, 0, 3, CGCS) // Current GC state
CreateField (JTBF, 3, 1, CGPS) // Current GPU power status
CreateField (JTBF, 7, 1, CPSS) // Current panel and SRC state (0 when on)
// If doing deferred GC6 request, return now
If (ToInteger(DFGC) != 0) {
CGCS = 1
CGPS = 1
Return (JTBF)
}
// Apply requested state
Switch (ToInteger(GPC)) {
Case (JT_GPC_GSS) {
Printf(" Get current GPU GCx sleep status")
//TODO: include transitions!
If (GTXS(DGPU_RST_N)) {
// GPU powered on
CGCS = 1
CGPS = 1
} ElseIf (GTXS(DGPU_PWR_EN)) {
// GPU powered off, GC6
CGCS = 3
CGPS = 0
} Else {
// GPU powered off, D3 cold
CGCS = 2
CGPS = 0
}
}
Case (JT_GPC_EGNS) {
Printf(" Enter GC6 without self-refresh")
GC6I()
CPSS = 1
}
Case (JT_GPC_EGIS) {
Printf(" Enter GC6 with self-refresh")
GC6I()
If (ToInteger(PPC) == 0) {
CPSS = 0
}
}
Case (JT_GPC_XGXS) {
Printf(" Exit GC6 and stop self-refresh")
GC6O()
CGCS = 1
CGPS = 1
If (ToInteger(PPC) != 0) {
CPSS = 0
}
}
Case (JT_GPC_XGIS) {
Printf(" Exit GC6 for self-refresh update")
GC6O()
CGCS = 1
CGPS = 1
If (ToInteger(PPC) != 0) {
CPSS = 0
}
}
Default {
Printf(" Unsupported GPU power control: %o", SFST(GPC))
}
}
Return (JTBF)
}
Default {
Printf(" Unsupported function: %o", SFST(Arg0))
Return (NV_ERROR_UNSUPPORTED)
}
}
}

View File

@@ -0,0 +1,120 @@
/* SPDX-License-Identifier: GPL-2.0-only */
//TODO: evaluate sleeps
OperationRegion (PCIC, PCI_Config, 0x00, 0xFF)
Field (PCIC, DwordAcc, NoLock, Preserve) {
Offset (0x40),
SSID, 32, // Subsystem vendor and product ID
}
// Enter GC6
Method(GC6I, 0, Serialized) {
Printf(" GPU GC6I START")
// Enter L23
^^DL23()
Sleep(5)
// Put GPU into reset
Printf(" Put GPU into reset")
CTXS(DGPU_RST_N)
Sleep(5)
Printf(" GPU GC6I FINISH")
}
// Exit GC6
Method(GC6O, 0, Serialized) {
Printf(" GPU GC6O START")
// Bring GPU out of reset
Printf(" Bring GPU out of reset")
STXS(DGPU_RST_N)
Sleep(5)
// Exit L23
^^L23D()
Sleep(5)
Printf(" GPU GC6O FINISH")
}
Method (_ON, 0, Serialized) {
Printf(" GPU _ON START")
If (DFEN == JT_DFGC_DEFER) {
Switch (ToInteger(DFCO)) {
Case (JT_GPC_XGXS) {
Printf(" Exit GC6 and stop self-refresh")
GC6O()
}
Default {
Printf(" Unsupported DFCO: %o", SFST(DFCO))
}
}
DFEN = JT_DFGC_NONE
} Else {
Printf(" Standard RTD3 power on")
STXS(DGPU_PWR_EN)
Sleep(5)
GC6O()
}
Printf(" GPU _ON FINISH")
}
Method (_OFF, 0, Serialized) {
Printf(" GPU _OFF START")
If (DFEN == JT_DFGC_DEFER) {
Switch (ToInteger(DFCI)) {
Case (JT_GPC_EGNS) {
Printf(" Enter GC6 without self-refresh")
GC6I()
}
Case (JT_GPC_EGIS) {
Printf(" Enter GC6 with self-refresh")
GC6I()
}
Default {
Printf(" Unsupported DFCI: %o", SFST(DFCI))
}
}
DFEN = JT_DFGC_NONE
} Else {
Printf(" Standard RTD3 power off")
GC6I()
CTXS(DGPU_PWR_EN)
Sleep(5)
}
Printf(" GPU _OFF FINISH")
}
// Main power resource
PowerResource (PWRR, 0, 0) {
Name (_STA, 1)
Method (_ON, 0, Serialized) {
Printf("GPU PWRR._ON")
// Restore SSID
^^SSID = DGPU_SSID
Printf(" Restore SSID: %o", SFST(^^SSID))
_STA = 1
}
Method (_OFF, 0, Serialized) {
Printf("GPU PWRR._OFF")
_STA = 0
}
}
// Power resources for entering D0
Name (_PR0, Package () { PWRR })
// Power resources for entering D3
Name (_PR3, Package () { PWRR })

View File

@@ -0,0 +1,63 @@
/* SPDX-License-Identifier: GPL-2.0-only */
// Convert a byte to a hex string, trimming extra parts
Method (BHEX, 1) {
Local0 = ToHexString(Arg0)
Return (Mid(Local0, SizeOf(Local0) - 2, 2))
}
// UUID to string
Method (IDST, 1) {
Local0 = ""
Fprintf(
Local0,
"%o%o%o%o-%o%o-%o%o-%o%o-%o%o%o%o%o%o",
BHEX(DerefOf(Arg0[3])),
BHEX(DerefOf(Arg0[2])),
BHEX(DerefOf(Arg0[1])),
BHEX(DerefOf(Arg0[0])),
BHEX(DerefOf(Arg0[5])),
BHEX(DerefOf(Arg0[4])),
BHEX(DerefOf(Arg0[7])),
BHEX(DerefOf(Arg0[6])),
BHEX(DerefOf(Arg0[8])),
BHEX(DerefOf(Arg0[9])),
BHEX(DerefOf(Arg0[10])),
BHEX(DerefOf(Arg0[11])),
BHEX(DerefOf(Arg0[12])),
BHEX(DerefOf(Arg0[13])),
BHEX(DerefOf(Arg0[14])),
BHEX(DerefOf(Arg0[15]))
)
Return (Local0)
}
// Safe hex conversion, checks type first
Method (SFST, 1) {
Local0 = ObjectType(Arg0)
If (Local0 == 1 || Local0 == 2 || Local0 == 3) {
Return (ToHexString(Arg0))
} Else {
Return (Concatenate("Type: ", Arg0))
}
}
// Convert from 4-byte buffer to 32-bit integer
Method (BTOI, 1) {
Return(
DerefOf(Arg0[0]) |
(DerefOf(Arg0[1]) << 8) |
(DerefOf(Arg0[2]) << 16) |
(DerefOf(Arg0[3]) << 24)
)
}
// Convert from 32-bit integer to 4-byte buffer
Method (ITOB, 1) {
Local0 = Buffer(4) { 0, 0, 0, 0 }
Local0[0] = Arg0 & 0xFF
Local0[1] = (Arg0 >> 8) & 0xFF
Local0[2] = (Arg0 >> 16) & 0xFF
Local0[3] = (Arg0 >> 24) & 0xFF
Return (Local0)
}

View File

@@ -0,0 +1,140 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* NVIDIA GC6 on (TGL and ADL) (CPU and PCH) PCIe ports */
// Port mapped PCI express config space
OperationRegion (PCIC, PCI_Config, 0x00, 0xFF)
Field (PCIC, AnyAcc, NoLock, Preserve) {
Offset(0x52), /* LSTS - Link Status Register */
, 13,
LASX, 1, /* 0, Link Active Status */
Offset(0x60), /* RSTS - Root Status Register */
, 16,
PSPX, 1, /* 16, PME Status */
Offset(0xD8), /* 0xD8, MPC - Miscellaneous Port Configuration Register */
, 30,
HPEX, 1, /* 30, Hot Plug SCI Enable */
PMEX, 1, /* 31, Power Management SCI Enable */
Offset (0xE0), /* 0xE0, SPR - Scratch Pad Register */
SCB0, 1, /* Scratch bit 0 */
Offset(0xE2), /* 0xE2, RPPGEN - Root Port Power Gating Enable */
, 2,
L23E, 1, /* 2, L23_Rdy Entry Request (L23ER) */
L23R, 1, /* 3, L23_Rdy to Detect Transition (L23R2DT) */
}
Field (PCIC, AnyAcc, NoLock, WriteAsZeros) {
Offset(0xDC), /* 0xDC, SMSCS - SMI/SCI Status Register */
, 30,
HPSX, 1, /* 30, Hot Plug SCI Status */
PMSX, 1 /* 31, Power Management SCI Status */
}
// Enter L23
Method (DL23, 0, Serialized) {
Printf(" GPU PORT DL23 START")
L23E = 1
Sleep (16)
Local0 = 0
While (L23E) {
If ((Local0 > 4)) {
Break
}
Sleep (16)
Local0++
}
SCB0 = 1
Printf(" GPU PORT DL23 FINISH")
}
// Exit L23
Method (L23D, 0, Serialized) {
Printf(" GPU PORT L23D START")
If ((SCB0 == 1)) {
L23R = 1
Local0 = 0
While (L23R) {
If ((Local0 > 4)) {
Break
}
Sleep (16)
Local0++
}
SCB0 = 0
Local0 = 0
While ((LASX == 0)) {
If ((Local0 > 8)) {
Break
}
Sleep (16)
Local0++
}
}
Printf(" GPU PORT L23D FINISH")
}
Method (HPME, 0, Serialized) {
Printf(" GPU PORT HPME START")
If (PMSX == 1) {
Printf(" Notify GPU driver of PME SCI")
Notify(DEV0, 0x2)
Printf(" Clear PME SCI")
PMSX = 1
Printf(" Consume PME notification")
PSPX = 1
}
Printf(" GPU PORT HPME FINISH")
}
// Main power resource
PowerResource (PWRR, 0, 0) {
Name (_STA, 1)
Method (_ON, 0, Serialized) {
Printf("GPU PORT PWRR._ON")
HPME();
If (PMEX == 1) {
Printf(" Disable power management SCI")
PMEX = 0
}
^^DEV0._ON()
_STA = 1
}
Method (_OFF, 0, Serialized) {
Printf("GPU PORT PWRR._OFF")
^^DEV0._OFF()
If (PMEX == 0) {
Printf(" Enable power management SCI")
PMEX = 1
HPME()
}
_STA = 0
}
}
// Power resources for entering D0
Name (_PR0, Package () { PWRR })
// Power resources for entering D3
Name (_PR3, Package () { PWRR })
#include "common/gpu.asl"

View File

@@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _DRIVERS_GFX_NVIDIA_CHIP_H_
#define _DRIVERS_GFX_NVIDIA_CHIP_H_
struct drivers_gfx_nvidia_config {
/* TODO: Set GPIOs in devicetree? */
};
#endif /* _DRIVERS_GFX_NVIDIA_CHIP_H_ */

View File

@@ -0,0 +1,19 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _DRIVERS_GFX_NVIDIA_GPU_H_
#define _DRIVERS_GFX_NVIDIA_GPU_H_
#include <stdbool.h>
struct nvidia_gpu_config {
/* GPIO for GPU_PWR_EN */
unsigned int power_gpio;
/* GPIO for GPU_RST# */
unsigned int reset_gpio;
/* Enable or disable GPU power */
bool enable;
};
void nvidia_set_power(const struct nvidia_gpu_config *config);
#endif /* _DRIVERS_NVIDIA_GPU_H_ */

View File

@@ -0,0 +1,71 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include "chip.h"
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#define NVIDIA_SUBSYSTEM_ID_OFFSET 0x40
static void nvidia_read_resources(struct device *dev)
{
printk(BIOS_DEBUG, "%s: %s\n", __func__, dev_path(dev));
pci_dev_read_resources(dev);
// Find all BARs on GPU, mark them above 4g if prefetchable
for (int bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_5; bar += 4) {
struct resource *res = probe_resource(dev, bar);
if (res) {
if (res->flags & IORESOURCE_PREFETCH) {
printk(BIOS_INFO, " BAR at 0x%02x marked above 4g\n", bar);
res->flags |= IORESOURCE_ABOVE_4G;
} else {
printk(BIOS_DEBUG, " BAR at 0x%02x not prefetch\n", bar);
}
} else {
printk(BIOS_DEBUG, " BAR at 0x%02x not found\n", bar);
}
}
}
static void nvidia_set_subsystem(struct device *dev, unsigned int vendor, unsigned int device)
{
pci_write_config32(dev, NVIDIA_SUBSYSTEM_ID_OFFSET,
((device & 0xffff) << 16) | (vendor & 0xffff));
}
static struct pci_operations nvidia_device_ops_pci = {
.set_subsystem = nvidia_set_subsystem,
};
static struct device_operations nvidia_device_ops = {
.read_resources = nvidia_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
#if CONFIG(HAVE_ACPI_TABLES)
.write_acpi_tables = pci_rom_write_acpi_tables,
.acpi_fill_ssdt = pci_rom_ssdt,
#endif
.init = pci_dev_init,
.ops_pci = &nvidia_device_ops_pci,
};
static void nvidia_enable(struct device *dev)
{
if (!is_dev_enabled(dev) || dev->path.type != DEVICE_PATH_PCI)
return;
if (pci_read_config16(dev, PCI_VENDOR_ID) != PCI_VID_NVIDIA)
return;
dev->ops = &nvidia_device_ops;
}
struct chip_operations drivers_gfx_nvidia_ops = {
CHIP_NAME("NVIDIA Optimus Graphics Device")
.enable_dev = nvidia_enable
};

View File

@@ -0,0 +1,33 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <gpio.h>
#include "chip.h"
#include "gpu.h"
void nvidia_set_power(const struct nvidia_gpu_config *config)
{
if (!config->power_gpio || !config->reset_gpio) {
printk(BIOS_ERR, "%s: GPU_PWR_EN and GPU_RST# must be set\n", __func__);
return;
}
printk(BIOS_DEBUG, "%s: GPU_PWR_EN = %d\n", __func__, config->power_gpio);
printk(BIOS_DEBUG, "%s: GPU_RST# = %d\n", __func__, config->reset_gpio);
gpio_set(config->reset_gpio, 0);
mdelay(4);
if (config->enable) {
gpio_set(config->power_gpio, 1);
mdelay(4);
gpio_set(config->reset_gpio, 1);
} else {
gpio_set(config->power_gpio, 0);
}
mdelay(4);
}

View File

@@ -517,21 +517,19 @@ static void wifi_ssdt_write_properties(const struct device *dev, const char *sco
/* Scope */
acpigen_write_scope(scope);
if (dev->path.type == DEVICE_PATH_GENERIC) {
if (config) {
/* Wake capabilities */
acpigen_write_PRW(config->wake, ACPI_S3);
if (config) {
/* Wake capabilities */
acpigen_write_PRW(config->wake, ACPI_S3);
/* Add _DSD for DmaProperty property. */
if (config->is_untrusted) {
struct acpi_dp *dsd, *pkg;
/* Add _DSD for DmaProperty property. */
if (config->is_untrusted) {
struct acpi_dp *dsd, *pkg;
dsd = acpi_dp_new_table("_DSD");
pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID);
acpi_dp_add_integer(pkg, "DmaProperty", 1);
acpi_dp_add_package(dsd, pkg);
acpi_dp_write(dsd);
}
dsd = acpi_dp_new_table("_DSD");
pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID);
acpi_dp_add_integer(pkg, "DmaProperty", 1);
acpi_dp_add_package(dsd, pkg);
acpi_dp_write(dsd);
}
}
@@ -603,9 +601,7 @@ void wifi_pcie_fill_ssdt(const struct device *dev)
return;
wifi_ssdt_write_device(dev, path);
const struct device *child = dev->link_list->children;
if (child && child->path.type == DEVICE_PATH_GENERIC)
wifi_ssdt_write_properties(child, path);
wifi_ssdt_write_properties(dev, path);
}
const char *wifi_pcie_acpi_name(const struct device *dev)

View File

@@ -21,7 +21,6 @@ struct device_operations wifi_pcie_ops = {
.enable_resources = pci_dev_enable_resources,
.init = wifi_pci_dev_init,
.ops_pci = &pci_dev_ops_pci,
.scan_bus = scan_static_bus,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = wifi_pcie_acpi_name,
.acpi_fill_ssdt = wifi_pcie_fill_ssdt,
@@ -42,11 +41,6 @@ struct device_operations wifi_cnvi_ops = {
#endif
};
struct device_operations wifi_generic_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
};
static bool is_cnvi(const struct device *dev)
{
return dev && dev->path.type != DEVICE_PATH_PCI;
@@ -66,11 +60,10 @@ bool wifi_generic_cnvi_ddr_rfim_enabled(const struct device *dev)
static void wifi_generic_enable(struct device *dev)
{
#if !DEVTREE_EARLY
const struct device *parent = dev->bus->dev;
if (parent && parent->ops == &wifi_pcie_ops)
dev->ops = &wifi_generic_ops;
else
if (is_cnvi(dev))
dev->ops = &wifi_cnvi_ops;
else
dev->ops = &wifi_pcie_ops;
#endif
}

View File

@@ -44,7 +44,8 @@
#define CPUID_COMETLAKE_H_S_6_2_G0 0xa0650
#define CPUID_COMETLAKE_H_S_6_2_G1 0xa0653
#define CPUID_COMETLAKE_H_S_10_2_P0 0xa0651
#define CPUID_COMETLAKE_H_S_10_2_Q0_P1 0xa0654
#define CPUID_COMETLAKE_H_S_10_2_P1 0xa0654
#define CPUID_COMETLAKE_H_S_10_2_Q0 0xa0655
#define CPUID_TIGERLAKE_A0 0x806c0
#define CPUID_TIGERLAKE_B0 0x806c1
#define CPUID_TIGERLAKE_R0 0x806d1

View File

@@ -64,6 +64,7 @@ config BOARD_GOOGLE_BASEBOARD_GHOST
def_bool n
select BOARD_GOOGLE_BASEBOARD_BRYA if BOARD_GOOGLE_GHOST4ADL
select BOARD_GOOGLE_BASEBOARD_SKOLAS if !BOARD_GOOGLE_GHOST4ADL
select DRIVERS_I2C_CS42L42
config BOARD_GOOGLE_BASEBOARD_NISSA
def_bool n
@@ -216,6 +217,7 @@ config MAINBOARD_PART_NUMBER
default "Joxer" if BOARD_GOOGLE_JOXER
default "Pujjo" if BOARD_GOOGLE_PUJJO
default "Xivu" if BOARD_GOOGLE_XIVU
default "Gaelin4ADL" if BOARD_GOOGLE_GAELIN4ADL
config VARIANT_DIR
default "brya0" if BOARD_GOOGLE_BRYA0
@@ -252,6 +254,7 @@ config VARIANT_DIR
default "joxer" if BOARD_GOOGLE_JOXER
default "pujjo" if BOARD_GOOGLE_PUJJO
default "xivu" if BOARD_GOOGLE_XIVU
default "gaelin" if BOARD_GOOGLE_GAELIN4ADL
config VBOOT
select VBOOT_EARLY_EC_SYNC if !BOARD_GOOGLE_BASEBOARD_NISSA

View File

@@ -214,7 +214,6 @@ config BOARD_GOOGLE_CROTA
select CHROMEOS_WIFI_SAR if CHROMEOS
select DRIVERS_GENESYSLOGIC_GL9750
select DRIVERS_I2C_CS42L42
select VPD
config BOARD_GOOGLE_MOLI
bool "-> Moli"
@@ -254,12 +253,14 @@ config BOARD_GOOGLE_KULDAX
config BOARD_GOOGLE_JOXER
bool "-> Joxer"
select ALDERLAKE_CONFIGURE_DESCRIPTOR
select BOARD_GOOGLE_BASEBOARD_NISSA
select DRIVERS_GENESYSLOGIC_GL9750
config BOARD_GOOGLE_PUJJO
bool "-> Pujjo"
select BOARD_GOOGLE_BASEBOARD_NISSA
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_GPIO_KEYS
select DRIVERS_GENESYSLOGIC_GL9750
select HAVE_WWAN_POWER_SEQUENCE
@@ -270,3 +271,7 @@ config BOARD_GOOGLE_XIVU
select DRIVERS_GENERIC_GPIO_KEYS
select DRIVERS_GENESYSLOGIC_GL9750
select DRIVERS_INTEL_MIPI_CAMERA
config BOARD_GOOGLE_GAELIN4ADL
bool "-> Gaelin4ADL"
select BOARD_GOOGLE_BASEBOARD_BRASK

View File

@@ -174,7 +174,6 @@ Method (PGOF, 0, Serialized)
/* Assert PERST# */
\_SB.PCI0.CTXS (GPIO_GPU_PERST_L)
Sleep (5)
/* All rails are about to go down */
\_SB.PCI0.CTXS (GPIO_GPU_ALLRAILS_PG)
@@ -183,7 +182,6 @@ Method (PGOF, 0, Serialized)
/* Ramp down FBVDD (active-low) and let rail discharge to <10% */
\_SB.PCI0.STXS (GPIO_FBVDD_PWR_EN)
GPPL (GPIO_FBVDD_PG, 0, 20)
Sleep (40)
/* Ramp down PEXVDD and let rail discharge to <10% */
\_SB.PCI0.CTXS (GPIO_PEXVDD_PWR_EN)
@@ -223,6 +221,7 @@ Method (NPON, 0, Serialized)
Else
{
PGON ()
\_SB.PCI0.PEG0.LD23 ()
}
}
@@ -241,6 +240,7 @@ Method (NPOF, 0, Serialized)
}
Else
{
\_SB.PCI0.PEG0.DL23 ()
PGOF ()
}
}

View File

@@ -10,7 +10,7 @@ static const struct pad_config override_gpio_table[] = {
/* A7 : SRCCLK_OE7# ==> LAN_WAKE_ODL */
PAD_CFG_GPI_SCI_LOW(GPP_A7, NONE, DEEP, EDGE_SINGLE),
/* A8 : SRCCLKREQ7# ==> USB2_A2_RT_RST_ODL */
PAD_CFG_GPO(GPP_A8, 1, DEEP),
PAD_NC(GPP_A8, NONE),
/* A12 : SATAXPCIE1 ==> EN_PP3300_LAN_X */
PAD_CFG_GPO(GPP_A12, 1, DEEP),
/* A14 : USB_OC1# ==> USB_C0_OC_ODL */
@@ -110,6 +110,8 @@ static const struct pad_config override_gpio_table[] = {
PAD_NC_LOCK(GPP_F12, NONE, LOCK_CONFIG),
/* F13 : GSXDOUT ==> NC */
PAD_NC_LOCK(GPP_F13, NONE, LOCK_CONFIG),
/* F14 : GSXDIN ==> TCHPAD_INT_ODL */
PAD_CFG_GPI_IRQ_WAKE(GPP_F14, NONE, DEEP, LEVEL, INVERT),
/* F15 : GSXSRESET# ==> NC */
PAD_NC_LOCK(GPP_F15, NONE, LOCK_CONFIG),
/* F16 : GSXCLK ==> NC */

View File

@@ -80,7 +80,7 @@ chip soc/intel/alderlake
.clk_req = 0,
.clk_src = 0,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
.pcie_rp_aspm = ASPM_DISABLE
.pcie_rp_aspm = ASPM_L0S,
}"
device pci 00.0 alias dgpu on end
end

View File

@@ -56,7 +56,7 @@ static const struct power_rail_sequence gpu_on_seq[] = {
/* In GCOFF entry order (i.e., power-off order) */
static const struct power_rail_sequence gpu_off_seq[] = {
{ "FBVDD", FBVDD_PWR_EN, true, FBVDD_PG, 40,},
{ "FBVDD", FBVDD_PWR_EN, true, FBVDD_PG, 0,},
{ "PEXVDD", PEXVDD_PWR_EN, false, PEXVDD_PG, 10,},
{ "NVVDD+MSVDD", NVVDD_PWR_EN, false, NVVDD_PG, 2,},
{ "NV3_3", NV33_PWR_EN, false, NV33_PG, 4,},
@@ -89,7 +89,6 @@ static void dgpu_power_sequence_off(void)
{
/* Assert reset and clear power-good */
gpio_output(GPU_PERST_L, 0);
mdelay(5);
/* Inform the GPU that the power is no longer good. */
gpio_output(GPU_ALLRAILS_PG, 0);
@@ -132,10 +131,6 @@ static void dgpu_power_sequence_on(void)
void variant_init(void)
{
/* Disable ASPM for the GPU until it is verified working. */
struct device *dgpu = DEV_PTR(dgpu);
dgpu->disable_pcie_aspm = 1;
if (acpi_is_wakeup_s3())
return;

View File

@@ -7,5 +7,5 @@ SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE, H54G68CYRBX248
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -19,3 +19,4 @@ K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)
H54G68CYRBX248 3 (0011)

View File

@@ -13,3 +13,4 @@ K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C
H54G68CYRBX248

View File

@@ -7,5 +7,5 @@ SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE, H54G68CYRBX248
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -19,3 +19,4 @@ K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)
H54G68CYRBX248 3 (0011)

View File

@@ -13,3 +13,4 @@ K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C
H54G68CYRBX248

View File

@@ -58,7 +58,68 @@ chip soc/intel/alderlake
.vnn_icc_max_ma = 500,
}"
register "power_limits_config[ADL_N_041_6W_CORE]" = "{
.tdp_pl1_override = 6,
.tdp_pl2_override = 12,
.tdp_pl4 = 78,
}"
register "power_limits_config[ADL_N_021_6W_CORE]" = "{
.tdp_pl1_override = 6,
.tdp_pl2_override = 12,
.tdp_pl4 = 78,
}"
device domain 0 on
device ref dtt on
chip drivers/intel/dptf
## sensor information
register "options.tsr[0].desc" = ""Memory""
register "options.tsr[1].desc" = ""Charger""
# TODO: below values are initial reference values only
## Passive Policy
register "policies.passive" = "{
[0] = DPTF_PASSIVE(CPU, CPU, 95, 5000),
[1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 75, 5000),
[2] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_1, 75, 5000),
}"
## Critical Policy
register "policies.critical" = "{
[0] = DPTF_CRITICAL(CPU, 105, SHUTDOWN),
[1] = DPTF_CRITICAL(TEMP_SENSOR_0, 85, SHUTDOWN),
[2] = DPTF_CRITICAL(TEMP_SENSOR_1, 85, SHUTDOWN),
}"
register "controls.power_limits" = "{
.pl1 = {
.min_power = 3000,
.max_power = 6000,
.time_window_min = 28 * MSECS_PER_SEC,
.time_window_max = 32 * MSECS_PER_SEC,
.granularity = 200
},
.pl2 = {
.min_power = 12000,
.max_power = 12000,
.time_window_min = 28 * MSECS_PER_SEC,
.time_window_max = 32 * MSECS_PER_SEC,
.granularity = 1000
}
}"
## Charger Performance Control (Control, mA)
register "controls.charger_perf" = "{
[0] = { 255, 1700 },
[1] = { 24, 1500 },
[2] = { 16, 1000 },
[3] = { 8, 500 }
}"
device generic 0 on end
end
end
device ref ipu on
chip drivers/intel/mipi_camera
register "acpi_uid" = "0x50000"

View File

@@ -14,13 +14,6 @@ const char *get_wifi_sar_cbfs_filename(void)
return "wifi_sar_0.hex";
}
static const char *get_dock_mac_from_vpd(char *buf, int size)
{
/* Support MAC address pass-through */
/* Read value of 'dock_mac' from RO VPD */
return vpd_gets("dock_mac", buf, size, VPD_RO);
}
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
{
if (fw_config_probe(FW_CONFIG(DB_LTE, LTE_USB))) {
@@ -37,49 +30,3 @@ void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
config->ext_fivr_settings.vnn_sx_voltage_mv = 1250;
}
}
void variant_fill_ssdt(const struct device *unused)
{
/* Write MAC address to SSDT for Linux kernel r8152 driver */
/* enable pass-through support */
/* and read ACPI object name: "\_SB.AMAC" */
/* ASL code like this */
// Scope (\_SB)
// {
// Method (AMAC, 0, Serialized)
// {
// Return (ToBuffer (STRING))
// }
// }
char buf[32], acpi_buf[32];
if (get_dock_mac_from_vpd(buf, sizeof(buf)) != NULL) {
printk(BIOS_INFO, "RO_VPD, dock_mac=%s\n", buf);
/* remove ':' from mac address string */
size_t len = strlen(buf);
int i, j;
for (i = 0; i < len; i++) {
if (buf[i] == ':') {
for (j = i; j < len; j++)
buf[j] = buf[j+1];
len--;
i--;
}
}
buf[len] = '\0';
/* Format expected by the Linux kernel r8152 driver */
/* "_AUXMAC_#XXXXXXXXXXXX#" */
int acpi_buf_len = snprintf(acpi_buf, sizeof(acpi_buf), "_AUXMAC_#%s#", buf);
acpigen_write_scope("\\_SB");
acpigen_write_method_serialized("AMAC", 0);
acpigen_write_return_byte_buffer((uint8_t *)acpi_buf, acpi_buf_len);
acpigen_write_method_end();
acpigen_write_scope_end();
}
}

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __VARIANT_EC_H__
#define __VARIANT_EC_H__
#include <baseboard/ec.h>
#endif

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef VARIANT_GPIO_H
#define VARIANT_GPIO_H
#include <baseboard/gpio.h>
#endif

View File

@@ -0,0 +1,6 @@
chip soc/intel/alderlake
device domain 0 on
end
end

View File

@@ -45,8 +45,8 @@ static const struct pad_config gpio_table[] = {
/* GPP_A6 : GPP_A6 ==> ESPI_ALERT1 configured on reset, do not touch */
/* GPP_A7 : No heuristic was found useful */
PAD_NC(GPP_A7, NONE),
/* GPP_A8 : No heuristic was found useful */
PAD_NC(GPP_A8, NONE),
/* GPP_A8 : HP_RST_ODL */
PAD_CFG_GPO(GPP_A8, 1, PLTRST),
/* GPP_A9 : GPP_A9 ==> ESPI_PCH_CLK_R configured on reset, do not touch */
/* GPP_A10 : GPP_A10 ==> ESPI_PCH_RST_EC_L configured on reset, do not touch */
/* GPP_A11 : [NF6: USB_C_GPP_A11] ==> EN_SPKR_PA */
@@ -215,18 +215,18 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_E22, NONE),
/* GPP_E23 : net NC is not present in the given design */
PAD_NC(GPP_E23, NONE),
/* GPP_F0 : CNV_BRI_DT_STRAP ==> Component NC */
PAD_NC(GPP_F0, NONE),
/* GPP_F1 : No heuristic was found useful */
PAD_NC(GPP_F1, NONE),
/* GPP_F2 : CNV_RGI_DT_STRAP ==> Component NC */
PAD_NC(GPP_F2, NONE),
/* GPP_F3 : No heuristic was found useful */
PAD_NC(GPP_F3, NONE),
/* GPP_F4 : No heuristic was found useful */
PAD_NC(GPP_F4, NONE),
/* F0 : CNV_BRI_DT ==> CNV_BRI_DT_STRAP */
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1),
/* F1 : CNV_BRI_RSP ==> CNV_BRI_RSP */
PAD_CFG_NF(GPP_F1, UP_20K, DEEP, NF1),
/* F2 : CNV_RGI_DT ==> CNV_RGI_DT_STRAP */
PAD_CFG_NF(GPP_F2, NONE, DEEP, NF1),
/* F3 : CNV_RGI_RSP ==> CNV_RGI_RSP */
PAD_CFG_NF(GPP_F3, UP_20K, DEEP, NF1),
/* F4 : CNV_RF_RESET# ==> CNV_RF_RST_L */
PAD_CFG_NF(GPP_F4, NONE, DEEP, NF1),
/* GPP_F5 : [NF2: MODEM_CLKREQ NF3: CRF_XTAL_CLKREQ NF6: USB_C_GPP_F5] ==> CNV_CLKREQ0 */
PAD_CFG_NF(GPP_F5, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_F5, NONE, DEEP, NF3),
/* GPP_F6 : net NC is not present in the given design */
PAD_NC(GPP_F6, NONE),
/* GPP_F7 : GPP_F7_STRAP ==> Component NC */

View File

@@ -17,36 +17,36 @@ static const struct mb_cfg baseboard_memcfg = {
*/
.lpx_dq_map = {
.ddr0 = {
.dq0 = { 5, 0, 4, 1, 2, 6, 7, 3, },
.dq1 = { 9, 12, 8, 13, 15, 10, 14, 11, },
.dq0 = { 5, 0, 4, 1, 2, 6, 7, 3 },
.dq1 = { 11, 15, 13, 12, 10, 14, 8, 9 },
},
.ddr1 = {
.dq0 = { 9, 10, 11, 8, 13, 15, 14, 12, },
.dq1 = { 0, 3, 1, 2, 7, 5, 6, 4, },
.dq0 = { 9, 10, 11, 8, 13, 14, 12, 15 },
.dq1 = { 0, 2, 1, 3, 7, 5, 6, 4 },
},
.ddr2 = {
.dq0 = { 9, 13, 8, 12, 15, 10, 14, 11, },
.dq1 = { 7, 6, 4, 5, 0, 3, 1, 2, },
.dq0 = { 3, 7, 2, 6, 4, 1, 5, 0 },
.dq1 = { 12, 14, 15, 13, 11, 10, 8, 9 },
},
.ddr3 = {
.dq0 = { 3, 7, 2, 6, 4, 1, 5, 0, },
.dq1 = { 12, 14, 15, 13, 11, 10, 8, 9, },
.dq0 = { 15, 14, 12, 13, 10, 9, 11, 8 },
.dq1 = { 7, 6, 4, 5, 0, 3, 1, 2 },
},
.ddr4 = {
.dq0 = { 15, 14, 12, 13, 10, 9, 8, 11, },
.dq1 = { 7, 5, 4, 6, 2, 0, 1, 3, },
.dq0 = { 15, 14, 12, 13, 10, 9, 8, 11 },
.dq1 = { 1, 3, 0, 2, 5, 6, 7, 4 },
},
.ddr5 = {
.dq0 = { 9, 10, 11, 8, 12, 15, 13, 14, },
.dq1 = { 3, 7, 2, 6, 0, 4, 5, 1, },
.dq0 = { 9, 10, 11, 8, 12, 15, 13, 14 },
.dq1 = { 3, 7, 2, 6, 0, 4, 5, 1 },
},
.ddr6 = {
.dq0 = { 3, 2, 1, 0, 7, 5, 6, 4, },
.dq1 = { 12, 13, 10, 9, 14, 11, 8, 15, },
.dq0 = { 11, 8, 10, 9, 12, 14, 13, 15 },
.dq1 = { 0, 7, 1, 2, 6, 4, 3, 5 },
},
.ddr7 = {
.dq0 = { 11, 8, 10, 9, 12, 14, 13, 15, },
.dq1 = { 1, 7, 0, 2, 5, 3, 4, 6, },
.dq0 = { 1, 2, 3, 0, 7, 5, 6, 4 },
.dq1 = { 15, 14, 11, 13, 8, 9, 12, 10 },
},
},
@@ -59,12 +59,12 @@ static const struct mb_cfg baseboard_memcfg = {
*/
.lpx_dqs_map = {
.ddr0 = { .dqs0 = 0, .dqs1 = 1 },
.ddr1 = { .dqs0 = 0, .dqs1 = 1 },
.ddr1 = { .dqs0 = 1, .dqs1 = 0 },
.ddr2 = { .dqs0 = 0, .dqs1 = 1 },
.ddr3 = { .dqs0 = 0, .dqs1 = 1 },
.ddr4 = { .dqs0 = 0, .dqs1 = 1 },
.ddr5 = { .dqs0 = 0, .dqs1 = 1 },
.ddr6 = { .dqs0 = 0, .dqs1 = 1 },
.ddr3 = { .dqs0 = 1, .dqs1 = 0 },
.ddr4 = { .dqs0 = 1, .dqs1 = 0 },
.ddr5 = { .dqs0 = 1, .dqs1 = 0 },
.ddr6 = { .dqs0 = 1, .dqs1 = 0 },
.ddr7 = { .dqs0 = 0, .dqs1 = 1 },
},

View File

@@ -14,38 +14,20 @@ chip soc/intel/alderlake
#+-------------------+---------------------------+
register "common_soc_config" = "{
.i2c[0] = {
.speed = I2C_SPEED_STANDARD,
.speed_config[0] = {
.speed = I2C_SPEED_STANDARD,
.scl_lcnt = 45,
.scl_hcnt = 33,
.sda_hold = 20,
},
.speed = I2C_SPEED_FAST,
},
.i2c[1] = {
.early_init = 1,
.speed = I2C_SPEED_STANDARD,
.rise_time_ns = 600,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
.speed = I2C_SPEED_FAST,
},
.i2c[2] = {
.speed = I2C_SPEED_STANDARD,
.rise_time_ns = 650,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
.speed = I2C_SPEED_FAST,
},
.i2c[3] = {
.speed = I2C_SPEED_STANDARD,
.rise_time_ns = 650,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
.speed = I2C_SPEED_FAST,
},
.i2c[5] = {
.speed = I2C_SPEED_STANDARD,
.rise_time_ns = 650,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
.speed = I2C_SPEED_FAST,
},
}"
@@ -100,6 +82,24 @@ chip soc/intel/alderlake
device generic 0 on end
end
end
device ref i2c0 on
chip drivers/i2c/cs42l42
register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_A23)"
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A8)"
register "ts_inv" = "true"
register "ts_dbnc_rise" = "RISE_DEB_1000_MS"
register "ts_dbnc_fall" = "FALL_DEB_0_MS"
register "btn_det_init_dbnce" = "100"
register "btn_det_event_dbnce" = "10"
register "bias_lvls[0]" = "15"
register "bias_lvls[1]" = "8"
register "bias_lvls[2]" = "4"
register "bias_lvls[3]" = "1"
register "hs_bias_ramp_rate" = "HSBIAS_RAMP_SLOW"
register "hs_bias_sense_disable" = "true"
device i2c 48 on end
end
end
device ref i2c1 on
chip drivers/i2c/tpm
register "hid" = ""GOOG0005""

View File

@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
bootblock-y += gpio.c
bootblock-y += variant.c
romstage-y += gpio.c

View File

@@ -132,7 +132,7 @@ chip soc/intel/alderlake
register "generic.stop_off_delay_ms" = "1"
register "generic.has_power_resource" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 5d on end
device i2c 0x14 on end
end
end
device ref i2c3 on

View File

@@ -0,0 +1,44 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h>
#include <console/console.h>
#include <fw_config.h>
#include <soc/bootblock.h>
/*
* TODO(b/229022567): This is a workaround which will be removed once we
* implement a proper solution for configuring the descriptor differently for
* different SKUs.
*/
void variant_update_descriptor(void)
{
/*
* UfsCont1Config = "Disabled"
* IshSupported = "No"
*/
struct descriptor_byte emmc_bytes[] = {
{ 0x1f8, 0x55 },
{ 0x1f9, 0x55 },
{ 0xc18, 0x89 },
{ 0xc1d, 0xb8 },
};
/*
* UfsCont1Config = "X2"
* IshSupported = "Yes"
*/
struct descriptor_byte ufs_bytes[] = {
{ 0x1f8, 0x95 },
{ 0x1f9, 0x59 },
{ 0xc18, 0x09 },
{ 0xc1d, 0x28 },
};
if (fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UFS))) {
printk(BIOS_INFO, "Configuring descriptor for UFS\n");
configure_descriptor(ufs_bytes, ARRAY_SIZE(ufs_bytes));
} else {
printk(BIOS_INFO, "Configuring descriptor for eMMC\n");
configure_descriptor(emmc_bytes, ARRAY_SIZE(emmc_bytes));
}
}

View File

@@ -6,6 +6,23 @@ fw_config
end
chip soc/intel/alderlake
register "usb2_ports[1]" = "USB2_PORT_EMPTY" # Disable USB2 Port 1
register "usb2_ports[2]" = "USB2_PORT_EMPTY" # Disable USB2 Port 2
register "usb2_ports[4]" = "USB2_PORT_EMPTY" # Disable USB2 Port 4
register "usb3_ports[0]" = "{
.enable = 1,
.ocpin = OC_SKIP,
.tx_de_emp = 0x2B,
.tx_downscale_amp = 0x00,
}" # Type-A port A0
register "usb3_ports[1]" = "{
.enable = 1,
.ocpin = OC_SKIP,
.tx_de_emp = 0x2B,
.tx_downscale_amp = 0x00,
}" # Type-A port A1
register "serial_io_gspi_mode" = "{
[PchSerialIoIndexGSPI0] = PchSerialIoDisabled,
[PchSerialIoIndexGSPI1] = PchSerialIoDisabled,

View File

@@ -35,6 +35,80 @@ chip soc/intel/alderlake
register "tcss_ports[3]" = "TCSS_PORT_EMPTY" # Disable TCP3
register "tcc_offset" = "0" # TCC of 100C
device domain 0 on
device ref dtt on
chip drivers/intel/dptf
## sensor information
register "options.tsr[0].desc" = ""SSD""
register "options.tsr[1].desc" = ""CPU_VR""
register "options.tsr[2].desc" = ""DIMM""
# TODO: below values are initial reference values only
## Active Policy
register "policies.active" = "{
[0] = {
.target = DPTF_CPU,
.thresholds = {
TEMP_PCT(85, 90),
TEMP_PCT(80, 80),
TEMP_PCT(75, 70),
}
}
}"
## Passive Policy
register "policies.passive" = "{
[0] = DPTF_PASSIVE(CPU, CPU, 95, 5000),
[1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 75, 5000),
[2] = DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 75, 5000),
[3] = DPTF_PASSIVE(CPU, TEMP_SENSOR_2, 75, 5000),
}"
## Critical Policy
register "policies.critical" = "{
[0] = DPTF_CRITICAL(CPU, 105, SHUTDOWN),
[1] = DPTF_CRITICAL(TEMP_SENSOR_0, 85, SHUTDOWN),
[2] = DPTF_CRITICAL(TEMP_SENSOR_1, 85, SHUTDOWN),
[3] = DPTF_CRITICAL(TEMP_SENSOR_2, 85, SHUTDOWN),
}"
register "controls.power_limits" = "{
.pl1 = {
.min_power = 15000,
.max_power = 55000,
.time_window_min = 28 * MSECS_PER_SEC,
.time_window_max = 32 * MSECS_PER_SEC,
.granularity = 200,
},
.pl2 = {
.min_power = 55000,
.max_power = 55000,
.time_window_min = 28 * MSECS_PER_SEC,
.time_window_max = 32 * MSECS_PER_SEC,
.granularity = 1000,
}
}"
## Fan Performance Control (Percent, Speed, Noise, Power)
register "controls.fan_perf" = "{
[0] = { 90, 6700, 220, 2200, },
[1] = { 80, 5800, 180, 1800, },
[2] = { 70, 5000, 145, 1450, },
[3] = { 60, 4900, 115, 1150, },
[4] = { 50, 3838, 90, 900, },
[5] = { 40, 2904, 55, 550, },
[6] = { 30, 2337, 30, 300, },
[7] = { 20, 1608, 15, 150, },
[8] = { 10, 800, 10, 100, },
[9] = { 0, 0, 0, 50, }
}"
## Fan options
register "options.fan.fine_grained_control" = "1"
register "options.fan.step_size" = "2"
device generic 0 alias dptf_policy on end
end
end
device ref tcss_dma0 on
chip drivers/intel/usb4/retimer
register "dfp[0].power_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E4)"

View File

@@ -7,3 +7,4 @@ SPD_SOURCES =
SPD_SOURCES += spd/lp5/set-0/spd-3.hex # ID = 0(0b0000) Parts = H58G56AK6BX069, K3LKBKB0BM-MGCP
SPD_SOURCES += spd/lp5/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9JCNNNBK3MLYR-N6E, MT62F512M32D2DR-031 WT:B
SPD_SOURCES += spd/lp5/set-0/spd-6.hex # ID = 2(0b0010) Parts = K3LKCKC0BM-MGCP
SPD_SOURCES += spd/lp5/set-0/spd-2.hex # ID = 3(0b0011) Parts = MT62F1G32D4DR-031 WT:B

View File

@@ -8,4 +8,5 @@ H58G56AK6BX069 0 (0000)
H9JCNNNBK3MLYR-N6E 1 (0001)
K3LKBKB0BM-MGCP 0 (0000)
K3LKCKC0BM-MGCP 2 (0010)
MT62F1G32D4DR-031 WT:B 3 (0011)
MT62F512M32D2DR-031 WT:B 1 (0001)

View File

@@ -13,4 +13,5 @@ H58G56AK6BX069
H9JCNNNBK3MLYR-N6E
K3LKBKB0BM-MGCP
K3LKCKC0BM-MGCP
MT62F1G32D4DR-031 WT:B
MT62F512M32D2DR-031 WT:B

View File

@@ -13,6 +13,7 @@ chip soc/intel/alderlake
register "typec_aux_bias_pads[0]" = "{.pad_auxp_dc = GPP_E22, .pad_auxn_dc = GPP_E23}"
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # WFC Camera
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth port for PCIe WLAN
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth port for CNVi WLAN
# Configure external V1P05/Vnn/VnnSx Rails
@@ -228,6 +229,18 @@ chip soc/intel/alderlake
device i2c 0x2c on end
end
end
device ref pcie_rp4 on
# PCIe 4 WLAN
register "pch_pcie_rp[PCH_RP(4)]" = "{
.clk_src = 2,
.clk_req = 2,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip drivers/wifi/generic
register "wake" = "GPE0_DW1_03"
device pci 00.0 on end
end
end
device ref pcie_rp7 on
# Enable SD Card PCIe 7 using clk 3
register "pch_pcie_rp[PCH_RP(7)]" = "{
@@ -314,6 +327,13 @@ chip soc/intel/alderlake
chip drivers/usb/acpi
register "desc" = ""USB2 Bluetooth""
register "type" = "UPC_TYPE_INTERNAL"
register "reset_gpio" =
"ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D4)"
device ref usb2_port8 on end
end
chip drivers/usb/acpi
register "desc" = ""CNVi Bluetooth""
register "type" = "UPC_TYPE_INTERNAL"
register "reset_gpio" =
"ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D4)"
device ref usb2_port10 on end

View File

@@ -7,5 +7,5 @@ SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE, H54G68CYRBX248
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -19,3 +19,4 @@ K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)
H54G68CYRBX248 3 (0011)

View File

@@ -13,3 +13,4 @@ K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C
H54G68CYRBX248

View File

@@ -7,5 +7,5 @@ SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE, H54G68CYRBX248
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -19,3 +19,4 @@ K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)
H54G68CYRBX248 3 (0011)

View File

@@ -13,3 +13,4 @@ K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C
H54G68CYRBX248

View File

@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bl31.h>
#include <boardid.h>
#include <bootmode.h>
#include <console/console.h>
#include <delay.h>
@@ -16,6 +17,7 @@
#include <soc/i2c.h>
#include <soc/msdc.h>
#include <soc/mtcmos.h>
#include <soc/pcie.h>
#include <soc/spm.h>
#include <soc/usb.h>
@@ -29,6 +31,32 @@
#define GPIO_EDP_HPD_1V8 GPIO(GPIO_07)
#define GPIO_EN_PP3300_DISP_X GPIO(I2SO1_D2)
bool mainboard_needs_pcie_init(void)
{
uint32_t sku;
if (!CONFIG(BOARD_GOOGLE_DOJO))
return false;
sku = sku_id();
switch (sku) {
case 0:
case 1:
case 4:
case 5:
return false;
case 2:
case 3:
case 6:
case 7:
return true;
default:
/* For example CROS_SKU_UNPROVISIONED */
printk(BIOS_WARNING, "Unexpected sku %#x; assuming PCIe", sku);
return true;
}
}
static void register_reset_to_bl31(void)
{
static struct bl_aux_param_gpio param_reset = {

View File

@@ -284,6 +284,20 @@ chip soc/intel/jasperlake
register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end
end
chip drivers/i2c/hid
register "generic.hid" = ""WDHT0002""
register "generic.desc" = ""WDT Touchscreen""
register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)"
register "generic.probed" = "1"
register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)"
register "generic.reset_delay_ms" = "130"
register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)"
register "generic.enable_delay_ms" = "10"
register "generic.has_power_resource" = "1"
register "generic.disable_gpio_export_in_crs" = "1"
register "hid_desc_reg_offset" = "0x20"
device i2c 2c on end
end
end # I2C 2
device pci 15.3 on
chip drivers/intel/mipi_camera

View File

@@ -1,13 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/stages.h>
#include <soc/clkbuf.h>
#include <soc/mt6315.h>
#include <soc/mt6359p.h>
#include <soc/pmif.h>
#include <soc/rtc.h>
void platform_romstage_main(void)
{
mtk_pmif_init();
mt6315_init();
mt6359p_init();
clk_buf_init();
rtc_boot();
}

View File

@@ -1,11 +1,19 @@
chip soc/intel/meteorlake
# GPE configuration
register "pmc_gpe0_dw0" = "GPP_A"
register "pmc_gpe0_dw1" = "GPP_E"
register "pmc_gpe0_dw2" = "GPP_F"
# EC host command ranges are in 0x800-0x8ff & 0x200-0x20f
register "gen1_dec" = "0x00fc0801"
register "gen2_dec" = "0x000c0201"
# EC memory map range is 0x900-0x9ff
register "gen3_dec" = "0x00fc0901"
# Enable CNVi BT
register "cnvi_bt_core" = "true"
register "serial_io_uart_mode" = "{
[PchSerialIoIndexUART0] = PchSerialIoPci,
[PchSerialIoIndexUART1] = PchSerialIoDisabled,

View File

@@ -17,5 +17,11 @@
#define EC_SCI_GPI GPE0_ESPI
/* EC wake is LAN_WAKE# which is a special DeepSX wake pin */
#define GPE_EC_WAKE GPE0_LAN_WAK
/* Memory configuration board straps */
#define GPIO_MEM_CONFIG_0 GPP_E11
#define GPIO_MEM_CONFIG_1 GPP_E02
#define GPIO_MEM_CONFIG_2 GPP_E01
#define GPIO_MEM_CONFIG_3 GPP_E12
#define GPIO_MEM_CH_SEL GPP_E13
#endif /* __BASEBOARD_GPIO_H__ */

View File

@@ -6,7 +6,9 @@
static const struct mb_cfg baseboard_memcfg = {
.type = MEM_TYPE_LP5X,
/* TODO: Add Memory configuration */
.lp5x_config = {
.ccc_config = 0x66,
},
.ect = 1, /* Enable Early Command Training */
};
@@ -17,12 +19,19 @@ const struct mb_cfg *__weak variant_memory_params(void)
int __weak variant_memory_sku(void)
{
return 0;
gpio_t spd_gpios[] = {
GPIO_MEM_CONFIG_0,
GPIO_MEM_CONFIG_1,
GPIO_MEM_CONFIG_2,
GPIO_MEM_CONFIG_3,
};
return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
}
bool __weak variant_is_half_populated(void)
{
return 0;
return gpio_get(GPIO_MEM_CH_SEL);
}
void __weak variant_get_spd_info(struct mem_spd *spd_info)

View File

@@ -2,51 +2,449 @@
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <boardid.h>
#include <soc/gpio.h>
#include <console/console.h>
#include <boardid.h>
/* Pad configuration in ramstage */
static const struct pad_config gpio_table[] = {
/* ToDo: Fill gpio configuration */
/* H08 : UART0_RXD ==> UART_DBG_TX_SOC_RX */
static const struct pad_config gpio_table_id0[] = {
/* GPP_A00 : GPP_A00 ==> ESPI_SOC_IO0_R configured on reset, do not touch */
/* GPP_A01 : GPP_A01 ==> ESPI_SOC_IO1_R configured on reset, do not touch */
/* GPP_A02 : GPP_A02 ==> ESPI_SOC_IO2_R configured on reset, do not touch */
/* GPP_A03 : GPP_A03 ==> ESPI_SOC_IO3_R configured on reset, do not touch */
/* GPP_A04 : GPP_A04 ==> ESPI_SOC_CS0_L configured on reset, do not touch */
/* GPP_A05 : GPP_A05 ==> ESPI_SOC_CLK_R configured on reset, do not touch */
/* GPP_A06 : GPP_A06 ==> ESPI_SOC_RESET_L configured on reset, do not touch */
/* GPP_A11 : [] ==> EN_UCAM_SENR_PWR */
PAD_CFG_GPO(GPP_A11, 0, DEEP),
/* GPP_A12 : [] ==> EN_UCAM_PWR */
PAD_CFG_GPO(GPP_A12, 0, DEEP),
/* GPP_A13 : [] ==> SD_PE_LS_PRSNT_L */
PAD_CFG_GPI_LOCK(GPP_A13, NONE, LOCK_CONFIG),
/* GPP_A14 : [] ==> WWAN_RF_DISABLE_ODL */
PAD_CFG_GPO(GPP_A14, 1, DEEP),
/* GPP_A15 : [] ==> WWAN_RST_L */
PAD_CFG_GPO(GPP_A15, 1, DEEP),
/* GPP_A16 : GPP_A16 ==> ESPI_SOC_ALERT_L configured on reset, do not touch */
/* GPP_A17 : [] ==> EC_SOC_INT_ODL */
PAD_CFG_GPI_IRQ_WAKE(GPP_A17, NONE, PLTRST, LEVEL, INVERT),
/* GPP_A18 : [] ==> CAM_PSW_L */
PAD_CFG_GPI_INT_LOCK(GPP_A18, NONE, EDGE_BOTH, LOCK_CONFIG),
/* GPP_A19 : [] ==> EN_PP3300_SSD */
PAD_CFG_GPO(GPP_A19, 1, DEEP),
/* GPP_A20 : [] ==> SSD_PERST_L */
PAD_CFG_GPO_LOCK(GPP_A20, 1, LOCK_CONFIG),
/* GPP_A21 : [] ==> WWAN_CONFIG2 */
PAD_CFG_GPI(GPP_A21, NONE, DEEP),
/* GPP_B00 : [] ==> TCHPAD_INT_ODL_LS */
PAD_CFG_GPI_IRQ_WAKE_LOCK(GPP_B00, NONE, LEVEL, INVERT, LOCK_CONFIG),
/* GPP_B01 : [] ==> BT_DISABLE_L */
PAD_CFG_GPO(GPP_B01, 1, DEEP),
/* GPP_B02 : net NC is not present in the given design */
PAD_NC(GPP_B02, NONE),
/* GPP_B03 : net NC is not present in the given design */
PAD_NC(GPP_B03, NONE),
/* GPP_B04 : GPP_B04_STRAP ==> Component NC */
PAD_NC(GPP_B04, NONE),
/* GPP_B05 : net NC is not present in the given design */
PAD_NC(GPP_B05, NONE),
/* GPP_B06 : net NC is not present in the given design */
PAD_CFG_GPI_INT(GPP_B06, NONE, PLTRST, EDGE_BOTH),
/* GPP_B07 : net NC is not present in the given design */
PAD_NC(GPP_B07, NONE),
/* GPP_B08 : net NC is not present in the given design */
PAD_NC(GPP_B08, NONE),
/* GPP_B09 : [] ==> EN_FCAM_PWR */
PAD_CFG_GPO(GPP_B09, 0, DEEP),
/* GPP_B10 : [] ==> WIFI_DISABLE_L */
PAD_CFG_GPO(GPP_B10, 1, DEEP),
/* GPP_B11 : [] ==> EN_FP_PWR */
PAD_CFG_GPO_LOCK(GPP_B11, 1, LOCK_CONFIG),
/* GPP_B12 : [] ==> SLP_SO_R_L */
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
/* GPP_B13 : [] ==> PLT_RST_L */
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
/* GPP_B14 : GPP_B14_STRAP ==> Component NC */
PAD_NC(GPP_B14, NONE),
/* GPP_B15 : [] ==> USB_OC3# */
PAD_CFG_NF_LOCK(GPP_B15, NONE, NF1, LOCK_CONFIG),
/* GPP_B16 : No heuristic was found useful */
PAD_NC(GPP_B16, NONE),
/* GPP_B17 : [] ==> EN_WWAN_PWR */
PAD_CFG_GPO(GPP_B17, 1, DEEP),
/* GPP_B18 : [] ==> SOC_I2C_TPM_SDA */
PAD_CFG_NF_LOCK(GPP_B18, NONE, NF2, LOCK_CONFIG),
/* GPP_B19 : [] ==> SOC_I2C_TPM_SCL */
PAD_CFG_NF_LOCK(GPP_B19, NONE, NF2, LOCK_CONFIG),
/* GPP_B20 : [] ==> SOC_I2C_MISC_SDA */
PAD_CFG_NF_LOCK(GPP_B20, NONE, NF2, LOCK_CONFIG),
/* GPP_B21 : [] ==> SOC_I2C_MISC_SCL */
PAD_CFG_NF_LOCK(GPP_B21, NONE, NF2, LOCK_CONFIG),
/* GPP_B22 : [] ==> USB4_RT_FORCE_PWR */
PAD_CFG_GPO(GPP_B22, 0, DEEP),
/* GPP_B23 : [] ==> WWAN_CONFIG0 */
PAD_CFG_GPI_LOCK(GPP_B23, NONE, LOCK_CONFIG),
/* GPP_C00 : [] ==> EN_PP3300_TCHSCR */
PAD_CFG_GPO(GPP_C00, 1, DEEP),
/* GPP_C01 : [] ==> USI_RST_L */
PAD_CFG_GPO(GPP_C01, 0, DEEP),
/* GPP_C02 : GPP_C02_STRAP ==> Component NC */
PAD_NC(GPP_C02, NONE),
/* GPP_C03 : [] ==> EN_WCAM_SENR_PWR */
PAD_CFG_GPO_LOCK(GPP_C03, 0, LOCK_CONFIG),
/* GPP_C04 : [] ==> EN_WCAM_PWR */
PAD_CFG_GPO_LOCK(GPP_C04, 0, LOCK_CONFIG),
/* GPP_C05 : [] ==> WWAN_PERST_L_STRAP */
PAD_CFG_GPO(GPP_C05, 0, PLTRST),
/* GPP_C06 : [] ==> USI_REPORT_EN */
PAD_CFG_GPO(GPP_C06, 0, DEEP),
/* GPP_C07 : [] ==> USI_INT */
PAD_CFG_GPI_APIC(GPP_C07, NONE, PLTRST, LEVEL, NONE),
/* GPP_C08 : No heuristic was found useful */
PAD_NC(GPP_C08, NONE),
/* GPP_C09 : net NC is not present in the given design */
PAD_NC(GPP_C09, NONE),
/* GPP_C10 : net NC is not present in the given design */
PAD_NC(GPP_C10, NONE),
/* GPP_C11 : [] ==> SD_CLKREQ_ODL */
PAD_CFG_NF(GPP_C11, NONE, DEEP, NF1),
/* GPP_C12 : [] ==> WWAN_CLKREQ_ODL */
PAD_CFG_NF(GPP_C12, NONE, DEEP, NF1),
/* GPP_C13 : [] ==> SSD_CLKREQ_ODL */
PAD_CFG_NF(GPP_C13, NONE, DEEP, NF1),
/* GPP_C15 : [] ==> GPP_C15_STRAP */
PAD_NC(GPP_C15, NONE),
/* GPP_C16 : [] ==> USB_C0_LSX_TX */
PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1),
/* GPP_C17 : [] ==> USB_C0_LSX_RX */
PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1),
/* GPP_C18 : [] ==> USB_C0_AUX_DC_P */
PAD_CFG_NF(GPP_C18, NONE, DEEP, NF6),
/* GPP_C19 : [] ==> USB_C0_AUX_DC_N */
PAD_CFG_NF(GPP_C19, NONE, DEEP, NF6),
/* GPP_C20 : [] ==> USB_C1_LSX_TX */
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1),
/* GPP_C21 : [] ==> USB_C1_LSX_RX */
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1),
/* GPP_C22 : [] ==> SOC_FP_BOOT0 */
PAD_CFG_GPO_LOCK(GPP_C22, 0, LOCK_CONFIG),
/* GPP_C23 : [] ==> FP_RST_ODL */
PAD_CFG_GPO_LOCK(GPP_C23, 1, LOCK_CONFIG),
/* GPP_D00 : WCAM_MCLK_R */
PAD_CFG_NF(GPP_D00, NONE, DEEP, NF1),
/* GPP_D01 : [] ==> SD_PE_WAKE_ODL */
PAD_CFG_GPI_LOCK(GPP_D01, NONE, LOCK_CONFIG),
/* GPP_D02 : [] ==> SD_PERST_L */
PAD_CFG_GPO_LOCK(GPP_D02, 1, LOCK_CONFIG),
/* GPP_D03 : [] ==> EN_PP3300_SD */
PAD_CFG_GPO_LOCK(GPP_D03, 1, LOCK_CONFIG),
/* GPP_D04 : [] ==> EN_SPKR */
PAD_CFG_GPO(GPP_D04, 1, DEEP),
/* GPP_D05 : net NC. Test pad. */
PAD_NC(GPP_D05, NONE),
/* GPP_D06 : net NC. Test pad.*/
PAD_NC(GPP_D06, NONE),
/* GPP_D07 : net NC. Test pad. */
PAD_NC(GPP_D07, NONE),
/* GPP_D08 : net NC. Test pad. */
PAD_NC(GPP_D08, NONE),
/* GPP_D09 : [] ==> I2S_MCLK_R */
PAD_CFG_NF(GPP_D09, NONE, DEEP, NF2),
/* GPP_D10 : [] ==> I2S_SPKR_SCLK_R */
PAD_CFG_NF(GPP_D10, NONE, DEEP, NF2),
/* GPP_D11 : [] ==> I2S_SPKR_SFRM_R */
PAD_CFG_NF(GPP_D11, NONE, DEEP, NF2),
/* GPP_D12 : [] ==> I2S_SOC_TX_SPKR_RX_R_STRAP */
PAD_CFG_NF(GPP_D12, DN_20K, DEEP, NF2),
/* GPP_D13 : [] ==> I2S_SOC_RX_SPKR_TX */
PAD_CFG_NF(GPP_D13, NONE, DEEP, NF2),
/* GPP_D14 : [] ==> I2S_HP_SCLK_R */
PAD_CFG_NF(GPP_D14, NONE, DEEP, NF2),
/* GPP_D15 : [] ==> I2S_HP_SFRM_R */
PAD_CFG_NF(GPP_D15, NONE, DEEP, NF2),
/* GPP_D16 : [] ==> I2S_SOC_TX_HP_RX_R */
PAD_CFG_NF(GPP_D16, NONE, DEEP, NF2),
/* GPP_D17 : [] ==> I2S_SOC_RX_HP_TX */
PAD_CFG_NF(GPP_D17, NONE, DEEP, NF2),
/* GPP_D18 : net NC is not present in the given design */
PAD_NC(GPP_D18, NONE),
/* GPP_D19 : net NC is not present in the given design */
PAD_NC(GPP_D19, NONE),
/* GPP_D20 : net NC is not present in the given design */
PAD_NC(GPP_D20, NONE),
/* GPP_D21 : [] ==> WLAN_CLKREQ_ODLl */
PAD_CFG_NF(GPP_D21, NONE, DEEP, NF2),
/* GPP_D22 : net NC is not present in the given design */
PAD_NC(GPP_D22, NONE),
/* GPP_D23 : net NC is not present in the given design */
PAD_NC(GPP_D23, NONE),
/* GPP_E00 : [] ==> SAR1_INT_L */
PAD_CFG_GPI_APIC(GPP_E00, NONE, PLTRST, LEVEL, NONE),
/* GPP_E01 : MEM_STRAP_2 ==> Component NC */
PAD_CFG_GPI_LOCK(GPP_E01, NONE, LOCK_CONFIG),
/* GPP_E02 : MEM_STRAP_1 ==> Component NC */
PAD_CFG_GPI_LOCK(GPP_E02, NONE, LOCK_CONFIG),
/* GPP_E03 : [] ==> GSC_SOC_INT_ODL */
PAD_CFG_GPI_APIC_LOCK(GPP_E03, NONE, LEVEL, INVERT, LOCK_CONFIG),
/* GPP_E04 : [] ==> HPS_INT_L */
PAD_CFG_GPI_IRQ_WAKE(GPP_E04, NONE, PLTRST, LEVEL, NONE),
/* GPP_E05 : [] ==> USB_A0_RT_RST_ODL */
PAD_CFG_GPO(GPP_E05, 1, DEEP),
/* GPP_E06 : GPP_E06_STRAP ==> Component NC */
PAD_NC(GPP_E06, NONE),
/* GPP_E07 : [] ==> WWAN_FCPO_L */
PAD_CFG_GPO(GPP_E07, 1, DEEP),
/* GPP_E08 : [] ==> SAR2_INT_L */
PAD_CFG_GPI_APIC_LOCK(GPP_E08, NONE, LEVEL, NONE, LOCK_CONFIG),
/* GPP_E09 : No heuristic was found useful */
PAD_CFG_NF_LOCK(GPP_E09, NONE, NF1, LOCK_CONFIG),
/* GPP_E10 : net NC is not present in the given design */
PAD_NC(GPP_E10, NONE),
/* GPP_E11 : [] ==> MEM_STRAP_0 */
PAD_CFG_GPI_LOCK(GPP_E11, NONE, LOCK_CONFIG),
/* GPP_E12 : [] ==> MEM_STRAP_3 */
PAD_CFG_GPI_LOCK(GPP_E12, NONE, LOCK_CONFIG),
/* GPP_E13 : [] ==> MEM_CH_SEL */
PAD_CFG_GPI_LOCK(GPP_E13, NONE, LOCK_CONFIG),
/* GPP_E14 : [] ==> SOC_EDP_HPD_L */
PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1),
/* GPP_E15 : net NC is not present in the given design */
PAD_NC(GPP_E15, NONE),
/* GPP_E16 : net NC. Test pad. */
PAD_NC(GPP_E16, NONE),
/* GPP_E17 : [] ==> EN_HPS_PWR */
PAD_CFG_GPO(GPP_E17, 1, DEEP),
/* GPP_E22 : net EN_PP3300_WLAN is not present in the given design */
PAD_NC(GPP_E22, NONE),
/* GPP_F00 : [] ==> CNV_BRI_DT_R */
PAD_CFG_NF(GPP_F00, NONE, DEEP, NF1),
/* GPP_F01 : [] ==> CNV_BRI_RSP */
PAD_CFG_NF(GPP_F01, UP_20K, DEEP, NF1),
/* GPP_F02 : [] ==> CNV_RGI_DT_Rl */
PAD_CFG_NF(GPP_F02, NONE, DEEP, NF1),
/* GPP_F03 : [] ==> CNV_RGI_RSP */
PAD_CFG_NF(GPP_F03, UP_20K, DEEP, NF1),
/* GPP_F04 : [] ==> CNV_RF_RST_L */
PAD_CFG_NF(GPP_F04, NONE, DEEP, NF1),
/* GPP_F05 : [] ==> CNV_CLKREQ */
PAD_CFG_NF(GPP_F05, NONE, DEEP, NF3),
/* GPP_F06 : [] ==> WWAN_WLAN_COEX3 */
PAD_CFG_NF(GPP_F06, NONE, DEEP, NF1),
/* GPP_F07 : [] ==> UCAM_MCLK_R */
PAD_CFG_GPO(GPP_F07, 0, DEEP),
/* GPP_F08 : [] ==> WLAN_PERST_L */
PAD_CFG_GPO(GPP_F08, 1, DEEP),
/* GPP_F09 : No heuristic was found useful */
PAD_NC(GPP_F09, NONE),
/* GPP_F10 : [] ==> WWAN_PCIE_WAKE_ODL */
PAD_CFG_GPI_IRQ_WAKE(GPP_F10, NONE, PLTRST, LEVEL, INVERT),
/* GPP_F11 : GSP1_SOC_CLK_R */
PAD_CFG_NF(GPP_F11, NONE, DEEP, NF5),
/* GPP_F12 : GSPI1_SOC_DO_FPMCU_DI_R */
PAD_CFG_NF(GPP_F12, NONE, DEEP, NF5),
/* GPP_F13 : GSPI1_SOC_DI_FPMCU_DO_LS */
PAD_CFG_NF(GPP_F13, NONE, DEEP, NF5),
/* GPP_F14 : GSPI_SOC_DO_TCHSCR_DI */
PAD_NC(GPP_F14, NONE),
/* GPP_F15 : [] ==> GSPI_SOC_DI_TCHSCR_DO */
PAD_NC(GPP_F15, NONE),
/* GPP_F16 : [] ==> GSPI_SOC_TCHSCR_CLK */
PAD_NC(GPP_F16, NONE),
/* GPP_F17 : [] ==> GSPI1_SOC_CS_L */
PAD_CFG_NF(GPP_F17, NONE, DEEP, NF5),
/* GPP_F18 : [] ==> GSPI_SOC_TCHSCR_CS_L */
PAD_NC(GPP_F18, NONE),
/* GPP_F19 : [] ==> GPP_F19_STRAP */
PAD_NC(GPP_F19, NONE),
/* GPP_F20 : [] ==> GPP_F20_STRAP */
PAD_NC(GPP_F20, NONE),
/* GPP_F21 : [] ==> GPP_F21_STRAP */
PAD_NC(GPP_F21, NONE),
/* GPP_F22 : net NC is not present in the given design */
PAD_NC(GPP_F22, NONE),
/* GPP_F23 : net NC is not present in the given design */
PAD_NC(GPP_F23, NONE),
/* GPP_H00 : GPP_H00_STRAP ==> Component NC */
PAD_NC(GPP_H00, NONE),
/* GPP_H01 : GPP_H01_STRAP ==> Component NC */
PAD_NC(GPP_H01, NONE),
/* GPP_H02 : GPP_H02_STRAP ==> Component NC */
PAD_NC(GPP_H02, NONE),
/* GPP_H04 : [] ==> WWAN_WLAN_COEX1 */
PAD_CFG_NF(GPP_H04, NONE, DEEP, NF2),
/* GPP_H05 : [] ==> WWAN_WLAN_COEX2 */
PAD_CFG_NF(GPP_H05, NONE, DEEP, NF2),
/* GPP_H06 : [] ==> SOC_I2C_TCHPAD_SDA */
PAD_CFG_NF_LOCK(GPP_H06, NONE, NF1, LOCK_CONFIG),
/* GPP_H07 : [] ==> SOC_I2C_TCHPAD_SCL */
PAD_CFG_NF_LOCK(GPP_H07, NONE, NF1, LOCK_CONFIG),
/* GPP_H08 : [] ==> UART_DBG_TX_SOC_RX_R */
PAD_CFG_NF(GPP_H08, NONE, DEEP, NF1),
/* H09 : UART0_TXD ==> UART_DBG_RX_SOC_TX */
/* GPP_H09 : [] ==> UART_SOC_TX_DBG_RX_R */
PAD_CFG_NF(GPP_H09, NONE, DEEP, NF1),
/* GPP_H10 : [] ==> SOC_WP_OD */
PAD_CFG_GPI_GPIO_DRIVER_LOCK(GPP_H10, NONE, LOCK_CONFIG),
/* GPP_H11 : net NC is not present in the given design */
PAD_NC(GPP_H11, NONE),
/* GPP_H13 : [] ==> CPU_C10_GATE_L */
PAD_CFG_NF(GPP_H13, NONE, DEEP, NF1),
/* GPP_H14 : [] ==> SLP_S0_GATE_R */
PAD_CFG_GPO(GPP_H14, 1, PLTRST),
/* GPP_H15 : net NC is not present in the given design */
PAD_NC(GPP_H15, NONE),
/* GPP_H16 : [] ==> DDIB_HDMI_CTRLCLK*/
PAD_CFG_NF(GPP_H16, NONE, DEEP, NF1),
/* GPP_H17 : [] ==> DDIB_HDMI_CTRLDATA */
PAD_CFG_NF(GPP_H17, NONE, DEEP, NF1),
/* GPP_H19 : [] ==> SOC_I2C_AUD_WFC_SDA */
PAD_CFG_NF(GPP_H19, NONE, DEEP, NF1),
/* GPP_H20 : [] ==> SOC_I2C_AUD_WFC_SCL */
PAD_CFG_NF(GPP_H20, NONE, DEEP, NF1),
/* GPP_H21 : [] ==> SOC_I2C_TCHSCR_SDA */
PAD_CFG_NF(GPP_H21, NONE, DEEP, NF1),
/* GPP_H22 : [] ==> SOC_I2C_TCHSCR_SCL */
PAD_CFG_NF(GPP_H22, NONE, DEEP, NF1),
/* GPP_S00 : [] ==> SDW_HP_CLK */
PAD_CFG_NF(GPP_S00, NONE, DEEP, NF1),
/* GPP_S01 : [] ==> SDW_HP_DATA */
PAD_CFG_NF(GPP_S01, NONE, DEEP, NF1),
/* GPP_S02 : [] ==> DMIC_SOC_CLK0_DB_RC */
PAD_CFG_NF(GPP_S02, NONE, DEEP, NF3),
/* GPP_S03 : [] ==> DMIC_SOC_DATA0_DB_R */
PAD_CFG_NF(GPP_S03, NONE, DEEP, NF3),
/* GPP_S04 : [] ==> SDW_SPKR_CLK */
PAD_CFG_NF(GPP_S04, NONE, DEEP, NF1),
/* GPP_S05 : [] ==> SDW_SPKR_DATA */
PAD_CFG_NF(GPP_S05, NONE, DEEP, NF1),
/* GPP_S06 : [] ==> DMIC_SOC_CLK1_DB_RC */
PAD_CFG_NF(GPP_S06, NONE, DEEP, NF3),
/* GPP_S07 : [] ==> DMIC_SOC_DATA1_DB */
PAD_CFG_NF(GPP_S07, NONE, DEEP, NF3),
/* GPP_V00 : [] ==> BATLOW_L */
PAD_CFG_NF(GPP_V00, NONE, DEEP, NF1),
/* GPP_V01 : [] ==> ACPRESENT */
PAD_CFG_NF(GPP_V01, NONE, DEEP, NF1),
/* GPP_V02 : [] ==> EC_SOC_WAKE_ODL */
PAD_CFG_NF(GPP_V02, NONE, DEEP, NF1),
/* GPP_V03 : [] ==> EC_SOC_PWR_BTN_ODL */
PAD_CFG_NF(GPP_V03, NONE, DEEP, NF1),
/* GPP_V04 : [] ==> SLP_S3_L */
PAD_CFG_NF(GPP_V04, NONE, DEEP, NF1),
/* GPP_V05 : [] ==> SLP_S4_L */
PAD_CFG_NF(GPP_V05, NONE, DEEP, NF1),
/* GPP_V06 : [] ==> SOC_SLP_A_L */
PAD_CFG_NF(GPP_V06, NONE, DEEP, NF1),
/* GPP_V08 : [] ==> SOC_SUSCLK */
PAD_CFG_NF(GPP_V08, NONE, DEEP, NF1),
/* GPP_V09 : [] ==> SOC_SLP_WLAN_L */
PAD_CFG_NF(GPP_V09, NONE, DEEP, NF1),
/* GPP_V10 : [] ==> SLP_S5_L */
PAD_CFG_NF(GPP_V10, NONE, DEEP, NF1),
/* GPP_V11 : [] ==> SOC_GPP_V11 testpoint*/
PAD_NC(GPP_V11, NONE),
/* GPP_V12 : [] ==> SOC_SLP_LAN_L */
PAD_CFG_NF(GPP_V12, NONE, DEEP, NF1),
/* GPP_V14 : [] ==> SOC_WAKE_L */
PAD_CFG_NF(GPP_V14, NONE, DEEP, NF1),
/* GPP_V22 : [] ==> WCAM_RST_L */
PAD_CFG_GPO(GPP_V22, 0, DEEP),
/* GPP_V23 : [] ==> UCAM_RST_L */
PAD_CFG_GPO(GPP_V23, 0, DEEP),
};
/* Early pad configuration in bootblock */
static const struct pad_config early_gpio_table[] = {
/* ToDo: Fill early gpio configuration */
/* H08 : UART0_RXD ==> UART_DBG_TX_SOC_RX */
static const struct pad_config early_gpio_table_id0[] = {
/* TODO: Verify all early config in place */
/* GPP_B18 : [] ==> SOC_I2C_TPM_SDA */
PAD_CFG_NF(GPP_B18, NONE, DEEP, NF2),
/* GPP_B19 : [] ==> SOC_I2C_TPM_SCL */
PAD_CFG_NF(GPP_B19, NONE, DEEP, NF2),
/* GPP_H08 : [] ==> UART_DBG_TX_SOC_RX_R */
PAD_CFG_NF(GPP_H08, NONE, DEEP, NF1),
/* H09 : UART0_TXD ==> UART_DBG_RX_SOC_TX */
/* GPP_H09 : [] ==> UART_SOC_TX_DBG_RX_R */
PAD_CFG_NF(GPP_H09, NONE, DEEP, NF1),
/* GPP_D03 : [] ==> EN_PP3300_SD */
PAD_CFG_GPO(GPP_D03, 1, DEEP),
/* GPP_E13 : [] ==> MEM_CH_SEL */
PAD_CFG_GPI(GPP_E13, NONE, DEEP),
/* GPP_A17 : [] ==> EC_SOC_INT_ODL */
PAD_CFG_GPI_APIC_LOCK(GPP_A17, NONE, LEVEL, INVERT, LOCK_CONFIG),
/* GPP_A20 : [] ==> SSD_PERST_L */
PAD_CFG_GPO(GPP_A20, 0, DEEP),
/* GPP_H10 : [] ==> SOC_WP_OD */
PAD_CFG_GPI_GPIO_DRIVER_LOCK(GPP_H10, NONE, LOCK_CONFIG),
};
static const struct pad_config romstage_gpio_table[] = {
/* ToDo: Fill romstage gpio configuration */
static const struct pad_config romstage_gpio_table_id0[] = {
/* A20 : [] ==> SSD_PERST_L */
PAD_CFG_GPO(GPP_A20, 0, DEEP),
};
const struct pad_config *variant_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
const uint32_t id = board_id();
switch (id) {
case 0:
*num = ARRAY_SIZE(gpio_table_id0);
return gpio_table_id0;
case BOARD_ID_UNKNOWN:
default:
printk(BIOS_ERR, "board_id() not found. Unable to load gpio table.\n");
*num = 0;
return NULL;
}
}
const struct pad_config *variant_early_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(early_gpio_table);
return early_gpio_table;
const uint32_t id = board_id();
switch (id) {
case 0:
*num = ARRAY_SIZE(early_gpio_table_id0);
return early_gpio_table_id0;
case BOARD_ID_UNKNOWN:
default:
printk(BIOS_ERR, "board_id() not found. Unable to load early gpio table.\n");
*num = 0;
return NULL;
}
}
/* Create the stub for romstage gpio, typically use for power sequence */
const struct pad_config *variant_romstage_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(romstage_gpio_table);
return romstage_gpio_table;
const uint32_t id = board_id();
switch (id) {
case 0:
*num = ARRAY_SIZE(romstage_gpio_table_id0);
return romstage_gpio_table_id0;
case BOARD_ID_UNKNOWN:
default:
printk(BIOS_ERR,
"board_id() not found. Unable to load romstage gpio table.\n");
*num = 0;
return NULL;
}
}
static const struct cros_gpio cros_gpios[] = {
};
static const struct cros_gpio cros_gpios[] = {};
DECLARE_WEAK_CROS_GPIOS(cros_gpios);

View File

@@ -5,3 +5,5 @@
SPD_SOURCES =
SPD_SOURCES += spd/lp5/set-0/spd-1.hex # ID = 0(0b0000) Parts = MT62F512M32D2DR-031 WT:B
SPD_SOURCES += spd/lp5/set-0/spd-7.hex # ID = 1(0b0001) Parts = MT62F1G32D2DS-026 WT:B
SPD_SOURCES += spd/lp5/set-0/spd-8.hex # ID = 2(0b0010) Parts = MT62F2G32D4DS-026 WT:B

View File

@@ -5,3 +5,5 @@
DRAM Part Name ID to assign
MT62F512M32D2DR-031 WT:B 0 (0000)
MT62F1G32D2DS-026 WT:B 1 (0001)
MT62F2G32D4DS-026 WT:B 2 (0010)

View File

@@ -10,3 +10,5 @@
# Part Name
MT62F512M32D2DR-031 WT:B
MT62F1G32D2DS-026 WT:B
MT62F2G32D4DS-026 WT:B

View File

@@ -13,6 +13,17 @@ chip soc/intel/meteorlake
register "tcss_ports[0]" = "TCSS_PORT_DEFAULT(OC0)"
register "tcss_ports[2]" = "TCSS_PORT_DEFAULT(OC_SKIP)"
# Enable eDP in Port A
register "ddi_port_A_config" = "1"
# Enable HDMI in Port B
register "ddi_port_B_config" = "0"
# Enable Display Port Configuration
register "ddi_ports_config" = "{
[DDI_PORT_A] = DDI_ENABLE_HPD,
[DDI_PORT_B] = DDI_ENABLE_HPD | DDI_ENABLE_DDC,
}"
register "serial_io_gspi_mode" = "{
[PchSerialIoIndexGSPI0] = PchSerialIoDisabled,
[PchSerialIoIndexGSPI1] = PchSerialIoPci,

View File

@@ -81,6 +81,7 @@ config MAINBOARD_PART_NUMBER
default "Marzipan" if BOARD_GOOGLE_MARZIPAN
default "Mrbland" if BOARD_GOOGLE_MRBLAND
default "Pazquel" if BOARD_GOOGLE_PAZQUEL
default "Pazquel360" if BOARD_GOOGLE_PAZQUEL360
default "Pompom" if BOARD_GOOGLE_POMPOM
default "Quackingstick" if BOARD_GOOGLE_QUACKINGSTICK
default "Trogdor" if BOARD_GOOGLE_TROGDOR

View File

@@ -38,6 +38,10 @@ config BOARD_GOOGLE_PAZQUEL
bool "-> Pazquel"
select BOARD_GOOGLE_TROGDOR_COMMON
config BOARD_GOOGLE_PAZQUEL360
bool "-> Pazquel360"
select BOARD_GOOGLE_TROGDOR_COMMON
config BOARD_GOOGLE_POMPOM
bool "-> Pompom"
select BOARD_GOOGLE_TROGDOR_COMMON

View File

@@ -22,6 +22,7 @@ chip northbridge/intel/sandybridge
device pci 00.0 on end # Host bridge Host bridge
device pci 01.0 on end # PCIe Bridge for discrete graphics
device pci 02.0 on end # Internal graphics VGA controller
device pci 06.0 off end # Extra x4 port on north bridge
chip southbridge/intel/bd82x6x # Intel Series 7 PCH
register "docking_supported" = "0"
@@ -47,8 +48,8 @@ chip northbridge/intel/sandybridge
device pci 1c.3 off end # PCIe Port #4
device pci 1c.4 on end # PCIe Port #5
device pci 1c.5 off end # PCIe Port #6
device pci 1c.6 on end # PCIe Port #7
device pci 1c.7 on end # PCIe Port #8
device pci 1c.6 off end # PCIe Port #7
device pci 1c.7 off end # PCIe Port #8
device pci 1d.0 on end # USB2 EHCI #1
device pci 1e.0 on end # PCI bridge
device pci 1f.0 on # LPC bridge PCI-LPC bridge

View File

@@ -3,6 +3,7 @@
chip northbridge/intel/sandybridge
device domain 0 on
subsystemid 0x103c 0x1791 inherit
device pci 06.0 on end # Extra x4 port on north bridge
chip southbridge/intel/bd82x6x
register "sata_port_map" = "0x3f"
@@ -10,6 +11,8 @@ chip northbridge/intel/sandybridge
device pci 1c.2 on end # PCIe Port #3
device pci 1c.3 on end # PCIe Port #4
device pci 1c.5 on end # PCIe Port #6
device pci 1c.6 on end # PCIe Port #7
device pci 1c.7 on end # PCIe Port #8
end
end
end

View File

@@ -10,7 +10,6 @@ config BOARD_LENOVO_HASWELL_COMMON
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
select INTEL_GMA_HAVE_VBT
select INTEL_INT15
select MAINBOARD_HAS_LIBGFXINIT
select MAINBOARD_HAS_TPM1
select MAINBOARD_USES_IFD_GBE_REGION
@@ -23,6 +22,10 @@ config BOARD_LENOVO_HASWELL_COMMON
config BOARD_LENOVO_THINKPAD_T440P
select BOARD_LENOVO_HASWELL_COMMON
select INTEL_INT15
config BOARD_LENOVO_THINKPAD_W541
select BOARD_LENOVO_HASWELL_COMMON
if BOARD_LENOVO_HASWELL_COMMON
@@ -43,6 +46,7 @@ config VBOOT_VBNV_OFFSET
config VARIANT_DIR
default "t440p" if BOARD_LENOVO_THINKPAD_T440P
default "w541" if BOARD_LENOVO_THINKPAD_W541
config DEVICETREE
default "variants/\$(CONFIG_VARIANT_DIR)/devicetree.cb"
@@ -55,10 +59,11 @@ config MAINBOARD_DIR
config MAINBOARD_PART_NUMBER
default "ThinkPad T440p" if BOARD_LENOVO_THINKPAD_T440P
default "ThinkPad W541" if BOARD_LENOVO_THINKPAD_W541
config VGA_BIOS_ID
string
default "8086,0416"
default "8086,0416" if BOARD_LENOVO_THINKPAD_T440P
config USBDEBUG_HCD_INDEX
int
@@ -72,9 +77,13 @@ config PS2K_EISAID
default "LEN0071"
config PS2M_EISAID
default "LEN0036"
default "LEN0036" if BOARD_LENOVO_THINKPAD_T440P
default "LEN004A" if BOARD_LENOVO_THINKPAD_W541
config THINKPADEC_HKEY_EISAID
default "LEN0068"
config GFX_GMA_PANEL_1_PORT
default "DP3" if BOARD_LENOVO_THINKPAD_W541
endif

View File

@@ -1,2 +1,5 @@
config BOARD_LENOVO_THINKPAD_T440P
bool "ThinkPad T440p"
config BOARD_LENOVO_THINKPAD_W541
bool "ThinkPad W541"

View File

@@ -1,5 +1,6 @@
romstage-y += variants/$(VARIANT_DIR)/gpio.c
romstage-y += variants/$(VARIANT_DIR)/romstage.c
ramstage-y += mainboard.c
ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
subdirs-y += variants/$(VARIANT_DIR)

View File

@@ -0,0 +1 @@
ramstage-y += mainboard.c

Some files were not shown because too many files have changed in this diff Show More