Rishika Raj has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83657?usp=email )
Change subject: mb/google/brya/var/orisa: Update fw_config probe for storage devices ......................................................................
mb/google/brya/var/orisa: Update fw_config probe for storage devices
1. Add STORAGE_UNKNOWN fw_config to enable all storage devices.
2. Update fw_config probe to enable/disable devices in devicetree.
3. Disable eMMC controller incase STORAGE_UFS or STORAGE_NVME fw_config is enabled.
BUG=None TEST=emerge-nissa coreboot
Change-Id: Id3a22aa2206e86fdca6f6fadbc849572890fee58 Signed-off-by: Rishika Raj rishikaraj@google.com --- M src/mainboard/google/brya/variants/orisa/fw_config.c M src/mainboard/google/brya/variants/orisa/overridetree.cb 2 files changed, 25 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/83657/1
diff --git a/src/mainboard/google/brya/variants/orisa/fw_config.c b/src/mainboard/google/brya/variants/orisa/fw_config.c index 800fc1f..2977cb6 100644 --- a/src/mainboard/google/brya/variants/orisa/fw_config.c +++ b/src/mainboard/google/brya/variants/orisa/fw_config.c @@ -34,9 +34,16 @@
void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { - if (fw_config_is_provisioned() && !fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) { - printk(BIOS_INFO, "Disable eMMC GPIO pins.\n"); - gpio_padbased_override(padbased_table, emmc_disable_pads, - ARRAY_SIZE(emmc_disable_pads)); + if (!fw_config_is_provisioned()) { + printk(BIOS_WARNING, "FW_CONFIG is not provisioned. Exiting...\n"); + return; + } + + if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UNKNOWN))) { + if (!fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) { + printk(BIOS_INFO, "Disable eMMC GPIO pins.\n"); + gpio_padbased_override(padbased_table, emmc_disable_pads, + ARRAY_SIZE(emmc_disable_pads)); + } } } diff --git a/src/mainboard/google/brya/variants/orisa/overridetree.cb b/src/mainboard/google/brya/variants/orisa/overridetree.cb index f04eee2..ef312e2 100644 --- a/src/mainboard/google/brya/variants/orisa/overridetree.cb +++ b/src/mainboard/google/brya/variants/orisa/overridetree.cb @@ -9,9 +9,10 @@ option PDC_TI_BYPASS 2 end field STORAGE 30 31 - option STORAGE_EMMC 0 - option STORAGE_NVME 1 - option STORAGE_UFS 2 + option STORAGE_EMMC 0 + option STORAGE_NVME 1 + option STORAGE_UFS 2 + option STORAGE_UNKNOWN 3 end end
@@ -521,14 +522,22 @@ end #I2C5 device ref heci1 on end device ref pcie_rp7 off end - device ref emmc on end + device ref emmc on + probe STORAGE STORAGE_UNKNOWN + probe STORAGE STORAGE_EMMC + end device ref ish on chip drivers/intel/ish register "add_acpi_dma_property" = "true" device generic 0 on end end + probe STORAGE STORAGE_UNKNOWN + probe STORAGE STORAGE_UFS end - device ref ufs on end + device ref ufs on + probe STORAGE STORAGE_UNKNOWN + probe STORAGE STORAGE_UFS + end device ref uart0 on end device ref pch_espi on chip ec/google/chromeec