d1: add new target
[openwrt/staging/mans0n.git] / target / linux / d1 / patches-6.1 / 0034-riscv-Add-the-Allwinner-SoC-family-Kconfig-option.patch
1 From f648ec2a040efde432876ee04240cb71e4c24d6e Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 16 May 2021 14:17:45 -0500
4 Subject: [PATCH 034/117] riscv: Add the Allwinner SoC family Kconfig option
5
6 Allwinner manufactures the sunxi family of application processors. This
7 includes the "sun8i" series of ARMv7 SoCs, the "sun50i" series of ARMv8
8 SoCs, and now the "sun20i" series of 64-bit RISC-V SoCs.
9
10 The first SoC in the sun20i series is D1, containing a single T-HEAD
11 C906 core. D1s is a low-pin-count variant of D1 with co-packaged DRAM.
12
13 Most peripherals are shared across the entire chip family. In fact, the
14 ARMv7 T113 SoC is pin-compatible and almost entirely register-compatible
15 with the D1s.
16
17 This means many existing device drivers can be reused. To facilitate
18 this reuse, name the symbol ARCH_SUNXI, since that is what the existing
19 drivers have as their dependency.
20
21 Reviewed-by: Heiko Stuebner <heiko@sntech.de>
22 Tested-by: Heiko Stuebner <heiko@sntech.de>
23 Signed-off-by: Samuel Holland <samuel@sholland.org>
24 ---
25 arch/riscv/Kconfig.socs | 9 +++++++++
26 1 file changed, 9 insertions(+)
27
28 --- a/arch/riscv/Kconfig.socs
29 +++ b/arch/riscv/Kconfig.socs
30 @@ -1,5 +1,14 @@
31 menu "SoC selection"
32
33 +config ARCH_SUNXI
34 + bool "Allwinner sun20i SoCs"
35 + select ERRATA_THEAD if MMU && !XIP_KERNEL
36 + select SIFIVE_PLIC
37 + select SUN4I_TIMER
38 + help
39 + This enables support for Allwinner sun20i platform hardware,
40 + including boards based on the D1 and D1s SoCs.
41 +
42 config SOC_MICROCHIP_POLARFIRE
43 bool "Microchip PolarFire SoCs"
44 select MCHP_CLK_MPFS