1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <console/console.h>
8 static const struct pad_config emmc_disable_pads
[] = {
16 PAD_NC(GPP_I10
, NONE
),
18 PAD_NC(GPP_I11
, NONE
),
20 PAD_NC(GPP_I12
, NONE
),
22 PAD_NC(GPP_I13
, NONE
),
24 PAD_NC(GPP_I14
, NONE
),
26 PAD_NC(GPP_I15
, NONE
),
28 PAD_NC(GPP_I16
, NONE
),
30 PAD_NC(GPP_I17
, NONE
),
31 /* I18 : EMMC_RST_L */
32 PAD_NC(GPP_I18
, NONE
),
35 void fw_config_gpio_padbased_override(struct pad_config
*padbased_table
)
37 if (!fw_config_is_provisioned()) {
38 printk(BIOS_WARNING
, "FW_CONFIG is not provisioned. Exiting...\n");
42 if (!fw_config_probe(FW_CONFIG(STORAGE
, STORAGE_UNKNOWN
))) {
43 if (!fw_config_probe(FW_CONFIG(STORAGE
, STORAGE_EMMC
))) {
44 printk(BIOS_INFO
, "Disable eMMC GPIO pins.\n");
45 gpio_padbased_override(padbased_table
, emmc_disable_pads
,
46 ARRAY_SIZE(emmc_disable_pads
));