Ren Kuo has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/71681 )
Change subject: mb/google/nissa/var/craask: Add unprovisioned storage fw_config for factory first build ......................................................................
mb/google/nissa/var/craask: Add unprovisioned storage fw_config for factory first build
In factory build,the storage is a unkonw state in first boot.The storage may be eMMC or NVMe and preflash a dedicated storgae of fw_config in CBI may cause the boot fail if the fw_config's storage not the real storage. Define the STORAGE_UNPROVISIONED in fw_config to support confirgure both NVME and eMMC in depthcharge and avoid close the storage device's GPIOs for first boot in factory.
BUG=b:259211172 TEST=Set the storage to unprovisioned and boot up in eMMC and NVMe SKUs.
Change-Id: I429ef189bf30f581d51058da148eb81f614ed23d Signed-off-by: Ren Kuo ren.kuo@quanta.corp-partner.google.com --- M src/mainboard/google/brya/variants/baseboard/nissa/devicetree.cb M src/mainboard/google/brya/variants/craask/fw_config.c 2 files changed, 61 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/71681/1
diff --git a/src/mainboard/google/brya/variants/baseboard/nissa/devicetree.cb b/src/mainboard/google/brya/variants/baseboard/nissa/devicetree.cb index 16c7ce0..542fa94 100644 --- a/src/mainboard/google/brya/variants/baseboard/nissa/devicetree.cb +++ b/src/mainboard/google/brya/variants/baseboard/nissa/devicetree.cb @@ -7,6 +7,7 @@ option STORAGE_EMMC 0 option STORAGE_NVME 1 option STORAGE_UFS 2 + option STORAGE_UNPROVISIONED 3 end end
diff --git a/src/mainboard/google/brya/variants/craask/fw_config.c b/src/mainboard/google/brya/variants/craask/fw_config.c index 937e90d..d9b6af8 100644 --- a/src/mainboard/google/brya/variants/craask/fw_config.c +++ b/src/mainboard/google/brya/variants/craask/fw_config.c @@ -58,6 +58,33 @@ PAD_NC_LOCK(GPP_E17, NONE, LOCK_CONFIG), };
+static const struct pad_config emmc_disable_pads[] = { + /* I7 : EMMC_CMD */ + PAD_NC(GPP_I7, NONE), + /* I8 : EMMC_D0 */ + PAD_NC(GPP_I8, NONE), + /* I9 : EMMC_D1 */ + PAD_NC(GPP_I9, NONE), + /* I10 : EMMC_D2 */ + PAD_NC(GPP_I10, NONE), + /* I11 : EMMC_D3 */ + PAD_NC(GPP_I11, NONE), + /* I12 : EMMC_D4 */ + PAD_NC(GPP_I12, NONE), + /* I13 : EMMC_D5 */ + PAD_NC(GPP_I13, NONE), + /* I14 : EMMC_D6 */ + PAD_NC(GPP_I14, NONE), + /* I15 : EMMC_D7 */ + PAD_NC(GPP_I15, NONE), + /* I16 : EMMC_RCLK */ + PAD_NC(GPP_I16, NONE), + /* I17 : EMMC_CLK */ + PAD_NC(GPP_I17, NONE), + /* I18 : EMMC_RST_L */ + PAD_NC(GPP_I18, NONE), +}; + void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { if (!fw_config_probe(FW_CONFIG(DB_USB, DB_1C_LTE))) { @@ -84,9 +111,18 @@ ARRAY_SIZE(stylus_disable_pads)); }
- if (fw_config_is_provisioned() && !fw_config_probe(FW_CONFIG(STORAGE, STORAGE_NVME))) { - printk(BIOS_INFO, "Disable NVMe SSD GPIO pins.\n"); - gpio_padbased_override(padbased_table, nvme_disable_pads, - ARRAY_SIZE(nvme_disable_pads)); + if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UNPROVISIONED))) { + + if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_NVME))) { + printk(BIOS_INFO, "Disable NVMe SSD GPIO pins.\n"); + gpio_padbased_override(padbased_table, nvme_disable_pads, + ARRAY_SIZE(nvme_disable_pads)); + } + + if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) { + printk(BIOS_INFO, "Disable eMMC SSD GPIO pins.\n"); + gpio_padbased_override(padbased_table, emmc_disable_pads, + ARRAY_SIZE(emmc_disable_pads)); + } } }