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 <jwerner@chromium.org>
Change-Id: Ia14ec74ec2f16ce2661f89d0d597a5477297ab69
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41545
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philip Chen <philipchen@google.com>
This commit is contained in:
Julius Werner 2020-05-19 14:32:07 -07:00
parent f572d5ed0b
commit 238b10a5f7
1 changed files with 2 additions and 2 deletions

View File

@ -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));