[PATCH 00/19] arm: airoha: add support for en7523 based boards
Mikhail Kshevetskiy
mikhail.kshevetskiy at iopsys.eu
Sat Nov 1 01:44:44 CET 2025
This patch series adds basic support for the boards based on Airoha
EN7523/EN7529/EN7562 SoCs. Due to ATF restrictions these boards are
able to run 32-bit OS only.
This patch series adds support for the following hardware:
* console UART
* ethernet controller/switch
* spinand flash (in non-dma mode)
The following issues may be expected:
* Extra slow UBI attaching in U-Boot (up to 20 sec with fastmap enabled).
This is caused by the lack of DMA support in the U-Boot airoha-snfi driver.
* Linux airoha-snfi driver in some cases might damage you flash data
(see: https://lore.kernel.org/lkml/20251012121707.2296160-15-mikhail.kshevetskiy@iopsys.eu/)
* Latest linux kernel is recommended to properly support flashes
with more than one plane per lun
(see: https://lore.kernel.org/lkml/20251012121707.2296160-7-mikhail.kshevetskiy@iopsys.eu/)
* It's NOT recommended to use flashes working in continuous mode because
U-Boot airoha-snfi driver does not support such flashes properly.
The patches was tested on the board:
- SoC: Airoha EN7562
- RAM: 512 MB
- SPI NAND: 4 Gbit, made by Toshiba
- Linux boot: was NOT tested
The U-Boot was chain-loaded from the running U-Boot. Airoha ATF-2.3 does
not allow easily chain-loading of U-Boot from U-Boot, so a special FIT
image (mimic linux kernel) was created
1) Create u-boot.its file with the following contents:
=== cut here ===
/dts-v1/;
/ {
description = "ARM OpenWrt FIT (Flattened Image Tree)";
#address-cells = <1>;
images {
u-boot-ram {
description = "OpenWrt U-Boot RAM image";
data = /incbin/("u-boot.bin.lzma");
type = "kernel";
arch = "arm";
os = "linux";
compression = "lzma";
load = <0x81e00000>;
entry = <0x81e00000>;
hash at 1 {
algo = "crc32";
};
hash at 2 {
algo = "sha1";
};
};
fdt-1 {
description = "OpenWrt device tree blob";
data = /incbin/("dts/upstream/src/arm/airoha/en7523-evb.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash at 1 {
algo = "crc32";
};
hash at 2 {
algo = "sha1";
};
};
};
configurations {
default = "config-ram-uboot";
config-ram-uboot {
description = "OpenWrt RAM U-Boot";
kernel = "u-boot-ram";
fdt = "fdt-1";
};
};
};
==================
2) Create u-boot.itb image to chain-load new u-boot from the old one
lzma_alone e u-boot.bin u-boot.bin.lzma
mkimage -f u-boot.its u-boot.itb
3) Load new u-boot from the old one
U-Boot> tftpboot u-boot.itb && bootm
Christian Marangi (1):
reset: airoha: convert to regmap API
Mikhail Kshevetskiy (18):
airoha/an7581: add CONFIG_TARGET_AN7581=y to the defconfig
arm/airoha: add support for airoha en7523 SoC family
arm: airoha: introduce AN7581 helpers to get SCU and CHIP_SCU regmaps
arm: airoha: introduce EN7523 helpers to get SCU and CHIP_SCU regmaps
clk: airoha: use CHIP_SCU regmap helper
clk: airoha: add support for airoha en7523 SoC family
configs: airoha: en7523: enable clk support
reset: airoha: unify code using SCU regmap helper
dt-bindings: reset: Add reset support for Airoha EN7523
reset: airoha: add support for airoha en7523 SoC family
dts: airoha: en7523: add reset controller support
configs: airoha: en7523: enable reset controller support
net: airoha: unify code using SCU regmap helper
net: airoha: add support for airoha en7523 SoC family
dts: airoha: en7523: add ethernet controller support
configs: airoha: en7523: enable ethernet controller support
dts: airoha: en7523: add spinand flash support
configs: airoha: en7523: enable spinand flashes support
arch/arm/dts/en7523-evb-u-boot.dtsi | 11 ++
arch/arm/dts/en7523-u-boot.dtsi | 70 ++++++++++
arch/arm/include/asm/arch-airoha/scu-regmap.h | 13 ++
arch/arm/include/asm/arch-an7581 | 1 +
arch/arm/include/asm/arch-en7523 | 1 +
arch/arm/mach-airoha/Kconfig | 14 ++
arch/arm/mach-airoha/Makefile | 1 +
arch/arm/mach-airoha/an7581/Makefile | 1 +
arch/arm/mach-airoha/an7581/scu-regmap.c | 30 +++++
arch/arm/mach-airoha/en7523/Makefile | 4 +
arch/arm/mach-airoha/en7523/init.c | 33 +++++
arch/arm/mach-airoha/en7523/scu-regmap.c | 38 ++++++
board/airoha/en7523/Makefile | 3 +
board/airoha/en7523/en7523_rfb.c | 16 +++
configs/an7581_evb_defconfig | 1 +
configs/en7523_evb_defconfig | 67 +++++++++
drivers/clk/airoha/clk-airoha.c | 127 ++++++++++++++++--
drivers/net/airoha_eth.c | 78 +++++++----
drivers/reset/reset-airoha.c | 106 ++++++++++++---
include/configs/en7523.h | 21 +++
.../dt-bindings/reset/airoha,en7523-reset.h | 61 +++++++++
21 files changed, 642 insertions(+), 55 deletions(-)
create mode 100644 arch/arm/dts/en7523-evb-u-boot.dtsi
create mode 100644 arch/arm/dts/en7523-u-boot.dtsi
create mode 100644 arch/arm/include/asm/arch-airoha/scu-regmap.h
create mode 120000 arch/arm/include/asm/arch-an7581
create mode 120000 arch/arm/include/asm/arch-en7523
create mode 100644 arch/arm/mach-airoha/an7581/scu-regmap.c
create mode 100644 arch/arm/mach-airoha/en7523/Makefile
create mode 100644 arch/arm/mach-airoha/en7523/init.c
create mode 100644 arch/arm/mach-airoha/en7523/scu-regmap.c
create mode 100644 board/airoha/en7523/Makefile
create mode 100644 board/airoha/en7523/en7523_rfb.c
create mode 100644 configs/en7523_evb_defconfig
create mode 100644 include/configs/en7523.h
create mode 100644 include/dt-bindings/reset/airoha,en7523-reset.h
--
2.51.0
More information about the U-Boot
mailing list