Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Read DRAM population strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build the mainboard.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/1
diff --git a/src/mainboard/google/dedede/romstage.c b/src/mainboard/google/dedede/romstage.c index 9c220d4..ca81785 100644 --- a/src/mainboard/google/dedede/romstage.c +++ b/src/mainboard/google/dedede/romstage.c @@ -6,8 +6,10 @@ */
#include <baseboard/variants.h> +#include <gpio.h> #include <soc/meminit_jsl.h> #include <soc/romstage.h> +#include <variant/gpio.h>
void mainboard_memory_init_params(FSPM_UPD *memupd) { @@ -16,7 +18,7 @@ .read_type = READ_SPD_CBFS, .spd_spec.spd_index = variant_memory_sku(), }; - /* TODO: Read the resistor strap to get number of memory segments. */ - bool half_populated = 0; + bool half_populated = gpio_get(GPIO_MEM_CH_SEL); + memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated); } diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h index dfb2cd1..fff0489 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h @@ -26,4 +26,7 @@ #define GPIO_MEM_CONFIG_2 GPP_C4 #define GPIO_MEM_CONFIG_3 GPP_C5
+/* Memory channel select strap - 0:fully-populated, 1:half-populated */ +#define GPIO_MEM_CH_SEL GPP_S0 + #endif /* __BASEBOARD_GPIO_H__ */
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39812
to look at the new patch set (#2).
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build the mainboard.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 8 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/2
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39812/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39812/2//COMMIT_MSG@13 PS2, Line 13: TEST=Build the mainboard. Yet to test on the board where the strap is not stuffed.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39812/2/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/39812/2/src/mainboard/google/dedede... PS2, Line 351: GPP_S0 This will have to be configured in early_gpio_table as well since it is being used in romstage.
Hello build bot (Jenkins), Furquan Shaikh, Marco Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39812
to look at the new patch set (#3).
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build the mainboard.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 11 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/3
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39812/2/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/39812/2/src/mainboard/google/dedede... PS2, Line 351: GPP_S0
This will have to be configured in early_gpio_table as well since it is being used in romstage.
True, thanks for pointing out.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 3: Code-Review+2
Dtrain Hsu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... File src/mainboard/google/dedede/romstage.c:
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... PS3, Line 21: bool half_populated = gpio_get(GPIO_MEM_CH_SEL); A question for checking GPIO_MEM_CH_SEL behavior. High is for dual-channel and low for single-channel from schematic. Is it correct?
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39812/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39812/3//COMMIT_MSG@9 PS3, Line 9: Configure DRAM population strap GPIO. Read the strap and pass that … according to the schematics.
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h:
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... PS3, Line 29: /* Memory channel select strap - 0:fully-populated, 1:half-populated */ Add one space after each colon?
Hello build bot (Jenkins), Furquan Shaikh, Marco Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39812
to look at the new patch set (#4).
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO according to the schematics. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build the mainboard.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 11 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/4
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/c/coreboot/+/39812/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39812/3//COMMIT_MSG@9 PS3, Line 9: Configure DRAM population strap GPIO. Read the strap and pass that
… according to the schematics.
Done
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... File src/mainboard/google/dedede/romstage.c:
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... PS3, Line 21: bool half_populated = gpio_get(GPIO_MEM_CH_SEL);
A question for checking GPIO_MEM_CH_SEL behavior. […]
Thanks for pointing it out.
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h:
https://review.coreboot.org/c/coreboot/+/39812/3/src/mainboard/google/dedede... PS3, Line 29: /* Memory channel select strap - 0:fully-populated, 1:half-populated */
Add one space after each colon?
Done
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 4: Code-Review+2
Marco Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39812/4/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h:
https://review.coreboot.org/c/coreboot/+/39812/4/src/mainboard/google/dedede... PS4, Line 29: /* Memory channel select strap - 0: fully-populated, 1: half-populated */ 0: half-populated, 1: fully-populated ?
Hello build bot (Jenkins), Furquan Shaikh, Marco Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39812
to look at the new patch set (#5).
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO according to the schematics. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build the mainboard.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 11 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/5
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39812/4/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h:
https://review.coreboot.org/c/coreboot/+/39812/4/src/mainboard/google/dedede... PS4, Line 29: /* Memory channel select strap - 0: fully-populated, 1: half-populated */
0: half-populated, 1: fully-populated ?
Done
Marco Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 5: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 5: Code-Review+2
Hello build bot (Jenkins), Furquan Shaikh, Dtrain Hsu, Marco Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39812
to look at the new patch set (#6).
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO according to the schematics. Configure an internal pull-up to support the boards in which the strap is not populated. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658 TEST=Build and boot the mainboard. Ensure that the strap information is read as expected and passed to FSP.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 11 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/6
Hello build bot (Jenkins), Furquan Shaikh, Dtrain Hsu, Marco Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39812
to look at the new patch set (#7).
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO according to the schematics. Configure an internal pull-up to support the boards in which the strap is not populated. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658, b:154301008 TEST=Build and boot the mainboard. Ensure that the strap information is read as expected and passed to FSP.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 11 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/39812/7
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 7: Code-Review+2
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39812/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39812/2//COMMIT_MSG@13 PS2, Line 13: TEST=Build the mainboard.
Yet to test on the board where the strap is not stuffed.
Done
https://review.coreboot.org/c/coreboot/+/39812/2/src/mainboard/google/dedede... File src/mainboard/google/dedede/variants/baseboard/gpio.c:
https://review.coreboot.org/c/coreboot/+/39812/2/src/mainboard/google/dedede... PS2, Line 351: GPP_S0
True, thanks for pointing out.
Done
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39812 )
Change subject: mb/google/dedede: Read DRAM population strap ......................................................................
mb/google/dedede: Read DRAM population strap
Configure DRAM population strap GPIO according to the schematics. Configure an internal pull-up to support the boards in which the strap is not populated. Read the strap and pass that information to FSP for memory initialization.
BUG=b:152275658, b:154301008 TEST=Build and boot the mainboard. Ensure that the strap information is read as expected and passed to FSP.
Change-Id: I69583f35ffc219bae9ce06bd4ba9898ed0d4d21d Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/39812 Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/dedede/romstage.c M src/mainboard/google/dedede/variants/baseboard/gpio.c M src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h 3 files changed, 11 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/dedede/romstage.c b/src/mainboard/google/dedede/romstage.c index f95e7aa..2efaaf1 100644 --- a/src/mainboard/google/dedede/romstage.c +++ b/src/mainboard/google/dedede/romstage.c @@ -6,8 +6,10 @@ */
#include <baseboard/variants.h> +#include <gpio.h> #include <soc/meminit.h> #include <soc/romstage.h> +#include <variant/gpio.h>
void mainboard_memory_init_params(FSPM_UPD *memupd) { @@ -16,7 +18,7 @@ .read_type = READ_SPD_CBFS, .spd_spec.spd_index = variant_memory_sku(), }; - /* TODO: Read the resistor strap to get number of memory segments. */ - bool half_populated = 0; + bool half_populated = !gpio_get(GPIO_MEM_CH_SEL); + memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated); } diff --git a/src/mainboard/google/dedede/variants/baseboard/gpio.c b/src/mainboard/google/dedede/variants/baseboard/gpio.c index d12d2c4..a4ce97d 100644 --- a/src/mainboard/google/dedede/variants/baseboard/gpio.c +++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c @@ -348,7 +348,7 @@
/* S0 : RAM_STRAP_4 */ - PAD_NC(GPP_S0, NONE), + PAD_CFG_GPI(GPP_S0, UP_5K, DEEP), /* S1 : RSVD_STRAP */ PAD_NC(GPP_S1, NONE), /* S2 : DMIC1_CLK */ @@ -416,6 +416,9 @@
/* H19 : BT_DISABLE_L */ PAD_CFG_GPO(GPP_H19, 0, DEEP), + + /* S0 : RAM_STRAP_4 */ + PAD_CFG_GPI(GPP_S0, UP_5K, DEEP), };
const struct pad_config *__weak variant_gpio_table(size_t *num) diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h index dfb2cd1..98e4b27 100644 --- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/gpio.h @@ -26,4 +26,7 @@ #define GPIO_MEM_CONFIG_2 GPP_C4 #define GPIO_MEM_CONFIG_3 GPP_C5
+/* Memory channel select strap - 0: half-populated, 1: fully-populated */ +#define GPIO_MEM_CH_SEL GPP_S0 + #endif /* __BASEBOARD_GPIO_H__ */