Ferass EL HAFIDI has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63587 )
Change subject: apple/macbook21: configure the clockgen and add C3 CPU state ......................................................................
apple/macbook21: configure the clockgen and add C3 CPU state
To add the C3 CPU state, the clockgen has to be reconfigured. The values are taken from the vendor firmware with i2cdump.
Change-Id: Ib97f95599fbdf66aa55e936bdcb9cc0cd69b3824 Signed-off-by: Ferass 'Vitali64' EL HAFIDI vitali64pmemail@protonmail.com --- M src/mainboard/apple/macbook21/Kconfig M src/mainboard/apple/macbook21/cstates.c M src/mainboard/apple/macbook21/devicetree.cb 3 files changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/63587/1
diff --git a/src/mainboard/apple/macbook21/Kconfig b/src/mainboard/apple/macbook21/Kconfig index 5f5ffde..27377b7 100644 --- a/src/mainboard/apple/macbook21/Kconfig +++ b/src/mainboard/apple/macbook21/Kconfig @@ -16,6 +16,7 @@ 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 13d06f0..076a096 100644 --- a/src/mainboard/apple/macbook21/cstates.c +++ b/src/mainboard/apple/macbook21/cstates.c @@ -29,6 +29,18 @@ .addrh = 0, } }, + { + .ctype = 3, + .latency = 1, + .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 bcce778..1626808 100644 --- a/src/mainboard/apple/macbook21/devicetree.cb +++ b/src/mainboard/apple/macbook21/devicetree.cb @@ -104,6 +104,11 @@ 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