[RFC PATCH v2 5/5] board: amlogic: add support for AD401 board

Igor Prusov ivprusov at sberdevices.ru
Fri May 5 14:56:39 CEST 2023


The AD401 board is the Amlogic A1 SoC reference board

Signed-off-by: Igor Prusov <ivprusov at sberdevices.ru>
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
---
 arch/arm/mach-meson/Kconfig     |  1 +
 board/amlogic/ad401/MAINTAINERS |  6 ++++
 board/amlogic/ad401/Makefile    |  4 +++
 board/amlogic/ad401/ad401.c     | 15 +++++++++
 configs/ad401_defconfig         | 54 +++++++++++++++++++++++++++++++++
 5 files changed, 80 insertions(+)
 create mode 100644 board/amlogic/ad401/MAINTAINERS
 create mode 100644 board/amlogic/ad401/Makefile
 create mode 100644 board/amlogic/ad401/ad401.c
 create mode 100644 configs/ad401_defconfig

diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig
index 519ed563c0..669ca09a00 100644
--- a/arch/arm/mach-meson/Kconfig
+++ b/arch/arm/mach-meson/Kconfig
@@ -75,6 +75,7 @@ config SYS_VENDOR
 
 config SYS_BOARD
 	string "Board name"
+	default "ad401" if MESON_A1
 	default "p200" if MESON_GXBB
 	default "p212" if MESON_GXL
 	default "q200" if MESON_GXM
diff --git a/board/amlogic/ad401/MAINTAINERS b/board/amlogic/ad401/MAINTAINERS
new file mode 100644
index 0000000000..52a44bd66c
--- /dev/null
+++ b/board/amlogic/ad401/MAINTAINERS
@@ -0,0 +1,6 @@
+AD401
+M:	Neil Armstrong <neil.armstrong at linaro.org>
+S:	Maintained
+L:	u-boot-amlogic at groups.io
+F:	board/amlogic/ad401/
+F:	configs/ad401_defconfig
diff --git a/board/amlogic/ad401/Makefile b/board/amlogic/ad401/Makefile
new file mode 100644
index 0000000000..e65c1215f6
--- /dev/null
+++ b/board/amlogic/ad401/Makefile
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0+
+# (C) Copyright 2023 SberDevices, Inc.
+
+obj-y	:= ad401.o
diff --git a/board/amlogic/ad401/ad401.c b/board/amlogic/ad401/ad401.c
new file mode 100644
index 0000000000..356b2880bd
--- /dev/null
+++ b/board/amlogic/ad401/ad401.c
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2023 SberDevices, Inc.
+ * Author: Igor Prusov <ivprusov at sberdevices.ru>
+ */
+
+#include <init.h>
+#include <asm/arch/eth.h>
+
+int misc_init_r(void)
+{
+	meson_generate_serial_ethaddr();
+
+	return 0;
+}
diff --git a/configs/ad401_defconfig b/configs/ad401_defconfig
new file mode 100644
index 0000000000..529e553bac
--- /dev/null
+++ b/configs/ad401_defconfig
@@ -0,0 +1,54 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MESON=y
+CONFIG_TEXT_BASE=0x00000000
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x00200000
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="meson-a1-ad401"
+CONFIG_SYS_PROMPT="ad401 # "
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_MESON_A1=y
+CONFIG_DEBUG_UART_BASE=0xfe001c00
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_SYS_LOAD_ADDR=0x0
+CONFIG_DEBUG_UART=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_BOOTCOMMAND="run storeboot"
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_IMI is not set
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MTD=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_CMD_UBI=y
+CONFIG_OF_CONTROL=y
+CONFIG_ADC=y
+CONFIG_SARADC_MESON=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MESON=y
+CONFIG_LED=y
+CONFIG_MISC=y
+CONFIG_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_MESON_A1=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_PWM=y
+CONFIG_PWM_MESON=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_DEBUG_UART_SKIP_INIT=y
+CONFIG_MESON_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_WDT=y
-- 
2.34.1



More information about the U-Boot mailing list