--- /dev/null
+// SPDX-License-Identifier: GPL-2.0+
+
+/ {
+ /* When running as a first-stage bootloader this isn't filled in automatically */
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x10000000>;
+ };
+};
+
+#include "en7523-u-boot.dtsi"
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0+
+
+/ {
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ atf-reserved-memory@80000000 {
+ no-map;
+ reg = <0x80000000 0x40000>;
+ };
+ };
+
+ scu: system-controller@1fa20000 {
+ compatible = "airoha,en7523-scu";
+ reg = <0x1fa20000 0x400>,
+ <0x1fb00000 0x1000>;
+ #clock-cells = <1>;
+ };
+
+};
+
+&uart1 {
+ bootph-all;
+};
choice
prompt "Airoha board select"
+config TARGET_EN7523
+ bool "Airoha EN7523 SoC"
+ select CPU_V7A
+ select ARMV7_SET_CORTEX_SMPEN
+ help
+ The Airoha EN7523 family (en7523/en7529/en7562) is an ARM-based
+ SoCs with a dual-core CPU. It comes with Wi-Fi 5/6 support and
+ connectivity to Ethernet PHY, DDR, PCIe, USB, UART and VoIP.
+ With advanced hardware design, EN7523 provides high processing
+ performance and low power consumption.
+
config TARGET_AN7581
bool "Airoha AN7581 SoC"
select ARM64
endchoice
config SYS_SOC
+ default "en7523" if TARGET_EN7523
default "an7581" if TARGET_AN7581
config SYS_BOARD
+ default "en7523" if TARGET_EN7523
default "an7581" if TARGET_AN7581
config SYS_CONFIG_NAME
+ default "en7523" if TARGET_EN7523
default "an7581" if TARGET_AN7581
endif
obj-y += cpu.o
+obj-$(CONFIG_TARGET_EN7523) += en7523/
obj-$(CONFIG_TARGET_AN7581) += an7581/
--- /dev/null
+# SPDX-License-Identifier: GPL-2.0
+
+obj-y += init.o
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
+ */
+#include <fdtdec.h>
+#include <init.h>
+#include <sysreset.h>
+#include <asm/system.h>
+#include <linux/io.h>
+
+int print_cpuinfo(void)
+{
+ printf("CPU: Airoha EN7523/EN7529/EN7562\n");
+ return 0;
+}
+
+int dram_init(void)
+{
+ return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+ return fdtdec_setup_memory_banksize();
+}
+
+void __noreturn reset_cpu(void)
+{
+ writel(0x80000000, 0x1FB00040);
+ while (1) {
+ /* loop forever */
+ }
+}
--- /dev/null
+# SPDX-License-Identifier: GPL-2.0
+
+obj-y += en7523_rfb.o
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Author: Christian Marangi <ansuelsmth@gmail.com>
+ */
+
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ /* address of boot parameters */
+ gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
+
+ return 0;
+}
--- /dev/null
+CONFIG_ARM=y
+CONFIG_SYS_ARCH_TIMER=y
+CONFIG_ARCH_AIROHA=y
+CONFIG_TARGET_EN7523=y
+CONFIG_TEXT_BASE=0x81E00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="airoha/en7523-evb"
+CONFIG_SYS_LOAD_ADDR=0x81800000
+CONFIG_BUILD_TARGET="u-boot.bin"
+# CONFIG_EFI_LOADER is not set
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_BOOTDELAY=3
+CONFIG_DEFAULT_FDT_FILE="en7523-evb"
+CONFIG_SYS_PBSIZE=1049
+CONFIG_SYS_CONSOLE_IS_IN_ENV=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_SYS_MAXARGS=8
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_BOOTMENU=y
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_CMD_BIND=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_MTD=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_PING=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_CMD_LOG=y
+CONFIG_OF_UPSTREAM=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
+# CONFIG_ENV_IS_IN_MTD is not set
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SYS_RX_ETH_BUFFER=8
+CONFIG_REGMAP=y
+CONFIG_DMA=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
+CONFIG_SHA512=y
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Configuration for Airoha EN7523
+ *
+ * Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
+ */
+
+#ifndef __EN7523_H
+#define __EN7523_H
+
+#include <linux/sizes.h>
+
+#define CFG_SYS_UBOOT_BASE CONFIG_TEXT_BASE
+
+#define CFG_SYS_INIT_RAM_ADDR CONFIG_TEXT_BASE
+#define CFG_SYS_INIT_RAM_SIZE SZ_2M
+
+/* DRAM */
+#define CFG_SYS_SDRAM_BASE 0x80000000
+
+#endif