board: ti: j721e: enable hyperflash spl fixup for j721e
On j721e, its not possible to use OSPI0 and HBMC simultaneously as they are muxed within the Flash Subsystem hence disable HBMC by default and keep OSPI enabled. Bootloader will fixup DT when it detects HyperFlash mux selection instead of OSPI. Also updated detect_enable_hyperflash to use correct GPIO when checking hypermux selection state: * J7200 - hypermux sel connected to WKUP_GPIO0_6 * J721E - hypermux·sel·connected·to·WKUP_GPIO0_8 Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
This commit is contained in:
parent
90fbf30de8
commit
70f5dad0ea
|
|
@ -116,11 +116,12 @@ int board_fit_config_name_match(const char *name)
|
|||
static void __maybe_unused detect_enable_hyperflash(void *blob)
|
||||
{
|
||||
struct gpio_desc desc = {0};
|
||||
char *hypermux_sel_gpio = (board_is_j721e_som()) ? "8" : "6";
|
||||
|
||||
if (dm_gpio_lookup_name("6", &desc))
|
||||
if (dm_gpio_lookup_name(hypermux_sel_gpio, &desc))
|
||||
return;
|
||||
|
||||
if (dm_gpio_request(&desc, "6"))
|
||||
if (dm_gpio_request(&desc, hypermux_sel_gpio))
|
||||
return;
|
||||
|
||||
if (dm_gpio_set_dir_flags(&desc, GPIOD_IS_IN))
|
||||
|
|
@ -139,7 +140,8 @@ static void __maybe_unused detect_enable_hyperflash(void *blob)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPL_BUILD) && (defined(CONFIG_TARGET_J7200_A72_EVM) || defined(CONFIG_TARGET_J7200_R5_EVM))
|
||||
#if defined(CONFIG_SPL_BUILD) && (defined(CONFIG_TARGET_J7200_A72_EVM) || defined(CONFIG_TARGET_J7200_R5_EVM) || \
|
||||
defined(CONFIG_TARGET_J721E_A72_EVM) || defined(CONFIG_TARGET_J721E_R5_EVM))
|
||||
void spl_perform_fixups(struct spl_image_info *spl_image)
|
||||
{
|
||||
detect_enable_hyperflash(spl_image->fdt_addr);
|
||||
|
|
@ -503,17 +505,18 @@ int board_late_init(void)
|
|||
|
||||
static int __maybe_unused detect_SW3_1_state(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM)) {
|
||||
if (IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM) || IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM)) {
|
||||
struct gpio_desc desc = {0};
|
||||
int ret;
|
||||
char *hypermux_sel_gpio = (board_is_j721e_som()) ? "8" : "6";
|
||||
|
||||
ret = dm_gpio_lookup_name("6", &desc);
|
||||
ret = dm_gpio_lookup_name(hypermux_sel_gpio, &desc);
|
||||
if (ret) {
|
||||
printf("error getting GPIO lookup name: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = dm_gpio_request(&desc, "6");
|
||||
ret = dm_gpio_request(&desc, hypermux_sel_gpio);
|
||||
if (ret) {
|
||||
printf("error requesting GPIO: %d\n", ret);
|
||||
goto err_free_gpio;
|
||||
|
|
@ -568,8 +571,7 @@ void spl_board_init(void)
|
|||
printf("ESM PMIC init failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM) &&
|
||||
if ((IS_ENABLED(CONFIG_TARGET_J7200_A72_EVM) || IS_ENABLED(CONFIG_TARGET_J721E_A72_EVM)) &&
|
||||
IS_ENABLED(CONFIG_HBMC_AM654)) {
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue