4ceb5c6db2
Add basic support for the Kontron SMARC-sAL28 board. This includes just the bare minimum to be able to bring up the board and boot linux. For now, the Single and Dual PHY variant is supported. Other variants will fall back to the basic variant. In particular, there is no watchdog support for now. This means that you have to disable the default watchdog, otherwise you'll end up in the recovery bootloader. See the board README for details. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
33 lines
644 B
C
33 lines
644 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/spl.h>
|
|
|
|
#define DCFG_RCWSR25 0x160
|
|
#define GPINFO_HW_VARIANT_MASK 0xff
|
|
|
|
int sl28_variant(void)
|
|
{
|
|
return in_le32(DCFG_BASE + DCFG_RCWSR25) & GPINFO_HW_VARIANT_MASK;
|
|
}
|
|
|
|
int board_fit_config_name_match(const char *name)
|
|
{
|
|
int variant = sl28_variant();
|
|
|
|
switch (variant) {
|
|
case 3:
|
|
return strcmp(name, "fsl-ls1028a-kontron-sl28-var3");
|
|
case 4:
|
|
return strcmp(name, "fsl-ls1028a-kontron-sl28-var4");
|
|
default:
|
|
return strcmp(name, "fsl-ls1028a-kontron-sl28");
|
|
}
|
|
}
|
|
|
|
void board_boot_order(u32 *spl_boot_list)
|
|
{
|
|
spl_boot_list[0] = BOOT_DEVICE_SPI;
|
|
}
|