arm-trusted-firmware/plat/nxp/s32/s32g274ardb2/plat_bl2_el3_setup.c
Ghennadi Procopciuc 8b81a39e28 feat(s32g274a): add S32G274ARDB2 board support
S32G274ARDB2 is a development board to showcase the capabilities of the
S32G2 SoC. It includes 4 ARM Cortex-A53 cores running at 1.0GHz, 4GBs
of DDR, accelerators for automotive networking and many other
peripherals.

The added support is minimal and only includes the BL2 stage, with no
MMU enabled. The FIP is preloaded by the BootROM in SRAM, and BL2 copies
BL31 and BL33 from FIP to their designated addresses.

Change-Id: Iedda23302768ab70d63787117c5f6f3c21eb9842
Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@nxp.com>
Signed-off-by: Dan Nica <dan.nica@nxp.com>
Signed-off-by: Andra-Teodora Ilie <andra.ilie@nxp.com>
Signed-off-by: Bogdan Roman <bogdan-gabriel.roman@nxp.com>
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2024-04-25 11:22:53 +03:00

62 lines
1.3 KiB
C

/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <common/desc_image_load.h>
#include <lib/mmio.h>
#include <plat/common/platform.h>
#include <plat_console.h>
#include <plat_io_storage.h>
#define SIUL2_PC09_MSCR UL(0x4009C2E4)
#define SIUL2_PC10_MSCR UL(0x4009C2E8)
#define SIUL2_PC10_LIN0_IMCR UL(0x4009CA40)
#define LIN0_TX_MSCR_CFG U(0x00214001)
#define LIN0_RX_MSCR_CFG U(0x00094000)
#define LIN0_RX_IMCR_CFG U(0x00000002)
struct bl_load_info *plat_get_bl_image_load_info(void)
{
return get_bl_load_info_from_mem_params_desc();
}
struct bl_params *plat_get_next_bl_params(void)
{
return get_next_bl_params_from_mem_params_desc();
}
void plat_flush_next_bl_params(void)
{
flush_bl_params_desc();
}
void bl2_platform_setup(void)
{
}
static void linflex_config_pinctrl(void)
{
/* set PC09 - MSCR[41] - for UART0 TXD */
mmio_write_32(SIUL2_PC09_MSCR, LIN0_TX_MSCR_CFG);
/* set PC10 - MSCR[42] - for UART0 RXD */
mmio_write_32(SIUL2_PC10_MSCR, LIN0_RX_MSCR_CFG);
/* set PC10 - MSCR[512]/IMCR[0] - for UART0 RXD */
mmio_write_32(SIUL2_PC10_LIN0_IMCR, LIN0_RX_IMCR_CFG);
}
void bl2_el3_early_platform_setup(u_register_t arg0, u_register_t arg1,
u_register_t arg2, u_register_t arg3)
{
linflex_config_pinctrl();
console_s32g2_register();
plat_s32g2_io_setup();
}
void bl2_el3_plat_arch_setup(void)
{
}