riscv: Add initial support for Anlogic DR1V90
Subsystems (8)
v3 cover riscv: Add initial support for Anlogic DR1V90
This introduces initial support for the Anlogic DR1V90 SoC [1] and the Milianke MLKPAI-FS01 [2] board.
The DR1V90 is a RISC-V based FPSoC from Anlogic, featuring a Nuclei UX900 [3] core as its processing system (PS) and 94,464 LUTs in the programmable logic (PL) part. The Milianke MLKPAI-FS01 board is one of the first platforms based on this SoC, with UART1 routed to a Type-C interface for console access.
Tested on the Milianke MLKPAI-FS01 board with both the vendor's OpenSBI and the not-yet-upstreamed mainline OpenSBI [4], as well as the vendor’s U-Boot. Because the vendor’s OpenSBI is loaded at 0x1f300000, we have to additionally reserve the DRAM region 0x1fe00000–0x1fffffff to prevent overlap if using vendor's OpenSBI.
---
Changes in v3:
- Update DT binding to use ACLINT instead of CLINT
- Drop MAINTAINERS patch
- Rebase on v6.18-rc1
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Add MAINTAINERS entry for the DR1V90 platform
- Remove the riscv,isa property of cpu and reorder propertyies
- Fix clint base address in the dtsi
- Change the memory node to cover the full 512MB RAM in board dts
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Junhui Liu (13):
dt-bindings: vendor-prefixes: Add Anlogic, Milianke and Nuclei
dt-bindings: riscv: Add Nuclei UX900 compatibles
dt-bindings: riscv: Add Anlogic DR1V90
dt-bindings: interrupt-controller: Add Anlogic DR1V90 PLIC
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
dt-bindings: timer: Add Anlogic DR1V90 ACLINT MTIMER
dt-bindings: serial: snps-dw-apb-uart: Add Anlogic DR1V90 uart irqchip/aclint-sswi: Add Nuclei UX900 support
riscv: Add Anlogic SoC famly Kconfig support
riscv: dts: Add initial Anlogic DR1V90 SoC device tree
riscv: dts: anlogic: Add Milianke MLKPAI FS01 board
riscv: defconfig: Enable Anlogic SoC
.../interrupt-controller/sifive,plic-1.0.0.yaml | 1 + .../thead,c900-aclint-mswi.yaml | 17 ++-- .../thead,c900-aclint-sswi.yaml | 4 + .../devicetree/bindings/riscv/anlogic.yaml | 27 ++++++ Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + .../bindings/serial/snps-dw-apb-uart.yaml | 1 + .../bindings/timer/thead,c900-aclint-mtimer.yaml | 17 ++-- .../devicetree/bindings/vendor-prefixes.yaml | 6 ++ arch/riscv/Kconfig.socs | 5 ++ arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/anlogic/Makefile | 2 + arch/riscv/boot/dts/anlogic/dr1v90-mlkpai-fs01.dts | 28 ++++++ arch/riscv/boot/dts/anlogic/dr1v90.dtsi | 100 +++++++++++++++++++++ arch/riscv/configs/defconfig | 1 + drivers/irqchip/irq-aclint-sswi.c | 3 +- 15 files changed, 201 insertions(+), 13 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20250710-dr1v90-basic-dt-352e9ae5acb8
Best regards,
Signature · 7 lines
Junhui Liu <[email protected]> _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v3 1/13 dt-bindings: vendor-prefixes: Add Anlogic, Milianke and Nuclei
Add vendor prefixes for "anlogic", "milianke" and "nuclei". These are required for describing the Milianke MLKPAI-FS01 board with DR1V90 SoC from Anlogic, which uses a processor core designed by Nuclei.
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +6 -0
@@ -132,6 +132,8 @@ patternProperties: description: Anbernic "^andestech,.*": description: Andes Technology Corporation + "^anlogic,.*": + description: Shanghai Anlogic Infotech Co., Ltd. "^anvo,.*": description: Anvo-Systems Dresden GmbH "^aoly,.*":
@@ -1023,6 +1025,8 @@ patternProperties: description: MikroElektronika d.o.o. "^mikrotik,.*": description: MikroTik + "^milianke,.*": + description: Changzhou Milianke Electronic Technology Co., Ltd "^milkv,.*": description: MilkV Technology Co., Ltd "^miniand,.*":
@@ -1140,6 +1144,8 @@ patternProperties: description: Novatek "^novtech,.*": description: NovTech, Inc. + "^nuclei,.*": + description: Nuclei System Technology "^numonyx,.*": description: Numonyx (deprecated, use micron) deprecated: true
Signature · 7 lines
2.51.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v3 2/13 dt-bindings: riscv: Add Nuclei UX900 compatibles
In reply to Junhui LiuThe UX900 is a RISC-V core from Nuclei, used in the Anlogic DR1V90 SoC. It features a 64-bit architecture and dual-issue, 9-stage pipeline, with lots of optional extensions including V, K, Zc, and more.
--- Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/cpus.yaml +1 -0
@@ -48,6 +48,7 @@ properties: - amd,mbv64 - andestech,ax45mp - canaan,k210 + - nuclei,ux900 - sifive,bullet0 - sifive,e5 - sifive,e7
Signature · 7 lines
2.51.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v3 3/13 dt-bindings: riscv: Add Anlogic DR1V90
In reply to Junhui LiuAdd Anlogic DR1V90 FPSoC, featuring a UX900 RISC-V core as the processing system (PS) and 94,464 LUTs programmable logic (PL). It is used by the Milianke MLKPAI-FS01 board, a SBC equipped with 512MB DDR3 memory, USB-C UART, 1GbE RJ45 Ethernet, USB-A 2.0 port, TF card slot, and 256Mbit Quad-SPI flash.
--- .../devicetree/bindings/riscv/anlogic.yaml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+)
Documentation/devicetree/bindings/riscv/anlogic.yaml new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/riscv/anlogic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Anlogic SoC-based boards + +maintainers: + - Junhui Liu <[email protected]> + +description: + Anlogic SoC-based boards + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - items: + - enum: + - milianke,mlkpai-fs01 + - const: anlogic,dr1v90 + +additionalProperties: true + +...
Signature · 1 line
2.51.1
PATCH v3 4/13 dt-bindings: interrupt-controller: Add Anlogic DR1V90 PLIC
In reply to Junhui LiuAdd PLIC support for Anlogic DR1V90.
--- .../devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +1 -0
@@ -58,6 +58,7 @@ properties: - const: andestech,nceplic100 - items: - enum: + - anlogic,dr1v90-plic - canaan,k210-plic - eswin,eic7700-plic - sifive,fu540-c000-plic
Signature · 1 line
2.51.1
[tip: irq/drivers] dt-bindings: interrupt-controller: Add Anlogic DR1V90 PLIC
The following commit has been merged into the irq/drivers branch of tip:
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: b90ac5fe3285aa8bed625375d1df959c4c9a2cdb Gitweb: https://git.kernel.org/tip/b90ac5fe3285aa8bed625375d1df959c4c9a2cdb Author: Junhui Liu <[email protected]> AuthorDate: Tue, 21 Oct 2025 17:41:39 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 11 Nov 2025 22:17:21 +01:00
dt-bindings: interrupt-controller: Add Anlogic DR1V90 PLIC
Add PLIC support for Anlogic DR1V90.
--- Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +1 -0
@@ -58,6 +58,7 @@ properties: - const: andestech,nceplic100 - items: - enum: + - anlogic,dr1v90-plic - canaan,k210-plic - eswin,eic7700-plic - sifive,fu540-c000-plic
PATCH v3 5/13 dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
In reply to Junhui LiuAdd MSWI support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
--- .../interrupt-controller/thead,c900-aclint-mswi.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-mswi.yaml +11 -6
@@ -4,18 +4,23 @@ $id: http://devicetree.org/schemas/interrupt-controller/thead,c900-aclint-mswi.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Sophgo sg2042 CLINT Machine-level Software Interrupt Device +title: ACLINT Machine-level Software Interrupt Device maintainers: - Inochi Amaoto <[email protected]> properties: compatible: - items: - - enum: - - sophgo,sg2042-aclint-mswi - - sophgo,sg2044-aclint-mswi - - const: thead,c900-aclint-mswi + oneOf: + - items: + - enum: + - sophgo,sg2042-aclint-mswi + - sophgo,sg2044-aclint-mswi + - const: thead,c900-aclint-mswi + - items: + - enum: + - anlogic,dr1v90-aclint-mswi + - const: nuclei,ux900-aclint-mswi reg: maxItems: 1
Signature · 1 line
2.51.1
Re: [PATCH v3 05/13] dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
Quoted 8 lines · Junhui Liu
Add MSWI support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
Signed-off-by Junhui Liu <[email protected]>--- .../interrupt-controller/thead,c900-aclint-mswi.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
[tip: irq/drivers] dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
In reply to Junhui LiuThe following commit has been merged into the irq/drivers branch of tip:
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 579951da64253e9592d21e54b1535e0119df78ab Gitweb: https://git.kernel.org/tip/579951da64253e9592d21e54b1535e0119df78ab Author: Junhui Liu <[email protected]> AuthorDate: Tue, 21 Oct 2025 17:41:40 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 11 Nov 2025 22:17:21 +01:00
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
Add MSWI support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
--- Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-mswi.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-mswi.yaml +11 -6
@@ -4,18 +4,23 @@ $id: http://devicetree.org/schemas/interrupt-controller/thead,c900-aclint-mswi.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Sophgo sg2042 CLINT Machine-level Software Interrupt Device +title: ACLINT Machine-level Software Interrupt Device maintainers: - Inochi Amaoto <[email protected]> properties: compatible: - items: - - enum: - - sophgo,sg2042-aclint-mswi - - sophgo,sg2044-aclint-mswi - - const: thead,c900-aclint-mswi + oneOf: + - items: + - enum: + - sophgo,sg2042-aclint-mswi + - sophgo,sg2044-aclint-mswi + - const: thead,c900-aclint-mswi + - items: + - enum: + - anlogic,dr1v90-aclint-mswi + - const: nuclei,ux900-aclint-mswi reg: maxItems: 1
PATCH v3 6/13 dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
In reply to Junhui LiuAdd SSWI support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
--- .../bindings/interrupt-controller/thead,c900-aclint-sswi.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml +4 -0
@@ -30,6 +30,10 @@ properties: - const: thead,c900-aclint-sswi - items: - const: mips,p8700-aclint-sswi + - items: + - enum: + - anlogic,dr1v90-aclint-sswi + - const: nuclei,ux900-aclint-sswi reg: maxItems: 1
Signature · 7 lines
2.51.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v3 06/13] dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
Quoted 8 lines · Junhui Liu
Add SSWI support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
Signed-off-by Junhui Liu <[email protected]>--- .../bindings/interrupt-controller/thead,c900-aclint-sswi.yaml | 4 ++++ 1 file changed, 4 insertions(+)
[tip: irq/drivers] dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
In reply to Junhui LiuThe following commit has been merged into the irq/drivers branch of tip:
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: a1c3a7d7ee0291e6bbc89192cb942cbebadb31fe Gitweb: https://git.kernel.org/tip/a1c3a7d7ee0291e6bbc89192cb942cbebadb31fe Author: Junhui Liu <[email protected]> AuthorDate: Tue, 21 Oct 2025 17:41:41 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 11 Nov 2025 22:17:21 +01:00
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
Add SSWI support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
--- Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-sswi.yaml +4 -0
@@ -30,6 +30,10 @@ properties: - const: thead,c900-aclint-sswi - items: - const: mips,p8700-aclint-sswi + - items: + - enum: + - anlogic,dr1v90-aclint-sswi + - const: nuclei,ux900-aclint-sswi reg: maxItems: 1
PATCH v3 7/13 dt-bindings: timer: Add Anlogic DR1V90 ACLINT MTIMER
In reply to Junhui LiuAdd MTIMER support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
--- .../bindings/timer/thead,c900-aclint-mtimer.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml +11 -6
@@ -4,18 +4,23 @@ $id: http://devicetree.org/schemas/timer/thead,c900-aclint-mtimer.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Sophgo CLINT Timer +title: ACLINT Machine-level Timer Device maintainers: - Inochi Amaoto <[email protected]> properties: compatible: - items: - - enum: - - sophgo,sg2042-aclint-mtimer - - sophgo,sg2044-aclint-mtimer - - const: thead,c900-aclint-mtimer + oneOf: + - items: + - enum: + - sophgo,sg2042-aclint-mtimer + - sophgo,sg2044-aclint-mtimer + - const: thead,c900-aclint-mtimer + - items: + - enum: + - anlogic,dr1v90-aclint-mtimer + - const: nuclei,ux900-aclint-mtimer reg: items:
Signature · 1 line
2.51.1
Re: [PATCH v3 07/13] dt-bindings: timer: Add Anlogic DR1V90 ACLINT MTIMER
Quoted 8 lines · Junhui Liu
Add MTIMER support for Anlogic DR1V90 SoC, which uses Nuclei UX900 with a TIMER unit compliant with the ACLINT specification.
Signed-off-by Junhui Liu <[email protected]>--- .../bindings/timer/thead,c900-aclint-mtimer.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
PATCH v3 8/13 dt-bindings: serial: snps-dw-apb-uart: Add Anlogic DR1V90 uart
In reply to Junhui LiuThe Anlogic DR1V90 SoC integrates a UART controller compatible with snps,dw-apb-uart, operating at a 50 MHz clock.
--- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +1 -0
@@ -51,6 +51,7 @@ properties: - const: renesas,rzn1-uart - items: - enum: + - anlogic,dr1v90-uart - brcm,bcm11351-dw-apb-uart - brcm,bcm21664-dw-apb-uart - rockchip,px30-uart
Signature · 1 line
2.51.1
PATCH v3 9/13 irqchip/aclint-sswi: Add Nuclei UX900 support
In reply to Junhui LiuReuse the generic ACLINT SSWI probe for Nuclei UX900 since it is compliant with the ACLINT specification.
--- drivers/irqchip/irq-aclint-sswi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-aclint-sswi.c +2 -1
@@ -175,7 +175,8 @@ static int __init generic_aclint_sswi_early_probe(struct device_node *node, {return generic_aclint_sswi_probe (&node->fwnode); } -IRQCHIP_DECLARE (generic_aclint_sswi,"mips,p8700-aclint-sswi" , generic_aclint_sswi_early_probe); +IRQCHIP_DECLARE (mips_p8700_sswi,"mips,p8700-aclint-sswi" , generic_aclint_sswi_early_probe); +IRQCHIP_DECLARE (nuclei_ux900_sswi,"nuclei,ux900-aclint-sswi" , generic_aclint_sswi_early_probe);/* THEAD variant */ #define THEAD_C9XX_CSR_SXSTATUS 0x5c0
Signature · 1 line
2.51.1
[tip: irq/drivers] irqchip/aclint-sswi: Add Nuclei UX900 support
The following commit has been merged into the irq/drivers branch of tip:
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 47a4ebbf91d31782113e7def707b53953bae3050 Gitweb: https://git.kernel.org/tip/47a4ebbf91d31782113e7def707b53953bae3050 Author: Junhui Liu <[email protected]> AuthorDate: Tue, 21 Oct 2025 17:41:44 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 11 Nov 2025 22:17:22 +01:00
irqchip/aclint-sswi: Add Nuclei UX900 support
Reuse the generic ACLINT SSWI probe for Nuclei UX900 since it is compliant with the ACLINT specification.
--- drivers/irqchip/irq-aclint-sswi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-aclint-sswi.c +2 -1
@@ -175,7 +175,8 @@ static int __init generic_aclint_sswi_early_probe(struct device_node *node, {return generic_aclint_sswi_probe (&node->fwnode); } -IRQCHIP_DECLARE (generic_aclint_sswi,"mips,p8700-aclint-sswi" , generic_aclint_sswi_early_probe); +IRQCHIP_DECLARE (mips_p8700_sswi,"mips,p8700-aclint-sswi" , generic_aclint_sswi_early_probe); +IRQCHIP_DECLARE (nuclei_ux900_sswi,"nuclei,ux900-aclint-sswi" , generic_aclint_sswi_early_probe);/* THEAD variant */ #define THEAD_C9XX_CSR_SXSTATUS 0x5c0
PATCH v3 10/13 riscv: Add Anlogic SoC famly Kconfig support
In reply to Junhui LiuThe first SoC in the Anlogic series is DR1V90, which contains a RISC-V core from Nuclei.
--- arch/riscv/Kconfig.socs | 5 +++++ 1 file changed, 5 insertions(+)
arch/riscv/Kconfig.socs +5 -0
@@ -7,6 +7,11 @@ config ARCH_ANDES help This enables support for Andes SoC platform hardware. +config ARCH_ANLOGIC + bool "Anlogic SoCs" + help + This enables support for Anlogic SoC platform hardware. + config ARCH_ESWIN bool "ESWIN SoCs" help
Signature · 1 line
2.51.1
PATCH v3 11/13 riscv: dts: Add initial Anlogic DR1V90 SoC device tree
In reply to Junhui LiuDR1V90 is a FPSoC from Anlogic, which features a RISC-V core as the PS part and 94,464 LUTs for the PL part.
The PS part integrates a Nuclei UX900 RISC-V core with 32KB L1 icache and 32KB L1 dcache. It also provides two "snps,dw-apb-uart" compatible UART controllers.
Some basic information of the processor can be obtained by running a simple application from nuclei-sdk [1]:
-----Nuclei RISC-V CPU Configuration Information-----
MARCHID: 0xc900
MIMPID: 0x20300
ISA: RV64 A B C D F I M P S U
MCFG: TEE ECC ECLIC PLIC PPI ILM DLM ICACHE DCACHE IREGION No-Safety-Mechanism DLEN=VLEN/2
ILM: 256 KB has-ecc
DLM: 256 KB has-ecc
ICACHE: 32 KB(set=256,way=2,lsize=64,ecc=1)
DCACHE: 32 KB(set=256,way=2,lsize=64,ecc=1)
TLB: MainTLB(set=32,way=2,entry=1,ecc=1) ITLB(entry=8) DTLB(entry=8)
IREGION: 0x68000000 128 MB
Unit Size Address
INFO 64KB 0x68000000
DEBUG 64KB 0x68010000
ECLIC 64KB 0x68020000
TIMER 64KB 0x68030000
PLIC 64MB 0x6c000000
INFO-Detail:
mpasize : 0
PPI: 0xf8000000 128 MB-----End of Nuclei CPU INFO-----
--- arch/riscv/boot/dts/anlogic/dr1v90.dtsi | 100 ++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+)
arch/riscv/boot/dts/anlogic/dr1v90.dtsi new file +100 -0
@@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2025 Junhui Liu <[email protected]> + */ + +/dts-v1/; +/ { + #address-cells = <2>; + #size-cells = <2>; + model = "Anlogic DR1V90"; + compatible = "anlogic,dr1v90"; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + timebase-frequency = <800000000>; + + cpu@0 { + compatible = "nuclei,ux900", "riscv"; + d-cache-block-size = <64>; + d-cache-sets = <256>; + d-cache-size = <32768>; + device_type = "cpu"; + i-cache-block-size = <64>; + i-cache-sets = <256>; + i-cache-size = <32768>; + mmu-type = "riscv,sv39"; + reg = <0>; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zba", "zbb", "zbc", + "zbkc", "zbs", "zicntr", "zicsr", "zifencei", + "zihintpause", "zihpm"; + + cpu0_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; + }; + + soc { + compatible = "simple-bus"; + interrupt-parent = <&plic>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + aclint_mswi: interrupt-controller@68031000 { + compatible = "anlogic,dr1v90-aclint-mswi", "nuclei,ux900-aclint-mswi"; + reg = <0x0 0x68031000 0x0 0x4000>; + interrupts-extended = <&cpu0_intc 3>; + }; + + aclint_mtimer: timer@68035000 { + compatible = "anlogic,dr1v90-aclint-mtimer", "nuclei,ux900-aclint-mtimer"; + reg = <0x0 0x68035000 0x0 0x8000>; + reg-names = "mtimecmp"; + interrupts-extended = <&cpu0_intc 7>; + }; + + aclint_sswi: interrupt-controller@6803d000 { + compatible = "anlogic,dr1v90-aclint-sswi", "nuclei,ux900-aclint-sswi"; + reg = <0x0 0x6803d000 0x0 0x3000>; + #interrupt-cells = <0>; + interrupt-controller; + interrupts-extended = <&cpu0_intc 1>; + }; + + plic: interrupt-controller@6c000000 { + compatible = "anlogic,dr1v90-plic", "sifive,plic-1.0.0"; + reg = <0x0 0x6c000000 0x0 0x4000000>; + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>; + riscv,ndev = <150>; + }; + + uart0: serial@f8400000 { + compatible = "anlogic,dr1v90-uart", "snps,dw-apb-uart"; + reg = <0x0 0xf8400000 0x0 0x1000>; + clock-frequency = <50000000>; + interrupts = <71>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + + uart1: serial@f8401000 { + compatible = "anlogic,dr1v90-uart", "snps,dw-apb-uart"; + reg = <0x0 0xf8401000 0x0 0x1000>; + clock-frequency = <50000000>; + interrupts = <72>; + reg-io-width = <4>; + reg-shift = <2>; + status = "disabled"; + }; + }; +};
Signature · 1 line
2.51.1
PATCH v3 12/13 riscv: dts: anlogic: Add Milianke MLKPAI FS01 board
In reply to Junhui LiuAdd support for the Milianke MLKPAI FS01 board based on the Anlogic DR1V90 SoC. The board features 512MB of onboard memory, USB-C UART, 1GbE RJ45 Ethernet, USB-A 2.0 port, TF card slot, and 256Mbit Quad-SPI flash.
Currently, the board can boot to a console via UART1, which is connected to the onboard serial chip and routed to the Type-C interface.
--- arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/anlogic/Makefile | 2 ++ arch/riscv/boot/dts/anlogic/dr1v90-mlkpai-fs01.dts | 28 ++++++++++++++++++++++ 3 files changed, 31 insertions(+)
arch/riscv/boot/dts/Makefile +1 -0
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 subdir-y += allwinner subdir-y += andes +subdir-y += anlogic subdir-y += canaan subdir-y += eswin subdir-y += microchip
arch/riscv/boot/dts/anlogic/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_ANLOGIC) += dr1v90-mlkpai-fs01.dtb
arch/riscv/boot/dts/anlogic/dr1v90-mlkpai-fs01.dts new file +28 -0
@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2025 Junhui Liu <[email protected]> + */ + +#include "dr1v90.dtsi" + +/ { + model = "Milianke MLKPAI-FS01"; + compatible = "milianke,mlkpai-fs01", "anlogic,dr1v90"; + + aliases { + serial0 = &uart1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x20000000>; + }; +}; + +&uart1 { + status = "okay"; +};
Signature · 1 line
2.51.1
PATCH v3 13/13 riscv: defconfig: Enable Anlogic SoC
In reply to Junhui LiuEnable Anlogic SoC config in defconfig to allow the default upstream kernel booting on Milianke MLKPAI-FS01 board.
--- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/riscv/configs/defconfig +1 -0
@@ -23,6 +23,7 @@ CONFIG_CHECKPOINT_RESTORE=y CONFIG_BLK_DEV_INITRD=y CONFIG_PROFILING=y CONFIG_ARCH_ANDES=y +CONFIG_ARCH_ANLOGIC=y CONFIG_ARCH_MICROCHIP=y CONFIG_ARCH_SIFIVE=y CONFIG_ARCH_SOPHGO=y
Signature · 1 line
2.51.1
Conor Dooley
maintainerThomas, Junhui,
Quoted 33 lines · Junhui Liu
This introduces initial support for the Anlogic DR1V90 SoC [1] and the Milianke MLKPAI-FS01 [2] board.
The DR1V90 is a RISC-V based FPSoC from Anlogic, featuring a Nuclei UX900 [3] core as its processing system (PS) and 94,464 LUTs in the programmable logic (PL) part. The Milianke MLKPAI-FS01 board is one of the first platforms based on this SoC, with UART1 routed to a Type-C interface for console access.
Tested on the Milianke MLKPAI-FS01 board with both the vendor's OpenSBI and the not-yet-upstreamed mainline OpenSBI [4], as well as the vendor’s U-Boot. Because the vendor’s OpenSBI is loaded at
0x1f300000, we have to additionally reserve the DRAM region 0x1fe00000–0x1fffffff to prevent overlap if using vendor's OpenSBI.---
Changes in v3:
- Update DT binding to use ACLINT instead of CLINT
- DropMAINTAINERSpatch
- Rebase on v6.18-rc1
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- AddMAINTAINERSentry for the DR1V90 platform
- Remove the riscv,isa property of cpu and reorder propertyies
- Fix clint base address in the dtsi
- Change the memory node to cover the full 512MB RAM in board dts
- Link to v1: https://lore.kernel.org/r/[email protected]
Quoted 11 lines
---
Junhui Liu (13):
dt-bindings: vendor-prefixes: Add Anlogic, Milianke and Nuclei
dt-bindings: riscv: Add Nuclei UX900 compatibles
dt-bindings: riscv: Add Anlogic DR1V90
dt-bindings: interrupt-controller: Add Anlogic DR1V90 PLIC
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
dt-bindings: timer: Add Anlogic DR1V90 ACLINT MTIMER
dt-bindings: serial: snps-dw-apb-uart: Add Anlogic DR1V90 uart irqchip/aclint-sswi: Add Nuclei UX900 support
I'm happy enough with this series to grab it, but while I don't mind taking some trivial binding changes with it, I don't want to take an irqchip driver patch. Would you be able to apply the irqchip stuff Thomas?
Cheers,
Conor.
Conor Dooley
maintainerThomas,
Quoted 48 lines · Conor Dooley
Thomas, Junhui,
Quoted 33 lines · Junhui Liu
This introduces initial support for the Anlogic DR1V90 SoC [1] and the Milianke MLKPAI-FS01 [2] board.
The DR1V90 is a RISC-V based FPSoC from Anlogic, featuring a Nuclei UX900 [3] core as its processing system (PS) and 94,464 LUTs in the programmable logic (PL) part. The Milianke MLKPAI-FS01 board is one of the first platforms based on this SoC, with UART1 routed to a Type-C interface for console access.
Tested on the Milianke MLKPAI-FS01 board with both the vendor's OpenSBI and the not-yet-upstreamed mainline OpenSBI [4], as well as the vendor’s U-Boot. Because the vendor’s OpenSBI is loaded at
0x1f300000, we have to additionally reserve the DRAM region 0x1fe00000–0x1fffffff to prevent overlap if using vendor's OpenSBI.---
Changes in v3:
- Update DT binding to use ACLINT instead of CLINT
- DropMAINTAINERSpatch
- Rebase on v6.18-rc1
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- AddMAINTAINERSentry for the DR1V90 platform
- Remove the riscv,isa property of cpu and reorder propertyies
- Fix clint base address in the dtsi
- Change the memory node to cover the full 512MB RAM in board dts
- Link to v1: https://lore.kernel.org/r/[email protected]Quoted 11 lines
---
Junhui Liu (13):
dt-bindings: vendor-prefixes: Add Anlogic, Milianke and Nuclei
dt-bindings: riscv: Add Nuclei UX900 compatibles
dt-bindings: riscv: Add Anlogic DR1V90
dt-bindings: interrupt-controller: Add Anlogic DR1V90 PLIC
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT MSWI
dt-bindings: interrupt-controller: Add Anlogic DR1V90 ACLINT SSWI
dt-bindings: timer: Add Anlogic DR1V90 ACLINT MTIMER
dt-bindings: serial: snps-dw-apb-uart: Add Anlogic DR1V90 uart irqchip/aclint-sswi: Add Nuclei UX900 support
Quoted 4 lines
I'm happy enough with this series to grab it, but while I don't mind taking some trivial binding changes with it, I don't want to take an irqchip driver patch. Would you be able to apply the irqchip stuff Thomas?
Could you pick up 4-6 and 9 here please?
Conor Dooley
maintainerQuoted 15 lines · Junhui Liu
This introduces initial support for the Anlogic DR1V90 SoC [1] and the Milianke MLKPAI-FS01 [2] board.
The DR1V90 is a RISC-V based FPSoC from Anlogic, featuring a Nuclei UX900 [3] core as its processing system (PS) and 94,464 LUTs in the programmable logic (PL) part. The Milianke MLKPAI-FS01 board is one of the first platforms based on this SoC, with UART1 routed to a Type-C interface for console access.
Tested on the Milianke MLKPAI-FS01 board with both the vendor's OpenSBI and the not-yet-upstreamed mainline OpenSBI [4], as well as the vendor’s U-Boot. Because the vendor’s OpenSBI is loaded at
0x1f300000, we have to additionally reserve the DRAM region 0x1fe00000–0x1fffffff to prevent overlap if using vendor's OpenSBI.
Quoted 4 lines
Thanks for grabbing the irqchip stuff Thomas.
I've applied this, with myself listed as maintainer. I set the status to "Odd Fixes" because I will be doing no work on it and only applying patches that people send in. I'll happy pass the platform off to someone qualified to maintain it, should that person be willing to do so :)
Patches are here:
https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/log/?h=anlogic-initial
I'll submit as a standalone PR to Arnd et al over in the soc group for the next release.
Cheers,
Conor.