Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41503 )
Change subject: mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code ......................................................................
mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code
Kukui (eMCP, discrete) and Jacuzzi (discrete) are currently sharing same memory code table with only one ADC (12 levels) and we are running out of RAM IDs.
Considering there may be lots of requests of adding new second source DRAM in future, we decided to increase the RAM code mapping table instead of doing model-specific table. Now both ADC 2 and 4 will be RAM code, and SKU straps will be moved from AP (ADC 2) to EC.
All existing devices should have grounded both AP SKU and EC SKU (e.g., 0) so there should be no backward compatible issues.
BUG=b:156691665 TEST=make; boots on Kukui BRANCH=kukui
Change-Id: Ib4f4866aa26fd9ea797c1b74b6b59349f1898ccd Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/boardid.c 1 file changed, 9 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/41503/1
diff --git a/src/mainboard/google/kukui/boardid.c b/src/mainboard/google/kukui/boardid.c index 1b610ed..a2487b4 100644 --- a/src/mainboard/google/kukui/boardid.c +++ b/src/mainboard/google/kukui/boardid.c @@ -26,8 +26,8 @@
enum { LCM_ID_CHANNEL = 2, /* ID of LCD Module on schematics. */ - RAM_ID_CHANNEL = 3, - SKU_ID_CHANNEL = 4, + RAM_L_ID_CHANNEL = 3, /* Low 4 bits of RAM code */ + RAM_H_ID_CHANNEL = 4, /* High 4 bits of RAM code */ };
static const int ram_voltages[ADC_LEVELS] = { @@ -64,8 +64,8 @@
static const int *adc_voltages[] = { [LCM_ID_CHANNEL] = lcm_voltages, - [RAM_ID_CHANNEL] = ram_voltages, - [SKU_ID_CHANNEL] = ram_voltages, /* SKU ID is sharing RAM voltages. */ + [RAM_L_ID_CHANNEL] = ram_voltages, + [RAM_H_ID_CHANNEL] = ram_voltages, };
static uint32_t get_adc_index(unsigned int channel) @@ -101,7 +101,7 @@ return cached_sku_id; }
- /* Quirk for Kukui: All Rev1/Sku0 had incorrectly set SKU_ID=1. */ + /* Quirk for Kukui: All Rev1/Sku0 had incorrectly set SKU ID=1. */ if (CONFIG(BOARD_GOOGLE_KUKUI)) { if (board_id() == 1) { cached_sku_id = 0; @@ -112,10 +112,10 @@ /* * The SKU (later used for device tree matching) is combined from: * ADC2[4bit/H] = straps on LCD module (type of panel). - * ADC4[4bit/L] = SKU ID from board straps. + * EC [4bit/L] = straps on EC SKU ID straps. */ cached_sku_id = (get_adc_index(LCM_ID_CHANNEL) << 4 | - get_adc_index(SKU_ID_CHANNEL)); + google_chromeec_get_sku_id()); return cached_sku_id; }
@@ -124,6 +124,7 @@ static uint32_t cached_ram_code = BOARD_ID_INIT;
if (cached_ram_code == BOARD_ID_INIT) - cached_ram_code = get_adc_index(RAM_ID_CHANNEL); + cached_ram_code = (get_adc_index(RAM_H_ID_CHANNEL) << 4 | + get_adc_index(RAM_L_ID_CHANNEL)); return cached_ram_code; }
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41503 )
Change subject: mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code ......................................................................
Patch Set 2: Code-Review+1
Chen-Tsung Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41503 )
Change subject: mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code ......................................................................
Patch Set 2:
Hi Hung-te, Are we planing to apply this solution to both Kukui and Jacuzzi? Or Jacuzzi only? I create an issue for more detail about this. https://b.corp.google.com/issues/160443423
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41503 )
Change subject: mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code ......................................................................
Patch Set 2: Code-Review-1
We then realized EC currently cannot access SKU ADC, so moving AP SKU to EC will cause problems. So this approach won't be used.
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41503 )
Change subject: mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code ......................................................................
Patch Set 2: -Code-Review
Patch Set 2: Code-Review-1
We then realized EC currently cannot access SKU ADC, so moving AP SKU to EC will cause problems. So this approach won't be used.
Are you going to abandon this?
Hung-Te Lin has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/41503 )
Change subject: mb/google/kukui: Change AP ADC channel 4 to be high bits of RAM code ......................................................................
Abandoned
Replaced by model-specific tables.