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

Merge tag 'anlogic-initial-6.19-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/newsoc

Initial Anlogic Platform Support

Add bindings for the serial and timer peripherals, and a basic soc dtsi
for the Anlogic dr1v90 SoC. The Milianke MLKPAI FS01 is the first board
for this SoC. Add myself as maintainer for this platform for the time
being.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'anlogic-initial-6.19-v2' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
MAINTAINERS: Setup support for Anlogic tree
riscv: defconfig: Enable Anlogic SoC
riscv: dts: anlogic: Add Milianke MLKPAI FS01 board
riscv: dts: Add initial Anlogic DR1V90 SoC device tree
riscv: Add Anlogic SoC famly Kconfig support
dt-bindings: serial: snps-dw-apb-uart: Add Anlogic DR1V90 uart
dt-bindings: timer: Add Anlogic DR1V90 ACLINT MTIMER
dt-bindings: riscv: Add Anlogic DR1V90
dt-bindings: riscv: Add Nuclei UX900 compatibles
dt-bindings: vendor-prefixes: Add Anlogic, Milianke and Nuclei

+191 -6
+27
Documentation/devicetree/bindings/riscv/anlogic.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/riscv/anlogic.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Anlogic SoC-based boards 8 + 9 + maintainers: 10 + - Junhui Liu <junhui.liu@pigmoral.tech> 11 + 12 + description: 13 + Anlogic SoC-based boards 14 + 15 + properties: 16 + $nodename: 17 + const: '/' 18 + compatible: 19 + oneOf: 20 + - items: 21 + - enum: 22 + - milianke,mlkpai-fs01 23 + - const: anlogic,dr1v90 24 + 25 + additionalProperties: true 26 + 27 + ...
+1
Documentation/devicetree/bindings/riscv/cpus.yaml
··· 48 48 - amd,mbv64 49 49 - andestech,ax45mp 50 50 - canaan,k210 51 + - nuclei,ux900 51 52 - sifive,bullet0 52 53 - sifive,e5 53 54 - sifive,e7
+1
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
··· 51 51 - const: renesas,rzn1-uart 52 52 - items: 53 53 - enum: 54 + - anlogic,dr1v90-uart 54 55 - brcm,bcm11351-dw-apb-uart 55 56 - brcm,bcm21664-dw-apb-uart 56 57 - rockchip,px30-uart
+11 -6
Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml
··· 4 4 $id: http://devicetree.org/schemas/timer/thead,c900-aclint-mtimer.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Sophgo CLINT Timer 7 + title: ACLINT Machine-level Timer Device 8 8 9 9 maintainers: 10 10 - Inochi Amaoto <inochiama@outlook.com> 11 11 12 12 properties: 13 13 compatible: 14 - items: 15 - - enum: 16 - - sophgo,sg2042-aclint-mtimer 17 - - sophgo,sg2044-aclint-mtimer 18 - - const: thead,c900-aclint-mtimer 14 + oneOf: 15 + - items: 16 + - enum: 17 + - sophgo,sg2042-aclint-mtimer 18 + - sophgo,sg2044-aclint-mtimer 19 + - const: thead,c900-aclint-mtimer 20 + - items: 21 + - enum: 22 + - anlogic,dr1v90-aclint-mtimer 23 + - const: nuclei,ux900-aclint-mtimer 19 24 20 25 reg: 21 26 items:
+6
Documentation/devicetree/bindings/vendor-prefixes.yaml
··· 132 132 description: Anbernic 133 133 "^andestech,.*": 134 134 description: Andes Technology Corporation 135 + "^anlogic,.*": 136 + description: Shanghai Anlogic Infotech Co., Ltd. 135 137 "^anvo,.*": 136 138 description: Anvo-Systems Dresden GmbH 137 139 "^aoly,.*": ··· 1027 1025 description: MikroElektronika d.o.o. 1028 1026 "^mikrotik,.*": 1029 1027 description: MikroTik 1028 + "^milianke,.*": 1029 + description: Changzhou Milianke Electronic Technology Co., Ltd 1030 1030 "^milkv,.*": 1031 1031 description: MilkV Technology Co., Ltd 1032 1032 "^miniand,.*": ··· 1146 1142 description: Novatek 1147 1143 "^novtech,.*": 1148 1144 description: NovTech, Inc. 1145 + "^nuclei,.*": 1146 + description: Nuclei System Technology 1149 1147 "^numonyx,.*": 1150 1148 description: Numonyx (deprecated, use micron) 1151 1149 deprecated: true
+8
MAINTAINERS
··· 22089 22089 F: Documentation/devicetree/bindings/timer/andestech,plmt0.yaml 22090 22090 F: arch/riscv/boot/dts/andes/ 22091 22091 22092 + RISC-V ANLOGIC SoC SUPPORT 22093 + M: Conor Dooley <conor@kernel.org> 22094 + T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/ 22095 + L: linux-riscv@lists.infradead.org 22096 + S: Odd Fixes 22097 + F: Documentation/devicetree/bindings/riscv/anlogic.yaml 22098 + F: arch/riscv/boot/dts/anlogic/ 22099 + 22092 22100 RISC-V ARCHITECTURE 22093 22101 M: Paul Walmsley <pjw@kernel.org> 22094 22102 M: Palmer Dabbelt <palmer@dabbelt.com>
+5
arch/riscv/Kconfig.socs
··· 7 7 help 8 8 This enables support for Andes SoC platform hardware. 9 9 10 + config ARCH_ANLOGIC 11 + bool "Anlogic SoCs" 12 + help 13 + This enables support for Anlogic SoC platform hardware. 14 + 10 15 config ARCH_ESWIN 11 16 bool "ESWIN SoCs" 12 17 help
+1
arch/riscv/boot/dts/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 subdir-y += allwinner 3 3 subdir-y += andes 4 + subdir-y += anlogic 4 5 subdir-y += canaan 5 6 subdir-y += eswin 6 7 subdir-y += microchip
+2
arch/riscv/boot/dts/anlogic/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + dtb-$(CONFIG_ARCH_ANLOGIC) += dr1v90-mlkpai-fs01.dtb
+28
arch/riscv/boot/dts/anlogic/dr1v90-mlkpai-fs01.dts
··· 1 + // SPDX-License-Identifier: GPL-2.0 OR MIT 2 + /* 3 + * Copyright (C) 2025 Junhui Liu <junhui.liu@pigmoral.tech> 4 + */ 5 + 6 + #include "dr1v90.dtsi" 7 + 8 + / { 9 + model = "Milianke MLKPAI-FS01"; 10 + compatible = "milianke,mlkpai-fs01", "anlogic,dr1v90"; 11 + 12 + aliases { 13 + serial0 = &uart1; 14 + }; 15 + 16 + chosen { 17 + stdout-path = "serial0:115200n8"; 18 + }; 19 + 20 + memory@0 { 21 + device_type = "memory"; 22 + reg = <0x0 0x0 0x0 0x20000000>; 23 + }; 24 + }; 25 + 26 + &uart1 { 27 + status = "okay"; 28 + };
+100
arch/riscv/boot/dts/anlogic/dr1v90.dtsi
··· 1 + // SPDX-License-Identifier: GPL-2.0 OR MIT 2 + /* 3 + * Copyright (C) 2025 Junhui Liu <junhui.liu@pigmoral.tech> 4 + */ 5 + 6 + /dts-v1/; 7 + / { 8 + #address-cells = <2>; 9 + #size-cells = <2>; 10 + model = "Anlogic DR1V90"; 11 + compatible = "anlogic,dr1v90"; 12 + 13 + cpus { 14 + #address-cells = <1>; 15 + #size-cells = <0>; 16 + timebase-frequency = <800000000>; 17 + 18 + cpu@0 { 19 + compatible = "nuclei,ux900", "riscv"; 20 + d-cache-block-size = <64>; 21 + d-cache-sets = <256>; 22 + d-cache-size = <32768>; 23 + device_type = "cpu"; 24 + i-cache-block-size = <64>; 25 + i-cache-sets = <256>; 26 + i-cache-size = <32768>; 27 + mmu-type = "riscv,sv39"; 28 + reg = <0>; 29 + riscv,isa-base = "rv64i"; 30 + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zba", "zbb", "zbc", 31 + "zbkc", "zbs", "zicntr", "zicsr", "zifencei", 32 + "zihintpause", "zihpm"; 33 + 34 + cpu0_intc: interrupt-controller { 35 + compatible = "riscv,cpu-intc"; 36 + #interrupt-cells = <1>; 37 + interrupt-controller; 38 + }; 39 + }; 40 + }; 41 + 42 + soc { 43 + compatible = "simple-bus"; 44 + interrupt-parent = <&plic>; 45 + #address-cells = <2>; 46 + #size-cells = <2>; 47 + ranges; 48 + 49 + aclint_mswi: interrupt-controller@68031000 { 50 + compatible = "anlogic,dr1v90-aclint-mswi", "nuclei,ux900-aclint-mswi"; 51 + reg = <0x0 0x68031000 0x0 0x4000>; 52 + interrupts-extended = <&cpu0_intc 3>; 53 + }; 54 + 55 + aclint_mtimer: timer@68035000 { 56 + compatible = "anlogic,dr1v90-aclint-mtimer", "nuclei,ux900-aclint-mtimer"; 57 + reg = <0x0 0x68035000 0x0 0x8000>; 58 + reg-names = "mtimecmp"; 59 + interrupts-extended = <&cpu0_intc 7>; 60 + }; 61 + 62 + aclint_sswi: interrupt-controller@6803d000 { 63 + compatible = "anlogic,dr1v90-aclint-sswi", "nuclei,ux900-aclint-sswi"; 64 + reg = <0x0 0x6803d000 0x0 0x3000>; 65 + #interrupt-cells = <0>; 66 + interrupt-controller; 67 + interrupts-extended = <&cpu0_intc 1>; 68 + }; 69 + 70 + plic: interrupt-controller@6c000000 { 71 + compatible = "anlogic,dr1v90-plic", "sifive,plic-1.0.0"; 72 + reg = <0x0 0x6c000000 0x0 0x4000000>; 73 + #address-cells = <0>; 74 + #interrupt-cells = <1>; 75 + interrupt-controller; 76 + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>; 77 + riscv,ndev = <150>; 78 + }; 79 + 80 + uart0: serial@f8400000 { 81 + compatible = "anlogic,dr1v90-uart", "snps,dw-apb-uart"; 82 + reg = <0x0 0xf8400000 0x0 0x1000>; 83 + clock-frequency = <50000000>; 84 + interrupts = <71>; 85 + reg-io-width = <4>; 86 + reg-shift = <2>; 87 + status = "disabled"; 88 + }; 89 + 90 + uart1: serial@f8401000 { 91 + compatible = "anlogic,dr1v90-uart", "snps,dw-apb-uart"; 92 + reg = <0x0 0xf8401000 0x0 0x1000>; 93 + clock-frequency = <50000000>; 94 + interrupts = <72>; 95 + reg-io-width = <4>; 96 + reg-shift = <2>; 97 + status = "disabled"; 98 + }; 99 + }; 100 + };
+1
arch/riscv/configs/defconfig
··· 23 23 CONFIG_BLK_DEV_INITRD=y 24 24 CONFIG_PROFILING=y 25 25 CONFIG_ARCH_ANDES=y 26 + CONFIG_ARCH_ANLOGIC=y 26 27 CONFIG_ARCH_MICROCHIP=y 27 28 CONFIG_ARCH_SIFIVE=y 28 29 CONFIG_ARCH_SOPHGO=y