Compare commits

...

376 Commits

Author SHA1 Message Date
29f9270d39 darp7 SD card does not support RTD3
Change-Id: Ie393e9cd42f58d2b3b7172c99b9cd5a1b3a41d87
2020-12-28 09:30:35 -07:00
b625b0db73 Disable invalid PLD group
Change-Id: I2c8f8aa405a34e56ba1bd8f38b35447bed999a5e
2020-12-22 14:45:08 -07:00
d0dbaebd28 Fixes for S0ix
Change-Id: I293b4219332f6ea58f81a231a613b03b74f5e1c4
2020-12-22 14:28:06 -07:00
7e69c5aae8 Fix PLD groups
Change-Id: I6b0aaab65350a6588cee7956f9a2d2d773bf458a
2020-12-22 14:27:20 -07:00
7bb6096cb5 Enable darp7 color keyboard
Change-Id: I839e32dfea4a3c26f49da8b0aeb92bff711c7a9a
2020-12-22 13:26:01 -07:00
5cf1e853cc Add darp7
Change-Id: I8c47a18095ad19f907c9018952dec551865e27fe
2020-12-22 11:32:42 -07:00
6690cc7c7a Ensure that GPU SSID is restored
Change-Id: Iada67ff9b7d882167ca2047a1618230e73d4300d
2020-12-15 10:09:48 -07:00
ebf03eb621 Fix galp5 integrated graphics mode
Change-Id: I3f46b0fd1e5c66ace2f0c45fa9e4bc580d907547
2020-12-14 14:59:13 -07:00
776cb6366b Do not ping GPU_EVENT
Change-Id: I07f0852d57a1cc52f8595c06960db6e7dc78ce76
2020-12-08 09:07:39 -07:00
36f3b1af84 Enable galp5 NVIDIA GPU
Change-Id: I9dd1a7b0150672925bf454202947ccace8b0edb7
2020-12-08 09:05:34 -07:00
3b186d8baf Add debugging and _PR3 linkage for RTD3 driver
Change-Id: I243e0d8a65f682b1a68af68fa911c8fb8e000cb0
2020-12-08 09:03:52 -07:00
5fbdab4ddb Remove invalid writes to set TCSS D3 2020-12-03 21:32:32 -07:00
fd716f3457 Casually disable TBT RTD3
Change-Id: Ia20aded6de9769d9e69a374e67b7ceb569169bc5
2020-12-03 20:39:14 -07:00
8d4dd30363 Use 9KB VBT
Change-Id: I19017f4af04bde2b681255a32a9ffc073deb4f62
2020-12-03 13:17:49 -07:00
c6f49ca48a Revert removal of MMCONFIG
Change-Id: I22be03d5714b58bd19fdf0cd126487b1e72d7473
2020-12-03 11:03:30 -07:00
a20126a4b3 Use SCI to wake from suspend whe on TGL models
Change-Id: I153a9627b846516404b8fd2dceb86872307eecd2
2020-12-03 09:08:25 -07:00
869eebbbb5 Hide MMCONFIG on TGL and set VBT to 8KB
Change-Id: I46d9535266e2ca1946213d899ddecc1b426d2294
2020-12-03 08:45:48 -07:00
bbfea8bd39 Merge remote-tracking branch 'upstream/master' into HEAD
Change-Id: Id25620ddd031ef761b2f7962acb6682223c9753b
2020-12-02 20:42:22 -07:00
d95db48cd7 Re-enable lpit 2020-12-02 15:59:24 -07:00
4dd22de634 Restore changes to TCSS ASL
Change-Id: I8e6093f117f5e5aa453a739b88d1d6fc3fed6598
2020-11-30 14:08:14 -07:00
b69fba193b Enable UART on lemp10
Change-Id: If82418b9dfcb63dfb7fdd192107d3f6b3d77d3b9
2020-11-30 11:40:55 -07:00
fd8c25ab61 Re-enable UART on galp5, default to disabled NVIDIA GPU
Change-Id: I7dffdce4d213f083f1742695943fcff0c4859e80
2020-11-30 10:56:45 -07:00
c051009031 WIP: Revert changes that may cause TBT RTD3 issues
Change-Id: I8ada670bc06af11b79c721fcf39ed3bdfa362b17
2020-11-30 10:53:04 -07:00
bf721bef43 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Iaa3dca6a7c101b6e006d3487361d8a5b327e6d04
2020-11-30 10:01:26 -07:00
5ae625110d Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I3b61b0368544499706b8416d093e1ceedd1143c6
2020-11-25 14:37:36 -07:00
2672659890 Add DRIVERS_INTEL_PMC to galp5
Change-Id: I26b27e887e5e06ae65b8e55e24befa0cf679a20f
2020-11-25 14:33:00 -07:00
4f36a5779d Sync USB ACPI and PMC mux to galp5
Change-Id: I3f3d3ad0486ec457960fbda3be5cce05e6a6d748
2020-11-25 13:48:31 -07:00
0304273049 Fix lemp10 USB ACPI
Change-Id: Ie5c558db0de770b92bff4cec77fa52beab428bcb
2020-11-25 13:48:16 -07:00
79f0e60861 Add USB ACPI drivers and re-enable PMC mux
Change-Id: Iec6f0a9ea29cba69fcdb0d708aaa5cc39a9e4f04
2020-11-25 13:33:12 -07:00
3d37711899 Apply TCSS recommendations from 617016
Change-Id: Ia30fa057f3f03e8d7e82d067e09ea85a7bab3385
2020-11-24 14:40:41 -07:00
13338f9ae2 Sync lemp10 iom config
Change-Id: Ie7a07c1447a3b41d3b53d1198e86cf04b51f96bc
2020-11-24 12:31:22 -07:00
f28c6180a7 Disable IomTypeCPortPadCfg
Change-Id: Ic30860e5157fa31445a5bcc01b7adfb358ae5467
2020-11-24 12:29:47 -07:00
d7ed6947c2 Remove duplicate TCSS ACPI
Change-Id: Ic19299f938541b48eb636fcc79f122fc39189833
2020-11-24 12:29:32 -07:00
0182cebfbc Enable CNVi wake, document all RTD3 pins with names from schematics
Change-Id: I5581b39b3d4a072124cbb09cc4fbe16a671eb700
2020-11-24 08:54:16 -07:00
b4dcbd3c28 Sync more tcss changes from alderlake to tigerlake
Change-Id: I4ec025714f48bed5623687827d3362e507dc6f90
2020-11-24 08:27:12 -07:00
aebf02be02 Fixup
Change-Id: I4e124cb8a69496a11e9eac270612c65025bb1f7c
2020-11-23 20:58:31 -07:00
c9d9c491ec Also require TBT0 and TBT1 resource for DMA and RP
Change-Id: I6238c0b6cb7b47c18f3918d53f0e5c1a6706ce57
2020-11-23 20:50:44 -07:00
7f543c99f8 Try to use GPIO PM modes
Change-Id: I97a9ecabf2839e29d00a76db0c5b17db99965ee3
2020-11-23 20:45:41 -07:00
bd6bbc3655 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Ic25f3dba2af53111bca9e7762a2690c518c35fe1
2020-11-23 08:52:59 -07:00
3cdc454b18 Sync galp5 with lemp10
Change-Id: I0596f182021758b6013733429a7a810963b09995
2020-11-23 08:50:51 -07:00
10b8410a2e Try acoustic noise mitigation
Change-Id: I6d6bffedbb48f5340e664fc9c7bdd406e9ed8680
2020-11-20 19:58:33 -07:00
aa2159786d Disable WiFi wake
Change-Id: Icf7490278872b11723fec5c6d820728945a8cfe0
2020-11-20 15:54:34 -07:00
5352c7b0b2 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I718ce2ea23c20405a0392793361cf3e52e864276
2020-11-20 10:30:40 -07:00
f786129104 Add CPU LTR for lemp10
Change-Id: I6d3c0aad1d120185c5801420093c64f85ba89ada
2020-11-19 15:54:26 -07:00
dafe9d6fe0 Add CPU LTR
Change-Id: I91c494b2d085abc6bea10bda0bc13fb31eec2cff
2020-11-19 15:49:37 -07:00
953ceb040b Sync lemp10 with galp5
Change-Id: I1808db36e269b828d7cec0f3300915b4be2e6622
2020-11-19 13:32:49 -07:00
f10995e09e Fix missing on
Change-Id: I0f8ffe1edfd19d05b735f7b95fdd46e469682950
2020-11-19 12:16:13 -07:00
3fae15eea4 Fix typo
Change-Id: I92af63f5f4075e96ba0a4b60f34409d69dce9761
2020-11-19 12:15:25 -07:00
b14e953b71 Remove unused USB ports and crash log
Change-Id: Id1978bddb3f63d1b9623d92b8b7d1b5b74cbd328
2020-11-19 12:13:11 -07:00
7d302de633 WIP: Reorganize devicetree
Change-Id: Ia17916de8794077e57ce7fd04464e99d3751479d
2020-11-19 12:09:40 -07:00
cf36cd8f13 WIP: adjust GPIOs to enable retimer
Change-Id: If9256d01dc844b7272433827ca40d874c55eb713
2020-11-19 10:46:13 -07:00
77009f599d Add PEG0 definition
Change-Id: I75f36d32b53c0cf683a36cd3518cc0c966cf2077
2020-11-18 21:34:51 -07:00
047e58bc35 Move CPU AER and PTM config to mainboard
Change-Id: Idd7908426e33a64afa34ea9e5d02ec7378a56271
2020-11-18 21:13:15 -07:00
130a3b0281 WIP: undo changes that might impact CPU PCIe
Change-Id: Ied4e4ed4c11172a9bb1c7aa47787ba6fb7e72803
2020-11-18 20:27:11 -07:00
18cb9b5ab0 Sync lemp10 CPU power config with lemp9
Change-Id: Ia326f80113c1d19c18d492d5387057fe939b3809
2020-11-18 12:50:34 -07:00
2267ee62e4 Fix lemp10 USB config
Change-Id: If371e351956b4ef65e3c7989f45ec8a88c55e3af
2020-11-18 12:49:52 -07:00
6d1cc1ca1d Sync galp5 with lemp10
Change-Id: I7fdb50fd56beba8a38bdeb10e838dc22eb857deb
2020-11-18 10:59:37 -07:00
1331815d90 Disable CPU PCIe clock req messaging
Change-Id: I7936a770463d150b5310b89a4ab577d8c9aacc98
2020-11-17 20:48:05 -07:00
9847012bc6 Disable Precision Time Measurement for CPU PCIe ports
Change-Id: I007b6825a7d558254f890723ef568b96d9e884bc
2020-11-17 19:26:27 -07:00
efd716cef0 soc/intel/tigerlake: Expose UPD to disable Precision Time Measurement
Expose a config option that allows disabling the FSP UPD which controls
Precision Time Measurement for a particular PCIe root port.  Since this
is enabled by default the option is inverted to allow disabling for
a particular port while not affecting others.

BUG=b:160996445
TEST=boot on volteer with PTM disabled for the NVMe root port

Change-Id: Icb51b256eb581d942b2d30fcabfae52fa90e48d4
Signed-off-by: Duncan Laurie <dlaurie@google.com>
2020-11-17 19:24:07 -07:00
417fa84913 device/pciexp: Allow ASPM on bridge devices
The device acceptable latency field is only valid for 'endpoints',
but not for bridge devices. Set the maximum acceptable latency on
such devices to allow ASPM being enabled if supported on both sides.

Allows the PCIe link on bridge devices to go into L0s/L1.

This allows the package to enter a deeper sleep state when all links
are idle.

WARNING: This might cause issues on PCIe bridge devices that doesn't
properly support ASPM. In addition it might decrease performance.

Change-Id: I277efe0bd1448ee8bff633428aa729aeedf04e28
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2020-11-17 19:13:14 -07:00
d13acd817d device: Enable ASPM for TBT PCIe root ports
The virtual/generic device under TBT PCIe root ports has path type as
DEVICE_PATH_GENERIC. While scanning the pcie bus, the generic device
blocks its root ports configuration. This change adds device path type
check and enables ASPM for TBT root ports.

BUG=b:173207454
TEST=Built image and booted to kernel on Voxel board. Verified both of
the TBT Root ports 00:07.0 and 00:07.1 ASPM are enabled.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I82ffaeb5a8821d9034d8dae9d98d3b5953a9608b
2020-11-17 19:12:04 -07:00
79aa5fa87f Debug pcie rtd3
Change-Id: I60d2b7533178c8fad5871b0d3b0e3cd6a3cb99e8
2020-11-17 17:08:18 -07:00
2d40287435 Add _PR3 power resource to RTD3 driver
Change-Id: Iddfeaaf1424f7af9983167dd5e234d656e252da7
2020-11-17 16:35:27 -07:00
604e699ace Disable debug console
Change-Id: Ieca895cb4c7be95600f955ed85fc06f877ba9216
2020-11-17 13:53:16 -07:00
68ccba9a11 Enable GNA and disable I2C2 pins
Change-Id: I46b6254748f13c763551ac48e390aedfb2a6def1
2020-11-17 13:51:16 -07:00
faa6da02cc Do not disable PEG60 srcclk
Change-Id: I08808789e48f7e25d8419d752e238cc8c35c3df8
2020-11-16 21:19:39 -07:00
3d0ab91fce Debug root port number in RTD3 driver
Change-Id: I2ce1d69bc8ccc4602b745dd3672af30a70ecff73
2020-11-16 20:59:51 -07:00
306b440892 [TEST] LPIT table test implementation
... cowardly stolen from CB:32350 ;-)

Change-Id: I08b9948366db68bf16076e330bbca8c8dc85e65c

Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: Ibb7f34d03120824710e84d69f8459ea8bd35fbcb
2020-11-16 19:54:13 -07:00
903d70ab8e soc/intel/common/acpi,mb/*: replace the two obsolete LPID with PEPD
Replace the two obsolete LPID implementations with the new PEPD device.

The PEPD device gets included in the plaforms' `southbridge.asl`, since
it is required to load the `intel_pmc_core` module in Linux, which
checks for the _HID. (See CB:46469 for more info on that.)

There is no harm for mainboards not supporting S0ix, because the _DSM
function won't be called with the LPS0 UUID on such boards. Such boards
can use the debugging functionality of `intel_pmc_core`, too.

Change-Id: Ic8427db33286451618b50ca429d41b604dbb08a5
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
914ec1eb46 soc/intel/common/acpi: add _HID to PEPD
Add the _HID INT33A1 to PEPD to make Linux recognize it as "Intel Power
Engine" in the pmc core driver.

The _ADR gets dropped, because _HID and _ADR are mutually exclusive.

Change-Id: I7a0335681f1601f7fd8a9245a3dea72ffd100b55
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
0b02151c1a soc/intel/common/acpi: correct return value for PEPD enum function
The PEPD enum function returns a bitmask to announce supported/enabled
PEPD functions. Add a comment describing this bitmask and correct the
return value to announce function 1, 5 and 6 as supported.

Also add comments to the disabled functions 3 and 4.

Change-Id: Ib523a54f5ad695e79005aba422282e03f2bc4bed
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
032971dc2c soc/intel/common/acpi: work around Windows crash on S0ix-enabled boards
Windows does not comply with the Low Power Idle S0 specification and
crashes with an `INTERNAL_POWER_ERROR` bluescreen when function 1, does
not return at least one device constraint, even when function 1 is
announced as being not available by the enum function. Returning an
empty package does not work.

At least the following Windows versions were verified to be affected:
- Windows 8.1 x64, release 6.3.9600
- Windoes 10 x64, version 1809, build 17763.379
- Windows 10 x64, version 1903, build 18362.53
- Windows 10 x64, version 2004, build 19041.508
- Windows 10 x64, version 20H2 / 2009, build 19042.450

To make Windows work on S0ix-enabled boards, return a dummy constraint
package with a disabled dummy device.

Since the device constraints are only used for debugging low power
states in Linux and probably also in Windows, there shouldn't be any
negative effect to S0ix. Real device constraint entries could be added
at a later point, if needed.

Note: to fully prevent the BSOD mentioned above the LPIT table is
required on Windows, too. The patch for this is WIP, see CB:32350.
If you want to test this, you need to applie the whole ACPI patch
series including the hacky LPIT test implementation from CB:47242:
https://review.coreboot.org/q/topic:%22low_power_idle_fix%22

Test: no bluescreen anymore on Clevo L140CU on all Windows versions
listed above and S0ix gets detected in `powercfg -a`.

Change-Id: Icd08cbcb1dfcb8cbb23f4f4c902bf8c367c8e3ac
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
c4726c168e soc/intel/common/acpi: drop return value for disabled PEPD function 2
PEPD function 2 is currently unused and disabled. Thus, drop the return
value, which matches the default return value.

Change-Id: Ia95b8b36fcb78e8976b66de15ec214a38c178cda
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
72ceea7118 soc/intel/common/acpi: rename PEPD/LPI macros for clarification
`ARG2` in the macro's names does not really provide any useful
information. Drop it and add `LPI` to clarify the relation to only
low-power idle states.

Change-Id: I8d44c9e4974c7f34aa5c32ba00328725f536fda6
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
1ff04c8b7d soc/intel/common/acpi: rename LPID to PEPD
Rename LPID to PEPD for consistency. PEPD means "Power Engine Plug-In
Device" and is the name Intel and vendors usually use, so let's comply.

Change-Id: I1caa009a3946b1c55da8afbae058cafe98940c6d
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
8369925be2 soc/intel/common/acpi: move S0ix UUID to the condition
Move the UUID to the condition, since there is no need to assign a name
when it is only used once. Also add a comment to make clear that the
functions inside that condition are only used by the Low Power Idle S0
functionality, while the PEPD in general can be present on boards
without S0ix capability, too. For details check CB:46469.

Change-Id: Ic62c37090ad1b747f9d7d204363cc58f96ef67ef
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
0bf0c25af4 soc/intel/common/acpi: drop the southridge scope around PEPD
PEPD will get included directly in the southbridge. Thus, drop the
scope around it.

Change-Id: Icb7a40e476966a7aca36bee055ee71d181508b87
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:12 -07:00
8bd1ee6bd4 Remove lpit acpi code
Change-Id: Iaa51fa7a58a5649be4671437377d2fc94cd8ff8d
2020-11-16 19:54:12 -07:00
d206f606e1 Disable legacy 8254 timer on lemp10
Change-Id: I0d8acc95b778d0d3c1acb29890c765d9c8eba0b3
2020-11-16 10:56:18 -07:00
8ddde8e912 Enable SATA SALP support
Change-Id: If261f708d943df3ad46082a9d4365fd1b9f47f06
2020-11-16 10:49:51 -07:00
abb149ebce Add default IomTypeCPortPadCfg
Change-Id: I5b6639f7f5a2b62aa644c93c69889dda590c34d5
2020-11-16 09:24:34 -07:00
5c341798b3 soc/intel/common: Use per-soc definition for BAR sizes
The various platform BARs are not always the same size across different
SOCs, so use the defined size rather than a hardcoded value.

This results in the following change on TGL which increased the MCHBAR
size to 128K:

-system 00:00: [mem 0xfedc0000-0xfeddffff] has been reserved
+system 00:00: [mem 0xfedc0000-0xfedc7fff] has been reserved

And fixes the following error output from the kernel:

resource sanity check: requesting [mem 0xfedc0000-0xfedcdfff],
  which spans more than pnp 00:00 [mem 0xfedc0000-0xfedc7fff]

Change-Id: I82796c2fc81dec883f3c69ae7bdcedc7d3f16c64
Signed-off-by: Duncan Laurie <dlaurie@google.com>
2020-11-16 08:52:31 -07:00
d4e3f5a44c soc/intel/tigerlake: Enable GPIO IOSTANDBY configuration
Enable SOC_INTEL_COMMON_BLOCK_GPIO_IOSTANDBY so the pads can be
configured with non-zero IOSSTATE values.

BUG=b:171993054

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I1f895dbdbb71a353a98272db6dc70b54e8e172a3
2020-11-16 08:51:03 -07:00
934fe49137 Add lpit asl to lemp10
Change-Id: I52fb84961cdd0ca8aef23f53ebab06041610a014
2020-11-14 21:20:28 -07:00
32e9a708d5 Select retimer driver
Change-Id: I03304ffe1e6bc108c4557a9dfbe448729d2eaec0
2020-11-14 20:38:13 -07:00
d695072b56 Add retimer device
Change-Id: I40f380af709acce80ce96c674eca521683b1252d
2020-11-14 20:36:36 -07:00
7a1774b337 Enable SATA devslp on lemp10
Change-Id: Ic41d672431d76519406eb3403f8ce1f8b154d6d9
2020-11-14 20:24:11 -07:00
2214f27d92 Add rtd3 config for lemp10 m.2 slots
Change-Id: I0d49ba23205801dbcca7fe420ed8e763e1e80514
2020-11-14 20:13:22 -07:00
bcda5840d2 soc/intel/tigerlake: Enable RTD3 driver and IPC mailbox
This SOC overrides the common PMC device and instantiates the PMC device
in the SSDT.  It needs to call the common PMC function to provide the
IPC mailbox method.

The common PCIe RTD3 driver can also be enabled which will allow
mainboards to enable Runtime D3 power control for PCIe devices.

BUG=b:160996445
TEST=boot on volteer with this driver enabled for the NVMe device in the
devicetree and disassemble the SSDT to ensure the RTD3 code is present.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Ifa54ec3b8cebcc2752916cc4f8616fcb6fd2fecc
2020-11-14 19:59:42 -07:00
3a549208b5 soc/intel/common: Add PCIe Runtime D3 driver for ACPI
This driver is for devices attached to a PCIe root port that support
Runtime D3.  It creates the necessary PowerResource in the root port to
provide _ON/_OFF methods for which will turn off power and clocks to the
device when it is in the D3cold state.

The mainboard declares the driver in devicetree and provides the GPIOs
that control power/reset for the device attached to the root port and
the SRCCLK pin used for the PMC IPC mailbox to enable/disable the clock.

An additional device property is created for storage devices if it
matches the PCI storage class which is used to indicate that the storage
device should use D3 for power savings.

BUG=b:160996445
TEST=boot on volteer device with this driver enabled in the devicetree
and disassemble the SSDT to ensure this code exists.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I13e59c996b4f5e4c2657694bda9fad869b64ffde
2020-11-14 19:59:25 -07:00
e2c16d57e3 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I13cd0997db873191951e5c74c819b00acbbf1e89
2020-11-14 19:56:37 -07:00
721cfbc4c5 Disable s3
Change-Id: I1fa063eed7f439ae390225340a10050d0549e65b
2020-11-14 16:35:35 -07:00
2ad8956e6a Add fivr and lpm config
Change-Id: I702cc273aed7d676016c587e38f31945948b2bc6
2020-11-13 21:55:23 -07:00
dfaccb9009 Enable S0iX
Change-Id: Iba1828a385456a1a5a4e998af9b22e312e298119
2020-11-13 19:58:42 -07:00
247a002d4a Disable PM timer to prevent TCO watchdog timeout on resume from suspend
Change-Id: I46047d5fe36320fbb4673ac92f523d8bb2832f0c
2020-11-13 09:14:39 -07:00
69ed89d502 Disable GPU RTD3 temporarily
Change-Id: I12ca425807c9a71137a7595fabad37ee2ebd35fc
2020-11-11 08:47:21 -07:00
82bca31f3f Disable CPU PCIE RP AER by default
Change-Id: I619e7845d16eeca5544cd88789facebe18742c46
2020-11-10 14:26:37 -07:00
e82bbc5f2f Enable smbus and fix m.2 clkreqs
Change-Id: I521a30570efafb528e4d77688677307507f97742
2020-11-10 09:18:47 -07:00
0ecb18229e Sync some galp5 and lemp10 gpios
Change-Id: I0159b093bb5fc6edde3ca94c014645f3a19cb148
2020-11-09 09:26:18 -07:00
2fb0138a9b Annotate lemp10 gpios
Change-Id: I54b39f7f58330bad642e80d6d04de3ca76671a06
2020-11-09 09:22:33 -07:00
ce6bff58d2 Allow TGL mixed topology to have mismatched SPD length
Change-Id: I1a0d66ed580cf2f11c61500b801335500b35c603
2020-11-06 11:01:01 -07:00
15436f7225 Enable lemp10 integrated memory
Change-Id: Ic2e74a34e2e1b3c0044f23d6b24114a5b0575f64
2020-11-06 10:41:17 -07:00
287fc4c7dc Update lemp10 touchpad GPIO
Change-Id: Idf45d3e41b4cf3c9480d0a11cfbd5017e69087cd
2020-11-03 11:43:14 -07:00
56da115d48 Disable integrated memory on lemp10 temporarily
Change-Id: I31bce31c853234f2e30a84e3da82434704da3ff3
2020-11-03 11:40:05 -07:00
fdfd543cca Sync galp5 and lemp10 romstage
Change-Id: I777d52fe47e5c60613442afc8c036c44fbe31ac6
2020-11-03 11:00:10 -07:00
00396acb5c Update devicetree definition of wifi
Change-Id: I1cfebe558953e375d17b8b98d627b05556ab5743
2020-11-03 10:40:47 -07:00
063c9484d7 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Idb9f8389e2f1b16091f06f2a786e44968b566be3
2020-11-03 10:26:49 -07:00
6576e07dd7 lemp10
Change-Id: Ia3d636931efd5bab6047a4305ba934b707043568
2020-10-30 11:48:31 -06:00
11d4c0495d Adjust touchpad interrupt
Change-Id: Ia04988d063b52fe03ef21a34a154b40af7c2bef4
2020-10-28 14:51:21 -06:00
8d7bbb9369 Fix galp5 compilation
Change-Id: I20eec17107cf7d609a8b21fede86095a29e34db7
2020-10-28 12:42:38 -06:00
3ace8eb089 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Ia43c6f4cdd97cd8c20a15a71499291ad4a92dedf
2020-10-28 12:03:28 -06:00
581081092e Update galp5 power limits
Change-Id: Ic9b22570cc2e61b5489f7bbdb58e7920a4507b7f
2020-10-27 08:36:48 -06:00
467ae4536d Move TGL MMCONF address to CNL address
Change-Id: Ibe2b299d8026ad84a0197093effcfa8756e4b7e9
2020-10-16 13:13:52 -06:00
bcd90d09a3 Use MMCONF address for DGPU PCIe registers
Change-Id: I6ff555e2695a6495b00af30daefae55cb0a532e7
2020-10-16 13:08:42 -06:00
87712d8d53 Fix use of DGPU_DEVICE config
Change-Id: I019227731e0f0db7f5202fa8144392dd8d073198
2020-10-16 12:54:40 -06:00
789a6f3815 Fix GPU root port
Change-Id: I270199003437634c7cd07efcafa9a01d48be6f15
2020-10-16 12:46:19 -06:00
4714bc94b1 Configurable GPU root port
Change-Id: Iae1641a407e075087179f11e186092b40c0c3022
2020-10-16 12:42:57 -06:00
a1aaca8cc8 Add i915_gpu_controller_info
Change-Id: I5f4e360974aefc75570ec20e500bb77bd962ca0a
2020-10-16 12:01:09 -06:00
d58c413a7a Enable NVIDIA GPU and ACPI backlight
Change-Id: If92c122ab2eaf0ef6fad13e2fe42b0532a25ee15
2020-10-16 11:56:32 -06:00
bd046ce5dd ROM stage has been confirmed
Change-Id: Ib2b73d8a9498907416a3f8c31f5eac0965310f66
2020-10-16 11:49:46 -06:00
94cfd014ee Add PEG60 IRQ mappings
Change-Id: I747a58fb056c5c19f4c4e3e50eedf2f396077f8b
2020-10-16 11:24:17 -06:00
3449cbbdca Disable GMA ACPI
Change-Id: Ifc07265b35bc41a980cb0c8f034294144409f510
2020-10-16 09:32:50 -06:00
1bb86c038d Adjustments to device tree
Change-Id: I3016dbdea9f6d6fb463d5306b7f4ffda2536e08c
2020-10-16 08:51:00 -06:00
a67207b24e Disable GPU sleep hook
Change-Id: I99cae1176de1a163cdcc7fde19c3757b26c590b5
2020-10-15 20:58:13 -06:00
ace9fe645a Enable more PCIe devices
Change-Id: I1113ae7f601b8c9db05ea8ec794d6e4b149af6b5
2020-10-15 20:54:01 -06:00
0a7afd5b4c Disable GPU driver
Change-Id: I689a7ff7ef1fec0e78d85116c4b97e7ba0f394fd
2020-10-15 20:53:50 -06:00
eb2feb01fe Fix UART and touchpad interrupt
Change-Id: I1a13f34d9efa0e381ffffa3bbc5263b6c3d94974
2020-10-15 19:41:51 -06:00
cbcb467005 Enable UART2_TXD
Change-Id: I130f92018524f1746133ae37bdc6106226082cfa
2020-10-15 12:49:16 -06:00
532ba5d55e Disable GPU, document GPIOs
Change-Id: Ieee0c7c5dd4a1e6da29bf3fca10ff957f89eaf95
2020-10-15 10:15:36 -06:00
3c0bcaa4a1 Add displayport config
Change-Id: Id86108ad223695c994018cc2c7481b168264dc00
2020-10-15 08:49:30 -06:00
ce3053ad87 Set continuous serirq
Change-Id: I2c099901a1e7b8b1402b5261c2a5c5a1685ec69f
2020-10-15 08:49:15 -06:00
83f634f231 Add SSD1 clkreq
Change-Id: Id10a760c2c854583297c53c096f588a7c58b2248
2020-10-14 20:21:13 -06:00
53be4d2666 Disable unused TBT devices
Change-Id: Id5831f95fd1ac3545063b6155f957bfe1943e340
2020-10-14 20:19:30 -06:00
3c75673da2 Adjust GPIO init to look like prior boards
Change-Id: I36ff193a1d540f1723f45ebd7326a02b24c090d7
2020-10-14 20:14:03 -06:00
d811be0127 Fix ROM stage
Change-Id: Iede1a99d7a40e236c8cf9a89f652e23adb2289ed
2020-10-14 20:13:50 -06:00
43da0a5d6e Updates for new FSP
Change-Id: I7709d5f69d113cc5a4464f0e163403ffea1f2313
2020-10-14 15:58:51 -06:00
a742e159e4 Fix DIMM addresses
Change-Id: I0314d0942a9f84e547d0899f723b33af3671a19c
2020-10-14 15:39:48 -06:00
05708809fc Add some GPIO comments
Change-Id: I5137f61e40f081da7d97f5478414b77fc13e0bca
2020-10-13 13:17:35 -06:00
bd9d221978 More compilation fixes
Change-Id: I9cfffd9792675eaaa036225f4229da127caa143f
2020-10-13 12:41:20 -06:00
da78b7d723 Add missing include
Change-Id: I03d9c548353af9067223723a67ad3996cd2f92a1
2020-10-13 12:31:05 -06:00
a90ec66c0a Fix compilation
Change-Id: Ie6e0bf1d4ad7829d0d76c716d241ac5c15e9c331
2020-10-13 12:29:53 -06:00
9d7f328e41 galp5
Change-Id: I09342ee3a49331f8c1463f962ea8fc2d522ef448
2020-10-13 11:59:41 -06:00
ce6ff1d16f Update .gitmodules
Change-Id: I8c6e912aedc4527b58009ec930e9769424af4ba4
2020-10-13 11:59:05 -06:00
3a3b10b81d Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I10d9f61ff58ff2edd7d6e8430dd42be3b93cc994
2020-10-13 11:54:56 -06:00
8be09c0c61 mb/system76/oryp5: Use VBT from oryp6
Change-Id: I0c2c9fd90ad9b54ce7af3c67c747f7c7e299632a
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-10-07 06:32:56 -07:00
a88ed3f87a mb/system76/oryp5: gpio: Convert raw pads to macros
Tested with BUILD_TIMELESS=1

Change-Id: I5e9c2eae1245690e1efccf1211dcaee831067436
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-10-07 06:32:56 -07:00
32a9c2f786 mb/system76/oryp5: Add Oryx Pro 5
Change-Id: I0bbbddbb46c1a4a70146e7384ce1fbc9448c9269
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-10-07 06:32:56 -07:00
5a710b2387 Add PCI_DEVICE_ID_INTEL_CNP_H_SMBUS to soc/intel/common/block/smbus/smbus.c
Change-Id: I9fd425b199c17d11c49add504c645d9aa1aae122
2020-10-05 13:58:14 -07:00
a4a356011b Sync addw1 with addw2
Change-Id: Ie4bf24567eb3da046e6b2102e61db697e7c0f932
2020-10-05 13:58:14 -07:00
84bb9befff addw1
Change-Id: Iae42a750dce4d93d1dea75eef6c47f08160f3fe1
2020-10-05 13:58:14 -07:00
caf3ce984c Save and restore ECOS during suspend/resume
Change-Id: I137ef6c574a372601bc51f6e815158767acd0e1b
2020-09-29 19:42:54 -06:00
35d6693a27 mb/system76: Enable battery charging thresholds
Change-Id: Icdd0d67c4d054fdbbb726db4827ca6164753c477
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-22 16:08:13 -06:00
1f24cd4271 ec/system76/ec: Add battery charging thresholds
Change-Id: I3d656291c096f320d469274677e9fe6c74819d25
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-22 16:08:13 -06:00
2ee83f8df4 cml-u,whl-u: Disable above 4G allocation to fix running out of MTRRs
Change-Id: Icfee8750ad225e5b4f2fd1118230b7c0b8d0f850
2020-09-22 11:21:38 -06:00
64004943b4 cml-u: Remove unused TBT ACPI code
Change-Id: Iade0316d76f2bd1fb037fcdb18e7d81f3b6fdbb0
2020-09-22 06:23:05 -06:00
c97a435978 cml-u: Sync devicetree changes from lemp9
Change-Id: I69855d082708b185815343b2d92807f3028b2478
2020-09-22 06:23:01 -06:00
e13bade2dd cml-u: Remove hacks no longer required for thunderbolt and camera toggle
Change-Id: I17e293f524253a14d7a07842f7abf8e75ad472a8
2020-09-22 06:22:55 -06:00
1853d8737b mb/system76: Convert to devicetree subsystemid
Upstream has converted all uses of SUBSYSTEM_{VENDOR,DEVICE}_ID in
Kconfig to subsystemid in devicetree. It will soon produce a lint error
from Jenkins [1].

[1]: https://review.coreboot.org/c/coreboot/+/45513/

Change-Id: I66d5d5f23d3c8ab6ed79dad432a0773841147eea
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-21 08:12:25 -06:00
7ba5665046 mb/system76/thelio-b1: Fix devicetree formatting
Change-Id: I35b238aaea49b6213c1b4094d0ac153ab9a76c8c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-21 08:12:25 -06:00
1ff8f316f4 ec/system76/ec: Sync changes from upstream
Change-Id: I277324a731548fd9d30e790922834172ac86c2a3
2020-09-18 11:52:27 -06:00
3dd5bc6550 mb/system76: Remove FSP_M_XIP
FSP_M_XIP is already selected by the soc.

Ref: 48833363da ("mb/system76/lemp9: drop FSP_M_XIP")
Change-Id: I4bb33208119e27d036e8a0bcb63a99dec9cf3bce
2020-09-17 09:56:28 -06:00
1a8107d238 Add OLED screen toggle 2020-09-03 12:13:31 -06:00
b39c286f31 Add ACPI thermal interface to S76D
Change-Id: I1ada73d5a255074a2f628e18cc605e8dc6109c0e
2020-09-03 12:13:31 -06:00
f338b238da gaze15: fix touchpad interrupt
Change-Id: I535fa847d791aa2d7c805ce616163d7582b689b0
2020-09-02 08:40:50 -06:00
fa5896209f ec/system76/ec: Clean up and document ACPI EC registers
Change-Id: I8d60b1826fd5402978fb7092fe807da0c4dd5179
2020-09-02 08:40:50 -06:00
fbf0bd5b7e soc/intel/cannonlake: Allow setting of PCIe subsystem IDs after FSP SiliconInit
Change-Id: Ie5c7d497e4a64a2f5e2960a2cdca8e5780dc07ea
2020-08-24 14:49:06 -06:00
264a0fee22 soc/intel/cannonlake/acpi/serialio.asl: Don't advertise unavailable devices
On PCH-H the I2C4 0:19.0 device isn't usable and thus 0:19.1 and
0:19.2 can't be detected using standard PCI probing.

Remove I2C4, I2C5 and UART2 from generic ASL code on PCH-H platforms
that advertise its PCI conformance by the _ADR attribute.

Change-Id: I89f9ab7d4afb2e7d1b1e24d072adf99e0da6fecf
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-24 10:22:08 -06:00
fbd57b1dac soc/intel/cannonlake: Fix DMAR when no iGPU is present
Don't emit RMRR for the iGPU if it's not present. This is done on
other platforms as well.

Fixes an DMAR error seen in dmesg on platforms without iGPU.

Change-Id: Iafe86e6938a120b707aaae935cb8168f790bb22f
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43994
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 10:22:05 -06:00
f6268a00d4 soc/intel/cannonlake: Add PCIe RP 17-24 ACPI information
Change-Id: I119b9cd6dbaa8f2d17d6132dbd9d44a778ff8111
2020-08-20 14:06:32 -06:00
4f1c9f486a soc/intel/cannonlake: Add Iccmax and loadlines for CML-S
Following up 3ccae2b7, this patch adds Iccmax and AC/DC
loadlines and iPL2 for CML-S CPUs. The information is from
CML EDS volume 1, doc #606599 and pdg #610244.

Change-Id: Id2797a979a8b6a52a34baae66f95c7136ed1dc72
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
2020-08-19 14:20:55 -06:00
fa580ac218 bonw14: set TBT reset GPIOs to RSMRST reset group 2020-08-19 13:01:14 -06:00
0cdfae9d40 gaze15: fix display GPIOs
Change-Id: I3273f8bf668d16c4ede81695e2676db77047df42
2020-08-19 11:49:41 -06:00
eb1110c8d0 bonw14: fix TBT 2020-08-19 11:38:23 -06:00
d928cd856b addw2: add annotations for LAN and TBT reset lines 2020-08-19 11:38:23 -06:00
729a256348 soc/intel/cannonlake: Allow PCIe root port #1 to use clockreq 2020-08-19 11:38:22 -06:00
a9d462e94f Add Cometlake-H/S Q0 (10+2) CPU 2020-08-19 11:38:22 -06:00
376945c45f mb/system76/gaze15: Add NB_ENAVDD to early_gpio_table
Fixes FSP not finding a valid framebuffer on reboots, which resulted in
a black screen when running the edk2 payload.

Change-Id: I946adb0657c07cf6c5a9aeb369e4fdfd8826abb2
2020-08-14 12:15:33 -06:00
25e164c5e2 mb/system76/gaze15: Annotate GPIOs
This was done using the schematics for the 15" GTX 1660 Ti variant.

Change-Id: I2f7628d68bd5491438b6d71556b5cb73873b9b89
2020-08-14 11:34:44 -06:00
df0ecca51d select TPM_RDRESP_NEED_DELAY for system76 laptops
Change-Id: I7909b05e9203ce9ad07c8e87a847bc46cf281b34
2020-08-13 13:12:15 -06:00
e4bfd5b28a Merge pull request #23 from system76/bonw14
bonw14
2020-08-13 12:20:24 -06:00
fe9ea17423 bonw14
Change-Id: I533acb5e835de97c1ac52a201bca95671f53d932
2020-08-13 12:18:59 -06:00
efe04c82e0 mb/system76: Fix left USB3 port on gaze14/gaze15
The USB table in the manuals incorrectly list the USB3 port as 5.
The labeled pins show it correctly as port 2.

Change-Id: I9a6a96af847ca66ad667738d83cfca7c3166956a
2020-08-13 08:01:00 -06:00
011439cb91 Sync addw2 devicetree with oryp6
Change-Id: Id32845c96479ce124a6bb55c2434e78e6f96b519
2020-08-06 08:24:46 -06:00
599ca05c8c Update devicetree.cb 2020-08-04 10:42:15 -06:00
d563135d4b Sync changes from upstream PRs
Change-Id: If65cd6262ab625047edb8d242d00f520e4ff8d14
2020-07-21 09:09:38 -06:00
bccef94545 Quote MAINBOARD_DIR
Change-Id: Ida3ca099fd8ab6d7b1112e5f203b791e6c46dd0d
2020-07-20 12:09:30 -06:00
dca083da74 Absolute path for qc_blobs in gitmodules
Change-Id: I5bab7ace1503f54fafff9073b35f9b3e0952c0b7
2020-07-20 11:55:13 -06:00
94612338ef Merge remote-tracking branch 'upstream/master' into system76
Change-Id: Idceb013b3495324b8d84a388ea5ee5b5ea4b69db
2020-07-20 11:54:36 -06:00
9e729e44a8 Refactor DGPU support code into drivers/system76/dgpu
Change-Id: Id29d6ade82b7212a3a68f6f3c27769e17d3fdcdc
2020-07-20 11:52:44 -06:00
65600cdec6 Move most mainboard/system76 ACPI code to ec/system76 (#21)
* Move most mainboard/system76 ACPI code to ec/system76

* Move drivers/system76_ec to ec/system76

* Include system76_ec.c when CONSOLE_SYSTEM76 is set

* Fix inclusion of system76 EC code

* Default CONSOLE_SYSTEM76_EC to n

* addw2: fix SSD2 clkreq
2020-07-18 13:49:05 -06:00
8321d760b0 Add addw2 smart amp init
Change-Id: Icbd640dd9584f0c58833dffc9a46a6afb4787abc
2020-07-14 11:29:11 -06:00
cff2635a22 Move smart-amp init to mainboard
Change-Id: I8f60e98d7d8f70c7a7374baf978461c963694cb8
2020-07-14 09:45:51 -06:00
f3ba5937e7 Change system76_ec timeout to 10 ms
Change-Id: Ic3d01892df83c09d8323433585e1d8fe507f8c3a
2020-07-02 09:39:46 -06:00
5a9fddc3de gaze15 does not support SaOcSupport 2020-07-01 15:23:52 -06:00
46dacbd7c3 Sync addw2 and gaze15 with oryp6 2020-07-01 12:44:59 -06:00
9ba7399ee9 oryp6: allow memory clocks higher than 2933 MHz
Change-Id: I6ea0e402f5ec0c89fa97cdd50615209551ad839f
2020-06-30 15:28:06 -06:00
4459b6355f oryp6: set reset config of TBT GPIO pins to RSMRST, and configure them early 2020-06-29 14:15:38 -06:00
04c88e9113 oryp6: Set M.2 and LAN power and reset lines to reset with RSMRST to avoid glitching during reboots 2020-06-29 10:12:23 -06:00
87a74eb767 oryp6: set subsystem IDs
Change-Id: I659ae6da3c5ff61c22a10ed112b82984cb3168d7
2020-06-26 14:25:57 -07:00
264f4cd55b oryp6: Enable DMIC microphone on ALC1220 2020-06-26 10:35:03 -07:00
8e7ffe4952 Refactor DGPU implementation, fix hybrid suspend
Change-Id: Ia7873a016e003532346170a3d27469bf085a47c4
2020-06-26 10:35:03 -07:00
3b8e9fa539 oryp6: Disable PCH DMIC, remove verbs for other codecs
Change-Id: Ib22dca12568ec768a0b10883c38dfb0fcf4e4499
2020-06-26 10:35:03 -07:00
b294e590d9 oryp6: Add GPIO_LANRTD3 to early_gpio_table 2020-06-25 11:02:57 -06:00
6e2c6eb6b5 oryp6: Add GPIO descriptions
Change-Id: I668d72e655ceb12d7f15ffff51b86780628b4bbf
2020-06-25 10:27:23 -06:00
f1e696b4a5 Add smart amp init
Change-Id: I55749428284387629ba760fc713d0bfb62e8f8ab
2020-06-23 14:10:53 -06:00
11aca6bb7c Add stub for tas5825m driver and add it to oryp6 model 2020-06-19 09:39:18 -06:00
90a93a8a32 Update cml-h pl2 to 90W
Change-Id: Ibc1c142c4191334308eb02c5dee65d38c51b34e8
2020-06-17 11:52:14 -06:00
e0de23478e Sync addw2 and gaze15 with oryp6
Change-Id: Ifb117d95d98c42a8ed0004e66b822df947e610ba
2020-06-17 11:29:11 -06:00
b0a89bfc26 Disable GPU power if GC6 is not enterred 2020-06-16 09:21:47 -06:00
c9ec63b78b oryp6 GC6 support
Change-Id: Ic2be6aecf1c4ab1fbba6b20d1d2a11e4b69df07f
2020-06-11 22:04:16 -06:00
0484c85cb3 Disable s0ix
Change-Id: I8c3249a6c5f652a0a032835e55a2045b95758aa5
2020-06-11 12:55:57 -06:00
8a580cb7a7 Add ACPI backlight code
Change-Id: I325fb544e2f2fa06606fd02138b95b236782fdbf
2020-06-11 12:55:57 -06:00
bc3e31005d Use DISABLE HECI message instead of HMRFPO
Change-Id: If1c3dfed4aff7f8299951cfe429677c9ea92b086
2020-06-11 12:55:57 -06:00
1ca3e44c90 Add gaze15 and oryp6
Change-Id: Iff7c619b388f95ef60b32a77858c790d2e0f6126
2020-06-11 12:55:57 -06:00
42cf287a62 Disable i2c-hid on galp3-c and galp4 2020-06-04 11:42:37 -06:00
05577fc186 Revert "whl-u: remove invalid i2c_hid interrupt"
This reverts commit 09b8f28bb0.
2020-06-04 11:27:04 -06:00
09b8f28bb0 whl-u: remove invalid i2c_hid interrupt
Change-Id: Id62800031ba9c2e990bfd25de708ab249c9f2e96
2020-06-04 11:13:57 -06:00
cde1985ec3 Add addw2
Change-Id: I773fc5561857591da12c31f0f7be9f74cc98a239
2020-06-04 10:11:18 -06:00
5b18ffb566 Update cannonlake FSP
Change-Id: I7be51195779a1cca77186e8dab54b168fc234fb0
2020-06-04 10:09:13 -06:00
24ba49558e system76_ec: Improve performance
Change-Id: I4c35dd70067d78c3eded549de1a37ded6db3d364
2020-06-04 10:05:39 -06:00
d06f9c7699 kbl-u: Fix compilation 2020-06-04 09:13:54 -06:00
6bd5d1934c kbl-u: remove MAINBOARD_USES_FSP2_0 2020-06-04 08:59:27 -06:00
37dc6de31d kbl-u: Sync some changes from whl-u 2020-06-04 08:56:09 -06:00
5c6c34c32b whl-u: Sync with cml-u 2020-06-04 08:41:06 -06:00
64faf29f6b cml-u: enable s0ix and c6dram 2020-06-04 08:40:48 -06:00
27753e2b4f lemp9: enable s0ix and c6dram 2020-06-04 08:40:35 -06:00
7f40e1b1f7 lemp9: Remove backlight code 2020-06-04 08:40:21 -06:00
15eec6ad44 cml-u: sync with lemp9, enable i2c-hid 2020-06-03 15:39:47 -06:00
ba59168f06 cml-u: update license headers 2020-06-03 15:39:19 -06:00
a14d7ac871 Fix submodule URLs 2020-06-03 14:19:46 -06:00
0625765de5 Merge remote-tracking branch 'origin/master' into system76
Change-Id: I4593b91276d447f8ac00daca7388fdfb22bca7f2
2020-06-01 14:11:34 -06:00
b7dd4abee4 Sync cannonlake graphics with skylake 2020-05-15 13:03:55 -06:00
ec5cb88ea1 Merge tag '4.12' into system76
coreboot version 4.12
2020-05-15 13:01:54 -06:00
37384c6b67 Improve support for Intel HID event filter 2020-05-15 11:43:36 -06:00
0348ce2085 mainboard/system76: Fix compiling other boards on 4.12
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-05-13 12:15:45 -06:00
45535e4a05 lemp9: add custom backlight levels 2020-05-09 13:26:35 -06:00
e294752055 Work around double definition of GFX0 2020-05-09 13:11:52 -06:00
88117c16f0 Update serirq mode in lemp9 mainboard 2020-05-09 13:11:28 -06:00
d164dd2f24 Fix merge issues in src/soc/intel 2020-05-09 13:09:05 -06:00
f208e51e57 Merge remote-tracking branch 'upstream/master' into system76 2020-05-09 12:56:34 -06:00
0f11811ab7 mainboard/system76/lemp9: add GMA backlight control 2020-05-09 12:37:26 -06:00
fa200b0587 soc/intel/cannonlake: add GMA backlight control 2020-05-09 12:36:59 -06:00
419d23908a Enable i2c-hid interface for touchpad 2020-05-09 09:37:08 -06:00
84ff4bbc2b Fix clkreq comments 2020-04-08 16:19:44 -06:00
888064d65d Enable system agent thermal device 2020-04-06 08:08:52 -06:00
f33e07f0bc lemp9: increase power limits to 20W/30W 2020-04-05 13:14:28 -06:00
9364864ad1 lemp9: remove sleeps from ACPI tables 2020-04-05 13:13:50 -06:00
2edffffa2d System76 EC console support
Change-Id: I04c2aeb19d780a7c6638b502192fa9f569e32e94
2020-03-15 12:23:51 -06:00
8d7937abb9 Move EC memory map to avoid conflicts 2020-02-25 14:20:19 -07:00
4bf67af212 Add LPC decode of new memory map regions to cml-u and whl-u 2020-02-18 10:22:15 -07:00
89f919072d TPM_PIRQ is not required 2020-02-17 20:21:01 -07:00
1bd5d2e07d Do not set TPM IRQ in GPIO settings
Change-Id: Iba2aea1908c23640546801cc5ef54dbd4e392259
2020-02-17 20:08:26 -07:00
afb3a7bd22 TPM support
Change-Id: I1d106ac7da4d7229706cb8ad5a98c58b32d86a40
2020-02-17 19:27:22 -07:00
d48dd84ae8 Add LPC decode of new memory map regions 2020-02-17 09:24:23 -07:00
92780afb68 Update pin configuration for headset microphone 2020-02-13 14:15:25 -07:00
adc0d3b4e9 Merge remote-tracking branch 'upstream/master' into system76 2020-02-13 14:03:34 -07:00
3f76a2ec4c Merge remote-tracking branch 'upstream/master' into system76 2020-01-27 12:28:25 -07:00
5cb80763d7 Fix syntax error from last commit 2020-01-22 10:35:16 -07:00
1c6cbf3a6a Update cml-u and whl-u with lemp9 changes 2020-01-22 10:34:04 -07:00
887093b627 Allow FSP to use coreboot stack 2020-01-22 10:19:01 -07:00
6fbb57fb22 Add serirq setting to lemp9 2020-01-22 10:18:47 -07:00
f0bd902a2a Merge remote-tracking branch 'upstream/master' into system76 2020-01-22 10:11:28 -07:00
3005ceecf2 mainboard/system76: Add System76 Lemur Pro (lemp9)
The System76 Lemur Pro (lemp9) is an upcoming laptop computer. Support
in coreboot is developed by System76 and provided as the default
firmware option. Testing is done on a pre-production model expected to
be identical from a firmware perspective to the production model.

Working:
- Payload
    - Tianocore
- CPU
    - Intel i7-10510U
    - Intel i5-10210U
- EC
    - ITE IT5570E running https://github.com/system76/ec
    - Backlit Keyboard, with standard PS/2 keycodes and SCI hotkeys
    - Battery
    - Charger, using AC adapter or USB-C PD
    - Suspend/resume
    - Touchpad
- GPU
    - Intel UHD Graphics 620
    - GOP driver is recommended, VBT is provided
    - eDP 14-inch 1920x1080 LCD
    - HDMI video
    - USB-C DisplayPort video
- Memory
    - 8-GB DDR4 Samsung K4AAG165WA-BCTD (Channel 0)
    - 8-GB/16-GB/32-GB DDR4 SO-DIMM (Channel 1)
- Networking
    - M.2 PCIe/CNVi WiFi/Bluetooth
- Sound
    - Realtek ALC293D
    - Internal speaker
    - Internal microphone
    - Combined headphone/microphone 3.5-mm jack
    - HDMI audio
    - USB-C DisplayPort audio
- Storage
    - M.2 PCIe/SATA SSD-1
    - M.2 PCIe/SATA SSD-2
    - RTS5227S MicroSD card reader
- USB
    - 1280x720 CCD camera
    - USB 3.1 Gen 2 Type-C (left)
    - USB 3.1 Gen 2 Type-A (left)
    - USB 3.1 Gen 1 Type-A (right)

Not working:
- TPM2 - SPI bus 0, chip select 2 is used. Chip selects other than 0
  are not currently supported by the intel fast_spi driver.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: Ib0a32bbc6f89a662085ab4a254676bc1fad7dc60
2020-01-22 10:09:25 -07:00
8aa05ff5de Remove lemp9 to prepare for merge of upstream lemp9 PR 2020-01-22 10:09:13 -07:00
3b4db8f4a7 Merge branch 'upstream-35946' into system76 2020-01-13 11:05:21 -07:00
d4440fa641 pciexp: Add support for allocating PCI express hotplug resources
This change adds support for allocating resources for PCI express hotplug
bridges when PCIEXP_HOTPLUG is selected. By default, this will add 32 PCI
subordinate numbers (buses), 256 MiB of prefetchable memory, 8 MiB of
non-prefetchable memory, and 8 KiB of I/O space to any device with the
PCI_EXP_SLTCAP_HPC bit set in the PCI_EXP_SLTCAP register, which
indicates hot-plugging capability. The resource allocation is configurable,
please see the PCIEXP_HOTPLUG_* variables in src/device/Kconfig.

In order to support the allocation of hotplugged PCI buses, a new field
is added to struct device called hotplug_buses. This is defaulted to
zero, but when set, it adds the hotplug_buses value to the subordinate
value of the PCI bridge. This allows devices to be plugged in and
unplugged after boot.

This code was tested on the System76 Darter Pro (darp6). Before this
change, there are not enough resources allocated to the Thunderbolt
PCI bridge to allow plugging in new devices after boot. This can be
worked around in the Linux kernel by passing a boot param such as:
pci=assign-busses,hpbussize=32,realloc

This change makes it possible to use Thunderbolt hotplugging without
kernel parameters, and attempts to match closely what our motherboard
manufacturer's firmware does by default.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I500191626584b83e6a8ae38417fd324b5e803afc
2020-01-13 11:03:00 -07:00
28dab93390 Enable deep s5 for lemp9 2019-12-21 15:56:32 -07:00
4f613c1b1f Fix inclusion of SPD information 2019-12-17 16:09:29 -07:00
9c786fa310 Add lemp9 2019-12-17 15:48:54 -07:00
8a3dadab7c Revert "Set USB power plane to off during restart"
This reverts commit ca35998d29.
2019-11-20 08:43:58 -07:00
f81e2ad385 Update kbl-u 2019-11-19 08:57:13 -07:00
ca35998d29 Set USB power plane to off during restart
Change-Id: I9d722b7b74dac1ccb7f0a80559cbdf763f4c6c1f
2019-11-04 18:45:17 -07:00
d49c64e17f Revert "Full reset by default"
This reverts commit 5bf53bc73b.
2019-11-04 14:26:05 -07:00
5bf53bc73b Full reset by default 2019-11-04 14:14:57 -07:00
560238e052 Fix sleepstates ACPI include 2019-11-04 09:31:21 -07:00
ecd04d98b2 Fix globalnvs ACPI include 2019-11-04 09:27:26 -07:00
dae38b24e7 Remove duplicate code 2019-11-04 09:03:32 -07:00
c8600c36d7 Merge remote-tracking branch 'upstream/master' into system75 2019-11-04 09:01:17 -07:00
37c69a0123 Update whl-u to match cml-u 2019-11-01 14:54:22 -06:00
27b4ae24f4 Only RP01 is a hotplug port 2019-10-30 15:48:01 -06:00
852283919e Enable UART 2019-10-30 12:08:01 -06:00
36f788c558 Disable HECI 2019-10-27 19:33:10 -06:00
ad1ddc0343 Set subsystem IDs 2019-10-24 09:57:48 -06:00
76e2ab61bb Disable thunderbolt force power and do not enable thunderbolt rtd3 power 2019-10-22 21:08:31 -06:00
46cc5d6b53 Set prefetch and non-prefetch hotplug memory separately 2019-10-11 10:15:34 -06:00
0a0b9c599d Add PCIe hotplug bridge support
Change-Id: I7b7ed634685d85a6ca30130c16b39007bd327167
2019-10-10 15:36:40 -06:00
610b680154 Remove thunderbolt driver
Change-Id: I2cfda79ab838e76170219e9081daf8218b4c09fc
2019-10-10 15:36:15 -06:00
486c132f1e Add comments 2019-10-09 21:36:31 -06:00
9ca336f837 Remove debugging 2019-10-09 21:33:58 -06:00
e2e360e3f8 Add hotplug_buses to device struct to allow removal of hack 2019-10-09 21:28:04 -06:00
9f16fa4e74 Hack to add 32 to subordinate 2019-10-09 16:44:38 -06:00
f0e552d664 Enable allocation of resources to device 1 on thunderbolt bus 2019-10-09 16:28:18 -06:00
a22c00bc39 Fix cml-u board info 2019-10-09 16:19:57 -06:00
14fa57aa54 Enable PCIE debug info and disable fake devices under thunderbolt controller 2019-10-09 15:11:14 -06:00
57d53e9635 WIP Thunderbolt support 2019-10-09 14:24:00 -06:00
954d813a61 soc/intel/cannonlake: Add debugging of a number of FSPM parameters
This implements soc_display_fspm_upd_params for soc/intel/cannonlake

Some parameters are available only on Coffee Lake FSP or Comet Lake FSP

Tested on System76 galp3-c (Coffee Lake FSP) and System76 galp4 (Comet 
Lake FSP)
2019-10-04 11:40:11 -06:00
d4e111ff97 Revert "soc/intel/cannonlake: Allow coreboot to reserve stack for fsp"
This reverts commit 349b6a1152.
2019-10-04 11:31:28 -06:00
86ddef58dc system76/whl-u: Do not use FSP from repository 2019-10-04 10:28:10 -06:00
0fd77e191b Merge remote-tracking branch 'upstream/master' into system76 2019-10-03 16:21:13 -06:00
015f42bbe4 Attempt to disable ME 2019-10-03 13:40:45 -06:00
7a944bda90 Remove old devicetree option 2019-10-02 11:10:46 -06:00
3225862d82 Update ACPI in system76 cfl-h mainboard 2019-10-02 11:08:52 -06:00
fbdb388c39 Revert "soc/intel/cannonlake: Remove DMA support for PTT"
This reverts commit d5018a8f78.
2019-10-02 10:15:22 -06:00
3e2083ba43 Merge remote-tracking branch 'upstream/master' into system76 2019-10-02 08:05:15 -06:00
00b6224b65 Update smmstore patches 2019-09-26 15:01:19 -06:00
57c382c424 Merge branch 'master' into system76 2019-09-26 14:57:23 -06:00
bc09219912 Fix camera toggle on cml-u 2019-09-23 13:58:48 -06:00
9d22c72d15 Use i2ec to enable camera toggle 2019-09-23 12:58:12 -06:00
d99ff72fa9 Fix SMMSTORE compilation in QEMU target 2019-09-20 14:07:50 -06:00
7214976b60 Fix use of PCI ID 2019-09-19 16:25:10 -06:00
ea8658b1d1 Fix mainboard_dir 2019-09-19 16:23:20 -06:00
ad626ce7de Disable FSP_USE_REPO 2019-09-19 16:20:01 -06:00
49b4fe8478 Fix darp6 name 2019-09-19 16:04:18 -06:00
26f0060f60 Add Comet Lake U models 2019-09-19 15:52:02 -06:00
b09afbb9fa Fix failure to boot grub by enabling the 8254 timer 2019-08-30 09:59:50 -06:00
aaba647096 Port previous commit to kbl-u 2019-08-22 10:54:02 -06:00
5e46698ee9 Merge branch 'system76_cleanup' of https://github.com/system76/coreboot into system76_cleanup 2019-08-22 10:50:56 -06:00
a8cb89b101 Improvements for color keyboard when kernel driver not loaded 2019-08-22 10:50:45 -06:00
fcd2891d6f Implement EC init for kbl-u 2019-08-21 14:54:31 -06:00
d472cda80a Move EC initialization from kernel driver to ACPI and motherboard init 2019-08-21 12:36:20 -06:00
7c8a9f60f4 Enable PCH SPI 2019-08-09 11:44:19 -06:00
fc1062809a Fix smmstore compilation 2019-08-09 10:00:08 -06:00
8a734e7045 Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-08-09 09:52:58 -06:00
5a4a99cf43 Fix compilation of bootblock 2019-08-09 09:14:33 -06:00
adc9851e1f Add bootblock to set early GPIOs, set TBT GPIOs to match proprietary BIOS 2019-08-09 09:02:12 -06:00
9784a2c677 Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-07-15 14:28:03 -06:00
f7b117bba7 Remove old clock gate patch 2019-07-15 14:26:18 -06:00
95778bf7ea Merge branch 'master' into system76_cleanup
Change-Id: Ida07401fa877243cc64fae9ac96a65b5a58d01ab
2019-07-01 08:30:40 -06:00
744c9acbe1 Organize GPPs by name 2019-06-26 13:47:53 -06:00
99406e6b09 Fix PMC and GPIO mappings (again) 2019-06-26 13:44:10 -06:00
f5519f0df3 Truly fix gpio misccfg values 2019-06-26 10:36:29 -06:00
fbfba7cb84 Revert "Fix gpio miscfg register values"
This reverts commit d1e6a842c7.
2019-06-26 10:26:19 -06:00
82dd1fc5a1 Add device specific data for thunderbolt 2019-06-26 10:03:18 -06:00
97317433ed Force thunderbolt power 2019-06-26 10:03:05 -06:00
87e186e7a8 Update gpe config 2019-06-20 15:58:29 -06:00
d1e6a842c7 Fix gpio miscfg register values 2019-06-20 15:58:20 -06:00
1d39c09349 Add more EC RAM items 2019-06-20 14:51:32 -06:00
fcba28382a Fix order of outb 2019-06-20 14:51:16 -06:00
2e9bae8216 Fix PMC GPP mappings 2019-06-20 14:51:05 -06:00
0bcf238f2c Update gpio's after fixing coreboot-collector 2019-06-20 13:57:30 -06:00
80c4017d85 Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-06-13 14:36:33 -06:00
8d5df05d7d Add code to attempt to enable GPU, when configured 2019-06-13 14:29:53 -06:00
39223b859e Update whl-u memory config 2019-06-12 10:52:56 -06:00
2106c470f3 Add gaze14 1660ti variant files 2019-06-06 14:49:49 -06:00
ee528da151 Fix smmstore driver compilation 2019-06-05 14:19:48 -06:00
6adc503a3b Update cfl-h to new memory configuration struct 2019-06-05 14:19:34 -06:00
1eb4a65e0a Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-06-05 14:09:13 -06:00
aeb79392cc Remove pei_data from kbl-u 2019-06-04 08:27:02 -06:00
53c0e6c494 Fix slow serial 2019-05-13 14:21:47 -06:00
1c813a7e4b Initialize early GPIOs 2019-05-13 14:03:59 -06:00
6ac5c4bf8a Disable C22 and C23 2019-05-13 14:01:37 -06:00
e90c6c8e4c No longer need NO_UART_ON_SUPERIO 2019-05-13 14:00:36 -06:00
d249ac929f Enable UART, unlock GPIO, set clksrcusage for GPU 2019-05-13 13:04:52 -06:00
09f85ecf66 Enable SATA ports 2019-05-13 10:49:17 -06:00
635c88090e Enable more PCI devices 2019-05-13 10:49:10 -06:00
34b4341eac Define NO_UART_ON_SUPERIO 2019-05-13 09:04:59 -06:00
12bb32890f Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-05-10 17:35:18 -06:00
6512180461 Update ACPI GPE config 2019-05-10 11:07:09 -06:00
764d87a6d4 Update LPC and GPE config 2019-05-10 11:03:24 -06:00
747364169f Update GPIO settings 2019-05-10 10:19:02 -06:00
6bbc98a1ef Update CPU count and add GPU clkreq 2019-05-10 10:18:52 -06:00
5580493101 Add HDA settings and disable GPU by default (temporary) 2019-05-10 08:42:54 -06:00
724c1b5cf8 Use color keyboard ACPI tables on gaze14 2019-05-09 21:35:32 -06:00
852d63f618 Fix gpio syntax 2019-05-09 21:32:44 -06:00
e90740693f WIP: add cfl-h models, starting with gaze14 2019-05-09 20:54:13 -06:00
b99d0bfa32 Update memory settings for thelio-b1 2019-05-06 11:47:23 -06:00
51802ead2d Fix thelio-b1 devicetree 2019-05-02 20:44:32 -06:00
b0f598558e whl-u: Remove VmxEnable and DebugConsent from devicetree.cb 2019-05-02 15:41:18 -06:00
28148e9442 Add system76 mainboard module 2019-05-02 15:32:17 -06:00
8a67395e4e Update .gitmodules 2019-05-02 15:32:06 -06:00
e1e1025c6b Revert "soc/intel/cannonlake: Remove DMA support for PTT"
This reverts commit d5018a8f78.
2019-05-02 15:31:16 -06:00
67a5b962d0 soc/intel/cannonlake: Set correct serirq mode based on SERIRQ_CONTINUOUS_MODE
Tested on system76 galp3-c

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I9ad4f5a6c7391fc6e813ec1306c708f449a69f59
2019-05-02 15:29:09 -06:00
00b535505d soc/intel/cannonlake: Set FSP-S Enable8254ClockGating using clock_gate_8254 devicetree parameter
Tested on system76 galp3-c

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: Id346173ac7ae5246de0b38b9dd23be7b72e70f1e
2019-05-02 15:27:04 -06:00
946ecabd31 sb/intel/common/smihandler: Hook up smmstore
TESTED on Asus P5QC

Change-Id: I20b87f3dcb898656ad31478820dd5153e4053cb2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
2019-05-02 15:24:30 -06:00
ef4042cf61 drivers/smmstore: Fix some issues
This fixes the following:
- Fix smmstore_read_region to actually read stuff
- Make the API ARCH independent (no dependency on size_t)
- clean up the code a little
- Change the loglevel for non error messages to BIOS_DEBUG

Change-Id: I629be25d2a9b65796ae8f7a700b6bdab57b91b22
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
2019-05-02 15:24:13 -06:00
298 changed files with 34598 additions and 613 deletions

32
.gitmodules vendored
View File

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

View File

@ -720,6 +720,12 @@ config ACPI_NHLT
help
Build support for NHLT (non HD Audio) ACPI table generation.
config ACPI_LPIT
bool
default y
help
Build an ACPI Low Power Idle Table.
#These Options are here to avoid "undefined" warnings.
#The actual selection and help texts are in the following menu.

View File

@ -1264,6 +1264,78 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
acpi_checksum((void *) fadt, header->length);
}
/*
* The value of residency couneter register address is MSR value and
* implementation specific.e.e.g, scenerios:
* 1. For CNL: space_id:0,residency_counter.addrl:0x632 and ACPI_LPIT
* selected in soc Kconfig sysfs file thet kernel creates is
* /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us.
* 2. For CNL: space_id:0, residency_counter.addrl:0xfe000000 + 0x193C
* and ACPI_LPIT elected in soc Kconfig sysfs file thet kernel creates is
* /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us
* which gets populated with integer values whenever system goes in s0ix.
*/
__weak void soc_residency_counter(struct acpi_lpit_native *lpit_soc)
{
lpit_soc->header.unique_id = 0;
lpit_soc->residency = 0x7530;
lpit_soc->latency = 0xBB8;
lpit_soc->entry_trigger.space_id = 0x7f;
lpit_soc->entry_trigger.bit_width = 0x01;
lpit_soc->entry_trigger.bit_offset = 0x02;
lpit_soc->entry_trigger.addrl = 0x60;
lpit_soc->residency_counter.space_id = 0x7f;
lpit_soc->residency_counter.bit_width = 0x40;
lpit_soc->residency_counter.addrl = 0x632;
}
__weak void system_residency_counter(struct acpi_lpit_native *lpit_system)
{
lpit_system->header.unique_id = 1;
lpit_system->counter_frequency = 0x256c;
lpit_system->residency = 0x7530;
lpit_system->latency = 0xBB8;
lpit_system->entry_trigger.space_id = 0x7f;
lpit_system->entry_trigger.bit_width = 0x01;
lpit_system->entry_trigger.bit_offset = 0x02;
lpit_system->entry_trigger.addrl = 0x60;
lpit_system->residency_counter.space_id = 0x00;
lpit_system->residency_counter.bit_width = 0x20;
lpit_system->residency_counter.access_size = 0x03;
lpit_system->residency_counter.addrl = 0xfe00193c;
}
static void acpi_create_lpit_generator(acpi_table_lpit *lpit)
{
acpi_header_t *header = &(lpit->header);
memset((void *)lpit, 0, sizeof(acpi_table_lpit));
memcpy(header->signature, "LPIT", 4);
header->revision = 2; /* ACPI 1.0/2.0: ?, ACPI 3.0/4.0: 2 */
memcpy(header->oem_id, OEM_ID, 6);
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
header->oem_revision = 42;
memcpy(header->asl_compiler_id, ASLC, 4);
header->asl_compiler_revision = 0;
header->length = sizeof(acpi_table_lpit);
lpit->lpit_soc.header.length = sizeof(struct acpi_lpit_native);
lpit->lpit_system.header.length = sizeof(struct acpi_lpit_native);
soc_residency_counter(&lpit->lpit_soc);
system_residency_counter(&lpit->lpit_system);
/* (Re)calculate length and checksum. */
header->checksum = acpi_checksum((void *)lpit, header->length);
}
unsigned long __weak fw_cfg_acpi_tables(unsigned long start)
{
return 0;
@ -1284,6 +1356,7 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_tcpa_t *tcpa;
acpi_tpm2_t *tpm2;
acpi_madt_t *madt;
acpi_table_lpit *lpit;
struct device *dev;
unsigned long fw;
size_t slic_size, dsdt_size;
@ -1489,6 +1562,18 @@ unsigned long write_acpi_tables(unsigned long start)
current += madt->header.length;
acpi_add_table(rsdp, madt);
}
if (CONFIG(ACPI_LPIT)) {
printk(BIOS_DEBUG, "ACPI: * LPIT\n");
lpit = (acpi_table_lpit *)current;
acpi_create_lpit_generator(lpit);
if (lpit->header.length >= sizeof(acpi_table_lpit)) {
current += lpit->header.length;
acpi_add_table(rsdp, lpit);
}
}
current = acpi_align_current(current);
printk(BIOS_DEBUG, "current = %lx\n", current);

View File

@ -0,0 +1,5 @@
config DRIVERS_I2C_TAS5825M
bool
default n
help
Enable support for TI TAS5825M Amplifier.

View File

@ -0,0 +1 @@
ramstage-$(CONFIG_DRIVERS_I2C_TAS5825M) += tas5825m.c

View File

@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
struct drivers_i2c_tas5825m_config {
// Used to uniquely identify the AMP
int id;
};

View File

@ -0,0 +1,72 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <device/smbus.h>
#include <device/pci.h>
#include "chip.h"
#include "tas5825m.h"
int tas5825m_write_at(struct device *dev, uint8_t addr, uint8_t value) {
return smbus_write_byte(dev, addr, value);
}
//TODO: use I2C block write for better performance
int tas5825m_write_block_at(struct device *dev, uint8_t addr, const uint8_t * values, uint8_t length) {
int res = 0;
for (uint8_t i = 0; i < length; i++) {
res = smbus_write_byte(dev, addr + i, values[i]);
if (res < 0) return res;
}
return (int)length;
}
int tas5825m_set_page(struct device *dev, uint8_t page) {
return tas5825m_write_at(dev, 0x00, page);
}
int tas5825m_set_book(struct device *dev, uint8_t book) {
int res = tas5825m_set_page(dev, 0x00);
if (res < 0) return res;
return tas5825m_write_at(dev, 0x7F, book);
}
__weak int tas5825m_setup(struct device *dev, int id) {
printk(BIOS_ERR, "tas5825m: setup not implemented\n");
return -1;
}
static void tas5825m_init(struct device *dev) {
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C &&
ops_smbus_bus(get_pbus_smbus(dev))) {
printk(BIOS_DEBUG, "tas5825m at %s\n", dev_path(dev));
struct drivers_i2c_tas5825m_config *config = dev->chip_info;
if (config) {
printk(BIOS_DEBUG, "tas5825m id %d\n", config->id);
int res = tas5825m_setup(dev, config->id);
if (res) {
printk(BIOS_ERR, "tas5825m init failed: %d\n", res);
} else {
printk(BIOS_DEBUG, "tas5825m init successful\n");
}
} else {
printk(BIOS_ERR, "tas5825m: failed to find config\n");
}
}
}
static struct device_operations tas5825m_operations = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.init = tas5825m_init,
};
static void tas5825m_enable_dev(struct device *dev) {
dev->ops = &tas5825m_operations;
}
struct chip_operations drivers_i2c_tas5825m_ops = {
CHIP_NAME("TI TAS5825M Amplifier")
.enable_dev = tas5825m_enable_dev,
};

View File

@ -0,0 +1,12 @@
#ifndef TAS5825M_H
#define TAS5825M_H
#include <device/device.h>
int tas5825m_write_at(struct device *dev, uint8_t addr, uint8_t value);
int tas5825m_write_block_at(struct device *dev, uint8_t addr, const uint8_t * values, uint8_t length);
int tas5825m_set_page(struct device *dev, uint8_t page);
int tas5825m_set_book(struct device *dev, uint8_t book);
int tas5825m_setup(struct device *dev, int id);
#endif // TAS5825M_H

View File

@ -148,7 +148,7 @@
{
If (LEqual(^BOX3.XBCM (Arg0), Ones))
{
^LEGA.XBCM (Arg0)
//TODO: fix Windows initial setup ^LEGA.XBCM (Arg0)
}
}

View File

@ -0,0 +1,12 @@
config DRIVERS_SYSTEM76_DGPU
bool
default n
help
System76 switchable graphics support
#TODO: make this cleaner, use device tree?
config DRIVERS_SYSTEM76_DGPU_DEVICE
hex
default 0x01
help
System76 switchable graphics root device number

View File

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

View File

@ -0,0 +1,201 @@
/* SPDX-License-Identifier: GPL-2.0-only */
Device (\_SB.PCI0.PEGP) {
Name (_ADR, CONFIG_DRIVERS_SYSTEM76_DGPU_DEVICE << 16)
PowerResource (PWRR, 0, 0) {
Name (_STA, 1)
Method (_ON) {
Debug = "PEGP.PWRR._ON"
If (_STA != 1) {
\_SB.PCI0.PEGP.DEV0._ON ()
_STA = 1
}
}
Method (_OFF) {
Debug = "PEGP.PWRR._OFF"
If (_STA != 0) {
\_SB.PCI0.PEGP.DEV0._OFF ()
_STA = 0
}
}
}
Name (_PR0, Package () { \_SB.PCI0.PEGP.PWRR })
Name (_PR2, Package () { \_SB.PCI0.PEGP.PWRR })
Name (_PR3, Package () { \_SB.PCI0.PEGP.PWRR })
}
Device (\_SB.PCI0.PEGP.DEV0) {
Name(_ADR, 0x00000000)
Name (_STA, 0xF)
Name (LTRE, 0)
// Memory mapped PCI express registers
// Not sure what this stuff is, but it is used to get into GC6
OperationRegion (RPCX, SystemMemory, CONFIG_MMCONF_BASE_ADDRESS + 0x8000, 0x1000)
Field (RPCX, ByteAcc, NoLock, Preserve) {
PVID, 16,
PDID, 16,
CMDR, 8,
Offset (0x19),
PRBN, 8,
Offset (0x84),
D0ST, 2,
Offset (0xAA),
CEDR, 1,
Offset (0xAC),
, 4,
CMLW, 6,
Offset (0xB0),
ASPM, 2,
, 2,
P0LD, 1,
RTLK, 1,
Offset (0xC9),
, 2,
LREN, 1,
Offset (0x11A),
, 1,
VCNP, 1,
Offset (0x214),
Offset (0x216),
P0LS, 4,
Offset (0x248),
, 7,
Q0L2, 1,
Q0L0, 1,
Offset (0x504),
Offset (0x506),
PCFG, 2,
Offset (0x508),
TREN, 1,
Offset (0xC20),
, 4,
P0AP, 2,
Offset (0xC38),
, 3,
P0RM, 1,
Offset (0xC74),
P0LT, 4,
Offset (0xD0C),
, 20,
LREV, 1
}
Method (_ON) {
Debug = "PEGP.DEV0._ON"
If (_STA != 0xF) {
Debug = " If DGPU_PWR_EN low"
If (! GTXS (DGPU_PWR_EN)) {
Debug = " DGPU_PWR_EN high"
STXS (DGPU_PWR_EN)
Debug = " Sleep 16"
Sleep (16)
}
Debug = " DGPU_RST_N high"
STXS(DGPU_RST_N)
Debug = " Sleep 10"
Sleep (10)
Debug = " Q0L0 = 1"
Q0L0 = 1
Debug = " Sleep 16"
Sleep (16)
Debug = " While Q0L0"
Local0 = 0
While (Q0L0) {
If ((Local0 > 4)) {
Debug = " While Q0L0 timeout"
Break
}
Sleep (16)
Local0++
}
Debug = " P0RM = 0"
P0RM = 0
Debug = " P0AP = 0"
P0AP = 0
Debug = Concatenate(" LREN = ", ToHexString(LTRE))
LREN = LTRE
Debug = " CEDR = 1"
CEDR = 1
Debug = " CMDR |= 7"
CMDR |= 7
Debug = " _STA = 0xF"
_STA = 0xF
}
}
Method (_OFF) {
Debug = "PEGP.DEV0._OFF"
If (_STA != 0x5) {
Debug = Concatenate(" LTRE = ", ToHexString(LREN))
LTRE = LREN
Debug = " Q0L2 = 1"
Q0L2 = 1
Debug = " Sleep 16"
Sleep (16)
Debug = " While Q0L2"
Local0 = Zero
While (Q0L2) {
If ((Local0 > 4)) {
Debug = " While Q0L2 timeout"
Break
}
Sleep (16)
Local0++
}
Debug = " P0RM = 1"
P0RM = 1
Debug = " P0AP = 3"
P0AP = 3
Debug = " Sleep 10"
Sleep (10)
Debug = " DGPU_RST_N low"
CTXS(DGPU_RST_N)
Debug = " While DGPU_GC6 low"
Local0 = Zero
While (! GRXS(DGPU_GC6)) {
If ((Local0 > 4)) {
Debug = " While DGPU_GC6 low timeout"
Debug = " DGPU_PWR_EN low"
CTXS (DGPU_PWR_EN)
Break
}
Sleep (16)
Local0++
}
Debug = " _STA = 0x5"
_STA = 0x5
}
}
}

View File

@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0-only */
//TODO: do not require this to be included in mainboard bootblock.c
#include <console/console.h>
#include <delay.h>
#include <gpio.h>
static void dgpu_power_enable(int onoff) {
printk(BIOS_DEBUG, "system76: DGPU power %d\n", onoff);
if (onoff) {
gpio_set(DGPU_RST_N, 0);
mdelay(4);
gpio_set(DGPU_PWR_EN, 1);
mdelay(4);
gpio_set(DGPU_RST_N, 1);
} else {
gpio_set(DGPU_RST_N, 0);
mdelay(4);
gpio_set(DGPU_PWR_EN, 0);
}
mdelay(50);
}

View File

@ -0,0 +1,81 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootstate.h>
#include <console/console.h>
#include <device/pci.h>
static void dgpu_read_resources(struct device *dev) {
printk(BIOS_INFO, "system76: dgpu_read_resources %s\n", dev_path(dev));
pci_dev_read_resources(dev);
int bar;
// Find all BARs on DGPU, mark them above 4g if prefetchable
for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_5; bar += 4) {
printk(BIOS_INFO, " BAR at 0x%02x\n", bar);
struct resource *res;
res = probe_resource(dev, bar);
if (res) {
if (res->flags & IORESOURCE_PREFETCH) {
printk(BIOS_INFO, " marked above 4g\n");
res->flags |= IORESOURCE_ABOVE_4G;
} else {
printk(BIOS_INFO, " not prefetch\n");
}
} else {
printk(BIOS_INFO, " not found\n");
}
}
}
static void dgpu_enable_resources(struct device *dev) {
printk(BIOS_INFO, "system76: dgpu_enable_resources %s\n", dev_path(dev));
dev->subsystem_vendor = CONFIG_SUBSYSTEM_VENDOR_ID;
dev->subsystem_device = CONFIG_SUBSYSTEM_DEVICE_ID;
printk(BIOS_INFO, " subsystem <- %04x/%04x\n", dev->subsystem_vendor, dev->subsystem_device);
pci_write_config32(dev, 0x40, ((dev->subsystem_device & 0xffff) << 16) | (dev->subsystem_vendor & 0xffff));
pci_dev_enable_resources(dev);
}
static struct device_operations dgpu_pci_ops_dev = {
.read_resources = dgpu_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = dgpu_enable_resources,
#if CONFIG(HAVE_ACPI_TABLES)
.write_acpi_tables = pci_rom_write_acpi_tables,
.acpi_fill_ssdt = pci_rom_ssdt,
#endif
.init = pci_dev_init,
.ops_pci = &pci_dev_ops_pci,
};
static void dgpu_above_4g(void *unused) {
struct device *pdev;
// Find PEGP
pdev = pcidev_on_root(CONFIG_DRIVERS_SYSTEM76_DGPU_DEVICE, 0);
if (!pdev) {
printk(BIOS_ERR, "system76: failed to find PEGP\n");
return;
}
printk(BIOS_INFO, "system76: PEGP at %p, %04x:%04x\n", pdev, pdev->vendor, pdev->device);
int fn;
for (fn = 0; fn < 8; fn++) {
struct device *dev;
// Find DGPU functions
dev = pcidev_path_behind(pdev->link_list, PCI_DEVFN(0, fn));
if (dev) {
printk(BIOS_INFO, "system76: DGPU fn %d at %p, %04x:%04x\n", fn, dev, dev->vendor, dev->device);
dev->ops = &dgpu_pci_ops_dev;
} else {
printk(BIOS_ERR, "system76: failed to find DGPU fn %d\n", fn);
}
}
}
BOOT_STATE_INIT_ENTRY(BS_DEV_RESOURCES, BS_ON_ENTRY, dgpu_above_4g, NULL);

View File

@ -12,3 +12,13 @@ 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
default n
config EC_SYSTEM76_EC_OLED
depends on EC_SYSTEM76_EC
bool
default n

View File

@ -30,29 +30,29 @@ Device (BAT0)
Name (PBIF, Package (0x0D)
{
One,
0xFFFFFFFF,
0xFFFFFFFF,
One,
0x39D0,
Zero,
Zero,
0x40,
0x40,
"BAT",
"0001",
"LION",
"Notebook"
One, // 0 - Power Unit
0xFFFFFFFF, // 1 - Design Capacity
0xFFFFFFFF, // 2 - Last Full Charge Capacity
One, // 3 - Battery Technology
0xFFFFFFFF, // 4 - Design Voltage
Zero, // 5 - Design Capacity of Warning
Zero, // 6 - Design Capacity of Low
0x40, // 7 - Battery Capacity Granularity 1
0x40, // 8 - Battery Capacity Granularity 2
" ", // 9 - Model Number
" ", // 10 - Serial Number
" ", // 11 - Battery Type
" " // 12 - OEM Information
})
Method (IVBI, 0, NotSerialized)
{
PBIF [One] = 0xFFFFFFFF
PBIF [0x02] = 0xFFFFFFFF
PBIF [0x04] = 0xFFFFFFFF
PBIF [0x09] = " "
PBIF [0x0A] = " "
PBIF [0x0B] = " "
PBIF [0x0C] = " "
PBIF [1] = 0xFFFFFFFF
PBIF [2] = 0xFFFFFFFF
PBIF [4] = 0xFFFFFFFF
PBIF [9] = " "
PBIF [10] = " "
PBIF [11] = " "
PBIF [12] = " "
BFCC = Zero
}
@ -61,20 +61,20 @@ Device (BAT0)
If (^^PCI0.LPCB.EC0.BAT0)
{
Local0 = (^^PCI0.LPCB.EC0.BDC0 & 0xFFFF)
PBIF [One] = Local0
PBIF [1] = Local0
Local0 = (^^PCI0.LPCB.EC0.BFC0 & 0xFFFF)
PBIF [0x02] = Local0
PBIF [2] = Local0
BFCC = Local0
Local0 = (^^PCI0.LPCB.EC0.BDV0 & 0xFFFF)
PBIF [0x04] = Local0
PBIF [4] = Local0
Local0 = (^^PCI0.LPCB.EC0.BCW0 & 0xFFFF)
PBIF [0x05] = Local0
PBIF [5] = Local0
Local0 = (^^PCI0.LPCB.EC0.BCL0 & 0xFFFF)
PBIF [0x06] = Local0
PBIF [0x09] = "BAT"
PBIF [0x0A] = "0001"
PBIF [0x0B] = "LION"
PBIF [0x0C] = "Notebook"
PBIF [6] = Local0
PBIF [9] = "BAT"
PBIF [10] = "0001"
PBIF [11] = "LION"
PBIF [12] = "Notebook"
}
Else
{
@ -98,17 +98,17 @@ Device (BAT0)
Name (PBST, Package (0x04)
{
Zero,
0xFFFFFFFF,
0xFFFFFFFF,
0x3D90
Zero, // 0 - Battery state
0xFFFFFFFF, // 1 - Battery present rate
0xFFFFFFFF, // 2 - Battery remaining capacity
0xFFFFFFFF // 3 - Battery present voltage
})
Method (IVBS, 0, NotSerialized)
{
PBST [Zero] = Zero
PBST [One] = 0xFFFFFFFF
PBST [0x02] = 0xFFFFFFFF
PBST [0x03] = 0x2710
PBST [0] = Zero
PBST [1] = 0xFFFFFFFF
PBST [2] = 0xFFFFFFFF
PBST [3] = 0xFFFFFFFF
}
Method (UPBS, 0, NotSerialized)
@ -139,10 +139,10 @@ Device (BAT0)
Local2 = (^^PCI0.LPCB.EC0.BRC0 & 0xFFFF)
Local3 = (^^PCI0.LPCB.EC0.BPV0 & 0xFFFF)
PBST [Zero] = Local0
PBST [One] = Local1
PBST [0x02] = Local2
PBST [0x03] = Local3
PBST [0] = Local0
PBST [1] = Local1
PBST [2] = Local2
PBST [3] = Local3
If ((BFCC != ^^PCI0.LPCB.EC0.BFC0))
{
Notify (BAT0, 0x81) // Information Change

View File

@ -62,9 +62,13 @@ Device (\_SB.PCI0.LPCB.EC0)
}
}
Name (S3OS, Zero)
Method (PTS, 1, Serialized) {
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
If (ECOK) {
// Save ECOS during sleep
S3OS = ECOS
// Clear wake cause
WFNO = Zero
}
@ -73,6 +77,9 @@ Device (\_SB.PCI0.LPCB.EC0)
Method (WAK, 1, Serialized) {
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
If (ECOK) {
// Restore ECOS after sleep
ECOS = S3OS
// Set current AC state
^^^^AC.ACFG = ADP
@ -97,6 +104,9 @@ Device (\_SB.PCI0.LPCB.EC0)
Method (_Q0B, 0, NotSerialized) // Screen Toggle
{
Debug = "EC: Screen Toggle"
#if CONFIG(EC_SYSTEM76_EC_OLED)
Notify (^^^^S76D, 0x85)
#endif // CONFIG(EC_SYSTEM76_EC_OLED)
}
Method (_Q0C, 0, NotSerialized) // Mute

View File

@ -3,168 +3,47 @@
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
Field (ERAM, ByteAcc, Lock, Preserve)
{
NMSG, 8,
SLED, 4,
Offset (0x02),
MODE, 1,
FAN0, 1,
TME0, 1,
TME1, 1,
FAN1, 1,
, 2,
Offset (0x03),
LSTE, 1,
LSW0, 1,
LWKE, 1,
WAKF, 1,
, 2,
PWKE, 1,
MWKE, 1,
AC0, 8,
PSV, 8,
CRT, 8,
TMP, 8,
AC1, 8,
BBST, 8,
Offset (0x0B),
Offset (0x0C),
Offset (0x0D),
Offset (0x0E),
SLPT, 8,
SWEJ, 1,
SWCH, 1,
LSTE, 1, // Lid is open
, 1,
LWKE, 1, // Lid wake
, 5,
Offset (0x07),
TMP1, 8, // CPU temperature
Offset (0x10),
ADP, 1,
AFLT, 1,
BAT0, 1,
BAT1, 1,
, 3,
PWOF, 1,
WFNO, 8,
BPU0, 32,
BDC0, 32,
BFC0, 32,
BTC0, 32,
BDV0, 32,
BST0, 32,
BPR0, 32,
BRC0, 32,
BPV0, 32,
BTP0, 16,
BRS0, 16,
BCW0, 32,
BCL0, 32,
BCG0, 32,
BG20, 32,
BMO0, 64,
BIF0, 64,
BSN0, 32,
BTY0, 64,
Offset (0x67),
ADP, 1, // AC adapter connected
, 1,
BAT0, 1, // Battery connected
, 5,
WFNO, 8, // Wake cause (not implemented)
Offset (0x16),
BDC0, 32, // Battery design capacity
BFC0, 32, // Battery full capacity
Offset (0x22),
BDV0, 32, // Battery design voltage
BST0, 32, // Battery status
BPR0, 32, // Battery current
BRC0, 32, // Battery remaining capacity
BPV0, 32, // Battery voltage
Offset (0x3A),
BCW0, 32,
BCL0, 32,
Offset (0x68),
ECOS, 8,
LNXD, 8,
ECPS, 8,
Offset (0x6C),
BTMP, 16,
EVTN, 8,
Offset (0x72),
PRCL, 8,
PRC0, 8,
PRC1, 8,
PRCM, 8,
PRIN, 8,
PSTE, 8,
PCAD, 8,
PEWL, 8,
PWRL, 8,
PECD, 8,
PEHI, 8,
PECI, 8,
PEPL, 8,
PEPM, 8,
PWFC, 8,
PECC, 8,
PDT0, 8,
PDT1, 8,
PDT2, 8,
PDT3, 8,
PRFC, 8,
PRS0, 8,
PRS1, 8,
PRS2, 8,
PRS3, 8,
PRS4, 8,
PRCS, 8,
PEC0, 8,
PEC1, 8,
PEC2, 8,
PEC3, 8,
CMDR, 8,
CVRT, 8,
GTVR, 8,
FANT, 8,
SKNT, 8,
AMBT, 8,
MCRT, 8,
DIM0, 8,
DIM1, 8,
PMAX, 8,
PPDT, 8,
PECH, 8,
PMDT, 8,
TSD0, 8,
TSD1, 8,
TSD2, 8,
TSD3, 8,
CPUP, 16,
MCHP, 16,
SYSP, 16,
CPAP, 16,
MCAP, 16,
SYAP, 16,
CFSP, 16,
CPUE, 16,
Offset (0xC6),
Offset (0xC7),
VGAT, 8,
ECOS, 8, // Detected OS, 0 = no ACPI, 1 = ACPI but no driver, 2 = ACPI with driver
Offset (0xC8),
OEM1, 8,
OEM2, 8,
OEM3, 16,
OEM4, 8,
Offset (0xCE),
DUT1, 8,
DUT2, 8,
RPM1, 16,
RPM2, 16,
RPM4, 16,
Offset (0xD7),
DTHL, 8,
DTBP, 8,
AIRP, 8,
WINF, 8,
RINF, 8,
Offset (0xDD),
INF2, 8,
MUTE, 1,
Offset (0xE0),
RPM3, 16,
ECKS, 8,
Offset (0xE4),
, 4,
XTUF, 1,
EP12, 1,
Offset (0xE5),
INF3, 8,
Offset (0xE7),
GFOF, 8,
Offset (0xE9),
KPCR, 1,
Offset (0xEA),
Offset (0xF0),
PL1T, 16,
PL2T, 16,
TAUT, 8,
OEM4, 8, // Extra SCI data
Offset (0xCD),
TMP2, 8, // GPU temperature
DUT1, 8, // Fan 1 duty
DUT2, 8, // Fan 2 duty
RPM1, 16, // Fan 1 RPM
RPM2, 16, // Fan 2 RPM
Offset (0xD9),
AIRP, 8, // Airplane mode LED
WINF, 8, // Enable ACPI brightness controls
Offset (0xF8),
FCMD, 8,
FDAT, 8,

View File

@ -6,6 +6,7 @@
// 0x82 - backlight down
// 0x83 - backlight up
// 0x84 - backlight color change
// 0x85 - OLED screen toggle
Device (S76D) {
Name (_HID, "17761776")
Name (_UID, 0)
@ -111,4 +112,57 @@ Device (S76D) {
}
}
#endif // CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
// Fan names
Method (NFAN, 0, Serialized) {
Return (Package (2) {
"CPU fan",
#if CONFIG(EC_SYSTEM76_EC_DGPU)
"GPU fan",
#endif // CONFIG(EC_SYSTEM76_EC_DGPU)
})
}
// Get fan duty and RPM as a single value
Method (GFAN, 1, Serialized) {
Local0 = 0
Local1 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
If (Arg0 == 0) {
Local0 = ^^PCI0.LPCB.EC0.DUT1
Local1 = ^^PCI0.LPCB.EC0.RPM1
} ElseIf (Arg0 == 1) {
Local0 = ^^PCI0.LPCB.EC0.DUT2
Local1 = ^^PCI0.LPCB.EC0.RPM2
}
}
If (Local1 != 0) {
// 60 * (EC frequency / 120) / 2
Local1 = 2156250 / Local1
}
Return ((Local1 << 8) | Local0)
}
// Temperature names
Method (NTMP, 0, Serialized) {
Return (Package (2) {
"CPU temp",
#if CONFIG(EC_SYSTEM76_EC_DGPU)
"GPU temp",
#endif // CONFIG(EC_SYSTEM76_EC_DGPU)
})
}
// Get temperature
Method (GTMP, 1, Serialized) {
Local0 = 0;
If (^^PCI0.LPCB.EC0.ECOK) {
If (Arg0 == 0) {
Local0 = ^^PCI0.LPCB.EC0.TMP1
} ElseIf (Arg0 == 1) {
Local0 = ^^PCI0.LPCB.EC0.TMP2
}
}
Return (Local0)
}
}

View File

@ -257,6 +257,63 @@ typedef struct acpi_madt {
u32 flags; /* Multiple APIC flags */
} __packed acpi_madt_t;
/*******************************************************************************
*
* LPIT - Low Power Idle Table
*
* Conforms to "ACPI Low Power Idle Table (LPIT)" July 2014.
*
******************************************************************************/
typedef struct acpi_lpi_state_flags {
u32 disabled:1;
u32 counterunavailable:1;
u32 reserved:30;
} __packed acpi_lpi_state_flags;
/* LPIT subtable header */
typedef struct acpi_lpit_header {
u32 type; /* Subtable type */
u32 length; /* Subtable length */
u16 unique_id;
u16 reserved;
acpi_lpi_state_flags flags;
} __packed acpi_lpit_header;
/* Values for subtable Type above */
enum acpi_lpit_type {
ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
ACPI_LPIT_TYPE_RESERVED = 0x01 /* 1 and above are reserved */
};
/* Masks for Flags field above */
#define ACPI_LPIT_STATE_DISABLED (1)
#define ACPI_LPIT_NO_COUNTER (1<<1)
/*
* LPIT subtables, correspond to Type in struct acpi_lpit_header
*/
/* 0x00: Native C-state instruction based LPI structure */
struct acpi_lpit_native {
struct acpi_lpit_header header;
struct acpi_gen_regaddr entry_trigger;
u32 residency;
u32 latency;
struct acpi_gen_regaddr residency_counter;
u64 counter_frequency;
};
typedef struct acpi_table_lpit {
struct acpi_table_header header; /* Common ACPI table header */
struct acpi_lpit_native lpit_soc;
struct acpi_lpit_native lpit_system;
} __packed acpi_table_lpit;
/* VFCT image header */
typedef struct acpi_vfct_image_hdr {
u32 PCIBus;
@ -897,6 +954,9 @@ struct acpi_spmi {
unsigned long fw_cfg_acpi_tables(unsigned long start);
void soc_residency_counter(struct acpi_lpit_native *lpit_soc);
void system_residency_counter(struct acpi_lpit_native *lpit_system);
/* These are implemented by the target port or north/southbridge. */
unsigned long write_acpi_tables(unsigned long addr);
unsigned long acpi_fill_madt(unsigned long current);

View File

@ -0,0 +1,80 @@
if BOARD_SYSTEM76_ADDW1
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select DRIVERS_SYSTEM76_DGPU
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_BAT_THRESHOLDS
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select EC_SYSTEM76_EC_OLED
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_SMI_HANDLER
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
select SOC_INTEL_CANNONLAKE_PCH_H
select SOC_INTEL_COFFEELAKE
select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP
select TPM_RDRESP_NEED_DELAY
select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB
config MAINBOARD_DIR
string
default "system76/addw1"
config MAINBOARD_PART_NUMBER
string
default "addw1"
config MAINBOARD_SMBIOS_PRODUCT_NAME
string
default "Adder WS"
config MAINBOARD_VERSION
string
default "addw1"
config CBFS_SIZE
hex
default 0xA00000
config CONSOLE_POST
bool
default y
config ONBOARD_VGA_IS_PRIMARY
bool
default y
config UART_FOR_CONSOLE
int
default 2
config MAX_CPUS
int
default 16
config DIMM_MAX
int
default 2
config DIMM_SPD_SIZE
int
default 512
config POST_DEVICE
bool
default n
endif

View File

@ -0,0 +1,2 @@
config BOARD_SYSTEM76_ADDW1
bool "addw1"

View File

@ -0,0 +1,4 @@
bootblock-y += bootblock.c
ramstage-y += ramstage.c
ramstage-y += hda_verb.c
ramstage-y += tas5825m.c

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
// GPP_K6 SCI
Method (_L06, 0, Serialized) {
Debug = Concatenate("GPE _L06: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
If (\_SB.PCI0.LPCB.EC0.ECOK) {
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
Notify(\_SB.LID0, 0x80)
}
}
}

View File

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include "../gpio.h"
#include <drivers/system76/dgpu/acpi/dgpu.asl>
#define EC_GPE_SCI 0x03 /* GPP_K3 */
#define EC_GPE_SWI 0x06 /* GPP_K6 */
#define EC_COLOR_KEYBOARD 1
#include <ec/system76/ec/acpi/ec.asl>
Scope (\_SB) {
#include "sleep.asl"
}
Scope (\_GPE) {
#include "gpe.asl"
}

View File

@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Method called from _PTS prior to enter sleep state */
Method (MPTS, 1) {
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
// Turn DGPU on before sleeping
\_SB.PCI0.PEGP.DEV0._ON()
}
/* Method called from _WAK prior to wakeup */
Method (MWAK, 1) {
\_SB.PCI0.LPCB.EC0.WAK (Arg0)
}

View File

@ -0,0 +1,8 @@
Vendor name: System76
Board name: addw1
Category: laptop
Release year: 2019
ROM package: SOIC-8
ROM protocol: SPI
ROM socketed: n
Flashrom support: y

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
#include <gpio.h>
#include "gpio.h"
#include <drivers/system76/dgpu/bootblock.c>
void bootblock_mainboard_init(void) {
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
dgpu_power_enable(1);
}

Binary file not shown.

View File

@ -0,0 +1,332 @@
chip soc/intel/cannonlake
# Lock Down
register "common_soc_config" = "{
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
// Touchpad I2C bus
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 80,
.fall_time_ns = 110,
},
}"
# Send an extra VR mailbox command for the PS4 exit issue
register "SendVrMbxCmd" = "2"
# ACPI (soc/intel/cannonlake/acpi.c)
# Disable s0ix
register "s0ix_enable" = "0"
# PM Timer Enabled
register "PmTimerDisabled" = "0"
# Disable DPTF
register "dptf_enable" = "0"
# CPU (soc/intel/cannonlake/cpu.c)
# Power limit
register "power_limits_config" = "{
// /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
.tdp_pl1_override = 45,
// /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
.tdp_pl2_override = 90,
}"
# Enable "Intel Speed Shift Technology"
register "speed_shift_enable" = "1"
# Enable Enhanced Intel SpeedStep
register "eist_enable" = "1"
# FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c)
register "SaGv" = "SaGv_Enabled"
register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
# Serial I/O
register "SerialIoDevMode" = "{
[PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad I2C bus
[PchSerialIoIndexI2C1] = PchSerialIoDisabled,
[PchSerialIoIndexI2C2] = PchSerialIoDisabled,
[PchSerialIoIndexI2C3] = PchSerialIoDisabled,
[PchSerialIoIndexI2C4] = PchSerialIoDisabled,
[PchSerialIoIndexI2C5] = PchSerialIoDisabled,
[PchSerialIoIndexSPI0] = PchSerialIoDisabled,
[PchSerialIoIndexSPI1] = PchSerialIoDisabled,
[PchSerialIoIndexSPI2] = PchSerialIoDisabled,
[PchSerialIoIndexUART0] = PchSerialIoDisabled,
[PchSerialIoIndexUART1] = PchSerialIoDisabled,
[PchSerialIoIndexUART2] = PchSerialIoPci, // Debug console
}"
# SATA
register "SataMode" = "Sata_AHCI"
register "SataSalpSupport" = "0"
register "SataPortsEnable[0]" = "1" # HDD (SATA0B)
register "SataPortsEnable[1]" = "1" # SSD1 (SATA1A)
register "SataPortsEnable[2]" = "0"
register "SataPortsEnable[3]" = "0"
register "SataPortsEnable[4]" = "0"
register "SataPortsEnable[5]" = "0"
register "SataPortsEnable[6]" = "0"
register "SataPortsEnable[7]" = "0"
register "SataPortsDevSlp[0]" = "0"
register "SataPortsDevSlp[1]" = "0"
register "SataPortsDevSlp[2]" = "0"
register "SataPortsDevSlp[3]" = "0"
register "SataPortsDevSlp[4]" = "0"
register "SataPortsDevSlp[5]" = "0"
register "SataPortsDevSlp[6]" = "0"
register "SataPortsDevSlp[7]" = "0"
# Audio
register "PchHdaDspEnable" = "0"
register "PchHdaAudioLinkHda" = "1"
register "PchHdaAudioLinkDmic0" = "0"
register "PchHdaAudioLinkDmic1" = "0"
register "PchHdaAudioLinkSsp0" = "0"
register "PchHdaAudioLinkSsp1" = "0"
register "PchHdaAudioLinkSsp2" = "0"
register "PchHdaAudioLinkSndw1" = "0"
register "PchHdaAudioLinkSndw2" = "0"
register "PchHdaAudioLinkSndw3" = "0"
register "PchHdaAudioLinkSndw4" = "0"
# USB
register "SsicPortEnable" = "0"
# USB2
register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C and DisplayPort
register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.1 Gen 2
register "usb2_ports[3]" = "USB2_PORT_EMPTY"
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.1 Gen 1 audio
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.1 Gen 1 back
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Per-Key RGB keyboard
register "usb2_ports[8]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_EMPTY"
register "usb2_ports[10]" = "USB2_PORT_EMPTY"
register "usb2_ports[11]" = "USB2_PORT_EMPTY"
register "usb2_ports[12]" = "USB2_PORT_EMPTY"
register "usb2_ports[13]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
register "usb2_ports[14]" = "USB2_PORT_EMPTY"
register "usb2_ports[15]" = "USB2_PORT_EMPTY"
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C and DisplayPort
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 right
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C (without TBT)
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C (without TBT)
register "usb3_ports[4]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 1 audio
register "usb3_ports[5]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 1 back
register "usb3_ports[6]" = "USB3_PORT_EMPTY"
register "usb3_ports[7]" = "USB3_PORT_EMPTY"
register "usb3_ports[8]" = "USB3_PORT_EMPTY"
register "usb3_ports[9]" = "USB3_PORT_EMPTY"
# PCI Express Graphics #0 x16, Clock 8 (NVIDIA GPU)
register "PcieClkSrcUsage[8]" = "0x40"
# PCI Express root port #9 x4, Clock 9 (SSD1)
register "PcieRpEnable[8]" = "1"
register "PcieRpLtrEnable[8]" = "1"
register "PcieClkSrcUsage[9]" = "8"
# PCI Express root port #14 x1, Clock 5 (GLAN)
register "PcieRpEnable[13]" = "1"
register "PcieRpLtrEnable[13]" = "1"
register "PcieClkSrcUsage[5]" = "13"
# PCI Express root port #15 x1, Clock 7 (Card Reader)
register "PcieRpEnable[14]" = "1"
register "PcieRpLtrEnable[14]" = "1"
register "PcieClkSrcUsage[7]" = "14"
# PCI Express root port #16 x1, Clock 6 (WLAN)
register "PcieRpEnable[15]" = "1"
register "PcieRpLtrEnable[15]" = "1"
register "PcieClkSrcUsage[6]" = "15"
# PCI Express root port #17 x4, Clock 0 (Thunderbolt)
register "PcieRpEnable[16]" = "1"
register "PcieRpLtrEnable[16]" = "1"
register "PcieRpHotPlug[16]" = "1"
register "PcieClkSrcUsage[0]" = "16"
# PCI Express root port #21 x4, Clock 10 (SSD2)
register "PcieRpEnable[20]" = "1"
register "PcieRpLtrEnable[20]" = "1"
register "PcieClkSrcUsage[10]" = "20"
# Set all clocks sources to the same clock request
register "PcieClkSrcClkReq[0]" = "0"
register "PcieClkSrcClkReq[1]" = "1"
register "PcieClkSrcClkReq[2]" = "2"
register "PcieClkSrcClkReq[3]" = "3"
register "PcieClkSrcClkReq[4]" = "4"
register "PcieClkSrcClkReq[5]" = "5"
register "PcieClkSrcClkReq[6]" = "6"
register "PcieClkSrcClkReq[7]" = "7"
register "PcieClkSrcClkReq[8]" = "8"
register "PcieClkSrcClkReq[9]" = "9"
register "PcieClkSrcClkReq[10]" = "10"
register "PcieClkSrcClkReq[11]" = "11"
register "PcieClkSrcClkReq[12]" = "12"
register "PcieClkSrcClkReq[13]" = "13"
register "PcieClkSrcClkReq[14]" = "14"
register "PcieClkSrcClkReq[15]" = "15"
# Misc
register "Device4Enable" = "1"
register "HeciEnabled" = "0"
register "Heci3Enabled" = "0"
register "AcousticNoiseMitigation" = "1"
#register "dmipwroptimize" = "1"
#register "satapwroptimize" = "1"
# Power
# sudo devmem2 0xfe001020 (pmc_bar + GEN_PMCON_A), bits 11:10
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpS3MinAssert" = "3" # 50ms
# sudo devmem2 0xfe001020 (pmc_bar + GEN_PMCON_A), bits 5:4
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpS4MinAssert" = "1" # 1s
# sudo devmem2 0xfe001818 (pmc_bar + PM_CFG), bits 19:18
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpSusMinAssert" = "4" # 4s
# sudo devmem2 0xfe001818 (pmc_bar + PM_CFG), bits 17:16
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpAMinAssert" = "4" # 2s
# Thermal
# rdmsr --bitfield 31:24 --decimal 0x1A2
register "tcc_offset" = "8"
# Serial IRQ Continuous
register "serirq_mode" = "SERIRQ_CONTINUOUS"
# LPC (soc/intel/cannonlake/lpc.c)
# LPC configuration from lspci -s 1f.0 -xxx
# Address 0x84: Decode 0x80 - 0x8F (Port 80)
register "gen1_dec" = "0x000c0081"
# Address 0x88: Decode 0x68 - 0x6F (PMC)
register "gen2_dec" = "0x00040069"
# Address 0x8C: Decode 0xE00 - 0xEFF (AP/EC command)
register "gen3_dec" = "0x00fc0E01"
# Address 0x90: Decode 0xF00 - 0xFFF (AP/EC debug)
register "gen4_dec" = "0x00fc0F01"
# PMC (soc/intel/cannonlake/pmc.c)
# Disable deep Sx states
register "deep_s3_enable_ac" = "0"
register "deep_s3_enable_dc" = "0"
register "deep_s5_enable_ac" = "0"
register "deep_s5_enable_dc" = "0"
register "deep_sx_config" = "0"
# PM Util (soc/intel/cannonlake/pmutil.c)
# GPE configuration
# Note that GPE events called out in ASL code rely on this
# route. i.e. If this route changes then the affected GPE
# offset bits also need to be changed.
# sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG)
register "gpe0_dw0" = "PMC_GPP_K"
register "gpe0_dw1" = "PMC_GPP_G"
register "gpe0_dw2" = "PMC_GPP_E"
# Actual device tree
device cpu_cluster 0 on
device lapic 0 on end
end
device domain 0 on
subsystemid 0x1558 0x65e1 inherit
device pci 00.0 on end # Host Bridge
device pci 01.0 on end # GPU Port
device pci 02.0 on end # Integrated Graphics Device
device pci 04.0 on end # SA Thermal device
device pci 12.0 on end # Thermal Subsystem
device pci 12.5 off end # UFS SCS
device pci 12.6 off end # GSPI #2
device pci 13.0 off end # Integrated Sensor Hub
device pci 14.0 on end # USB xHCI
device pci 14.1 off end # USB xDCI (OTG)
device pci 14.2 on end # Shared SRAM
#chip drivers/intel/wifi
# register "wake" = "PME_B0_EN_BIT"
device pci 14.3 on end # CNVi wifi
#end
device pci 14.5 off end # SDCard
device pci 15.0 on
chip drivers/i2c/hid
register "generic.hid" = ""PNP0C50""
register "generic.desc" = ""Synaptics Touchpad""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)"
register "generic.probed" = "1"
register "hid_desc_reg_offset" = "0x20"
device i2c 2c on end
end
end # I2C #0
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3
device pci 16.0 off end # Management Engine Interface 1
device pci 16.1 off end # Management Engine Interface 2
device pci 16.2 off end # Management Engine IDE-R
device pci 16.3 off end # Management Engine KT Redirection
device pci 16.4 off end # Management Engine Interface 3
device pci 16.5 off end # Management Engine Interface 4
device pci 17.0 on end # SATA
device pci 19.0 off end # I2C #4
device pci 19.1 off end # I2C #5
device pci 19.2 on end # UART #2
device pci 1a.0 off end # eMMC
device pci 1b.0 on end # PCI Express Port 17
device pci 1b.1 off end # PCI Express Port 18
device pci 1b.2 off end # PCI Express Port 19
device pci 1b.3 off end # PCI Express Port 20
device pci 1b.4 on end # PCI Express Port 21
device pci 1b.5 off end # PCI Express Port 22
device pci 1b.6 off end # PCI Express Port 23
device pci 1b.7 off end # PCI Express Port 24
device pci 1c.0 off end # PCI Express Port 1
device pci 1c.1 off end # PCI Express Port 2
device pci 1c.2 off end # PCI Express Port 3
device pci 1c.3 off end # PCI Express Port 4
device pci 1c.4 off end # PCI Express Port 5
device pci 1c.5 off end # PCI Express Port 6
device pci 1c.6 off end # PCI Express Port 7
device pci 1c.7 off end # PCI Express Port 8
device pci 1d.0 on end # PCI Express Port 9
device pci 1d.1 off end # PCI Express Port 10
device pci 1d.2 off end # PCI Express Port 11
device pci 1d.3 off end # PCI Express Port 12
device pci 1d.4 off end # PCI Express Port 13
device pci 1d.5 on end # PCI Express Port 14
device pci 1d.6 on end # PCI Express Port 15
device pci 1d.7 on end # PCI Express Port 16
device pci 1e.0 off end # UART #0
device pci 1e.1 off end # UART #1
device pci 1e.2 off end # GSPI #0
device pci 1e.3 off end # GSPI #1
device pci 1f.0 on # LPC Interface
chip drivers/pc80/tpm
device pnp 0c31.0 on end
end
end
device pci 1f.1 off end # P2SB
device pci 1f.2 off end # Power Management Controller
device pci 1f.3 on end # Intel HDA
device pci 1f.4 on
chip drivers/i2c/tas5825m
register "id" = "0"
device i2c 4e on end # (8bit address: 0x9c)
end # tas5825m
end # SMBus
device pci 1f.5 on end # PCH SPI
device pci 1f.6 off end # GbE
end
end

View File

@ -0,0 +1,29 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
DefinitionBlock(
"dsdt.aml",
"DSDT",
0x02, // DSDT revision: ACPI v2.0 and up
OEM_ID,
ACPI_TABLE_CREATOR,
0x20110725 // OEM revision
)
{
#include <soc/intel/cannonlake/acpi/platform.asl>
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
#include <cpu/intel/common/acpi/cpu.asl>
Device (\_SB.PCI0) {
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
}
#include <southbridge/intel/common/acpi/sleepstates.asl>
Scope (\_SB.PCI0.LPCB) {
#include <drivers/pc80/pc/ps2_controller.asl>
}
#include "acpi/mainboard.asl"
}

View File

@ -0,0 +1,255 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef MAINBOARD_GPIO_H
#define MAINBOARD_GPIO_H
#define DGPU_RST_N GPP_F22
#define DGPU_PWR_EN GPP_F23
#define DGPU_GC6 GPP_C12
#ifndef __ACPI__
#include <soc/gpe.h>
#include <soc/gpio.h>
/* Pad configuration in romstage. */
static const struct pad_config early_gpio_table[] = {
PAD_CFG_TERM_GPO(GPP_F22, 0, NONE, DEEP), // DGPU_RST_N
PAD_CFG_TERM_GPO(GPP_F23, 0, NONE, DEEP), // DGPU_PWR_EN
};
/* Pad configuration in ramstage. */
static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPD0, NONE, DEEP, NF1), // PM_BATLOW#
PAD_CFG_NF(GPD1, NATIVE, DEEP, NF1), // AC_PRESENT
PAD_CFG_GPI(GPD2, NATIVE, PWROK), // NC
PAD_CFG_NF(GPD3, UP_20K, DEEP, NF1), // PWR_BTN#
PAD_CFG_NF(GPD4, NONE, DEEP, NF1), // SUSB#_PCH
PAD_CFG_NF(GPD5, NONE, DEEP, NF1), // SUSC#_PCH
PAD_CFG_NF(GPD6, NONE, DEEP, NF1), // NC
PAD_CFG_GPI(GPD7, NONE, PWROK), // NC
PAD_CFG_NF(GPD8, NONE, DEEP, NF1), // SUS_CLK
PAD_CFG_NF(GPD9, NONE, PWROK, NF1), // NC
_PAD_CFG_STRUCT(GPD10, 0x04000601, 0x0000), // NC
PAD_CFG_NF(GPD11, NONE, DEEP, NF1), // NC
PAD_CFG_TERM_GPO(GPP_A0, 0, NONE, DEEP), // SB_KBCRST#
PAD_CFG_NF(GPP_A1, NATIVE, DEEP, NF1), // LPC_AD0
PAD_CFG_NF(GPP_A2, NATIVE, DEEP, NF1), // LPC_AD1
PAD_CFG_NF(GPP_A3, NATIVE, DEEP, NF1), // LPC_AD2
PAD_CFG_NF(GPP_A4, NATIVE, DEEP, NF1), // LPC_AD3
PAD_CFG_NF(GPP_A5, NONE, DEEP, NF1), // LPC_FRAME#
PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1), // SERIRQ
PAD_CFG_GPI(GPP_A7, NONE, DEEP), // SCI#_GPP_A7
PAD_CFG_NF(GPP_A8, NONE, DEEP, NF1), // ECCLKRUN#
PAD_CFG_NF(GPP_A9, DN_20K, DEEP, NF1), // PCLK_KBC
PAD_CFG_NF(GPP_A10, DN_20K, DEEP, NF1), // NC
PAD_CFG_GPI(GPP_A11, UP_20K, DEEP), // NC
PAD_CFG_GPI(GPP_A12, NONE, DEEP), // NC
PAD_CFG_NF(GPP_A13, NONE, DEEP, NF1), // SUSWARN#
PAD_CFG_NF(GPP_A14, NONE, DEEP, NF1), // NC
PAD_CFG_NF(GPP_A15, UP_20K, DEEP, NF1), // SUS_PWR_ACK#
PAD_CFG_GPI(GPP_A16, DN_20K, DEEP), // NC
PAD_CFG_GPI(GPP_A17, NONE, DEEP), // AMP_TYPE_DET
PAD_CFG_TERM_GPO(GPP_A18, 1, NONE, DEEP), // SB_BLON
PAD_CFG_GPI(GPP_A19, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_A20, 1, NONE, DEEP), // PEX_WAKE#
PAD_CFG_GPI(GPP_A21, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_A22, 1, NONE, DEEP), // SMARTAMP_SW
PAD_CFG_GPI(GPP_A23, NONE, DEEP), // SMART AMP PWR (L:3.3VS H:3.3V)
PAD_CFG_GPI(GPP_B0, NONE, DEEP), // TPM_PIRQ#
PAD_CFG_GPI(GPP_B1, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B2, NONE, DEEP), // NC
PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST, EDGE_SINGLE, INVERT), // PCH_GPP_B3 (touchpad interrupt)
PAD_CFG_GPI(GPP_B4, NONE, DEEP), // NC
PAD_CFG_NF(GPP_B5, NONE, DEEP, NF1), // TBT_CLKREQ#
PAD_CFG_GPI(GPP_B6, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B7, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B8, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B9, NONE, DEEP), // NC
PAD_CFG_NF(GPP_B10, NONE, DEEP, NF1), // GLAN_CLKREQ#
PAD_CFG_GPI(GPP_B11, NONE, DEEP), // NC
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), // SLP_S0#
_PAD_CFG_STRUCT(GPP_B13, 0x44000601, 0x0000), // PLT_RST#
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1), // PCH_SPKR
PAD_CFG_GPI(GPP_B15, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B16, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B17, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B18, NONE, DEEP), // NO REBOOT STRAP
PAD_CFG_GPI(GPP_B19, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B20, NONE, DEEP), // SMI#_GPP_B20
PAD_CFG_GPI(GPP_B21, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_B22, NONE, DEEP), // BOOT BIOS STRAP
PAD_CFG_GPI(GPP_B23, NONE, DEEP), // DCI-OOB STRAP
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1), // SMB_CLK
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1), // SMB_DATA
_PAD_CFG_STRUCT(GPP_C2, 0x40880100, 0x0000), // CNVI_WAKE#
PAD_CFG_GPI(GPP_C3, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_C4, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_C5, NONE, DEEP), // WLAN_WAKEUP#
PAD_CFG_GPI(GPP_C6, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_C7, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_C8, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_C9, NONE, DEEP), // BOARD_ID2
PAD_CFG_GPI(GPP_C10, NONE, DEEP), // BOARD_ID1
PAD_CFG_GPI(GPP_C11, NONE, DEEP), // TBT_DET#
PAD_CFG_GPI(GPP_C12, NONE, DEEP), // GC6_FB_EN_PCH
PAD_CFG_GPI(GPP_C13, NONE, DEEP), // TPM_DET
PAD_CFG_TERM_GPO(GPP_C14, 1, NONE, DEEP), // GPU_EVENT#
PAD_CFG_GPI(GPP_C15, NONE, DEEP), // 100K pull-down
PAD_CFG_NF(GPP_C16, NONE, PLTRST, NF1), // TP_DAT_PCH_I2C0
PAD_CFG_NF(GPP_C17, NONE, PLTRST, NF1), // TP_CLK_PCH_I2C0
PAD_CFG_NF(GPP_C18, NONE, PLTRST, NF1), // I2C1_SDA
PAD_CFG_NF(GPP_C19, NONE, PLTRST, NF1), // I2C1_SCL
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), // UART2_RXD
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), // UART2_TXD
PAD_CFG_NF(GPP_C22, NONE, DEEP, NF1), // UART2_RTS#
PAD_CFG_NF(GPP_C23, NONE, DEEP, NF1), // UART2_CTS#
PAD_CFG_GPI(GPP_D0, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D1, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D2, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D3, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D4, NONE, DEEP), // NC
PAD_CFG_NF(GPP_D5, NONE, DEEP, NF3), // CNVI_RST#
PAD_CFG_NF(GPP_D6, NONE, DEEP, NF3), // CNVI_CLKREQ
PAD_CFG_GPI(GPP_D7, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D8, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D9, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D10, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D11, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D12, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D13, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D14, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D15, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D16, NONE, DEEP), // NC
PAD_CFG_NF(GPP_D17, NONE, DEEP, NF1), // NC
PAD_CFG_NF(GPP_D18, NONE, DEEP, NF1), // NC
PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), // NC
PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1), // NC
PAD_CFG_GPI(GPP_D21, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D22, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_D23, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_E0, NONE, DEEP), // NC
PAD_CFG_NF(GPP_E1, UP_20K, DEEP, NF1), // SATAGP1
PAD_CFG_GPI(GPP_E2, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_E3, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_E4, NONE, DEEP), // NC
PAD_CFG_NF(GPP_E5, NONE, DEEP, NF1), // SATA_DEVSLP1
PAD_CFG_TERM_GPO(GPP_E6, 1, NONE, DEEP), // PCH_MUTE#
PAD_CFG_GPI(GPP_E7, NONE, DEEP), // NC
PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1), // SATAHDD_LED#
PAD_CFG_GPI(GPP_E9, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_E10, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_E11, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_E12, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F0, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F1, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F2, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_F3, 1, NONE, DEEP), // GPP_F3_LAN_RST#
PAD_CFG_TERM_GPO(GPP_F4, 1, NONE, DEEP), // GPP_F4_TBT_RST#
PAD_CFG_GPI(GPP_F5, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F6, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F7, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F8, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_F9, 0, NONE, DEEP), // PS8331_SW
PAD_CFG_GPI(GPP_F10, NONE, DEEP), // BIOS RECOVERY ENABLE STRAP
PAD_CFG_GPI(GPP_F11, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F12, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F13, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F14, NONE, DEEP), // H_SKTOCC_N
PAD_CFG_GPI(GPP_F15, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F16, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F17, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_F18, NONE, DEEP), // NC
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
PAD_CFG_TERM_GPO(GPP_F22, 1, NONE, DEEP), // DGPU_RST#_PCH
PAD_CFG_TERM_GPO(GPP_F23, 1, NONE, DEEP), // DGPU_PWR_EN
PAD_CFG_GPI(GPP_G0, NONE, DEEP), // GSYNC_DET
PAD_CFG_GPI(GPP_G1, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_G2, NONE, DEEP), // NVSR_DET#
PAD_CFG_GPI(GPP_G3, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_G4, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_G5, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_G6, NONE, DEEP), // SWI#_GPP_G6
PAD_CFG_GPI(GPP_G7, NONE, DEEP), // NC
PAD_CFG_NF(GPP_H0, NONE, DEEP, NF1), // WLAN_CLKREQ#
PAD_CFG_NF(GPP_H1, NONE, DEEP, NF1), // SD4.0_CLKREQ#
PAD_CFG_NF(GPP_H2, NONE, DEEP, NF1), // PEG_CLKREQ#
PAD_CFG_NF(GPP_H3, NONE, DEEP, NF1), // SSD1_CLKREQ#
PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), // SSD2_CLKREQ#
PAD_CFG_GPI(GPP_H5, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_H6, 1, NONE, DEEP), // PCIE_SSD1_RST#
PAD_CFG_TERM_GPO(GPP_H7, 1, NONE, DEEP), // PCIE_SSD2_RST#
PAD_CFG_GPI(GPP_H8, NONE, DEEP), // GPP_H8_LAN_RST#
PAD_CFG_GPI(GPP_H9, NONE, DEEP), // TBT_GPIO_WAKE#
PAD_CFG_GPI(GPP_H10, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_H11, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_H12, NONE, DEEP), // ESPI FLASH SHARING STRAP
PAD_CFG_GPI(GPP_H13, NONE, DEEP), // TBTA_HRESET
PAD_CFG_GPI(GPP_H14, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_H15, NONE, DEEP), // RESERVED STRAP
_PAD_CFG_STRUCT(GPP_H16, 0x44000101, 0x0000), // TBT_RTD3_PWR_EN
PAD_CFG_TERM_GPO(GPP_H17, 0, NONE, PLTRST), // TBT_FORCE_PWR
PAD_CFG_TERM_GPO(GPP_H18, 1, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_H19, 1, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_H20, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_H21, NONE, DEEP), // XTAL FREQUENCY SELECT STRAP
PAD_CFG_GPI(GPP_H22, NONE, DEEP), // NC
_PAD_CFG_STRUCT(GPP_H23, 0x82880100, 0x0000), // TBCIO_PLUG_EVENT#
PAD_CFG_NF(GPP_I0, NONE, DEEP, NF1), // ANX7411_HPD
PAD_CFG_NF(GPP_I1, NONE, DEEP, NF1), // HDMI_HPD
PAD_CFG_NF(GPP_I2, NONE, DEEP, NF1), // MDP_E_HPD
PAD_CFG_NF(GPP_I3, NONE, DEEP, NF1), // MDP_A_TBT_HPD
PAD_CFG_NF(GPP_I4, NONE, DEEP, NF1), // SB_IEDP_HPD
PAD_CFG_TERM_GPO(GPP_I5, 1, NONE, DEEP), // TBT_GPIO_RST#
PAD_CFG_GPI(GPP_I6, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_I7, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_I8, 1, NONE, DEEP), // SSD1_PWR_EN
PAD_CFG_TERM_GPO(GPP_I9, 1, NONE, DEEP), // SSD2_PWR_EN
PAD_CFG_GPI(GPP_I10, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_I11, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_I12, 1, NONE, DEEP), // SATA_PWR_EN
PAD_CFG_GPI(GPP_I13, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_I14, NONE, DEEP), // NC
PAD_CFG_NF(GPP_J0, NONE, DEEP, NF1), // CNVI_GNSS_PA_BLANKING
PAD_CFG_TERM_GPO(GPP_J1, 1, NONE, DEEP), // GPP_J1
PAD_CFG_GPI(GPP_J2, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_J3, NONE, DEEP), // NC
PAD_CFG_NF(GPP_J4, NONE, DEEP, NF1), // CNVI_BRI_DT
PAD_CFG_NF(GPP_J5, UP_20K, DEEP, NF1), // CNVI_BRI_RSP
PAD_CFG_NF(GPP_J6, NONE, DEEP, NF1), // CNVI_RGI_DT
PAD_CFG_NF(GPP_J7, UP_20K, DEEP, NF1), // CNVI_RGI_RSP
PAD_CFG_NF(GPP_J8, NONE, DEEP, NF1), // CNVI_MFUART2_RXD
PAD_CFG_NF(GPP_J9, NONE, DEEP, NF1), // CNVI_MFUART2_TXD
PAD_CFG_GPI(GPP_J10, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_J11, DN_20K, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_K0, 0, NONE, DEEP), // GPP_K0_SPK_MUTE
PAD_CFG_TERM_GPO(GPP_K1, 0, NONE, DEEP), // GPP_K1_WOOFER_MUTE
PAD_CFG_GPI(GPP_K2, NONE, DEEP), // NC
_PAD_CFG_STRUCT(GPP_K3, 0x40880100, 0x0000), // SCI#_GPP_K3
PAD_CFG_GPI(GPP_K4, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_K5, NONE, DEEP), // NC
_PAD_CFG_STRUCT(GPP_K6, 0x40880100, 0x0000), // SWI#_GPP_K6
PAD_CFG_GPI(GPP_K7, NONE, DEEP), // GPP_K7_LAN_WAKEUP#
PAD_CFG_TERM_GPO(GPP_K8, 1, NONE, DEEP), // GPP_K8_LAN_RTD3
PAD_CFG_GPI(GPP_K9, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_K10, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_K11, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_K12, 1, NONE, DEEP), // PCH_GPP_K12
PAD_CFG_GPI(GPP_K13, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_K14, 0, NONE, DEEP), // GPP_K14_TEST_R
_PAD_CFG_STRUCT(GPP_K15, 0x80100100, 0x0000), // GPP_K15_INTP_OUT
PAD_CFG_GPI(GPP_K16, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_K17, NONE, DEEP), // NC
PAD_CFG_TERM_GPO(GPP_K18, 1, NONE, DEEP), // GPP_K18_TBT_WAKE#
_PAD_CFG_STRUCT(GPP_K19, 0x42800101, 0x0000), // SMI#_GPP_K19
PAD_CFG_GPI(GPP_K20, NONE, DEEP), // NC
PAD_CFG_GPI(GPP_K21, NONE, DEEP), // NC
_PAD_CFG_STRUCT(GPP_K22, 0x44000101, 0x0000), // NC
PAD_CFG_GPI(GPP_K23, NONE, DEEP), // NC
};
#endif
#endif

View File

@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC1220 */
0x10ec1220, /* Vendor ID */
0x155865d1, /* Subsystem ID */
12, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x155865d1),
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),
};
const u32 pc_beep_verbs[] = {
// Enable DMIC microphone on ALC1220
0x02050036,
0x02042a6a,
};
AZALIA_ARRAY_SIZES;

View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/ramstage.h>
#include "gpio.h"
void mainboard_silicon_init_params(FSP_S_CONFIG *params) {
/* Configure pads prior to SiliconInit() in case there's any
* dependencies during hardware initialization. */
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@ -0,0 +1,87 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/cnl_memcfg_init.h>
#include <soc/romstage.h>
static const struct cnl_mb_cfg memcfg = {
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
.spd[0] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa0},
},
.spd[1] = {.read_type = NOT_EXISTING},
.spd[2] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa4},
},
.spd[3] = {.read_type = NOT_EXISTING},
/*
* For each channel, there are 3 sets of DQ byte mappings,
* where each set has a package 0 and a package 1 value (package 0
* represents the first 64-bit lpddr4 chip combination, and package 1
* represents the second 64-bit lpddr4 chip combination).
* The first three sets are for CLK, CMD, and CTL.
* The fsp package actually expects 6 sets, but the last 3 sets are
* not used in CNL, so we only define the three sets that are used
* and let the meminit_lpddr4() routine take care of clearing the
* unused fields for the caller.
*/
.dq_map[DDR_CH0] = {
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
.dq_map[DDR_CH1] = {
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
/*
* DQS CPU<>DRAM map Ch0 and Ch1. Each array entry represents a
* mapping of a dq bit on the CPU to the bit it's connected to on
* the memory part. The array index represents the dqs bit number
* on the memory part, and the values in the array represent which
* pin on the CPU that DRAM pin connects to.
*/
.dqs_map[DDR_CH0] = {0, 1, 2, 3, 4, 5, 6, 7},
.dqs_map[DDR_CH1] = {0, 1, 2, 3, 4, 5, 6, 7},
/*
* Rcomp resistor values. These values represent the resistance in
* ohms of the three rcomp resistors attached to the DDR_COMP_0,
* DDR_COMP_1, and DDR_COMP_2 pins on the DRAM.
*/
.rcomp_resistor = { 121, 75, 100 },
/*
* Rcomp target values. These will typically be the following
* values for Cannon Lake : { 80, 40, 40, 40, 30 }
*/
.rcomp_targets = { 50, 25, 20, 20, 26 },
/*
* Indicates whether memory is interleaved.
* Set to 1 for an interleaved design,
* set to 0 for non-interleaved design.
*/
.dq_pins_interleaved = 1,
/*
* VREF_CA configuration.
* Set to 0 VREF_CA goes to both CH_A and CH_B,
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
*/
.vref_ca_config = 2,
/* Early Command Training */
.ect = 0,
};
void mainboard_memory_init_params(FSPM_UPD *memupd) {
// Allow memory clocks higher than 2933 MHz
memupd->FspmConfig.SaOcSupport = 1;
// Set primary display to internal graphics
memupd->FspmConfig.PrimaryDisplay = 0;
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
if BOARD_SYSTEM76_ADDW2
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select DRIVERS_SYSTEM76_DGPU
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_BAT_THRESHOLDS
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select EC_SYSTEM76_EC_OLED
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_SMI_HANDLER
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
select SOC_INTEL_CANNONLAKE_PCH_H
select SOC_INTEL_COMETLAKE
select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP
select TPM_RDRESP_NEED_DELAY
select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB
config MAINBOARD_DIR
string
default "system76/addw2"
config MAINBOARD_PART_NUMBER
string
default "addw2"
config MAINBOARD_SMBIOS_PRODUCT_NAME
string
default "Adder WS"
config MAINBOARD_VERSION
string
default "addw2"
config CBFS_SIZE
hex
default 0xA00000
config CONSOLE_POST
bool
default y
config ONBOARD_VGA_IS_PRIMARY
bool
default y
config UART_FOR_CONSOLE
int
default 2
config MAX_CPUS
int
default 16
config DIMM_MAX
int
default 2
config DIMM_SPD_SIZE
int
default 512
config VGA_BIOS_FILE
string
default "pci8086,9bc4.rom"
config VGA_BIOS_ID
string
default "8086,9bc4"
config POST_DEVICE
bool
default n
endif

View File

@ -0,0 +1,2 @@
config BOARD_SYSTEM76_ADDW2
bool "addw2"

View File

@ -0,0 +1,4 @@
bootblock-y += bootblock.c
ramstage-y += ramstage.c
ramstage-y += hda_verb.c
ramstage-y += tas5825m.c

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
// GPP_K6 SCI
Method (_L06, 0, Serialized) {
Debug = Concatenate("GPE _L06: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
If (\_SB.PCI0.LPCB.EC0.ECOK) {
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
Notify(\_SB.LID0, 0x80)
}
}
}

View File

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include "../gpio.h"
#include <drivers/system76/dgpu/acpi/dgpu.asl>
#define EC_GPE_SCI 0x03 /* GPP_K3 */
#define EC_GPE_SWI 0x06 /* GPP_K6 */
#define EC_COLOR_KEYBOARD 1
#include <ec/system76/ec/acpi/ec.asl>
Scope (\_SB) {
#include "sleep.asl"
}
Scope (\_GPE) {
#include "gpe.asl"
}

View File

@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Method called from _PTS prior to enter sleep state */
Method (MPTS, 1) {
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
// Turn DGPU on before sleeping
\_SB.PCI0.PEGP.DEV0._ON()
}
/* Method called from _WAK prior to wakeup */
Method (MWAK, 1) {
\_SB.PCI0.LPCB.EC0.WAK (Arg0)
}

View File

@ -0,0 +1,8 @@
Vendor name: System76
Board name: addw2
Category: laptop
Release year: 2020
ROM package: SOIC-8
ROM protocol: SPI
ROM socketed: n
Flashrom support: y

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
#include <gpio.h>
#include "gpio.h"
#include <drivers/system76/dgpu/bootblock.c>
void bootblock_mainboard_init(void) {
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
dgpu_power_enable(1);
}

Binary file not shown.

View File

@ -0,0 +1,332 @@
chip soc/intel/cannonlake
# Lock Down
register "common_soc_config" = "{
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
// Touchpad I2C bus
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 80,
.fall_time_ns = 110,
},
}"
# Send an extra VR mailbox command for the PS4 exit issue
register "SendVrMbxCmd" = "2"
# ACPI (soc/intel/cannonlake/acpi.c)
# Disable s0ix
register "s0ix_enable" = "0"
# PM Timer Enabled
register "PmTimerDisabled" = "0"
# Disable DPTF
register "dptf_enable" = "0"
# CPU (soc/intel/cannonlake/cpu.c)
# Power limit
register "power_limits_config" = "{
// /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
.tdp_pl1_override = 45,
// /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
.tdp_pl2_override = 90,
}"
# Enable "Intel Speed Shift Technology"
register "speed_shift_enable" = "1"
# Enable Enhanced Intel SpeedStep
register "eist_enable" = "1"
# FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c)
register "SaGv" = "SaGv_Enabled"
register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
# Serial I/O
register "SerialIoDevMode" = "{
[PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad I2C bus
[PchSerialIoIndexI2C1] = PchSerialIoDisabled,
[PchSerialIoIndexI2C2] = PchSerialIoDisabled,
[PchSerialIoIndexI2C3] = PchSerialIoDisabled,
[PchSerialIoIndexI2C4] = PchSerialIoDisabled,
[PchSerialIoIndexI2C5] = PchSerialIoDisabled,
[PchSerialIoIndexSPI0] = PchSerialIoDisabled,
[PchSerialIoIndexSPI1] = PchSerialIoDisabled,
[PchSerialIoIndexSPI2] = PchSerialIoDisabled,
[PchSerialIoIndexUART0] = PchSerialIoDisabled,
[PchSerialIoIndexUART1] = PchSerialIoDisabled,
[PchSerialIoIndexUART2] = PchSerialIoPci, // Debug console
}"
# SATA
register "SataMode" = "Sata_AHCI"
register "SataSalpSupport" = "0"
register "SataPortsEnable[0]" = "1" # HDD (SATA0B)
register "SataPortsEnable[1]" = "1" # SSD1 (SATA1A)
register "SataPortsEnable[2]" = "0"
register "SataPortsEnable[3]" = "0"
register "SataPortsEnable[4]" = "0"
register "SataPortsEnable[5]" = "0"
register "SataPortsEnable[6]" = "0"
register "SataPortsEnable[7]" = "0"
register "SataPortsDevSlp[0]" = "0"
register "SataPortsDevSlp[1]" = "0"
register "SataPortsDevSlp[2]" = "0"
register "SataPortsDevSlp[3]" = "0"
register "SataPortsDevSlp[4]" = "0"
register "SataPortsDevSlp[5]" = "0"
register "SataPortsDevSlp[6]" = "0"
register "SataPortsDevSlp[7]" = "0"
# Audio
register "PchHdaDspEnable" = "0"
register "PchHdaAudioLinkHda" = "1"
register "PchHdaAudioLinkDmic0" = "0"
register "PchHdaAudioLinkDmic1" = "0"
register "PchHdaAudioLinkSsp0" = "0"
register "PchHdaAudioLinkSsp1" = "0"
register "PchHdaAudioLinkSsp2" = "0"
register "PchHdaAudioLinkSndw1" = "0"
register "PchHdaAudioLinkSndw2" = "0"
register "PchHdaAudioLinkSndw3" = "0"
register "PchHdaAudioLinkSndw4" = "0"
# USB
register "SsicPortEnable" = "0"
# USB2
register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C and DisplayPort
register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.1 Gen 2
register "usb2_ports[3]" = "USB2_PORT_EMPTY"
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.1 Gen 1 audio
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.1 Gen 1 back
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Per-Key RGB keyboard
register "usb2_ports[8]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_EMPTY"
register "usb2_ports[10]" = "USB2_PORT_EMPTY"
register "usb2_ports[11]" = "USB2_PORT_EMPTY"
register "usb2_ports[12]" = "USB2_PORT_EMPTY"
register "usb2_ports[13]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
register "usb2_ports[14]" = "USB2_PORT_EMPTY"
register "usb2_ports[15]" = "USB2_PORT_EMPTY"
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C and DisplayPort
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 right
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C (without TBT)
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 2 TYPE-C (without TBT)
register "usb3_ports[4]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 1 audio
register "usb3_ports[5]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.1 Gen 1 back
register "usb3_ports[6]" = "USB3_PORT_EMPTY"
register "usb3_ports[7]" = "USB3_PORT_EMPTY"
register "usb3_ports[8]" = "USB3_PORT_EMPTY"
register "usb3_ports[9]" = "USB3_PORT_EMPTY"
# PCI Express Graphics #0 x16, Clock (NVIDIA GPU)
register "PcieClkSrcUsage[8]" = "0x40"
# PCI Express root port #9 x4, Clock 9 (SSD1)
register "PcieRpEnable[8]" = "1"
register "PcieRpLtrEnable[8]" = "1"
register "PcieClkSrcUsage[9]" = "8"
# PCI Express root port #14 x1, Clock 5 (GLAN)
register "PcieRpEnable[13]" = "1"
register "PcieRpLtrEnable[13]" = "1"
register "PcieClkSrcUsage[5]" = "13"
# PCI Express root port #15 x1, Clock 7 (Card Reader)
register "PcieRpEnable[14]" = "1"
register "PcieRpLtrEnable[14]" = "1"
register "PcieClkSrcUsage[7]" = "14"
# PCI Express root port #16 x1, Clock 6 (WLAN)
register "PcieRpEnable[15]" = "1"
register "PcieRpLtrEnable[15]" = "1"
register "PcieClkSrcUsage[6]" = "15"
# PCI Express root port #17 x4, Clock 0 (Thunderbolt)
register "PcieRpEnable[16]" = "1"
register "PcieRpLtrEnable[16]" = "1"
register "PcieRpHotPlug[16]" = "1"
register "PcieClkSrcUsage[0]" = "16"
# PCI Express root port #21 x4, Clock 10 (SSD2)
register "PcieRpEnable[20]" = "1"
register "PcieRpLtrEnable[20]" = "1"
register "PcieClkSrcUsage[10]" = "20"
# Set all clocks sources to the same clock request
register "PcieClkSrcClkReq[0]" = "0"
register "PcieClkSrcClkReq[1]" = "1"
register "PcieClkSrcClkReq[2]" = "2"
register "PcieClkSrcClkReq[3]" = "3"
register "PcieClkSrcClkReq[4]" = "4"
register "PcieClkSrcClkReq[5]" = "5"
register "PcieClkSrcClkReq[6]" = "6"
register "PcieClkSrcClkReq[7]" = "7"
register "PcieClkSrcClkReq[8]" = "8"
register "PcieClkSrcClkReq[9]" = "9"
register "PcieClkSrcClkReq[10]" = "10"
register "PcieClkSrcClkReq[11]" = "11"
register "PcieClkSrcClkReq[12]" = "12"
register "PcieClkSrcClkReq[13]" = "13"
register "PcieClkSrcClkReq[14]" = "14"
register "PcieClkSrcClkReq[15]" = "15"
# Misc
register "Device4Enable" = "1"
register "HeciEnabled" = "0"
register "Heci3Enabled" = "0"
register "AcousticNoiseMitigation" = "1"
#register "dmipwroptimize" = "1"
#register "satapwroptimize" = "1"
# Power
# sudo devmem2 0xfe001020 (pmc_bar + GEN_PMCON_A), bits 11:10
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpS3MinAssert" = "3" # 50ms
# sudo devmem2 0xfe001020 (pmc_bar + GEN_PMCON_A), bits 5:4
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpS4MinAssert" = "1" # 1s
# sudo devmem2 0xfe001818 (pmc_bar + PM_CFG), bits 19:18
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpSusMinAssert" = "4" # 4s
# sudo devmem2 0xfe001818 (pmc_bar + PM_CFG), bits 17:16
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpAMinAssert" = "4" # 2s
# Thermal
# rdmsr --bitfield 31:24 --decimal 0x1A2
register "tcc_offset" = "8"
# Serial IRQ Continuous
register "serirq_mode" = "SERIRQ_CONTINUOUS"
# LPC (soc/intel/cannonlake/lpc.c)
# LPC configuration from lspci -s 1f.0 -xxx
# Address 0x84: Decode 0x80 - 0x8F (Port 80)
register "gen1_dec" = "0x000c0081"
# Address 0x88: Decode 0x68 - 0x6F (PMC)
register "gen2_dec" = "0x00040069"
# Address 0x8C: Decode 0xE00 - 0xEFF (AP/EC command)
register "gen3_dec" = "0x00fc0E01"
# Address 0x90: Decode 0xF00 - 0xFFF (AP/EC debug)
register "gen4_dec" = "0x00fc0F01"
# PMC (soc/intel/cannonlake/pmc.c)
# Disable deep Sx states
register "deep_s3_enable_ac" = "0"
register "deep_s3_enable_dc" = "0"
register "deep_s5_enable_ac" = "0"
register "deep_s5_enable_dc" = "0"
register "deep_sx_config" = "0"
# PM Util (soc/intel/cannonlake/pmutil.c)
# GPE configuration
# Note that GPE events called out in ASL code rely on this
# route. i.e. If this route changes then the affected GPE
# offset bits also need to be changed.
# sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG)
register "gpe0_dw0" = "PMC_GPP_K"
register "gpe0_dw1" = "PMC_GPP_G"
register "gpe0_dw2" = "PMC_GPP_E"
# Actual device tree
device cpu_cluster 0 on
device lapic 0 on end
end
device domain 0 on
subsystemid 0x1558 0x65e1 inherit
device pci 00.0 on end # Host Bridge
device pci 01.0 on end # GPU Port
device pci 02.0 on end # Integrated Graphics Device
device pci 04.0 on end # SA Thermal device
device pci 12.0 on end # Thermal Subsystem
device pci 12.5 off end # UFS SCS
device pci 12.6 off end # GSPI #2
device pci 13.0 off end # Integrated Sensor Hub
device pci 14.0 on end # USB xHCI
device pci 14.1 off end # USB xDCI (OTG)
device pci 14.2 on end # Shared SRAM
#chip drivers/intel/wifi
# register "wake" = "PME_B0_EN_BIT"
device pci 14.3 on end # CNVi wifi
#end
device pci 14.5 off end # SDCard
device pci 15.0 on
chip drivers/i2c/hid
register "generic.hid" = ""PNP0C50""
register "generic.desc" = ""Synaptics Touchpad""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_A14_IRQ)"
register "generic.probed" = "1"
register "hid_desc_reg_offset" = "0x20"
device i2c 2c on end
end
end # I2C #0
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3
device pci 16.0 off end # Management Engine Interface 1
device pci 16.1 off end # Management Engine Interface 2
device pci 16.2 off end # Management Engine IDE-R
device pci 16.3 off end # Management Engine KT Redirection
device pci 16.4 off end # Management Engine Interface 3
device pci 16.5 off end # Management Engine Interface 4
device pci 17.0 on end # SATA
device pci 19.0 off end # I2C #4
device pci 19.1 off end # I2C #5
device pci 19.2 on end # UART #2
device pci 1a.0 off end # eMMC
device pci 1b.0 on end # PCI Express Port 17
device pci 1b.1 off end # PCI Express Port 18
device pci 1b.2 off end # PCI Express Port 19
device pci 1b.3 off end # PCI Express Port 20
device pci 1b.4 on end # PCI Express Port 21
device pci 1b.5 off end # PCI Express Port 22
device pci 1b.6 off end # PCI Express Port 23
device pci 1b.7 off end # PCI Express Port 24
device pci 1c.0 off end # PCI Express Port 1
device pci 1c.1 off end # PCI Express Port 2
device pci 1c.2 off end # PCI Express Port 3
device pci 1c.3 off end # PCI Express Port 4
device pci 1c.4 off end # PCI Express Port 5
device pci 1c.5 off end # PCI Express Port 6
device pci 1c.6 off end # PCI Express Port 7
device pci 1c.7 off end # PCI Express Port 8
device pci 1d.0 on end # PCI Express Port 9
device pci 1d.1 off end # PCI Express Port 10
device pci 1d.2 off end # PCI Express Port 11
device pci 1d.3 off end # PCI Express Port 12
device pci 1d.4 off end # PCI Express Port 13
device pci 1d.5 on end # PCI Express Port 14
device pci 1d.6 on end # PCI Express Port 15
device pci 1d.7 on end # PCI Express Port 16
device pci 1e.0 off end # UART #0
device pci 1e.1 off end # UART #1
device pci 1e.2 off end # GSPI #0
device pci 1e.3 off end # GSPI #1
device pci 1f.0 on # LPC Interface
chip drivers/pc80/tpm
device pnp 0c31.0 on end
end
end
device pci 1f.1 off end # P2SB
device pci 1f.2 off end # Power Management Controller
device pci 1f.3 on end # Intel HDA
device pci 1f.4 on
chip drivers/i2c/tas5825m
register "id" = "0"
device i2c 4e on end # (8bit address: 0x9c)
end # tas5825m
end # SMBus
device pci 1f.5 on end # PCH SPI
device pci 1f.6 off end # GbE
end
end

View File

@ -0,0 +1,29 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
DefinitionBlock(
"dsdt.aml",
"DSDT",
0x02, // DSDT revision: ACPI v2.0 and up
OEM_ID,
ACPI_TABLE_CREATOR,
0x20110725 // OEM revision
)
{
#include <soc/intel/cannonlake/acpi/platform.asl>
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
#include <cpu/intel/common/acpi/cpu.asl>
Device (\_SB.PCI0) {
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
}
#include <southbridge/intel/common/acpi/sleepstates.asl>
Scope (\_SB.PCI0.LPCB) {
#include <drivers/pc80/pc/ps2_controller.asl>
}
#include "acpi/mainboard.asl"
}

View File

@ -0,0 +1,255 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef MAINBOARD_GPIO_H
#define MAINBOARD_GPIO_H
#define DGPU_RST_N GPP_F22
#define DGPU_PWR_EN GPP_F23
#define DGPU_GC6 GPP_K21
#ifndef __ACPI__
#include <soc/gpe.h>
#include <soc/gpio.h>
/* Pad configuration in romstage. */
static const struct pad_config early_gpio_table[] = {
PAD_CFG_TERM_GPO(GPP_F22, 0, NONE, DEEP), // DGPU_RST_N
PAD_CFG_TERM_GPO(GPP_F23, 0, NONE, DEEP), // DGPU_PWR_EN
};
/* Pad configuration in ramstage. */
static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPD0, NONE, DEEP, NF1),
PAD_CFG_NF(GPD1, NATIVE, DEEP, NF1),
PAD_CFG_GPI(GPD2, NATIVE, PWROK),
PAD_CFG_NF(GPD3, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPD4, NONE, DEEP, NF1),
PAD_CFG_NF(GPD5, NONE, DEEP, NF1),
PAD_CFG_NF(GPD6, NONE, DEEP, NF1),
PAD_CFG_GPI(GPD7, NONE, PWROK),
PAD_CFG_NF(GPD8, NONE, DEEP, NF1),
PAD_CFG_NF(GPD9, NONE, PWROK, NF1),
_PAD_CFG_STRUCT(GPD10, 0x04000601, 0x0000),
PAD_CFG_NF(GPD11, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_A0, NONE, DEEP),
PAD_CFG_NF(GPP_A1, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_A2, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_A3, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_A4, NATIVE, DEEP, NF1),
PAD_CFG_NF(GPP_A5, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_A7, NONE, DEEP),
PAD_CFG_NF(GPP_A8, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A9, DN_20K, DEEP, NF1),
PAD_CFG_NF(GPP_A10, DN_20K, DEEP, NF1),
PAD_CFG_GPI(GPP_A11, UP_20K, DEEP),
PAD_CFG_GPI(GPP_A12, NONE, DEEP),
PAD_CFG_NF(GPP_A13, NONE, DEEP, NF1),
PAD_CFG_GPI_APIC(GPP_A14, NONE, PLTRST, EDGE_SINGLE, INVERT), // TCHPD_INT#
PAD_CFG_NF(GPP_A15, UP_20K, DEEP, NF1),
PAD_CFG_GPI(GPP_A16, DN_20K, DEEP),
PAD_CFG_GPI(GPP_A17, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_A18, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_A19, NONE, DEEP),
PAD_CFG_GPI(GPP_A20, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_A21, 0x46080100, 0x0000),
PAD_CFG_TERM_GPO(GPP_A22, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_A23, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_B0, 0x42080100, 0x3000),
PAD_CFG_GPI(GPP_B1, NONE, DEEP),
PAD_CFG_GPI(GPP_B2, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_B3, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_B4, NONE, DEEP),
PAD_CFG_NF(GPP_B5, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_B6, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_B7, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_B8, NONE, DEEP),
PAD_CFG_GPI(GPP_B9, NONE, DEEP),
PAD_CFG_NF(GPP_B10, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_B11, NONE, DEEP),
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
_PAD_CFG_STRUCT(GPP_B13, 0x44000601, 0x0000),
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_B15, NONE, DEEP),
PAD_CFG_GPI(GPP_B16, NONE, DEEP),
PAD_CFG_GPI(GPP_B17, NONE, DEEP),
PAD_CFG_GPI(GPP_B18, NONE, DEEP),
PAD_CFG_GPI(GPP_B19, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_B20, 0x42840101, 0x0000),
PAD_CFG_GPI(GPP_B21, NONE, DEEP),
PAD_CFG_GPI(GPP_B22, NONE, DEEP),
PAD_CFG_GPI(GPP_B23, NONE, DEEP),
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_C2, NONE, DEEP),
PAD_CFG_GPI(GPP_C3, NONE, DEEP),
PAD_CFG_GPI(GPP_C4, NONE, DEEP),
PAD_CFG_GPI(GPP_C5, NONE, DEEP),
PAD_CFG_GPI(GPP_C6, NONE, DEEP),
PAD_CFG_GPI(GPP_C7, NONE, DEEP),
PAD_CFG_GPI(GPP_C8, NONE, DEEP),
PAD_CFG_GPI(GPP_C9, NONE, DEEP),
PAD_CFG_GPI(GPP_C10, NONE, DEEP),
PAD_CFG_GPI(GPP_C11, NONE, DEEP), // TBT_DET#
PAD_CFG_GPI(GPP_C12, NONE, DEEP), // GC6_FB_EN_PCH
PAD_CFG_GPI(GPP_C13, NONE, PLTRST),
PAD_CFG_TERM_GPO(GPP_C14, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_C15, NONE, DEEP),
PAD_CFG_NF(GPP_C16, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C17, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C18, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C19, NONE, PLTRST, NF1),
PAD_CFG_GPI(GPP_C20, NONE, DEEP),
PAD_CFG_GPI(GPP_C21, NONE, DEEP),
PAD_CFG_GPI(GPP_C22, NONE, DEEP),
PAD_CFG_GPI(GPP_C23, NONE, DEEP),
PAD_CFG_GPI(GPP_D0, NONE, DEEP),
PAD_CFG_GPI(GPP_D1, NONE, DEEP),
PAD_CFG_GPI(GPP_D2, NONE, DEEP),
PAD_CFG_GPI(GPP_D3, NONE, DEEP),
PAD_CFG_GPI(GPP_D4, NONE, DEEP),
PAD_CFG_NF(GPP_D5, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_D6, NONE, DEEP, NF3),
PAD_CFG_GPI(GPP_D7, NONE, DEEP),
PAD_CFG_GPI(GPP_D8, NONE, DEEP),
PAD_CFG_GPI(GPP_D9, NONE, DEEP),
PAD_CFG_GPI(GPP_D10, NONE, DEEP),
PAD_CFG_GPI(GPP_D11, NONE, DEEP),
PAD_CFG_GPI(GPP_D12, NONE, DEEP),
PAD_CFG_GPI(GPP_D13, NONE, DEEP),
PAD_CFG_GPI(GPP_D14, NONE, DEEP),
PAD_CFG_GPI(GPP_D15, NONE, DEEP),
PAD_CFG_GPI(GPP_D16, NONE, DEEP),
PAD_CFG_NF(GPP_D17, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_D18, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_D21, NONE, DEEP),
PAD_CFG_GPI(GPP_D22, NONE, DEEP),
PAD_CFG_GPI(GPP_D23, NONE, DEEP),
PAD_CFG_GPI(GPP_E0, NONE, DEEP),
PAD_CFG_NF(GPP_E1, UP_20K, DEEP, NF1),
PAD_CFG_GPI(GPP_E2, NONE, DEEP),
PAD_CFG_GPI(GPP_E3, NONE, DEEP),
PAD_CFG_GPI(GPP_E4, NONE, DEEP),
PAD_CFG_NF(GPP_E5, NONE, DEEP, NF1),
PAD_CFG_TERM_GPO(GPP_E6, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_E7, NONE, DEEP),
PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_E9, NONE, DEEP),
PAD_CFG_GPI(GPP_E10, NONE, DEEP),
PAD_CFG_GPI(GPP_E11, NONE, DEEP),
PAD_CFG_GPI(GPP_E12, NONE, DEEP),
PAD_CFG_GPI(GPP_F0, NONE, DEEP),
PAD_CFG_GPI(GPP_F1, NONE, DEEP),
PAD_CFG_GPI(GPP_F2, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_F3, 0, NONE, DEEP), // GPP_F3_LAN_RST#
PAD_CFG_GPI(GPP_F4, NONE, DEEP), // GPP_F4_TBT_RST#
PAD_CFG_GPI(GPP_F5, NONE, DEEP),
PAD_CFG_GPI(GPP_F6, NONE, DEEP),
PAD_CFG_GPI(GPP_F7, NONE, DEEP),
PAD_CFG_GPI(GPP_F8, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_F9, 0, NONE, DEEP), // PS8331_SW
PAD_CFG_GPI(GPP_F10, NONE, DEEP),
PAD_CFG_GPI(GPP_F11, NONE, DEEP),
PAD_CFG_GPI(GPP_F12, NONE, DEEP),
PAD_CFG_GPI(GPP_F13, NONE, DEEP),
PAD_CFG_GPI(GPP_F14, NONE, DEEP),
PAD_CFG_GPI(GPP_F15, NONE, DEEP),
PAD_CFG_GPI(GPP_F16, NONE, DEEP),
PAD_CFG_GPI(GPP_F17, NONE, DEEP),
PAD_CFG_GPI(GPP_F18, NONE, DEEP),
PAD_CFG_NF(GPP_F19, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_F20, NONE, DEEP, NF1), // BLON
PAD_CFG_NF(GPP_F21, NONE, DEEP, NF1),
PAD_CFG_TERM_GPO(GPP_F22, 1, NONE, DEEP), // DGPU_RST#_PCH
PAD_CFG_TERM_GPO(GPP_F23, 1, NONE, DEEP), // DGPU_PWR_EN
PAD_CFG_GPI(GPP_G0, NONE, DEEP),
PAD_CFG_GPI(GPP_G1, NONE, DEEP),
PAD_CFG_GPI(GPP_G2, NONE, DEEP),
PAD_CFG_GPI(GPP_G3, NONE, DEEP),
PAD_CFG_GPI(GPP_G4, NONE, DEEP),
PAD_CFG_GPI(GPP_G5, NONE, DEEP),
PAD_CFG_GPI(GPP_G6, NONE, DEEP),
PAD_CFG_GPI(GPP_G7, NONE, DEEP),
PAD_CFG_NF(GPP_H0, NONE, DEEP, NF1), // WLAN_CLKREQ#
PAD_CFG_NF(GPP_H1, NONE, DEEP, NF1), // CR_CLKREQ#
PAD_CFG_NF(GPP_H2, NONE, DEEP, NF1), // PEG_CLKREQ#
PAD_CFG_NF(GPP_H3, NONE, DEEP, NF1), // SSD1_CLKREQ#
PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), // SSD2_CLKREQ#
PAD_CFG_GPI(GPP_H5, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_H6, 1, NONE, DEEP), // PCIE_SSD1_RST#
PAD_CFG_TERM_GPO(GPP_H7, 1, NONE, DEEP), // PCIE_SSD2_RST#
PAD_CFG_GPI(GPP_H8, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_H9, 0x40880100, 0x0000),
PAD_CFG_GPI(GPP_H10, NONE, DEEP),
PAD_CFG_GPI(GPP_H11, NONE, DEEP),
PAD_CFG_GPI(GPP_H12, NONE, DEEP),
PAD_CFG_GPI(GPP_H13, NONE, DEEP), // TBTA_HRESET
PAD_CFG_GPI(GPP_H14, NONE, DEEP),
PAD_CFG_GPI(GPP_H15, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_H16, 1, NONE, DEEP), // TBT_RTD3_PWR_EN_R
PAD_CFG_TERM_GPO(GPP_H17, 1, NONE, PLTRST), // TBT_FORCE_PWR_R
PAD_CFG_GPI(GPP_H18, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_H19, 0, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_H20, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_H21, NONE, DEEP),
PAD_CFG_GPI(GPP_H22, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_H23, 0x82880100, 0x0000),
_PAD_CFG_STRUCT(GPP_I0, 0x46080100, 0x0000),
_PAD_CFG_STRUCT(GPP_I1, 0x46080100, 0x0000),
_PAD_CFG_STRUCT(GPP_I2, 0x46080100, 0x0000),
_PAD_CFG_STRUCT(GPP_I3, 0x46080100, 0x0000),
PAD_CFG_NF(GPP_I4, NONE, DEEP, NF1),
PAD_CFG_TERM_GPO(GPP_I5, 1, UP_20K, PLTRST), // TBT_GPIO_RST#
PAD_CFG_GPI(GPP_I6, NONE, DEEP),
PAD_CFG_GPI(GPP_I7, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_I8, 1, NONE, DEEP), // SSD1_PWR_EN
PAD_CFG_TERM_GPO(GPP_I9, 1, NONE, DEEP), // SSD2_PWR_EN
PAD_CFG_GPI(GPP_I10, NONE, DEEP),
PAD_CFG_GPI(GPP_I11, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_I12, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_I13, NONE, DEEP),
PAD_CFG_GPI(GPP_I14, NONE, DEEP),
PAD_CFG_NF(GPP_J0, NONE, DEEP, NF1),
PAD_CFG_TERM_GPO(GPP_J1, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_J2, NONE, DEEP),
PAD_CFG_GPI(GPP_J3, NONE, DEEP),
PAD_CFG_NF(GPP_J4, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J5, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_J6, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J7, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_J8, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J9, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_J10, NONE, DEEP),
PAD_CFG_GPI(GPP_J11, DN_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_K0, 0, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_K1, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_K2, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_K3, 0x40880100, 0x0000),
_PAD_CFG_STRUCT(GPP_K4, 0x44000101, 0x0000),
PAD_CFG_GPI(GPP_K5, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_K6, 0x40880100, 0x0000),
PAD_CFG_GPI(GPP_K7, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_K8, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_K9, NONE, DEEP),
PAD_CFG_GPI(GPP_K10, NONE, DEEP),
PAD_CFG_GPI(GPP_K11, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_K12, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_K13, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_K14, 0, NONE, DEEP),
_PAD_CFG_STRUCT(GPP_K15, 0x80100100, 0x0000),
PAD_CFG_GPI(GPP_K16, NONE, DEEP),
PAD_CFG_GPI(GPP_K17, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_K18, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_K19, NONE, DEEP),
PAD_CFG_GPI(GPP_K20, NONE, DEEP),
PAD_CFG_GPI(GPP_K21, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_K22, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_K23, NONE, DEEP),
};
#endif
#endif

View File

@ -0,0 +1,35 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef HDA_VERB_H
#define HDA_VERB_H
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC1220 */
0x10ec1220, /* Vendor ID */
0x155865e1, /* Subsystem ID */
12, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x155865e1),
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),
};
const u32 pc_beep_verbs[] = {
// Enable DMIC microphone on ALC1220
0x02050036,
0x02042a6a,
};
AZALIA_ARRAY_SIZES;
#endif

View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/ramstage.h>
#include "gpio.h"
void mainboard_silicon_init_params(FSP_S_CONFIG *params) {
/* Configure pads prior to SiliconInit() in case there's any
* dependencies during hardware initialization. */
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@ -0,0 +1,87 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/cnl_memcfg_init.h>
#include <soc/romstage.h>
static const struct cnl_mb_cfg memcfg = {
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
.spd[0] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa0},
},
.spd[1] = {.read_type = NOT_EXISTING},
.spd[2] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa4},
},
.spd[3] = {.read_type = NOT_EXISTING},
/*
* For each channel, there are 3 sets of DQ byte mappings,
* where each set has a package 0 and a package 1 value (package 0
* represents the first 64-bit lpddr4 chip combination, and package 1
* represents the second 64-bit lpddr4 chip combination).
* The first three sets are for CLK, CMD, and CTL.
* The fsp package actually expects 6 sets, but the last 3 sets are
* not used in CNL, so we only define the three sets that are used
* and let the meminit_lpddr4() routine take care of clearing the
* unused fields for the caller.
*/
.dq_map[DDR_CH0] = {
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
.dq_map[DDR_CH1] = {
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
/*
* DQS CPU<>DRAM map Ch0 and Ch1. Each array entry represents a
* mapping of a dq bit on the CPU to the bit it's connected to on
* the memory part. The array index represents the dqs bit number
* on the memory part, and the values in the array represent which
* pin on the CPU that DRAM pin connects to.
*/
.dqs_map[DDR_CH0] = {0, 1, 2, 3, 4, 5, 6, 7},
.dqs_map[DDR_CH1] = {0, 1, 2, 3, 4, 5, 6, 7},
/*
* Rcomp resistor values. These values represent the resistance in
* ohms of the three rcomp resistors attached to the DDR_COMP_0,
* DDR_COMP_1, and DDR_COMP_2 pins on the DRAM.
*/
.rcomp_resistor = { 121, 75, 100 },
/*
* Rcomp target values. These will typically be the following
* values for Cannon Lake : { 80, 40, 40, 40, 30 }
*/
.rcomp_targets = { 50, 25, 20, 20, 26 },
/*
* Indicates whether memory is interleaved.
* Set to 1 for an interleaved design,
* set to 0 for non-interleaved design.
*/
.dq_pins_interleaved = 1,
/*
* VREF_CA configuration.
* Set to 0 VREF_CA goes to both CH_A and CH_B,
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
*/
.vref_ca_config = 2,
/* Early Command Training */
.ect = 0,
};
void mainboard_memory_init_params(FSPM_UPD *memupd) {
// Allow memory clocks higher than 2933 MHz
memupd->FspmConfig.SaOcSupport = 1;
// Set primary display to internal graphics
memupd->FspmConfig.PrimaryDisplay = 0;
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,82 @@
if BOARD_SYSTEM76_BONW14
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_I2C_HID
select DRIVERS_I2C_TAS5825M
select DRIVERS_SYSTEM76_DGPU
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_BAT_THRESHOLDS
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select EC_SYSTEM76_EC_DGPU
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_SMI_HANDLER
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
select SOC_INTEL_CANNONLAKE_PCH_H
select SOC_INTEL_COMETLAKE
select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP
select TPM_RDRESP_NEED_DELAY
select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB
# Hack for correct FSP headers until coreboot is updated
config FSP_HEADER_PATH
default "3rdparty/fsp/CometLakeFspBinPkg/CometLakeS/Include/"
# Hack for correct FSP blobs until coreboot is updated
config FSP_FD_PATH
default "3rdparty/fsp/CometLakeFspBinPkg/CometLakeS/FSP.fd"
config MAINBOARD_DIR
string
default "system76/bonw14"
config MAINBOARD_PART_NUMBER
string
default "bonw14"
config MAINBOARD_SMBIOS_PRODUCT_NAME
string
default "Bonobo WS"
config MAINBOARD_VERSION
string
default "bonw14"
config CBFS_SIZE
hex
default 0xA00000
config CONSOLE_POST
bool
default y
config UART_FOR_CONSOLE
int
default 2
config MAX_CPUS
int
default 20
config DIMM_MAX
int
default 4
config DIMM_SPD_SIZE
int
default 512
config POST_DEVICE
bool
default n
endif

View File

@ -0,0 +1,2 @@
config BOARD_SYSTEM76_BONW14
bool "bonw14"

View File

@ -0,0 +1,4 @@
bootblock-y += bootblock.c
ramstage-y += ramstage.c
ramstage-y += hda_verb.c
ramstage-y += tas5825m.c

View File

@ -0,0 +1,113 @@
Device (\_SB.PCI0.PEG0) {
Name (_ADR, 0x00010000)
Device (PEGP) {
Name (_ADR, Zero)
// Convert a byte to a hex string, trimming extra parts
Method (BHEX, 1) {
Local0 = ToHexString(Arg0)
Return (Mid(Local0, SizeOf(Local0) - 2, 2))
}
// UUID to string
Method (IDST, 1) {
Local0 = ""
Fprintf(
Local0,
"%o%o%o%o-%o%o-%o%o-%o%o-%o%o%o%o%o%o",
BHEX(DerefOf(Arg0[3])),
BHEX(DerefOf(Arg0[2])),
BHEX(DerefOf(Arg0[1])),
BHEX(DerefOf(Arg0[0])),
BHEX(DerefOf(Arg0[5])),
BHEX(DerefOf(Arg0[4])),
BHEX(DerefOf(Arg0[7])),
BHEX(DerefOf(Arg0[6])),
BHEX(DerefOf(Arg0[8])),
BHEX(DerefOf(Arg0[9])),
BHEX(DerefOf(Arg0[10])),
BHEX(DerefOf(Arg0[11])),
BHEX(DerefOf(Arg0[12])),
BHEX(DerefOf(Arg0[13])),
BHEX(DerefOf(Arg0[14])),
BHEX(DerefOf(Arg0[15]))
)
Return (Local0)
}
// Safe hex conversion, checks type first
Method (SFST, 1) {
Local0 = ObjectType(Arg0)
If (Local0 == 1 || Local0 == 2 || Local0 == 3) {
Return (ToHexString(Arg0))
} Else {
Return (Concatenate("Type: ", Arg0))
}
}
Method (_DSM, 4, Serialized) {
Debug = "NVIDIA _DSM"
Printf(" Arg0: %o", IDST(Arg0))
Printf(" Arg1: %o", SFST(Arg1))
Printf(" Arg2: %o", SFST(Arg2))
Printf(" Arg3: %o", SFST(Arg3))
If (Arg0 == ToUUID ("d4a50b75-65c7-46f7-bfb7-41514cea0244")) {
If (Arg1 != 0x0102) {
Printf(" Invalid Arg1, return 0x80000002")
Return (0x80000002)
}
If (Arg2 == 0) {
Printf(" Arg2 == 0x00, return supported functions")
Return (Buffer (4) {
0x01, 0x00, 0x10, 0x00
})
}
If (Arg2 == 0x14) {
Printf(" Arg2 == 0x14, return backlight package")
Return (Package (9) {
0x8000A450,
0x0200,
Zero,
Zero,
One,
One,
200,
32,
1000
})
}
Printf(" Unknown Arg2, return 0x80000002")
Return (0x80000002)
}
Printf(" Unknown Arg0, return 0x80000001")
Return (0x80000001)
}
Method (_DOD, 0, NotSerialized) // _DOD: Display Output Devices
{
Return (Package (3) {
0x80008320,
0x80006330,
0x8000A450
})
}
Device (HDM0) {
Name (_ADR, 0x80008320)
}
Device (DSP0) {
Name (_ADR, 0x80006330)
}
Device (DSP1) {
Name (_ADR, 0x8000A450)
}
}
}

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
// GPP_K6 SCI
Method (_L06, 0, Serialized) {
Debug = Concatenate("GPE _L06: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
If (\_SB.PCI0.LPCB.EC0.ECOK) {
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
Notify(\_SB.LID0, 0x80)
}
}
}

View File

@ -0,0 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#define EC_GPE_SCI 0x03 /* GPP_K3 */
#define EC_GPE_SWI 0x06 /* GPP_K6 */
#include <ec/system76/ec/acpi/ec.asl>
Scope (\_SB) {
#include "sleep.asl"
}
Scope (\_GPE) {
#include "gpe.asl"
}
#include "dgpu.asl"

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Method called from _PTS prior to enter sleep state */
Method (MPTS, 1) {
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
}
/* Method called from _WAK prior to wakeup */
Method (MWAK, 1) {
\_SB.PCI0.LPCB.EC0.WAK (Arg0)
}

View File

@ -0,0 +1,8 @@
Vendor name: System76
Board name: bonw14
Category: laptop
Release year: 2020
ROM package: SOIC-8
ROM protocol: SPI
ROM socketed: n
Flashrom support: y

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
#include <gpio.h>
#include "gpio.h"
void bootblock_mainboard_init(void) {
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@ -0,0 +1,326 @@
chip soc/intel/cannonlake
# Lock Down
register "common_soc_config" = "{
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
// Touchpad I2C bus
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 80,
.fall_time_ns = 110,
},
}"
# Send an extra VR mailbox command for the PS4 exit issue
register "SendVrMbxCmd" = "2"
# ACPI (soc/intel/cannonlake/acpi.c)
# Enable s0ix
register "s0ix_enable" = "0"
# PM Timer Enabled
register "PmTimerDisabled" = "0"
# Disable DPTF
register "dptf_enable" = "0"
# CPU (soc/intel/cannonlake/cpu.c)
# Power limit
register "power_limits_config" = "{
// /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
.tdp_pl1_override = 125,
// /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
.tdp_pl2_override = 160,
}"
# Enable "Intel Speed Shift Technology"
register "speed_shift_enable" = "1"
# Enable Enhanced Intel SpeedStep
register "eist_enable" = "1"
# FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c)
register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
# Serial I/O
register "SerialIoDevMode" = "{
[PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad I2C bus
[PchSerialIoIndexUART2] = PchSerialIoPci, // Debug console
}"
# SATA
register "SataMode" = "Sata_AHCI"
register "SataSalpSupport" = "0"
register "SataPortsEnable[0]" = "0"
register "SataPortsEnable[1]" = "1" # SATA1A (SSD)
register "SataPortsEnable[2]" = "0"
register "SataPortsEnable[3]" = "1" # SATA3 (M.2_SATA3)
register "SataPortsEnable[4]" = "1" # SATA4 (SSD2)
register "SataPortsEnable[5]" = "0"
register "SataPortsEnable[6]" = "0"
register "SataPortsEnable[7]" = "0"
register "SataPortsDevSlp[0]" = "0"
register "SataPortsDevSlp[1]" = "0"
register "SataPortsDevSlp[2]" = "0"
register "SataPortsDevSlp[3]" = "0"
register "SataPortsDevSlp[4]" = "0"
register "SataPortsDevSlp[5]" = "0"
register "SataPortsDevSlp[6]" = "0"
register "SataPortsDevSlp[7]" = "0"
# Audio
register "PchHdaDspEnable" = "0"
register "PchHdaAudioLinkHda" = "1"
register "PchHdaAudioLinkDmic0" = "0"
register "PchHdaAudioLinkDmic1" = "0"
register "PchHdaAudioLinkSsp0" = "0"
register "PchHdaAudioLinkSsp1" = "0"
register "PchHdaAudioLinkSsp2" = "0"
register "PchHdaAudioLinkSndw1" = "0"
register "PchHdaAudioLinkSndw2" = "0"
register "PchHdaAudioLinkSndw3" = "0"
register "PchHdaAudioLinkSndw4" = "0"
# USB
register "SsicPortEnable" = "0"
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # USB 3_2
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # USB 3_1
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # USB 3_4
register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # USB 3_3
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # Per-key RGB
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB Type-C
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # XFI
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[8]" = "USB2_PORT_MID(OC_SKIP)" # Light guide
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[10]" = "USB2_PORT_EMPTY"
register "usb2_ports[11]" = "USB2_PORT_EMPTY"
register "usb2_ports[12]" = "USB2_PORT_EMPTY"
register "usb2_ports[13]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
register "usb2_ports[14]" = "USB2_PORT_EMPTY"
register "usb2_ports[15]" = "USB2_PORT_EMPTY"
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3_2
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # ANX7440
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3_4
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3_3
register "usb3_ports[4]" = "USB3_PORT_EMPTY"
register "usb3_ports[5]" = "USB3_PORT_EMPTY"
register "usb3_ports[6]" = "USB3_PORT_EMPTY"
register "usb3_ports[7]" = "USB3_PORT_EMPTY"
register "usb3_ports[8]" = "USB3_PORT_EMPTY"
register "usb3_ports[9]" = "USB3_PORT_EMPTY"
# PCI Express Graphics #0 x16, Clock 7 (NVIDIA GPU)
register "PcieClkSrcUsage[7]" = "0x40"
# PCI Express root port #1 x4, Clock 6 (Thunderbolt)
register "PcieRpEnable[0]" = "1"
register "PcieRpLtrEnable[0]" = "1"
register "PcieRpHotPlug[0]" = "1"
register "PcieClkSrcUsage[6]" = "PCIE_CLK_RP0" # 0 is converted to PCIE_CLK_NOTUSED
# PCI Express root port #5 x4, Clock 10 (USB 3.2)
register "PcieRpEnable[4]" = "1"
register "PcieRpLtrEnable[4]" = "1"
register "PcieClkSrcUsage[10]" = "4"
# PCI Express root port #9 x4, Clock 8 (SSD)
register "PcieRpEnable[8]" = "1"
register "PcieRpLtrEnable[8]" = "1"
register "PcieClkSrcUsage[8]" = "8"
# PCI Express root port #13 x1, Clock 0 (WLAN)
register "PcieRpEnable[12]" = "1"
register "PcieRpLtrEnable[12]" = "1"
register "PcieClkSrcUsage[0]" = "12"
# PCI Express root port #14 x1, Clock 1 (GLAN)
register "PcieRpEnable[13]" = "1"
register "PcieRpLtrEnable[13]" = "1"
register "PcieClkSrcUsage[1]" = "13"
# PCI Express root port #15 x1, Clock 4 (Card Reader)
register "PcieRpEnable[14]" = "1"
register "PcieRpLtrEnable[14]" = "1"
register "PcieClkSrcUsage[4]" = "14"
# PCI Express root port #17 x4, Clock 14 (SSD2)
register "PcieRpEnable[16]" = "1"
register "PcieRpLtrEnable[16]" = "1"
register "PcieClkSrcUsage[14]" = "16"
# PCI Express root port #21 x4, Clock 15 (SSD3)
register "PcieRpEnable[20]" = "1"
register "PcieRpLtrEnable[20]" = "1"
register "PcieClkSrcUsage[15]" = "20"
# Set all clocks sources to the same clock request
register "PcieClkSrcClkReq[0]" = "0"
register "PcieClkSrcClkReq[1]" = "1"
register "PcieClkSrcClkReq[2]" = "2"
register "PcieClkSrcClkReq[3]" = "3"
register "PcieClkSrcClkReq[4]" = "4"
register "PcieClkSrcClkReq[5]" = "5"
register "PcieClkSrcClkReq[6]" = "6"
register "PcieClkSrcClkReq[7]" = "7"
register "PcieClkSrcClkReq[8]" = "8"
register "PcieClkSrcClkReq[9]" = "9"
register "PcieClkSrcClkReq[10]" = "10"
register "PcieClkSrcClkReq[11]" = "11"
register "PcieClkSrcClkReq[12]" = "12"
register "PcieClkSrcClkReq[13]" = "13"
register "PcieClkSrcClkReq[14]" = "14"
register "PcieClkSrcClkReq[15]" = "15"
# Misc
register "Device4Enable" = "1"
register "HeciEnabled" = "0"
register "Heci3Enabled" = "0"
register "AcousticNoiseMitigation" = "1"
#register "dmipwroptimize" = "1"
#register "satapwroptimize" = "1"
# TODO: painfully verify this shit
# Power
# sudo devmem2 0xfe001020 (pmc_bar + GEN_PMCON_A), bits 11:10
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpS3MinAssert" = "3" # 50ms
# sudo devmem2 0xfe001020 (pmc_bar + GEN_PMCON_A), bits 5:4
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpS4MinAssert" = "1" # 1s
# sudo devmem2 0xfe001818 (pmc_bar + PM_CFG), bits 19:18
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpSusMinAssert" = "4" # 4s
# sudo devmem2 0xfe001818 (pmc_bar + PM_CFG), bits 17:16
# WARNING: must then be mapped from FSP value to PCH value
register "PchPmSlpAMinAssert" = "4" # 2s
# Thermal
# rdmsr --bitfield 31:24 --decimal 0x1A2
register "tcc_offset" = "13"
# LPC (soc/intel/cannonlake/lpc.c)
# LPC configuration from lspci -s 1f.0 -xxx
# Address 0x84: Decode 0x80 - 0x8F (Port 80)
register "gen1_dec" = "0x000c0081"
# Address 0x88: Decode 0x68 - 0x6F (PMC)
register "gen2_dec" = "0x00040069"
# Address 0x8C: Decode 0xE00 - 0xEFF (AP/EC command)
register "gen3_dec" = "0x00fc0E01"
# Address 0x90: Decode 0xF00 - 0xFFF (AP/EC debug)
register "gen4_dec" = "0x00fc0F01"
# PM Util (soc/intel/cannonlake/pmutil.c)
# GPE configuration
# Note that GPE events called out in ASL code rely on this
# route. i.e. If this route changes then the affected GPE
# offset bits also need to be changed.
# sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG)
register "gpe0_dw0" = "PMC_GPP_K"
register "gpe0_dw1" = "PMC_GPP_G"
register "gpe0_dw2" = "PMC_GPP_E"
# Actual device tree
device cpu_cluster 0 on
device lapic 0 on end
end
device domain 0 on
subsystemid 0x1558 0x7714 inherit
device pci 00.0 on end # Host Bridge
device pci 01.0 on end # GPU Port
#TODO: is this enough to disable iGPU?
device pci 02.0 off end # Integrated Graphics Device
device pci 04.0 on end # SA Thermal device
device pci 12.0 on end # Thermal Subsystem
device pci 12.5 off end # UFS SCS
device pci 12.6 off end # GSPI #2
device pci 13.0 off end # Integrated Sensor Hub
device pci 14.0 on end # USB xHCI
device pci 14.1 off end # USB xDCI (OTG)
device pci 14.2 on end # Shared SRAM
#chip drivers/intel/wifi
# register "wake" = "PME_B0_EN_BIT"
device pci 14.3 on end # CNVi wifi
#end
device pci 14.5 off end # SDCard
device pci 15.0 on
chip drivers/i2c/hid
register "generic.hid" = ""PNP0C50""
register "generic.desc" = ""Synaptics Touchpad""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_E7_IRQ)"
register "generic.probed" = "1"
register "hid_desc_reg_offset" = "0x20"
device i2c 2c on end
end
end # I2C #0
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3
device pci 16.0 off end # Management Engine Interface 1
device pci 16.1 off end # Management Engine Interface 2
device pci 16.2 off end # Management Engine IDE-R
device pci 16.3 off end # Management Engine KT Redirection
device pci 16.4 off end # Management Engine Interface 3
device pci 16.5 off end # Management Engine Interface 4
device pci 17.0 on end # SATA
device pci 19.0 off end # I2C #4
device pci 19.1 off end # I2C #5
device pci 19.2 on end # UART #2
device pci 1a.0 off end # eMMC
device pci 1b.0 on end # PCI Express Port 17
device pci 1b.1 off end # PCI Express Port 18
device pci 1b.2 off end # PCI Express Port 19
device pci 1b.3 off end # PCI Express Port 20
device pci 1b.4 on end # PCI Express Port 21
device pci 1b.5 off end # PCI Express Port 22
device pci 1b.6 off end # PCI Express Port 23
device pci 1b.7 off end # PCI Express Port 24
device pci 1c.0 on end # PCI Express Port 1
device pci 1c.1 off end # PCI Express Port 2
device pci 1c.2 off end # PCI Express Port 3
device pci 1c.3 off end # PCI Express Port 4
device pci 1c.4 on end # PCI Express Port 5
device pci 1c.5 off end # PCI Express Port 6
device pci 1c.6 off end # PCI Express Port 7
device pci 1c.7 off end # PCI Express Port 8
device pci 1d.0 on end # PCI Express Port 9
device pci 1d.1 off end # PCI Express Port 10
device pci 1d.2 off end # PCI Express Port 11
device pci 1d.3 off end # PCI Express Port 12
device pci 1d.4 on end # PCI Express Port 13
device pci 1d.5 on end # PCI Express Port 14
device pci 1d.6 on end # PCI Express Port 15
device pci 1d.7 off end # PCI Express Port 16
device pci 1e.0 off end # UART #0
device pci 1e.1 off end # UART #1
device pci 1e.2 off end # GSPI #0
device pci 1e.3 off end # GSPI #1
device pci 1f.0 on # LPC Interface
chip drivers/pc80/tpm
device pnp 0c31.0 on end
end
end
device pci 1f.1 off end # P2SB
device pci 1f.2 off end # Power Management Controller
device pci 1f.3 on end # Intel HDA
device pci 1f.4 on
chip drivers/i2c/tas5825m
register "id" = "0"
device i2c 4e on end # (8bit address: 0x9c)
end # tas5825m
chip drivers/i2c/tas5825m
register "id" = "1"
device i2c 4f on end # (8bit address: 0x9e)
end # tas5825m
end # SMBus
device pci 1f.5 on end # PCH SPI
device pci 1f.6 off end # GbE
end
end

View File

@ -0,0 +1,29 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
DefinitionBlock(
"dsdt.aml",
"DSDT",
0x02, // DSDT revision: ACPI v2.0 and up
OEM_ID,
ACPI_TABLE_CREATOR,
0x20110725 // OEM revision
)
{
#include <soc/intel/cannonlake/acpi/platform.asl>
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
#include <cpu/intel/common/acpi/cpu.asl>
Device (\_SB.PCI0) {
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
}
#include <southbridge/intel/common/acpi/sleepstates.asl>
Scope (\_SB.PCI0.LPCB) {
#include <drivers/pc80/pc/ps2_controller.asl>
}
#include "acpi/mainboard.asl"
}

View File

@ -0,0 +1,253 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef MAINBOARD_GPIO_H
#define MAINBOARD_GPIO_H
#ifndef __ACPI__
#include <soc/gpe.h>
#include <soc/gpio.h>
/* Pad configuration in romstage. */
static const struct pad_config early_gpio_table[] = {
//TODO: add early GPIO settings
PAD_CFG_TERM_GPO(GPP_F22, 1, UP_20K, DEEP), // DGPU_RST#_PCH
PAD_CFG_TERM_GPO(GPP_K22, 0, UP_5K, DEEP), // GPU_PWR_EN#
};
/* Pad configuration in ramstage. */
static const struct pad_config gpio_table[] = {
//TODO: GPIO names and verify everything
PAD_CFG_NF(GPD0, NONE, DEEP, NF1),
PAD_CFG_NF(GPD1, NATIVE, DEEP, NF1),
PAD_CFG_GPI(GPD2, NATIVE, PWROK),
PAD_CFG_NF(GPD3, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPD4, NONE, DEEP, NF1),
PAD_CFG_NF(GPD5, NONE, DEEP, NF1),
PAD_CFG_NF(GPD6, UP_20K, PWROK, NF1),
PAD_CFG_GPI(GPD7, UP_20K, PWROK),
PAD_CFG_NF(GPD8, NONE, DEEP, NF1),
PAD_CFG_NF(GPD9, NONE, DEEP, NF1),
PAD_CFG_NF(GPD10, NONE, DEEP, NF1),
PAD_CFG_GPI(GPD11, UP_20K, PWROK),
PAD_CFG_NF(GPP_A0, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A1, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A2, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A3, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A4, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A5, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A7, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A8, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A9, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_A10, UP_20K, DEEP, NF1),
_PAD_CFG_STRUCT(GPP_A11, 0x80100100, 0x0000),
PAD_CFG_GPI(GPP_A12, UP_20K, DEEP),
PAD_CFG_GPI(GPP_A13, UP_20K, DEEP),
PAD_CFG_GPI(GPP_A14, UP_20K, DEEP),
PAD_CFG_GPI(GPP_A15, UP_20K, DEEP),
PAD_CFG_NF(GPP_A16, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_A17, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_A18, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_A19, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_A20, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_A21, UP_20K, DEEP),
PAD_CFG_GPI(GPP_A22, UP_20K, DEEP),
PAD_CFG_GPI(GPP_A23, UP_20K, DEEP),
_PAD_CFG_STRUCT(GPP_B0, 0x42080100, 0x3000), // TPM_PIRQ#
PAD_CFG_GPI(GPP_B1, UP_20K, DEEP),
PAD_CFG_NF(GPP_B2, NONE, DEEP, NF1),
PAD_CFG_TERM_GPO(GPP_B3, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_B4, UP_20K, DEEP),
PAD_CFG_NF(GPP_B5, NONE, DEEP, NF1), // WLAN_CLKREQ#
PAD_CFG_NF(GPP_B6, NONE, DEEP, NF1), // GLAN_CLKREQ#
PAD_CFG_GPI(GPP_B7, UP_20K, PLTRST), // GPIO_CR_RESET_R
PAD_CFG_GPI(GPP_B8, UP_20K, PLTRST), // CR_GPIO_WAKE_N_R
PAD_CFG_NF(GPP_B9, NONE, DEEP, NF1), // CR_CLKREQ#
PAD_CFG_GPI(GPP_B10, UP_20K, PLTRST), // PRSNT#
PAD_CFG_TERM_GPO(GPP_B11, 1, NONE, DEEP),
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_B15, UP_20K, DEEP),
PAD_CFG_GPI(GPP_B16, UP_20K, DEEP),
PAD_CFG_GPI(GPP_B17, UP_20K, DEEP),
PAD_CFG_GPI(GPP_B18, UP_20K, DEEP),
PAD_CFG_GPI(GPP_B19, UP_20K, DEEP),
_PAD_CFG_STRUCT(GPP_B20, 0x42040100, 0x0000),
PAD_CFG_GPI(GPP_B21, UP_20K, DEEP),
PAD_CFG_GPI(GPP_B22, UP_20K, DEEP),
PAD_CFG_NF(GPP_B23, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_C2, UP_20K, DEEP),
PAD_CFG_NF(GPP_C3, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_C4, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_C5, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_C6, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_C7, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_C8, NONE, PLTRST),
PAD_CFG_GPI(GPP_C9, NONE, DEEP),
PAD_CFG_GPI(GPP_C10, DN_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_C11, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_C12, UP_20K, DEEP),
PAD_CFG_GPI(GPP_C13, UP_20K, DEEP),
PAD_CFG_GPI(GPP_C14, UP_20K, DEEP),
PAD_CFG_GPI(GPP_C15, UP_20K, DEEP),
PAD_CFG_NF(GPP_C16, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C17, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C18, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C19, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C20, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_C21, NONE, PLTRST, NF1),
PAD_CFG_GPI(GPP_C22, UP_20K, DEEP),
PAD_CFG_GPI(GPP_C23, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D0, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D1, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D2, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D3, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D4, UP_20K, DEEP),
PAD_CFG_NF(GPP_D5, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_D6, NONE, DEEP, NF3),
PAD_CFG_NF(GPP_D7, NONE, PLTRST, NF1),
PAD_CFG_NF(GPP_D8, NONE, PLTRST, NF1),
PAD_CFG_GPI(GPP_D9, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D10, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D11, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D12, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D13, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D14, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D15, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D16, UP_20K, DEEP),
PAD_CFG_NF(GPP_D17, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_D18, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_D19, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_D20, UP_20K, DEEP, NF1),
PAD_CFG_GPI(GPP_D21, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D22, UP_20K, DEEP),
PAD_CFG_GPI(GPP_D23, UP_20K, DEEP),
PAD_CFG_NF(GPP_E0, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_E1, NONE, DEEP, NF1), // M.2_SSD1_DET_N
PAD_CFG_NF(GPP_E2, NONE, DEEP, NF2), // VCCIO_0_CTRL
PAD_CFG_GPI(GPP_E3, UP_20K, DEEP), // SMI#
PAD_CFG_GPI(GPP_E4, UP_20K, DEEP),
PAD_CFG_NF(GPP_E5, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_E6, NONE, DEEP, NF1),
PAD_CFG_GPI_APIC(GPP_E7, NONE, PLTRST, EDGE_SINGLE, INVERT), // TP_ATTN#
PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1), // PCH_SATAHDD_LED#
PAD_CFG_GPI(GPP_E9, UP_20K, DEEP),
PAD_CFG_GPI(GPP_E10, UP_20K, DEEP),
PAD_CFG_GPI(GPP_E11, UP_20K, DEEP),
PAD_CFG_GPI(GPP_E12, UP_20K, DEEP),
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_F1, NONE, DEEP, NF1), // M.2_SSD2_DET_N
PAD_CFG_TERM_GPO(GPP_F2, 1, UP_20K, RSMRST), // GPP_F2_TBT_RST#
PAD_CFG_NF(GPP_F3, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_F4, NONE, DEEP, NF2),
PAD_CFG_NF(GPP_F5, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1),
PAD_CFG_GPI(GPP_F7, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F8, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F9, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F10, UP_20K, DEEP), // PCH_CONFIG_JUMPER
PAD_CFG_TERM_GPO(GPP_F11, 0, NONE, DEEP), // SSD1_PWR_DN#
PAD_CFG_GPI(GPP_F12, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F13, UP_20K, DEEP),
PAD_CFG_NF(GPP_F14, NONE, DEEP, NF2),
PAD_CFG_GPI(GPP_F15, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F16, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F17, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F18, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F19, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F20, UP_20K, DEEP),
PAD_CFG_GPI(GPP_F21, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_F22, 1, UP_20K, DEEP), // DGPU_RST#_PCH
PAD_CFG_TERM_GPO(GPP_F23, 0, NONE, DEEP), // GC_OFF_EN
PAD_CFG_GPI(GPP_G0, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G1, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G2, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G3, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G4, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G5, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G6, UP_20K, DEEP),
PAD_CFG_GPI(GPP_G7, UP_20K, DEEP),
PAD_CFG_NF(GPP_H0, NONE, DEEP, NF1), // TBT_CLKREQ#
PAD_CFG_NF(GPP_H1, NONE, DEEP, NF1), // MXM_REQ#
PAD_CFG_NF(GPP_H2, NONE, DEEP, NF1), // SSD_CLKREQ#
PAD_CFG_GPI(GPP_H3, NONE, PLTRST),
PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), // PE_CLKREQ#
PAD_CFG_GPI(GPP_H5, NONE, PLTRST),
PAD_CFG_GPI(GPP_H6, NONE, PLTRST), // WLAN_GPIO_WAKE_N
PAD_CFG_TERM_GPO(GPP_H7, 0, NONE, DEEP), // PCIE_SSD2_RESET
PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), // SSD2_CLKREQ#
PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), // SSD3_CLKREQ#
PAD_CFG_NF(GPP_H10, NONE, PLTRST, NF1),
PAD_CFG_TERM_GPO(GPP_H11, 0, NONE, DEEP), // SSD3_PWR_DN#
PAD_CFG_GPI(GPP_H12, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H13, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H14, UP_20K, DEEP),
_PAD_CFG_STRUCT(GPP_H15, 0x40880100, 0x3000),
PAD_CFG_GPI(GPP_H16, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H17, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H18, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H19, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H20, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H21, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H22, UP_20K, DEEP),
PAD_CFG_GPI(GPP_H23, UP_20K, DEEP),
_PAD_CFG_STRUCT(GPP_I0, 0x46080100, 0x0000),
_PAD_CFG_STRUCT(GPP_I1, 0x46080100, 0x0000),
_PAD_CFG_STRUCT(GPP_I2, 0x46080100, 0x0000),
_PAD_CFG_STRUCT(GPP_I3, 0x46080100, 0x0000),
PAD_CFG_NF(GPP_I4, NONE, DEEP, NF1),
PAD_CFG_TERM_GPO(GPP_I5, 0, NONE, DEEP), // GPIO_TBT_RESET
PAD_CFG_GPI(GPP_I6, UP_20K, DEEP),
PAD_CFG_GPI(GPP_I7, UP_20K, DEEP),
PAD_CFG_GPI(GPP_I8, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_I9, 1, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_I10, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_I11, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_I12, 0, NONE, DEEP),
PAD_CFG_TERM_GPO(GPP_I13, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_I14, UP_20K, DEEP),
PAD_CFG_NF(GPP_J0, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J1, NONE, DEEP, NF2),
PAD_CFG_GPI(GPP_J2, UP_20K, DEEP),
PAD_CFG_GPI(GPP_J3, UP_20K, DEEP),
PAD_CFG_NF(GPP_J4, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J5, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_J6, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J7, UP_20K, DEEP, NF1),
PAD_CFG_NF(GPP_J8, NONE, DEEP, NF1),
PAD_CFG_NF(GPP_J9, UP_20K, DEEP, NF1),
PAD_CFG_GPI(GPP_J10, UP_20K, DEEP),
PAD_CFG_GPI(GPP_J11, UP_20K, DEEP),
PAD_CFG_GPI(GPP_K0, UP_20K, DEEP), // PCH_GPIO_PK_MUTE
PAD_CFG_GPI(GPP_K1, UP_20K, DEEP), // PCH_GPIO_WOOFER_MUTE
PAD_CFG_GPI(GPP_K2, UP_20K, DEEP), // DGPU_PWRGD
_PAD_CFG_STRUCT(GPP_K3, 0x80880100, 0x3000), // SCI#
PAD_CFG_GPI(GPP_K4, UP_20K, DEEP), // GPU_EVENT#_R
PAD_CFG_TERM_GPO(GPP_K5, 0, NONE, DEEP), // DP_MUX_SW
_PAD_CFG_STRUCT(GPP_K6, 0x40880100, 0x0000), // SWI#
PAD_CFG_GPI(GPP_K7, UP_20K, DEEP), // E3100_PWR_EN
PAD_CFG_TERM_GPO(GPP_K8, 0, NONE, DEEP), // SSD4_PWR_DN#
PAD_CFG_GPI(GPP_K9, UP_20K, DEEP), // TBTA_HRESET
PAD_CFG_GPI(GPP_K10, UP_20K, DEEP), // MIC_SENSE_PCH
PAD_CFG_GPI(GPP_K11, UP_20K, DEEP), // XFI_SENSE_PCH
_PAD_CFG_STRUCT(GPP_K12, 0x82880100, 0x3000),
PAD_CFG_GPI(GPP_K13, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_K14, 0, NONE, DEEP),
PAD_CFG_GPI(GPP_K15, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_K16, 1, UP_20K, DEEP), // TBT_FORCE_PWR_R
PAD_CFG_GPI(GPP_K17, UP_20K, DEEP),
PAD_CFG_TERM_GPO(GPP_K18, 1, NONE, DEEP),
PAD_CFG_GPI(GPP_K19, UP_20K, DEEP),
PAD_CFG_GPI(GPP_K20, UP_20K, DEEP),
PAD_CFG_GPI(GPP_K21, NONE, DEEP), // GC6_FB_EN
PAD_CFG_TERM_GPO(GPP_K22, 0, UP_5K, DEEP), // GPU_PWR_EN#
PAD_CFG_TERM_GPO(GPP_K23, 1, NONE, RSMRST), // TBT_RTD3_PWR_EN_R
};
#endif
#endif

View File

@ -0,0 +1,35 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef HDA_VERB_H
#define HDA_VERB_H
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek, ALC1220 */
0x10ec1220, /* Vendor ID */
0x15587714, /* Subsystem ID */
12, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x15587714),
AZALIA_PIN_CFG(0, 0x12, 0x90a60130),
AZALIA_PIN_CFG(0, 0x14, 0x40000000),
AZALIA_PIN_CFG(0, 0x15, 0x411111f0),
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, 0x4094022d),
AZALIA_PIN_CFG(0, 0x1e, 0x04451120),
};
const u32 pc_beep_verbs[] = {
// Enable DMIC microphone on ALC1220
0x02050036,
0x02042a6a,
};
AZALIA_ARRAY_SIZES;
#endif

View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/ramstage.h>
#include "gpio.h"
void mainboard_silicon_init_params(FSP_S_CONFIG *params) {
/* Configure pads prior to SiliconInit() in case there's any
* dependencies during hardware initialization. */
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@ -0,0 +1,93 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/cnl_memcfg_init.h>
#include <soc/romstage.h>
static const struct cnl_mb_cfg memcfg = {
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
.spd[0] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa0},
},
.spd[1] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa2},
},
.spd[2] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa4},
},
.spd[3] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa6},
},
/*
* For each channel, there are 3 sets of DQ byte mappings,
* where each set has a package 0 and a package 1 value (package 0
* represents the first 64-bit lpddr4 chip combination, and package 1
* represents the second 64-bit lpddr4 chip combination).
* The first three sets are for CLK, CMD, and CTL.
* The fsp package actually expects 6 sets, but the last 3 sets are
* not used in CNL, so we only define the three sets that are used
* and let the meminit_lpddr4() routine take care of clearing the
* unused fields for the caller.
*/
.dq_map[DDR_CH0] = {
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
.dq_map[DDR_CH1] = {
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
/*
* DQS CPU<>DRAM map Ch0 and Ch1. Each array entry represents a
* mapping of a dq bit on the CPU to the bit it's connected to on
* the memory part. The array index represents the dqs bit number
* on the memory part, and the values in the array represent which
* pin on the CPU that DRAM pin connects to.
*/
.dqs_map[DDR_CH0] = {0, 1, 2, 3, 4, 5, 6, 7},
.dqs_map[DDR_CH1] = {0, 1, 2, 3, 4, 5, 6, 7},
/*
* Rcomp resistor values. These values represent the resistance in
* ohms of the three rcomp resistors attached to the DDR_COMP_0,
* DDR_COMP_1, and DDR_COMP_2 pins on the DRAM.
*/
.rcomp_resistor = { 121, 75, 100 },
/*
* Rcomp target values. These will typically be the following
* values for Cannon Lake : { 80, 40, 40, 40, 30 }
*/
.rcomp_targets = { 50, 26, 20, 20, 26 },
/*
* Indicates whether memory is interleaved.
* Set to 1 for an interleaved design,
* set to 0 for non-interleaved design.
*/
.dq_pins_interleaved = 1,
/*
* VREF_CA configuration.
* Set to 0 VREF_CA goes to both CH_A and CH_B,
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
*/
.vref_ca_config = 2,
/* Early Command Training */
.ect = 0,
};
void mainboard_memory_init_params(FSPM_UPD *memupd) {
// Allow memory clocks higher than 2933 MHz
memupd->FspmConfig.SaOcSupport = 1;
// Set primary display to PCIe graphics
memupd->FspmConfig.PrimaryDisplay = 1;
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}

View File

@ -0,0 +1,971 @@
static int tas5825m_setup_normal(struct device * dev) {
int res = 0;
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x03, 0x02);
amp_write_at(0x01, 0x11);
}
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x46, 0x11);
}
amp_set_page(0x00);
{
amp_write_at(0x02, 0x00);
amp_write_at(0x53, 0x00);
amp_write_at(0x54, 0x00);
amp_write_at(0x29, 0x7C);
amp_write_at(0x03, 0x02);
}
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
{
amp_write_at(0x29, 0x00);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x03, 0x12);
}
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x48, 0x0C);
}
amp_set_book(0x64);
amp_set_page(0x01);
{
amp_write_block_at(0x08, {
0x00, 0xFE, 0x00, 0x40, 0x00, 0xFC, 0x00, 0x00,
0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00
});
amp_write_block_at(0x27, {
0x00, 0x00, 0xFC, 0x50, 0x00, 0x00, 0xFC, 0x00,
0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00,
0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00,
0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC
});
amp_write_block_at(0x46, {
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0xFC, 0x00, 0x00, 0x00, 0x82, 0x00, 0x93, 0x00,
0xFC, 0x00, 0x00, 0x8F, 0x00, 0xFF, 0xEF, 0x84,
0x49, 0x03, 0x27, 0x84, 0x02, 0x04, 0x06, 0x02,
0x60, 0x00, 0x01
});
}
amp_set_page(0x02);
{
amp_write_block_at(0x08, {
0x02, 0x70, 0x00, 0x06, 0x02, 0x78, 0x00, 0x05,
0x02, 0x68, 0x00, 0x02, 0x02, 0x28, 0x03, 0x4D,
0x84, 0x2A, 0x04, 0x00, 0xE2, 0x57, 0x91, 0x9F,
0x84, 0x82, 0x20, 0xE0, 0x84, 0x82, 0x04
});
amp_write_block_at(0x27, {
0x01, 0xF0, 0x1C, 0x31, 0xA0, 0xF0, 0x1C, 0x31,
0xA1, 0xF0, 0x1C, 0x31, 0xA2, 0xF0, 0x1F, 0x31,
0xA3, 0xE4, 0x00, 0x11, 0xA6, 0x80, 0x27, 0x80,
0xE1, 0xF4, 0x00, 0x11, 0xA4, 0xF4, 0x1D
});
amp_write_block_at(0x46, {
0x31, 0xA5, 0xF4, 0x1C, 0x31, 0xA7, 0xF4, 0x1F,
0x31, 0xA8, 0x02, 0x78, 0x00, 0x03, 0xE2, 0x68,
0xF1, 0xC3, 0x80, 0x67, 0x80, 0xE9, 0x84, 0x4B,
0x03, 0x27, 0x02, 0x70, 0x00, 0x04, 0x84
});
amp_write_block_at(0x65, {
0x41, 0x03, 0x37, 0x80, 0x07, 0x00, 0x80, 0xE0,
0x00, 0x11, 0xA9, 0x84, 0x82, 0x00, 0xE0, 0x8E,
0xFC, 0x04, 0x10, 0xF0, 0x1C, 0x11, 0xAA, 0xF0,
0x1C, 0x11, 0xAB
});
}
amp_set_page(0x03);
{
amp_write_block_at(0x08, {
0xF0, 0x1C, 0x11, 0xAC, 0xF0, 0x1F, 0x11, 0xAD,
0x86, 0xA1, 0x01, 0xC2, 0x80, 0x27, 0x80, 0xE8,
0x60, 0x00, 0x00, 0x00, 0x84, 0x43, 0x03, 0x37,
0x80, 0x00, 0x00, 0x81, 0x0D, 0x00, 0x10
});
amp_write_block_at(0x27, {
0x20, 0x84, 0x51, 0x03, 0x3E, 0x08, 0x44, 0x26,
0x30, 0x84, 0xC3, 0x03, 0x47, 0x84, 0xC2, 0x40,
0xE0, 0x8C, 0xFF, 0x03, 0x23, 0xE0, 0x10, 0x11,
0xB3, 0xF0, 0x1C, 0x51, 0xB4, 0xF0, 0x1C
});
amp_write_block_at(0x46, {
0x51, 0xB5, 0xF0, 0x1C, 0x51, 0xB6, 0xF0, 0x1F,
0x51, 0xB7, 0x86, 0xA1, 0x01, 0xC6, 0x80, 0x27,
0x80, 0xEA, 0x84, 0x53, 0x03, 0x3E, 0x84, 0x82,
0x04, 0x05, 0x84, 0x51, 0x03, 0x75, 0xE2
});
amp_write_block_at(0x65, {
0x6B, 0xC0, 0x00, 0x80, 0x07, 0x00, 0x80, 0xE0,
0x80, 0x31, 0xB8, 0x84, 0x82, 0x40, 0xE0, 0xF0,
0x1C, 0x51, 0xB9, 0xF0, 0x1C, 0x51, 0xBA, 0xF0,
0x1C, 0x51, 0xBB
});
}
amp_set_page(0x04);
{
amp_write_block_at(0x08, {
0xF0, 0x1F, 0x51, 0xBC, 0x86, 0xA1, 0x01, 0xC5,
0x80, 0x27, 0x80, 0xEA, 0x60, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x81, 0x84, 0xA1, 0x03, 0x4F,
0xE0, 0x80, 0xA0, 0x00, 0x01, 0x07, 0x11
});
amp_write_block_at(0x27, {
0x20, 0x08, 0x44, 0x26, 0x30, 0x08, 0x00, 0x98,
0x4A, 0x84, 0x53, 0x03, 0x75, 0x08, 0x00, 0x30,
0x48, 0x02, 0xCA, 0x00, 0x01, 0x08, 0x60, 0x26,
0x32, 0x84, 0x51, 0x03, 0x45, 0xE4, 0x10
});
amp_write_block_at(0x46, {
0x40, 0x00, 0x80, 0x40, 0xC0, 0x82, 0x84, 0xC2,
0x40, 0xE0, 0x84, 0xC3, 0x03, 0x5E, 0x08, 0x00,
0x50, 0x48, 0xE0, 0x10, 0x11, 0xBD, 0x02, 0xC2,
0x00, 0x02, 0x08, 0x60, 0x06, 0x12, 0x84
});
amp_write_block_at(0x65, {
0xD3, 0x03, 0x4F, 0xF0, 0x1C, 0x51, 0xBE, 0xF0,
0x1C, 0x51, 0xBF, 0xF0, 0x1C, 0x51, 0xC0, 0xF0,
0x1F, 0x51, 0xC1, 0x84, 0xA1, 0x03, 0x65, 0x80,
0x27, 0x80, 0xEA
});
}
amp_set_page(0x05);
{
amp_write_block_at(0x08, {
0xE0, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x83,
0x08, 0x00, 0x98, 0x6B, 0x08, 0x00, 0x30, 0x68,
0x84, 0x53, 0x03, 0x45, 0x08, 0x60, 0x26, 0x33,
0x84, 0x51, 0x03, 0x25, 0xE4, 0x10, 0x60
});
amp_write_block_at(0x27, {
0x00, 0x80, 0x40, 0xC0, 0x81, 0x02, 0x70, 0x00,
0x7F, 0x08, 0x00, 0x50, 0x28, 0x08, 0x60, 0x06,
0x11, 0x84, 0xCB, 0x03, 0x65, 0xE0, 0x10, 0x51,
0xC4, 0x84, 0x80, 0x41, 0x00, 0x02, 0xA3
});
amp_write_block_at(0x46, {
0x00, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x84, 0xD0,
0x04, 0x01, 0x84, 0xA2, 0x04, 0x03, 0x84, 0xD2,
0x50, 0x01, 0x84, 0x53, 0x03, 0x25, 0x80, 0x00,
0xC4, 0x04, 0x8F, 0x30, 0x00, 0x00, 0x88
});
amp_write_block_at(0x65, {
0x67, 0x03, 0x00, 0xE4, 0x00, 0x11, 0x9B, 0xEE,
0x64, 0x60, 0x00, 0x02, 0xD3, 0x00, 0x10, 0x88,
0x47, 0x00, 0x80, 0x10, 0x00, 0x18, 0x02, 0x86,
0xC1, 0x01, 0x9D
});
}
amp_set_page(0x06);
{
amp_write_block_at(0x08, {
0xE0, 0x10, 0x31, 0xC7, 0x86, 0xC9, 0x01, 0x9E,
0x80, 0x00, 0xC4, 0x02, 0x02, 0x50, 0x01, 0x9C,
0x00, 0xFF, 0x21, 0x65, 0x00, 0xFC, 0x00, 0x00,
0x02, 0x60, 0x00, 0x01, 0x02, 0x70, 0x00
});
amp_write_block_at(0x27, {
0x04, 0x84, 0xC8, 0x04, 0x10, 0x84, 0x41, 0x03,
0x67, 0x84, 0x51, 0x03, 0x6D, 0x84, 0xC0, 0x04,
0x02, 0x04, 0x80, 0x91, 0x20, 0x08, 0x60, 0x26,
0x30, 0x02, 0x78, 0x00, 0x03, 0x02, 0x68
});
amp_write_block_at(0x46, {
0x00, 0x02, 0x0D, 0x00, 0x10, 0x10, 0x08, 0x60,
0x06, 0x12, 0x84, 0x49, 0x03, 0x2F, 0xE0, 0x80,
0x71, 0xA9, 0x02, 0x28, 0x03, 0x55, 0x84, 0x82,
0x00, 0xE0, 0x84, 0x2A, 0x04, 0x00, 0xF0
});
amp_write_block_at(0x65, {
0x1C, 0x11, 0xAA, 0xF0, 0x1C, 0x11, 0xAB, 0xF0,
0x1C, 0x11, 0xAC, 0xF0, 0x1F, 0x11, 0xAD, 0x86,
0xA1, 0x01, 0xAE, 0x80, 0x27, 0x80, 0xE8, 0x84,
0x82, 0x04, 0x07
});
}
amp_set_page(0x07);
{
amp_write_block_at(0x08, {
0xE0, 0x80, 0x60, 0x00, 0x84, 0x82, 0x40, 0xE0,
0x84, 0x43, 0x03, 0x67, 0xF0, 0x1C, 0x51, 0xAF,
0xF0, 0x1C, 0x51, 0xB0, 0xF0, 0x1C, 0x51, 0xB1,
0xF0, 0x1F, 0x51, 0xB2, 0x02, 0x78, 0x00
});
amp_write_block_at(0x27, {
0x05, 0x80, 0x27, 0x80, 0xEA, 0x84, 0x82, 0x04,
0x08, 0x02, 0x70, 0x00, 0x06, 0x84, 0x53, 0x03,
0x6D, 0x84, 0x80, 0x04, 0x07, 0xE0, 0x00, 0x00,
0x82, 0xF0, 0x81, 0x00, 0x80, 0x80, 0x07
});
amp_write_block_at(0x46, {
0x12, 0xBC, 0x86, 0xA1, 0x01, 0x9F, 0xE2, 0x57,
0xA0, 0x00, 0x84, 0x82, 0x04, 0x09, 0x84, 0x82,
0x20, 0xE0, 0xF0, 0x1C, 0x31, 0xA0, 0xF0, 0x1C,
0x31, 0xA1, 0xF0, 0x1C, 0x31, 0xA2, 0xF0
});
amp_write_block_at(0x65, {
0x1F, 0x31, 0xA3, 0xE4, 0x00, 0x11, 0xA6, 0x80,
0x27, 0x80, 0xE1, 0xF4, 0x00, 0x11, 0xA4, 0xF4,
0x1D, 0x31, 0xA5, 0xF4, 0x1C, 0x31, 0xA7, 0xF4,
0x1F, 0x31, 0xA8
});
}
amp_set_page(0x08);
{
amp_write_block_at(0x08, {
0x02, 0x78, 0x00, 0x03, 0xE2, 0x6A, 0xF1, 0xC3,
0x80, 0x67, 0x80, 0xE9, 0x84, 0x4B, 0x03, 0x2F,
0x02, 0x70, 0x00, 0x04, 0x84, 0x59, 0x03, 0x3D,
0x80, 0x07, 0x00, 0x80, 0xE0, 0x00, 0x11
});
amp_write_block_at(0x27, {
0xA9, 0x84, 0x82, 0x60, 0xE0, 0x8E, 0xFC, 0x04,
0x10, 0xF0, 0x1C, 0x71, 0xAA, 0xF0, 0x1C, 0x71,
0xAB, 0xF0, 0x1C, 0x71, 0xAC, 0xF0, 0x1F, 0x71,
0xAD, 0x86, 0xA1, 0x01, 0xC2, 0x80, 0x27
});
amp_write_block_at(0x46, {
0x80, 0xEB, 0x60, 0x00, 0x00, 0x00, 0x84, 0x5B,
0x03, 0x3D, 0x80, 0x00, 0x00, 0x81, 0x0D, 0x00,
0x10, 0x20, 0x84, 0x59, 0x03, 0x3F, 0x08, 0x44,
0x26, 0x30, 0x84, 0xC3, 0x03, 0x57, 0x84
});
amp_write_block_at(0x65, {
0xC2, 0x60, 0xE0, 0xE0, 0x10, 0x11, 0xB3, 0xF0,
0x1C, 0x71, 0xB4, 0xF0, 0x1C, 0x71, 0xB5, 0xF0,
0x1C, 0x71, 0xB6, 0xF0, 0x1F, 0x71, 0xB7, 0x86,
0xA1, 0x01, 0xC6
});
}
amp_set_page(0x09);
{
amp_write_block_at(0x08, {
0x80, 0x27, 0x80, 0xEB, 0x84, 0x5B, 0x03, 0x3F,
0x84, 0x82, 0x04, 0x0D, 0x84, 0x41, 0x03, 0x76,
0xE2, 0x6B, 0xE0, 0x00, 0x80, 0x07, 0x00, 0x80,
0xE0, 0x81, 0x31, 0xB8, 0x84, 0x82, 0x00
});
amp_write_block_at(0x27, {
0xE0, 0xF0, 0x1C, 0x11, 0xB9, 0xF0, 0x1C, 0x11,
0xBA, 0xF0, 0x1C, 0x11, 0xBB, 0xF0, 0x1F, 0x11,
0xBC, 0x86, 0xA1, 0x01, 0xC5, 0x80, 0x27, 0x80,
0xE8, 0x60, 0x00, 0x00, 0x00, 0x80, 0x00
});
amp_write_block_at(0x46, {
0x00, 0x81, 0x84, 0xA1, 0x03, 0x5D, 0xE0, 0x81,
0xA0, 0x00, 0x01, 0x07, 0x11, 0x20, 0x08, 0x44,
0x26, 0x30, 0x08, 0x00, 0x98, 0x4A, 0x84, 0x43,
0x03, 0x76, 0x08, 0x00, 0x30, 0x48, 0x02
});
amp_write_block_at(0x65, {
0xCA, 0x00, 0x01, 0x08, 0x60, 0x26, 0x32, 0x84,
0x41, 0x03, 0x46, 0xE4, 0x10, 0x40, 0x00, 0x80,
0x40, 0xC0, 0x82, 0x84, 0xC2, 0x00, 0xE0, 0x84,
0xC3, 0x03, 0x5F
});
}
amp_set_page(0x0A);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x50, 0x48, 0xE0, 0x10, 0x11, 0xBD,
0x02, 0xC2, 0x00, 0x02, 0x08, 0x60, 0x06, 0x12,
0x84, 0xD3, 0x03, 0x5D, 0xF0, 0x1C, 0x11, 0xBE,
0xF0, 0x1C, 0x11, 0xBF, 0xF0, 0x1C, 0x11
});
amp_write_block_at(0x27, {
0xC0, 0xF0, 0x1F, 0x11, 0xC1, 0x84, 0xA1, 0x03,
0x66, 0x80, 0x27, 0x80, 0xE8, 0xE0, 0x00, 0x00,
0x00, 0x80, 0x07, 0x00, 0x83, 0x08, 0x00, 0x98,
0x6B, 0x08, 0x00, 0x30, 0x68, 0x84, 0x43
});
amp_write_block_at(0x46, {
0x03, 0x46, 0x08, 0x60, 0x26, 0x33, 0x84, 0x51,
0x03, 0x26, 0xE4, 0x10, 0x60, 0x00, 0x80, 0x40,
0xC0, 0x81, 0x02, 0x70, 0x00, 0x7F, 0x08, 0x00,
0x50, 0x28, 0x08, 0x60, 0x06, 0x11, 0x8C
});
amp_write_block_at(0x65, {
0xFF, 0x03, 0x24, 0x84, 0xCB, 0x03, 0x66, 0xE0,
0x10, 0x51, 0xC4, 0x84, 0x80, 0x41, 0x00, 0x02,
0xA3, 0x00, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x84,
0xD0, 0x04, 0x09
});
}
amp_set_page(0x0B);
{
amp_write_block_at(0x08, {
0x84, 0xA2, 0x04, 0x0B, 0x84, 0xD2, 0x50, 0x01,
0x84, 0x53, 0x03, 0x26, 0x80, 0x00, 0xC4, 0x0C,
0x8F, 0x30, 0x00, 0x00, 0x88, 0x67, 0x03, 0x00,
0xE4, 0x00, 0x11, 0x9B, 0xEE, 0x64, 0x80
});
amp_write_block_at(0x27, {
0x00, 0x02, 0xD3, 0x00, 0x10, 0x88, 0x47, 0x00,
0x80, 0x10, 0x00, 0x18, 0x02, 0x86, 0xC1, 0x01,
0x9D, 0xE0, 0x10, 0x31, 0xC7, 0x86, 0xC9, 0x01,
0x9E, 0x80, 0x00, 0xC4, 0x0A, 0x02, 0x50
});
amp_write_block_at(0x46, {
0x01, 0x9C, 0x00, 0xFF, 0x21, 0x65, 0x00, 0xFC,
0x00, 0x00, 0x02, 0x70, 0x00, 0x04, 0x02, 0x68,
0x00, 0x01, 0x02, 0x60, 0x00, 0x03, 0x02, 0x78,
0x00, 0x02, 0x84, 0x49, 0x03, 0x6E, 0x84
});
amp_write_block_at(0x65, {
0x41, 0x03, 0x6F, 0x84, 0xC8, 0x04, 0x10, 0x84,
0xC0, 0x04, 0x0A, 0x04, 0x81, 0x91, 0x20, 0x08,
0x60, 0x26, 0x30, 0x0D, 0x00, 0x10, 0x10, 0x08,
0x60, 0x06, 0x12
});
}
amp_set_page(0x0C);
{
amp_write_block_at(0x08, {
0x84, 0x00, 0x04, 0x06, 0xE0, 0x81, 0x71, 0xA9,
0x84, 0x82, 0x20, 0xE8, 0xF0, 0x1D, 0x31, 0xAA,
0xF0, 0x1D, 0x31, 0xAB, 0xF0, 0x1D, 0x31, 0xAC,
0xF0, 0x1C, 0x31, 0xAD, 0x86, 0xA1, 0x01
});
amp_write_block_at(0x27, {
0xAE, 0x80, 0x27, 0x80, 0xF9, 0x84, 0x82, 0x04,
0x0E, 0xE0, 0x81, 0x60, 0x00, 0x84, 0x82, 0x00,
0xE8, 0x84, 0x4B, 0x03, 0x6E, 0xF0, 0x1D, 0x11,
0xAF, 0xF0, 0x1D, 0x11, 0xB0, 0xF0, 0x1D
});
amp_write_block_at(0x46, {
0x11, 0xB1, 0xF0, 0x1C, 0x11, 0xB2, 0x02, 0xA3,
0x00, 0x1A, 0x80, 0x27, 0x80, 0xF8, 0x84, 0x82,
0x04, 0x0F, 0xE0, 0x81, 0xC0, 0x00, 0xF0, 0x81,
0xE0, 0x80, 0x84, 0x43, 0x03, 0x6F, 0x80
});
amp_write_block_at(0x65, {
0x07, 0x12, 0xBD, 0x02, 0xC0, 0x00, 0x00, 0x00,
0xFC, 0x50, 0x00, 0x8F, 0x00, 0x00, 0x11, 0x8F,
0x00, 0xFF, 0xFF, 0x84, 0x58, 0x04, 0x01, 0x84,
0xC2, 0x04, 0x00
});
}
amp_set_page(0x0D);
{
amp_write_block_at(0x08, {
0x02, 0xC2, 0x60, 0x00, 0x84, 0xA0, 0x61, 0x00,
0xE0, 0x20, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
0x40, 0x40, 0xA0, 0x00, 0x80, 0x00, 0xC0, 0x82,
0x08, 0xFC, 0x48, 0x3A, 0x08, 0xFC, 0x18
});
amp_write_block_at(0x27, {
0x50, 0x00, 0xFC, 0x00, 0x00, 0xE0, 0x10, 0x00,
0x00, 0x86, 0xA0, 0x41, 0x00, 0x40, 0x47, 0x20,
0x00, 0x80, 0x00, 0xC0, 0x83, 0x04, 0xE0, 0x3D,
0x1E, 0x04, 0x80, 0x11, 0xE0, 0x08, 0x44
});
amp_write_block_at(0x46, {
0x26, 0x33, 0x02, 0xCB, 0x00, 0x10, 0xE0, 0x10,
0x40, 0x83, 0x08, 0x00, 0x28, 0x21, 0x84, 0xCA,
0x61, 0x00, 0x80, 0x07, 0x00, 0x81, 0x0C, 0xE0,
0x2C, 0x09, 0x84, 0xCA, 0x21, 0x00, 0x00
});
amp_write_block_at(0x65, {
0xFC, 0x50, 0x00, 0x8F, 0x00, 0x00, 0x01
});
}
amp_set_book(0x78);
amp_set_page(0x18);
{
amp_write_block_at(0x30, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1B);
{
amp_write_block_at(0x6C, {
0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x03, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x1C);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x1C, {
0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x3C, {
0x00, 0x00, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x54, {
0x00, 0x00, 0x03, 0x40, 0x00, 0x00, 0x03, 0x48,
0x00, 0x00, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x74, {
0x00, 0x00, 0x03, 0x58, 0x00, 0x00, 0x03, 0x60,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x1D);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1D);
{
amp_write_block_at(0x1C, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1D);
{
amp_write_block_at(0x3C, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x5B, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x7A, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x1E);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1E);
{
amp_write_block_at(0x0C, {
0x00, 0x00, 0x03, 0x68, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
});
}
amp_set_book(0x78);
amp_set_page(0x1E);
{
amp_write_block_at(0x24, {
0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x03, 0x78,
0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1E);
{
amp_write_block_at(0x44, {
0x00, 0x00, 0x04, 0x88, 0x00, 0x00, 0x04, 0x90,
});
}
amp_set_book(0x8C);
amp_set_page(0x0E);
{
amp_write_block_at(0x5C, {
0x00, 0xA7, 0x26, 0x4A, 0x7F, 0xFF, 0xFF, 0xFF,
0x00, 0x20, 0xC4, 0x9C, 0x00, 0x20, 0xC4, 0x9C,
0x00, 0x00, 0x68, 0xDB, 0x00, 0x00, 0xD1, 0xB7,
0x00, 0x00, 0x68, 0xDB, 0x0F, 0xA4, 0xA8
});
amp_write_block_at(0x7B, {
0xC1, 0xF8, 0x59, 0x7F, 0x63
});
}
amp_set_page(0x0F);
{
amp_write_block_at(0x08, {
0x07, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xB7, 0xE9,
0x00, 0x5F, 0x6F, 0xD2, 0x00, 0x2F, 0xB7
});
amp_write_block_at(0x27, {
0xE9, 0x0B, 0x1E, 0x4F, 0x76, 0xFC, 0x23, 0x05,
0x54, 0xFA, 0x41, 0x20, 0x5C, 0x0B, 0x7D, 0xBF,
0x48, 0xFA, 0x41, 0x20, 0x5C, 0x0B, 0x1E, 0x4F,
0x76, 0xFC, 0x23, 0x05, 0x54, 0x00, 0x04
});
amp_write_block_at(0x46, {
0x81, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0F, 0x3F, 0xE5, 0xC9, 0xF8, 0xBB,
0x98, 0xC8, 0x07, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x81, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0F, 0x3F, 0xE5, 0xC9, 0xF8,
0xBB, 0x98, 0xC8
});
}
amp_set_page(0x10);
{
amp_write_block_at(0x08, {
0x00, 0x89, 0xA0, 0x27, 0x7F, 0xEC, 0x56, 0xD5,
0x7F, 0xFC, 0xB9, 0x23, 0x00, 0x89, 0xA0, 0x27,
0x7F, 0xEC, 0x56, 0xD5, 0x7F, 0xFC, 0xB9, 0x23,
});
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x40, 0x00);
}
amp_set_book(0x00);
{
// Page 0
amp_write_block_at(0x7D, {
0x11, 0xFF
});
}
amp_set_page(0x01);
{
amp_write_at(0x51, 0x05);
}
amp_set_page(0x02);
{
amp_write_at(0x19, 0xDF);
}
amp_set_book(0x8C);
amp_set_page(0x01);
{
amp_write_block_at(0x2C, {
0x00, 0x71, 0x94, 0x9A
});
}
amp_set_page(0x0A);
{
amp_write_block_at(0x64, {
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x0B);
{
amp_write_block_at(0x08, {
0x00, 0x80, 0x00, 0x00, 0x00, 0x0C, 0xCC, 0xCD,
0x00, 0x0C, 0xCC, 0xCD, 0x00, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00
});
amp_write_block_at(0x28, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x57, 0x62, 0x00, 0x00, 0x00, 0x00,
});
}
amp_set_page(0x0E);
{
amp_write_block_at(0x5C, {
0x00, 0x03, 0x69, 0xC5, 0x00, 0xA9, 0x15, 0xB8,
0x00, 0x22, 0x1D, 0x95, 0x00, 0x03, 0x69, 0xC5,
});
}
amp_set_page(0x0F);
{
amp_write_block_at(0x5C, {
0x7F, 0xF9, 0x2C, 0x60, 0x01, 0x33, 0x51, 0x50,
});
}
amp_set_page(0x07);
{
amp_write_block_at(0x64, {
0x00, 0x80, 0x00, 0x00
});
amp_write_block_at(0x6C, {
0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
});
}
amp_set_book(0xAA);
amp_set_page(0x01);
{
amp_write_block_at(0x30, {
0x07, 0xD1, 0x27, 0x3E, 0xF0, 0x5D, 0xB1, 0x85,
0x07, 0xD1, 0x27, 0x3E, 0x0F, 0xA1, 0x3C, 0x1E,
0xF8, 0x5C, 0x9F, 0x28, 0x07, 0xD1, 0x27, 0x3E,
0xF0, 0x5D, 0xB1, 0x85, 0x07, 0xD1, 0x27
});
amp_write_block_at(0x4F, {
0x3E, 0x0F, 0xA1, 0x3C, 0x1E, 0xF8, 0x5C, 0x9F,
0x28, 0x08, 0x00, 0x00, 0x00, 0xF0, 0x71, 0x4C,
0x87, 0x07, 0x91, 0xC6, 0x22, 0x0F, 0x8E, 0xB3,
0x79, 0xF8, 0x6E, 0x39, 0xDE, 0x08, 0x00
});
amp_write_block_at(0x6E, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
}
amp_set_page(0x02);
{
amp_write_block_at(0x08, {
0x08, 0x21, 0xA6, 0xC8, 0xF0, 0xA9, 0xF7, 0x0B,
0x07, 0x3B, 0x34, 0x61, 0x0F, 0x56, 0x08, 0xF5,
0xF8, 0xA3, 0x24, 0xD7, 0x08, 0x58, 0xFE, 0x57,
0xF8, 0xB7, 0x23, 0xC8, 0x01, 0xF4, 0x51
});
amp_write_block_at(0x27, {
0x2E, 0x07, 0x48, 0xDC, 0x38, 0xFD, 0xB2, 0xB0,
0x7B, 0x0A, 0x8B, 0x89, 0x0F, 0xFA, 0xBE, 0x92,
0xE5, 0xFE, 0xEA, 0x2A, 0xF4, 0x05, 0x41, 0x6D,
0x1B, 0xFE, 0x8A, 0x4B, 0xFE, 0x09, 0x6F
});
amp_write_block_at(0x46, {
0x71, 0xB3, 0xF4, 0xC9, 0x2E, 0xBA, 0x02, 0xE0,
0x4E, 0xFB, 0x0B, 0x36, 0xD1, 0x46, 0xFB, 0xB0,
0x3F, 0x52, 0x07, 0x86, 0xC1, 0xF0, 0xF3, 0x50,
0x29, 0xD7, 0x05, 0x3A, 0xF8, 0x0F, 0x0C
});
amp_write_block_at(0x65, {
0xAF, 0xD6, 0x29, 0xFB, 0x3E, 0x46, 0x00, 0x08,
0x17, 0x5D, 0x4C, 0xF0, 0xBC, 0xDB, 0x13, 0x07,
0x34, 0x29, 0xCB, 0x0F, 0x43, 0x24, 0xED, 0xF8,
0xB4, 0x78, 0xEA
});
}
amp_set_page(0x03);
{
amp_write_block_at(0x08, {
0x07, 0xFC, 0xDB, 0x0F, 0xF0, 0x3A, 0xC4, 0xBE,
0x07, 0xC9, 0x51, 0x50, 0x0F, 0xC5, 0x3B, 0x42,
0xF8, 0x39, 0xD3, 0xA1, 0x07, 0xFC, 0x38, 0xBF,
0xF0, 0x47, 0x14, 0xF2, 0x07, 0xBE, 0x4A
});
amp_write_block_at(0x27, {
0x80, 0x0F, 0xB8, 0xEB, 0x0E, 0xF8, 0x45, 0x7C,
0xC1, 0x07, 0xEB, 0xF6, 0xEF, 0xF1, 0x08, 0x7E,
0x56, 0x07, 0x17, 0x63, 0xC3, 0x0E, 0xF7, 0x81,
0xAA, 0xF8, 0xFC, 0xA5, 0x4E, 0x08, 0x00
});
amp_write_block_at(0x46, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xD1, 0x27, 0x3E, 0xF0, 0x5D, 0xB1, 0x85, 0x07,
0xD1, 0x27, 0x3E, 0x0F, 0xA1, 0x3C, 0x1E, 0xF8,
0x5C, 0x9F, 0x28
});
}
amp_set_page(0x04);
{
amp_write_block_at(0x08, {
0x07, 0xD1, 0x27, 0x3E, 0xF0, 0x5D, 0xB1, 0x85,
0x07, 0xD1, 0x27, 0x3E, 0x0F, 0xA1, 0x3C, 0x1E,
0xF8, 0x5C, 0x9F, 0x28, 0x08, 0x00, 0x00, 0x00,
0xF0, 0x71, 0x4C, 0x87, 0x07, 0x91, 0xC6
});
amp_write_block_at(0x27, {
0x22, 0x0F, 0x8E, 0xB3, 0x79, 0xF8, 0x6E, 0x39,
0xDE, 0x08, 0x21, 0xA6, 0xC8, 0xF0, 0xA9, 0xF7,
0x0B, 0x07, 0x3B, 0x34, 0x61, 0x0F, 0x56, 0x08,
0xF5, 0xF8, 0xA3, 0x24, 0xD7, 0x08, 0x58
});
amp_write_block_at(0x46, {
0xFE, 0x57, 0xF8, 0xB7, 0x23, 0xC8, 0x01, 0xF4,
0x51, 0x2E, 0x07, 0x48, 0xDC, 0x38, 0xFD, 0xB2,
0xB0, 0x7B, 0x0A, 0x8B, 0x89, 0x0F, 0xFA, 0xBE,
0x92, 0xE5, 0xFE, 0xEA, 0x2A, 0xF4, 0x05
});
amp_write_block_at(0x65, {
0x41, 0x6D, 0x1B, 0xFE, 0x8A, 0x4B, 0xFE, 0x09,
0x6F, 0x71, 0xB3, 0xF4, 0xC9, 0x2E, 0xBA, 0x02,
0xE0, 0x4E, 0xFB, 0x0B, 0x36, 0xD1, 0x46, 0xFB,
0xB0, 0x3F, 0x52
});
}
amp_set_page(0x05);
{
amp_write_block_at(0x08, {
0x07, 0x86, 0xC1, 0xF0, 0xF3, 0x50, 0x29, 0xD7,
0x05, 0x3A, 0xF8, 0x0F, 0x0C, 0xAF, 0xD6, 0x29,
0xFB, 0x3E, 0x46, 0x00, 0x08, 0x17, 0x5D, 0x4C,
0xF0, 0xBC, 0xDB, 0x13, 0x07, 0x34, 0x29
});
amp_write_block_at(0x27, {
0xCB, 0x0F, 0x43, 0x24, 0xED, 0xF8, 0xB4, 0x78,
0xEA, 0x07, 0xFB, 0x25, 0x84, 0xF0, 0x49, 0xA3,
0xCE, 0x07, 0xC7, 0xA6, 0xCB, 0x0F, 0xB6, 0x5C,
0x32, 0xF8, 0x3D, 0x33, 0xB1, 0x08, 0x00
});
amp_write_block_at(0x46, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
});
}
amp_set_page(0x06);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x27, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00
});
}
amp_set_page(0x0E);
{
amp_write_block_at(0x6C, {
0x00, 0x86, 0x43, 0x99, 0xFF, 0x02, 0xE6, 0x50,
0x00, 0x77, 0xAC, 0xFD, 0x0F, 0xD7, 0xE6, 0xBF,
0xF8, 0x27, 0x42, 0x5B
});
}
amp_set_page(0x0F);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xF4, 0x49, 0x81,
0xFF, 0xE8, 0x93, 0x02, 0xFF, 0xF4, 0x49
});
amp_write_block_at(0x27, {
0x81, 0x0D, 0x94, 0x7A, 0x64, 0xFA, 0x3C, 0xAB,
0xA1, 0x06, 0xD5, 0xF3, 0xB1, 0xF2, 0x54, 0x18,
0x9F, 0x06, 0xD5, 0xF3, 0xB1, 0x0D, 0x94, 0x7A,
0x64, 0xFA, 0x3C, 0xAB, 0xA1, 0x00, 0x00
});
amp_write_block_at(0x46, {
0x38, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0F, 0xD5, 0x55, 0x55, 0xF8, 0x2A,
0x71, 0xC7
});
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x30, 0x00);
amp_write_at(0x60, 0x02);
amp_write_at(0x62, 0x09);
amp_write_at(0x4C, 0x30);
amp_write_at(0x03, 0x03);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x78, 0x80);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x60, 0x00);
amp_write_at(0x64, 0x02);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x4E, 0xBB);
amp_write_at(0x4F, 0xB0);
amp_write_at(0x03, 0x03);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x78, 0x80);
}
return 0;
}

View File

@ -0,0 +1,971 @@
static int tas5825m_setup_sub(struct device * dev) {
int res = 0;
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x03, 0x02);
amp_write_at(0x01, 0x11);
}
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x46, 0x11);
}
amp_set_page(0x00);
{
amp_write_at(0x02, 0x04);
amp_write_at(0x53, 0x00);
amp_write_at(0x54, 0x00);
amp_write_at(0x29, 0x7C);
amp_write_at(0x03, 0x02);
}
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
{
amp_write_at(0x29, 0x00);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x03, 0x12);
}
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_page(0x00);
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x48, 0x0C);
}
amp_set_book(0x64);
amp_set_page(0x01);
{
amp_write_block_at(0x08, {
0x00, 0xFE, 0x00, 0x40, 0x00, 0xFC, 0x00, 0x00,
0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00
});
amp_write_block_at(0x27, {
0x00, 0x00, 0xFC, 0x50, 0x00, 0x00, 0xFC, 0x00,
0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00,
0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00,
0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC
});
amp_write_block_at(0x46, {
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0xFC, 0x00, 0x00, 0x00, 0x82, 0x00, 0x93, 0x00,
0xFC, 0x00, 0x00, 0x8F, 0x00, 0xFF, 0xEF, 0x84,
0x49, 0x03, 0x27, 0x84, 0x02, 0x04, 0x06, 0x02,
0x60, 0x00, 0x01
});
}
amp_set_page(0x02);
{
amp_write_block_at(0x08, {
0x02, 0x70, 0x00, 0x06, 0x02, 0x78, 0x00, 0x05,
0x02, 0x68, 0x00, 0x02, 0x02, 0x28, 0x03, 0x4D,
0x84, 0x2A, 0x04, 0x00, 0xE2, 0x57, 0x91, 0x9F,
0x84, 0x82, 0x20, 0xE0, 0x84, 0x82, 0x04
});
amp_write_block_at(0x27, {
0x01, 0xF0, 0x1C, 0x31, 0xA0, 0xF0, 0x1C, 0x31,
0xA1, 0xF0, 0x1C, 0x31, 0xA2, 0xF0, 0x1F, 0x31,
0xA3, 0xE4, 0x00, 0x11, 0xA6, 0x80, 0x27, 0x80,
0xE1, 0xF4, 0x00, 0x11, 0xA4, 0xF4, 0x1D
});
amp_write_block_at(0x46, {
0x31, 0xA5, 0xF4, 0x1C, 0x31, 0xA7, 0xF4, 0x1F,
0x31, 0xA8, 0x02, 0x78, 0x00, 0x03, 0xE2, 0x68,
0xF1, 0xC3, 0x80, 0x67, 0x80, 0xE9, 0x84, 0x4B,
0x03, 0x27, 0x02, 0x70, 0x00, 0x04, 0x84
});
amp_write_block_at(0x65, {
0x41, 0x03, 0x37, 0x80, 0x07, 0x00, 0x80, 0xE0,
0x00, 0x11, 0xA9, 0x84, 0x82, 0x00, 0xE0, 0x8E,
0xFC, 0x04, 0x10, 0xF0, 0x1C, 0x11, 0xAA, 0xF0,
0x1C, 0x11, 0xAB
});
}
amp_set_page(0x03);
{
amp_write_block_at(0x08, {
0xF0, 0x1C, 0x11, 0xAC, 0xF0, 0x1F, 0x11, 0xAD,
0x86, 0xA1, 0x01, 0xC2, 0x80, 0x27, 0x80, 0xE8,
0x60, 0x00, 0x00, 0x00, 0x84, 0x43, 0x03, 0x37,
0x80, 0x00, 0x00, 0x81, 0x0D, 0x00, 0x10
});
amp_write_block_at(0x27, {
0x20, 0x84, 0x51, 0x03, 0x3E, 0x08, 0x44, 0x26,
0x30, 0x84, 0xC3, 0x03, 0x47, 0x84, 0xC2, 0x40,
0xE0, 0x8C, 0xFF, 0x03, 0x23, 0xE0, 0x10, 0x11,
0xB3, 0xF0, 0x1C, 0x51, 0xB4, 0xF0, 0x1C
});
amp_write_block_at(0x46, {
0x51, 0xB5, 0xF0, 0x1C, 0x51, 0xB6, 0xF0, 0x1F,
0x51, 0xB7, 0x86, 0xA1, 0x01, 0xC6, 0x80, 0x27,
0x80, 0xEA, 0x84, 0x53, 0x03, 0x3E, 0x84, 0x82,
0x04, 0x05, 0x84, 0x51, 0x03, 0x75, 0xE2
});
amp_write_block_at(0x65, {
0x6B, 0xC0, 0x00, 0x80, 0x07, 0x00, 0x80, 0xE0,
0x80, 0x31, 0xB8, 0x84, 0x82, 0x40, 0xE0, 0xF0,
0x1C, 0x51, 0xB9, 0xF0, 0x1C, 0x51, 0xBA, 0xF0,
0x1C, 0x51, 0xBB
});
}
amp_set_page(0x04);
{
amp_write_block_at(0x08, {
0xF0, 0x1F, 0x51, 0xBC, 0x86, 0xA1, 0x01, 0xC5,
0x80, 0x27, 0x80, 0xEA, 0x60, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x81, 0x84, 0xA1, 0x03, 0x4F,
0xE0, 0x80, 0xA0, 0x00, 0x01, 0x07, 0x11
});
amp_write_block_at(0x27, {
0x20, 0x08, 0x44, 0x26, 0x30, 0x08, 0x00, 0x98,
0x4A, 0x84, 0x53, 0x03, 0x75, 0x08, 0x00, 0x30,
0x48, 0x02, 0xCA, 0x00, 0x01, 0x08, 0x60, 0x26,
0x32, 0x84, 0x51, 0x03, 0x45, 0xE4, 0x10
});
amp_write_block_at(0x46, {
0x40, 0x00, 0x80, 0x40, 0xC0, 0x82, 0x84, 0xC2,
0x40, 0xE0, 0x84, 0xC3, 0x03, 0x5E, 0x08, 0x00,
0x50, 0x48, 0xE0, 0x10, 0x11, 0xBD, 0x02, 0xC2,
0x00, 0x02, 0x08, 0x60, 0x06, 0x12, 0x84
});
amp_write_block_at(0x65, {
0xD3, 0x03, 0x4F, 0xF0, 0x1C, 0x51, 0xBE, 0xF0,
0x1C, 0x51, 0xBF, 0xF0, 0x1C, 0x51, 0xC0, 0xF0,
0x1F, 0x51, 0xC1, 0x84, 0xA1, 0x03, 0x65, 0x80,
0x27, 0x80, 0xEA
});
}
amp_set_page(0x05);
{
amp_write_block_at(0x08, {
0xE0, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x83,
0x08, 0x00, 0x98, 0x6B, 0x08, 0x00, 0x30, 0x68,
0x84, 0x53, 0x03, 0x45, 0x08, 0x60, 0x26, 0x33,
0x84, 0x51, 0x03, 0x25, 0xE4, 0x10, 0x60
});
amp_write_block_at(0x27, {
0x00, 0x80, 0x40, 0xC0, 0x81, 0x02, 0x70, 0x00,
0x7F, 0x08, 0x00, 0x50, 0x28, 0x08, 0x60, 0x06,
0x11, 0x84, 0xCB, 0x03, 0x65, 0xE0, 0x10, 0x51,
0xC4, 0x84, 0x80, 0x41, 0x00, 0x02, 0xA3
});
amp_write_block_at(0x46, {
0x00, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x84, 0xD0,
0x04, 0x01, 0x84, 0xA2, 0x04, 0x03, 0x84, 0xD2,
0x50, 0x01, 0x84, 0x53, 0x03, 0x25, 0x80, 0x00,
0xC4, 0x04, 0x8F, 0x30, 0x00, 0x00, 0x88
});
amp_write_block_at(0x65, {
0x67, 0x03, 0x00, 0xE4, 0x00, 0x11, 0x9B, 0xEE,
0x64, 0x60, 0x00, 0x02, 0xD3, 0x00, 0x10, 0x88,
0x47, 0x00, 0x80, 0x10, 0x00, 0x18, 0x02, 0x86,
0xC1, 0x01, 0x9D
});
}
amp_set_page(0x06);
{
amp_write_block_at(0x08, {
0xE0, 0x10, 0x31, 0xC7, 0x86, 0xC9, 0x01, 0x9E,
0x80, 0x00, 0xC4, 0x02, 0x02, 0x50, 0x01, 0x9C,
0x00, 0xFF, 0x21, 0x65, 0x00, 0xFC, 0x00, 0x00,
0x02, 0x60, 0x00, 0x01, 0x02, 0x70, 0x00
});
amp_write_block_at(0x27, {
0x04, 0x84, 0xC8, 0x04, 0x10, 0x84, 0x41, 0x03,
0x67, 0x84, 0x51, 0x03, 0x6D, 0x84, 0xC0, 0x04,
0x02, 0x04, 0x80, 0x91, 0x20, 0x08, 0x60, 0x26,
0x30, 0x02, 0x78, 0x00, 0x03, 0x02, 0x68
});
amp_write_block_at(0x46, {
0x00, 0x02, 0x0D, 0x00, 0x10, 0x10, 0x08, 0x60,
0x06, 0x12, 0x84, 0x49, 0x03, 0x2F, 0xE0, 0x80,
0x71, 0xA9, 0x02, 0x28, 0x03, 0x55, 0x84, 0x82,
0x00, 0xE0, 0x84, 0x2A, 0x04, 0x00, 0xF0
});
amp_write_block_at(0x65, {
0x1C, 0x11, 0xAA, 0xF0, 0x1C, 0x11, 0xAB, 0xF0,
0x1C, 0x11, 0xAC, 0xF0, 0x1F, 0x11, 0xAD, 0x86,
0xA1, 0x01, 0xAE, 0x80, 0x27, 0x80, 0xE8, 0x84,
0x82, 0x04, 0x07
});
}
amp_set_page(0x07);
{
amp_write_block_at(0x08, {
0xE0, 0x80, 0x60, 0x00, 0x84, 0x82, 0x40, 0xE0,
0x84, 0x43, 0x03, 0x67, 0xF0, 0x1C, 0x51, 0xAF,
0xF0, 0x1C, 0x51, 0xB0, 0xF0, 0x1C, 0x51, 0xB1,
0xF0, 0x1F, 0x51, 0xB2, 0x02, 0x78, 0x00
});
amp_write_block_at(0x27, {
0x05, 0x80, 0x27, 0x80, 0xEA, 0x84, 0x82, 0x04,
0x08, 0x02, 0x70, 0x00, 0x06, 0x84, 0x53, 0x03,
0x6D, 0x84, 0x80, 0x04, 0x07, 0xE0, 0x00, 0x00,
0x82, 0xF0, 0x81, 0x00, 0x80, 0x80, 0x07
});
amp_write_block_at(0x46, {
0x12, 0xBC, 0x86, 0xA1, 0x01, 0x9F, 0xE2, 0x57,
0xA0, 0x00, 0x84, 0x82, 0x04, 0x09, 0x84, 0x82,
0x20, 0xE0, 0xF0, 0x1C, 0x31, 0xA0, 0xF0, 0x1C,
0x31, 0xA1, 0xF0, 0x1C, 0x31, 0xA2, 0xF0
});
amp_write_block_at(0x65, {
0x1F, 0x31, 0xA3, 0xE4, 0x00, 0x11, 0xA6, 0x80,
0x27, 0x80, 0xE1, 0xF4, 0x00, 0x11, 0xA4, 0xF4,
0x1D, 0x31, 0xA5, 0xF4, 0x1C, 0x31, 0xA7, 0xF4,
0x1F, 0x31, 0xA8
});
}
amp_set_page(0x08);
{
amp_write_block_at(0x08, {
0x02, 0x78, 0x00, 0x03, 0xE2, 0x6A, 0xF1, 0xC3,
0x80, 0x67, 0x80, 0xE9, 0x84, 0x4B, 0x03, 0x2F,
0x02, 0x70, 0x00, 0x04, 0x84, 0x59, 0x03, 0x3D,
0x80, 0x07, 0x00, 0x80, 0xE0, 0x00, 0x11
});
amp_write_block_at(0x27, {
0xA9, 0x84, 0x82, 0x60, 0xE0, 0x8E, 0xFC, 0x04,
0x10, 0xF0, 0x1C, 0x71, 0xAA, 0xF0, 0x1C, 0x71,
0xAB, 0xF0, 0x1C, 0x71, 0xAC, 0xF0, 0x1F, 0x71,
0xAD, 0x86, 0xA1, 0x01, 0xC2, 0x80, 0x27
});
amp_write_block_at(0x46, {
0x80, 0xEB, 0x60, 0x00, 0x00, 0x00, 0x84, 0x5B,
0x03, 0x3D, 0x80, 0x00, 0x00, 0x81, 0x0D, 0x00,
0x10, 0x20, 0x84, 0x59, 0x03, 0x3F, 0x08, 0x44,
0x26, 0x30, 0x84, 0xC3, 0x03, 0x57, 0x84
});
amp_write_block_at(0x65, {
0xC2, 0x60, 0xE0, 0xE0, 0x10, 0x11, 0xB3, 0xF0,
0x1C, 0x71, 0xB4, 0xF0, 0x1C, 0x71, 0xB5, 0xF0,
0x1C, 0x71, 0xB6, 0xF0, 0x1F, 0x71, 0xB7, 0x86,
0xA1, 0x01, 0xC6
});
}
amp_set_page(0x09);
{
amp_write_block_at(0x08, {
0x80, 0x27, 0x80, 0xEB, 0x84, 0x5B, 0x03, 0x3F,
0x84, 0x82, 0x04, 0x0D, 0x84, 0x41, 0x03, 0x76,
0xE2, 0x6B, 0xE0, 0x00, 0x80, 0x07, 0x00, 0x80,
0xE0, 0x81, 0x31, 0xB8, 0x84, 0x82, 0x00
});
amp_write_block_at(0x27, {
0xE0, 0xF0, 0x1C, 0x11, 0xB9, 0xF0, 0x1C, 0x11,
0xBA, 0xF0, 0x1C, 0x11, 0xBB, 0xF0, 0x1F, 0x11,
0xBC, 0x86, 0xA1, 0x01, 0xC5, 0x80, 0x27, 0x80,
0xE8, 0x60, 0x00, 0x00, 0x00, 0x80, 0x00
});
amp_write_block_at(0x46, {
0x00, 0x81, 0x84, 0xA1, 0x03, 0x5D, 0xE0, 0x81,
0xA0, 0x00, 0x01, 0x07, 0x11, 0x20, 0x08, 0x44,
0x26, 0x30, 0x08, 0x00, 0x98, 0x4A, 0x84, 0x43,
0x03, 0x76, 0x08, 0x00, 0x30, 0x48, 0x02
});
amp_write_block_at(0x65, {
0xCA, 0x00, 0x01, 0x08, 0x60, 0x26, 0x32, 0x84,
0x41, 0x03, 0x46, 0xE4, 0x10, 0x40, 0x00, 0x80,
0x40, 0xC0, 0x82, 0x84, 0xC2, 0x00, 0xE0, 0x84,
0xC3, 0x03, 0x5F
});
}
amp_set_page(0x0A);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x50, 0x48, 0xE0, 0x10, 0x11, 0xBD,
0x02, 0xC2, 0x00, 0x02, 0x08, 0x60, 0x06, 0x12,
0x84, 0xD3, 0x03, 0x5D, 0xF0, 0x1C, 0x11, 0xBE,
0xF0, 0x1C, 0x11, 0xBF, 0xF0, 0x1C, 0x11
});
amp_write_block_at(0x27, {
0xC0, 0xF0, 0x1F, 0x11, 0xC1, 0x84, 0xA1, 0x03,
0x66, 0x80, 0x27, 0x80, 0xE8, 0xE0, 0x00, 0x00,
0x00, 0x80, 0x07, 0x00, 0x83, 0x08, 0x00, 0x98,
0x6B, 0x08, 0x00, 0x30, 0x68, 0x84, 0x43
});
amp_write_block_at(0x46, {
0x03, 0x46, 0x08, 0x60, 0x26, 0x33, 0x84, 0x51,
0x03, 0x26, 0xE4, 0x10, 0x60, 0x00, 0x80, 0x40,
0xC0, 0x81, 0x02, 0x70, 0x00, 0x7F, 0x08, 0x00,
0x50, 0x28, 0x08, 0x60, 0x06, 0x11, 0x8C
});
amp_write_block_at(0x65, {
0xFF, 0x03, 0x24, 0x84, 0xCB, 0x03, 0x66, 0xE0,
0x10, 0x51, 0xC4, 0x84, 0x80, 0x41, 0x00, 0x02,
0xA3, 0x00, 0x10, 0xE4, 0x00, 0x00, 0x00, 0x84,
0xD0, 0x04, 0x09
});
}
amp_set_page(0x0B);
{
amp_write_block_at(0x08, {
0x84, 0xA2, 0x04, 0x0B, 0x84, 0xD2, 0x50, 0x01,
0x84, 0x53, 0x03, 0x26, 0x80, 0x00, 0xC4, 0x0C,
0x8F, 0x30, 0x00, 0x00, 0x88, 0x67, 0x03, 0x00,
0xE4, 0x00, 0x11, 0x9B, 0xEE, 0x64, 0x80
});
amp_write_block_at(0x27, {
0x00, 0x02, 0xD3, 0x00, 0x10, 0x88, 0x47, 0x00,
0x80, 0x10, 0x00, 0x18, 0x02, 0x86, 0xC1, 0x01,
0x9D, 0xE0, 0x10, 0x31, 0xC7, 0x86, 0xC9, 0x01,
0x9E, 0x80, 0x00, 0xC4, 0x0A, 0x02, 0x50
});
amp_write_block_at(0x46, {
0x01, 0x9C, 0x00, 0xFF, 0x21, 0x65, 0x00, 0xFC,
0x00, 0x00, 0x02, 0x70, 0x00, 0x04, 0x02, 0x68,
0x00, 0x01, 0x02, 0x60, 0x00, 0x03, 0x02, 0x78,
0x00, 0x02, 0x84, 0x49, 0x03, 0x6E, 0x84
});
amp_write_block_at(0x65, {
0x41, 0x03, 0x6F, 0x84, 0xC8, 0x04, 0x10, 0x84,
0xC0, 0x04, 0x0A, 0x04, 0x81, 0x91, 0x20, 0x08,
0x60, 0x26, 0x30, 0x0D, 0x00, 0x10, 0x10, 0x08,
0x60, 0x06, 0x12
});
}
amp_set_page(0x0C);
{
amp_write_block_at(0x08, {
0x84, 0x00, 0x04, 0x06, 0xE0, 0x81, 0x71, 0xA9,
0x84, 0x82, 0x20, 0xE8, 0xF0, 0x1D, 0x31, 0xAA,
0xF0, 0x1D, 0x31, 0xAB, 0xF0, 0x1D, 0x31, 0xAC,
0xF0, 0x1C, 0x31, 0xAD, 0x86, 0xA1, 0x01
});
amp_write_block_at(0x27, {
0xAE, 0x80, 0x27, 0x80, 0xF9, 0x84, 0x82, 0x04,
0x0E, 0xE0, 0x81, 0x60, 0x00, 0x84, 0x82, 0x00,
0xE8, 0x84, 0x4B, 0x03, 0x6E, 0xF0, 0x1D, 0x11,
0xAF, 0xF0, 0x1D, 0x11, 0xB0, 0xF0, 0x1D
});
amp_write_block_at(0x46, {
0x11, 0xB1, 0xF0, 0x1C, 0x11, 0xB2, 0x02, 0xA3,
0x00, 0x1A, 0x80, 0x27, 0x80, 0xF8, 0x84, 0x82,
0x04, 0x0F, 0xE0, 0x81, 0xC0, 0x00, 0xF0, 0x81,
0xE0, 0x80, 0x84, 0x43, 0x03, 0x6F, 0x80
});
amp_write_block_at(0x65, {
0x07, 0x12, 0xBD, 0x02, 0xC0, 0x00, 0x00, 0x00,
0xFC, 0x50, 0x00, 0x8F, 0x00, 0x00, 0x11, 0x8F,
0x00, 0xFF, 0xFF, 0x84, 0x58, 0x04, 0x01, 0x84,
0xC2, 0x04, 0x00
});
}
amp_set_page(0x0D);
{
amp_write_block_at(0x08, {
0x02, 0xC2, 0x60, 0x00, 0x84, 0xA0, 0x61, 0x00,
0xE0, 0x20, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
0x40, 0x40, 0xA0, 0x00, 0x80, 0x00, 0xC0, 0x82,
0x08, 0xFC, 0x48, 0x3A, 0x08, 0xFC, 0x18
});
amp_write_block_at(0x27, {
0x50, 0x00, 0xFC, 0x00, 0x00, 0xE0, 0x10, 0x00,
0x00, 0x86, 0xA0, 0x41, 0x00, 0x40, 0x47, 0x20,
0x00, 0x80, 0x00, 0xC0, 0x83, 0x04, 0xE0, 0x3D,
0x1E, 0x04, 0x80, 0x11, 0xE0, 0x08, 0x44
});
amp_write_block_at(0x46, {
0x26, 0x33, 0x02, 0xCB, 0x00, 0x10, 0xE0, 0x10,
0x40, 0x83, 0x08, 0x00, 0x28, 0x21, 0x84, 0xCA,
0x61, 0x00, 0x80, 0x07, 0x00, 0x81, 0x0C, 0xE0,
0x2C, 0x09, 0x84, 0xCA, 0x21, 0x00, 0x00
});
amp_write_block_at(0x65, {
0xFC, 0x50, 0x00, 0x8F, 0x00, 0x00, 0x01
});
}
amp_set_book(0x78);
amp_set_page(0x18);
{
amp_write_block_at(0x30, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1B);
{
amp_write_block_at(0x6C, {
0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x03, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x1C);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x1C, {
0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x3C, {
0x00, 0x00, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x54, {
0x00, 0x00, 0x03, 0x40, 0x00, 0x00, 0x03, 0x48,
0x00, 0x00, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1C);
{
amp_write_block_at(0x74, {
0x00, 0x00, 0x03, 0x58, 0x00, 0x00, 0x03, 0x60,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x1D);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1D);
{
amp_write_block_at(0x1C, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1D);
{
amp_write_block_at(0x3C, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x5B, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x7A, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
}
amp_set_page(0x1E);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1E);
{
amp_write_block_at(0x0C, {
0x00, 0x00, 0x03, 0x68, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
});
}
amp_set_book(0x78);
amp_set_page(0x1E);
{
amp_write_block_at(0x24, {
0x00, 0x00, 0x03, 0x70, 0x00, 0x00, 0x03, 0x78,
0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0xFD, {
0x00, 0x00
});
}
amp_set_book(0x78);
amp_set_page(0x1E);
{
amp_write_block_at(0x44, {
0x00, 0x00, 0x04, 0x88, 0x00, 0x00, 0x04, 0x90,
});
}
amp_set_book(0x8C);
amp_set_page(0x0E);
{
amp_write_block_at(0x5C, {
0x00, 0xA7, 0x26, 0x4A, 0x7F, 0xFF, 0xFF, 0xFF,
0x00, 0x20, 0xC4, 0x9C, 0x00, 0x20, 0xC4, 0x9C,
0x00, 0x00, 0x68, 0xDB, 0x00, 0x00, 0xD1, 0xB7,
0x00, 0x00, 0x68, 0xDB, 0x0F, 0xA4, 0xA8
});
amp_write_block_at(0x7B, {
0xC1, 0xF8, 0x59, 0x7F, 0x63
});
}
amp_set_page(0x0F);
{
amp_write_block_at(0x08, {
0x07, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xB7, 0xE9,
0x00, 0x5F, 0x6F, 0xD2, 0x00, 0x2F, 0xB7
});
amp_write_block_at(0x27, {
0xE9, 0x0B, 0x1E, 0x4F, 0x76, 0xFC, 0x23, 0x05,
0x54, 0xFA, 0x41, 0x20, 0x5C, 0x0B, 0x7D, 0xBF,
0x48, 0xFA, 0x41, 0x20, 0x5C, 0x0B, 0x1E, 0x4F,
0x76, 0xFC, 0x23, 0x05, 0x54, 0x00, 0x04
});
amp_write_block_at(0x46, {
0x81, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0F, 0x3F, 0xE5, 0xC9, 0xF8, 0xBB,
0x98, 0xC8, 0x07, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x81, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0F, 0x3F, 0xE5, 0xC9, 0xF8,
0xBB, 0x98, 0xC8
});
}
amp_set_page(0x10);
{
amp_write_block_at(0x08, {
0x00, 0x89, 0xA0, 0x27, 0x7F, 0xEC, 0x56, 0xD5,
0x7F, 0xFC, 0xB9, 0x23, 0x00, 0x89, 0xA0, 0x27,
0x7F, 0xEC, 0x56, 0xD5, 0x7F, 0xFC, 0xB9, 0x23,
});
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x40, 0x00);
}
amp_set_book(0x00);
{
// Page 0
amp_write_block_at(0x7D, {
0x11, 0xFF
});
}
amp_set_page(0x01);
{
amp_write_at(0x51, 0x05);
}
amp_set_page(0x02);
{
amp_write_at(0x19, 0xDF);
}
amp_set_book(0x8C);
amp_set_page(0x01);
{
amp_write_block_at(0x2C, {
0x00, 0x71, 0x94, 0x9A
});
}
amp_set_page(0x0A);
{
amp_write_block_at(0x64, {
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00
});
}
amp_set_page(0x0B);
{
amp_write_block_at(0x08, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x5A, 0x84,
0x00, 0x1E, 0x5A, 0x84, 0x00, 0x40, 0x26, 0xE7,
0x00, 0x40, 0x26, 0xE7, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x28, {
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x57, 0x62, 0x00, 0x00, 0x00, 0x00,
});
}
amp_set_page(0x0E);
{
amp_write_block_at(0x5C, {
0x00, 0x03, 0x69, 0xC5, 0x00, 0xEB, 0x8F, 0xA8,
0x00, 0x22, 0x1D, 0x95, 0x00, 0x03, 0x69, 0xC5,
});
}
amp_set_page(0x0F);
{
amp_write_block_at(0x5C, {
0x7F, 0xF9, 0x2C, 0x60, 0x01, 0xEB, 0x55, 0xAC,
});
}
amp_set_page(0x07);
{
amp_write_block_at(0x64, {
0x00, 0x80, 0x00, 0x00
});
amp_write_block_at(0x6C, {
0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
});
}
amp_set_book(0xAA);
amp_set_page(0x01);
{
amp_write_block_at(0x30, {
0x00, 0x01, 0x0A, 0x7A, 0x00, 0x02, 0x14, 0xF5,
0x00, 0x01, 0x0A, 0x7A, 0x0F, 0x7B, 0xDB, 0x58,
0xF8, 0x7F, 0xFA, 0xBE, 0x00, 0x01, 0x0A, 0x7A,
0x00, 0x02, 0x14, 0xF5, 0x00, 0x01, 0x0A
});
amp_write_block_at(0x4F, {
0x7A, 0x0F, 0x7B, 0xDB, 0x58, 0xF8, 0x7F, 0xFA,
0xBE, 0x07, 0xFD, 0xF9, 0x62, 0xF0, 0x25, 0x7A,
0x1B, 0x07, 0xDC, 0xC4, 0xC6, 0x0F, 0xDA, 0x85,
0xE5, 0xF8, 0x25, 0x41, 0xD8, 0x08, 0x00
});
amp_write_block_at(0x6E, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00
});
}
amp_set_page(0x02);
{
amp_write_block_at(0x08, {
0x07, 0xF7, 0xFF, 0xB5, 0xF0, 0x4F, 0x8C, 0x33,
0x07, 0xBA, 0x32, 0x37, 0x0F, 0xB0, 0x73, 0xCD,
0xF8, 0x4D, 0xCE, 0x15, 0x07, 0xFA, 0x6B, 0x45,
0xF0, 0x68, 0xC7, 0x1B, 0x07, 0x9E, 0xF0
});
amp_write_block_at(0x27, {
0xFB, 0x0F, 0x97, 0x38, 0xE5, 0xF8, 0x66, 0xA3,
0xC0, 0x07, 0xFE, 0x8C, 0x9C, 0xF0, 0x34, 0xCF,
0xDE, 0x07, 0xCD, 0x94, 0xFF, 0x0F, 0xCB, 0x30,
0x22, 0xF8, 0x33, 0xDE, 0x65, 0x07, 0xFE
});
amp_write_block_at(0x46, {
0x73, 0xDB, 0xF0, 0x38, 0x93, 0x60, 0x07, 0xCA,
0x38, 0xAE, 0x0F, 0xC7, 0x6C, 0xA0, 0xF8, 0x37,
0x53, 0x77, 0x07, 0xF8, 0xC1, 0xBE, 0xF0, 0x88,
0xCB, 0x7D, 0x07, 0x82, 0x08, 0xA9, 0x0F
});
amp_write_block_at(0x65, {
0x77, 0x34, 0x83, 0xF8, 0x85, 0x35, 0x99, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
});
}
amp_set_page(0x03);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0xEE, 0xC6, 0xB4,
0xF0, 0x22, 0x72, 0x97, 0x07, 0xEE, 0xC6
});
amp_write_block_at(0x27, {
0xB4, 0x0F, 0xDD, 0x77, 0x9C, 0xF8, 0x22, 0x5C,
0xCB, 0x07, 0xF4, 0x93, 0x76, 0xF0, 0x34, 0x67,
0xAD, 0x07, 0xD7, 0xAE, 0x5A, 0x0F, 0xCB, 0x98,
0x53, 0xF8, 0x33, 0xBE, 0x30, 0x08, 0x13
});
amp_write_block_at(0x46, {
0x15, 0xCB, 0xF0, 0x0E, 0xB9, 0x1C, 0x07, 0xDE,
0xDC, 0x2A, 0x0F, 0xF1, 0x86, 0x85, 0xF8, 0x0E,
0x4D, 0xAB, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
});
}
amp_set_page(0x04);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x27, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00
});
amp_write_block_at(0x46, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x65, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00
});
}
amp_set_page(0x05);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x27, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00
});
amp_write_block_at(0x46, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xEE, 0xC6, 0xB4, 0xF0, 0x22,
0x72, 0x97, 0x07, 0xEE, 0xC6, 0xB4, 0x0F
});
amp_write_block_at(0x65, {
0xDD, 0x77, 0x9C, 0xF8, 0x22, 0x5C, 0xCB, 0x07,
0xF4, 0x93, 0x76, 0xF0, 0x34, 0x67, 0xAD, 0x07,
0xD7, 0xAE, 0x5A, 0x0F, 0xCB, 0x98, 0x53, 0xF8,
0x33, 0xBE, 0x30
});
}
amp_set_page(0x06);
{
amp_write_block_at(0x08, {
0x08, 0x13, 0x15, 0xCB, 0xF0, 0x0E, 0xB9, 0x1C,
0x07, 0xDE, 0xDC, 0x2A, 0x0F, 0xF1, 0x86, 0x85,
0xF8, 0x0E, 0x4D, 0xAB, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
});
amp_write_block_at(0x27, {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00
});
}
amp_set_page(0x0E);
{
amp_write_block_at(0x6C, {
0x00, 0x85, 0xC0, 0x8D, 0xFF, 0x02, 0x2B, 0x75,
0x00, 0x78, 0xBE, 0x6E, 0x0F, 0xE2, 0x46, 0xF6,
0xF8, 0x1D, 0x0E, 0x9A
});
}
amp_set_page(0x0F);
{
amp_write_block_at(0x08, {
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0xAA, 0xC3,
0xFF, 0xFD, 0x55, 0x85, 0xFF, 0xFE, 0xAA
});
amp_write_block_at(0x27, {
0xC3, 0x0F, 0x2F, 0x01, 0x62, 0xF8, 0xCB, 0xA9,
0xA8, 0x07, 0x98, 0xD5, 0xEF, 0xF0, 0xCE, 0x54,
0x23, 0x07, 0x98, 0xD5, 0xEF, 0x0F, 0x2F, 0x01,
0x62, 0xF8, 0xCB, 0xA9, 0xA8, 0x00, 0x00
});
amp_write_block_at(0x46, {
0x38, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0F, 0xD5, 0x55, 0x55, 0xF8, 0x2A,
0x71, 0xC7
});
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x30, 0x00);
amp_write_at(0x60, 0x02);
amp_write_at(0x62, 0x09);
amp_write_at(0x4C, 0x30);
amp_write_at(0x03, 0x03);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x78, 0x80);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x60, 0x00);
amp_write_at(0x64, 0x02);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x4E, 0xBB);
amp_write_at(0x4F, 0xB0);
amp_write_at(0x03, 0x03);
}
amp_set_book(0x00);
{
// Page 0
amp_write_at(0x78, 0x80);
}
return 0;
}

View File

@ -0,0 +1,31 @@
#include <delay.h>
#include <drivers/i2c/tas5825m/tas5825m.h>
#define R(F) { \
res = F; \
if (res < 0) return res; \
}
#define amp_write_at(A, V) R(tas5825m_write_at(dev, A, V))
#define amp_write_block_at(A, ...) { \
const uint8_t _values[] = __VA_ARGS__; \
R(tas5825m_write_block_at(dev, A, _values, ARRAY_SIZE(_values))); \
}
#define amp_set_page(P) R(tas5825m_set_page(dev, P))
#define amp_set_book(B) R(tas5825m_set_book(dev, B))
#include "tas5825m-normal.c"
#include "tas5825m-sub.c"
int tas5825m_setup(struct device * dev, int id) {
if (id == 0) {
return tas5825m_setup_normal(dev);
} else if (id == 1) {
return tas5825m_setup_sub(dev);
} else {
return -1;
}
}

View File

@ -0,0 +1,94 @@
if BOARD_SYSTEM76_GALP4 || BOARD_SYSTEM76_DARP6
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_I2C_HID
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_BAT_THRESHOLDS
select EC_SYSTEM76_EC_COLOR_KEYBOARD if BOARD_SYSTEM76_DARP6
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
select HAVE_CMOS_DEFAULT
select HAVE_OPTION_TABLE
select HAVE_SMI_HANDLER
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
select PCIEXP_HOTPLUG_PREFETCH_MEM_BELOW_4G # Fix running out of MTRRs
select SOC_INTEL_COMETLAKE
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP
select TPM_RDRESP_NEED_DELAY
select USE_OPTION_TABLE
select USE_LEGACY_8254_TIMER # Fix failure to boot GRUB
config MAINBOARD_DIR
string
default "system76/cml-u"
config VARIANT_DIR
string
default "galp4" if BOARD_SYSTEM76_GALP4
default "darp6" if BOARD_SYSTEM76_DARP6
config OVERRIDE_DEVICETREE
string
default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb"
config MAINBOARD_PART_NUMBER
string
default "galp4" if BOARD_SYSTEM76_GALP4
default "darp6" if BOARD_SYSTEM76_DARP6
config CBFS_SIZE
hex
default 0xA00000
config CONSOLE_POST
bool
default y
config ONBOARD_VGA_IS_PRIMARY
bool
default y
config UART_FOR_CONSOLE
int
default 2
config MAX_CPUS
int
default 8
config DIMM_MAX
int
default 2
config DIMM_SPD_SIZE
int
default 512
config VGA_BIOS_FILE
string
default "pci8086,9b41.rom"
config VGA_BIOS_ID
string
default "8086,9b41"
config PXE_ROM_ID
string
default "10ec,8168"
config POST_DEVICE
bool
default n
endif

View File

@ -0,0 +1,5 @@
config BOARD_SYSTEM76_GALP4
bool "galp4"
config BOARD_SYSTEM76_DARP6
bool "darp6"

View File

@ -0,0 +1,3 @@
bootblock-y += bootblock.c
ramstage-y += ramstage.c
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c

View File

@ -0,0 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <drivers/intel/gma/acpi/gma.asl>
Scope (GFX0)
{
Name (BRIG, Package (22)
{
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
// GPP_D9 SCI
Method (_L29, 0, Serialized) {
Debug = Concatenate("GPE _L29: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
If (\_SB.PCI0.LPCB.EC0.ECOK) {
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
Notify(\_SB.LID0, 0x80)
}
}
}

View File

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#define EC_GPE_SCI 0x50 /* GPP_E16 */
#define EC_GPE_SWI 0x29 /* GPP_D9 */
#if defined(CONFIG_BOARD_SYSTEM76_DARP6)
#define EC_COLOR_KEYBOARD 1
#elif defined(CONFIG_BOARD_SYSTEM76_GALP4)
#define EC_COLOR_KEYBOARD 0
#else
#error Unknown Mainboard
#endif
#include <ec/system76/ec/acpi/ec.asl>
Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}
Scope (\_GPE) {
#include "gpe.asl"
}

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Method called from _PTS prior to enter sleep state */
Method (MPTS, 1) {
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
}
/* Method called from _WAK prior to wakeup */
Method (MWAK, 1) {
\_SB.PCI0.LPCB.EC0.WAK (Arg0)
}

View File

@ -0,0 +1,8 @@
Vendor name: System76
Board name: cml-u
Category: laptop
Release year: 2019
ROM package: SOIC-8
ROM protocol: SPI
ROM socketed: n
Flashrom support: y

View File

@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
#include <gpio.h>
#include "gpio.h"
void bootblock_mainboard_init(void)
{
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@ -0,0 +1 @@
DisplayPort_Output=Mini_DisplayPort

View File

@ -0,0 +1,33 @@
#*****************************************************************************
#
# This file is part of the coreboot project.
#
# Copyright (C) 2019 System76
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#*****************************************************************************
entries
#start length type id name
0 384 r 0 reserved_memory
384 1 e 1 DisplayPort_Output
984 16 h 0 check_sum
enumerations
#ID value text
1 0 Mini_DisplayPort
1 1 USB-C
checksums
#checksum start end location
checksum 384 983 984

View File

@ -0,0 +1,261 @@
chip soc/intel/cannonlake
register "common_soc_config" = "{
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
/* Touchpad */
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 80,
.fall_time_ns = 110,
},
}"
# Send an extra VR mailbox command for the PS4 exit issue
register "SendVrMbxCmd" = "2"
# ACPI (soc/intel/cannonlake/acpi.c)
# Disable s0ix
register "s0ix_enable" = "0"
# PM Timer Enabled
register "PmTimerDisabled" = "0"
# Disable DPTF
register "dptf_enable" = "0"
# CPU (soc/intel/cannonlake/cpu.c)
# Power limit
register "power_limits_config" = "{
.tdp_pl1_override = 20,
.tdp_pl2_override = 30,
}"
# Enable "Intel Speed Shift Technology"
register "speed_shift_enable" = "1"
# Enable Enhanced Intel SpeedStep
register "eist_enable" = "1"
# FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c)
register "SaGv" = "SaGv_Enabled"
register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c)
# Serial I/O
register "SerialIoDevMode" = "{
[PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad
[PchSerialIoIndexUART2] = PchSerialIoSkipInit, // LPSS UART
}"
# SATA
register "SataMode" = "Sata_AHCI"
register "SataSalpSupport" = "0"
register "SataPortsEnable[0]" = "1"
register "SataPortsEnable[1]" = "0"
register "SataPortsEnable[2]" = "1"
register "SataPortsEnable[3]" = "0"
register "SataPortsEnable[4]" = "0"
register "SataPortsEnable[5]" = "0"
register "SataPortsEnable[6]" = "0"
register "SataPortsEnable[7]" = "0"
register "SataPortsDevSlp[0]" = "0"
register "SataPortsDevSlp[1]" = "0"
register "SataPortsDevSlp[2]" = "0"
register "SataPortsDevSlp[3]" = "0"
register "SataPortsDevSlp[4]" = "0"
register "SataPortsDevSlp[5]" = "0"
register "SataPortsDevSlp[6]" = "0"
register "SataPortsDevSlp[7]" = "0"
# Audio
register "PchHdaDspEnable" = "0"
register "PchHdaAudioLinkHda" = "1"
register "PchHdaAudioLinkDmic0" = "1"
register "PchHdaAudioLinkDmic1" = "1"
register "PchHdaAudioLinkSsp0" = "0"
register "PchHdaAudioLinkSsp1" = "0"
register "PchHdaAudioLinkSsp2" = "0"
register "PchHdaAudioLinkSndw1" = "0"
register "PchHdaAudioLinkSndw2" = "0"
register "PchHdaAudioLinkSndw3" = "0"
register "PchHdaAudioLinkSndw4" = "0"
# USB
register "SsicPortEnable" = "0"
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A port 1
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # 3G / LTE
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # Type-C port 3
register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # USB Board port 4
register "usb2_ports[4]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[5]" = "USB2_PORT_EMPTY" # Finger print
register "usb2_ports[6]" = "USB2_PORT_MAX(OC_SKIP)" # Camera
register "usb2_ports[7]" = "USB2_PORT_EMPTY" # T17, T18
register "usb2_ports[8]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
register "usb2_ports[10]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[11]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[12]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[13]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[14]" = "USB2_PORT_EMPTY" # NC
register "usb2_ports[15]" = "USB2_PORT_EMPTY" # NC
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A port 1
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # 4G
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type C port 3
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB Board port 4
register "usb3_ports[4]" = "USB3_PORT_EMPTY" # Used by TBT
register "usb3_ports[5]" = "USB3_PORT_EMPTY" # Used by TBT
register "usb3_ports[6]" = "USB3_PORT_EMPTY" # NC
register "usb3_ports[7]" = "USB3_PORT_EMPTY" # NC
register "usb3_ports[8]" = "USB3_PORT_EMPTY" # NC
register "usb3_ports[9]" = "USB3_PORT_EMPTY" # NC
# PCI Express Root port #5 x4, Clock 4 (TBT)
register "PcieRpEnable[4]" = "1"
register "PcieRpLtrEnable[4]" = "1"
register "PcieRpHotPlug[4]" = "1"
register "PcieClkSrcUsage[4]" = "4"
register "PcieClkSrcClkReq[4]" = "4"
# PCI Express Root port #9 x1, Clock 3 (LAN)
register "PcieRpEnable[8]" = "1"
register "PcieRpLtrEnable[8]" = "1"
register "PcieClkSrcUsage[3]" = "8"
register "PcieClkSrcClkReq[3]" = "3"
# PCI Express Root port #10 x1, Clock 2 (WLAN)
register "PcieRpEnable[9]" = "1"
register "PcieRpLtrEnable[9]" = "0"
register "PcieClkSrcUsage[2]" = "9"
register "PcieClkSrcClkReq[2]" = "2"
# PCI Express Root port #13 x4, Clock 5 (NVMe)
register "PcieRpEnable[12]" = "1"
register "PcieRpLtrEnable[12]" = "1"
register "PcieClkSrcUsage[5]" = "12"
register "PcieClkSrcClkReq[5]" = "5"
# Misc
register "Device4Enable" = "1"
register "HeciEnabled" = "0"
register "Heci3Enabled" = "0"
register "AcousticNoiseMitigation" = "1"
#register "dmipwroptimize" = "1"
#register "satapwroptimize" = "1"
# Power
register "PchPmSlpS3MinAssert" = "3" # 50ms
register "PchPmSlpS4MinAssert" = "1" # 1s
register "PchPmSlpSusMinAssert" = "2" # 500ms
register "PchPmSlpAMinAssert" = "4" # 2s
# Thermal
register "tcc_offset" = "12"
# Serial IRQ Continuous
register "serirq_mode" = "SERIRQ_CONTINUOUS"
# Graphics (soc/intel/cannonlake/graphics.c)
register "gfx" = "GMA_STATIC_DISPLAYS(0)"
# LPC (soc/intel/cannonlake/lpc.c)
# LPC configuration from lspci -s 1f.0 -xxx
# Address 0x84: Decode 0x80 - 0x8F (Port 80)
register "gen1_dec" = "0x000c0081"
# Address 0x88: Decode 0x68 - 0x6F (PMC)
register "gen2_dec" = "0x00040069"
# Address 0x8C: Decode 0xE00 - 0xEFF (AP/EC command)
register "gen3_dec" = "0x00fc0E01"
# Address 0x90: Decode 0xF00 - 0xFFF (AP/EC debug)
register "gen4_dec" = "0x00fc0F01"
# PMC (soc/intel/cannonlake/pmc.c)
# Enable deep Sx states
register "deep_s3_enable_ac" = "0"
register "deep_s3_enable_dc" = "0"
register "deep_s5_enable_ac" = "0"
register "deep_s5_enable_dc" = "0"
register "deep_sx_config" = "0"
# PM Util (soc/intel/cannonlake/pmutil.c)
# GPE configuration
# Note that GPE events called out in ASL code rely on this
# route. i.e. If this route changes then the affected GPE
# offset bits also need to be changed.
# sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG)
register "gpe0_dw0" = "PMC_GPP_C"
register "gpe0_dw1" = "PMC_GPP_D"
register "gpe0_dw2" = "PMC_GPP_E"
# Actual device tree
device cpu_cluster 0 on
device lapic 0 on end
end
device domain 0 on
device pci 00.0 on end # Host Bridge
device pci 02.0 on end # Integrated Graphics Device
device pci 04.0 on end # SA Thermal device
device pci 12.0 on end # Thermal Subsystem
device pci 12.5 off end # UFS SCS
device pci 12.6 off end # GSPI #2
device pci 13.0 off end # Integrated Sensor Hub
device pci 14.0 on end # USB xHCI
device pci 14.1 off end # USB xDCI (OTG)
#chip drivers/intel/wifi
# register "wake" = "PME_B0_EN_BIT"
device pci 14.3 on end # CNVi wifi
#end
device pci 14.5 off end # SDCard
device pci 15.0 on end # I2C #0
device pci 15.1 off end # I2C #1
device pci 15.2 off end # I2C #2
device pci 15.3 off end # I2C #3
device pci 16.0 off end # Management Engine Interface 1
device pci 16.1 off end # Management Engine Interface 2
device pci 16.2 off end # Management Engine IDE-R
device pci 16.3 off end # Management Engine KT Redirection
device pci 16.4 off end # Management Engine Interface 3
device pci 16.5 off end # Management Engine Interface 4
device pci 17.0 on end # SATA
device pci 19.0 off end # I2C #4
device pci 19.1 off end # I2C #5
device pci 19.2 on end # UART #2
device pci 1a.0 off end # eMMC
device pci 1c.0 on end # PCI Express Port 1
device pci 1c.1 off end # PCI Express Port 2
device pci 1c.2 off end # PCI Express Port 3
device pci 1c.3 off end # PCI Express Port 4
device pci 1c.4 on end # PCI Express Port 5
device pci 1c.5 off end # PCI Express Port 6
device pci 1c.6 off end # PCI Express Port 7
device pci 1c.7 off end # PCI Express Port 8
device pci 1d.0 on end # PCI Express Port 9
device pci 1d.1 on end # PCI Express Port 10
device pci 1d.2 off end # PCI Express Port 11
device pci 1d.3 off end # PCI Express Port 12
device pci 1d.4 on end # PCI Express Port 13
device pci 1d.5 off end # PCI Express Port 14
device pci 1d.6 off end # PCI Express Port 15
device pci 1d.7 off end # PCI Express Port 16
device pci 1e.0 off end # UART #0
device pci 1e.1 off end # UART #1
device pci 1e.2 off end # GSPI #0
device pci 1e.3 off end # GSPI #1
device pci 1f.0 on # LPC Interface
chip drivers/pc80/tpm
device pnp 0c31.0 on end
end
end
device pci 1f.1 off end # P2SB
device pci 1f.2 off end # Power Management Controller
device pci 1f.3 on end # Intel HDA
device pci 1f.4 on end # SMBus
device pci 1f.5 on end # PCH SPI
device pci 1f.6 off end # GbE
end
end

View File

@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
DefinitionBlock(
"dsdt.aml",
"DSDT",
0x02, // DSDT revision: ACPI v2.0 and up
OEM_ID,
ACPI_TABLE_CREATOR,
0x20110725 // OEM revision
)
{
#include <soc/intel/cannonlake/acpi/platform.asl>
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
#include <cpu/intel/common/acpi/cpu.asl>
Device (\_SB.PCI0)
{
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/cannonlake/acpi/southbridge.asl>
}
#include <southbridge/intel/common/acpi/sleepstates.asl>
Scope (\_SB.PCI0.LPCB)
{
#include <drivers/pc80/pc/ps2_controller.asl>
}
#include "acpi/mainboard.asl"
}

View File

@ -0,0 +1,534 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef MAINBOARD_GPIO_H
#define MAINBOARD_GPIO_H
#include <soc/gpe.h>
#include <soc/gpio.h>
#ifndef __ACPI__
#define PAD_CFG_NC(pad) PAD_NC(pad, NONE)
/* Early pad configuration in romstage. */
static const struct pad_config early_gpio_table[] = {
// UART2
// UART2_RXD
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1),
// UART2_TXD
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1),
// NC
PAD_CFG_NC(GPP_C22),
// NC
PAD_CFG_NC(GPP_C23),
};
/* Pad configuration in ramstage. */
static const struct pad_config gpio_table[] = {
// GPD
// Power Management
// PM_BATLOW#
PAD_CFG_NC(GPD0),
// AC_PRESENT
PAD_CFG_NF(GPD1, NATIVE, DEEP, NF1),
// NC
PAD_CFG_NC(GPD2),
// PWR_BTN#
PAD_CFG_NF(GPD3, UP_20K, DEEP, NF1),
// SUSB#_PCH
PAD_CFG_NF(GPD4, NONE, DEEP, NF1),
// SUSC#_PCH
PAD_CFG_NF(GPD5, NONE, DEEP, NF1),
// SLP_A#
PAD_CFG_NF(GPD6, NONE, DEEP, NF1),
// GPIO
// NC
PAD_CFG_NC(GPD7),
// Clock Signals
// SUS_CLK
PAD_CFG_NF(GPD8, NONE, DEEP, NF1),
// Power Management
// GPD9_RTD3
PAD_CFG_NC(GPD9),
// NC
PAD_CFG_NF(GPD10, NONE, DEEP, NF1),
// NC
PAD_CFG_NC(GPD11),
// GPP_A
// LPC
// SB_KBCRST#
PAD_CFG_NF(GPP_A0, NONE, DEEP, NF1),
// LPC_AD0
PAD_CFG_NF(GPP_A1, NATIVE, DEEP, NF1),
// LPC_AD1
PAD_CFG_NF(GPP_A2, NATIVE, DEEP, NF1),
// LPC_AD2
PAD_CFG_NF(GPP_A3, NATIVE, DEEP, NF1),
// LPC_AD3
PAD_CFG_NF(GPP_A4, NATIVE, DEEP, NF1),
// LPC_FRAME#
PAD_CFG_NF(GPP_A5, NONE, DEEP, NF1),
// SERIRQ with pull up
PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1),
// GSPI0
// TPM_PIRQ#
PAD_CFG_NC(GPP_A7),
// LPC
// PM_CLKRUN# with pull-up
PAD_CFG_NF(GPP_A8, NONE, DEEP, NF1),
// PCLK_KBC
PAD_CFG_NF(GPP_A9, DN_20K, DEEP, NF1),
// NC
PAD_CFG_NF(GPP_A10, DN_20K, DEEP, NF1),
// GSPI1
// NC
PAD_CFG_NC(GPP_A11),
// ISH_GP
// PCH_GPP_A12
PAD_CFG_NC(GPP_A12),
// Power Management
// SUSWARN#
PAD_CFG_NF(GPP_A13, NONE, DEEP, NF1),
// LPC
// NC
PAD_CFG_NF(GPP_A14, NONE, DEEP, NF1),
// Power Management
// SUS_PWR_ACK
PAD_CFG_NF(GPP_A15, UP_20K, DEEP, NF1),
// SD
// NC
PAD_CFG_NC(GPP_A16),
// LIGHT_KB_DET#
PAD_CFG_NC(GPP_A17),
// ISH_GP
// NC
PAD_CFG_NC(GPP_A18),
// SATA_PWR_EN
PAD_CFG_GPO(GPP_A19, 1, DEEP),
// NC
PAD_CFG_NC(GPP_A20),
// NC
PAD_CFG_NC(GPP_A21),
// PS8338B_SW
PAD_CFG_TERM_GPO(GPP_A22, 0, NONE, DEEP),
// PS8338B_PCH
PAD_CFG_NC(GPP_A23),
// GPP_B
// Power
// CORE_VID0
PAD_CFG_NC(GPP_B0),
// CORE_VID1
PAD_CFG_NC(GPP_B1),
// Power Management
// CNVI_WAKE#
PAD_CFG_NC(GPP_B2),
// CPU Misc
// NC
PAD_CFG_NC(GPP_B3),
// NC
PAD_CFG_NC(GPP_B4),
// Clock Signals
// NC
PAD_CFG_NC(GPP_B5),
// NC
PAD_CFG_NC(GPP_B6),
// WLAN_CLKREQ#
PAD_CFG_NF(GPP_B7, NONE, DEEP, NF1),
// LAN_CLKREQ#
PAD_CFG_NF(GPP_B8, NONE, DEEP, NF1),
// TBT_CLKREQ#
PAD_CFG_NF(GPP_B9, NONE, DEEP, NF1),
// SSD_CLKREQ#
PAD_CFG_NF(GPP_B10, NONE, DEEP, NF1),
// Power Management
// EXT_PWR_GATE#
PAD_CFG_NC(GPP_B11),
// SLP_S0#
PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1),
// PLT_RST#
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
// SPKR
// PCH_SPKR
PAD_CFG_NF(GPP_B14, NONE, DEEP, NF1),
// GSPI0
// NC
PAD_CFG_NC(GPP_B15),
// PCH_GPP_B16
PAD_CFG_NC(GPP_B16),
// PCH_GPP_B17
PAD_CFG_NC(GPP_B17),
// PCH_GPP_B18 - strap for disabling no reboot mode
PAD_CFG_NC(GPP_B18),
// GSPI1
// NC
PAD_CFG_NC(GPP_B19),
// NC
PAD_CFG_NC(GPP_B20),
// NC
PAD_CFG_NC(GPP_B21),
// PCH_GPP_B22
PAD_CFG_NC(GPP_B22),
// SMBUS
// NC
PAD_CFG_NC(GPP_B23),
// GPP_C
// SMBUS
// SMB_CLK_DDR
PAD_CFG_NF(GPP_C0, NONE, DEEP, NF1),
// SMB_DAT_DDR
PAD_CFG_NF(GPP_C1, NONE, DEEP, NF1),
// PCH_GPP_C2 with pull-up
PAD_CFG_NC(GPP_C2),
// NC
PAD_CFG_NC(GPP_C3),
// NC
PAD_CFG_NC(GPP_C4),
// NC
PAD_CFG_NC(GPP_C5),
// LAN_WAKEUP#
PAD_CFG_NC(GPP_C6),
// NC
PAD_CFG_NC(GPP_C7),
// UART0
// NC
PAD_CFG_NC(GPP_C8),
// TBCIO_PLUG_EVENT
_PAD_CFG_STRUCT(GPP_C9, 0x82880100, 0x3000),
// TBT_FRC_PWR
PAD_CFG_TERM_GPO(GPP_C10, 0, NONE, PLTRST),
// NC
PAD_CFG_NC(GPP_C11),
// UART1
// GPP_C12_RTD3
PAD_CFG_TERM_GPO(GPP_C12, 1, NONE, PLTRST),
// SSD_PWR_DN#
PAD_CFG_TERM_GPO(GPP_C13, 1, NONE, PLTRST),
// TBTA_HRESET
PAD_CFG_TERM_GPO(GPP_C14, 0, NONE, PLTRST),
// TBT_PERST_N
PAD_CFG_TERM_GPO(GPP_C15, 1, UP_20K, PLTRST),
// I2C
// T_SDA
PAD_CFG_NF(GPP_C16, NONE, DEEP, NF1),
// T_SCL
PAD_CFG_NF(GPP_C17, NONE, DEEP, NF1),
// NC
PAD_CFG_NC(GPP_C18),
// SWI
PAD_CFG_NC(GPP_C19),
// UART2
// UART2_RXD
PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1),
// UART2_TXD
PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1),
// NC
PAD_CFG_NC(GPP_C22),
// TP_ATTN#
PAD_CFG_GPI_APIC(GPP_C23, NONE, PLTRST, EDGE_SINGLE, INVERT),
// GPP_D
// SPI1
// NC
PAD_CFG_NC(GPP_D0),
// NC
PAD_CFG_NC(GPP_D1),
// NC
PAD_CFG_NC(GPP_D2),
// NC
PAD_CFG_NC(GPP_D3),
// IMGCLKOUT
// NC
PAD_CFG_NC(GPP_D4),
// I2C
// NC
PAD_CFG_NC(GPP_D5),
// NC
PAD_CFG_NC(GPP_D6),
// NC
PAD_CFG_NC(GPP_D7),
// SB_BLON
PAD_CFG_TERM_GPO(GPP_D8, 1, NONE, DEEP),
// GSPI2
// SWI#
_PAD_CFG_STRUCT(GPP_D9, 0x40880100, 0x0000),
// NC
PAD_CFG_NC(GPP_D10),
// RTD3_PCIE_WAKE#
_PAD_CFG_STRUCT(GPP_D11, 0x40880100, 0x3000),
// PCH_GPP_D12
PAD_CFG_NC(GPP_D12),
// UART0
// NC
PAD_CFG_NC(GPP_D13),
// NC
PAD_CFG_NC(GPP_D14),
// NC
PAD_CFG_NC(GPP_D15),
// RTD3_3G_PW R_EN
PAD_CFG_TERM_GPO(GPP_D16, 1, NONE, PWROK),
// DMIC
// NC
PAD_CFG_NC(GPP_D17),
// NC
PAD_CFG_NC(GPP_D18),
// GPPC_DMIC_CLK
PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1),
// GPPC_DMIC_DATA
PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1),
// SPI1
// TPM_DET#
PAD_CFG_NC(GPP_D21),
// TPM_TCM_Detect
PAD_CFG_NC(GPP_D22),
// I2S
// NC
PAD_CFG_NC(GPP_D23),
// GPP_E
// SATA
// PCH_GPP_E0 with pull-up
PAD_CFG_NC(GPP_E0),
// SATA_ODD_PRSNT#
PAD_CFG_NC(GPP_E1),
// SATAGP2
PAD_CFG_NF(GPP_E2, UP_20K, DEEP, NF1),
// CPU Misc
// NC
PAD_CFG_NC(GPP_E3),
// DEVSLP
// NC
PAD_CFG_NC(GPP_E4),
// NC
PAD_CFG_NC(GPP_E5),
// DEVSLP2
PAD_CFG_NF(GPP_E6, NONE, DEEP, NF1),
// CPU Misc
// NC
PAD_CFG_NC(GPP_E7),
// SATA
// PCH_SATAHDD_LED#
PAD_CFG_NF(GPP_E8, NONE, DEEP, NF1),
// USB2
// GP_BSSB_CLK
PAD_CFG_NC(GPP_E9),
// GPP_E10
PAD_CFG_NC(GPP_E10),
// GPP_E11
PAD_CFG_NC(GPP_E11),
// USB_OC#78
PAD_CFG_NC(GPP_E12),
// Display Signals
// MUX_HPD
PAD_CFG_NF(GPP_E13, NONE, DEEP, NF1),
// HDMI_HPD
PAD_CFG_NF(GPP_E14, NONE, DEEP, NF1),
// SMI#
_PAD_CFG_STRUCT(GPP_E15, 0x42840100, 0x0),
// SCI#
_PAD_CFG_STRUCT(GPP_E16, 0x80880100, 0x0000),
// EDP_HPD
PAD_CFG_NF(GPP_E17, NONE, DEEP, NF1),
// MDP_CTRLCLK
PAD_CFG_NF(GPP_E18, NONE, DEEP, NF1),
// MDP_CTRLDATA
PAD_CFG_NF(GPP_E19, NONE, DEEP, NF1),
// HDMI_CTRLCLK
PAD_CFG_NF(GPP_E20, NONE, DEEP, NF1),
// HDMI_CTRLDATA
PAD_CFG_NF(GPP_E21, NONE, DEEP, NF1),
// NC
PAD_CFG_NC(GPP_E22),
// NC
PAD_CFG_NC(GPP_E23),
// GPP_F
// CNVI
// CNVI_GNSS_PA_BLANKING
PAD_CFG_NF(GPP_F0, NONE, DEEP, NF1),
// GPIO
// NC
PAD_CFG_NC(GPP_F1),
// NC
PAD_CFG_NC(GPP_F2),
// NC
PAD_CFG_NC(GPP_F3),
// CNVI
// CNVI_BRI_DT
PAD_CFG_NF(GPP_F4, NONE, DEEP, NF1),
// CNVI_BRI_RSP
PAD_CFG_NF(GPP_F5, UP_20K, DEEP, NF1),
// CNVI_RGI_DT
PAD_CFG_NF(GPP_F6, NONE, DEEP, NF1),
// CNVI_RGI_RSP
PAD_CFG_NF(GPP_F7, UP_20K, DEEP, NF1),
// CNVI_MFUART2_RXD
PAD_CFG_NF(GPP_F8, NONE, DEEP, NF1),
// CNVI_MFUART2_TXD
PAD_CFG_NF(GPP_F9, NONE, DEEP, NF1),
// GPIO
// NC
PAD_CFG_NC(GPP_F10),
// EMMC
// NC
PAD_CFG_NC(GPP_F11),
// NC
PAD_CFG_NC(GPP_F12),
// NC
PAD_CFG_NC(GPP_F13),
// NC
PAD_CFG_NC(GPP_F14),
// NC
PAD_CFG_NC(GPP_F15),
// NC
PAD_CFG_NC(GPP_F16),
// NC
PAD_CFG_NC(GPP_F17),
// NC
PAD_CFG_NC(GPP_F18),
// NC
PAD_CFG_NC(GPP_F19),
// NC
PAD_CFG_NC(GPP_F20),
// NC
PAD_CFG_NC(GPP_F21),
// NC
PAD_CFG_NC(GPP_F22),
// A4WP
// A4WP_PRESENT
PAD_CFG_GPI(GPP_F23, DN_20K, DEEP),
// GPP_G
// SD
// EDP_DET
PAD_CFG_NC(GPP_G0),
// NC
PAD_CFG_NC(GPP_G1),
// NC
PAD_CFG_NC(GPP_G2),
// ASM1543_I_SEL0
PAD_CFG_NC(GPP_G3),
// ASM1543_I_SEL1
PAD_CFG_NC(GPP_G4),
// BOARD_ID
PAD_CFG_NC(GPP_G5),
// NC
PAD_CFG_NC(GPP_G6),
// TBT_Detect
PAD_CFG_NC(GPP_G7),
// GPP_H
// CNVI
// NC
PAD_CFG_NC(GPP_H0),
// CNVI_RST#
PAD_CFG_NF(GPP_H1, NONE, DEEP, NF3),
// CNVI_CLKREQ
PAD_CFG_NF(GPP_H2, NONE, DEEP, NF3),
// NC
PAD_CFG_NC(GPP_H3),
// I2C
// T23
PAD_CFG_NC(GPP_H4),
// T22
PAD_CFG_NC(GPP_H5),
// NC
PAD_CFG_NC(GPP_H6),
// NC
PAD_CFG_NC(GPP_H7),
// NC
PAD_CFG_NC(GPP_H8),
// NC
PAD_CFG_NC(GPP_H9),
// I2C
// NC
PAD_CFG_NC(GPP_H10),
// NC
PAD_CFG_NC(GPP_H11),
// PCIE
// NC
PAD_CFG_NC(GPP_H12),
// NC
PAD_CFG_NC(GPP_H13),
// G_INT1
PAD_CFG_NC(GPP_H14),
// NC
PAD_CFG_NC(GPP_H15),
// Display Signals
// NC
PAD_CFG_NC(GPP_H16),
// NC
PAD_CFG_NC(GPP_H17),
// CPU Power
// CPU_C10_GATE#
PAD_CFG_NF(GPP_H18, NONE, DEEP, NF1),
// TIMESYNC
// NC
PAD_CFG_NC(GPP_H19),
// IMGCLKOUT
// NC
PAD_CFG_NC(GPP_H20),
// GPIO
// GPPC_H21
PAD_CFG_NC(GPP_H21),
// TBT_RTD3_PWR_EN_R
PAD_NC(GPP_H22, NONE),
// NC, WIGIG_PEWAKE
PAD_CFG_NC(GPP_H23),
};
#endif
#endif

View File

@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/ramstage.h>
#include "gpio.h"
void mainboard_silicon_init_params(FSP_S_CONFIG *params)
{
/* Configure pads prior to SiliconInit() in case there's any
* dependencies during hardware initialization. */
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}

View File

@ -0,0 +1,84 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/cnl_memcfg_init.h>
#include <soc/romstage.h>
static const struct cnl_mb_cfg memcfg = {
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
.spd[0] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa0},
},
.spd[1] = {.read_type = NOT_EXISTING},
.spd[2] = {
.read_type = READ_SMBUS,
.spd_spec = {.spd_smbus_address = 0xa4},
},
.spd[3] = {.read_type = NOT_EXISTING},
/*
* For each channel, there are 3 sets of DQ byte mappings,
* where each set has a package 0 and a package 1 value (package 0
* represents the first 64-bit lpddr4 chip combination, and package 1
* represents the second 64-bit lpddr4 chip combination).
* The first three sets are for CLK, CMD, and CTL.
* The fsp package actually expects 6 sets, but the last 3 sets are
* not used in CNL, so we only define the three sets that are used
* and let the meminit_lpddr4() routine take care of clearing the
* unused fields for the caller.
*/
.dq_map[DDR_CH0] = {
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
.dq_map[DDR_CH1] = {
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
},
/*
* DQS CPU<>DRAM map Ch0 and Ch1. Each array entry represents a
* mapping of a dq bit on the CPU to the bit it's connected to on
* the memory part. The array index represents the dqs bit number
* on the memory part, and the values in the array represent which
* pin on the CPU that DRAM pin connects to.
*/
.dqs_map[DDR_CH0] = {0, 1, 2, 3, 4, 5, 6, 7},
.dqs_map[DDR_CH1] = {1, 0, 2, 3, 4, 5, 6, 7},
/*
* Rcomp resistor values. These values represent the resistance in
* ohms of the three rcomp resistors attached to the DDR_COMP_0,
* DDR_COMP_1, and DDR_COMP_2 pins on the DRAM.
*/
.rcomp_resistor = { 121, 81, 100 },
/*
* Rcomp target values. These will typically be the following
* values for Cannon Lake : { 80, 40, 40, 40, 30 }
*/
.rcomp_targets = { 100, 40, 20, 20, 26 },
/*
* Indicates whether memory is interleaved.
* Set to 1 for an interleaved design,
* set to 0 for non-interleaved design.
*/
.dq_pins_interleaved = 1,
/*
* VREF_CA configuration.
* Set to 0 VREF_CA goes to both CH_A and CH_B,
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
*/
.vref_ca_config = 2,
/* Early Command Training */
.ect = 0,
};
void mainboard_memory_init_params(FSPM_UPD *memupd)
{
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
}

View File

@ -0,0 +1,48 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*/
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek ALC293 */
0x10ec0293, /* Vendor ID */
0x15581404, /* Subsystem ID */
12, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x15581404),
AZALIA_PIN_CFG(0, 0x12, 0x90a60140),
AZALIA_PIN_CFG(0, 0x13, 0x40000000),
AZALIA_PIN_CFG(0, 0x14, 0x90170110),
AZALIA_PIN_CFG(0, 0x15, 0x02211020),
AZALIA_PIN_CFG(0, 0x16, 0x411111f0),
AZALIA_PIN_CFG(0, 0x18, 0x02a11050),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
AZALIA_PIN_CFG(0, 0x1e, 0x02451130),
/* Intel GPU HDMI */
0x8086280b, /* Vendor ID */
0x80860101, /* Subsystem ID */
4, /* Number of entries */
AZALIA_SUBVENDOR(2, 0x80860101),
AZALIA_PIN_CFG(2, 0x05, 0x18560010),
AZALIA_PIN_CFG(2, 0x06, 0x18560010),
AZALIA_PIN_CFG(2, 0x07, 0x18560010),
};
const u32 pc_beep_verbs[] = {};
AZALIA_ARRAY_SIZES;

View File

@ -0,0 +1,15 @@
chip soc/intel/cannonlake
device domain 0 on
subsystemid 0x1558 0x1404 inherit
device pci 15.0 on
chip drivers/i2c/hid
register "generic.hid" = ""PNP0C50""
register "generic.desc" = ""Synaptics Touchpad""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_C23_IRQ)"
register "generic.probed" = "1"
register "hid_desc_reg_offset" = "0x20"
device i2c 2c on end
end
end # I2C #0
end
end

View File

@ -0,0 +1,48 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2019 System76
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*/
#include <device/azalia_device.h>
const u32 cim_verb_data[] = {
/* Realtek ALC293 */
0x10ec0293, /* Vendor ID */
0x15581403, /* Subsystem ID */
12, /* Number of entries */
AZALIA_SUBVENDOR(0, 0x15581403),
AZALIA_PIN_CFG(0, 0x12, 0x90a60130),
AZALIA_PIN_CFG(0, 0x13, 0x40000000),
AZALIA_PIN_CFG(0, 0x14, 0x90170110),
AZALIA_PIN_CFG(0, 0x15, 0x02211020),
AZALIA_PIN_CFG(0, 0x16, 0x411111f0),
AZALIA_PIN_CFG(0, 0x18, 0x02a11040),
AZALIA_PIN_CFG(0, 0x19, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
/* Intel GPU HDMI */
0x8086280b, /* Vendor ID */
0x80860101, /* Subsystem ID */
4, /* Number of entries */
AZALIA_SUBVENDOR(2, 0x80860101),
AZALIA_PIN_CFG(2, 0x05, 0x18560010),
AZALIA_PIN_CFG(2, 0x06, 0x18560010),
AZALIA_PIN_CFG(2, 0x07, 0x18560010),
};
const u32 pc_beep_verbs[] = {};
AZALIA_ARRAY_SIZES;

View File

@ -0,0 +1,8 @@
chip soc/intel/cannonlake
device domain 0 on
subsystemid 0x1558 0x1403 inherit
device pci 15.0 on
# I2C HID not supported on galp4
end # I2C #0
end
end

View File

@ -0,0 +1,73 @@
if BOARD_SYSTEM76_DARP7
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_16384
select DRIVERS_I2C_HID
select DRIVERS_INTEL_PMC
select DRIVERS_INTEL_USB4_RETIMER
select EC_SYSTEM76_EC
select EC_SYSTEM76_EC_BAT_THRESHOLDS
select EC_SYSTEM76_EC_COLOR_KEYBOARD
select HAVE_ACPI_TABLES
select HAVE_SMI_HANDLER
select INTEL_GMA_HAVE_VBT
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM2
select NO_UART_ON_SUPERIO
select PCIEXP_HOTPLUG
select SOC_INTEL_TIGERLAKE
select SOC_INTEL_COMMON_BLOCK_HDA
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
select SPD_READ_BY_WORD
select SYSTEM_TYPE_LAPTOP
select TPM_RDRESP_NEED_DELAY
config MAINBOARD_DIR
string
default "system76/darp7"
config MAINBOARD_PART_NUMBER
string
default "darp7"
config MAINBOARD_SMBIOS_PRODUCT_NAME
string
default "Darter Pro"
config MAINBOARD_VERSION
string
default "darp7"
#TODO: subsystem IDs
config CBFS_SIZE
hex
default 0xA00000
config CONSOLE_POST
bool
default y
config DIMM_MAX
int
default 4 # Hack to make soc code work
config DIMM_SPD_SIZE
int
default 512
config MAX_CPUS
int
default 8
config POST_DEVICE
bool
default n
config UART_FOR_CONSOLE
int
default 2
endif

View File

@ -0,0 +1,2 @@
config BOARD_SYSTEM76_DARP7
bool "darp7"

View File

@ -0,0 +1,3 @@
bootblock-y += bootblock.c
ramstage-y += ramstage.c
ramstage-y += hda_verb.c

View File

@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <drivers/intel/gma/acpi/gma.asl>
Scope (GFX0) {
Name (BRIG, Package (22) {
40, /* default AC */
40, /* default Battery */
5,
10,
15,
20,
25,
30,
35,
40,
45,
50,
55,
60,
65,
70,
75,
80,
85,
90,
95,
100
})
}

View File

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#define EC_GPE_SCI 0x6E
#define EC_GPE_SWI 0x6E
#include <ec/system76/ec/acpi/ec.asl>
Scope (\_SB) {
#include "sleep.asl"
Scope (PCI0) {
#include "backlight.asl"
}
}

View File

@ -0,0 +1,46 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <intelblocks/gpio.h>
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_ENABLE_GPIO_PM_CONFIG)
}
/*
* 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_ENABLE_GPIO_PM_CONFIG)
} Else {
/* S0ix Exit */
PGPM (0)
}
}

View File

@ -0,0 +1,8 @@
Vendor name: System76
Board name: darp7
Category: laptop
Release year: 2021
ROM package: SOIC-8
ROM protocol: SPI
ROM socketed: n
Flashrom support: y

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
#include <gpio.h>
#include "gpio.h"
void bootblock_mainboard_init(void) {
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}

View File

@ -0,0 +1,362 @@
chip soc/intel/tigerlake
register "common_soc_config" = "{
.chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
// Touchpad I2C bus
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 80,
.fall_time_ns = 110,
},
}"
# ACPI (soc/intel/tigerlake/acpi.c)
# Disable DPTF
register "dptf_enable" = "0"
# Enable Enhanced Intel SpeedStep
register "eist_enable" = "1"
# Enable s0ix, required for TGL-U
register "s0ix_enable" = "1"
# CPU (soc/intel/tigerlake/cpu.c)
# Power limits
register "power_limits_config[POWER_LIMITS_U_4_CORE]" = "{
// /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
.tdp_pl1_override = 28,
// /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
.tdp_pl2_override = 51,
}"
register "power_limits_config[POWER_LIMITS_U_2_CORE]" = "{
// /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
.tdp_pl1_override = 28,
// /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
.tdp_pl2_override = 51,
}"
# Finalize (soc/intel/tigerlake/finalize.c)
# PM Timer Disabled, saves power
register "PmTimerDisabled" = "1"
# FSP Memory (soc/intel/tigerlake/romstage/fsp_params.c)
# Enable C6 DRAM
register "enable_c6dram" = "1"
# System Agent dynamic frequency support
register "SaGv" = "SaGv_Enabled"
# FSP Silicon (soc/intel/tigerlake/fsp_params.c)
# Acoustic settings
register "AcousticNoiseMitigation" = "1"
register "SlowSlewRate[VR_DOMAIN_IA]" = "SLEW_FAST_8"
register "SlowSlewRate[VR_DOMAIN_GT]" = "SLEW_FAST_8"
register "SlowSlewRate[VR_DOMAIN_SA]" = "SLEW_FAST_8"
register "SlowSlewRate[VR_DOMAIN_VLCC]" = "SLEW_FAST_8"
register "FastPkgCRampDisable[VR_DOMAIN_IA]" = "1"
register "FastPkgCRampDisable[VR_DOMAIN_GT]" = "1"
register "FastPkgCRampDisable[VR_DOMAIN_SA]" = "1"
register "FastPkgCRampDisable[VR_DOMAIN_VLCC]" = "1"
# FIVR configuration
# Read EXT_RAIL_CONFIG to determine bitmaps
# sudo devmem2 0xfe0011b8
# 0x0
# Read EXT_V1P05_VR_CONFIG
# sudo devmem2 0xfe0011c0
# 0x1a42000
# Read EXT_VNN_VR_CONFIG0
# sudo devmem2 0xfe0011c4
# 0x1a42000
# TODO: v1p05 voltage and vnn icc max?
register "ext_fivr_settings" = "{
.configure_ext_fivr = 1,
.v1p05_enable_bitmap = 0,
.vnn_enable_bitmap = 0,
.v1p05_supported_voltage_bitmap = 0,
.vnn_supported_voltage_bitmap = 0,
.v1p05_icc_max_ma = 500,
.vnn_sx_voltage_mv = 1050,
}"
# Read LPM_EN, make sure to invert the bits
# sudo devmem2 0xfe001c78
# 0x9
register "LpmStateDisableMask" = "
LPM_S0i2_1 |
LPM_S0i2_2 |
LPM_S0i3_1 |
LPM_S0i3_2 |
LPM_S0i3_3 |
LPM_S0i3_4
"
# Thermal
# rdmsr --bitfield 31:24 --decimal 0x1A2
register "tcc_offset" = "12"
# PM Util (soc/intel/tigerlake/pmutil.c)
# GPE configuration
# sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG)
# 0x432
register "pmc_gpe0_dw0" = "PMC_GPP_A"
register "pmc_gpe0_dw1" = "PMC_GPP_R"
register "pmc_gpe0_dw2" = "PMC_GPD"
# Actual device tree
device cpu_cluster 0 on
device lapic 0 on end
end
device domain 0 on
#From CPU EDS(575683)
device ref system_agent on end
device ref igpu on
# DDIA is eDP
register "DdiPortAConfig" = "1"
register "DdiPortAHpd" = "1"
register "DdiPortADdc" = "0"
# DDIB is HDMI
register "DdiPortBConfig" = "0"
register "DdiPortBHpd" = "1"
register "DdiPortBDdc" = "1"
register "gfx" = "GMA_STATIC_DISPLAYS(0)"
end
device ref dptf on
register "Device4Enable" = "1"
end
device ref peg on
# PCIe PEG0 x4, Clock 0 (SSD1)
register "PcieClkSrcUsage[0]" = "0x40"
register "PcieClkSrcClkReq[0]" = "0"
#TODO: causes failure on resume
# chip soc/intel/common/block/pcie/rtd3
# register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_B16)" # SSD1_PWR_EN
# register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D13)" # GPP_D13_SSD1_PLT_RST#
# #TODO: Support disable/enable CPU RP clock
# register "srcclk_pin" = "-1" # SSD1_CLKREQ#
# device generic 0 on end
# end
#TODO: Hybrid storage mode?
register "HybridStorageMode" = "0"
end
device ref tbt_pcie_rp0 on end # J_TYPEC2
device ref gna on end
device ref north_xhci on # J_TYPEC2
register "TcssXhciEn" = "1"
chip drivers/usb/acpi
device ref tcss_root_hub on
chip drivers/usb/acpi
register "desc" = ""USB3 J_TYPEC2""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "group" = "ACPI_PLD_GROUP(1, 3)"
device ref tcss_usb3_port1 on end
end
end
end
end
device ref tbt_dma0 on # J_TYPEC2
chip drivers/intel/usb4/retimer
register "power_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A23)"
device generic 0 on end
end
end
# From PCH EDS(576591)
device ref cnvi_bt on end
device ref south_xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # UJ_USB1
register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # J_USB3_1
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC2
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 CH0
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB3_1
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 CH1
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on
chip drivers/usb/acpi
register "desc" = ""USB2 UJ_USB1""
register "type" = "UPC_TYPE_A"
device ref usb2_port1 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 J_TYPEC1""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "group" = "ACPI_PLD_GROUP(1, 2)"
device ref usb2_port2 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 J_USB3_1""
register "type" = "UPC_TYPE_A"
register "group" = "ACPI_PLD_GROUP(1, 1)"
device ref usb2_port3 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Fingerprint""
register "type" = "UPC_TYPE_INTERNAL"
device ref usb2_port5 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 J_TYPEC2""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "group" = "ACPI_PLD_GROUP(1, 3)"
device ref usb2_port6 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Camera""
register "type" = "UPC_TYPE_INTERNAL"
device ref usb2_port7 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Bluetooth""
register "type" = "UPC_TYPE_INTERNAL"
device ref usb2_port10 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 J_TYPEC1 CH0""
register "type" = "UPC_TYPE_A"
register "group" = "ACPI_PLD_GROUP(1, 2)"
device ref usb3_port2 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 J_USB3_1""
register "type" = "UPC_TYPE_A"
register "group" = "ACPI_PLD_GROUP(1, 1)"
device ref usb3_port3 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 J_TYPEC1 CH1""
register "type" = "UPC_TYPE_A"
#TODO register "group" = "ACPI_PLD_GROUP(1, 2)"
device ref usb3_port4 on end
end
end
end
end
device ref shared_ram on end
device ref cnvi_wifi on
chip drivers/wifi/generic
register "wake" = "GPE0_PME_B0"
device generic 0 on end
end
end
device ref i2c0 on
# Touchpad I2C bus
register "SerialIoI2cMode[PchSerialIoIndexI2C0]" = "PchSerialIoPci"
chip drivers/i2c/hid
register "generic.hid" = ""PNP0C50""
register "generic.desc" = ""FocalTech Touchpad""
register "generic.irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPP_B3)"
register "generic.probed" = "1"
register "hid_desc_reg_offset" = "0x01"
device i2c 38 on end
end
end
device ref i2c1 on
#TODO: USB-PD?
register "SerialIoI2cMode[PchSerialIoIndexI2C1]" = "PchSerialIoPci"
end
device ref heci1 on
#TODO Disable ME and HECI
register "HeciEnabled" = "1"
end
device ref uart2 on
# Debug console
register "SerialIoUartMode[PchSerialIoIndexUART2]" = "PchSerialIoSkipInit"
end
device ref sata on
# SATA1 (SSD0)
register "SataPortsEnable[1]" = "1"
register "SataPortsDevSlp[1]" = "1"
register "SataPortsEnableDitoConfig[1]" = "1"
register "SataSalpSupport" = "1"
end
device ref pcie_rp6 on
# PCIe root port #6 x1, Clock 2 (CARD)
register "PcieRpEnable[5]" = "1"
register "PcieRpLtrEnable[5]" = "1"
register "PcieClkSrcUsage[2]" = "5"
register "PcieClkSrcClkReq[2]" = "2"
end
device ref pcie_rp7 on
# PCIe root port #7 x1, Clock 3 (GLAN)
register "PcieRpEnable[6]" = "1"
register "PcieRpLtrEnable[6]" = "1"
register "PcieClkSrcUsage[3]" = "6"
register "PcieClkSrcClkReq[3]" = "3"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F9)" # GPIO_LAN_EN
#TODO: should this be GPIO_LANRTD3 or LAN_PLT_RST# ?
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_F7)" # GPIO_LANRTD3
register "srcclk_pin" = "3" # GLAN_CLKREQ#
device generic 0 on end
end
end
device ref pcie_rp8 on
# PCIe root port #8 x1, Clock 1 (WLAN)
register "PcieRpEnable[7]" = "1"
register "PcieRpLtrEnable[7]" = "1"
register "PcieClkSrcUsage[1]" = "7"
register "PcieClkSrcClkReq[1]" = "1"
end
device ref pcie_rp9 on
# PCIe root port #9 x4, Clock 4 (SSD0)
register "PcieRpEnable[8]" = "1"
register "PcieRpLtrEnable[8]" = "1"
register "PcieClkSrcUsage[4]" = "8"
register "PcieClkSrcClkReq[4]" = "4"
chip soc/intel/common/block/pcie/rtd3
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D14)" # SSD_PWR_EN
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_H0)" # GPP_H0_RTD3
register "srcclk_pin" = "4"
device generic 0 on end
end
end
device ref pch_espi on
# LPC configuration from lspci -s 1f.0 -xxx
# Address 0x84: Decode 0x80 - 0x8F (Port 80)
register "gen1_dec" = "0x000c0081"
# Address 0x88: Decode 0x68 - 0x6F (PMC)
register "gen2_dec" = "0x00040069"
# Address 0x8C: Decode 0xE00 - 0xEFF (AP/EC command)
register "gen3_dec" = "0x00fc0E01"
# Address 0x90: Decode 0xF00 - 0xFFF (AP/EC debug)
register "gen4_dec" = "0x00fc0F01"
# LPC TPM
chip drivers/pc80/tpm
device pnp 0c31.0 on end
end
end
device ref p2sb on end
device ref pmc hidden
# The pmc_mux chip driver is a placeholder for the
# PMC.MUX device in the ACPI hierarchy.
chip drivers/intel/pmc_mux
device generic 0 on
chip drivers/intel/pmc_mux/conn
# J_TYPEC2
register "usb2_port_number" = "6"
register "usb3_port_number" = "1"
# SBU & HSL follow CC
device generic 0 alias conn0 on end
end
end
end
end
device ref hda on
register "PchHdaAudioLinkHdaEnable" = "1"
end
device ref smbus on
register "SmbusEnable" = "1"
end
device ref fast_spi on end
end
end

View File

@ -0,0 +1,41 @@
/* SPDX-License-Identifier: GPL-2.0-only */
//TODO: cleaner solution for ACPI brightness
#define SYSTEM76_ACPI_NO_GFX0
#include <acpi/acpi.h>
DefinitionBlock(
"dsdt.aml",
"DSDT",
ACPI_DSDT_REV_2,
OEM_ID,
ACPI_TABLE_CREATOR,
0x20110725 // OEM revision
)
{
#include <soc/intel/common/block/acpi/acpi/platform.asl>
// global NVS and variables
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
// CPU
#include <cpu/intel/common/acpi/cpu.asl>
Scope (\_SB) {
Device (PCI0)
{
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
#include <soc/intel/tigerlake/acpi/southbridge.asl>
#include <soc/intel/tigerlake/acpi/tcss.asl>
}
}
Scope (\_SB.PCI0.LPCB) {
#include <drivers/pc80/pc/ps2_controller.asl>
}
#include <southbridge/intel/common/acpi/sleepstates.asl>
#include "acpi/mainboard.asl"
}

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