Commit Graph

37326 Commits

Author SHA1 Message Date
Rob Barnes c4a5acdabc mb/google/zork/dalboz: Increase eMMC initial clock frequency
This will reduce boot time by 7ms. Some of the initial designs
don't have a pull-up resistor on the CMD line. These designs still boot
at 400 kHz despite not having the pull-up.

BUG=b:158766134
TEST=WIP
BRANCH=zork

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I1191d73a2a3f72f99de187a946162460acbb287a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45935
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:37:07 +00:00
Rob Barnes d9352e69db mb/google/zork/woomax: Increase eMMC initial clock frequency
This will reduce boot time by 7ms. Some of the initial designs
don't have a pull-up resistor on the CMD line. These designs still boot
at 400 kHz despite not having the pull-up.

BUG=b:158766134
TEST=WIP
BRANCH=zork

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I2fcbe35103020c3444902c077b4985f87f970671
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45936
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:37:03 +00:00
Rob Barnes 8d67da6b0d mb/google/zork/vilboz: Increase eMMC initial clock frequency
This will reduce boot time by 7ms. Some of the initial designs
don't have a pull-up resistor on the CMD line. These designs still boot
at 400 kHz despite not having the pull-up.

BUG=b:158766134
TEST=Boot on Vilboz with emmc
BRANCH=zork

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I9a1e47dbee3fcc7317857d40c5418be30d755d61
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45933
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:36:53 +00:00
Matt DeVillier 30f583264d mb/google/jecht: Disable PCIe AER
Ethernet hardware on jecht variants doesn't support AER, so
disable it to mitigate continuous AER timeout errors in dmesg:

> pcieport 0000:00:1c.0: AER: Corrected error received: 0000:00:1c.0
> pcieport 0000:00:1c.0: AER: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Transmitter ID)
> pcieport 0000:00:1c.0: AER: device [8086:9c94] error status/mask=00001000/00002000
> pcieport 0000:00:1c.0: AER: [12] Timeout

Change-Id: Ieda82c6e13c2bbc4b3a051a3d2a7ae90728ccdc6
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46137
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:36:31 +00:00
Matt DeVillier 89d5c2b6e4 mb/google/beltino: Disable PCIe AER
Ethernet hardware on beltino variants doesn't support AER, so
disable it to mitigate continuous AER timeout errors in dmesg:

> pcieport 0000:00:1c.0: AER: Corrected error received: 0000:00:1c.0
> pcieport 0000:00:1c.0: AER: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Transmitter ID)
> pcieport 0000:00:1c.0: AER: device [8086:9c94] error status/mask=00001000/00002000
> pcieport 0000:00:1c.0: AER: [12] Timeout

Change-Id: I0f592a21d08e79cda251e80cd1f1184c4311e9df
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46136
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:36:20 +00:00
Matt DeVillier 1aeccd1440 sb/intel/lynxpoint/pcie.c: fix typo in comment
Change-Id: I741b66e08d977f514f2512d626e3bcf22ce7d46c
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46135
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2020-10-12 08:36:02 +00:00
Matt DeVillier 54e1f59215 sb/intel/lynxpoint: Set PCIe L1 substates capabilities register
Copied from soc/intel/broadwell.

Test: build/boot google/beltino variants, verify L1 PM substates
listed under PCIe device capabilities

Change-Id: Ib2ae3d9539de9f7e22975f00450d9d60d1fd938a
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46134
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:35:51 +00:00
Matt DeVillier 7f6335324b sb/intel/lynxpoint: Enable/disable AER via Kconfig
Several changes[1][2] to the Linux kernel now enable ASPM/AER for the
rt8169 network driver, for which it was previously disabled. This,
coupled with the southbridge enabling AER for all PCIe devices, has
resulted in a large amount of AER timeout errors in the kernel log for
boards which utilize the rt8169 for on-board Ethernet (e.g., google/beltino).
While performance is not impacted, the errors do accumulate.

To mitigate this, guard AER enablement via Kconfig, select it by default
(as to maintain current default behavior), and allow boards which need
to disable it to do so (implemented in subsequent commits).

This implementation is derived from that in soc/intel/broadwell.

Test: build/boot google/beltino variants with AER disabled (CB:46136),
verify dmesg log free of AER timeout errors.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=671646c151d492c3846e6e6797e72ff757b5d65e
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a99790bf5c7f3d68d8b01e015d3212a98ee7bd57

Change-Id: Ia03ef0d111335892c65122954c1248191ded7cb8
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46133
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-12 08:35:28 +00:00
Sam McNally d0aa999b57 mb/google/puff: Enable SATA0 on wyvern
A SATA drive may be connected to SATA0.

BUG=b:162909831
BRANCH=puff
TEST=none

Change-Id: I2a4ce2f89fa6d786358e01add15f2eedfbe4b20f
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2020-10-12 08:27:37 +00:00
Subrata Banik 16e410669a mb/intel/adlrvp: Add ADL-P romstage mainboard code
List of changes:
1. Add DDR4 and LPDDR4 memory related code
- SPD for LPDDR4
- DQ byte map
- DQS CPU-DRAM map
- Rcomp resistor
- Rcomp target
2. Fill FSP-M related UPD parameters
3. Add devicetree.cb config parameters related to FSP-M UPD

TEST=Able to build and boot ADL-P RVP till ramstage early

Change-Id: Iffc5c17ed0725f61c8c274a80a1d27161ca6cebf
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46091
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-11 14:15:49 +00:00
Maxim Polyakov fb623a02c5 drivers/i2c/nct7802y: Configure remote diodes and local sensor
The patch allows to configure sensors with a remote diode connected
and a on-chip local temperature sensor from the devicetree for the
board that uses this HWM. According to the documentation [1], this is
done by setting the corresponding bits in the Mode Selection Register
(22h). It is necessary for some Intel processors (Apollo Lake SoC)
that do not support PECI and the CPU temperature is taken from the
thermistor.

TEST = After loading the nct7802 module on the Kontron mAL-10 [2] with
       Linux OS, we can see configuration of the HWM with one sensor in
       the thermistor mode:

user@user-apl:~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +41.0°C  (high = +110.0°C, crit = +110.0°C)
Core 0:        +40.0°C  (high = +110.0°C, crit = +110.0°C)
Core 1:        +40.0°C  (high = +110.0°C, crit = +110.0°C)
Core 2:        +41.0°C  (high = +110.0°C, crit = +110.0°C)
Core 3:        +41.0°C  (high = +110.0°C, crit = +110.0°C)

nct7802-i2c-0-2e
Adapter: SMBus CMI adapter cmi
in0:          +3.35 V  (min =  +0.00 V, max =  +4.09 V)
in1:          +1.92 V
in3:          +1.21 V  (min =  +0.00 V, max =  +2.05 V)
in4:          +1.68 V  (min =  +0.00 V, max =  +2.05 V)
fan1:           0 RPM  (min =    0 RPM)
fan2:         868 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
temp1:        +42.5°C  (low  =  +0.0°C, high = +85.0°C)
                       (crit = +100.0°C)  sensor = thermistor
temp4:        +44.0°C  (low  =  +0.0°C, high = +85.0°C)
                       (crit = +100.0°C)
temp6:         +0.0°C

[1] page 30, section 7.2.32, Nuvoton Hardware Monitoring IC NCT7802Y
    with PECI 3.0 interface, datasheet, revision 1.2, february 2012
[2] https://review.coreboot.org/c/coreboot/+/39133

Change-Id: I28cc4e5cae76cf0bcdad26a50ee6cd43a201d31e
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39766
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-11 11:24:19 +00:00
Maxim Polyakov 7b27f4b62f ec/kontron/kempld: Reflow long lines
Change-Id: Ia5ad0715b742427dffa6c0c507269d904fe19bcb
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45372
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-11 11:19:07 +00:00
Maxim Polyakov aa99830c06 ec/kontron/kempld: add option to configure I2C frequency
Allows to change the I2C bus frequency by overriding i2c_frequency
option from the board devicetree. Thus, the I2C controller can use
Fast-mode (Fm), with a bit rate up to 400 kbit/s and Fast-mode Plus
(Fm+), with a bit rate up to 1 Mbit/s [1].

Tested on Kontron mAL10 COMe module with T10-TNI carrierboard [2].

[1] I2C-bus specification and user manual, doc #UM10204, Rev. 6,
    4 April 2014.
[2] https://review.coreboot.org/c/coreboot/+/39133

Change-Id: If0eb477af10d00eb4f17f9c01209f170b746ad3d
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44476
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-11 11:12:53 +00:00
Furquan Shaikh 0af1926353 drivers/wifi: Drop maxsleep parameter from chip config
This change drops maxsleep parameter from chip config and instead
hardcodes the deepest sleep state from which the WiFi device can wake
the system up from to SLP_TYP_S3. This is similar to how other device
drivers in coreboot report _PRW property in ACPI. It relieves the
users from adding another register attribute to devicetree since all
mainboards configure the same value. If this changes in the future, it
should be easy to bring the maxsleep config parameter back.

BUG=b:169802515
BRANCH=zork

Change-Id: I42131fced008da0d51f0f777b7f2d99deaf68827
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46033
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-10-11 02:14:21 +00:00
Furquan Shaikh 54b2716990 drivers/wifi/generic: Log WiFi wake source to event log
This change adds a call to `pci_dev_is_wake_source()` to determine and
log WiFi wake source to event log just like the Intel WiFi driver
does. This is done in preparation to merge the generic and Intel WiFi
drivers in follow-up changes.

BUG=b:169802515
BRANCH=zork

Change-Id: I20528ae1f72ca633da31e01d777c46fd5f4a337f
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46032
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-10-11 02:13:44 +00:00
Furquan Shaikh 59a863e14a drivers/intel/wifi: Use newly added pci_dev_is_wake_source
This change uses the newly added `pci_dev_is_wake_source()` helper function
to determine and log WiFi wake source instead of assuming a hard-coded
register value to check. This is done in preparation to merge the
generic WiFi and Intel WiFi drivers in coreboot in follow-up changes.

BUG=b:169802515
BRANCH=zork

Change-Id: I9bdb453092b4ce7bdab2969f13e0c0aa8166dc0a
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46031
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-10-11 02:13:33 +00:00
Furquan Shaikh 494f319be7 pci_device: Add a helper function for determining if PCI device is wake source
This change adds a helper function `pci_dev_is_wake_source()` that
checks PME_STATUS and PME_ENABLE bits in PM control and status
register to determine if the given device is the source of wake.

BUG=b:169802515
BRANCH=zork

Change-Id: I06e9530b568543ab2f05a4f38dc5c3a527ff391e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46030
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-10-11 02:13:17 +00:00
Angel Pons 35a77428b2 nb/intel/ironlake: Move register headers into a subfolder
Move all files with register definitions into a `registers` subfolder.
Subsequent commits will move the remaining registers into this folder.

Tested with BUILD_TIMELESS=1, Packard Bell MS2290 remains identical.

Change-Id: I872269ca3c7fbbcffe83327a20bcf8d98b356beb
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45381
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-10-10 20:00:00 +00:00
Angel Pons 3b264d0074 nb/intel/ironlake: Clean up DMIBAR/EPBAR registers
Several registers have been copy-pasted from i945 and do not exist on
Ironlake. Moreover, other register definitions were missing. Use the
newly-added definitions in existing code, in place of numerical offsets.

Tested with BUILD_TIMELESS=1, Packard Bell MS2290 remains identical.

Change-Id: I8ac99166a8029dcdbb59028b4a7ee297249de5db
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45380
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-10-10 19:30:56 +00:00
Duncan Laurie b0e169ac85 mb/google/volteer: Use device aliases
Use the device aliases provided by tigerlake chipset.cb instead of
the raw pci device+function.  Take advantage of the default states
in chipset.cb and only list the devices that are enabled for all
volteer variants.

Change-Id: I5620004afd7fa4d50389f32dd79148960a2b2662
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44039
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-10 00:19:24 +00:00
Duncan Laurie a5bb31f069 soc/intel/tigerlake: Add chipset devicetree
Add aliases for devices and set most of them to off with the exception
of some essential devices.

Set a default register value as an example.

Change-Id: If50269808645ddc019e0d94fa8296df58ab7c367
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44038
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-09 23:26:04 +00:00
Duncan Laurie e335c2e02f sconfig: Allow chipset to provide a base devicetree
This change extends the devicetree override one more layer and allows
the chipset to provide the base devicetree.  This allows the chipset to
assign alias names to devices as well as set default register values.
This works for both the baseboard devicetree.cb as well as variant
overridetree.cb.

chipset.cb:
device pci 15.0 alias i2c0 off end

devicetree.cb:
device ref i2c0 on end

BUG=b:156957424

Change-Id: Ia7500a62f6211243b519424ef3834b9e7615e2fd
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44037
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-10-09 23:25:46 +00:00
Vinod Polimera b9a7d779b3 sc7180: Remove the delay to force hpd detection and always disable HPD
HPD on this bridge chip is a bit useless. This is an eDP bridge so the HPD is
an internal signal that's only there to signal that the panel is done powering up.
But the bridge chip debounces this signal by between 100 ms and 400 ms (depending on process,
voltage, and temperate). One particular panel asserted HPD 84 ms after it was powered on
meaning that we saw HPD 284 ms after power on. Assume that the panel driver will have the
hardcoded delay in its prepare and always disable HPD.

Change-Id: Iea7dd75b57fa55ec182c0bee09b0f35208357892
Signed-off-by: Vinod Polimera <vpolimer@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45706
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-10-09 22:03:35 +00:00
Marc Jones 3c667a2e7d soc/intel/xeon_sp: Use generic config_t
Don't use the silicon-specific struct type to get common config
options. Instead, use the generic config_t typedef. This allows
the function to be moved to common code in upcoming patches.

Change-Id: If80b678037b4d79387e0a0f722c540df4aae2416
Signed-off-by: Marc Jones <marcjones@sysproconsulting.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46057
Reviewed-by: Jay Talbott <JayTalbott@sysproconsulting.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-09 20:27:31 +00:00
Shelley Chen afaa3d0356 trogdor: Modify DDR training to use mrc_cache
Currently, trogdor devices have a section RO_DDR_TRAINING that is used
to store memory training data.  Changing so that we reuse the same
mrc_cache API as x86 platforms.  This requires renaming
RW_DDR_TRAINING to RW_MRC_CACHE and removing RO_DDR_TRAINING in the
fmap table.

BUG=b:150502246
BRANCH=None
TEST=FW_NAME="lazor" emerge-trogdor coreboot chromeos-bootimage
     Make sure that first boot after flashing does memory training
     and next boot does not.
     Boot into recovery two consecutive times and make sure memory
     training occurs on both boots.

Change-Id: I16d429119563707123d538738348c7c4985b7b52
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46111
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-10-09 19:45:40 +00:00
Terry Chen 53a69507c4 mb/google/volteer/variants/volteer2: Update DPTF parameters
1. Apply the DPTF parameters received from the thermal team.

BUG=b:169183507
TEST=build and verify by thermal tool

Signed-off-by: Terry Chen <terry_chen@wistron.corp-partner.google.com>
Change-Id: I1a1a0f9e86e519ac15904fac80cf3c2299213e52
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46087
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-10-09 16:34:13 +00:00
Christian Walter 19df8d85e0 soc/intel/xeon_sp: Set CPU_ADDR_BITS to 46 for SKX and CPX
According to document number 338846 and 336062 this should be set to 46 bits.

Change-Id: I0bbe6c962ffc7d5dc722f1cacf55bc0d0615db59
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45868
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2020-10-09 16:25:11 +00:00
Jonathan Zhang 1c3fef2ca9 soc/intel/xeon_sp/cpx: skip DRHD generation for non-PCIe stack
Without skipping of DRHD generation for non-PCIe stack, the OS
kernel detects incorrect DMAR table with following messages:
[    0.561817] Your BIOS is broken; DMAR reported at address 0

Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: I098605daf12a264f390613581427ec722afcddaf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45887
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-09 16:24:43 +00:00
Weiyi Lu 26d1652715 soc/mediatek: Add function to measure clock frequency of MT8192
Implement mt_fmeter_get_freq_khz() in MT8192 to measure frequency of
some pre-defined clocks by frequency meter.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Change-Id: I75df0b040ed7ea73d25724a3c80040f4e731118f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45402
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-09 15:33:00 +00:00
Karthikeyan Ramasubramanian 30b854dccd mb/google/dedede: Override GPIO PM configuration
If Cr50 is running old firmware version and hence does not ensure long
interrupt pulses, override the GPIO PM configuration.

BUG=None
TEST=Build and boot waddledee to OS. Ensure that any chip override
happens before FSP silicon parameter initialization. Ensure that the
suspend/resume sequence works fine. Ensure that the reboot sequence
works fine for 50 iterations.

Change-Id: I455c51d4a63b1b5edadbf00c786ce61b0ba1ff00
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45857
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-10-09 14:44:04 +00:00
Karthikeyan Ramasubramanian 9765394663 mb/google/octopus: Disable Ambient Light Sensor (ALS)
ALS is not stuffed in octopus boards. Hence disable ALS ACPI devices.

BUG=b:169245831
BRANCH=octopus
TEST=Ensure that ALS devices are disabled in ACPI tables.

Change-Id: I5ad28f01b0515a41b314116eb2d05c520df0f86e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45741
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-10-09 14:41:51 +00:00
Nick Vaccaro 88d4e82b33 lib/spd: respect spd memory part name override
The BIOS log was looking in the spd data for the part name, but part
names are stripped from generic SPDs.  For these cases, a mainboard
can override the dram part number string, so the spd logging code
needs to check for an override string when logging the dram part
number.

Change print_spd_info() to use an override string if declared.

BUG=b:168724473
TEST="emerge-volteer coreboot chromeos-bootimage", flash and boot
volteer2 and verify that the BIOS log shows a part name when
logging SPD information:

  SPD: module part number is K4U6E3S4AA-MGCL

I also modified volteer to not override the part name and verified
that this change did as expected and printed a blank string.

Change-Id: I91971e07c450492dbb0588abd1c3c692ee0d3bb0
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45459
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-09 07:34:50 +00:00
Shelley Chen 93d483db89 mrc_cache: Change mrc_cache_load_current to return size of entry
Modify mrc_cache_load current to return the size of the mrc_cache
entry so that caller will know what the actual size of the data
returned is.  This is needed for ARM devices like trogdor, which need
to know the size of the training data when populating the QcLib
interface table.

BUG=b:150502246
BRANCH=None
TEST=./util/abuild/abuild -p none -t GOOGLE_NAMI -x -a

Change-Id: Ia314717ad2a7d5232b37a19951c1aecd7f843c27
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46110
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-10-09 05:38:04 +00:00
Rob Barnes 60d4f2411c mb/google/zork/berknip: Increase eMMC initial clock frequency
This will reduce boot time by 7ms. Some of the initial designs
don't have a pull-up resistor on the CMD line. These designs still boot
at 400 kHz despite not having the pull-up.

BUG=b:158766134
TEST=Boot Berknip w/ eMMC to OS.
BRANCH=zork

Change-Id: I5d55f55b8208b4dc3fbdc9d1ec6333f9e211e3fd
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45931
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 22:43:13 +00:00
Lucas Chen 0a304f65a2 zork/var/ezkinil: Add micron-MT40A1G16KD-062E-E in SPD table for Ezkinil.
Current Ram_Id: 0011 MT40A1G16KNR-075-E never be built before.
Remove it and change use micron-MT40A1G16KD-062E-E for ram_id:0011.

BRANCH=zork
BUG=b:159316110
TEST=run gen_part_id then check the generated files.

Signed-off-by: Lucas Chen <lucas.chen@quanta.corp-partner.google.com>
Change-Id: I28fc39f17e06ecd39f6567613e6ff5919becb2fd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45810
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 22:25:05 +00:00
Raul E Rangel cada76333f mb/google/zork/ezkinil: Increase eMMC initial clock frequency
This will reduce boot time by 7ms. Some of the initial designs
don't have a pull-up resistor on the CMD line. These designs still boot
at 400 kHz despite not having the pull-up.

BUG=b:158766134
TEST=Boot Ezkinil w/ eMMC to OS.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ida0bbf9bd772ab7d384d5d097fa3b02b846a3efa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45852
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Eric Peers <epeers@google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 22:23:42 +00:00
Rob Barnes 481ab24f46 mb/google/zork/morphius: Increase eMMC initial clock frequency
This will reduce boot time by 7ms. Some of the initial designs
don't have a pull-up resistor on the CMD line. These designs still boot
at 400 kHz despite not having the pull-up.

BUG=b:158766134
TEST=Boot on morphius with and without patch, confirm ~7ms improvement
BRANCH=zork

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I7f6efd3d5839f154f2487a07654be8e35634bbbc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45932
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 22:22:32 +00:00
Nico Huber 7e6ee912c6 device: Clarify use of `config_of()`
We don't want unnecessary die() calls to spread throughout coreboot.
Chances are high that we'd add a NON_FATAL_DIE Kconfig eventually.

Change-Id: I01c7efdf23672bad3a195b7dc1565a3cc8a087bd
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46046
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 20:31:35 +00:00
Sumeet R Pawnikar b5e4e34418 mb/google/dedede/variants/drawcia: Update TSR1 passive trip temperature
Update TSR1 passive trip temperature

BUG=b:169691800
BRANCH=None
TEST=Built and tested on dedede system

Change-Id: I172391daca981d5591fa9cc5eacad92521dd0dc5
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45859
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2020-10-08 19:43:56 +00:00
Meera Ravindranath 833b5b33d2 mb/google/dedede: Configure VR in devicetree
BUG=b:167472333
TEST=Build and boot dedede and observe the slope and offset values
     getting updated in the fsp debug log

Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Change-Id: I3ea32218040263f0abef9b9dd4c52efb16289fd7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45825
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 19:11:43 +00:00
Meera Ravindranath 5b3a0ff4f1 soc/intel/jasperlake: Add VR Configuration settings
This CL fixes the CPU Throttling issue.

BUG=b:167472333
TEST=Build and boot dedede and observe the slope and offset values
     getting updated in the fsp debug log

Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Change-Id: I3fa32218040263f0abef8b9dd4c52efb31289fd7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45645
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-10-08 19:11:34 +00:00
Nico Huber 11bda4d41c Revert "soc/intel/jasperlake: Disable PAVP UPD"
This reverts commit 69589294c2.

No reason was given why this should deviate from the other platforms
and the author can't explain it.

Change-Id: I2e8d6f9bd4ebba69b6f7cdd9a1c5d08aaf2e798f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46044
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-08 19:04:02 +00:00
Christian Walter abb3757847 soc/intel/xeon_sp/cpx: Add locking of IA32_FEATURE_CONTROL and VMX
Change-Id: Ib329648f77acecccb0ced1806f61be252d03f2f4
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45869
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 15:38:28 +00:00
Christian Walter 6e536bcca8 security/intel/txt: Print chipset as hex value
Print chipset as hex value in order to make it more readable.

Change-Id: Ifafbe0a1161e9fe6e790692002375f45d813b723
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45867
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-08 15:38:19 +00:00
Nick Vaccaro 20be04a153 mb/google/volteer: disable TBT if no USB4 hardware available
Implement mainboard_silicon_init_params() to allow for disabling of
TBT root ports if the device does not have usb4 hardware.

Add code to mainboard_memory_init_params() to disable memory-related
settings associated with TBT in cases where no usb4 is available.

BUG=b:167983038
TEST=none

Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2020-10-08 15:30:28 +00:00
Nick Vaccaro 799437578a lib/fw_config: change BOOT_STATE_INIT_ENTRY to be BS_DEV_INIT_CHIPS
Make boot state init run before the init_chips code.  This allows for
correcting tbt settings at a stage earlier than devicetree parsing.

BUG=b:167983038
TEST=none

Change-Id: I8364746ba311575e7de93fa25241ffef7faf35b4
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45961
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 15:30:15 +00:00
Johnny Lin 1d28668296 mb/ocp/deltalake: Override smbios_fill_dimm_locator for type 17
Override smbios_fill_dimm_locator for type 17 Locator and Bank Locator.
Also remove CONFIG(GENERATE_SMBIOS_TABLES) compile option because SMBIOS
is always enabled and it makes the code cleaner.

One sample type 17 table displayed as below:
Handle 0x0010, DMI type 17, 40 bytes
Memory Device
        ...
	Locator: DIMM F0
	Bank Locator: _Node0_Channel5_Dimm0

Tested=On OCP Delta Lake, the Locator and Bank Locator strings
are expected.

Change-Id: I84531f9ee8bc76d9529aa983bc13e64f40c93138
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-08 12:09:36 +00:00
Johnny Lin 7581352759 soc/intel/xeon_sp/cpx: Add save_dimm_info for SMBIOS type 17
For now only implement for one socket and some of the fields
are hard-coded for DDR4 including memory device type, data width
and ECC support.

Change-Id: I3cb72d18027d972140828970206834ff55b72022
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45798
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-10-08 12:09:26 +00:00
Johnny Lin b734ae2e8a vc/intel/fsp/fsp2_0/cpx_sp: Expose DIMM Present and DdrVoltage fields
The fields from SystemMemoryMapHob can be used to generate SMBIOS type 17.

Tested=On OCP Delta Lake, verify the values are expected.

Change-Id: I988e7341ddd3b701c698b41451a87890f21cc928
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45797
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 12:08:31 +00:00
Jonathan Zhang 431741bf00 soc/intel/xeon_sp/cpx: correct GSI bases for IO APICs
With CPX-SP FSP, PCH IOAPIC handles the first 120(0x78) GSIs. Correct
the coreboot assignment of GSIs for IO APICs.

Without this patch, there are following target OS boot messages:
[    1.098771] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-119
[    1.099159] GSI range [24-31] for new IOAPIC conflicts with GSI[0-119]

After this patch, the boot messages are:
[    0.399498] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-119
[    0.399848] IOAPIC[1]: apic_id 9, version 32, address 0xfec01000, GSI 120-127

Also without this patch, there is boot stability issue. About one in
20 reboots, the target OS fails to boot with following failure:
[    4.325795] mce: [Hardware Error]: Machine check events logged
[    4.326597] mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 9: ee2000000003110a
[    4.327594] mce: [Hardware Error]: TSC 0 ADDR fe9e0000 MISC 228aa040101086
[    4.328596] mce: [Hardware Error]: PROCESSOR 0:5065b TIME 1601443875 SOCKET 0 APIC 0 microcode 700001d

The MCE error happens in bank 9. The Model specific error code
shows it is about SAD_ERR_WB_TO_MMIO error (doc 604926), which means
something goes wrong when cache write back to mmio. It is a generic
transaction type error in level 2.

Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: I45e941591300dad6d583a6dcb41f45e984753c07
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45941
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-10-08 12:05:02 +00:00