Compare commits

..

190 Commits

Author SHA1 Message Date
Tim Crawford
6392a92690 mb/system76/rpl: darp9: Add SSD RTD3 configs
Some drives block the CPU from reaching C10 on suspend without the RTD3
config.

Fixes suspend with the following drives:

- Kingston KC3000 (SKC3000D/4096G)
- Kingston HyperX (SHPM2280P2H/240G)
- Solidigm P44 Pro (SSDPFKKW010X7)

The following drives continue to work:

- Samsung 970 Evo (MZVLB250HAHQ)
- WD Black SN770 (WDS250G3X0E)
- WD Green SN350 (WDS240G2G0C-00AJM0)
- WD Blue SN570 (WDS100T3B0C)

Change-Id: I205d78377fa2b0db8d37542cdb94ba86ded1d66e
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Tested-by: Levi Portenier <levi@system76.com>
2024-01-18 12:28:10 -07:00
Tim Crawford
f7222726d6 mb/system76: Add custom CMOS default for darp8,darp9
Since these boards will use S0ix they need to leave CSME enabled for the
CPU to reach C10.

Change-Id: I70c908402c9964508bb9c439d48d24773f5a35ab
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-01-10 13:07:17 -07:00
Tim Crawford
de3ee05f93 mb/system76: Enable S0ix for darp8/darp9
The newer batch of these boards do not de-assert VW PLTRST# on S3
resume, causes the units to not power on in the EC code. Switch them to
S0ix by default, but leave S3 available.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-01-10 13:07:17 -07:00
leviport
2477843e74 Apply HDA verb table change from serw13 to oryp11 and bonw15 2023-10-20 12:08:46 -06:00
Tim Crawford
82dec294f6 mb/system76/tgl-u: Enable BayHub driver on everything
The lemp10 unit that QA has uses the O2 Micro card reader, so just
enable the driver on everything. Fixes lemp10 not going deeper than C2
when idle.

Change-Id: I564f3f483b3e47de746b5541540c9c132d42af26
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-10-16 16:24:11 -06:00
Tim Crawford
49d376482b mb/system76/tgl-u: galp5: Enable DRIVERS_GENERIC_BAYHUB_LV2
The 3060 variant of the galp5 uses the OZ711LV2. Enable the driver to
fix LTR programming, as was done for other models in commit 3d7a5bdf58
("mb/system76: Enable DRIVERS_GENERIC_BAYHUB_LV2 to fix LTR issue").

Tested on system76/galp5 with a 3060: CPU reaches C-states deeper than
C2 when idle.

Ref: 58be66945f ("mb/system76/adl,rpl,tgl-h: Enable DRIVERS_GENERIC_BAYHUB_LV2 to fix LTR issue")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: Ibe53db7a0744eb5bc69d563652faba8e50bd86ba
2023-10-12 11:56:54 -06:00
Matt Parnell
e86eb250cf the i9-13900HX supports up to 128GB 5600 MT/s DDR5 memory 2023-09-15 16:00:12 -06:00
Tim Crawford
1cb13106c9 drivers/smmstore: Retry APM SCI if it fails
For some reason, the APM SCI to install the SMMSTORE comm buffer
regularly, but not always, fails with 0x4ed on ADL. In this case, a
second attempt seems to always complete successfully.

Tested on system76/darp8 and system76/galp6.

Change-Id: I843116113b8c24f1aee42f9d9042cdc0471a1b43
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-09-08 13:16:09 -04:00
Jeremy Soller
254e7dca82 soc/intel/alderlake: Hack to preserve SBREG
Change-Id: Ie70905d34a4050aeff4b5cda116eb700f19a18ea
2023-08-23 13:55:56 -06:00
Jeremy Soller
f989ae22c9 soc/intel/alderlake: Add RPL-S GPIO ACPI ID
Change-Id: Ib6432147a507efd7fa9514a1def446a1dff9848d
2023-08-23 13:55:56 -06:00
Jeremy Soller
58be66945f mb/system76/adl,rpl,tgl-h: Enable DRIVERS_GENERIC_BAYHUB_LV2 to fix LTR issue
Change-Id: I304bca81533a6d43e3c89f145d90a903dfafe0aa
2023-08-18 11:06:13 -06:00
Tim Crawford
f450af3321 mb/system76/tgl: Enable Bluetooth audio offload
Change-Id: I604ebf164611da9dedd11881e82e9afab58a84be
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-08-08 10:35:33 -06:00
Tim Crawford
e92ae5d705 mb/system76: Enable C10 reporting on systems using eSPI
Report CPU C10 state over eSPI so that the EC can use Virtual Wires to
detect if PECI can be used.

Change-Id: If3410cc15b0e41ca98e3cfce324e9bcb315116d9
2023-08-01 14:23:24 -06:00
Tim Crawford
9b115ee72c mb/system76/cml-u: Fix inclusion of romstage.c
When lemp9 was converted to a variant in CB:64528, the Makefile was not
updated to handle the variant-specific `romstage.c`. This, as would be
expected, caused memory init errors and broke boot on CML-U boards.

Tested lemp9 boots to payload again.

Fixes: 5b7b04c938 ("mb/system76/cml-u: Convert lemp9 to a variant")
Change-Id: I2c9d26ebe4e36f75a97d40fcccb49f9564555beb
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-08-01 14:22:36 -06:00
Tim Crawford
8c9e6ad983 mb/system76/gaze17: Remove RTD3 configs
According to the schematics, the components/pins for RTD3 support are
not connected. The enable GPIO for components is tied directly to power
and the reset GPIO is tied to `BUF_PLT_RST#`.

Change-Id: I6b7ab26e067135954c60bd2e2de3715c95ad5d4d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-19 13:53:16 -06:00
Tim Crawford
38a0553447 mb/system76/adl-p: oryp10: Remove RTD3 configs
Change-Id: I009a57c7af371e3e073fc1190526356fe8300d8e
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-19 13:53:07 -06:00
Tim Crawford
05584923bf mb/system76/adl: darp8,lemp11: Disable RTD3 on SATA port
After switching to S3, the use of RTD3 on the SATA port breaks drives
exiting D3cold.

Change-Id: I86b1c1e5081df9c462b22a724cf155d2a5507522
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-19 11:25:16 -06:00
Tim Crawford
0bbcbd18fc soc/intel/adl: Fix LPM substates for RPL-HX
Change-Id: I96d67733e42b6ae79418040fc22ac743445081fc
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-19 08:05:05 -06:00
Tim Crawford
27ea93d87b soc/intel/alderlake: Move RPL-HX power limits to correct file
`chipset.cb` is not used when PCH-S is selected, as is the case for
RPL-HX. Fix setting power limits by putting the definitions in the
correct file.

Change-Id: Ia823ab82afdc76c3eb6f15cd2617b0780c84e8c4
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-13 08:42:23 -06:00
Tim Crawford
08d2a35246 soc/intel/cannonlake: Hook up ucode for CML-S
Hook up microcode from 3rdparty repo for:

- 06-a5-03 (CPUID signature: 0xa0653)
- 06-a5-05 (CPUID signature: 0xa0655)

Fixes loading microcode on system76/bonw14.

Change-Id: I0d25e42a3156e4a97579843587ef23259c22a590
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-11 17:15:34 -06:00
Tim Crawford
e50d173e67 mb/system76: Select CBFS SMBIOS hooks
Multiple users have requested to have the sysfs value `product_uuid` be
filled, and at least one wants DMI to report the serial number. Add the
drivers so that we can fill them in when flashing firmware.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Change-Id: Ic0a8dd36839df2c3f9afe54251c7d3487648f42a
2023-07-06 13:01:53 -06:00
Tim Crawford
d0c95178d7 mb/system76: Leave TBT LSX0 as FSP configured
Change-Id: I3e3baef1741a2a3685b01c1819b40cc689ae7561
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-06 12:59:16 -06:00
Jeremy Soller
6e1a07ca56 bonw15: Fix SSD2 and DGPU PCIe definitions
Change-Id: I717a0b87927e3084e56651f9241ee8ae086caf80
2023-07-06 12:33:44 -06:00
Jeremy Soller
2cb78b9a76 bonw15: Fix 2.5G_LAN_EN GPIO name
Change-Id: Id5a269c24f408d20f7289e209e500221372447d1
2023-07-06 12:33:44 -06:00
Tim Crawford
04e48d4932 security/tpm/tspi: Clear TPM state if resume fails
Per TPM spec and edk2 reference, perform a TPM restart in the case that
a TPM resume fails.

Change-Id: I444ab3cb12acbff740b5b8d2a9f7bed06392e9ec
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-16 14:07:49 -06:00
Tim Crawford
a7d1fea33b drivers/pc80/tpm: Add Infineon SLB 9672 ID
Change-Id: I6bfda378aaec0688fd6d8b38481609d37a48ac9b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-16 14:07:49 -06:00
Tim Crawford
ac6accebf9 mb/system76/rpl: Select TPM read delay for all boards
Prevents the Infineon chip from failing to stop/resume on S3.

Change-Id: Ie1f4d3859ea7204b7510ea9756a697b12e4e01da
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-16 14:07:49 -06:00
Jeremy Soller
165f8361e0 mb/system76/rpl/v/{addw3,bonw15,serw13}: support 5200 MT/s memory
Change-Id: If2fca9ac288c37e7efc1ed81aa4c8e3336508523
2023-06-12 15:38:27 -06:00
Jeremy Soller
6d71d60d68 Delete leftover header file
Change-Id: I068396a9f25d842f144a878e2dbf9460ea522d1d
2023-06-08 14:59:45 -06:00
Jeremy Soller
4e601aec74 mb/systemd76/adl: Enable dynamic boost for oryp9 and oryp10
Change-Id: I113a88ce100e6b02e3004924a8a3f57910ee587f
2023-06-08 14:59:45 -06:00
Tim Crawford
17978f5d37 darp9: Take card reader out of reset
Change-Id: Ifd7137edb9064a81806ef7c804179b8789a7aae1
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-05 08:54:46 -06:00
Tim Crawford
e4590df96e darp9: Add HDA verbs from proprietary firmware
Change-Id: Ifd8cbfca75d8b5529b9fc5ec7590a21d2ebab5d7
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-05 08:54:46 -06:00
Tim Crawford
686218b85c {ec,mb}/system76: Replace color keyboard logic
The EC now detects if the keyboard is white or RGB backlit via
`RGBKB-DET#`. Remove the Kconfig for the selection and update the ACPI
methods for the new functionality.

Change-Id: I263ede51a4184769659082a2c60d9556b5328670
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-05 08:54:46 -06:00
Tim Crawford
090a4c5cd4 mb/system76/rpl: Add Darter Pro 9 as a variant
Change-Id: Ibb0499cce605ae804726d419337a66004526fd32
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-06-05 08:54:46 -06:00
Tim Crawford
56280b2f2b ec/system76/ec: Do not call reset on wake
Resetting the device will cause the keyboard backlight and airplane LED
to lose their state.

Change-Id: Ib0fc9e95b5eb430b0eb4fbe46980fe6b663f7b20
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-26 14:30:38 -06:00
Tim Crawford
a01838681e mb/system76: Remove PL4 values
System76 EC sets PL4 values through PECI based on AC state [1]. Remove
the static PL4 values from coreboot since they won't be used. This will
result in sysfs reporting the package default for PL4.

[1]: https://github.com/system76/ec/pull/353

Change-Id: If33eb38a20febaf8c71615f0d1a640d3991f42ff
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-26 14:29:38 -06:00
Jeremy Soller
a524d587e6 soc/intel/common/block/graphics: Add RPL-HX IDs
Change-Id: I510b6a56f5f5562081ff886a94c296257292cdda
2023-05-17 14:33:40 -06:00
Jeremy Soller
e6f70bdcb5 serw13: fix speaker issues
Change-Id: Iec3caf8e93bbf33950cb8d2eee6d5e04f5de0aa3
2023-05-17 10:52:12 -06:00
Jeremy Soller
12803935da Add lemp12
Change-Id: If8ac88731776d073368c559f5eba6c46b7a47fd2
2023-05-16 16:33:00 -06:00
Jeremy Soller
ac8331d5c2 Fix DDR5 SPD length
Change-Id: Id587c63a4abafc3f47176471447f79c0f57729f2
2023-05-16 16:33:00 -06:00
Jeremy Soller
116fcc0f1d soc/intel/alderlake: Fill in SPD data on both channels of DDR5 memory
Change-Id: If305eb2a138024c6dd495463130bd6006e78d8ef
2023-05-16 16:33:00 -06:00
Meera Ravindranath
6ea47e322a soc/common/smbus: Add support for reading spd data via smbus for DDR5
DDR5 uses a Serial Presence Detect EEPROM with hub function
(SPD5 hub device) to store the spd data.
This CL adds support to read the spd5 hub device via smbus.

BUG=b:180458099
TEST=Boot adlrvp DDR5 board to kernel

Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Change-Id: Ic5e6c58f255bef86b68ce90a4f853bf4e7c7ccfe
2023-05-16 16:33:00 -06:00
Tim Crawford
89494f23ca galp7: Reduce power limits
Prevents current overdraw leading to power off.

Change-Id: I5661594f40719b3248964e2fc0ab1c85362bfaff
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-09 14:44:11 -06:00
Tim Crawford
1c666cb8b9 soc/intel/adl: Add power limits for RPL-H 4P+8E 45W
Change-Id: I4eb349d96df3dac4d04c83665f805dc482f6af0e
Ref: RPL-UPH and RPL-U Refresh Platform Design Guide (#686872, rev 2.1)
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-09 14:44:11 -06:00
Tim Crawford
d773694493 mb/system76/rpl: Add Galago Pro 7 as a variant
Change-Id: Iafbf858a8b90bb491b906ac817a6e1accf59363c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-05-09 14:44:11 -06:00
Jeremy Soller
35bed98ceb system76/rpl: Call TBT sleep function
Change-Id: I62afd94f03f8adabb4e655c582f8fcffe4b04cfa
2023-04-28 11:42:50 -06:00
Jeremy Soller
6348127502 dtbt: Run correct suspend/resume flow
Change-Id: Ib5e5b5de9d9619f6554cef299a70406b114d6289
2023-04-28 11:42:50 -06:00
Jeremy Soller
202e918a3c addw3, bonw15: Set TBT GPIOs correctly
Change-Id: Iaca3d9de0cc6b8c07f1a9b9ae381aea729a4cd7d
2023-04-28 11:42:50 -06:00
Jeremy Soller
b90e4da793 serw13: Disable AER on both SSD slots
Change-Id: I6a254407fac3b3df4a25a057a4ae953847d310d9
2023-04-28 11:42:50 -06:00
Jeremy Soller
4a387e587c Add DTBT _DSD
Change-Id: I8a478d0e714dcde1e7fa30db0b617fb056c210aa
2023-04-28 11:42:50 -06:00
Jeremy Soller
b5433a5d55 system76/rpl: Add discrete thunderbolt driver to bonw15, serw13
Change-Id: I9545fa5b46220a2487d5ca09bb8a074a460e420a
2023-04-28 11:42:50 -06:00
Jeremy Soller
648056ab36 system76/rpl: Add discrete thunderbolt driver
Change-Id: I4d957783e45ec5ff5cc182d89e6d5a8070366b60
2023-04-28 11:42:50 -06:00
Jeremy Soller
08999f64a1 Add discrete thunderbolt driver to set security level
Change-Id: Id276840aa0c9183df2e6a5353976d5b34f8d8d18
2023-04-28 11:42:50 -06:00
Jeremy Soller
2bdc9f573a mb/system76/rpl: Switch GPP GPIOs from PWROK to RSMRST reset
Change-Id: I0adc6b50600f87fe841e3dd5e2f9d8e41fc374f8
2023-04-28 11:42:50 -06:00
Jeremy Soller
9b3d0ba0fc Simplify GPU boost config
Change-Id: I9f2e99bdd01d51312f4a373ed241b27574c607ba
2023-04-03 13:07:09 -06:00
Jeremy Soller
6b46dfabe5 bonw15: adjust GPU boost
Change-Id: If5f3a281f529541c3891f445c10d175d66a01f97
2023-04-03 13:07:09 -06:00
Jeremy Soller
37f7c05076 Fix NVPCF compilation on newer iasl
Change-Id: Idb12db53b81c1805fc95dba197a62664d1973929
2023-04-03 13:07:09 -06:00
Jeremy Soller
170299cf92 Convert whitespace from spaces to tabs in last commit
Change-Id: I5c7338cc0542b48a0dbe0d71a4a2a4a5fd44aadf
2023-04-03 13:07:09 -06:00
Jeremy Soller
2a84457da0 Enable GPU boost on RPL models
Change-Id: I9a3d14af30d62e63c2f6f5a6475815f6c544e08f
2023-04-03 13:07:09 -06:00
Jeremy Soller
f5ac4c08d3 addw3, bonw15: disable AER on TBT root port
Change-Id: I23301f432c590dfe16bec1a90f2dee227ebf84f9
2023-04-03 13:07:09 -06:00
Tim Crawford
a739c5311c mb/system76/rpl: serw13: Disable AER on TBT port
Avoid UnsupReq errors occuring on the TBT port.

Change-Id: I4c10876285be2baef1ca4f22727413bdc0393cdd
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
e34fa2b2b9 bonw15: document GPIOs
Change-Id: I40b0a76616fe16ac8e977a4af7a15cc682fd76dc
2023-04-03 13:07:09 -06:00
Jeremy Soller
a9410dbcc6 Fix NVIDIA GPU on bonw15
Change-Id: Idc5761dd63959e5997387168f5ac68eac2da0217
2023-04-03 13:07:09 -06:00
Jeremy Soller
9c5b6e1a01 Add bonw15 VBT
Change-Id: I15856d80cbbd6eb273fe5ad15d17f3f9cac41fb2
2023-04-03 13:07:09 -06:00
Jeremy Soller
1688827dbf Add bonw15
Change-Id: Ibc49542e359f3f5da7d912e21e20fa673208e15b
2023-04-03 13:07:09 -06:00
Tim Crawford
80c466d828 mb/system76/rpl: serw13: Enable hotplug on CARD and TBT ports
Change-Id: I5c87fe7f6a090f2d7707bb360d385e2eb59594ac
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
8bddaf1afb mb/system76/rpl: gaze18, serw13: Fix USB2 on USB-C port
Use USB2_PORT_MID instead of USB2_PORT_TYPE_C, as was done for addw3.

Change-Id: I7df2bbf1ba70c4e08319b760b2784e15c880a105
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
eb635f145d addw3: Set USB-C ports as USB2_PORT_MID to prevent use of port reset messaging
Change-Id: I1f13edcc3fa757cc0d763be45e6eea0474077984
2023-04-03 13:07:09 -06:00
Subrata Banik
6a2b69e6fa soc/intel: Update API name pmc_send_bios_reset_pci_enum_done
This patch updates PMC API name from `pmc_send_pci_enum_done` to
`pmc_send_bios_reset_pci_enum_done` to inform PMC IPC about BIOS done
is also set along with PMC enumeration being done.

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

Change-Id: I1cf8cb1ecadeb68c109be6b0e751a3f2c448ae4f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
a7aac6310d soc/intel/alderlake: Correct PCH-S XHCI port information
Change-Id: I405b4f73584f4391152941bbd32e828a2bd0e6aa
2023-04-03 13:07:09 -06:00
Jeremy Soller
47092b8fff system76/rpl: Remove retimer and PMC driver
Change-Id: Ief2c6db7c1673c414bb2eefdce5efc64144179da
2023-04-03 13:07:09 -06:00
Michał Żygowski
b9d556ed0f soc/intel/alderlake/iomap: Fix the PCR BAR size on ADL-S
According to ADL PCH BIOS specification (DOC# 630603) ADL-S PCH
uses a fixed SBREG_BAR of 256MiB starting at 0xe0000000.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ied59a6dad8fb065dc3aeb6281bd32074aaa5e3b8
2023-04-03 13:07:09 -06:00
Michał Żygowski
3fd0dd003f soc/intel/alderlake: Hook up P2SB PCI ops
P2SB device is being hidden from coreboot by FSP-S. This breaks the
resource allocator which does not report P2SB BAR via intel common
block P2SB driver. Hook up the common block P2SB driver ops to
soc_enable function so that the resources will be reported. The P2SB
device must be set as hidden in the devicetree.

This fixes the silent resource allocation conflicts on machines with
devices having big BARs which accidentally overlapped P2SB BAR.

TEST=Boot MSI PRO Z690-A with multiple PCIe devices/dGPUs with big
BARs and see resource conflicts no longer occur.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I7c59441268676a8aab075abbc036e651b9426057
2023-04-03 13:07:09 -06:00
Michał Żygowski
ca6cdc0d23 soc/intel/alderlake/{chipset.cb,chipset_pch_s.cb}: Set P2SB as hidden
Set the P2SB device as hidden as FSP-S is hiding the PCI configuration
space from coreboot on Alder Lake systems.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I5cfde7c1f6791578a03d73e89bcde31af608f12d
2023-04-03 13:07:09 -06:00
Jeremy Soller
6b3721d4e6 addw3: fix overridetree syntax
Change-Id: I74be236abed233d1211c10131c1a8c27158e0b96
2023-04-03 13:07:09 -06:00
Jeremy Soller
68e0ae8ae4 Move RPP-S XHCI from USB4 driver to XHCI driver
Change-Id: I7853de5010123875cb0e0150c2e3763f1d3eaff8
2023-04-03 13:07:09 -06:00
Jeremy Soller
ad4c8c6c63 addw3: Add pmc_mux driver back
Change-Id: I8e341e34735c23e1cd6de78b264289d3c02e3e59
2023-04-03 13:07:09 -06:00
Tim Crawford
8e9bf68aee mb/system76/rpl: gaze18: Select TPM_RDRESP_NEED_DELAY
Fixes the SLB 9672 FW15 failing to stop/resume on S3.

Change-Id: Icb950e02374529547de6d12ee589cde0164d4576
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
52ba1328c2 addw3: add USB PLD definitions
Change-Id: Ic09e58df50f188ccffd9f0cfc8931f15dfc9971a
2023-04-03 13:07:09 -06:00
Jeremy Soller
af3aefab96 addw3: mark TBT as hotplug
Change-Id: Iaf73d68de6673c5ae89e0b9cad3e7749b2c5db2d
2023-04-03 13:07:09 -06:00
Jeremy Soller
6dc4503f94 addw3: Add USB ACPI definitions and PMC driver to overridetree
Change-Id: I04d71bfef6b238975fc43a32b08c23ac1b842f70
2023-04-03 13:07:09 -06:00
Jeremy Soller
91b92f9ef6 addw3: Set LAN clock as free running
Change-Id: I9c3ab8b3af16ff23ebd6751b260ebea30021ec61
2023-04-03 13:07:09 -06:00
Jeremy Soller
edafbf2da6 mb/system76/tgl-u: Enable reporting CPU C10 state over ESPI
Change-Id: Ia811187df194af596eeea7d4fd7be0de5fa9254c
2023-04-03 13:07:09 -06:00
Tim Crawford
4d4829b759 mb/system76/rpl: Declare child device on GLAN port
Declare a child device on the GLAN port so the Ethernet controller is
detected as an onboard device (eno) and not a plugged device (enp).

Change-Id: I43f1b3b749081fd989bb2e5c04f3b616642a5a4f
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
50d3283fbe mb/system76/rpl: gaze18: Remove unused card GPIOs
The power and reset lines from the PCH to the card reader are not
actually connected. Power comes directly from the 3.3V rail, and reset
is controlled by `BUF_PLT_RST#`.

Change-Id: I0a0969e9bcdf1dcf5dfdb512cf329409f187f1b5
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
ea967a4944 mb/system76/adl: Convert gaze17 to variants
Change-Id: I086a13a293986bb82692c08aae8fd675083ff16b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
44c6ff2d3e mb/system76/gaze17: reduce diff with mb/system76/adl
Change-Id: Iabb5486576a2c71af58e4abf3e870ff87af60895
2023-04-03 13:07:09 -06:00
Jeremy Soller
63de4a519b mb/system76/gaze17: reset HDA codec during init
Change-Id: Ibb69f6d836c56587bfdc4a76f86a48cb4581d3ea
2023-04-03 13:07:09 -06:00
Jeremy Soller
5721233d56 mb/system76/gaze17: enable EC lockdown support
Change-Id: I3db7cfc20a5c9b913e88e8cbff0cd2a5c5d4cad9
2023-04-03 13:07:09 -06:00
Jeremy Soller
d44b774d3a mb/system76/gaze17: add board.fmd
Change-Id: I70bdedb0b44da4406e91056425b7c0ee28705fb5
2023-04-03 13:07:09 -06:00
Jeremy Soller
56058eb6ab mb/system76/gaze17: disable ME by default
Change-Id: I5fd34adba3fe5296c20763136d83025e63fd8a26
2023-04-03 13:07:09 -06:00
Jeremy Soller
b950bd1cd8 mb/system76/gaze17: switch to S3
Change-Id: I65d4dc008addceb95d5f37758b98f243b2a290dd
2023-04-03 13:07:09 -06:00
Jeremy Soller
26918833dd board/system76/adl: Add board.fmd file for all variants
Change-Id: I79f1b0ef9fac4593ce55451a5dc78021790fc830
2023-04-03 13:07:09 -06:00
Jeremy Soller
f853b2b0d3 board/system76/tgl-h: Add board.fmd file for GBE and non-GBE variants
Change-Id: Iacc8ce5225097db3d99181cf8cec5f61f2e7056e
2023-04-03 13:07:09 -06:00
Jeremy Soller
7b2129b58d board/system76/tgl-u: Add board.fmd file for all variants
Change-Id: I408c633e4993bf08853bd0cae98e57d53baa3a79
2023-04-03 13:07:09 -06:00
Jeremy Soller
a78fda0ef5 board/system76/rpl: Add board.fmd files per variant
Change-Id: If51ae6f4ce71fde6044f9f4d3ae6a9581f48663d
2023-04-03 13:07:09 -06:00
Jeremy Soller
9632ad33b1 ec/system76: Support lockdown based on EC security state
Change-Id: I00701aa1397c24efe6f2d163822968b528f5b915
2023-04-03 13:07:09 -06:00
Tim Crawford
ea1d258dfe mb/system76/gaze16: Remove directory
These models were moved to tgl-h. Remove the duplicated files.

Change-Id: If5f719fb162099db340b1f9a1d7a9d29460bc0a3
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
dc65d07793 addw3: Force TBT power
Change-Id: I40af5500343ea3838545e8053b767670d00ea90a
2023-04-03 13:07:09 -06:00
Jeremy Soller
cd7b93eaa0 Move TCSS code to oryp11
Change-Id: I76eec8f7ca69bdc32a57f2e41b64f1e82730c361
2023-04-03 13:07:09 -06:00
Jeremy Soller
94a948d7e4 Revert "soc/intel/alderlake: make it possible to enable TCSS on PCH-S"
This reverts commit c81af77eeb.
2023-04-03 13:07:09 -06:00
Jeremy Soller
8641479e72 rpl: add one TBT port to devicetree
Change-Id: I0b15f9161f576970ef9feeab7ba7ffdb27070505
2023-04-03 13:07:09 -06:00
Jeremy Soller
d86cc5725c soc/intel/alderlake: make it possible to enable TCSS on PCH-S
Change-Id: I46f29bbe61cdc4fa21ccdabccc7743d0f3cc95b2
2023-04-03 13:07:09 -06:00
Jeremy Soller
936eb85a0f oryp11: fix subsystem ID
Change-Id: I35e2389d9da16352f2311addfc8572836f3088d2
2023-04-03 13:07:09 -06:00
Jeremy Soller
fbf870ac4c addw3: attempt to enable GBE
Change-Id: I4dd6ba9487488ab1efe44618795b546cdc518bc0
2023-04-03 13:07:09 -06:00
Tim Crawford
2e38258030 drivers/gfx/nvidia: Increase power sequence delays
The serw13 with the 4070 RTX sometimes fails to enumerate the dGPU.
Increasing the delays allows the dGPU to be enumerated consistently. The
values are arbitrary, but still less than the values from proprietary
firmware.

Change-Id: Ibbfda596a324df4b51d583af8d6a36b5cd53a561
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
075c7df95b rpl: remove drivers/gfx/nvidia from overridetrees
Change-Id: I142802b24b176e0662434a6c2005ab52bbf4508b
2023-04-03 13:07:09 -06:00
Jeremy Soller
f44c1868b0 addw3: Do not configure GPIOs already configured
Change-Id: Ic2702d798ae46cff22e8ef2e9f76e1f69966ea86
2023-04-03 13:07:09 -06:00
Jeremy Soller
f0eee8ddeb rpl: Set UART_FOR_CONSOLE based on each variant
Change-Id: I43c9f828344981ddd9fd58e671767fbc6fb28de1
2023-04-03 13:07:09 -06:00
Jeremy Soller
4d368e6724 Add RPP-S crashlog IDs
Change-Id: I6837dd95b89e59a90ac8d75433da1fc1195b9ed6
2023-04-03 13:07:09 -06:00
Jeremy Soller
fea9dacff2 Add RPP-S CSE IDs
Change-Id: I53b625ed1b2382c33f20cb7fff663d6bd62dc971
2023-04-03 13:07:09 -06:00
Jeremy Soller
d9ff1e3406 adl: Disable ME by default
Change-Id: I90119ef9bf8fa207dcda6c3f64246148344cde40
2023-04-03 13:07:09 -06:00
Jeremy Soller
78bfb3931a adl: Switch to S3
Change-Id: Ief43a23fd5af37f6d8384d21254d6d1ad7697376
2023-04-03 13:07:09 -06:00
Jeremy Soller
1cda83efee Revert "rpl: disable stage cache and mcache, which fixes S3"
This reverts commit d50557739d.
2023-04-03 13:07:09 -06:00
Jeremy Soller
24389aeccf rpl: Disable ME by default
Change-Id: Id198487f23284f0d3b307d05998d7b209835c680
2023-04-03 13:07:09 -06:00
Jeremy Soller
f279e865e6 rpl: Re-enable TPM_MEASURED_BOOT
Change-Id: I0ab5dd4e8ca371646f7615d2ea52038420157f93
2023-04-03 13:07:09 -06:00
Jeremy Soller
6145a2667f security/tpm/tspi/log: Respect cbmem TPM log size when copying preram entries
Change-Id: I0f08a5bbdb7b823e3a12770154101d49055f263e
2023-04-03 13:07:09 -06:00
Jeremy Soller
ac80c65b64 security/tpm/tspi: Fix preram TPM log max entries
Change-Id: I671fcd891367d3cbae4fc2d18db5a73ee8c15e8f
2023-04-03 13:07:09 -06:00
Jeremy Soller
539e3d045c Temporarily disable TPM_MEASURED_BOOT
Change-Id: I6fcad9de26a52c51d2a88a041ec277a63239d05d
2023-04-03 13:07:09 -06:00
Jeremy Soller
10b360c0d9 oryp11: Do not configure clock reqs, FSP will do that
Change-Id: I75e0b2fe7dfbcbc9400825e03218a6c21c265ff2
2023-04-03 13:07:09 -06:00
Jeremy Soller
f8b75214c2 oryp11: Add GPIO definitions
Change-Id: I58001b408e89fcfb232f6707fb762c10ca55d84c
2023-04-03 13:07:09 -06:00
Jeremy Soller
b127e8815a rpl: disable stage cache and mcache, which fixes S3
Change-Id: Ibb662bedc25c70bd5e077f1e91d2402bac16fe0c
2023-04-03 13:07:09 -06:00
Jeremy Soller
24793d7b14 rpl: Enable resizable BAR
Change-Id: I513974b521b774bfdd550a118ac9007b94b187f1
2023-04-03 13:07:09 -06:00
Jeremy Soller
5c4af52d79 Revert "rpl: Switch to S0iX"
This reverts commit e0bf2e4691.
2023-04-03 13:07:09 -06:00
Tim Crawford
cdcb9e08b1 serw13: Disable AER for SSD1
Enabling AER causes a constant flood of corrected error messages being
logged when using a 980 PRO, quickly filling the drive's free space.

Change-Id: Ib89c579f36e2fc53c9816f0033cd981aae4d7526
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
87e8e82397 rpl: Ensure touchpad IRQs are correct on RPL-H
Change-Id: I4e210df8494263618e8fe21cfc2fd250963b37ed
2023-04-03 13:07:09 -06:00
Jeremy Soller
42d7d81a17 rpl: Enable reporting CPU C10 state over ESPI
Change-Id: Ie1a574191da9d677d41f3dab6dce51c714bc26a9
2023-04-03 13:07:09 -06:00
Jeremy Soller
db22c8cbaf Missing endif
Change-Id: Ib6fa6512540f5bfbc68fea2ff355dc36f7102b8c
2023-04-03 13:07:09 -06:00
Jeremy Soller
8d06ec5681 Use PEG1 for NVIDIA ACPI only on PCH-S
Change-Id: I5ea775dd1f1770bd883bb4138404ea57a7cb6f22
2023-04-03 13:07:09 -06:00
Jeremy Soller
fc165748a0 rpl: Switch to S0iX
Change-Id: I2ae9d42d422fec32b9a7431ab44e7c7f4073a5da
2023-04-03 13:07:09 -06:00
Tim Crawford
9f0029c407 mb/system76/rpl: gaze18: Fix DGPU_GC6 define
Change-Id: I7f622dd65f9d4d40cd64d2b470850d4bc12fe807
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
06047ff944 serw13: Add NVIDIA driver to device tree
Change-Id: I5464c174c0c3a0d9c62f601d26c38ad717479b28
2023-04-03 13:07:09 -06:00
Jeremy Soller
e9d578e29d oryp11: Add NVIDIA driver to device tree
Change-Id: If8d5a36b0626eed70206bdd794a2d4dafe509551
2023-04-03 13:07:09 -06:00
Jeremy Soller
3f92171818 gaze18: Add NVIDIA driver to device tree
Change-Id: If2252e1a38b84544cbbececbb9592cf017d35acf
2023-04-03 13:07:09 -06:00
Jeremy Soller
dcbd17c70e addw3: Add NVIDIA driver to device tree
Change-Id: Ie7a284ae92e1e0ba73a2273a730e88921ee2d2c9
2023-04-03 13:07:09 -06:00
Jeremy Soller
ab39a8a55e oryp10: Add NVIDIA driver to device tree
Change-Id: Ife9863cc554b8fab945ab1975ed6c06b005e7e6c
2023-04-03 13:07:09 -06:00
Jeremy Soller
7613b5d3de oryp11: Add GPIO group comments
Change-Id: Icb2d4eb6b286c79872ec2c1936d34538a35bb2ee
2023-04-03 13:07:09 -06:00
Jeremy Soller
172951e8a4 gaze18: Fix bootblock DGPU_RST#_PCH setting
Change-Id: I42b2a89ea4d835914acc038ad0e02d94e1bffeab
2023-04-03 13:07:09 -06:00
Jeremy Soller
41b92819f3 gaze18 and oryp11: Fix CPU root port definitions
Change-Id: I1d1834786b08f2b8ba00642477dd26d9d1201e0f
2023-04-03 13:07:09 -06:00
Jeremy Soller
3fbec1478d oryp11: Fix DGPU GPIOs
Change-Id: Ibcac2cc95fd15b6d34f90804730ae0aab461ebef
2023-04-03 13:07:09 -06:00
Tim Crawford
b9c6e6ead0 soc/intel/alderlake: Hook up ucode for RPL-P/H/U
Hook up microcode from 3rdparty repo for:

- 06-ba-02 (CPUID signature: 0xb06a2)

Change-Id: I2ae315ed6e24a8d640f60af352928ebd091db3ab
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
2197637753 Update intel-microcode to 2023-02-14 release
Update the submodule to 2be47edc99ee.

This release contains the ucode for RPL-P/H/U.

Change-Id: I8497557e9362749a6a89f07f2515201c625e5d1d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
6da9bca331 Fix leftover addp3 identifiers
Change-Id: I64bedcfeac06377454d42fb79325bb6e256da6ba
2023-04-03 13:07:09 -06:00
Jeremy Soller
2f970a0853 Update kconfigs to match renamed boards
Change-Id: Ia9334a27b4e03783152b6a228faca0cb0c166594
2023-04-03 13:07:09 -06:00
Jeremy Soller
27e1e8ba90 Move gaze18-3050 variant to gaze18
Change-Id: I7cff4e39699e66284d0fa75e4c9d3029367c6cbd
2023-04-03 13:07:09 -06:00
Jeremy Soller
fde1fd6c2b Move gaze18-40x0 variant to addw3
Change-Id: Ie4fbe445b275723a38164cb3624f5119ba500cb7
2023-04-03 13:07:09 -06:00
Jeremy Soller
7c8815e9fd Move addp3 variant to oryp11
Change-Id: Ic805522570a45834dabd7f8b3162b5657f690dc8
2023-04-03 13:07:09 -06:00
Jeremy Soller
616b452a5f Move oryp11 variant to serw13
Change-Id: I8d8301cbfb7abdd1dee57bc1a657c156cf55e271
2023-04-03 13:07:09 -06:00
Jeremy Soller
d239bd703f mainboard/system76/rpl: Add kconfig for ADDP3
Change-Id: I3eb2574e3f26f9a4ed68c128ac23b94be17f8c1c
2023-04-03 13:07:09 -06:00
Jeremy Soller
12cc34eef3 mb/system76/rpl: addp3: Add board
Change-Id: Ic641698af43ee81314a1e492ecdaf4752dfcbdd3
2023-04-03 13:07:09 -06:00
Tim Crawford
c0d1ef8ed7 mb/system76/rpl: gaze18-3050: Add USB and PCIe RP configs
Change-Id: Ic9863d3aa8129e7081f36bc302cfa8ca68140eae
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
6846f84bc5 mb/system76/rpl: gaze18-3050: Document GPIOs
Change-Id: I5a74d0d8bf752d081975cd26ddf9d5b749c0ae9b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
0b4256765e gaze18-40x0: Leave CNVi clkreq configured by FSP and configure reset
Change-Id: Ic7e2f5c0b806474c17029fae5a39f415a51101b9
2023-04-03 13:07:09 -06:00
Tim Crawford
7f4a637d96 mb/system76/rpl: oryp11: Configure CNVi reset
It seems to be sufficient to just take the device out of reset, so
configure it in coreboot instead of FSP.

Change-Id: I408229072ba7eb169c3ba6693f95f5b32fca10e1
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
1e97c67c46 mb/system76/rpl: oryp11: Fix CNVi
According to the schematics:

- PCH_LAN_WAKE# is not connected
- M.2_BT_PCMIN is not connected

Addtionally, leave both CLKREQ and RST# for CNVi as FSP configured.

Change-Id: I6f249ca778ad741469475b02163a2eee2e7626de
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
ff7cd52733 mb/system76/rpl: oryp11: Fix USB port configs
Change-Id: Icc026451ac9ac5ff9def64096629d86beca4ec3c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
3d910c5de2 mb/system76/rpl: oryp11: Leave CLKREQ as FSP configured
Change-Id: If19f463ad63b74cbbafa4fdd31815697f608f0ed
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
026ab102d0 gaze18-40x0: document GPIOs
Change-Id: Ib1f3c1cdbe20dd759fd5c57105ba2640ec2b038b
2023-04-03 13:07:09 -06:00
Tim Crawford
de47b0d2e8 soc/intel/adl: Fix PL1 name for RPL-HX
Change-Id: I9ccb589338bd2e185186987f77b1eab62cdad2c1
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
ea9b80eeb9 oryp11: dGPU port and TP GPIO
Change-Id: Ie3f9edbf5cb9fcaba3c50e949afb55f990cd846d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
4c05c04c7c rpl: fix NVIDIA ACPI scope
Change-Id: Iccc78c15ef115a56fd071a7b891310026ed16501
2023-04-03 13:07:09 -06:00
Jeremy Soller
c554d246ad gaze18-40x0: enable NVIDIA GPU
Change-Id: Iefb6de5bdc481934d7c661516c05ee945e8717db
2023-04-03 13:07:09 -06:00
Jeremy Soller
5b893196a9 Add more RPP-S PCI ID definitions
Change-Id: I3682701a169dd51b1e55227b4e089310bcf42a0f
2023-04-03 13:07:09 -06:00
Jeremy Soller
7ab6edb20e Add RPP-S PCI root port definitions
Change-Id: I6ec9757b0402299be9c96fc0019890068f2f5e43
2023-04-03 13:07:09 -06:00
Jeremy Soller
7c0aa8288c Add RPP-S PCI ID definitions
Change-Id: Iee410ed3179260b08d45f50e8126fb815c686324
2023-04-03 13:07:09 -06:00
Jeremy Soller
c93982f2f9 gaze18-40x0: Set touchpad interrupt GPIO
Change-Id: I88c2be3948ca38b3ace04c7b45d989e696405be5
2023-04-03 13:07:09 -06:00
Jeremy Soller
ed8eddec45 rpl: touchpad irq on GPP_E7
Change-Id: I8a7072591d04ce73bd8861bfcd20ae2ef4460498
2023-04-03 13:07:09 -06:00
Jeremy Soller
4ecff1ad73 gaze18-40x0: fill in overridetree
Change-Id: Ie411e9f103b07b079681a73cef11f44cd58f0976
2023-04-03 13:07:09 -06:00
Tim Crawford
33b295ba95 [WIP] soc/intel/adl: Add RPL-HX support
Change-Id: I62efdd8bea7cc5134621f4602d2b2523651076da
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
790a3edf50 [WIP] soc/intel/adl: Add RPL-HX support
Ref: Intel Raptor Lake EDS, Volume 1 (#640555, rev. 2.5)
Change-Id: I6098e9121a3afc4160c8a0c96d597e88095fd65d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
7a43532db8 oryp11: Set dq_pins_interleaved
Change-Id: I094e86b39df9cedcb2813a88785ef907b9bf2308
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
64ceb34f0c oryp11: Fix TBT RP
Change-Id: I18f04fcfab73ae1144dc9f1625a55af0b708ba36
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
626b3c47bf mb/system76/rpl: oryp11: Add USB and PCIe RP configs
Change-Id: Ibe15461b58a5d133456779e7e28c8bd1db7ee320
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
4a9e7c2bd0 mb/system76/rpl: Use S3 instead of S0ix
Change-Id: Ib161c3eb6cf5af815e2ab53f38b5f7786b2e1949
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
c23b008e1b mb/system76/rpl: Add oryp11 smart amp extract
Extract the configuration block from the proprietary firmware module
PlatformInitAdvancedPostMem.

The proprietary firmware does not use a multiple of 4 for the smart amp
data like coreboot expects, so duplicate the last 2 dwords.

Change-Id: I563a92b87ebf7672963a03a15166aed194fc57fe
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
ff43b58bb3 mb/system76/rpl: Drop unneeded rcomp value
Change-Id: I7901e3a38fd8b03aad4cd0534c4646beaa13b521
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
d73fa8d711 soc/intel/alderlake: Hook up ucode for RPL-HX
Hook up microcode from 3rdparty repo for:

- 06-b7-01 (CPUID signature: 0xb0671)

Change-Id: If91ff9233a5e1dd1db76edf33a76c55f5dddc9b4
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
60019f9bc1 Set MAX_CPUS in SoC Kconfig
Change-Id: Ia7c0504d6d15931d2f0cfba92f0f8b700c91e37d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
5e2d0c44b7 Set MAX_CPUs for RPL-HX boards to 32
Change-Id: Ic10220124e2b32c7a1d674150687d27b94770873
2023-04-03 13:07:09 -06:00
Jeremy Soller
946cf8a924 Use interleaved DQ for gaze18-40x0, remove rcomp resistor setting
Change-Id: I9e527774c0ea08c7079c9722fa91f3876d23475e
2023-04-03 13:07:09 -06:00
Jeremy Soller
16012dd753 Move RPL models to new folder
Change-Id: If343c3d1c45ea88cef5e1b8912d929b1e8793b2c
2023-04-03 13:07:09 -06:00
Jeremy Soller
d5da5eb140 Select ADL-S PCH for some new RPL models
Change-Id: I6c3193c30f694ae1150ef1fba715c4eafc0a60b3
2023-04-03 13:07:09 -06:00
Jeremy Soller
7916559d78 Add gaze18-40x0
Change-Id: I5a7a00dd197de3d4dc4e18b16c327e8a9bc0065d
2023-04-03 13:07:09 -06:00
Tim Crawford
d55060d2b0 mb/system76/adl: Add Oryx Pro 11 as a variant
Change-Id: Ib9cf93dc88cd51d429222540ce0721c6e5f4013a
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
6d61eca2fa mb/system76/adl: Add Gazelle 18 (3050) as a variant
There will be two versions of firmware for the Gazelle 18:

- One for units using NVIDIA RTX 3050
- One for units using NVIDIA RTX 40x0

Change-Id: I7c1a51fda012fe4e7a43bbe5ef98a3aec38373a0
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
af2c4bc3eb mb/system76/adl: oryp10: Enable dGPU
I forgot this when performing the rebase.

Change-Id: I855968469ed339bdf2a5a40d5d91878a262ce954
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
21b5e715ce mb/system76/adl: Restructure board configs
Use a common block for all ADL/RPL boards.

Change-Id: I0ac73751c37a116b205f200c42b814182ca32bde
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Tim Crawford
16189781cb mb/system76: Rename adl-p to adl
The directory hold boards other than ADL-P, such as ADL-U and ADL-H, and
will also contain the RPL boards.

Change-Id: I1b42246bcf1eaed9de51f59021209e9eb836df15
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:07:09 -06:00
Jeremy Soller
fbccafec55 oryp10: select DRIVERS_GFX_NVIDIA
Change-Id: Ief59e4671b50debc604feca90657e9c8b9d7932d
2023-02-14 14:48:36 -07:00
Jeremy Soller
3df3af93e2 oryp10: enable DGPU
Change-Id: I856b221c099d8b52e14d5b5482499e873060491c
2023-02-14 14:46:52 -07:00
103 changed files with 2867 additions and 377 deletions

View File

@@ -8,3 +8,31 @@ config DRIVERS_GFX_NVIDIA_BRIDGE
hex "PCI bridge for the GPU device"
default 0x01
depends on DRIVERS_GFX_NVIDIA
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
depends on DRIVERS_GFX_NVIDIA
bool
default n
help
Support for NVIDIA Dynamic Boost
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP
int "Total processor power offset from default TGP in watts"
default 45
depends on DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
help
This identifies the available power for the CPU or GPU boost
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MIN
int "Minimum TGP offset from default TGP in watts"
default 0
depends on DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
help
This is used to transfer power from the GPU to the CPU
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX
int "Maximum TGP offset from default TGP in watts"
default 0
depends on DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
help
This is used to transfer power from the CPU to the GPU

View File

@@ -4,6 +4,7 @@
#define NV_ERROR_UNSPECIFIED 0x80000001
#define NV_ERROR_UNSUPPORTED 0x80000002
#include "gps.asl"
#include "nvjt.asl"
Method (_DSM, 4, Serialized) {
@@ -15,6 +16,13 @@ Method (_DSM, 4, Serialized) {
Printf(" Unsupported JT revision: %o", SFST(Arg1))
Return (NV_ERROR_UNSUPPORTED)
}
} ElseIf (Arg0 == ToUUID (GPS_DSM_GUID)) {
If (ToInteger(Arg1) == GPS_REVISION_ID) {
Return (GPS(Arg2, Arg3))
} Else {
Printf(" Unsupported GPS revision: %o", SFST(Arg1))
Return (NV_ERROR_UNSUPPORTED)
}
} Else {
Printf(" Unsupported GUID: %o", IDST(Arg0))
Return (NV_ERROR_UNSPECIFIED)

View File

@@ -0,0 +1,66 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#define GPS_DSM_GUID "A3132D01-8CDA-49BA-A52E-BC9D46DF6B81"
#define GPS_REVISION_ID 0x00000200
#define GPS_FUNC_SUPPORT 0x00000000
#define GPS_FUNC_PSHARESTATUS 0x00000020
#define GPS_FUNC_PSHAREPARAMS 0x0000002A
Method(GPS, 2, Serialized) {
Printf(" GPU GPS")
Switch(ToInteger(Arg0)) {
Case(GPS_FUNC_SUPPORT) {
Printf(" Supported Functions")
Return(ITOB(
(1 << GPS_FUNC_SUPPORT) |
(1 << GPS_FUNC_PSHARESTATUS) |
(1 << GPS_FUNC_PSHAREPARAMS)
))
}
Case(GPS_FUNC_PSHARESTATUS) {
Printf(" Power Share Status")
Return(ITOB(0))
}
Case(GPS_FUNC_PSHAREPARAMS) {
Printf(" Power Share Parameters")
CreateField(Arg1, 0, 4, QTYP) // Query type
Name(GPSP, Buffer(36) { 0x00 })
CreateDWordField(GPSP, 0, RSTS) // Response status
CreateDWordField(GPSP, 4, VERS) // Version
// Set query type of response
RSTS = QTYP
// Set version of response
VERS = 0x00010000
Switch(ToInteger(QTYP)) {
Case(0) {
Printf(" Request Current Information")
// No required information
Return(GPSP)
}
Case(1) {
Printf(" Request Supported Fields")
// Support GPU temperature field
RSTS |= (1 << 8)
Return(GPSP)
}
Case(2) {
Printf(" Request Current Limits")
// No required limits
Return(GPSP)
}
Default {
Printf(" Unknown Query: %o", SFST(QTYP))
Return(NV_ERROR_UNSUPPORTED)
}
}
}
Default {
Printf(" Unsupported function: %o", SFST(Arg0))
Return(NV_ERROR_UNSUPPORTED)
}
}
}

View File

@@ -7,3 +7,12 @@ Device (DEV0) {
#include "dsm.asl"
#include "power.asl"
}
#if CONFIG(DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST)
Scope (\_SB) {
Device(NPCF) {
#include "utility.asl"
#include "nvpcf.asl"
}
}
#endif

View File

@@ -0,0 +1,111 @@
#define NVPCF_DSM_GUID "36b49710-2483-11e7-9598-0800200c9a66"
#define NVPCF_REVISION_ID 0x00000200
#define NVPCF_ERROR_SUCCESS 0x0
#define NVPCF_ERROR_GENERIC 0x80000001
#define NVPCF_ERROR_UNSUPPORTED 0x80000002
#define NVPCF_FUNC_GET_SUPPORTED 0x00000000
#define NVPCF_FUNC_GET_STATIC_CONFIG_TABLES 0x00000001
#define NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS 0x00000002
Name(_HID, "NVDA0820")
Name(_UID, "NPCF")
Method(_DSM, 4, Serialized) {
Printf("NVPCF _DSM")
If (Arg0 == ToUUID(NVPCF_DSM_GUID)) {
If (ToInteger(Arg1) == NVPCF_REVISION_ID) {
Return(NPCF(Arg2, Arg3))
} Else {
Printf(" Unsupported NVPCF revision: %o", SFST(Arg1))
Return(NVPCF_ERROR_GENERIC)
}
} Else {
Printf(" Unsupported GUID: %o", IDST(Arg0))
Return(NVPCF_ERROR_GENERIC)
}
}
Method(NPCF, 2, Serialized) {
Printf(" NVPCF NPCF")
Switch(ToInteger(Arg0)) {
Case(NVPCF_FUNC_GET_SUPPORTED) {
Printf(" Supported Functions")
Return(ITOB(
(1 << NVPCF_FUNC_GET_SUPPORTED) |
(1 << NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) |
(1 << NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS)
))
}
Case(NVPCF_FUNC_GET_STATIC_CONFIG_TABLES) {
Printf(" Get Static Config")
Return(Buffer(14) {
// Device table header
0x20, 0x03, 0x01,
// Intel + NVIDIA
0x00,
// Controller table header
0x23, 0x04, 0x05, 0x01,
// Dynamic boost controller
0x01,
// Supports DC
0x01,
// Reserved
0x00, 0x00, 0x00,
// Checksum
0xAD
})
}
Case(NVPCF_FUNC_UPDATE_DYNAMIC_PARAMS) {
Printf(" Update Dynamic Boost")
CreateField(Arg1, 0x28, 2, ICMD) // Input command
Name(PCFP, Buffer(49) {
// Table version
0x23,
// Table header size
0x05,
// Size of common status in bytes
0x10,
// Size of controller entry in bytes
0x1C,
// Other fields filled in later
})
CreateByteField(PCFP, 0x04, CCNT) // Controller count
CreateWordField(PCFP, 0x19, ATPP) // AC TPP offset
CreateWordField(PCFP, 0x1D, AMXP) // AC maximum TGP offset
CreateWordField(PCFP, 0x21, AMNP) // AC minimum TGP offset
Switch(ToInteger(ICMD)) {
Case(0) {
Printf(" Get Controller Params")
// Number of controllers
CCNT = 1
// AC total processor power offset from default TGP in 1/8 watt units
ATPP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP << 3)
// AC maximum TGP offset from default TGP in 1/8 watt units
AMXP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX << 3)
// AC minimum TGP offset from default TGP in 1/8 watt units
AMNP = (CONFIG_DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MIN << 3)
Printf("PCFP: %o", SFST(PCFP))
Return(PCFP)
}
Case(1) {
Printf(" Set Controller Status")
//TODO
Printf("PCFP: %o", SFST(PCFP))
Return(PCFP)
}
Default {
Printf(" Unknown Input Command: %o", SFST(ICMD))
Return(NV_ERROR_UNSUPPORTED)
}
}
}
Default {
Printf(" Unsupported function: %o", SFST(Arg0))
Return(NVPCF_ERROR_UNSUPPORTED)
}
}
}

View File

@@ -0,0 +1,5 @@
config DRIVERS_INTEL_DTBT
bool
default n
help
Support for discrete Thunderbolt controllers

View File

@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
ramstage-$(CONFIG_DRIVERS_INTEL_DTBT) += dtbt.c

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _DRIVERS_INTEL_DTBT_CHIP_H_
#define _DRIVERS_INTEL_DTBT_CHIP_H_
struct drivers_intel_dtbt_config {};
#endif /* _DRIVERS_INTEL_DTBT_CHIP_H_ */

View File

@@ -0,0 +1,212 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include "chip.h"
#include <acpi/acpigen.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pciexp.h>
#include <device/pci_ids.h>
#define PCIE2TBT 0x54C
#define PCIE2TBT_GO2SX ((0x02 << 1) | 1)
#define PCIE2TBT_GO2SX_NO_WAKE ((0x03 << 1) | 1)
#define PCIE2TBT_SX_EXIT_TBT_CONNECTED ((0x04 << 1) | 1)
#define PCIE2TBT_SX_EXIT_NO_TBT_CONNECTED ((0x05 << 1) | 1)
#define PCIE2TBT_SET_SECURITY_LEVEL ((0x08 << 1) | 1)
#define PCIE2TBT_GET_SECURITY_LEVEL ((0x09 << 1) | 1)
#define PCIE2TBT_BOOT_ON ((0x18 << 1) | 1)
#define TBT2PCIE 0x548
static void dtbt_cmd(struct device *dev, u32 command) {
printk(BIOS_INFO, "DTBT send command %08x\n", command);
pci_write_config32(dev, PCIE2TBT, command);
u32 timeout;
u32 status;
for (timeout = 1000000; timeout > 0; timeout--) {
status = pci_read_config32(dev, TBT2PCIE);
if (status & 1) {
break;
}
udelay(1);
}
if (timeout == 0) {
printk(BIOS_ERR, "DTBT command %08x timeout on status %08x\n", command, status);
}
printk(BIOS_INFO, "DTBT command %08x status %08x\n", command, status);
pci_write_config32(dev, PCIE2TBT, 0);
u32 status_clear;
for (timeout = 1000000; timeout > 0; timeout--) {
status_clear = pci_read_config32(dev, TBT2PCIE);
if (!(status_clear & 1)) {
break;
}
udelay(1);
}
if (timeout == 0) {
printk(BIOS_ERR, "DTBT command %08x timeout on status clear %08x\n", command, status_clear);
}
}
static void dtbt_fill_ssdt(const struct device *dev) {
printk(BIOS_INFO, "DTBT fill SSDT\n");
if (!dev) {
printk(BIOS_ERR, "DTBT device invalid\n");
}
printk(BIOS_INFO, " Dev %s\n", dev_path(dev));
struct bus *bus = dev->bus;
if (!bus) {
printk(BIOS_ERR, "DTBT bus invalid\n");
}
printk(BIOS_INFO, " Bus %s\n", bus_path(bus));
struct device *parent = bus->dev;
if (!parent || parent->path.type != DEVICE_PATH_PCI) {
printk(BIOS_ERR, "DTBT parent invalid\n");
return;
}
printk(BIOS_INFO, " Parent %s\n", dev_path(parent));
const char *parent_scope = acpi_device_path(parent);
if (!parent_scope) {
printk(BIOS_ERR, "DTBT parent scope not valid\n");
return;
}
{ /* Scope */
printk(BIOS_INFO, " Scope %s\n", parent_scope);
acpigen_write_scope(parent_scope);
struct acpi_dp *dsd = acpi_dp_new_table("_DSD");
/* Indicate that device supports hotplug in D3. */
acpi_device_add_hotplug_support_in_d3(dsd);
/* Indicate that port is external. */
acpi_device_add_external_facing_port(dsd);
acpi_dp_write(dsd);
{ /* Device */
const char *dev_name = acpi_device_name(dev);
printk(BIOS_INFO, " Device %s\n", dev_name);
acpigen_write_device(dev_name);
acpigen_write_name_integer("_ADR", 0);
uintptr_t mmconf_base = (uintptr_t)CONFIG_ECAM_MMCONF_BASE_ADDRESS
+ (((uintptr_t)(bus->secondary)) << 20);
printk(BIOS_INFO, " MMCONF base %08lx\n", mmconf_base);
const struct opregion opregion = OPREGION("PXCS", SYSTEMMEMORY, mmconf_base, 0x1000);
const struct fieldlist fieldlist[] = {
FIELDLIST_OFFSET(TBT2PCIE),
FIELDLIST_NAMESTR("TB2P", 32),
FIELDLIST_OFFSET(PCIE2TBT),
FIELDLIST_NAMESTR("P2TB", 32),
};
acpigen_write_opregion(&opregion);
acpigen_write_field("PXCS", fieldlist, ARRAY_SIZE(fieldlist),
FIELD_DWORDACC | FIELD_NOLOCK | FIELD_PRESERVE);
{ /* Method */
acpigen_write_method_serialized("PTS", 0);
acpigen_write_debug_string("DTBT prepare to sleep");
acpigen_write_store_int_to_namestr(PCIE2TBT_GO2SX_NO_WAKE, "P2TB");
acpigen_write_delay_until_namestr_int(600, "TB2P", PCIE2TBT_GO2SX_NO_WAKE);
acpigen_write_debug_namestr("TB2P");
acpigen_write_store_int_to_namestr(0, "P2TB");
acpigen_write_delay_until_namestr_int(600, "TB2P", 0);
acpigen_write_debug_namestr("TB2P");
acpigen_write_method_end();
}
acpigen_write_device_end();
}
acpigen_write_scope_end();
}
{ /* Scope */
acpigen_write_scope("\\");
{ /* Method */
acpigen_write_method("TBTS", 0);
acpigen_emit_namestring(acpi_device_path_join(dev, "PTS"));
acpigen_write_method_end();
}
acpigen_write_scope_end();
}
}
static const char *dtbt_acpi_name(const struct device *dev) {
return "DTBT";
}
static struct pci_operations dtbt_device_ops_pci = {
.set_subsystem = 0,
};
static struct device_operations dtbt_device_ops = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
.acpi_fill_ssdt = dtbt_fill_ssdt,
.acpi_name = dtbt_acpi_name,
.scan_bus = pciexp_scan_bridge,
.reset_bus = pci_bus_reset,
.ops_pci = &dtbt_device_ops_pci,
};
static void dtbt_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_INTEL)
return;
//TODO: check device ID
dev->ops = &dtbt_device_ops;
printk(BIOS_INFO, "DTBT controller found at %s\n", dev_path(dev));
printk(BIOS_INFO, "DTBT get security level\n");
dtbt_cmd(dev, PCIE2TBT_GET_SECURITY_LEVEL);
printk(BIOS_INFO, "DTBT set security level SL0\n");
dtbt_cmd(dev, PCIE2TBT_SET_SECURITY_LEVEL);
printk(BIOS_INFO, "DTBT get security level\n");
dtbt_cmd(dev, PCIE2TBT_GET_SECURITY_LEVEL);
if (acpi_is_wakeup_s3()) {
printk(BIOS_INFO, "DTBT SX exit\n");
dtbt_cmd(dev, PCIE2TBT_SX_EXIT_TBT_CONNECTED);
} else {
printk(BIOS_INFO, "DTBT boot on\n");
dtbt_cmd(dev, PCIE2TBT_BOOT_ON);
}
}
struct chip_operations drivers_intel_dtbt_ops = {
CHIP_NAME("Intel Discrete Thunderbolt Device")
.enable_dev = dtbt_enable
};

View File

@@ -114,6 +114,7 @@ static const struct device_name infineon_devices[] = {
#if CONFIG(TPM2)
{0x001a, "SLB9665 TT 2.0"},
{0x001b, "SLB9670 TT 2.0"},
{0x001d, "SLB9672 TT 2.0"},
#else
{0x001a, "SLB9660 TT 1.2"},
{0x001b, "SLB9670 TT 1.2"},

View File

@@ -57,18 +57,22 @@ static void init_store(void *unused)
printk(BIOS_INFO, "SMMSTORE: Setting up SMI handler\n");
/* Issue SMI using APM to update the com buffer and to lock the SMMSTORE */
__asm__ __volatile__ (
"outb %%al, %%dx"
: "=a" (eax)
: "a" ((SMMSTORE_CMD_INIT << 8) | APM_CNT_SMMSTORE),
"b" (ebx),
"d" (APM_CNT)
: "memory");
for (int retries = 0; retries < 3; retries++) {
/* Issue SMI using APM to update the com buffer and to lock the SMMSTORE */
__asm__ __volatile__ (
"outb %%al, %%dx"
: "=a" (eax)
: "a" ((SMMSTORE_CMD_INIT << 8) | APM_CNT_SMMSTORE),
"b" (ebx),
"d" (APM_CNT)
: "memory");
if (eax != SMMSTORE_RET_SUCCESS) {
printk(BIOS_ERR, "SMMSTORE: Failed to install com buffer\n");
return;
if (eax == SMMSTORE_RET_SUCCESS) {
printk(BIOS_INFO, "SMMSTORE: Installed com buffer\n");
break;
}
printk(BIOS_ERR, "SMMSTORE: Failed to install com buffer: 0x%x\n", eax);
}
}

View File

@@ -8,11 +8,6 @@ config EC_SYSTEM76_EC_BAT_THRESHOLDS
bool
default y
config EC_SYSTEM76_EC_COLOR_KEYBOARD
depends on EC_SYSTEM76_EC
bool
default n
config EC_SYSTEM76_EC_DGPU
depends on EC_SYSTEM76_EC
bool

View File

@@ -90,9 +90,6 @@ Device (\_SB.PCI0.LPCB.EC0)
// Notify of changes
Notify(^^^^AC, 0)
Notify(^^^^BAT0, 0)
// Reset System76 Device
^^^^S76D.RSET()
}
}

View File

@@ -16,10 +16,8 @@ Device (S76D) {
Method (RSET, 0, Serialized) {
Printf ("S76D: RSET")
SAPL(0)
SKBL(0)
#if CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
SKBC(0xFFFFFF)
#endif // CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
SKBB(0)
SKBC(0xFFFFFF)
}
Method (INIT, 0, Serialized) {
@@ -67,53 +65,63 @@ Device (S76D) {
}
}
#if CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
// Set KB LED Brightness
Method (SKBL, 1, Serialized) {
// Get Keyboard Backlight Kind
// 0 - No backlight
// 1 - White backlight
// 2 - RGB backlight
Method (GKBK, 0, Serialized) {
Local0 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 6
^^PCI0.LPCB.EC0.FBUF = Arg0
^^PCI0.LPCB.EC0.FBF1 = 0
^^PCI0.LPCB.EC0.FBF2 = Arg0
^^PCI0.LPCB.EC0.FDAT = 2
^^PCI0.LPCB.EC0.FCMD = 0xCA
Local0 = ^^PCI0.LPCB.EC0.FBUF
}
Return (Local0)
}
// Set Keyboard Color
Method (SKBC, 1, Serialized) {
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 0x3
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
^^PCI0.LPCB.EC0.FCMD = 0xCA
Return (Arg0)
} Else {
Return (0)
}
}
#else // CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
// Get KB LED
Method (GKBL, 0, Serialized) {
// Get Keyboard Brightness
Method (GKBB, 0, Serialized) {
Local0 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 1
^^PCI0.LPCB.EC0.FCMD = 0xCA
Local0 = ^^PCI0.LPCB.EC0.FBUF
^^PCI0.LPCB.EC0.FCMD = 0
}
Return (Local0)
}
// Set KB Led
Method (SKBL, 1, Serialized) {
// Set Keyboard Brightness
Method (SKBB, 1, Serialized) {
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 0
^^PCI0.LPCB.EC0.FBUF = Arg0
^^PCI0.LPCB.EC0.FCMD = 0xCA
}
}
#endif // CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
// Get Keyboard Color
Method (GKBC, 0, Serialized) {
Local0 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 4
^^PCI0.LPCB.EC0.FCMD = 0xCA
Local0 = ^^PCI0.LPCB.EC0.FBUF
Local0 |= (^^PCI0.LPCB.EC0.FBF1) << 16
Local0 |= (^^PCI0.LPCB.EC0.FBF2) << 8
}
Return (Local0)
}
// Set Keyboard Color
Method (SKBC, 1, Serialized) {
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = 3
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
^^PCI0.LPCB.EC0.FCMD = 0xCA
}
}
// Fan names
Method (NFAN, 0, Serialized) {

View File

@@ -35,6 +35,18 @@
#define DDR4_SPD_PART_OFF 329
#define DDR4_SPD_PART_LEN 20
#define DDR4_SPD_SN_OFF 325
#define MAX_SPD_PAGE_SIZE_SPD5 128
#define MAX_SPD_SIZE (SPD_PAGE_LEN * SPD_SN_LEN)
#define SPD_HUB_MEMREG(addr) ((u8)(0x80 | (addr)))
#define SPD5_MR11 0x0B
#define SPD5_MR0 0x00
#define SPD5_MEMREG_REG(addr) ((u8)((~0x80) & (addr)))
#define SPD5_MR0_SPD5_HUB_DEV 0x51
struct spd_offset_table {
u16 start; /* Offset 0 */
u16 end; /* Offset 2 */
};
struct spd_block {
u8 addr_map[CONFIG_DIMM_MAX]; /* 7 bit I2C addresses */

View File

@@ -209,7 +209,7 @@ enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk)
dram_type = *(spd_cache + SC_SPD_OFFSET(i) + SPD_DRAM_TYPE);
if (dram_type == SPD_DRAM_DDR4)
if (dram_type == SPD_DRAM_DDR4 || dram_type == SPD_DRAM_DDR5)
blk->len = SPD_PAGE_LEN_DDR4;
else
blk->len = SPD_PAGE_LEN;

View File

@@ -3,11 +3,12 @@ if BOARD_SYSTEM76_ADDW1 || BOARD_SYSTEM76_ADDW2
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select EC_SYSTEM76_EC_OLED
select HAVE_ACPI_RESUME

View File

@@ -1,6 +1,9 @@
config BOARD_SYSTEM76_ADL_COMMON
def_bool n
select BOARD_ROMSIZE_KB_32768
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID
select DRIVERS_INTEL_PMC
select DRIVERS_INTEL_USB4_RETIMER
@@ -25,7 +28,6 @@ config BOARD_SYSTEM76_ADL_COMMON
config BOARD_SYSTEM76_DARP8
select BOARD_SYSTEM76_ADL_COMMON
select EC_SYSTEM76_EC_COLOR_KEYBOARD
config BOARD_SYSTEM76_GALP6
select BOARD_SYSTEM76_ADL_COMMON
@@ -33,7 +35,6 @@ config BOARD_SYSTEM76_GALP6
config BOARD_SYSTEM76_GAZE17_3050
select BOARD_SYSTEM76_ADL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select PCIEXP_HOTPLUG
select PCIEXP_HOTPLUG_PREFETCH_MEM_BELOW_4G
@@ -42,7 +43,6 @@ config BOARD_SYSTEM76_GAZE17_3050
config BOARD_SYSTEM76_GAZE17_3060_B
select BOARD_SYSTEM76_ADL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select MAINBOARD_USES_IFD_GBE_REGION
select PCIEXP_HOTPLUG
@@ -56,14 +56,14 @@ config BOARD_SYSTEM76_LEMP11
config BOARD_SYSTEM76_ORYP9
select BOARD_SYSTEM76_ADL_COMMON
select DRIVERS_GFX_NVIDIA
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select DRIVERS_I2C_TAS5825M
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
config BOARD_SYSTEM76_ORYP10
select BOARD_SYSTEM76_ADL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select EC_SYSTEM76_EC_DGPU
if BOARD_SYSTEM76_ADL_COMMON
@@ -108,12 +108,22 @@ config MAINBOARD_VERSION
default "oryp9" if BOARD_SYSTEM76_ORYP9
default "oryp10" if BOARD_SYSTEM76_ORYP10
config CMOS_DEFAULT_FILE
default "src/mainboard/\$(MAINBOARDDIR)/cmos-csme.default" if BOARD_SYSTEM76_DARP8
default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
config CONSOLE_POST
default y
config DIMM_SPD_SIZE
default 512
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP
default 45 if BOARD_SYSTEM76_ORYP9 || BOARD_SYSTEM76_ORYP10
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX
default 25 if BOARD_SYSTEM76_ORYP9 || BOARD_SYSTEM76_ORYP10
config FMDFILE
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/board.fmd"

View File

@@ -0,0 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Enable

View File

@@ -23,6 +23,9 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *params)
params->SataPortDevSlpPinMux[1] = 0x5967400d; // GPP_H13
params->SataPortsSolidStateDrive[1] = 1;
// Enable reporting CPU C10 state over eSPI
params->PchEspiHostC10ReportEnable = 1;
}
static void mainboard_init(void *chip_info)

View File

@@ -1,10 +1,9 @@
chip soc/intel/alderlake
# HACK: Limit PL4 to PL2 to prevent power-off when system is booted on
# battery power. This seems to only happen with the i7 units.
register "s0ix_enable" = "1"
register "power_limits_config[ADL_P_282_482_28W_CORE]" = "{
.tdp_pl1_override = 20,
.tdp_pl2_override = 56,
.tdp_pl4 = 56, // FIXME: Set to 65
}"
# GPE configuration
@@ -154,12 +153,6 @@ chip soc/intel/alderlake
.clk_req = 4,
.flags = PCIE_RP_LTR,
}"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D16)" # SSD1_PWR_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B16)" # M2_SSD1_RST#
register "srcclk_pin" = "4" # SSD1_CLKREQ#
device generic 0 on end
end
end
device ref pmc hidden
chip drivers/intel/pmc_mux

View File

@@ -2,7 +2,6 @@ chip soc/intel/alderlake
register "power_limits_config[ADL_P_282_482_28W_CORE]" = "{
.tdp_pl1_override = 28,
.tdp_pl2_override = 60,
.tdp_pl4 = 90,
}"
# GPE configuration

View File

@@ -103,14 +103,6 @@ chip soc/intel/alderlake
.clk_req = 1,
.flags = PCIE_RP_LTR,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: Enable tied to 3.3VS?
#register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D14)" # M2_PWR_EN1
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "disable_l23" = "true"
register "srcclk_pin" = "1" # SSD1_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp9 on
# PCIe RP#9 x1, Clock 6 (GLAN)
@@ -119,13 +111,6 @@ chip soc/intel/alderlake
.clk_req = 6,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: Enable tied to VDD3?
#register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D4)" # GPIO_LAN_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "6" # GLAN_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp10 on
# PCIe RP#10 x1, Clock 2 (WLAN)
@@ -134,12 +119,6 @@ chip soc/intel/alderlake
.clk_req = 2,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)" # PCH_WLAN_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "2" # WLAN_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp11 on
# PCIe RP#11 x1, Clock 5 (CARD)
@@ -148,13 +127,6 @@ chip soc/intel/alderlake
.clk_req = 5,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: Enable tied to 3.3VS?
#register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_B7)" # CARD_PWR_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "5" # CARD_CLKREQ#
device generic 0 on end
end
end
end
end

View File

@@ -137,8 +137,8 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_E15, NONE),
PAD_NC(GPP_E16, NONE),
PAD_CFG_GPI(GPP_E17, NONE, DEEP), // BOARD_ID3
PAD_NC(GPP_E18, NATIVE), // TBT_LSX0_TXD
PAD_NC(GPP_E19, NATIVE), // TBT_LSX0_RXD
// GPP_E18 (TBT_LSX0_TXD) configured by FSP
// GPP_E19 (TBT_LSX0_RXD) configured by FSP
PAD_NC(GPP_E20, NONE),
PAD_CFG_GPO(GPP_E21, 0, DEEP), // Strap 14 of 24
PAD_NC(GPP_E22, NONE),

View File

@@ -109,12 +109,6 @@ chip soc/intel/alderlake
.clk_req = 2,
.flags = PCIE_RP_LTR,
}"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)" # PCH_WLAN_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "2" # WLAN_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp6 on
# PCIe root port #6 x1, Clock 5 (CARD)
@@ -123,12 +117,6 @@ chip soc/intel/alderlake
.clk_req = 5,
.flags = PCIE_RP_LTR,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: No enable_gpio = no D3cold?
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "5" # CARD_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp7 on
# PCIe root port #7 x1, Clock 6 (GLAN)
@@ -147,14 +135,6 @@ chip soc/intel/alderlake
.clk_req = 1,
.flags = PCIE_RP_LTR,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: Enable tied to 3.3VS?
#register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C2)" # SATA_M2_PWR_EN1
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "disable_l23" = "true" # Fixes suspend on WD drives
register "srcclk_pin" = "1" # SSD_CLKREQ#
device generic 0 on end
end
end
device ref gbe on end
end

View File

@@ -2,7 +2,6 @@ chip soc/intel/alderlake
register "power_limits_config[ADL_P_142_242_282_15W_CORE]" = "{
.tdp_pl1_override = 15,
.tdp_pl2_override = 46,
.tdp_pl4 = 65,
}"
# GPE configuration
@@ -138,12 +137,6 @@ chip soc/intel/alderlake
.clk_req = 1,
.flags = PCIE_RP_LTR,
}"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D16)" # SSD1_PWR_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_H0)" # M2_SSD1_RST#
register "srcclk_pin" = "1" # SSD1_CLKREQ#
device generic 0 on end
end
end
device ref pmc hidden
chip drivers/intel/pmc_mux

View File

@@ -1,10 +1,8 @@
chip soc/intel/alderlake
# HACK: Limit PL4 to prevent power off on battery power.
register "power_limits_config[ADL_P_642_682_45W_CORE]" = "{
.tdp_pl1_override = 45,
.tdp_pl2_override = 115,
.tdp_psyspl2 = 135,
.tdp_pl4 = 72,
}"
# Thermal
@@ -152,12 +150,6 @@ chip soc/intel/alderlake
.clk_req = 2,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)" # PCH_WLAN_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "2" # WLAN_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp6 on
# PCIe RP#6 x1, Clock 6 (CARD)
@@ -166,12 +158,6 @@ chip soc/intel/alderlake
.clk_req = 6,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: Enable connected directly to 3.3VS?
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "6" # CARD_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp8 on
# PCIe RP#8 x1, Clock 5 (GLAN)
@@ -180,15 +166,7 @@ chip soc/intel/alderlake
.clk_req = 5,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
# XXX: Enable connected directly to VDD3?
#register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D4)" # GPIO_LAN_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B13)" # BUF_PLT_RST#
register "srcclk_pin" = "5" # GLAN_CLKREQ#
device generic 0 on end
end
end
device ref pmc hidden
chip drivers/intel/pmc_mux
device generic 0 on

View File

@@ -1,10 +1,8 @@
chip soc/intel/alderlake
# HACK: Limit PL4 to prevent power off on battery power.
register "power_limits_config[ADL_P_642_682_45W_CORE]" = "{
.tdp_pl1_override = 45,
.tdp_pl2_override = 115,
.tdp_psyspl2 = 135,
.tdp_pl4 = 72,
}"
# Thermal

View File

@@ -3,10 +3,11 @@ if BOARD_SYSTEM76_BONW14
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES

View File

@@ -3,9 +3,10 @@ if BOARD_SYSTEM76_DARP6 || BOARD_SYSTEM76_GALP4 || BOARD_SYSTEM76_LEMP9
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD if BOARD_SYSTEM76_DARP6
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT

View File

@@ -3,6 +3,8 @@ CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
bootblock-y += bootblock.c
bootblock-y += gpio_early.c
romstage-y += variants/$(VARIANT_DIR)/romstage.c
ramstage-y += ramstage.c
ramstage-y += variants/$(VARIANT_DIR)/gpio.c
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c

View File

@@ -3,10 +3,11 @@ if BOARD_SYSTEM76_GAZE14 || BOARD_SYSTEM76_GAZE15
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA
select DRIVERS_I2C_HID
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES

View File

@@ -3,6 +3,8 @@ if BOARD_SYSTEM76_GALP2 || BOARD_SYSTEM76_GALP3 || BOARD_SYSTEM76_GALP3_B
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_8192
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT

View File

@@ -3,11 +3,12 @@ if BOARD_SYSTEM76_ORYP5
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES

View File

@@ -3,11 +3,12 @@ if BOARD_SYSTEM76_ORYP6 || BOARD_SYSTEM76_ORYP7
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES

View File

@@ -1,6 +1,9 @@
config BOARD_SYSTEM76_RPL_COMMON
def_bool n
select BOARD_ROMSIZE_KB_32768
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_LOCKDOWN
@@ -20,40 +23,64 @@ config BOARD_SYSTEM76_RPL_COMMON
select SOC_INTEL_RAPTORLAKE
select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP
select TPM_RDRESP_NEED_DELAY
config BOARD_SYSTEM76_ADDW3
def_bool n
select BOARD_SYSTEM76_RPL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select DRIVERS_INTEL_DTBT
select EC_SYSTEM76_EC_DGPU
select MAINBOARD_USES_IFD_GBE_REGION
select PCIEXP_HOTPLUG
select SOC_INTEL_ALDERLAKE_PCH_S
config BOARD_SYSTEM76_GAZE18
def_bool n
config BOARD_SYSTEM76_BONW15
select BOARD_SYSTEM76_RPL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select DRIVERS_INTEL_DTBT
select EC_SYSTEM76_EC_DGPU
select PCIEXP_HOTPLUG
select SOC_INTEL_ALDERLAKE_PCH_S
config BOARD_SYSTEM76_DARP9
select BOARD_SYSTEM76_RPL_COMMON
select PCIEXP_HOTPLUG
select SOC_INTEL_ALDERLAKE_PCH_P
config BOARD_SYSTEM76_GALP7
select BOARD_SYSTEM76_RPL_COMMON
select PCIEXP_HOTPLUG
select SOC_INTEL_ALDERLAKE_PCH_P
config BOARD_SYSTEM76_GAZE18
select BOARD_SYSTEM76_RPL_COMMON
select DRIVERS_GFX_NVIDIA
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select EC_SYSTEM76_EC_DGPU
select SOC_INTEL_ALDERLAKE_PCH_P
select TPM_RDRESP_NEED_DELAY
config BOARD_SYSTEM76_ORYP11
config BOARD_SYSTEM76_LEMP12
def_bool n
select BOARD_SYSTEM76_RPL_COMMON
select HAVE_SPD_IN_CBFS
select SOC_INTEL_ALDERLAKE_PCH_P
select SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES
config BOARD_SYSTEM76_ORYP11
select BOARD_SYSTEM76_RPL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select EC_SYSTEM76_EC_DGPU
select SOC_INTEL_ALDERLAKE_PCH_P
select SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES
config BOARD_SYSTEM76_SERW13
def_bool n
select BOARD_SYSTEM76_RPL_COMMON
select DRIVERS_GFX_NVIDIA
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
select DRIVERS_INTEL_DTBT
select EC_SYSTEM76_EC_DGPU
select PCIEXP_HOTPLUG
select SOC_INTEL_ALDERLAKE_PCH_S
@@ -65,7 +92,11 @@ config MAINBOARD_DIR
config VARIANT_DIR
default "addw3" if BOARD_SYSTEM76_ADDW3
default "bonw15" if BOARD_SYSTEM76_BONW15
default "darp9" if BOARD_SYSTEM76_DARP9
default "galp7" if BOARD_SYSTEM76_GALP7
default "gaze18" if BOARD_SYSTEM76_GAZE18
default "lemp12" if BOARD_SYSTEM76_LEMP12
default "oryp11" if BOARD_SYSTEM76_ORYP11
default "serw13" if BOARD_SYSTEM76_SERW13
@@ -74,28 +105,58 @@ config OVERRIDE_DEVICETREE
config MAINBOARD_PART_NUMBER
default "addw3" if BOARD_SYSTEM76_ADDW3
default "bonw15" if BOARD_SYSTEM76_BONW15
default "darp9" if BOARD_SYSTEM76_DARP9
default "galp7" if BOARD_SYSTEM76_GALP7
default "gaze18" if BOARD_SYSTEM76_GAZE18
default "lemp12" if BOARD_SYSTEM76_LEMP12
default "oryp11" if BOARD_SYSTEM76_ORYP11
default "serw13" if BOARD_SYSTEM76_SERW13
config MAINBOARD_SMBIOS_PRODUCT_NAME
default "Adder WS" if BOARD_SYSTEM76_ADDW3
default "Bonobo WS" if BOARD_SYSTEM76_BONW15
default "Darter Pro" if BOARD_SYSTEM76_DARP9
default "Galago Pro" if BOARD_SYSTEM76_GALP7
default "Gazelle" if BOARD_SYSTEM76_GAZE18
default "Lemur Pro" if BOARD_SYSTEM76_LEMP12
default "Oryx Pro" if BOARD_SYSTEM76_ORYP11
default "Serval WS" if BOARD_SYSTEM76_SERW13
config MAINBOARD_VERSION
default "addw3" if BOARD_SYSTEM76_ADDW3
default "bonw15" if BOARD_SYSTEM76_BONW15
default "darp9" if BOARD_SYSTEM76_DARP9
default "galp7" if BOARD_SYSTEM76_GALP7
default "gaze18" if BOARD_SYSTEM76_GAZE18
default "lemp12" if BOARD_SYSTEM76_LEMP12
default "oryp11" if BOARD_SYSTEM76_ORYP11
default "serw13" if BOARD_SYSTEM76_SERW13
config CMOS_DEFAULT_FILE
default "src/mainboard/\$(MAINBOARDDIR)/cmos-csme.default" if BOARD_SYSTEM76_DARP9
default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
config CONSOLE_POST
default y
config DIMM_MAX
default 8
config DIMM_SPD_SIZE
default 512
config DRIVERS_GFX_NVIDIA_BRIDGE
default 0x02 if BOARD_SYSTEM76_BONW15
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP
default 45 if BOARD_SYSTEM76_ORYP11
default 55 if BOARD_SYSTEM76_ADDW3 || BOARD_SYSTEM76_GAZE18 || BOARD_SYSTEM76_SERW13
default 80 if BOARD_SYSTEM76_BONW15
config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX
default 25 if BOARD_SYSTEM76_ADDW3 || BOARD_SYSTEM76_BONW15 || BOARD_SYSTEM76_GAZE18 || BOARD_SYSTEM76_ORYP11 || BOARD_SYSTEM76_SERW13
config FMDFILE
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/variants/\$(CONFIG_VARIANT_DIR)/board.fmd"
@@ -112,8 +173,8 @@ config TPM_MEASURED_BOOT
default y
config UART_FOR_CONSOLE
default 0 if BOARD_SYSTEM76_GAZE18 || BOARD_SYSTEM76_ORYP11
default 2 if BOARD_SYSTEM76_ADDW3 || BOARD_SYSTEM76_SERW13
default 0 if SOC_INTEL_ALDERLAKE_PCH_P
default 2 if SOC_INTEL_ALDERLAKE_PCH_S
# PM Timer Disabled, saves power
config USE_PM_ACPI_TIMER

View File

@@ -1,9 +1,21 @@
config BOARD_SYSTEM76_ADDW3
bool "addw3"
config BOARD_SYSTEM76_BONW15
bool "bonw15"
config BOARD_SYSTEM76_DARP9
bool "darp9"
config BOARD_SYSTEM76_GALP7
bool "galp7"
config BOARD_SYSTEM76_GAZE18
bool "gaze18"
config BOARD_SYSTEM76_LEMP12
bool "lemp12"
config BOARD_SYSTEM76_ORYP11
bool "oryp11"

View File

@@ -1,3 +1,5 @@
## SPDX-License-Identifier: GPL-2.0-only
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
@@ -10,3 +12,5 @@ ramstage-y += ramstage.c
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
ramstage-y += variants/$(VARIANT_DIR)/gpio.c
ramstage-$(CONFIG_DRIVERS_I2C_TAS5825M) += variants/$(VARIANT_DIR)/tas5825m.c
SPD_SOURCES = samsung-M425R1GB4BB0-CQKOD

View File

@@ -14,15 +14,15 @@ Scope (\_SB) {
#include "backlight.asl"
#if CONFIG(DRIVERS_GFX_NVIDIA)
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
Scope (PEG1) {
#include <drivers/gfx/nvidia/acpi/tigerlake.asl>
}
#else // CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_P) || CONFIG(BOARD_SYSTEM76_BONW15)
Scope (PEG2) {
#include <drivers/gfx/nvidia/acpi/tigerlake.asl>
}
#endif // CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
#else
Scope (PEG1) {
#include <drivers/gfx/nvidia/acpi/tigerlake.asl>
}
#endif
#endif // CONFIG(DRIVERS_GFX_NVIDIA)
}
}

View File

@@ -1,46 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <intelblocks/gpio.h>
External(\TBTS, MethodObj)
Method (PGPM, 1, Serialized)
{
For (Local0 = 0, Local0 < 6, Local0++)
{
\_SB.PCI0.CGPM (Local0, Arg0)
}
}
/*
* Method called from _PTS prior to system sleep state entry
* Enables dynamic clock gating for all 5 GPIO communities
*/
Method (MPTS, 1, Serialized)
{
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
PGPM (MISCCFG_GPIO_PM_CONFIG_BITS)
}
/*
* Method called from _WAK prior to system sleep state wakeup
* Disables dynamic clock gating for all 5 GPIO communities
*/
Method (MWAK, 1, Serialized)
{
PGPM (0)
\_SB.PCI0.LPCB.EC0.WAK (Arg0)
}
/*
* S0ix Entry/Exit Notifications
* Called from \_SB.PEPD._DSM
*/
Method (MS0X, 1, Serialized)
{
If (Arg0 == 1) {
/* S0ix Entry */
PGPM (MISCCFG_GPIO_PM_CONFIG_BITS)
} Else {
/* S0ix Exit */
PGPM (0)
Method(MPTS, 1, Serialized) {
If (CondRefOf(\TBTS)) {
\TBTS()
}
}

View File

@@ -0,0 +1,3 @@
boot_option=Fallback
debug_level=Debug
me_state=Enable

View File

@@ -0,0 +1,33 @@
# Samsung M425R1GB4BB0-CQKOD
30 10 12 03 04 00 40 42 00 00 00 00 90 02 00 00
00 00 00 00 A0 01 F2 03 7A 0D 00 00 00 00 80 3E
80 3E 80 3E 00 7D 80 BB 30 75 27 01 A0 00 82 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 88 13 08 88 13 08 20 4E 20 10
27 10 1A 41 28 10 27 10 C4 09 04 4C 1D 0C 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
10 00 80 B3 80 21 80 B3 82 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 0F 01 02 81 00 22 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 D1

View File

@@ -55,7 +55,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPI(GPP_B15, NONE, DEEP), // PS8461_SW_PCH
PAD_NC(GPP_B16, NONE),
PAD_NC(GPP_B17, NONE),
PAD_CFG_NF(GPP_B18, NONE, PWROK, NF1), // PCH_PMCALERT#
PAD_CFG_NF(GPP_B18, NONE, RSMRST, NF1), // PCH_PMCALERT#
PAD_CFG_GPO(GPP_B19, 1, DEEP), // PCH_WLAN_EN
PAD_CFG_NF(GPP_B20, DN_20K, DEEP, NF1),
_PAD_CFG_STRUCT(GPP_B21, 0x42880100, 0x0000), // GPP_B21_TBT_WAKE#
@@ -244,7 +244,7 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_K1, NONE),
PAD_NC(GPP_K2, NONE),
PAD_CFG_GPO(GPP_K3, 1, PLTRST), // TBT_RTD3_PWR_EN_R
PAD_CFG_GPO(GPP_K4, 1, PWROK), // TBT_FORCE_PWR_R
PAD_CFG_GPO(GPP_K4, 0, RSMRST), // TBT_FORCE_PWR_R
PAD_NC(GPP_K5, NONE),
PAD_CFG_NF(GPP_K6, UP_20K, DEEP, NF2), // Not in schematic
PAD_CFG_NF(GPP_K7, DN_20K, DEEP, NF2), // Not in schematic

View File

@@ -1,4 +1,7 @@
chip soc/intel/alderlake
# Support 5600 MT/s memory
register "max_dram_speed_mts" = "5600"
device domain 0 on
subsystemid 0x1558 0xa671 inherit
@@ -17,62 +20,6 @@ chip soc/intel/alderlake
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A 3.2 Gen 1 (Left)
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-C 3.2 Gen 2 (Rear)
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on
chip drivers/usb/acpi
register "desc" = ""USB2 Type-A 3.2 Gen 1 (Left)""
register "group" = "ACPI_PLD_GROUP(1, 1)"
register "type" = "UPC_TYPE_A"
device ref usb2_port1 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Type-A 2.0 (Left)""
register "group" = "ACPI_PLD_GROUP(1, 2)"
register "type" = "UPC_TYPE_A"
device ref usb2_port2 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Type-C 3.2 Gen 2 (Rear)""
register "group" = "ACPI_PLD_GROUP(2, 1)"
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
device ref usb2_port3 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Type-C Thunderbolt (Right)""
register "group" = "ACPI_PLD_GROUP(3, 1)"
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
device ref usb2_port9 on end
end
chip drivers/usb/acpi
register "desc" = ""Camera""
register "type" = "UPC_TYPE_INTERNAL"
device ref usb2_port11 on end
end
chip drivers/usb/acpi
register "desc" = ""Secure Pad""
register "type" = "UPC_TYPE_INTERNAL"
device ref usb2_port12 on end
end
chip drivers/usb/acpi
register "desc" = ""Bluetooth""
register "type" = "UPC_TYPE_INTERNAL"
device ref usb2_port14 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 Type-A 3.2 Gen 1 (Left)""
register "group" = "ACPI_PLD_GROUP(1, 1)"
register "type" = "UPC_TYPE_A"
device ref usb3_port1 on end
end
chip drivers/usb/acpi
register "desc" = ""Type-C 3.2 Gen 2 (Rear)""
register "group" = "ACPI_PLD_GROUP(2, 1)"
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
device ref usb3_port3 on end
end
end
end
end
device ref i2c0 on
@@ -149,18 +96,10 @@ chip soc/intel/alderlake
register "pch_pcie_rp[PCH_RP(21)]" = "{
.clk_src = 15,
.clk_req = 15,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR,
}"
chip drivers/usb/acpi
register "type" = "UPC_TYPE_HUB"
device usb 0.0 alias tbt_root_hub on
chip drivers/usb/acpi
register "desc" = ""USB2 Type-C Thunderbolt (Right)""
register "group" = "ACPI_PLD_GROUP(3, 1)"
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
device usb 3.0 alias tbt_port1 on end
end
end
chip drivers/intel/dtbt
device pci 00.0 on end
end
end

View File

@@ -0,0 +1,12 @@
FLASH 32M {
SI_DESC 4K
SI_ME 3944K
SI_BIOS@16M 16M {
RW_MRC_CACHE 64K
SMMSTORE(PRESERVE) 256K
WP_RO {
FMAP 4K
COREBOOT(CBFS)
}
}
}

View File

@@ -0,0 +1,2 @@
Board name: bonw15
Release year: 2023

Binary file not shown.

View File

@@ -0,0 +1,294 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config gpio_table[] = {
/* ------- GPIO Group GPD ------- */
PAD_CFG_NF(GPD0, UP_20K, PWROK, NF1), // PM_BATLOW#
PAD_CFG_NF(GPD1, NATIVE, PWROK, NF1), // AC_PRESENT
_PAD_CFG_STRUCT(GPD2, 0x42880100, 0x0000), // PCH_LAN_WAKE#
PAD_CFG_NF(GPD3, UP_20K, PWROK, NF1), // PWR_BTN#
PAD_CFG_NF(GPD4, NONE, PWROK, NF1), // SUSB#_PCH
PAD_CFG_NF(GPD5, NONE, PWROK, NF1), // SUSC#_PCH
PAD_CFG_NF(GPD6, NONE, PWROK, NF1), // SLP_A#_N
PAD_CFG_GPI(GPD7, NONE, PWROK), // GPD_7
PAD_CFG_NF(GPD8, NONE, PWROK, NF1), // CNVI_SUSCLK
PAD_CFG_GPO(GPD9, 0, PWROK), // SLP_WLAN_N
PAD_CFG_NF(GPD10, NONE, PWROK, NF1), // SLP_S5#
PAD_CFG_GPO(GPD11, 0, DEEP), // LANPHYPC
PAD_CFG_GPO(GPD12, 0, DEEP), // TP_GPD_12
/* ------- GPIO Group GPP_A ------- */
PAD_CFG_NF(GPP_A0, UP_20K, DEEP, NF1), // ESPI_IO0_EC
PAD_CFG_NF(GPP_A1, UP_20K, DEEP, NF1), // ESPI_IO1_EC
PAD_CFG_NF(GPP_A2, UP_20K, DEEP, NF1), // ESPI_IO2_EC
PAD_CFG_NF(GPP_A3, UP_20K, DEEP, NF1), // ESPI_IO3_EC
PAD_CFG_NF(GPP_A4, UP_20K, DEEP, NF1), // ESPI_CS_EC#
PAD_CFG_NF(GPP_A5, DN_20K, DEEP, NF1), // ESPI_CLK_EC
PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1), // ESPI_RESET_N
PAD_CFG_GPO(GPP_A7, 0, DEEP),
PAD_CFG_GPO(GPP_A8, 0, DEEP),
PAD_CFG_GPO(GPP_A9, 0, DEEP),
PAD_CFG_NF(GPP_A10, NONE, DEEP, NF1), // ESPI_ALERT0#
PAD_CFG_GPI(GPP_A11, UP_20K, DEEP), // GPIO4_GC6_NVDD_EN_R
PAD_CFG_GPO(GPP_A12, 0, DEEP),
PAD_CFG_GPO(GPP_A13, 0, DEEP),
PAD_CFG_GPO(GPP_A14, 0, DEEP),
/* ------- GPIO Group GPP_B ------- */
_PAD_CFG_STRUCT(GPP_B0, 0x82900100, 0x0000), // TPM_PIRQ#
PAD_CFG_GPO(GPP_B1, 0, DEEP),
PAD_CFG_GPI(GPP_B2, NONE, DEEP), // CNVI_WAKE#
PAD_CFG_GPO(GPP_B3, 1, DEEP), // PCH_BT_EN
PAD_CFG_GPO(GPP_B4, 0, DEEP),
PAD_CFG_GPO(GPP_B5, 0, DEEP),
PAD_CFG_GPO(GPP_B6, 0, DEEP),
PAD_CFG_GPO(GPP_B7, 0, DEEP),
PAD_CFG_GPO(GPP_B8, 0, DEEP),
PAD_CFG_GPO(GPP_B9, 0, DEEP),
PAD_CFG_GPO(GPP_B10, 0, DEEP),
PAD_CFG_GPO(GPP_B11, 0, DEEP),
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), // SLP_S0#
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), // PLT_RST#
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1), // HDA_SPKR
PAD_CFG_GPO(GPP_B15, 0, DEEP), // PS8461_SW
PAD_CFG_GPO(GPP_B16, 0, DEEP),
PAD_CFG_GPO(GPP_B17, 1, RSMRST), // 2.5G_LAN_EN
PAD_CFG_NF(GPP_B18, NONE, RSMRST, NF1), // PMCALERT#
PAD_CFG_GPO(GPP_B19, 1, DEEP), // PCH_WLAN_EN
PAD_CFG_GPO(GPP_B20, 0, DEEP),
PAD_CFG_GPO(GPP_B21, 0, DEEP), // GPP_B21
PAD_CFG_GPO(GPP_B22, 1, DEEP), // LAN_RST#
PAD_CFG_GPI(GPP_B23, NONE, DEEP), // GPP_B23
/* ------- GPIO Group GPP_C ------- */
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), // SMB_CLK
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), // SMB_DATA
PAD_CFG_GPI(GPP_C2, NONE, PLTRST), // PCH_PORT80_LED
PAD_CFG_GPO(GPP_C3, 0, DEEP), // GPPC_I2C2_SDA
PAD_CFG_GPO(GPP_C4, 0, DEEP), // GPPC_I2C2_SCL
PAD_CFG_NF(GPP_C5, NONE, DEEP, NF1), // GPP_C_5_SML0ALERT_N
PAD_CFG_GPO(GPP_C6, 0, DEEP),
PAD_CFG_GPO(GPP_C7, 0, DEEP),
PAD_CFG_GPI(GPP_C8, NONE, DEEP), // TPM_DET
PAD_CFG_GPO(GPP_C9, 0, DEEP),
PAD_CFG_GPO(GPP_C10, 0, DEEP),
PAD_CFG_GPO(GPP_C11, 0, DEEP),
PAD_CFG_GPO(GPP_C12, 0, DEEP),
PAD_CFG_GPO(GPP_C13, 0, DEEP),
PAD_CFG_GPO(GPP_C14, 0, DEEP),
PAD_CFG_GPO(GPP_C15, 0, DEEP),
PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1), // I2C_SDA_TP
PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1), // I2C_SCL_TP
PAD_CFG_NF(GPP_C18, NONE, DEEP, NF1), // PCH_I2C_SDA
PAD_CFG_NF(GPP_C19, NONE, DEEP, NF1), // PCH_I2C_SCL
// GPP_C20 (UART2_RXD) configured in bootblock
// GPP_C21 (UART2_TXD) configured in bootblock
PAD_CFG_GPO(GPP_C22, 0, DEEP), // ROM_I2C_EN
PAD_CFG_GPO(GPP_C23, 0, DEEP),
/* ------- GPIO Group GPP_D ------- */
PAD_CFG_GPO(GPP_D0, 0, DEEP),
PAD_CFG_GPO(GPP_D1, 0, DEEP),
PAD_CFG_GPO(GPP_D2, 0, DEEP),
PAD_CFG_GPO(GPP_D3, 0, DEEP), // GFX_DETECT_STRAP
PAD_CFG_GPO(GPP_D4, 0, DEEP), // GPP_D4_SML1CLK
PAD_CFG_GPO(GPP_D5, 1, DEEP), // M.2_BT_PCMFRM_CRF_RST_N
// GPP_D6 (M.2_BT_PCMOUT_CLKREQ0) configured by FSP
PAD_CFG_GPO(GPP_D7, 0, DEEP), // GPP_D7
PAD_NC(GPP_D8, NONE), // GPP_D8
PAD_CFG_NF(GPP_D9, NATIVE, DEEP, NF1), // GPP_D9_SML0CLK
PAD_CFG_NF(GPP_D10, NATIVE, DEEP, NF1), // GPP_D10_SML0DATA
PAD_CFG_NF(GPP_D11, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D12, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D13, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D14, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D15, NATIVE, DEEP, NF1), // GPP_D15_SML1DATA
PAD_CFG_NF(GPP_D16, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D17, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D18, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D19, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_D21, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_D22, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_D23, NONE, DEEP, NF1),
/* ------- GPIO Group GPP_E ------- */
PAD_CFG_GPO(GPP_E0, 0, DEEP),
PAD_CFG_GPO(GPP_E1, 0, DEEP),
PAD_CFG_GPO(GPP_E2, 0, DEEP),
PAD_CFG_GPO(GPP_E3, 0, DEEP),
PAD_CFG_GPO(GPP_E4, 0, DEEP),
PAD_CFG_GPO(GPP_E5, 0, DEEP),
PAD_CFG_GPO(GPP_E6, 0, DEEP),
PAD_CFG_GPI_INT(GPP_E7, NONE, PLTRST, LEVEL), // TP_ATTN#
PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1), // SATA_LED#
PAD_NC(GPP_E9, NONE), // GPP_E_9_USB_OC0_N
PAD_NC(GPP_E10, NONE), // GPP_E_10_USB_OC1_N
PAD_NC(GPP_E11, NONE), // GPP_E_11_USB_OC2_N
PAD_NC(GPP_E12, NONE), // GPP_E_12_USB_OC3_N
PAD_CFG_GPO(GPP_E13, 0, DEEP),
PAD_CFG_GPO(GPP_E14, 0, DEEP),
PAD_CFG_GPO(GPP_E15, 0, DEEP),
PAD_CFG_GPO(GPP_E16, 0, DEEP),
PAD_CFG_GPO(GPP_E17, 0, DEEP),
PAD_CFG_GPO(GPP_E18, 1, DEEP), // SB_BLON
PAD_CFG_GPO(GPP_E19, 0, DEEP),
PAD_CFG_GPO(GPP_E20, 0, DEEP),
PAD_CFG_GPO(GPP_E21, 0, DEEP),
/* ------- GPIO Group GPP_F ------- */
PAD_CFG_GPO(GPP_F0, 0, DEEP),
PAD_CFG_GPO(GPP_F1, 0, DEEP),
PAD_CFG_GPO(GPP_F2, 0, DEEP),
PAD_CFG_GPO(GPP_F3, 0, DEEP),
PAD_CFG_GPO(GPP_F4, 0, DEEP),
PAD_CFG_GPO(GPP_F5, 1, PLTRST), // GPP_F5_TBT_RTD3
PAD_CFG_GPO(GPP_F6, 0, DEEP),
PAD_CFG_GPO(GPP_F7, 0, DEEP),
PAD_CFG_GPI(GPP_F8, NONE, DEEP), // GC6_FB_EN_PCH
_PAD_CFG_STRUCT(GPP_F9, 0x42880100, 0x0000), // GPP_F9_TBT_WAKE#
PAD_CFG_GPO(GPP_F10, 0, DEEP),
PAD_CFG_GPO(GPP_F11, 0, DEEP),
PAD_CFG_GPO(GPP_F12, 0, DEEP),
PAD_CFG_GPO(GPP_F13, 0, DEEP),
PAD_CFG_GPO(GPP_F14, 0, DEEP), // PS_ON#
PAD_CFG_GPI(GPP_F15, NONE, DEEP), // H_SKTOCC_N
PAD_CFG_GPO(GPP_F16, 1, DEEP), // GPP_F16_TBT_RST#
PAD_CFG_GPO(GPP_F17, 0, DEEP),
PAD_CFG_GPO(GPP_F18, 0, DEEP), // CCD_FW_WP#
PAD_CFG_NF(GPP_F19, NONE, DEEP, NF1), // NB_ENAVDD
PAD_CFG_NF(GPP_F20, NONE, DEEP, NF1), // BLON
PAD_CFG_NF(GPP_F21, NONE, DEEP, NF1), // EDP_BRIGHTNESS
// GPP_F22 (DGPU_PWR_EN) configured in bootblock
PAD_CFG_GPO(GPP_F23, 0, DEEP),
/* ------- GPIO Group GPP_G ------- */
PAD_CFG_GPO(GPP_G0, 0, RSMRST), // TBT_USB_FORCE_PWR
PAD_CFG_GPI(GPP_G1, NONE, DEEP), // GPP_G1
PAD_CFG_GPI(GPP_G2, DN_20K, DEEP), // DNX_FORCE_RELOAD
PAD_CFG_GPI(GPP_G3, NONE, DEEP), // GPP_G3
PAD_CFG_GPI(GPP_G4, NONE, DEEP), // GPP_G4
PAD_CFG_NF(GPP_G5, NONE, DEEP, NF1), // SLP_DRAM_N
PAD_CFG_GPI(GPP_G6, NONE, DEEP), // GPP_G6
_PAD_CFG_STRUCT(GPP_G7, 0x42800100, 0x0000), // TBCIO_PLUG_EVENT#
/* ------- GPIO Group GPP_H ------- */
PAD_CFG_GPI(GPP_H0, NONE, DEEP), // VAL_SV_ADVANCE_STRAP
PAD_CFG_GPO(GPP_H1, 0, DEEP),
PAD_CFG_GPI(GPP_H2, NONE, DEEP), // WLAN_WAKE_N
// GPP_H3 (WLAN_CLKREQ9#) configured by FSP
// GPP_H4 (SSD1_CLKREQ10#) configured by FSP
// GPP_H5 (SSD2_CLKREQ11#) configured by FSP
// GPP_H6 (SSD3_CLKREQ12#) configured by FSP
// GPP_H7 (GLAN_CLKREQ13#) configured by FSP
// GPP_H8 (GPU_PCIE_CLKREQ14#) configured by FSP
// GPP_H9 (TBT_CLKREQ15#) configured by FSP
PAD_CFG_NF(GPP_H10, NONE, DEEP, NF1), // GPP_H10_SML2CLK
PAD_CFG_NF(GPP_H11, NONE, DEEP, NF1), // GPP_H11_SML2DATA
PAD_CFG_GPI(GPP_H12, NONE, DEEP), // GPP_H12
PAD_CFG_NF(GPP_H13, NONE, DEEP, NF1), // GPP_H13_SML3CLK
PAD_CFG_NF(GPP_H14, NONE, DEEP, NF1), // GPP_H14_SML3DATA
PAD_CFG_GPI(GPP_H15, NONE, DEEP), // GPP_H_15_SML3ALERT_N
PAD_CFG_GPI(GPP_H16, NONE, DEEP),
PAD_CFG_GPO(GPP_H17, 1, DEEP), // M.2_PLT_RST_CNTRL3#
PAD_CFG_GPI(GPP_H18, NONE, DEEP), // GPP_H18
PAD_CFG_GPO(GPP_H19, 0, DEEP),
PAD_CFG_GPO(GPP_H20, 0, DEEP),
PAD_CFG_GPO(GPP_H21, 1, DEEP), // TBT_MRESET_PCH
PAD_CFG_GPO(GPP_H22, 0, DEEP),
PAD_CFG_GPI(GPP_H23, NONE, DEEP), // TIME_SYNC0
/* ------- GPIO Group GPP_I ------- */
PAD_CFG_GPO(GPP_I0, 0, DEEP),
_PAD_CFG_STRUCT(GPP_I1, 0x86880100, 0x0000), // G_DP_DHPD_E
_PAD_CFG_STRUCT(GPP_I2, 0x86880100, 0x0000), // DP_D_HPD
_PAD_CFG_STRUCT(GPP_I3, 0x86880100, 0x0000), // HDMI_HPD
_PAD_CFG_STRUCT(GPP_I4, 0x86880100, 0x0000), // DP_A_HPD
PAD_CFG_GPO(GPP_I5, 0, DEEP),
PAD_CFG_GPO(GPP_I6, 0, DEEP),
PAD_CFG_GPO(GPP_I7, 0, DEEP),
PAD_CFG_GPO(GPP_I8, 0, DEEP),
PAD_CFG_GPO(GPP_I9, 0, DEEP),
PAD_CFG_GPO(GPP_I10, 0, DEEP),
PAD_NC(GPP_I11, NONE), // GPP_I_11_USB_OC4_N
PAD_NC(GPP_I12, NONE), // GPP_I_12_USB_OC5_N
PAD_NC(GPP_I13, NONE), // GPP_I_13_USB_OC6_N
PAD_NC(GPP_I14, NONE), // GPP_I_14_USB_OC7_N
PAD_CFG_GPO(GPP_I15, 0, DEEP),
PAD_CFG_GPO(GPP_I16, 0, DEEP),
PAD_CFG_GPO(GPP_I17, 0, DEEP),
PAD_CFG_GPI(GPP_I18, NONE, DEEP), // GPP_I18
PAD_CFG_GPO(GPP_I19, 0, DEEP),
PAD_CFG_GPO(GPP_I20, 0, DEEP),
PAD_CFG_GPO(GPP_I21, 0, DEEP),
PAD_CFG_GPI(GPP_I22, NONE, DEEP), // GPP_I22
/* ------- GPIO Group GPP_J ------- */
PAD_CFG_NF(GPP_J0, NONE, DEEP, NF1), // CNVI_GNSS_PA_BLANKING
PAD_CFG_NF(GPP_J1, NONE, DEEP, NF1), // CPU_C10_GATE#
PAD_CFG_NF(GPP_J2, NONE, DEEP, NF1), // CNVI_BRI_DT_R
PAD_CFG_NF(GPP_J3, UP_20K, DEEP, NF1), // CNVI_BRI_RSP
PAD_CFG_NF(GPP_J4, NONE, DEEP, NF1), // CNVI_RGI_DT_R
PAD_CFG_NF(GPP_J5, UP_20K, DEEP, NF1), // CNVI_RGI_RSP
PAD_CFG_NF(GPP_J6, NONE, DEEP, NF1), // CNVI_MFUART2_RXD
PAD_CFG_NF(GPP_J7, NONE, DEEP, NF1), // CNVI_MFUART2_TXD
PAD_CFG_GPI(GPP_J8, NONE, DEEP), // VAL_TEST_SETUP_MENU
PAD_CFG_GPO(GPP_J9, 0, DEEP),
PAD_CFG_GPO(GPP_J10, 0, DEEP),
PAD_CFG_GPO(GPP_J11, 0, DEEP),
/* ------- GPIO Group GPP_K ------- */
PAD_CFG_GPO(GPP_K0, 0, DEEP),
PAD_CFG_GPO(GPP_K1, 0, DEEP),
PAD_CFG_GPO(GPP_K2, 0, DEEP),
PAD_CFG_GPO(GPP_K3, 0, DEEP),
PAD_CFG_GPO(GPP_K4, 0, DEEP),
PAD_CFG_GPO(GPP_K5, 0, DEEP),
PAD_CFG_NF(GPP_K6, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_K7, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_K8, NONE, DEEP, NF1), // GPP_K_8_CORE_VID_0
PAD_CFG_NF(GPP_K9, NONE, DEEP, NF1), // GPP_K_9_CORE_VID_1
PAD_CFG_NF(GPP_K10, NONE, DEEP, NF2),
PAD_CFG_GPO(GPP_K11, 0, DEEP),
/* ------- GPIO Group GPP_R ------- */
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF1), // HDA_BITCLK
PAD_CFG_NF(GPP_R1, NATIVE, DEEP, NF1), // HDA_SYNC
PAD_CFG_NF(GPP_R2, NATIVE, DEEP, NF1), // HDA_SDOUT
PAD_CFG_NF(GPP_R3, NATIVE, DEEP, NF1), // HDA_SDIN0
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF1), // HDA_RST#
PAD_CFG_GPO(GPP_R5, 0, DEEP),
PAD_CFG_GPO(GPP_R6, 0, DEEP),
PAD_CFG_GPO(GPP_R7, 0, DEEP),
PAD_CFG_GPI(GPP_R8, NONE, DEEP), // DGPU_PWRGD
PAD_CFG_NF(GPP_R9, NONE, DEEP, NF1), // EDP_HPD
PAD_CFG_GPO(GPP_R10, 0, DEEP),
PAD_CFG_GPO(GPP_R11, 0, DEEP),
PAD_CFG_GPO(GPP_R12, 0, DEEP),
PAD_CFG_GPO(GPP_R13, 0, DEEP),
PAD_CFG_GPO(GPP_R14, 0, DEEP),
PAD_CFG_GPO(GPP_R15, 0, DEEP),
// GPP_R16 (DGPU_RST#_PCH) configured in bootblock
PAD_CFG_GPO(GPP_R17, 0, DEEP),
PAD_CFG_GPO(GPP_R18, 0, DEEP),
PAD_CFG_GPO(GPP_R19, 0, DEEP),
PAD_CFG_GPO(GPP_R20, 0, DEEP),
PAD_CFG_GPO(GPP_R21, 0, DEEP),
/* ------- GPIO Group GPP_S ------- */
PAD_CFG_GPO(GPP_S0, 0, DEEP),
PAD_CFG_GPO(GPP_S1, 0, DEEP),
PAD_CFG_GPO(GPP_S2, 0, DEEP),
PAD_CFG_GPO(GPP_S3, 0, DEEP),
PAD_CFG_GPO(GPP_S4, 0, DEEP), // GPPS_DMIC_CLK
PAD_CFG_GPO(GPP_S5, 0, DEEP), // GPPS_DMIC_DATA
PAD_CFG_GPO(GPP_S6, 0, DEEP),
PAD_CFG_GPO(GPP_S7, 0, DEEP),
};
void mainboard_configure_gpios(void)
{
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config early_gpio_table[] = {
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), // UART2_RXD
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), // UART2_TXD
PAD_CFG_GPO(GPP_F22, 0, DEEP), // DGPU_PWR_EN
PAD_CFG_GPO(GPP_R16, 0, DEEP), // DGPU_RST#_PCH
};
void mainboard_configure_early_gpios(void)
{
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@@ -0,0 +1,263 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC1220 */
0x10ec1220, /* Vendor ID */
0x15583702, /* Subsystem ID */
243, /* Number of entries */
0x02050008, 0x020480cb, 0x02050008, 0x0204c0cb,
AZALIA_SUBVENDOR(0, 0x15583702),
AZALIA_RESET(1),
AZALIA_PIN_CFG(0, 0x12, 0x90a60130),
AZALIA_PIN_CFG(0, 0x14, 0x0421101f),
AZALIA_PIN_CFG(0, 0x15, 0x40000000),
AZALIA_PIN_CFG(0, 0x16, 0x411111f0),
AZALIA_PIN_CFG(0, 0x17, 0x411111f0),
AZALIA_PIN_CFG(0, 0x18, 0x04a11040),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1b, 0x90170110),
AZALIA_PIN_CFG(0, 0x1d, 0x40b7952d),
AZALIA_PIN_CFG(0, 0x1e, 0x04451150),
// ALC1318 smart amp
0x05b50000, 0x05b43530, 0x05750002, 0x05741400,
0x02050058, 0x02048ed1, 0x02050063, 0x0204e430,
0x02050016, 0x02048020, 0x02050016, 0x02048020,
0x02050043, 0x02043005, 0x02050058, 0x02048ed1,
0x02050063, 0x0204e430, 0x05b50000, 0x05b43530,
0x05750002, 0x05741400, 0x05b5000a, 0x05b45520,
0x02050042, 0x020486cb, 0x0143b000, 0x01470700,
0x02050036, 0x02042a6a, 0x02050008, 0x0204800b,
0x02050007, 0x020403c3, 0x01470c02, 0x01470c02,
0x00c37100, 0x01b3b000, 0x01b70700, 0x00b37417,
0x0205001b, 0x02044002, 0x0205001b, 0x02044002,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c000, 0x0205002b, 0x02040001,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f20d,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f212, 0x0205002b, 0x0204003e,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c001,
0x0205002b, 0x02040002, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c003, 0x0205002b, 0x02040022,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c004,
0x0205002b, 0x02040044, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c005, 0x0205002b, 0x02040044,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c007,
0x0205002b, 0x02040064, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c00e, 0x0205002b, 0x020400e7,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f223,
0x0205002b, 0x0204007f, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f224, 0x0205002b, 0x020400db,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f225,
0x0205002b, 0x020400ee, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f226, 0x0205002b, 0x0204003f,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f227,
0x0205002b, 0x0204000f, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f21a, 0x0205002b, 0x02040078,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f242,
0x0205002b, 0x0204003c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c120, 0x0205002b, 0x02040040,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c125,
0x0205002b, 0x02040003, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c321, 0x0205002b, 0x0204000b,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c200,
0x0205002b, 0x020400d8, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c201, 0x0205002b, 0x02040027,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c202,
0x0205002b, 0x0204000f, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c400, 0x0205002b, 0x0204000e,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c401,
0x0205002b, 0x02040043, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c402, 0x0205002b, 0x020400e0,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c403,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c404, 0x0205002b, 0x0204004c,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c406,
0x0205002b, 0x02040040, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c407, 0x0205002b, 0x02040002,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c408,
0x0205002b, 0x0204003f, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c300, 0x0205002b, 0x02040001,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c125,
0x0205002b, 0x02040003, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204df00, 0x0205002b, 0x02040010,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204df5f,
0x0205002b, 0x02040001, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204df60, 0x0205002b, 0x020400a7,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204ea00,
0x0205002b, 0x02040047, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c203, 0x0205002b, 0x02040004,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c206,
0x0205002b, 0x02040078, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f102, 0x0205002b, 0x02040000,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f103,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f104, 0x0205002b, 0x020400f4,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f105,
0x0205002b, 0x02040003, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f109, 0x0205002b, 0x020400e0,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f10a,
0x0205002b, 0x0204000b, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f10b, 0x0205002b, 0x0204004c,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f10b,
0x0205002b, 0x0204005c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f102, 0x0205002b, 0x02040000,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f103,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f104, 0x0205002b, 0x020400f4,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f105,
0x0205002b, 0x02040004, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f109, 0x0205002b, 0x02040065,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f10a,
0x0205002b, 0x0204000b, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f10b, 0x0205002b, 0x0204004c,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f10b,
0x0205002b, 0x0204005c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204e706, 0x0205002b, 0x0204000f,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204e707,
0x0205002b, 0x02040030, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204e806, 0x0205002b, 0x0204000f,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204e807,
0x0205002b, 0x02040030, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204ce04, 0x0205002b, 0x02040002,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204ce05,
0x0205002b, 0x02040087, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204ce06, 0x0205002b, 0x020400a2,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204ce07,
0x0205002b, 0x0204006c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204cf04, 0x0205002b, 0x02040002,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204cf05,
0x0205002b, 0x02040087, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204cf06, 0x0205002b, 0x020400a2,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204cf07,
0x0205002b, 0x0204006c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204ce60, 0x0205002b, 0x020400e3,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c130,
0x0205002b, 0x02040051, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204e000, 0x0205002b, 0x020400a8,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f102,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f103, 0x0205002b, 0x02040000,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f104,
0x0205002b, 0x020400f5, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f105, 0x0205002b, 0x02040023,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f109,
0x0205002b, 0x02040004, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f10a, 0x0205002b, 0x0204000b,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f10b,
0x0205002b, 0x0204004c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f10b, 0x0205002b, 0x0204005c,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02044100, 0x02050029, 0x02041888,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c121, 0x0205002b, 0x0204000b,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f102,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f103, 0x0205002b, 0x02040000,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f104,
0x0205002b, 0x020400f5, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f105, 0x0205002b, 0x02040023,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f109,
0x0205002b, 0x02040000, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f10a, 0x0205002b, 0x0204000b,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204f10b,
0x0205002b, 0x0204004c, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204f10b, 0x0205002b, 0x0204005c,
0x0205002c, 0x0204b423,
// XXX: Duplicate last 2 u32s to keep in 4-dword blocks
0x0205002c, 0x0204b423,
};
const u32 pc_beep_verbs[] = {};
AZALIA_ARRAY_SIZES;

View File

@@ -0,0 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef VARIANT_GPIO_H
#define VARIANT_GPIO_H
#include <soc/gpio.h>
#define DGPU_RST_N GPP_R16
#define DGPU_PWR_EN GPP_F22
#define DGPU_GC6 GPP_F8
#define DGPU_SSID 0x37021558
#endif

View File

@@ -0,0 +1,111 @@
chip soc/intel/alderlake
# Support 5600 MT/s memory
register "max_dram_speed_mts" = "5600"
device domain 0 on
subsystemid 0x1558 0x3702 inherit
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A 3.2 Gen 2 (Left, Front)
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A 3.2 Gen 2 (Left, Rear)
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Per-key RGB
# Port reset messaging cannot be used, so do not use USB2_PORT_TYPE_C for these
register "usb2_ports[8]" = "USB2_PORT_MID(OC_SKIP)" # Type-C Thunderbolt (Right, Front)
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Type-C Thunderbolt with PD (Right, Rear)
register "usb2_ports[13]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A 3.2 Gen 2 (Left, Front)
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A 3.2 Gen 2 (Left, Rear)
end
device ref i2c0 on
# Touchpad I2C bus
register "serial_io_i2c_mode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
chip drivers/i2c/hid
register "generic.hid" = ""ELAN0412""
register "generic.desc" = ""ELAN Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_E7)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end
end
chip drivers/i2c/hid
register "generic.hid" = ""FTCS1000""
register "generic.desc" = ""FocalTech Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_E7)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 38 on end
end
end
device ref pcie5_0 on
# CPU PCIe RP#3 x4, CLKOUT 2, CLKREQ 11 (SSD2)
register "cpu_pcie_rp[CPU_RP(2)]" = "{
.clk_src = 2,
.clk_req = 11,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie5_1 on
# CPU PCIe RP#2 x8, Clock 14 (DGPU)
register "cpu_pcie_rp[CPU_RP(3)]" = "{
.clk_src = 14,
.clk_req = 14,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie4_0 on
# CPU PCIe RP#1 x4, Clock 12 (SSD3)
register "cpu_pcie_rp[CPU_RP(1)]" = "{
.clk_src = 12,
.clk_req = 12,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp7 on
# PCH RP#7 x1, Clock 13 (GLAN)
register "pch_pcie_rp[PCH_RP(7)]" = "{
.clk_src = 13,
.clk_req = 13,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
device pci 00.0 on end
end
device ref pcie_rp8 on
# PCH RP#8 x1, Clock 9 (WLAN)
register "pch_pcie_rp[PCH_RP(8)]" = "{
.clk_src = 9,
.clk_req = 9,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp9 on
# PCH RP#9 x4, Clock 15 (TBT)
register "pch_pcie_rp[PCH_RP(9)]" = "{
.clk_src = 15,
.clk_req = 15,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR,
}"
chip drivers/intel/dtbt
device pci 00.0 on end
end
end
device ref pcie_rp21 on
# PCH RP#21 x4, Clock 10 (SSD1)
register "pch_pcie_rp[PCH_RP(21)]" = "{
.clk_src = 10,
.clk_req = 10,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
end
end

View File

@@ -0,0 +1,43 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <drivers/gfx/nvidia/gpu.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
#include <variant/gpio.h>
void mainboard_memory_init_params(FSPM_UPD *mupd)
{
const struct mb_cfg board_cfg = {
.type = MEM_TYPE_DDR5,
.ect = true,
.LpDdrDqDqsReTraining = 1,
.ddr_config = {
.dq_pins_interleaved = true,
},
};
const struct mem_spd spd_info = {
.topo = MEM_TOPO_DIMM_MODULE,
.smbus = {
[0] = { .addr_dimm[0] = 0x50, },
[1] = { .addr_dimm[0] = 0x52, },
},
};
const bool half_populated = false;
const struct nvidia_gpu_config config = {
.power_gpio = DGPU_PWR_EN,
.reset_gpio = DGPU_RST_N,
.enable = true,
};
// Enable dGPU power
nvidia_set_power(&config);
// Set primary display to internal graphics
mupd->FspmConfig.PrimaryDisplay = 0;
mupd->FspmConfig.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
}

View File

@@ -0,0 +1,12 @@
FLASH 32M {
SI_DESC 4K
SI_ME 4824K
SI_BIOS@16M 16M {
RW_MRC_CACHE 64K
SMMSTORE(PRESERVE) 256K
WP_RO {
FMAP 4K
COREBOOT(CBFS)
}
}
}

View File

@@ -0,0 +1,2 @@
Board name: darp9
Release year: 2023

Binary file not shown.

View File

@@ -0,0 +1,227 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config gpio_table[] = {
/* ------- GPIO Group GPD ------- */
PAD_CFG_NF(GPD0, UP_20K, PWROK, NF1), // PM_BATLOW#
PAD_CFG_NF(GPD1, NATIVE, PWROK, NF1), // AC_PRESENT
PAD_CFG_NF(GPD2, NATIVE, PWROK, NF1), // LAN_WAKE#
PAD_CFG_NF(GPD3, UP_20K, PWROK, NF1), // PWR_BTN#
PAD_CFG_NF(GPD4, NONE, PWROK, NF1), // SUSB#_PCH
PAD_CFG_NF(GPD5, NONE, PWROK, NF1), // SUSC#_PCH
PAD_CFG_NF(GPD6, NONE, PWROK, NF1), // SLP_A#
PAD_NC(GPD7, NONE),
PAD_CFG_NF(GPD8, NONE, PWROK, NF1), // SUS_CLK
PAD_CFG_GPO(GPD9, 0, PWROK), // SLP_WLAN#
PAD_CFG_NF(GPD10, NONE, PWROK, NF1), // SLP_S5#
PAD_CFG_NF(GPD11, NONE, PWROK, NF1), // LAN_DISABLE#
/* ------- GPIO Group GPP_A ------- */
PAD_CFG_NF(GPP_A0, UP_20K, DEEP, NF1), // ESPI_IO0_EC
PAD_CFG_NF(GPP_A1, UP_20K, DEEP, NF1), // ESPI_IO1_EC
PAD_CFG_NF(GPP_A2, UP_20K, DEEP, NF1), // ESPI_IO2_EC
PAD_CFG_NF(GPP_A3, UP_20K, DEEP, NF1), // ESPI_IO3_EC
PAD_CFG_NF(GPP_A4, UP_20K, DEEP, NF1), // ESPI_CS_EC#
PAD_CFG_NF(GPP_A5, UP_20K, DEEP, NF1), // ESPI_ALRT0#
PAD_NC(GPP_A6, NONE),
PAD_NC(GPP_A7, NONE), // SATAGP0_PCIE_SSD2
PAD_CFG_GPO(GPP_A8, 1, PLTRST), // GPIO_LANRTD3
PAD_CFG_NF(GPP_A9, DN_20K, DEEP, NF1), // ESPI_CLK_EC
PAD_CFG_NF(GPP_A10, NONE, DEEP, NF1), // ESPI_RESET_N
PAD_NC(GPP_A11, NONE),
PAD_NC(GPP_A12, NONE), // SATAGP1_SATA_SSD1
PAD_CFG_GPO(GPP_A13, 1, PLTRST), // BT_EN
PAD_NC(GPP_A14, NONE),
PAD_NC(GPP_A15, NONE),
// GPP_A16 missing
PAD_NC(GPP_A17, NONE),
PAD_CFG_NF(GPP_A18, NONE, DEEP, NF1), // HDMI_HPD
PAD_NC(GPP_A19, NONE),
PAD_NC(GPP_A20, NONE),
PAD_NC(GPP_A21, NONE), // SSD1_PCIE_WAKE#
PAD_NC(GPP_A22, NONE), // SSD2_PCIE_WAKE#
PAD_NC(GPP_A23, NONE),
/* ------- GPIO Group GPP_B ------- */
PAD_CFG_NF(GPP_B0, NONE, DEEP, NF1), // VCCIN_AUX_VID0
PAD_CFG_NF(GPP_B1, NONE, DEEP, NF1), // VCCIN_AUX_VID1
PAD_NC(GPP_B2, NONE),
PAD_CFG_GPO(GPP_B3, 0, DEEP), // SCI#
PAD_CFG_GPO(GPP_B4, 0, DEEP), // SWI#
PAD_NC(GPP_B5, NONE),
PAD_NC(GPP_B6, NONE),
PAD_NC(GPP_B7, NONE),
PAD_NC(GPP_B8, NONE),
// GPP_B9 missing
// GPP_B10 missing
PAD_CFG_NF(GPP_B11, NONE, PWROK, NF1), // TBTA-PCH_I2C_INT
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), // SLP_S0#
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), // PLT_RST#
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1), // Top swap override
PAD_NC(GPP_B15, NONE),
PAD_CFG_GPO(GPP_B16, 1, PLTRST), // M2_SSD1_RST#
PAD_CFG_GPO(GPP_B17, 1, PLTRST), // WLAN_RST#_R
PAD_NC(GPP_B18, NONE), // NO REBOOT strap
// GPP_B19 missing
// GPP_B20 missing
// GPP_B21 missing
// GPP_B22 missing
PAD_NC(GPP_B23, NONE),
/* ------- GPIO Group GPP_C ------- */
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), // SMB_CLK_DDR; XXX: NC?
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), // SMB_DAT_DDR; XXX: NC?
PAD_CFG_GPO(GPP_C2, 1, PLTRST),
PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1), // SML0_CLK_R
PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1), // SML0_DATA_R
PAD_NC(GPP_C5, NONE),
PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1), // TBT-PCH_I2C_SCL
PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1), // TBT-PCH_I2C_SDA
// GPP_C8 missing
// GPP_C9 missing
// GPP_C10 missing
// GPP_C11 missing
// GPP_C12 missing
// GPP_C13 missing
// GPP_C14 missing
// GPP_C15 missing
// GPP_C16 missing
// GPP_C17 missing
// GPP_C18 missing
// GPP_C19 missing
// GPP_C20 missing
// GPP_C21 missing
// GPP_C22 missing
// GPP_C23 missing
/* ------- GPIO Group GPP_D ------- */
PAD_CFG_GPO(GPP_D0, 1, DEEP), // SB_BLON
PAD_CFG_GPI(GPP_D1, NONE, DEEP), // SB_KBCRST#
PAD_CFG_GPO(GPP_D2, 0, DEEP), // ROM_I2C_EN
PAD_NC(GPP_D3, NONE),
PAD_CFG_GPO(GPP_D4, 1, DEEP), // GPIO_LAN_EN
// GPP_D5 (SSD2_CLKREQ#) configured by FSP
PAD_CFG_GPO(GPP_D6, 1, DEEP), // LAN_PLT_RST#
// GPP_D7 (WLAN_CLKREQ#) configured by FSP
PAD_NC(GPP_D8, NONE),
PAD_NC(GPP_D9, NONE),
PAD_NC(GPP_D10, NONE),
PAD_NC(GPP_D11, NONE),
PAD_NC(GPP_D12, NONE),
PAD_CFG_GPI(GPP_D13, NONE, DEEP), // WLAN_WAKEUP#
PAD_CFG_GPO(GPP_D14, 1, PLTRST), // SSD2_PWR_EN
PAD_CFG_GPO(GPP_D15, 1, DEEP), // GPP_D2_SDCARD_RST#
PAD_CFG_GPO(GPP_D16, 1, DEEP), // SSD1_PWR_EN
PAD_NC(GPP_D17, NONE),
PAD_NC(GPP_D18, NONE),
PAD_CFG_GPI(GPP_D19, NONE, DEEP), // SATA_LED#
/* ------- GPIO Group GPP_E ------- */
PAD_CFG_GPI(GPP_E0, NONE, DEEP), // CNVI_WAKE#
_PAD_CFG_STRUCT(GPP_E1, 0x40100100, 0x3000), // TPM_PIRQ#
PAD_NC(GPP_E2, NONE),
PAD_CFG_GPO(GPP_E3, 1, PLTRST), // GPP_E3_WLAN_EN
// GPP_E4 missing
// GPP_E5 missing
PAD_NC(GPP_E6, NONE),
PAD_CFG_GPO(GPP_E7, 0, DEEP), // SMI#
PAD_CFG_GPI(GPP_E8, NONE, DEEP), // SLP_DRAM#
// GPP_E9 missing
PAD_NC(GPP_E10, NONE),
PAD_NC(GPP_E11, NONE),
PAD_CFG_GPI_INT(GPP_E12, NONE, PLTRST, LEVEL), // TP_ATTN#
PAD_NC(GPP_E13, NONE),
PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1), // EDP_HPD
PAD_NC(GPP_E15, NONE),
PAD_CFG_GPI(GPP_E16, NONE, DEEP), // SDCARD_WAKE#
PAD_NC(GPP_E17, NONE),
// GPP_E18 (TBT_LSX0_TXD) configured by FSP
// GPP_E19 (TBT_LSX0_RXD) configured by FSP
PAD_NC(GPP_E20, NONE),
PAD_NC(GPP_E21, NONE),
PAD_NC(GPP_E22, NONE),
PAD_NC(GPP_E23, NONE),
/* ------- GPIO Group GPP_F ------- */
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1), // CNVI_BRI_DT
PAD_CFG_NF(GPP_F1, UP_20K, DEEP, NF1), // CNVI_BRI_RSP
PAD_CFG_NF(GPP_F2, NONE, DEEP, NF1), // CNVI_RGI_DT
PAD_CFG_NF(GPP_F3, UP_20K, DEEP, NF1), // CNVI_RGI_RSP
PAD_CFG_NF(GPP_F4, NONE, DEEP, NF1), // CNVI_RST#
// GPP_F5 (CNVI_CLKREQ) configured by FSP
PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1), // CNVI_GNSS_PA_BLANKING
PAD_NC(GPP_F7, NONE),
// GPP_F8 missing
PAD_NC(GPP_F9, NONE),
PAD_NC(GPP_F10, NONE),
PAD_NC(GPP_F11, NONE), // BOARD_ID3
PAD_NC(GPP_F12, NONE),
PAD_NC(GPP_F13, NONE),
PAD_NC(GPP_F14, NONE), // BOARD_ID1
PAD_NC(GPP_F15, NONE), // BOARD_ID2
PAD_NC(GPP_F16, NONE),
PAD_CFG_GPO(GPP_F17, 1, PLTRST), // GPIO_SDCARD_EN
PAD_CFG_GPO(GPP_F18, 0, DEEP), // CCD_WP#
// GPP_F19 (GLAN_CLKREQ6#) configured by FSP
PAD_CFG_GPO(GPP_F20, 1, PLTRST), // M2_SSD2_RST#
PAD_NC(GPP_F21, NONE),
PAD_NC(GPP_F22, NONE),
PAD_NC(GPP_F23, NONE),
/* ------- GPIO Group GPP_H ------- */
PAD_NC(GPP_H0, NONE),
PAD_NC(GPP_H1, NONE),
PAD_NC(GPP_H2, NONE),
PAD_CFG_GPI(GPP_H3, NONE, DEEP), // TPM_DET
PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), // I2C_SDA_TP
PAD_CFG_NF(GPP_H5, NONE, DEEP, NF1), // I2C_SCL_TP
PAD_CFG_NF(GPP_H6, NONE, DEEP, NF1), // PCH_I2C_SDA
PAD_CFG_NF(GPP_H7, NONE, DEEP, NF1), // PCH_I2C_SCL
PAD_CFG_NF(GPP_H8, NONE, DEEP, NF2), // CNVI_MFUART2_RXD
PAD_CFG_NF(GPP_H9, NONE, DEEP, NF2), // CNVI_MFUART2_TXD
// GPP_H10 (UART0_RX) configured in bootblock
// GPP_H11 (UART0_TX) configured in bootblock
_PAD_CFG_STRUCT(GPP_H12, 0x44001500, 0x0000), // SATA1_DEVSLP1
PAD_NC(GPP_H13, NONE),
// GPP_H14 missing
PAD_CFG_NF(GPP_H15, NONE, DEEP, NF1), // HDMI_CTRLCLK
// GPP_H16 missing
PAD_CFG_NF(GPP_H17, NONE, DEEP, NF1), // HDMI_CTRLDATA
PAD_CFG_NF(GPP_H18, NONE, DEEP, NF1), // CPU_C10_GATE#
// GPP_H19 (SSD1_CLKREQ#) configured by FSP
PAD_CFG_GPI(GPP_H20, NONE, DEEP), // PM_CLKRUN#
PAD_NC(GPP_H21, NONE),
PAD_NC(GPP_H22, NONE),
// GPP_H23 (CARD_CLKREQ#) configured by FSP
/* ------- GPIO Group GPP_R ------- */
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF1), // HDA_BITCLK
PAD_CFG_NF(GPP_R1, NATIVE, DEEP, NF1), // HDA_SYNC
PAD_CFG_NF(GPP_R2, NATIVE, DEEP, NF1), // HDA_SDOUT / ME_WE
PAD_CFG_NF(GPP_R3, NATIVE, DEEP, NF1), // HDA_SDIN0
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF1), // HDA_RST#
PAD_NC(GPP_R5, NONE),
PAD_NC(GPP_R6, NONE),
PAD_NC(GPP_R7, NONE),
/* ------- GPIO Group GPP_S ------- */
PAD_NC(GPP_S0, NONE),
PAD_NC(GPP_S1, NONE),
PAD_NC(GPP_S2, NONE),
PAD_NC(GPP_S3, NONE),
PAD_NC(GPP_S4, NONE),
PAD_NC(GPP_S5, NONE),
PAD_NC(GPP_S6, NONE),
PAD_NC(GPP_S7, NONE),
/* ------- GPIO Group GPP_T ------- */
PAD_NC(GPP_T2, NONE),
PAD_NC(GPP_T3, NONE),
};
void mainboard_configure_gpios(void)
{
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config early_gpio_table[] = {
PAD_CFG_NF(GPP_H10, NONE, DEEP, NF1), // UART0_RX
PAD_CFG_NF(GPP_H11, NONE, DEEP, NF1), // UART0_TX
};
void mainboard_configure_early_gpios(void)
{
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@@ -0,0 +1,33 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC256 */
0x10ec0256, /* Vendor ID */
0x155851b1, /* Subsystem ID */
19, /* Number of entries */
0x0205001a, 0x02048003, 0x0205001a, 0x0204c003,
AZALIA_SUBVENDOR(0, 0x155851b1),
AZALIA_RESET(1),
AZALIA_PIN_CFG(0, 0x12, 0x90a60130),
AZALIA_PIN_CFG(0, 0x13, 0x40000000),
AZALIA_PIN_CFG(0, 0x14, 0x90170110),
AZALIA_PIN_CFG(0, 0x18, 0x411111f0),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x41700001),
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
AZALIA_PIN_CFG(0, 0x21, 0x02211020),
0x02050038, 0x02047901, 0x02050007, 0x02040202,
0x02050008, 0x02046a0e, 0x0205001b, 0x02040a4b,
0x0205003c, 0x02040354, 0x0205003c, 0x02040314,
0x02050046, 0x02040004, 0x05750003, 0x057409a2,
0x02050010, 0x02040020, 0x02050036, 0x02043050,
0x00170503, 0x0143b000, 0x0213b000, 0x02170740,
};
const u32 pc_beep_verbs[] = {};
AZALIA_ARRAY_SIZES;

View File

@@ -0,0 +1,103 @@
chip soc/intel/alderlake
register "s0ix_enable" = "1"
register "power_limits_config[RPL_P_682_482_282_28W_CORE]" = "{
.tdp_pl1_override = 20,
.tdp_pl2_override = 56,
}"
device domain 0 on
subsystemid 0x1558 0x51b1 inherit
device ref pcie4_0 on
# CPU RP#1 x4, Clock 0 (SSD2)
register "cpu_pcie_rp[CPU_RP(1)]" = "{
.clk_src = 0,
.clk_req = 0,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_F20)" # M2_SSD2_RST#
register "srcclk_pin" = "0" # SSD2_CLKREQ#
device generic 0 on end
end
end
device ref pcie4_1 on
# CPU RP#3 x4, Clock 4 (SSD1)
register "cpu_pcie_rp[CPU_RP(3)]" = "{
.clk_src = 4,
.clk_req = 4,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
chip soc/intel/common/block/pcie/rtd3
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_B16)" # M2_SSD1_RST#
register "srcclk_pin" = "4" # SSD1_CLKREQ#
device generic 0 on end
end
end
device ref tbt_pcie_rp0 on end
device ref tcss_xhci on
register "tcss_ports[0]" = "TCSS_PORT_DEFAULT(OC_SKIP)"
end
device ref tcss_dma0 on end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1 (USB-C)
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC2 (Thunderbolt)
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 CH0
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 CH1
end
device ref i2c0 on
# Touchpad I2C bus
register "serial_io_i2c_mode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
chip drivers/i2c/hid
register "generic.hid" = ""ELAN0412""
register "generic.desc" = ""ELAN Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_E12)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end
end
chip drivers/i2c/hid
register "generic.hid" = ""FTCS1000""
register "generic.desc" = ""FocalTech Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_E12)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 38 on end
end
end
device ref sata off end
device ref pcie_rp5 on
# PCIe RP#5 x1, Clock 2 (WLAN)
register "pch_pcie_rp[PCH_RP(5)]" = "{
.clk_src = 2,
.clk_req = 2,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp6 on
# PCIe RP#6 x1, Clock 5 (CARD)
register "pch_pcie_rp[PCH_RP(6)]" = "{
.clk_src = 5,
.clk_req = 5,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp8 on
# PCIe RP#8 x1, Clock 6 (GLAN)
register "pch_pcie_rp[PCH_RP(8)]" = "{
.clk_src = 6,
.clk_req = 6,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
end
end

View File

@@ -0,0 +1,27 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/meminit.h>
#include <soc/romstage.h>
void mainboard_memory_init_params(FSPM_UPD *mupd)
{
const struct mb_cfg board_cfg = {
.type = MEM_TYPE_DDR5,
.ect = true,
.LpDdrDqDqsReTraining = 1,
};
const struct mem_spd spd_info = {
.topo = MEM_TOPO_DIMM_MODULE,
.smbus = {
[0] = { .addr_dimm[0] = 0x50, },
[1] = { .addr_dimm[0] = 0x52, },
},
};
const bool half_populated = false;
mupd->FspmConfig.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
}

View File

@@ -0,0 +1,12 @@
FLASH 32M {
SI_DESC 4K
SI_ME 4824K
SI_BIOS@16M 16M {
RW_MRC_CACHE 64K
SMMSTORE(PRESERVE) 256K
WP_RO {
FMAP 4K
COREBOOT(CBFS)
}
}
}

View File

@@ -0,0 +1,2 @@
Board name: galp7
Release year: 2023

Binary file not shown.

View File

@@ -0,0 +1,227 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config gpio_table[] = {
/* ------- GPIO Group GPD ------- */
PAD_CFG_NF(GPD0, UP_20K, PWROK, NF1), // PM_BATLOW#
PAD_CFG_NF(GPD1, NATIVE, PWROK, NF1), // AC_PRESENT
PAD_NC(GPD2, NONE),
PAD_CFG_NF(GPD3, UP_20K, PWROK, NF1), // PWR_BTN#
PAD_CFG_NF(GPD4, NONE, PWROK, NF1), // SUSB#_PCH
PAD_CFG_NF(GPD5, NONE, PWROK, NF1), // SUSC#_PCH
PAD_CFG_NF(GPD6, NONE, PWROK, NF1), // SLP_A#
PAD_NC(GPD7, NONE),
PAD_CFG_NF(GPD8, NONE, PWROK, NF1), // SUS_CLK
PAD_CFG_NF(GPD9, NONE, DEEP, NF1), // SLP_WLAN#
PAD_CFG_NF(GPD10, NONE, PWROK, NF1), // SLP_S5#
PAD_CFG_NF(GPD11, NONE, PWROK, NF1), // LAN_DISABLE#
/* ------- GPIO Group GPP_A ------- */
PAD_CFG_NF(GPP_A0, UP_20K, DEEP, NF1), // ESPI_IO0_EC
PAD_CFG_NF(GPP_A1, UP_20K, DEEP, NF1), // ESPI_IO1_EC
PAD_CFG_NF(GPP_A2, UP_20K, DEEP, NF1), // ESPI_IO2_EC
PAD_CFG_NF(GPP_A3, UP_20K, DEEP, NF1), // ESPI_IO3_EC
PAD_CFG_NF(GPP_A4, UP_20K, DEEP, NF1), // ESPI_CS_EC#
PAD_CFG_NF(GPP_A5, UP_20K, DEEP, NF1), // ESPI_ALRT0#
PAD_NC(GPP_A6, NONE),
PAD_NC(GPP_A7, NONE),
PAD_NC(GPP_A8, NONE),
PAD_CFG_NF(GPP_A9, DN_20K, DEEP, NF1), // ESPI_CLK_EC
PAD_CFG_NF(GPP_A10, NONE, DEEP, NF1), // ESPI_RESET_N
PAD_NC(GPP_A11, NONE),
PAD_CFG_GPI(GPP_A12, NONE, DEEP), // SATAGP1
PAD_CFG_GPO(GPP_A13, 1, PLTRST), // PCH_BT_EN
// GPP_A14 (DGPU_PWR_EN) configured in bootblock
PAD_CFG_GPI(GPP_A15, NONE, DEEP), // USB_OC2#
PAD_CFG_NF(GPP_A16, NONE, DEEP, NF1), // USB_OC3#
PAD_CFG_GPI_INT(GPP_A17, NONE, PLTRST, LEVEL), // TP_ATTN#
PAD_CFG_NF(GPP_A18, NONE, DEEP, NF1), // HDMI_HPD
PAD_CFG_GPI(GPP_A19, NONE, DEEP), // DGPU_PWRGD_R
PAD_NC(GPP_A20, NONE),
PAD_NC(GPP_A21, NONE),
PAD_CFG_GPO(GPP_A22, 1, PLTRST), // GPIO_LAN_EN
PAD_NC(GPP_A23, NONE),
/* ------- GPIO Group GPP_B ------- */
PAD_CFG_NF(GPP_B0, NONE, DEEP, NF1), // VCCIN_AUX_VID0
PAD_CFG_NF(GPP_B1, NONE, DEEP, NF1), // VCCIN_AUX_VID1
// GPP_B2 (DGPU_RST#_PCH) configured in bootblock
PAD_CFG_GPI(GPP_B3, NONE, DEEP), // SCI#
PAD_CFG_GPI(GPP_B4, NONE, DEEP), // SWI#
PAD_CFG_NF(GPP_B5, NONE, DEEP, NF2), // GPP_B5_I2C2_SDA (Pantone)
PAD_CFG_NF(GPP_B6, NONE, DEEP, NF2), // GPP_B6_I2C2_SCL (Pantone)
PAD_NC(GPP_B7, NONE),
PAD_NC(GPP_B8, NONE),
// GPP_B9 missing
// GPP_B10 missing
PAD_CFG_NF(GPP_B11, NONE, PWROK, NF1), // TBTA-PCH_I2C_INT
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), // SLP_S0#
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), // PLT_RST#
PAD_NC(GPP_B14, NONE), // TOP SWAP OVERRIDE strap
PAD_NC(GPP_B15, NONE),
PAD_NC(GPP_B16, NONE),
PAD_NC(GPP_B17, NONE),
PAD_NC(GPP_B18, NONE), // NO REBOOT strap
// GPP_B19 missing
// GPP_B20 missing
// GPP_B21 missing
// GPP_B22 missing
PAD_NC(GPP_B23, NONE), // CPUNSSC CLOCK FREQ strap
/* ------- GPIO Group GPP_C ------- */
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), // SMB_CLK
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), // SMB_DATA
PAD_NC(GPP_C2, NONE), // TLS CONFIDENTIALITY strap
PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1), // SML0_CLK
PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1), // SML0_DATA
PAD_CFG_GPO(GPP_C5, 1, PLTRST), // GPIO_LANRTD3
PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1), // TBT-PCH_I2C_SCL
PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1), // TBT-PCH_I2C_SDA
// GPP_C8 missing
// GPP_C9 missing
// GPP_C10 missing
// GPP_C11 missing
// GPP_C12 missing
// GPP_C13 missing
// GPP_C14 missing
// GPP_C15 missing
// GPP_C16 missing
// GPP_C17 missing
// GPP_C18 missing
// GPP_C19 missing
// GPP_C20 missing
// GPP_C21 missing
// GPP_C22 missing
// GPP_C23 missing
/* ------- GPIO Group GPP_D ------- */
PAD_CFG_GPO(GPP_D0, 1, DEEP), // SB_BLON
PAD_CFG_GPI(GPP_D1, NONE, DEEP), // SB_KBCRST#
PAD_CFG_GPO(GPP_D2, 0, DEEP), // ROM_I2C_EN
PAD_NC(GPP_D3, NONE),
PAD_NC(GPP_D4, NONE),
// GPP_D5 (SSD1_CLKREQ#) configured by FSP
PAD_NC(GPP_D6, NONE),
// GPP_D7 (WLAN_CLKREQ#) configured by FSP
// GPP_D8 (PEG_CLKREQ#) configured by FSP
PAD_NC(GPP_D9, NONE),
PAD_NC(GPP_D10, NONE), // TBT LSX #2 PINS VCCIO CONFIGURATION strap
PAD_NC(GPP_D11, NONE),
PAD_NC(GPP_D12, NONE), // TBT LSX #3 PINS VCCIO CONFIGURATION strap
PAD_CFG_GPI(GPP_D13, NONE, DEEP), // WLAN_WAKEUP#
PAD_CFG_GPO(GPP_D14, 1, PLTRST), // SSD1_PWR_EN#
PAD_NC(GPP_D15, NONE),
PAD_NC(GPP_D16, NONE),
PAD_NC(GPP_D17, NONE),
PAD_NC(GPP_D18, NONE),
PAD_NC(GPP_D19, NONE),
/* ------- GPIO Group GPP_E ------- */
PAD_CFG_GPI(GPP_E0, NONE, DEEP), // CNVI_WAKE#
_PAD_CFG_STRUCT(GPP_E1, 0x40100100, 0x3000), // TPM_PIRQ#
PAD_NC(GPP_E2, NONE),
PAD_CFG_GPO(GPP_E3, 1, DEEP), // PCH_WLAN_EN
PAD_CFG_GPO(GPP_E4, 0, PLTRST), // TC_RETIMER_FORCE_PWR
PAD_NC(GPP_E5, NONE), // DEVSLP1
PAD_NC(GPP_E6, NONE), // JTAG ODT DISABLE strap
PAD_CFG_GPI(GPP_E7, NONE, DEEP), // SMI#
PAD_CFG_GPI(GPP_E8, NONE, DEEP), // SLP_DRAM#
PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1), // USB_OC0#
PAD_NC(GPP_E10, NONE), // strap
PAD_NC(GPP_E11, NONE), // strap
PAD_NC(GPP_E12, NONE),
PAD_NC(GPP_E13, NONE), // BOARD_ID4
PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1), // EDP_HPD
PAD_NC(GPP_E15, NONE),
PAD_NC(GPP_E16, NONE),
PAD_NC(GPP_E17, NONE), // BOARD_ID5
// GPP_E18 (TBT_LSX0_TXD) configured by FSP
// GPP_E19 (TBT_LSX0_RXD) configured by FSP
PAD_NC(GPP_E20, NONE),
PAD_NC(GPP_E21, NONE), // TBT LSX #1 PINS VCCIO CONFIGURATION strap
PAD_NC(GPP_E22, NONE),
PAD_NC(GPP_E23, NONE),
/* ------- GPIO Group GPP_F ------- */
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1), // CNVI_BRI_DT
PAD_CFG_NF(GPP_F1, UP_20K, DEEP, NF1), // CNVI_BRI_RSP
PAD_CFG_NF(GPP_F2, NONE, DEEP, NF1), // CNVI_RGI_DT
PAD_CFG_NF(GPP_F3, UP_20K, DEEP, NF1), // CNVI_RGI_RSP
PAD_CFG_NF(GPP_F4, NONE, DEEP, NF1), // CNVI_RST#
// GPP_F5 (CNVI_CLKREQ) configured by FSP
PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1), // CNVI_GNSS_PA_BLANKING
PAD_CFG_GPO(GPP_F7, 1, DEEP), // LAN_PLT_RST#
// GPP_F8 missing
PAD_NC(GPP_F9, NONE),
PAD_CFG_GPO(GPP_F10, 1, DEEP), // GPIO_CARD_PLT_RST#
PAD_NC(GPP_F11, NONE), // BOARD_ID3
PAD_CFG_GPI(GPP_F12, NONE, PLTRST), // GPIO4_GC6_NVVDD_EN_R
PAD_CFG_GPI(GPP_F13, NONE, PLTRST), // GC6_FB_EN_PCH
PAD_NC(GPP_F14, NONE), // BOARD_ID1
PAD_NC(GPP_F15, NONE), // BOARD_ID2
PAD_CFG_GPO(GPP_F16, 1, DEEP), // GPU_EVENT#
PAD_NC(GPP_F17, NONE), // GPIO_CARD_PWR
PAD_CFG_GPO(GPP_F18, 0, DEEP), // dGPU_OVRM
// GPP_F19 (LAN_CLKREQ#) configured by FSP
PAD_CFG_GPO(GPP_F20, 1, PLTRST), // M2_SSD1_RST#
PAD_NC(GPP_F21, NONE),
PAD_NC(GPP_F22, NONE),
PAD_NC(GPP_F23, NONE),
/* ------- GPIO Group GPP_H ------- */
PAD_NC(GPP_H0, NONE),
PAD_NC(GPP_H1, NONE),
PAD_NC(GPP_H2, NONE),
PAD_CFG_GPI(GPP_H3, NONE, DEEP), // TPM_DET
PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), // T_SDA (Touchpad)
PAD_CFG_NF(GPP_H5, NONE, DEEP, NF1), // T_SCL (Touchpad)
PAD_CFG_NF(GPP_H6, NONE, DEEP, NF1), // PCH_I2C_SDA (TBT)
PAD_CFG_NF(GPP_H7, NONE, DEEP, NF1), // PCH_I2C_SCL (TBT)
PAD_CFG_NF(GPP_H8, NONE, DEEP, NF2), // CNVI_MFUART2_RXD
PAD_CFG_NF(GPP_H9, NONE, DEEP, NF2), // CNVI_MFUART2_TXD
// GPP_H10 (UART0_RX) configured in bootblock
// GPP_H11 (UART0_TX) configured in bootblock
PAD_NC(GPP_H12, NONE),
PAD_NC(GPP_H13, NONE),
// GPP_H14 missing
PAD_CFG_NF(GPP_H15, NONE, DEEP, NF1), // HDMI_CTRLCLK
// GPP_H16 missing
PAD_CFG_NF(GPP_H17, NONE, DEEP, NF1), // HDMI_CTRLDATA
PAD_CFG_NF(GPP_H18, NONE, DEEP, NF1), // CPU_C10_GATE#
PAD_NC(GPP_H19, NONE),
PAD_CFG_GPI(GPP_H20, NONE, DEEP), // PM_CLKRUN#
PAD_NC(GPP_H21, NONE),
PAD_NC(GPP_H22, NONE),
// GPP_H23 (CARD_CLKREQ#) configured by FSP
/* ------- GPIO Group GPP_R ------- */
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF1), // HDA_BITCLK
PAD_CFG_NF(GPP_R1, NATIVE, DEEP, NF1), // HDA_SYNC
PAD_CFG_NF(GPP_R2, NATIVE, DEEP, NF1), // HDA_SDOUT / ME_WE
PAD_CFG_NF(GPP_R3, NATIVE, DEEP, NF1), // HDA_SDIN0
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF1), // AZ_RST#_R
PAD_NC(GPP_R5, NONE),
PAD_NC(GPP_R6, NONE),
PAD_NC(GPP_R7, NONE),
/* ------- GPIO Group GPP_S ------- */
PAD_NC(GPP_S0, NONE),
PAD_NC(GPP_S1, NONE),
PAD_NC(GPP_S2, NONE),
PAD_NC(GPP_S3, NONE),
PAD_NC(GPP_S4, NONE),
PAD_NC(GPP_S5, NONE),
PAD_NC(GPP_S6, NONE),
PAD_NC(GPP_S7, NONE),
/* ------- GPIO Group GPP_T ------- */
PAD_NC(GPP_T2, NONE),
PAD_NC(GPP_T3, NONE),
};
void mainboard_configure_gpios(void)
{
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config early_gpio_table[] = {
PAD_CFG_GPO(GPP_A14, 0, DEEP), // DGPU_PWR_EN
PAD_CFG_GPO(GPP_B2, 0, DEEP), // DGPU_RST#_PCH
PAD_CFG_NF(GPP_H10, NONE, DEEP, NF1), // UART0_RX
PAD_CFG_NF(GPP_H11, NONE, DEEP, NF1), // UART0_TX
};
void mainboard_configure_early_gpios(void)
{
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@@ -0,0 +1,26 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC256 */
0x10ec0256, /* Vendor ID */
0x15584041, /* Subsystem ID */
12, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x15584041),
AZALIA_RESET(1),
AZALIA_PIN_CFG(0, 0x12, 0x90a60130),
AZALIA_PIN_CFG(0, 0x13, 0x40000000),
AZALIA_PIN_CFG(0, 0x14, 0x90170110),
AZALIA_PIN_CFG(0, 0x18, 0x411111f0),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x41700001),
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
AZALIA_PIN_CFG(0, 0x21, 0x02211020),
};
const u32 pc_beep_verbs[] = {};
AZALIA_ARRAY_SIZES;

View File

@@ -0,0 +1,83 @@
chip soc/intel/alderlake
register "power_limits_config[RPL_P_682_642_482_45W_CORE]" = "{
.tdp_pl1_override = 45,
.tdp_pl2_override = 78,
}"
device domain 0 on
subsystemid 0x1558 0x4041 inherit
device ref pcie4_0 on
# PCIe PEG0 x4, Clock 0 (SSD1)
register "cpu_pcie_rp[CPU_RP(1)]" = "{
.clk_src = 0,
.clk_req = 0,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref tbt_pcie_rp0 on end
device ref tcss_xhci on
register "tcss_ports[0]" = "TCSS_PORT_DEFAULT(OC_SKIP)"
end
device ref tcss_dma0 on end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # J_USB3_2 (USB 3.2 Gen1)
register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1 (USB 3.2 Gen2)
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # J_USB3_1 (USB 3.2 Gen1)
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC2 (Thunerbolt)
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB3_2 (USB 3.2 Gen1)
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB3_1 (USB 3.2 Gen1)
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 (USB 3.2 Gen2)
end
device ref i2c0 on
# Touchpad I2C bus
register "serial_io_i2c_mode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
chip drivers/i2c/hid
register "generic.hid" = ""ELAN0412""
register "generic.desc" = ""ELAN Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A17)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end
end
chip drivers/i2c/hid
register "generic.hid" = ""FTCS1000""
register "generic.desc" = ""FocalTech Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_A17)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 38 on end
end
end
device ref sata off end
device ref pcie_rp5 on
# PCIe RP#5 x1, Clock 2 (WLAN)
register "pch_pcie_rp[PCH_RP(5)]" = "{
.clk_src = 2,
.clk_req = 2,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp9 on
# PCIe RP#9 x1, Clock 5 (CARD)
register "pch_pcie_rp[PCH_RP(9)]" = "{
.clk_src = 5,
.clk_req = 5,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp10 on
# PCIe RP#10 x1, Clock 6 (GLAN)
register "pch_pcie_rp[PCH_RP(10)]" = "{
.clk_src = 6,
.clk_req = 6,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
end
end

View File

@@ -0,0 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/meminit.h>
#include <soc/romstage.h>
void mainboard_memory_init_params(FSPM_UPD *mupd)
{
const struct mb_cfg board_cfg = {
.type = MEM_TYPE_DDR4,
};
const struct mem_spd spd_info = {
.topo = MEM_TOPO_DIMM_MODULE,
.smbus = {
[0] = { .addr_dimm[0] = 0x50, },
[1] = { .addr_dimm[0] = 0x52, },
},
};
const bool half_populated = false;
mupd->FspmConfig.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
}

View File

@@ -0,0 +1,12 @@
FLASH 32M {
SI_DESC 4K
SI_ME 4824K
SI_BIOS@16M 16M {
RW_MRC_CACHE 64K
SMMSTORE(PRESERVE) 256K
WP_RO {
FMAP 4K
COREBOOT(CBFS)
}
}
}

View File

@@ -0,0 +1,2 @@
Board name: lemp12
Release year: 2023

Binary file not shown.

View File

@@ -0,0 +1,227 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config gpio_table[] = {
/* ------- GPIO Group GPD ------- */
PAD_CFG_NF(GPD0, UP_20K, PWROK, NF1), // PM_BATLOW#
PAD_CFG_NF(GPD1, NATIVE, PWROK, NF1), // AC_PRESENT
PAD_NC(GPD2, NONE),
PAD_CFG_NF(GPD3, UP_20K, PWROK, NF1), // PWR_BTN#
PAD_CFG_NF(GPD4, NONE, PWROK, NF1), // SUSB#_PCH
PAD_CFG_NF(GPD5, NONE, PWROK, NF1), // SUSC#_PCH
PAD_CFG_NF(GPD6, NONE, PWROK, NF1), // SLP_A#
PAD_CFG_GPI(GPD7, NONE, PWROK), // GPD7_REST
PAD_CFG_NF(GPD8, NONE, PWROK, NF1), // SUS_CLK
PAD_CFG_GPO(GPD9, 0, PWROK), // SLP_WLAN#
PAD_CFG_NF(GPD10, NONE, PWROK, NF1), // SLP_S5#
PAD_NC(GPD11, NONE),
/* ------- GPIO Group GPP_A ------- */
PAD_CFG_NF(GPP_A0, UP_20K, DEEP, NF1), // ESPI_IO0_EC
PAD_CFG_NF(GPP_A1, UP_20K, DEEP, NF1), // ESPI_IO1_EC
PAD_CFG_NF(GPP_A2, UP_20K, DEEP, NF1), // ESPI_IO2_EC
PAD_CFG_NF(GPP_A3, UP_20K, DEEP, NF1), // ESPI_IO3_EC
PAD_CFG_NF(GPP_A4, UP_20K, DEEP, NF1), // ESPI_CS_EC#
PAD_CFG_NF(GPP_A5, UP_20K, DEEP, NF1), // ESPI_ALRT0#
PAD_NC(GPP_A6, NONE),
PAD_NC(GPP_A7, NONE),
PAD_NC(GPP_A8, NONE),
PAD_CFG_NF(GPP_A9, DN_20K, DEEP, NF1), // ESPI_CLK_EC
PAD_CFG_NF(GPP_A10, NONE, DEEP, NF1), // ESPI_RESET#
PAD_NC(GPP_A11, NONE),
PAD_CFG_NF(GPP_A12, UP_20K, DEEP, NF1), // SATAGP1
PAD_CFG_GPO(GPP_A13, 1, PLTRST), // PCH_BT_EN
PAD_NC(GPP_A14, NONE),
PAD_NC(GPP_A15, NONE),
PAD_CFG_NF(GPP_A16, NONE, DEEP, NF1), // USB_OC3#
PAD_NC(GPP_A17, NONE),
PAD_CFG_NF(GPP_A18, NONE, DEEP, NF1), // HDMI_HPD
PAD_NC(GPP_A19, NONE),
PAD_NC(GPP_A20, NONE),
PAD_NC(GPP_A21, NONE),
PAD_CFG_GPI(GPP_A22, NONE, DEEP), // SSD2_PCIE_WAKE#
PAD_NC(GPP_A23, NONE),
/* ------- GPIO Group GPP_B ------- */
PAD_CFG_NF(GPP_B0, NONE, DEEP, NF1), // VCCIN_AUX_VID0
PAD_CFG_NF(GPP_B1, NONE, DEEP, NF1), // VCCIN_AUX_VID1
PAD_CFG_NF(GPP_B2, NONE, DEEP, NF1), // VRALERT#
PAD_CFG_GPI(GPP_B3, NONE, DEEP), // SCI#
PAD_CFG_GPI(GPP_B4, NONE, DEEP), // SWI#
PAD_NC(GPP_B5, NONE),
PAD_NC(GPP_B6, NONE),
PAD_NC(GPP_B7, NONE),
PAD_NC(GPP_B8, NONE),
// GPP_B9 missing
// GPP_B10 missing
PAD_CFG_NF(GPP_B11, NONE, PWROK, NF1), // TBT_I2C_INT
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), // SLP_S0#
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), // PLT_RST#
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1), // Top swap override
PAD_NC(GPP_B15, NONE),
PAD_NC(GPP_B16, NONE),
PAD_CFG_GPO(GPP_B17, 1, PLTRST), // WLAN_RST#
PAD_NC(GPP_B18, NONE), // NO REBOOT strap
// GPP_B19 missing
// GPP_B20 missing
// GPP_B21 missing
// GPP_B22 missing
PAD_NC(GPP_B23, NONE), // CPUNSSC CLOCK FREQ strap
/* ------- GPIO Group GPP_C ------- */
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), // SMB_CLK_DDR
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), // CMB_DATA_DDR
PAD_CFG_GPO(GPP_C2, 1, PLTRST), // TLS CONFIDENTIALITY strap
PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1), // SML0_CLK
PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1), // SML0_DATA
PAD_NC(GPP_C5, NONE), // ESPI OR EC LESS strap
PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1), // TBT_I2C_SCL
PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1), // TBT_I2C_SDA
// GPP_C8 missing
// GPP_C9 missing
// GPP_C10 missing
// GPP_C11 missing
// GPP_C12 missing
// GPP_C13 missing
// GPP_C14 missing
// GPP_C15 missing
// GPP_C16 missing
// GPP_C17 missing
// GPP_C18 missing
// GPP_C19 missing
// GPP_C20 missing
// GPP_C21 missing
// GPP_C22 missing
// GPP_C23 missing
/* ------- GPIO Group GPP_D ------- */
PAD_CFG_GPO(GPP_D0, 1, DEEP), // SB_BLON
PAD_CFG_GPI(GPP_D1, NONE, DEEP), // SB_KBCRST#
PAD_CFG_GPO(GPP_D2, 0, DEEP), // ROM_I2C_EN
PAD_NC(GPP_D3, NONE),
PAD_NC(GPP_D4, NONE),
// GPP_D5 (SSD0_CLKREQ#) configured by FSP
// GPP_D6 (SSD1_CLKREQ#) configured by FSP
// GPP_D7 (WLAN_CLKREQ#) configured by FSP
PAD_NC(GPP_D8, NONE),
PAD_NC(GPP_D9, NONE),
PAD_NC(GPP_D10, NONE),
PAD_NC(GPP_D11, NONE),
PAD_NC(GPP_D12, NONE),
PAD_CFG_GPI(GPP_D13, NONE, DEEP), // WLAN_WAKEUP#
PAD_CFG_GPO(GPP_D14, 1, PLTRST), // SSD2_PWR_EN
PAD_NC(GPP_D15, NONE),
PAD_CFG_GPO(GPP_D16, 1, DEEP), // SSD1_PWR_EN
PAD_NC(GPP_D17, NONE),
PAD_NC(GPP_D18, NONE),
PAD_CFG_GPO(GPP_D19, 0, DEEP), // SATA_LED#
/* ------- GPIO Group GPP_E ------- */
PAD_CFG_GPI(GPP_E0, NONE, DEEP), // CNVI_WAKE#
_PAD_CFG_STRUCT(GPP_E1, 0x40100100, 0x3000), // TPM_PIRQ#
PAD_NC(GPP_E2, NONE),
PAD_CFG_GPO(GPP_E3, 1, PLTRST), // WIFI_RF_EN
PAD_CFG_GPO(GPP_E4, 0, PLTRST), // TBT_FORCE_PWR
PAD_NC(GPP_E5, NONE),
PAD_CFG_GPO(GPP_E6, 0, DEEP), // JTAG ODT DISABLE strap
PAD_CFG_GPI(GPP_E7, NONE, DEEP), // SMI#
PAD_CFG_GPO(GPP_E8, 0, DEEP), // SLP_DRAM#
PAD_CFG_NF(GPP_E9, NONE, DEEP, NF1), // USB_OC0#
PAD_NC(GPP_E10, NONE),
PAD_CFG_GPI(GPP_E11, NONE, DEEP), // BOARD_ID1
PAD_CFG_GPI_INT(GPP_E12, NONE, PLTRST, LEVEL), // TP_ATTN#
PAD_NC(GPP_E13, NONE),
PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1), // EDP_HPD
PAD_NC(GPP_E15, NONE),
PAD_NC(GPP_E16, NONE),
PAD_NC(GPP_E17, NONE),
// GPP_E18 (TBT_LSX0_TXD) configured by FSP
// GPP_E19 (TBT_LSX0_RXD) configured by FSP
PAD_NC(GPP_E20, NONE),
PAD_NC(GPP_E21, NONE),
PAD_NC(GPP_E22, NONE),
PAD_NC(GPP_E23, NONE),
/* ------- GPIO Group GPP_F ------- */
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1), // CNVI_BRI_DT
PAD_CFG_NF(GPP_F1, UP_20K, DEEP, NF1), // CNVI_BRI_RSP
PAD_CFG_NF(GPP_F2, NONE, DEEP, NF1), // CNVI_RGI_DT
PAD_CFG_NF(GPP_F3, UP_20K, DEEP, NF1), // CNVI_RGI_RSP
PAD_CFG_NF(GPP_F4, NONE, DEEP, NF1), // CNVI_RST#
// GPP_F5 (CNVI_CLKREQ) configured by FSP
PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1), // CNVI_GNSS_PA_BLANKING
PAD_NC(GPP_F7, NONE), // MCRO LDO BYPASS strap
// GPP_F8 missing
PAD_NC(GPP_F9, NONE),
PAD_CFG_GPO(GPP_F10, 1, PLTRST), // CARD_RTD3_RST#
PAD_NC(GPP_F11, NONE),
PAD_NC(GPP_F12, NONE),
PAD_NC(GPP_F13, NONE),
PAD_NC(GPP_F14, NONE),
PAD_NC(GPP_F15, NONE),
PAD_NC(GPP_F16, NONE),
PAD_CFG_GPO(GPP_F17, 1, PLTRST), // GPIO_SDCARD_EN
PAD_CFG_GPO(GPP_F18, 0, DEEP), // CCD_WP#
// GPP_F19 (CARD_CLKREQ#) configured by FSP
PAD_CFG_GPO(GPP_F20, 1, PLTRST), // M2_SSD2_RST#
PAD_NC(GPP_F21, NONE),
PAD_NC(GPP_F22, NONE),
PAD_NC(GPP_F23, NONE),
/* ------- GPIO Group GPP_H ------- */
PAD_CFG_GPO(GPP_H0, 1, PLTRST), // MS_SSD1_RST#
PAD_NC(GPP_H1, NONE),
PAD_CFG_GPO(GPP_H2, 1, PLTRST), // WLAN_RST#
PAD_CFG_GPI(GPP_H3, NONE, DEEP), // TPM_DET
PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), // I2C_SDA_TP
PAD_CFG_NF(GPP_H5, NONE, DEEP, NF1), // I2C_SCL_TP
PAD_CFG_NF(GPP_H6, NONE, DEEP, NF1), // PCH_I2C_SDA
PAD_CFG_NF(GPP_H7, NONE, DEEP, NF1), // PCH_I2C_SCL
PAD_CFG_NF(GPP_H8, NONE, DEEP, NF2), // CNVI_MFUART2_RXD
PAD_CFG_NF(GPP_H9, NONE, DEEP, NF2), // CNVI_MFUART2_TXD
// GPP_H10 (UART0_RX) configured in bootblock
// GPP_H11 (UART0_TX) configured in bootblock
PAD_CFG_NF(GPP_H12, NONE, DEEP, NF1), // SATA1_DEVSLP1
PAD_NC(GPP_H13, NONE),
// GPP_H14 missing
PAD_CFG_NF(GPP_H15, NONE, DEEP, NF1), // HDMI_CTRLCLK
// GPP_H16 missing
PAD_CFG_NF(GPP_H17, NONE, DEEP, NF1), // HDMI_CTRLDATA
PAD_CFG_NF(GPP_H18, NONE, DEEP, NF1), // CPU_C10_GATE#
PAD_NC(GPP_H19, NONE),
PAD_CFG_GPO(GPP_H20, 0, DEEP), // PM_CLKRUN#
PAD_NC(GPP_H21, NONE),
PAD_NC(GPP_H22, NONE),
PAD_NC(GPP_H23, NONE),
/* ------- GPIO Group GPP_R ------- */
PAD_CFG_NF(GPP_R0, NONE, DEEP, NF1), // HDA_BITCLK
PAD_CFG_NF(GPP_R1, NATIVE, DEEP, NF1), // HDA_SYNC
PAD_CFG_NF(GPP_R2, NATIVE, DEEP, NF1), // HDA_SDOUT
PAD_CFG_NF(GPP_R3, NATIVE, DEEP, NF1), // HDA_SDIN0
PAD_CFG_NF(GPP_R4, NONE, DEEP, NF1), // HDA_RST#
PAD_NC(GPP_R5, NONE),
PAD_NC(GPP_R6, NONE), // DMIC_CLK
PAD_NC(GPP_R7, NONE), // DMIC_DAT
/* ------- GPIO Group GPP_S ------- */
PAD_NC(GPP_S0, NONE),
PAD_NC(GPP_S1, NONE),
PAD_NC(GPP_S2, NONE),
PAD_NC(GPP_S3, NONE),
PAD_NC(GPP_S4, NONE),
PAD_NC(GPP_S5, NONE),
PAD_NC(GPP_S6, NONE),
PAD_NC(GPP_S7, NONE),
/* ------- GPIO Group GPP_T ------- */
PAD_NC(GPP_T2, NONE),
PAD_NC(GPP_T3, NONE),
};
void mainboard_configure_gpios(void)
{
gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <mainboard/gpio.h>
#include <soc/gpio.h>
static const struct pad_config early_gpio_table[] = {
PAD_CFG_NF(GPP_H10, NONE, DEEP, NF1), // UART0_RX
PAD_CFG_NF(GPP_H11, NONE, DEEP, NF1), // UART0_TX
};
void mainboard_configure_early_gpios(void)
{
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@@ -0,0 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC256 */
0x10ec0256, /* Vendor ID */
0x15587724, /* Subsystem ID */
11, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x15587724),
AZALIA_PIN_CFG(0, 0x12, 0x90a60130),
AZALIA_PIN_CFG(0, 0x13, 0x40000000),
AZALIA_PIN_CFG(0, 0x14, 0x90170110),
AZALIA_PIN_CFG(0, 0x18, 0x411111f0),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x41700001),
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
AZALIA_PIN_CFG(0, 0x21, 0x02211020),
};
const u32 pc_beep_verbs[] = {};
AZALIA_ARRAY_SIZES;

View File

@@ -0,0 +1,83 @@
chip soc/intel/alderlake
register "power_limits_config[RPL_P_282_242_142_15W_CORE]" = "{
.tdp_pl1_override = 15,
.tdp_pl2_override = 46,
}"
device domain 0 on
subsystemid 0x1558 0x7724 inherit
device ref tbt_pcie_rp0 on end
device ref tcss_xhci on
register "tcss_ports[0]" = "TCSS_PORT_DEFAULT(OC_SKIP)"
end
device ref tcss_dma0 on end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Left
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Right
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1
register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # 3G/LTE
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A Left
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A Right
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # 3G/LTE
end
device ref i2c0 on
# Touchpad I2C bus
register "serial_io_i2c_mode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
chip drivers/i2c/hid
register "generic.hid" = ""ELAN0412""
register "generic.desc" = ""ELAN Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_E12)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 15 on end
end
chip drivers/i2c/hid
register "generic.hid" = ""FTCS1000""
register "generic.desc" = ""FocalTech Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_E12)"
register "generic.detect" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 38 on end
end
end
device ref pcie4_0 on
# CPU RP#1 x4, Clock 0 (SSD2)
register "cpu_pcie_rp[CPU_RP(1)]" = "{
.clk_src = 0,
.clk_req = 0,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp5 on
# PCH RP#5 x1, Clock 2 (WLAN)
register "pch_pcie_rp[PCH_RP(5)]" = "{
.clk_src = 2,
.clk_req = 2,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp6 on
# PCH RP#6 x1, Clock 6 (CARD)
register "pch_pcie_rp[PCH_RP(6)]" = "{
.clk_src = 6,
.clk_req = 6,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER,
}"
end
device ref pcie_rp9 on
# PCH RP#9 x4, Clock 1 (SSD1)
register "pch_pcie_rp[PCH_RP(9)]" = "{
.clk_src = 1,
.clk_req = 1,
.flags = PCIE_RP_LTR,
}"
end
end
end

View File

@@ -0,0 +1,25 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/meminit.h>
#include <soc/romstage.h>
void mainboard_memory_init_params(FSPM_UPD *mupd)
{
const struct mb_cfg board_cfg = {
.type = MEM_TYPE_DDR5,
.ect = true,
.LpDdrDqDqsReTraining = 1,
};
const struct mem_spd spd_info = {
.topo = MEM_TOPO_MIXED,
.cbfs_index = 0,
.smbus[1] = { .addr_dimm[0] = 0x52, },
};
const bool half_populated = false;
mupd->FspmConfig.PchHdaAudioLinkHdaEnable = 1;
mupd->FspmConfig.DmiMaxLinkSpeed = 4;
mupd->FspmConfig.GpioOverride = 0;
memcfg_init(mupd, &board_cfg, &spd_info, half_populated);
}

View File

@@ -56,7 +56,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPO(GPP_B8, 1, DEEP),
PAD_CFG_GPO(GPP_B9, 1, DEEP),
PAD_CFG_GPO(GPP_B10, 1, DEEP),
PAD_CFG_NF(GPP_B11, NONE, PWROK, NF1), // GPP_B11
PAD_CFG_NF(GPP_B11, NONE, RSMRST, NF1), // GPP_B11
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), // SLP_S0#
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), // SYS_RESET#
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1), // GPP_B14
@@ -137,8 +137,8 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPO(GPP_E15, 1, DEEP), // CCD_FW_WP#
PAD_CFG_GPO(GPP_E16, 1, DEEP),
PAD_CFG_GPI(GPP_E17, NONE, DEEP), // BOARD_ID3
PAD_NC(GPP_E18, NATIVE), // GPP_E18_TBT_LSX0_TXD
PAD_NC(GPP_E19, NATIVE), // GPP_E19_TBT_LSX0_RXD
// GPP_E18 (TBT_LSX0_TXD) configured by FSP
// GPP_E19 (TBT_LSX0_RXD) configured by FSP
PAD_CFG_GPO(GPP_E20, 1, DEEP),
PAD_CFG_GPO(GPP_E21, 0, DEEP), // GPP_E21
PAD_CFG_GPO(GPP_E22, 1, DEEP),

View File

@@ -126,7 +126,7 @@ const u32 cim_verb_data[] = {
0x02050028, 0x02040000, 0x02050029, 0x0204ea00,
0x0205002b, 0x02040047, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c203, 0x0205002b, 0x02040084,
0x02050029, 0x0204c203, 0x0205002b, 0x02040004,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c206,
0x0205002b, 0x02040078, 0x0205002c, 0x0204b423,

View File

@@ -55,7 +55,7 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_B15, NONE),
PAD_NC(GPP_B16, NONE),
PAD_NC(GPP_B17, NONE),
PAD_CFG_NF(GPP_B18, NONE, PWROK, NF1), // GPP_B18_PMCALERT#
PAD_CFG_NF(GPP_B18, NONE, RSMRST, NF1), // GPP_B18_PMCALERT#
PAD_NC(GPP_B19, NONE),
PAD_CFG_GPO(GPP_B20, 0, DEEP), // GPIO_LANRTD3
_PAD_CFG_STRUCT(GPP_B21, 0x42880100, 0x0000), // GPP_B21_TBT_WAKE#
@@ -244,7 +244,7 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPP_K1, NONE),
PAD_NC(GPP_K2, NONE),
PAD_CFG_GPO(GPP_K3, 1, PLTRST), // TBT_RTD3_PWR_EN_R
PAD_CFG_GPO(GPP_K4, 0, PWROK), // TBT_FORCE_PWR_R
PAD_CFG_GPO(GPP_K4, 0, RSMRST), // TBT_FORCE_PWR_R
PAD_NC(GPP_K5, NONE),
// GPP_K6 doesn't exist
// GPP_K7 doesn't exist

View File

@@ -124,7 +124,7 @@ const u32 cim_verb_data[] = {
0x02050028, 0x02040000, 0x02050029, 0x0204ea00,
0x0205002b, 0x02040047, 0x0205002c, 0x0204b423,
0x02050027, 0x02040010, 0x02050028, 0x02040000,
0x02050029, 0x0204c203, 0x0205002b, 0x02040084,
0x02050029, 0x0204c203, 0x0205002b, 0x02040004,
0x0205002c, 0x0204b423, 0x02050027, 0x02040010,
0x02050028, 0x02040000, 0x02050029, 0x0204c206,
0x0205002b, 0x02040078, 0x0205002c, 0x0204b423,

View File

@@ -1,4 +1,7 @@
chip soc/intel/alderlake
# Support 5600 MT/s memory
register "max_dram_speed_mts" = "5600"
device domain 0 on
subsystemid 0x1558 0xd502 inherit
@@ -63,7 +66,7 @@ chip soc/intel/alderlake
register "pch_pcie_rp[PCH_RP(5)]" = "{
.clk_src = 12,
.clk_req = 12,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER,
}"
end
@@ -90,7 +93,7 @@ chip soc/intel/alderlake
register "pch_pcie_rp[PCH_RP(21)]" = "{
.clk_src = 5,
.clk_req = 5,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
.flags = PCIE_RP_LTR, // XXX: AER spews warnings
}"
end
@@ -99,8 +102,11 @@ chip soc/intel/alderlake
register "pch_pcie_rp[PCH_RP(25)]" = "{
.clk_src = 15,
.clk_req = 15,
.flags = PCIE_RP_LTR | PCIE_RP_AER,
.flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR,
}"
chip drivers/intel/dtbt
device pci 00.0 on end
end
end
end
end

View File

@@ -3,11 +3,13 @@ if BOARD_SYSTEM76_GAZE16_3050 || BOARD_SYSTEM76_GAZE16_3060 || BOARD_SYSTEM76_GA
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M if BOARD_SYSTEM76_ORYP8
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select EC_SYSTEM76_EC_LOCKDOWN
select HAVE_ACPI_RESUME

View File

@@ -68,9 +68,6 @@ chip soc/intel/tigerlake
# rdmsr --bitfield 31:24 --decimal 0x1A2
register "tcc_offset" = "8"
# Enable CNVi BT
register "CnviBtCore" = "true"
# PM Util (soc/intel/tigerlake/pmutil.c)
# GPE configuration
register "pmc_gpe0_dw0" = "PMC_GPP_R"
@@ -103,6 +100,8 @@ chip soc/intel/tigerlake
# From PCH EDS(615985)
device ref shared_ram on end
device ref cnvi_wifi on
register "CnviBtCore" = true
register "CnviBtAudioOffload" = true
chip drivers/wifi/generic
register "wake" = "GPE0_PME_B0"
device generic 0 on end

View File

@@ -18,4 +18,7 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *params)
// Remap PEG2 as PEG1
params->CpuPcieRpFunctionSwap = 1;
// Enable reporting CPU C10 state over ESPI
params->PchEspiHostC10ReportEnable = 1;
}

View File

@@ -15,4 +15,7 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *params)
params->CpuPcieRpAdvancedErrorReporting[1] = 0;
params->CpuPcieRpLtrEnable[1] = 1;
params->CpuPcieRpPtmEnabled[1] = 0;
// Enable reporting CPU C10 state over ESPI
params->PchEspiHostC10ReportEnable = 1;
}

View File

@@ -168,8 +168,8 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPI(GPP_G9, NONE, DEEP), // GPP_G9
PAD_NC(GPP_G10, NONE),
PAD_CFG_GPI(GPP_G11, NONE, DEEP), // GPP_G11
PAD_NC(GPP_G12, NATIVE), // GPP_G12_TBT_LSX_TXD
PAD_NC(GPP_G13, NATIVE), // GPP_G13_TBT_LSX0_RXD
// GPP_G12 (TBT_LSX0_TXD) configured by FSP
// GPP_G13 (TBT_LSX0_RXD) configured by FSP
PAD_NC(GPP_G14, NONE),
PAD_CFG_GPI(GPP_G15, NONE, DEEP), // GPP_G15

View File

@@ -21,4 +21,7 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *params)
// Low latency legacy I/O
params->PchLegacyIoLowLatency = 1;
// Enable reporting CPU C10 state over ESPI
params->PchEspiHostC10ReportEnable = 1;
}

View File

@@ -3,12 +3,14 @@ if BOARD_SYSTEM76_DARP7 || BOARD_SYSTEM76_GALP5 || BOARD_SYSTEM76_LEMP10
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_GFX_NVIDIA if BOARD_SYSTEM76_GALP5
select DRIVERS_I2C_HID
select DRIVERS_INTEL_PMC
select DRIVERS_INTEL_USB4_RETIMER
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD if BOARD_SYSTEM76_DARP7
select EC_SYSTEM76_EC_DGPU if BOARD_SYSTEM76_GALP5
select EC_SYSTEM76_EC_LOCKDOWN
select HAVE_ACPI_TABLES

View File

@@ -62,9 +62,6 @@ chip soc/intel/tigerlake
# Thermal
register "tcc_offset" = "12"
# Enable CNVi BT
register "CnviBtCore" = "true"
# Actual device tree
device cpu_cluster 0 on
device lapic 0 on end
@@ -90,6 +87,8 @@ chip soc/intel/tigerlake
device ref gna on end
device ref shared_ram on end
device ref cnvi_wifi on
register "CnviBtCore" = true
register "CnviBtAudioOffload" = true
chip drivers/wifi/generic
register "wake" = "GPE0_PME_B0"
device generic 0 on end

View File

@@ -3,9 +3,10 @@ if BOARD_SYSTEM76_GALP3_C || BOARD_SYSTEM76_DARP5
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_GENERIC_CBFS_SERIAL
select DRIVERS_GENERIC_CBFS_UUID
select DRIVERS_I2C_HID
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_COLOR_KEYBOARD if BOARD_SYSTEM76_DARP5
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT

View File

@@ -71,6 +71,10 @@ static uint32_t tpm_setup_s3_helper(void)
default:
printk(BIOS_ERR, "TPM: Resume failed (%#x).\n", result);
if (CONFIG(TPM2)) {
printk(BIOS_WARNING, "TPM: Clearing state\n");
result = tlcl_startup();
}
break;
}

View File

@@ -140,6 +140,7 @@ static const struct {
{ PCI_DID_INTEL_ADL_S_ID_12, ADL_S_202_46W_CORE, TDP_46W },
{ PCI_DID_INTEL_RPL_P_ID_1, RPL_P_682_642_482_45W_CORE, TDP_45W },
{ PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_482_282_28W_CORE, TDP_28W },
{ PCI_DID_INTEL_RPL_P_ID_2, RPL_P_682_642_482_45W_CORE, TDP_45W },
{ PCI_DID_INTEL_RPL_P_ID_3, RPL_P_282_242_142_15W_CORE, TDP_15W },
{ PCI_DID_INTEL_RPL_P_ID_4, RPL_P_282_242_142_15W_CORE, TDP_15W },
{ PCI_DID_INTEL_RPL_P_ID_5, RPL_P_282_242_142_15W_CORE, TDP_15W },

View File

@@ -90,36 +90,6 @@ chip soc/intel/alderlake
.tdp_pl4 = 114,
}"
register "power_limits_config[RPL_HX_8_16_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_8_12_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_8_8_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_6_8_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_6_4_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
# NOTE: if any variant wants to override this value, use the same format
# as register "common_soc_config.pch_thermal_trip" = "value", instead of
# putting it under register "common_soc_config" in overridetree.cb file.

View File

@@ -92,6 +92,36 @@ chip soc/intel/alderlake
.tdp_pl4 = 44,
}"
register "power_limits_config[RPL_HX_8_16_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_8_12_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_8_8_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_6_8_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
register "power_limits_config[RPL_HX_6_4_55W_CORE]" = "{
.tdp_pl1_override = 55,
.tdp_pl2_override = 130,
.tdp_pl4 = 200,
}"
# NOTE: if any variant wants to override this value, use the same format
# as register "common_soc_config.pch_thermal_trip" = "value", instead of
# putting it under register "common_soc_config" in overridetree.cb file.

View File

@@ -301,10 +301,10 @@ uint8_t get_supported_lpm_mask(void)
case ADL_M: /* fallthrough */
case ADL_N:
case ADL_P:
case RPL_HX:
case RPL_P:
return LPM_S0i2_0 | LPM_S0i3_0;
case ADL_S:
case RPL_HX:
return LPM_S0i2_0 | LPM_S0i2_1;
default:
printk(BIOS_ERR, "Unknown ADL CPU type: %d\n", type);

View File

@@ -5,8 +5,13 @@
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
#include <soc/gpio_defs_pch_s.h>
#if CONFIG(SOC_INTEL_RAPTORLAKE)
#define CROS_GPIO_NAME "INTC1085"
#define CROS_GPIO_DEVICE_NAME "INTC1085:00"
#else
#define CROS_GPIO_NAME "INTC1056"
#define CROS_GPIO_DEVICE_NAME "INTC1056:00"
#endif
#elif CONFIG(SOC_INTEL_ALDERLAKE_PCH_N)
#include <soc/gpio_defs.h>
#define CROS_GPIO_NAME "INTC1057"

View File

@@ -20,8 +20,14 @@
#define PCH_TRACE_HUB_BASE_SIZE 0x00800000
#endif
/* Hack to include SBREG in PCH_RESERVED region on ADL-S/RPL-S */
#if CONFIG(SOC_INTEL_ALDERLAKE_PCH_S)
#define PCH_PRESERVED_BASE_ADDRESS 0xe0000000
#define PCH_PRESERVED_BASE_SIZE 0x1e800000
#else
#define PCH_PRESERVED_BASE_ADDRESS 0xfc800000
#define PCH_PRESERVED_BASE_SIZE 0x02000000
#endif
#define UART_BASE_SIZE 0x1000

View File

@@ -70,8 +70,8 @@ static const struct soc_mem_cfg soc_mem_cfg[] = {
* configuration.
*/
.half_channel = BIT(0),
/* In mixed topologies, channel 1 is always memory-down. */
.mixed_topo = BIT(1),
/* In mixed topologies, channel 0 is always memory-down. */
.mixed_topo = BIT(0),
},
},
[MEM_TYPE_LP4X] = {
@@ -118,7 +118,7 @@ static const struct soc_mem_cfg soc_mem_cfg[] = {
},
};
static void mem_init_spd_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_data *data)
static void mem_init_spd_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_data *data, bool expand_channels)
{
uint32_t *spd_upds[MRC_CHANNELS][CONFIG_DIMMS_PER_CHANNEL] = {
[0] = { &mem_cfg->MemorySpdPtr000, &mem_cfg->MemorySpdPtr001, },
@@ -151,7 +151,16 @@ static void mem_init_spd_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_da
for (dimm = 0; dimm < CONFIG_DIMMS_PER_CHANNEL; dimm++) {
uint32_t *spd_ptr = spd_upds[ch][dimm];
*spd_ptr = data->spd[ch][dimm];
// In DDR5 systems, we need to copy the SPD data such that:
// Channel 0 data is used by channel 0 and 1
// Channel 2 data is used by channel 2 and 3
// Channel 4 data is used by channel 4 and 5
// Channel 6 data is used by channel 6 and 7
if (expand_channels) {
*spd_ptr = data->spd[ch & 6][dimm];
} else {
*spd_ptr = data->spd[ch][dimm];
}
if (*spd_ptr)
enable_channel = 1;
}
@@ -217,27 +226,12 @@ static void mem_init_dqs_upds(FSP_M_CONFIG *mem_cfg, const struct mem_channel_da
mem_init_dq_dqs_upds(dqs_upds, mb_cfg->dqs_map, upd_size, data, auto_detect);
}
#define DDR5_CH_DIMM_OFFSET(ch, dimm) ((ch) * CONFIG_DIMMS_PER_CHANNEL + (dimm))
static void ddr5_fill_dimm_module_info(FSP_M_CONFIG *mem_cfg, const struct mb_cfg *mb_cfg,
const struct mem_spd *spd_info)
{
for (size_t ch = 0; ch < soc_mem_cfg[MEM_TYPE_DDR5].num_phys_channels; ch++) {
for (size_t dimm = 0; dimm < CONFIG_DIMMS_PER_CHANNEL; dimm++) {
size_t mrc_ch = soc_mem_cfg[MEM_TYPE_DDR5].phys_to_mrc_map[ch];
mem_cfg->SpdAddressTable[DDR5_CH_DIMM_OFFSET(mrc_ch, dimm)] =
spd_info->smbus[ch].addr_dimm[dimm] << 1;
}
}
mem_init_dq_upds(mem_cfg, NULL, mb_cfg, true);
mem_init_dqs_upds(mem_cfg, NULL, mb_cfg, true);
}
void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg,
const struct mem_spd *spd_info, bool half_populated)
{
struct mem_channel_data data;
bool dq_dqs_auto_detect = false;
bool expand_channels = false;
FSP_M_CONFIG *mem_cfg = &memupd->FspmConfig;
mem_cfg->ECT = mb_cfg->ect;
@@ -258,14 +252,7 @@ void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg,
case MEM_TYPE_DDR5:
meminit_ddr(mem_cfg, &mb_cfg->ddr_config);
dq_dqs_auto_detect = true;
/*
* TODO: Drop this workaround once SMBus driver in coreboot is updated to
* support DDR5 EEPROM reading.
*/
if (spd_info->topo == MEM_TOPO_DIMM_MODULE) {
ddr5_fill_dimm_module_info(mem_cfg, mb_cfg, spd_info);
return;
}
expand_channels = true;
break;
case MEM_TYPE_LP4X:
meminit_lp4x(mem_cfg);
@@ -279,7 +266,7 @@ void memcfg_init(FSPM_UPD *memupd, const struct mb_cfg *mb_cfg,
mem_populate_channel_data(memupd, &soc_mem_cfg[mb_cfg->type], spd_info, half_populated,
&data);
mem_init_spd_upds(mem_cfg, &data);
mem_init_spd_upds(mem_cfg, &data, expand_channels);
mem_init_dq_upds(mem_cfg, &data, mb_cfg, dq_dqs_auto_detect);
mem_init_dqs_upds(mem_cfg, &data, mb_cfg, dq_dqs_auto_detect);
}

View File

@@ -128,6 +128,7 @@ static const struct vr_lookup vr_config_ll[] = {
{ PCI_DID_INTEL_ADL_N_ID_4, 6, VR_CFG_ALL_DOMAINS_LOADLINE(5.0, 6.5) },
{ PCI_DID_INTEL_RPL_P_ID_1, 45, VR_CFG_ALL_DOMAINS_LOADLINE(2.3, 3.2) },
{ PCI_DID_INTEL_RPL_P_ID_2, 28, VR_CFG_ALL_DOMAINS_LOADLINE(2.3, 3.2) },
{ PCI_DID_INTEL_RPL_P_ID_2, 45, VR_CFG_ALL_DOMAINS_LOADLINE(2.3, 3.2) },
{ PCI_DID_INTEL_RPL_P_ID_3, 15, VR_CFG_ALL_DOMAINS_LOADLINE(2.8, 3.2) },
{ PCI_DID_INTEL_RPL_P_ID_4, 15, VR_CFG_ALL_DOMAINS_LOADLINE(2.8, 3.2) },
{ PCI_DID_INTEL_RPL_P_ID_5, 15, VR_CFG_ALL_DOMAINS_LOADLINE(2.8, 3.2) },
@@ -171,6 +172,7 @@ static const struct vr_lookup vr_config_icc[] = {
{ PCI_DID_INTEL_ADL_N_ID_4, 6, VR_CFG_ALL_DOMAINS_ICC(27, 23) },
{ PCI_DID_INTEL_RPL_P_ID_1, 45, VR_CFG_ALL_DOMAINS_ICC(160, 55) },
{ PCI_DID_INTEL_RPL_P_ID_2, 28, VR_CFG_ALL_DOMAINS_ICC(102, 55) },
{ PCI_DID_INTEL_RPL_P_ID_2, 45, VR_CFG_ALL_DOMAINS_ICC(160, 55) },
{ PCI_DID_INTEL_RPL_P_ID_3, 15, VR_CFG_ALL_DOMAINS_ICC(80, 40) },
{ PCI_DID_INTEL_RPL_P_ID_4, 15, VR_CFG_ALL_DOMAINS_ICC(80, 40) },
{ PCI_DID_INTEL_RPL_P_ID_5, 15, VR_CFG_ALL_DOMAINS_ICC(80, 40) },
@@ -214,6 +216,7 @@ static const struct vr_lookup vr_config_tdc_timewindow[] = {
{ PCI_DID_INTEL_ADL_N_ID_4, 6, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
{ PCI_DID_INTEL_RPL_P_ID_1, 45, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
{ PCI_DID_INTEL_RPL_P_ID_2, 28, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
{ PCI_DID_INTEL_RPL_P_ID_2, 45, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
{ PCI_DID_INTEL_RPL_P_ID_3, 15, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
{ PCI_DID_INTEL_RPL_P_ID_4, 15, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
{ PCI_DID_INTEL_RPL_P_ID_5, 15, VR_CFG_ALL_DOMAINS_TDC(28000, 28000) },
@@ -257,6 +260,7 @@ static const struct vr_lookup vr_config_tdc_currentlimit[] = {
{ PCI_DID_INTEL_ADL_N_ID_4, 6, VR_CFG_ALL_DOMAINS_TDC_CURRENT(10, 10) },
{ PCI_DID_INTEL_RPL_P_ID_1, 45, VR_CFG_ALL_DOMAINS_TDC_CURRENT(86, 86) },
{ PCI_DID_INTEL_RPL_P_ID_2, 28, VR_CFG_ALL_DOMAINS_TDC_CURRENT(54, 54) },
{ PCI_DID_INTEL_RPL_P_ID_2, 45, VR_CFG_ALL_DOMAINS_TDC_CURRENT(86, 86) },
{ PCI_DID_INTEL_RPL_P_ID_3, 15, VR_CFG_ALL_DOMAINS_TDC_CURRENT(41, 41) },
{ PCI_DID_INTEL_RPL_P_ID_4, 15, VR_CFG_ALL_DOMAINS_TDC_CURRENT(41, 41) },
{ PCI_DID_INTEL_RPL_P_ID_5, 15, VR_CFG_ALL_DOMAINS_TDC_CURRENT(41, 41) },

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