Commit Graph

54626 Commits

Author SHA1 Message Date
Patrick Georgi 42f15054b1 memlayout.ld: Increase RAMSTAGE size to more than 1MB everywhere
This is in preparation of a larger heap. I went for 2MB because why not?

Change-Id: I51f999a10ba894a7f2f5fce224d30bf914107c38
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-10-11 12:08:22 +00:00
Arthur Heymans c666a91611 soc/amd/genoa: Enable eSPI early
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I4965eac4ec3d600b1e840affce4e5b4fa2ea4360
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-10-10 16:01:20 +00:00
Arthur Heymans 4da9d6b41d soc/amd/genoa: Add aoac.c & enable AOAC devices early
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ic9553e6016c92c9b1678c395cd6a9e6860bf8a76
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76506
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-10 16:00:16 +00:00
Arthur Heymans f955ecb4c5 soc/amd/genoa: Enable cf9 IO early
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I05990c2aca40d9cf47a9ebdfd269b80b8f60e300
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76505
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-10 15:59:27 +00:00
Morris Hsu ded03d55cc mb/google/brya/var/dochi: update gpio settings
Configure GPIOs according to schematics revision 20230923.

TEST=emerge-brya coreboot

Change-Id: I10bd1b72c9b0299b8d29ab642fddb5f0c4727652
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2023-10-10 13:42:38 +00:00
Karthikeyan Ramasubramanian ff63106dec util/amdfwtool: Check for pkg-config presence
Check for pkg-config presence and fail out with actionable message.

BUG=b:302521446
TEST=Build successfully with working pkg-config and failed build with no
pkg-config

Change-Id: I5d604145c919e7f71680d1e095dc68cb21868319
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2023-10-10 13:41:07 +00:00
Reka Norman e486082dfb mb/google/dedede: Wait for HPD on dibbi variants
Some Type-C monitors do not immediately assert HPD. If we enter FSP-S
before HDP is asserted, display initialisation may fail. So wait for
HPD.

This is similar to commit b40c600914 ("mainboard/hatch: Fix puff DP
output on cold boots") on puff, except we don't use
google_chromeec_wait_for_displayport() since that EC command was removed
for TCPMv2 (https://crrev.com/c/4221975). Instead we use the HPD signals
only. By waiting for any HPD signal (Type-C or HDMI), we skip waiting if
HDMI is connected, which is the same behaviour as puff and fizz.

TEST=On dibbi, connect a display via a Type-C to HDMI dongle and check
the dev and recovery screens are now displayed correctly. Also check the
logs in the following cases:

Cold reboot in dev mode, Type-C to HDMI dongle:
HPD ready after 800 ms

Warm reboot in dev mode, Type-C to HDMI dongle:
HPD ready after 0 ms

Cold/warm reboot in dev mode, direct Type-C:
HPD ready after 0 ms

Cold/warm reboot in dev mode, direct HDMI:
HPD ready after 0 ms

Cold/warm reboot in dev mode, no display:
HPD not ready after 3000 ms. Abort.

Change-Id: Id4657b5d5a95a68ecbd9efcf3585cf96ad1e13e1
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78294
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
2023-10-10 13:39:01 +00:00
Kun Liu 7c193b9480 mb/google/rex/var/screebo: Update DTT settings for thermal control
update DTT settings for thermal control, as follows:

1.Cancel TCPU trip point and fine tune other protection temperature on the Critical policy table

2.Fine tune EC/Bios protection temperature

BUG=b:291217859
TEST=emerge-rex coreboot

Change-Id: I0e2ff6eea9fed71ad7680c1fac4921984b87aca5
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78290
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: zhongtian wu <wuzhongtian@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-10 13:38:03 +00:00
Sumeet Pawnikar 639d6c7c17 mb/google/rex/var/rex0: update thermal settings to start fan earlier
Internal testing showed that CPU heatsink gets hot and temperature
goes over 75C. In this situation, the fan does not even start
to lower down CPU temperature. This is because of existing temperature
thresholds of TSR0 and TSR1 sensors are set at 45C to start fan.
With updated new settings based on tuning from thermal team,
the fan starts early at 43C for TSR0 and TSR1 so the CPU temperature
stays below 75C.

BUG=b:302673874
TEST=Built and tested on google/rex board

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Change-Id: I6580652d6165946e98ecf1b46ace3352cd34dcdf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78279
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-10 13:37:38 +00:00
Patrick Georgi 69bbe26a82 include/stddef: define SIZE_MAX
It's needed for future work.

Change-Id: I3419d11072bc0e3791ad08144c2a25c607550f28
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-10 06:43:37 +00:00
Patrick Rudolph bd7a7fd4b2 sb/intel/bd82x6x: Use helper for PCIe hotplug
Introduce pci_is_hotplugable is helper to find hotpluggable
PCIe devices.

Test: PCI express slot is still marked as the only hotpluggable
      PCIe root port.

Change-Id: I25aae540ff2ffa3ec5b93ed9caa838b4e50048d2
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78227
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 14:08:05 +00:00
Patrick Rudolph 91c38146a4 sb/intel/bd82x6x: Disable unused PCIe root ports
Follow the PCH BIOS spec more closely by porting the broadwell
and braswell PCIe downstream device detection. To safe power
disable PCIe root ports that have no downstream device connected.

By setting the FLAGS_SLOT bit in register PCI_EXP_FLAGS the
PCI_EXP_SLTSTA_PDS bit will be updated with in band device
detection from the PCIe PHY. While this is primarly used for PCIe
hot-plug detection, it is more reliable than probing for downstream
devices by reading DID/VID PCI registers.

The FLAGS_SLOT bit should stay cleared for integrated devices,
as those are known to be present, but to simplify the code all
PCIe ports will have the FLAGS_SLOT bit set. There currently
used devicetrees might also be lacking integrated devices on
the PCH root ports...

The SLOTCAP field must be updated by BIOS when the FLAGS_SLOT
is set, but it shouldn't be filled for integrated devices. Until
now the SLOTCAP field has always been populated and it never
was a problem.

- Set FLAGS_SLOT "Slot Implemented" bit early.
- Read bit PCI_EXP_SLTSTA_PDS to detect connected downstream
  devices as done on braswell.
- Disable unused PCIe slots that are not hotplugable.
- Set BIT26 in register 0x338 and wait for bits in register 0x328
  to clear as done on broadwell.

Test: Tested on Lenovo X220. Unused root ports are disabled and port
      that are in used or marked hot-plug are kept enabled.

Change-Id: I8ccfcab2e0e4faba8322755a4f8c2108d9b007ac
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78226
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 14:07:14 +00:00
Jianjun Wang f1b5b0dfa6 soc/mediatek: PCI: Fix translation window
Dojo fails to boot from NVMe with CONFIG_RESOURCE_ALLOCATION_TOP_DOWN
enabled. The root cause is using __fls() will get a smaller value when
the size is not a power of 2, for example, __fls(0x3000000) = 25. Hence
the PCIe translation window size is set to 0x2000000. Accessing
addresses higher than 0x2300000 will fail.

Fix translation window by splitting the MMIO space to multiple tables if
its size is not a power of 2.

Resolves: https://ticket.coreboot.org/issues/508.

TEST=Build pass and boot up to kernel successfully via SSD on Dojo
board, it can boot with and without the
CONFIG_RESOURCE_ALLOCATION_TOP_DOWN option.

BUS=b:298255933
BRANCH=cherry

Change-Id: I42b0f0bf9222d284dee0c29f1a6ed6366d6e6689
Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78044
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 13:59:16 +00:00
Patrick Rudolph 873178bfd6 sb/intel/bd82x6x: Follow PCH BIOS spec
PCH BIOS spec says that BIOS must clear BIT26 in register 0x338
in PEI, as done on lynxpoint.
Copy and adapt the lynxpoint code to do the same on bd82x6x.
Add special case for UM77 chipset, which only has 4 PCIe ports.

Test: System still boots and all PCIe ports are fully working.

Change-Id: I865818c0c22194fffcb2bbdf8c43737b0dce2307
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78225
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-09 13:56:56 +00:00
Karthikeyan Ramasubramanian a9b3cf3358 soc/amd/common/vboot: Fix PSP verstage timestamps after TSC adoption
Commit 26d54b70e2 ("soc/amd/common/cpu: use TSC_MONOTONIC_TIMER for
SOC_AMD_COMMON_BLOCK_TSC") updated all the AMD SoCs with Zen-based CPU
cores to use TSC_MONOTONIC_TIMER. The same change adjusted the PSP
Verstage timestamps (in microseconds) to the x86 TSC rate. But it
included only the base_time during the adjustment leaving the individual
entry timestamp. This leads to incorrectly adjusted PSP Verstage
timestamps. Fix the adjustment logic.

BUG=None
TEST=Build and boot to OS in Skyrim. Ensure that the PSP Verstage
timestamps in cbmem -t output are adjusted correctly.
Before this change:
   5:start of verified boot                         67,890 (69,936)
 503:starting to initialize TPM                     67,890 (0)
 504:finished TPM initialization                    67,902 (12)
 505:starting to verify keyblock/preamble (RSA)     67,906 (3)
 506:finished verifying keyblock/preamble (RSA)     67,984 (77)
 511:starting TPM PCR extend                        67,984 (0)
 512:finished TPM PCR extend                        67,992 (7)
 513:starting locking TPM                           67,992 (0)
 514:finished locking TPM                           67,995 (3)
   6:end of verified boot                           67,995 (0)
  11:start of bootblock                             572,152 (504,156)

After this change:
   5:start of verified boot                         71,000 (73,040)
 503:starting to initialize TPM                     71,065 (65)
 504:finished TPM initialization                    101,506 (30,441)
 505:starting to verify keyblock/preamble (RSA)     110,624 (9,118)
 506:finished verifying keyblock/preamble (RSA)     297,101 (186,477)
 511:starting TPM PCR extend                        297,297 (196)
 512:finished TPM PCR extend                        315,338 (18,041)
 513:starting locking TPM                           315,341 (3)
 514:finished locking TPM                           322,922 (7,581)
   6:end of verified boot                           322,943 (21)
  11:start of bootblock                             570,296 (247,353)

Change-Id: I3e52bef22f65596152f29c511bed680427660ff5
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78231
Reviewed-by: Tim Van Patten <timvp@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-10-09 13:56:22 +00:00
Kenneth Chan 2651351805 mb/google/dedede: Create dexi variant
Create the dexi variant of the taranza project by
copying the files to a new directory named for the variant.

BUG=b:303533815
BRANCH=dedede
TEST=util/abuild/abuild -p none -t google/dedede -x -a
make sure the build includes GOOGLE_DEXI

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I708a16cb864dca7309cb0201e7887af7456a4885
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78249
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 13:55:07 +00:00
Mark Hsieh 90f8151271 mb/google/nissa/var/joxer: Configure Acoustic noise mitigation
- Enable Acoustic noise mitigation
- Set slow slew rate VCCIA and VCCGT to SLEW_FAST_8
- Set FastPkgCRampDisable VCCIA and VCCGT to 1

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

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I575da55b96bf4deacec5c0992eae9930eb0745d6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78256
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2023-10-09 13:42:24 +00:00
Kane Chen 70b517ee57 soc/intel/meteorlake: Reserve IOE P2SB MMIO correctly
The original code only reserves IOM mmio, but there is other asl
code that requires to program ioe p2sb mmio such as IOE PCIE clk request
control. See \_SB.ECLK.CLKD in src/soc/intel/common/acpi/pcie_clk.asl

TEST=as before: suspend_stress_test 50 cycle pass, type-c display OK
on screebo

Change-Id: Ie55f7975277b390f776e44596c42e426ba9cd235
Signed-off-by: Kane Chen <kane.chen@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78252
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-09 13:42:01 +00:00
Mark Hsieh 0177c95c16 mb/google/nissa/var/joxer: Config I2C frequency
Measured the I2C frequency meets spec
- I2C0  (TPM): 949.7 Khz
- I2C1  (TouchScreen): 395.8 Khz
- I2C3  (Audio): 387.4 Khz
- I2C5  (Touchpad): 384.8 Khz

BUG=b:303356736
TEST=USE="project_joxer emerge-nissa coreboot"
and check all I2C devices measurement result

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I17dd1cb7800d00669f86fc6e2b350757695da881
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78218
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-09 13:41:38 +00:00
Sukumar Ghorai b7f602a9fc mb/google/{rex,ovis}: Disable package C-state auto demotion
Package C-state auto demotion feature allows hardware to determine lower
C-state as per platform policy. Since platform sets performance policy
to balanced from hardware, auto demotion can be disabled without
performance impact.

Also, disabling this feature results soc to enter below PC8 state and
additional power savings ~30mW in Local-Video-Playback scenario.

BUG=b:303546334
TEST=Local build successfully & Boot to OS successfully
 - Also check platform enter PC8 state in local video playback
 - before this change: # iotools rdmsr 0 0xE2 -> 0x0000000060008008
 - After # iotools rdmsr 0 0xE2 -> 0x0000000000008008

Change-Id: Ia4cf4a7cb6bd5eaae26197b55f9385c078960d7b
Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78250
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-10-07 14:58:44 +00:00
Patrick Rudolph 17848b65c3 device/pci_def.h: Add more bits
Add more fields for PCIe slots status and link control and
slot capabilities.

Change-Id: I64e40ea6bd731cd52ce006224b7c3091d5ef3aac
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78237
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-06 12:37:21 +00:00
Patrick Rudolph 1909c3ba9f cpu/intel/model_206ax: Only use supported C-states
When advertising C-state using the ACPI _CST object, make sure
to only advertise those that are supported by the CPU.
Downgrade if it's not and make sure to not advertise duplicate
states.

Add debug prints for the finally selected mapping of ACPI
C-state vs Intel CPU C-state.

Test: Tested on Lenovo X220.
      All C-states are still advertised as all are supported.

Change-Id: Iaaee050e0ce3c29c12e97f5819a29f485a7946c2
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78194
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-06 12:28:51 +00:00
Patrick Rudolph 588c6f006e cpu/intel/model_206ax: Use haswell cstate_map
Make the code look like on newer platforms. This doesn't change
functionality.

Test: Lenovo X220 still boots and advertises all C-states as
      before.

Change-Id: Ie7076d11720d55a4ac11318cbbdab9f75d08e15e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78193
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-06 12:17:16 +00:00
Patrick Rudolph 130643277c cpu/intel/model_206ax: Print supported C-states
According to the BWG C-states are processor specific
and BIOS must check if a C-state is supported at all.

Print the supported C-states in before ACPI _CNT generation.

Test: Tested on Lenovo X220 using Intel i5-2540M.
      All C-states are reported as supported.

Change-Id: I713712a1a104714cbf3091782e564e7e784cf21d
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78133
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-06 12:16:46 +00:00
Patrick Rudolph 6a13b520e9 arch/x86/cpu_common: Add cpu_get_c_substate_support
Add a function to get the number of substates supported by
an Intel CPU C-state.

Test: Can read out the supported C-state substates.

Change-Id: Ie57e87609ea5d6ec6f37154e8b84f1e9574aa4a9
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78224
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-06 12:15:34 +00:00
Ivan Jager 6a249d688e cbfs: Restore 32-bit padding in cbfs_header
It was changed from a fixed size-1 array to a flexible array
in commit 242bac0e16 ("…: Use C99 flexible arrays") which resulted
in a change to the serialized format as the header size was no longer
the same.

That broke other tools that read CBFS files, like diffoscope
https://github.com/NixOS/nixpkgs/issues/256896

Change-Id: I4199dcc4823469c5986ac967a55b1c85cc62f780
Signed-off-by: Ivan Jager <aij+git@mrph.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78239
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-06 10:11:31 +00:00
Cong Yang 20a332a30e mb/google/starmie: Add 3 ms delay to AW37503 Power IC panel timing
Based on the power sequence of the panel [1], the power on T3 sequence
VSN to RESET should be larger than 1ms. Because the Power IC descending
slope takes 2ms, actual measurement needs 3ms to meet the timing of
panel sequence.

[1] HX83102-J02_Datasheet_v03.pdf

BUG=b:302212730
BRANCH=corsola
TEST=emerge-staryu coreboot chromeos-bootimage and boot the panel

Change-Id: I488c746d1fcfc165125b0ecccb0bccbb99231b00
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78185
Reviewed-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2023-10-06 03:14:02 +00:00
Matt DeVillier dab7a86859 Update amd_blobs submodule to upstream main branch
Updating from commit id ae822f2d0db7 (2023-09-21):
  MDN: Restore SMU fw version 90.41.0

to commit id b1741d184add (2023-10-04):
  PCO: Update SMU firmware to 4.30.77.200

This brings in 1 new commit:
b1741d184a PCO: Update SMU firmware to 4.30.77.200

BRANCH=zork
BUG=b:299603947

Change-Id: I0ce75b762bda90a5fa3bc546de42bc5d55637e17
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-05 21:49:02 +00:00
Sukumar Ghorai ed1c03a138 soc/intel: separate slp-s0 residency counter frequency in LPIT table
Intel platforms use Low Power Idle Table (LPIT) to enumerate platform
Low Power Idle states. There are two types of low power residencies
 a) CPU PKG C10 - read via MSR (Function fixed hardware interface)
 b) Platform Controller Hub (PCH) SLP_S0 - read via memory mapped IO

Ref. https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf,
section 2.2.1: value of 0 indicates that counter runs at TSC frequency.

Ref. Intel 64 and IA-32 Architectures Software Developer’s Manual (Vol 4)
MSR 0x632: PC10 residency counter is at same frequency as the TSC.
Whereas slp_s0 residency counter running in different frequency.

BUG=b:300440936
TEST=check kernel cpuidle sysfs are created after kernel boot
  cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
  cat /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us

Change-Id: Ibde764551a21b9aecb1c269948f4823548294711
Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78177
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-05 15:22:04 +00:00
Eric Lai 1e2541074f MAINTAINERS: Add Brya maintainer
Add myself :p

Change-Id: Ib2bd5d9e9c93cf09ce4bca6a55cb5fab137f1bbc
Signed-off-by: Eric Lai <ericllai@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-05 14:21:48 +00:00
Daniel Gröber c841880c12 spi/winbond: Use spi_flash_bpbits in winbond_bpbits_to_region
This consolidates the bp, tb, cmp, srp0 and srp1 variables under the new
spi_flash_bpbits struct to allow treating them as one unit in the
refactoring to follow.

Change-Id: I2a1a77fb73047df733498c0fa8b8de1153c3b09e
Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42113
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:57:51 +00:00
Daniel Gröber f20d7d6aa4 spi: Add new struct spi_flash_bpbits for block protection bits
Currently the block protection bits are being passed around as
individual arguments. We will use this new struct to replace the
corresponding arguments in the winbond_bpbits_to_region and
winbond_set_write_protection functions.

Change-Id: I02828b1f764aea29374e794001e74cdc86a94c92
Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2023-10-05 12:51:38 +00:00
Arthur Heymans a5b06b9b57 cpu/intel/socket_BGA956: Double DCACHE_RAM_SIZE to 64 kB
This fixes building lenovo/x200 with VBOOT.
All supported CPUs have enough L2 cache to support this.

Change-Id: Ifd6a16ce36c86349955cd7b7ddb3f74a19c17c4d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-05 12:50:43 +00:00
Robert Chen f151cd2859 mb/google/nissa/var/quandiso: Change camera fw_config feild
Quandiso reserve bit 11 for mipi camera usage.

BUG=b:300574047
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: Id4343083f0d69a49c642657d165ceac349cd7422
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78213
Reviewed-by: Shawn Ku <shawnku@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:49:35 +00:00
Robert Chen 582a6ef54b mb/google/nissa/var/quandiso: Add ALC1019 amp support
BUG=b:300573763
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: Iff8167695c302f7b58976516d651a81f1a429bee
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77754
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shawn Ku <shawnku@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-05 12:49:07 +00:00
Dtrain Hsu 5754749830 mb/google/nissa/var/uldren: Remove fw_config probe for TS and TP
When service center repair touchscreen or touchpad will change
compatible device not specific one, the fw_config probe mechanism is not
convenient for service center. Removing touchscreen and touchpad
fw_config probe for the purpose.

BUG=b:297840605
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I66f12ae478f74c019c53ee5e77f7e0f9c324e758
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77538
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:48:37 +00:00
Matt DeVillier f952560bef configs: Clean up config.google.skyrim.with_binaries defconfig
Drop the Cezanne FSP binaries (which were just placeholders), as well
as all other defaults removed when running 'make savedefconfig'

Change-Id: I6d355b838d30dca64a9e6206eb6000763cc105a1
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78195
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:47:56 +00:00
Seunghwan Kim 7de7f9ab44 mb/google/nissa/var/pirrha: Turn off SD card power signal in s0ix
Turn off GPP_H13 (EN_PP3300_SD_X) in s0ix for power saving. It reduces
about 3mW of power consumption in s0ix on pirrha proto board.

BUG=b:300845527
TEST=Built and verified GPP_H13 voltage was 0V in s0ix.
     Also verified SD card worked after s0ix for 20 times.

Change-Id: I5ec53820276e50f5b8b01584595118cf2dc4c95c
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-05 10:20:51 +00:00
Bernardo Perez Priego 85710cbe40 mb/google/rex: Configure ISH UART TX/RX as NC
This patch reverses ISH UART pin configuration to allow ISH to enter
into suspend mode. This UART port is for debugging purposes.

BUG=b:302612549
TEST=On Google/rex platform with ISH enabled, do suspend_stress_test
     This test must pass

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I8aba45420744a3990e1f9637c3b31ea2e0f78f87
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78049
Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-04 20:03:48 +00:00
Subrata Banik 1e58a16264 soc/intel/cmn/gfx: Add API to report presence of external display
This patch implements an API to report the presence of an external
display on Intel silicon. The API uses information from the transcoder
and framebuffer to determine if an external display is connected.

For example, if the transcoder is attached to any DDI ports other than
DDI-A (eDP), and the framebuffer is initialized, then it is likely
that an external display is present.

This information can be used by payloads to determine whether or not
to power on the display, even if eDP is not initialized.

BUG=b:299137940
TEST=Build and boot google/rex

Scenarios:

Booting with eDP alone: has_external_display value is 0
Booting with eDP + HDMI: has_external_display value is 0
Booting with HDMI alone: has_external_display value is 1
Booting with USB-C display alone: has_external_display value is 1

Change-Id: I77436940978c7fa9368d79394b46a5e794c32e42
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78080
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-04 18:51:10 +00:00
Subrata Banik 790b5cf442 {commonlib, libpayload}: Add "has_external_display" in coreboot table
This patch introduces a new coreboot table entry named
"has_external_display" to understand if external display is attached.

This information is useful to prevent graceful shutdown by payload
when the LID is closed but an external display is present.

This piece of the information will be gathered by coreboot and passed
into the payload using this new entry aka external_display because
payload (i.e., deptcharge) doesn't have any other way to determine
if external display is available.

BUG=b:299137940
TEST=Able to build and boot google/rex.

w/o this patch:

LID closed and external display attached (HDMI) in developer mode
  (GBB 0x39):

> System is powered off by depthcharge

w/ this patch:

LID closed and external display attached (HDMI) in developer mode
  (GBB 0x39):

> Booted to OS and device is alive/usable

Change-Id: I0fa7eee4c5a50371a7a66c6ca1ac2c7d046d010b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77796
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 18:50:49 +00:00
Subrata Banik 913ea97fbe soc/intel: Select GMA v2 for ADL, MTL, TGL to reflect port/pipe defs
Intel GFX IP TRANS_DDI_FUNC_CTL register bit definitions have changed
since Tiger Lake.

This register is used to map ports and pipes to display controllers,
so reflecting the correct status is important for detecting physical
display end point devices.

This patch ensures that ADL, MTL, and TGL SoCs choose GMA version 2 to
properly reflect the updated port and pipe register definitions.

BUG=b:299137940
TEST=Build and boot google/rex successfully.

Change-Id: Ie2082747d18a5f136f410b1019be4d6c801617b1
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78079
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-04 18:50:32 +00:00
Subrata Banik 1858903e78 drivers/intel/gma: Update port select bit definitions
This commit updates the port select bit definitions for the
TRANS_DDI_FUNC_CTL registers in the Intel GMA driver to accommodate
the changes introduced since TGL SoC.

Specifically, the following changes were made:

- Updated the DDI select bit definitions from 3-bits (bit 28-30) to
  4-bits (bit 27-30).
- Introduces `INTEL_GMA_VERSION_2` config to accommodate the port and
  pipe related differences between previous generation GMA register
  (TRANS_DDI_FUNC_CTL) to the current generation GMA register.

This commit backports the change from the following upstream patch:
https://patchwork.freedesktop.org/patch/msgid/20190713010940.17711-3-
lucas.demarchi@intel.com

BUG=b:299137940
TEST=Able to build and boot google/rex.

Change-Id: I815ffa90c2e235afd70baa7e3837e1f9af89b1b0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78078
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2023-10-04 18:50:21 +00:00
Joey Peng b6b3c62ea1 mb/google/dedede/var/boxy:Enable wake on USB2/3 (un)plug
Set USB port which corresponds PORTSCN/PORTSCXUSB3 register bits for
enable USB wake.

BUG=b:302230434
TEST=Verify USB-A device could wake up Boxy

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: I0f6300dc6bbb6fb8226151e49e38f0450b1e71b7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78144
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 15:30:31 +00:00
Sheng-Liang Pan eed9c8322f mb/google/dedede/var/taranza: Enable wake on USB2/3 (un)plug
Set USB port which corresponds PORTSCN/PORTSCXUSB3 register bits for enable USB wake.
The physical USB slot is 6, USB2 port5 for Bluetooth, total USB2 port num is 7, USB3 keep 6.

BUG=b:300844110
TEST=Verify USB-A device could wake up Taranza

Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Change-Id: Ied92c4a70bc594bd189dcb942f1a445412509464
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78068
Reviewed-by: Ricky Chang <rickytlchang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2023-10-04 15:30:16 +00:00
Reka Norman d2f6b3fa9c soc/intel/jasperlake: Enable wake from USB
Use the common UWES ACPI method to enable wake from USB. The only
difference to other SoCs is that JSL only has 8 USB2 ports, so the USB3
PORTSC register offset is different.

BUG=b:300844110
TEST=When enabled on taranza, all USB2 and USB3 ports can wake from
suspend

Change-Id: Ibc90246965d5d809123e954847543d28d78498a5
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78086
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
2023-10-04 15:29:57 +00:00
Reka Norman a5215c4eb3 soc/intel: Move USB wake methods to a common ASL file
The ACPI methods for enabling USB wake are identical on ADL, CNL and
SKL. Move them to a common ASL file so they can be reused more easily
on other SoCs.

Also move the USB_PORT_WAKE_ENABLE macro used to create enable bitmasks
in devicetree to a common header.

BUG=b:300844110
TEST=Use abuild to build kinox, puff, and fizz with and without this
change. Check the generated dsdt.aml is unchanged.

Change-Id: Iabdfe2bece7fafc284ddf04382f1bbcacc370cce
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78085
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-04 15:29:32 +00:00
Yidi Lin 773d4b8fb0 mb/google/geralt: Remove SAMSUNG_ATANA33XC20 panel support
This panel is never actually enabled on Geralt. The derived project
won't use this panel either. Therefore, remove this panel support.

BUG=none
BRANCH=none
TEST=emerge-geralt coreboot

Change-Id: I97ed5b341724ed42098b2c17d0eb75eab881dbb1
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-10-04 09:38:55 +00:00
Yidi Lin da63073827 mb/google/geralt: Update voltage mapping tables for RAM ID and LCMD ID
The tolerance of ADC voltage table is too small. Update the table values
accordring to the suggestion from the hardware team. The patch is
prepared for the derived projects. There is no actual issue now.

BRANCH=none
BUG=b:301908091
TEST=check firmware screen

Change-Id: I3bde30b6bbe79c81e276f23f4110715c3278d42c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-10-04 09:38:37 +00:00
Serin Yeh ab6f016a43 mb/google/brya/var/yavilla: Add VCM power control sequence
Add VCM power control to configure 2.8V and reset pin, and VCM can
be powered on/off properly.

BUG=b:292907385
TEST=Run ITS test

Change-Id: I242025836fd50076a40ffcc4e5d4a5d5bc6fb4d0
Signed-off-by: Serin Yeh <serin.yeh@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78170
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 09:37:46 +00:00