From 238b10a5f7fb3ca6c4aca37a14f34cafa4306ddf Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 19 May 2020 14:32:07 -0700 Subject: google/trogdor: Fix ram_code and sku_id strappings I'm not quite sure what happened when we first added the code for Trogdor strappings but something clearly seems to be wrong. First of all, on newer schematics the RAM_ID_1 pin is actually pin 19, not pin 91. It only used to be 91 on rev0. Whether that was an intentional change or someone just swapped the digits on accident at some point, we're not quite sure anymore, but it seems to be 19 going forward so that is what we should be programming. (ram_code wasn't used for anything on Trogdor rev0 so we don't care about adding backwards-compatibility for that.) The sku_id pins are also somewhat out of whack: first of all, a new SKU_ID_2 pin was added for rev1 that wasn't there on rev0. Second, SKU_ID_0 is not GPIO_114. In fact, it has never been GPIO_114. I have no idea how that number got there. Anyway, fix it. (Like with the ram_code, SKU IDs were also not used for rev0 so we won't make this backwards-compatible.) Signed-off-by: Julius Werner Change-Id: Ia14ec74ec2f16ce2661f89d0d597a5477297ab69 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41545 Tested-by: build bot (Jenkins) Reviewed-by: Philip Chen --- src/mainboard/google/trogdor/boardid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/trogdor/boardid.c b/src/mainboard/google/trogdor/boardid.c index 20aa543244..c1a48925fa 100644 --- a/src/mainboard/google/trogdor/boardid.c +++ b/src/mainboard/google/trogdor/boardid.c @@ -19,7 +19,7 @@ uint32_t ram_code(void) { static uint32_t id = UNDEFINED_STRAPPING_ID; - const gpio_t pins[] = {[2] = GPIO(13), [1] = GPIO(91), [0] = GPIO(29)}; + const gpio_t pins[] = {[2] = GPIO(13), [1] = GPIO(19), [0] = GPIO(29)}; if (id == UNDEFINED_STRAPPING_ID) id = gpio_base2_value(pins, ARRAY_SIZE(pins)); @@ -31,7 +31,7 @@ uint32_t sku_id(void) { static uint32_t id = UNDEFINED_STRAPPING_ID; - const gpio_t pins[] = {[1] = GPIO(90), [0] = GPIO(114)}; + const gpio_t pins[] = {[2] = GPIO(20), [1] = GPIO(90), [0] = GPIO(105)}; if (id == UNDEFINED_STRAPPING_ID) id = gpio_base2_value(pins, ARRAY_SIZE(pins)); -- cgit v1.2.3