Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: Add basic support for Airoha EN7523 SoC

EN7523 is an armv8 based silicon used inside broadband access type devices
such as xPON and xDSL. It shares various silicon blocks with MediaTek
silicon such as the MT7622.

Add basic support for Airoha EN7523, enough for booting to console.

The UART is basically 8250-compatible, except for the clock selection.
A clock-frequency value is synthesized to get this to run at 115200 bps.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20220130145116.88406-4-nbd@nbd.name
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

authored by

John Crispin and committed by
Matthias Brugger
2cf1c348 51911d1c

+177
+12
arch/arm/Kconfig
··· 572 572 select HAVE_ARM_ARCH_TIMER 573 573 select ARCH_SUPPORTS_BIG_ENDIAN 574 574 575 + config ARCH_AIROHA 576 + bool "Airoha SoC Support" 577 + depends on ARCH_MULTI_V7 578 + select ARM_AMBA 579 + select ARM_GIC 580 + select ARM_GIC_V3 581 + select ARM_PSCI 582 + select HAVE_ARM_ARCH_TIMER 583 + select COMMON_CLK 584 + help 585 + Support for Airoha EN7523 SoCs 586 + 575 587 # 576 588 # This is sorted alphabetically by mach-* pathname. However, plat-* 577 589 # Kconfigs may be included either alphabetically (according to the
+1
arch/arm/Makefile
··· 160 160 # Machine directory name. This list is sorted alphanumerically 161 161 # by CONFIG_* macro name. 162 162 machine-$(CONFIG_ARCH_ACTIONS) += actions 163 + machine-$(CONFIG_ARCH_AIROHA) += airoha 163 164 machine-$(CONFIG_ARCH_ALPINE) += alpine 164 165 machine-$(CONFIG_ARCH_ARTPEC) += artpec 165 166 machine-$(CONFIG_ARCH_ASPEED) += aspeed
+2
arch/arm/boot/dts/Makefile
··· 187 187 da850-lego-ev3.dtb 188 188 dtb-$(CONFIG_ARCH_DIGICOLOR) += \ 189 189 cx92755_equinox.dtb 190 + dtb-$(CONFIG_ARCH_AIROHA) += \ 191 + en7523-evb.dtb 190 192 dtb-$(CONFIG_ARCH_EXYNOS3) += \ 191 193 exynos3250-artik5-eval.dtb \ 192 194 exynos3250-monk.dtb \
+27
arch/arm/boot/dts/en7523-evb.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + /dts-v1/; 3 + 4 + /* Bootloader installs ATF here */ 5 + /memreserve/ 0x80000000 0x200000; 6 + 7 + #include "en7523.dtsi" 8 + 9 + / { 10 + model = "Airoha EN7523 Evaluation Board"; 11 + compatible = "airoha,en7523-evb", "airoha,en7523"; 12 + 13 + aliases { 14 + serial0 = &uart1; 15 + }; 16 + 17 + chosen { 18 + bootargs = "console=ttyS0,115200 earlycon"; 19 + stdout-path = "serial0:115200n8"; 20 + linux,usable-memory-range = <0x80200000 0x1fe00000>; 21 + }; 22 + 23 + memory@80000000 { 24 + device_type = "memory"; 25 + reg = <0x80000000 0x20000000>; 26 + }; 27 + };
+117
arch/arm/boot/dts/en7523.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + 3 + #include <dt-bindings/interrupt-controller/irq.h> 4 + #include <dt-bindings/interrupt-controller/arm-gic.h> 5 + 6 + / { 7 + interrupt-parent = <&gic>; 8 + #address-cells = <1>; 9 + #size-cells = <1>; 10 + 11 + reserved-memory { 12 + #address-cells = <1>; 13 + #size-cells = <1>; 14 + ranges; 15 + 16 + npu_binary@84000000 { 17 + no-map; 18 + reg = <0x84000000 0xA00000>; 19 + }; 20 + 21 + npu_flag@84B0000 { 22 + no-map; 23 + reg = <0x84B00000 0x100000>; 24 + }; 25 + 26 + npu_pkt@85000000 { 27 + no-map; 28 + reg = <0x85000000 0x1A00000>; 29 + }; 30 + 31 + npu_phyaddr@86B00000 { 32 + no-map; 33 + reg = <0x86B00000 0x100000>; 34 + }; 35 + 36 + npu_rxdesc@86D00000 { 37 + no-map; 38 + reg = <0x86D00000 0x100000>; 39 + }; 40 + }; 41 + 42 + psci { 43 + compatible = "arm,psci-0.2"; 44 + method = "smc"; 45 + }; 46 + 47 + cpus { 48 + #address-cells = <1>; 49 + #size-cells = <0>; 50 + 51 + cpu-map { 52 + cluster0 { 53 + core0 { 54 + cpu = <&cpu0>; 55 + }; 56 + core1 { 57 + cpu = <&cpu1>; 58 + }; 59 + }; 60 + }; 61 + 62 + cpu0: cpu@0 { 63 + device_type = "cpu"; 64 + compatible = "arm,cortex-a53"; 65 + reg = <0x0>; 66 + enable-method = "psci"; 67 + clock-frequency = <80000000>; 68 + next-level-cache = <&L2_0>; 69 + }; 70 + 71 + cpu1: cpu@1 { 72 + device_type = "cpu"; 73 + compatible = "arm,cortex-a53"; 74 + reg = <0x1>; 75 + enable-method = "psci"; 76 + clock-frequency = <80000000>; 77 + next-level-cache = <&L2_0>; 78 + }; 79 + 80 + L2_0: l2-cache0 { 81 + compatible = "cache"; 82 + }; 83 + }; 84 + 85 + gic: interrupt-controller@9000000 { 86 + compatible = "arm,gic-v3"; 87 + interrupt-controller; 88 + #interrupt-cells = <3>; 89 + #address-cells = <1>; 90 + #size-cells = <1>; 91 + reg = <0x09000000 0x20000>, 92 + <0x09080000 0x80000>, 93 + <0x09400000 0x2000>, 94 + <0x09500000 0x2000>, 95 + <0x09600000 0x20000>; 96 + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>; 97 + }; 98 + 99 + timer { 100 + compatible = "arm,armv8-timer"; 101 + interrupt-parent = <&gic>; 102 + interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, 103 + <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, 104 + <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, 105 + <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; 106 + }; 107 + 108 + uart1: serial@1fbf0000 { 109 + compatible = "ns16550"; 110 + reg = <0x1fbf0000 0x30>; 111 + reg-io-width = <4>; 112 + reg-shift = <2>; 113 + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; 114 + clock-frequency = <1843200>; 115 + status = "okay"; 116 + }; 117 + };
+2
arch/arm/mach-airoha/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + obj-y += airoha.o
+16
arch/arm/mach-airoha/airoha.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + /* 3 + * Device Tree support for Airoha SoCs 4 + * 5 + * Copyright (c) 2022 Felix Fietkau <nbd@nbd.name> 6 + */ 7 + #include <asm/mach/arch.h> 8 + 9 + static const char * const airoha_board_dt_compat[] = { 10 + "airoha,en7523", 11 + NULL, 12 + }; 13 + 14 + DT_MACHINE_START(MEDIATEK_DT, "Airoha Cortex-A53 (Device Tree)") 15 + .dt_compat = airoha_board_dt_compat, 16 + MACHINE_END