summaryrefslogtreecommitdiff
path: root/config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-04-26 09:37:01 +0100
committerLeah Rowe <leah@libreboot.org>2024-04-26 09:55:55 +0100
commita2f423535840382d72bfa1ae1e1cb5c06e4f8604 (patch)
tree0074b5804167bd274c1c29672416ca0d03d96d28 /config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch
parent64177dbb8e7ff9ca9c7ad847c137398f6a67cfcf (diff)
i945: switch boards to 20230625 coreboot revision
On T60 with Libreboot 20231106 and the GRUB payload, a user reported this error in GRUB when a battery was connected: "alloc magic is broken at 0x7b1aedf0: 0" This error disappears when a battery is not connected, or when using Libreboot 20230625. The issue has persisted through to LIbreboot 20240225 and after, and I believe the issue will be somewhere in coreboot, not in GRUB itself. For now, switch i945 laptops (X60, T60, Macbook2,1) back to the February 2023 coreboot revision used in Libreboot 20230625. A bisect can be done before the next Libreboot release, ETA May 2024, if time permits. Otherwise, this revert should solve the problem for now, at least so far as Libreboot is concerned. The following coreboot patches have been backported: commit 29030d0f3dad2ec6b86000dfe2c8e951ae80bf94 Author: Bill Xie <persmule@hardenedlinux.org> Date: Sat Oct 7 01:32:51 2023 +0800 drivers/pc80/rtc/option.c: Stop resetting CMOS during s3 resume Further patches from upstream: commit 432e92688eca0e85cbaebca3232f65936b305a98 Author: Bill Xie <persmule@hardenedlinux.org> Date: Fri Nov 3 12:34:01 2023 +0800 drivers/pc80/rtc/option.c: Reset only CMOS range covered by checksum These patches fixed S3 on GM45 machines, though it will be useful on the i945 machines aswell. The reason I'm doing it this way it is because I don't have a battery for my X60 or T60, and my T60 isn't in a very good state either, so I can't reproduce the error myself yet. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch')
-rw-r--r--config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch b/config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch
new file mode 100644
index 00000000..57c32ec7
--- /dev/null
+++ b/config/coreboot/i945/patches/0002-add-c3-and-clockgen-to-apple-macbook21.patch
@@ -0,0 +1,68 @@
+From ff523fd40649b72512b0f1253701509d83ca4a8d Mon Sep 17 00:00:00 2001
+From: Vitali64 <5405891-vitali64yt@users.noreply.gitlab.com>
+Date: Wed, 27 Oct 2021 13:36:01 +0200
+Subject: [PATCH 02/18] add c3 and clockgen to apple/macbook21
+
+---
+ src/mainboard/apple/macbook21/Kconfig | 1 +
+ src/mainboard/apple/macbook21/cstates.c | 13 +++++++++++++
+ src/mainboard/apple/macbook21/devicetree.cb | 6 ++++++
+ 3 files changed, 20 insertions(+)
+
+diff --git a/src/mainboard/apple/macbook21/Kconfig b/src/mainboard/apple/macbook21/Kconfig
+index 5f5ffde588..27377b737c 100644
+--- a/src/mainboard/apple/macbook21/Kconfig
++++ b/src/mainboard/apple/macbook21/Kconfig
+@@ -16,6 +16,7 @@ config BOARD_SPECIFIC_OPTIONS
+ select HAVE_ACPI_TABLES
+ select HAVE_ACPI_RESUME
+ select I945_LVDS
++ select DRIVERS_I2C_CK505
+
+ config MAINBOARD_DIR
+ default "apple/macbook21"
+diff --git a/src/mainboard/apple/macbook21/cstates.c b/src/mainboard/apple/macbook21/cstates.c
+index 13d06f0839..88b8669c61 100644
+--- a/src/mainboard/apple/macbook21/cstates.c
++++ b/src/mainboard/apple/macbook21/cstates.c
+@@ -29,6 +29,19 @@ static const acpi_cstate_t cst_entries[] = {
+ .addrh = 0,
+ }
+ },
++ {
++ .ctype = 3,
++ .latency = 17,
++ .power = 250,
++ .resource = {
++ .space_id = ACPI_ADDRESS_SPACE_FIXED,
++ .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL,
++ .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT,
++ .access_size = ACPI_ACCESS_SIZE_UNDEFINED,
++ .addrl = 0x20,
++ .addrh = 0,
++ }
++ },
+ };
+
+ int get_cst_entries(const acpi_cstate_t **entries)
+diff --git a/src/mainboard/apple/macbook21/devicetree.cb b/src/mainboard/apple/macbook21/devicetree.cb
+index dd701da7ed..5587c48d1f 100644
+--- a/src/mainboard/apple/macbook21/devicetree.cb
++++ b/src/mainboard/apple/macbook21/devicetree.cb
+@@ -100,7 +100,13 @@ chip northbridge/intel/i945
+ end
+ device pci 1f.3 on # SMBUS
+ subsystemid 0x8086 0x7270
++ chip drivers/i2c/ck505
++ register "mask" = "{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }"
++ register "regs" = "{ 0x77, 0x77, 0x2d, 0x00, 0x21, 0x10, 0x3b, 0x06, 0x07, 0x0f, 0xf0, 0x01, 0x1e, 0x7f, 0x80, 0x80, 0x10, 0x08, 0x04, 0x01 }"
++ device i2c 69 on end
++ end
+ end
++
+ end
+ end
+ end
+--
+2.39.2
+