devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] add Voyager board support
@ 2025-04-07 10:49 Ben Zong-You Xie
  2025-04-07 10:49 ` [PATCH 1/9] riscv: add Andes SoC family Kconfig support Ben Zong-You Xie
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

The Voyager is a 9.6” x 9.6” Micro ATX form factor development board including
Andes QiLai SoC. This patch series adds minimal device tree files for the QiLai
SoC and the Voyager board [1].

Now only support basic uart drivers to boot up into a basic console. Other
features will be added later.

[1] https://www.andestech.com/en/products-solutions/andeshape-platforms/qilai-chip/

Ben Zong-You Xie (9):
  riscv: add Andes SoC family Kconfig support
  dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings
  dt-bindings: interrupt-controller: add Andes QiLai PLIC
  dt-bindings: interrupt-controller: add Andes machine-level software
    interrupt controller
  dt-bindings: timer: add Andes machine timer
  dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes
    L2 cache
  riscv: dts: andes: add QiLai SoC device tree
  riscv: dts: andes: add Voyager board device tree
  riscv: defconfig: enable Andes SoC

 .../cache/andestech,ax45mp-cache.yaml         |   2 +-
 .../andestech,plicsw.yaml                     |  48 +++++
 .../sifive,plic-1.0.0.yaml                    |   1 +
 .../devicetree/bindings/riscv/andes.yaml      |  25 +++
 .../bindings/timer/andestech,plmt0.yaml       |  42 ++++
 MAINTAINERS                                   |   8 +
 arch/riscv/Kconfig.errata                     |   2 +-
 arch/riscv/Kconfig.socs                       |   9 +
 arch/riscv/boot/dts/Makefile                  |   1 +
 arch/riscv/boot/dts/andes/Makefile            |   2 +
 arch/riscv/boot/dts/andes/qilai-voyager.dts   |  19 ++
 arch/riscv/boot/dts/andes/qilai.dtsi          | 194 ++++++++++++++++++
 arch/riscv/configs/defconfig                  |   1 +
 13 files changed, 352 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
 create mode 100644 Documentation/devicetree/bindings/riscv/andes.yaml
 create mode 100644 Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
 create mode 100644 arch/riscv/boot/dts/andes/Makefile
 create mode 100644 arch/riscv/boot/dts/andes/qilai-voyager.dts
 create mode 100644 arch/riscv/boot/dts/andes/qilai.dtsi

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 1/9] riscv: add Andes SoC family Kconfig support
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 10:49 ` [PATCH 2/9] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings Ben Zong-You Xie
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

The first SoC in the Andes series is QiLai. It includes a high-performance
quad-core RISC-V AX45MP cluster and one NX27V vector processor.

For further information, refer to [1].

[1] https://www.andestech.com/en/products-solutions/andeshape-platforms/qilai-chip/

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 arch/riscv/Kconfig.errata | 2 +-
 arch/riscv/Kconfig.socs   | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/Kconfig.errata b/arch/riscv/Kconfig.errata
index e318119d570d..be76883704a6 100644
--- a/arch/riscv/Kconfig.errata
+++ b/arch/riscv/Kconfig.errata
@@ -12,7 +12,7 @@ config ERRATA_ANDES
 
 config ERRATA_ANDES_CMO
 	bool "Apply Andes cache management errata"
-	depends on ERRATA_ANDES && ARCH_R9A07G043
+	depends on ERRATA_ANDES && (ARCH_R9A07G043 || ARCH_ANDES)
 	select RISCV_DMA_NONCOHERENT
 	default y
 	help
diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 8b503e54fa1b..2f1626daaad1 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -1,5 +1,14 @@
 menu "SoC selection"
 
+config ARCH_ANDES
+	bool "Andes SoCs"
+	depends on MMU && !XIP_KERNEL
+	select ERRATA_ANDES
+	select ERRATA_ANDES_CMO
+	select AX45MP_L2_CACHE
+	help
+	  This enables support for Andes SoC platform hardware.
+
 config ARCH_MICROCHIP_POLARFIRE
 	def_bool ARCH_MICROCHIP
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 2/9] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
  2025-04-07 10:49 ` [PATCH 1/9] riscv: add Andes SoC family Kconfig support Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:13   ` Rob Herring (Arm)
  2025-04-07 10:49 ` [PATCH 3/9] dt-bindings: interrupt-controller: add Andes QiLai PLIC Ben Zong-You Xie
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Add DT binding documentation for the Andes QiLai SoC and the
Voyager development board.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 .../devicetree/bindings/riscv/andes.yaml      | 25 +++++++++++++++++++
 MAINTAINERS                                   |  5 ++++
 2 files changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/riscv/andes.yaml

diff --git a/Documentation/devicetree/bindings/riscv/andes.yaml b/Documentation/devicetree/bindings/riscv/andes.yaml
new file mode 100644
index 000000000000..aa1edf1fdec7
--- /dev/null
+++ b/Documentation/devicetree/bindings/riscv/andes.yaml
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/riscv/andes.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes SoC-based boards
+
+maintainers:
+  - Ben Zong-You Xie <ben717@andestech.com>
+
+description:
+  Andes SoC-based boards
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - andestech,voyager
+          - const: andestech,qilai
+
+additionalProperties: true
diff --git a/MAINTAINERS b/MAINTAINERS
index 96b827049501..a0ccac1cca29 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20725,6 +20725,11 @@ F:	drivers/irqchip/irq-riscv-intc.c
 F:	include/linux/irqchip/riscv-aplic.h
 F:	include/linux/irqchip/riscv-imsic.h
 
+RISC-V ANDES SoC Support
+M:	Ben Zong-You Xie <ben717@andestech.com>
+S:	Maintained
+F:	Documentation/devicetree/bindings/riscv/andes.yaml
+
 RISC-V ARCHITECTURE
 M:	Paul Walmsley <paul.walmsley@sifive.com>
 M:	Palmer Dabbelt <palmer@dabbelt.com>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 3/9] dt-bindings: interrupt-controller: add Andes QiLai PLIC
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
  2025-04-07 10:49 ` [PATCH 1/9] riscv: add Andes SoC family Kconfig support Ben Zong-You Xie
  2025-04-07 10:49 ` [PATCH 2/9] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:14   ` Rob Herring (Arm)
  2025-04-07 10:49 ` [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller Ben Zong-You Xie
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Add a new compatible string for Andes QiLai PLIC.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
index 3dfe425909d1..7ae61518e9b7 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml
@@ -53,6 +53,7 @@ properties:
     oneOf:
       - items:
           - enum:
+              - andestech,qilai-plic
               - renesas,r9a07g043-plic
           - const: andestech,nceplic100
       - items:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
                   ` (2 preceding siblings ...)
  2025-04-07 10:49 ` [PATCH 3/9] dt-bindings: interrupt-controller: add Andes QiLai PLIC Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:17   ` Rob Herring
  2025-04-07 10:49 ` [PATCH 5/9] dt-bindings: timer: add Andes machine timer Ben Zong-You Xie
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Add the DT binding documentation for Andes machine-level software
interrupt controller.

In the Andes platform such as QiLai SoC, the PLIC module is instantiated a
second time with all interrupt sources tied to zero as the software
interrupt controller (PLICSW). PLICSW can generate machine-level software
interrupts through programming its registers.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 .../andestech,plicsw.yaml                     | 48 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml b/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
new file mode 100644
index 000000000000..5432fcfd95ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/andestech,plicsw.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes machine-level software interrupt controller
+
+description:
+  In the Andes platform such as QiLai SoC, the PLIC module is instantiated a
+  second time with all interrupt sources tied to zero as the software interrupt
+  controller (PLIC_SW). PLIC_SW can generate machine-level software interrupts
+  through programming its registers.
+
+maintainers:
+  - Ben Zong-You Xie <ben717@andestech.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - andestech,qilai-plicsw
+      - const: andestech,plicsw
+
+  reg:
+    maxItems: 1
+
+  interrupts-extended:
+    minItems: 1
+    maxItems: 15872
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts-extended
+
+examples:
+  - |
+    interrupt-controller@400000 {
+      compatible = "andestech,qilai-plicsw", "andestech,plicsw";
+      reg = <0x400000 0x400000>;
+      interrupts-extended = <&cpu0intc 3>,
+                            <&cpu1intc 3>,
+                            <&cpu2intc 3>,
+                            <&cpu3intc 3>;
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index a0ccac1cca29..645d7137cb07 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20728,6 +20728,7 @@ F:	include/linux/irqchip/riscv-imsic.h
 RISC-V ANDES SoC Support
 M:	Ben Zong-You Xie <ben717@andestech.com>
 S:	Maintained
+F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
 F:	Documentation/devicetree/bindings/riscv/andes.yaml
 
 RISC-V ARCHITECTURE
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 5/9] dt-bindings: timer: add Andes machine timer
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
                   ` (3 preceding siblings ...)
  2025-04-07 10:49 ` [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:18   ` Rob Herring
  2025-04-07 10:49 ` [PATCH 6/9] dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes L2 cache Ben Zong-You Xie
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Add the DT binding documentation for Andes machine timer.

The RISC-V architecture defines a machine timer that provides a real-time
counter and generates timer interrupts. Andes machiner timer (PLMT0) is
the implementation of the machine timer, and it contains memory-mapped
registers (mtime and mtimecmp). This device supports up to 32 cores.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 .../bindings/timer/andestech,plmt0.yaml       | 42 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/timer/andestech,plmt0.yaml

diff --git a/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml b/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
new file mode 100644
index 000000000000..e0ea3ce86b76
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/andestech,plmt0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Andes machine timer
+
+maintainers:
+  - Ben Zong-You Xie <ben717@andestech.com>
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - andestech,qilai-aclint-mtimer
+      - const: andestech,plmt0
+
+  reg:
+    maxItems: 1
+
+  interrupts-extended:
+    minItems: 1
+    maxItems: 32
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts-extended
+
+examples:
+  - |
+    interrupt-controller@100000 {
+      compatible = "andestech,qilai-aclint-mtimer", "andestech,plmt0";
+      reg = <0x100000 0x100000>;
+      interrupts-extended = <&cpu0intc 7>,
+                            <&cpu1intc 7>,
+                            <&cpu2intc 7>,
+                            <&cpu3intc 7>;
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 645d7137cb07..d1e1b98dfe7b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20730,6 +20730,7 @@ M:	Ben Zong-You Xie <ben717@andestech.com>
 S:	Maintained
 F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
 F:	Documentation/devicetree/bindings/riscv/andes.yaml
+F:	Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
 
 RISC-V ARCHITECTURE
 M:	Paul Walmsley <paul.walmsley@sifive.com>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 6/9] dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes L2 cache
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
                   ` (4 preceding siblings ...)
  2025-04-07 10:49 ` [PATCH 5/9] dt-bindings: timer: add Andes machine timer Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:19   ` Rob Herring (Arm)
  2025-04-07 10:49 ` [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree Ben Zong-You Xie
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

The current device tree binding for the Andes AX45MP L2 cache enforces
a fixed number of cache-sets (1024). However, there are 2048 cache-sets in
the QiLai SoC. This change allows both 1024 and 2048 as valid values for
"cache-sets".

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 .../devicetree/bindings/cache/andestech,ax45mp-cache.yaml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/cache/andestech,ax45mp-cache.yaml b/Documentation/devicetree/bindings/cache/andestech,ax45mp-cache.yaml
index d2cbe49f4e15..798aa71dc4ec 100644
--- a/Documentation/devicetree/bindings/cache/andestech,ax45mp-cache.yaml
+++ b/Documentation/devicetree/bindings/cache/andestech,ax45mp-cache.yaml
@@ -44,7 +44,7 @@ properties:
     const: 2
 
   cache-sets:
-    const: 1024
+    enum: [1024, 2048]
 
   cache-size:
     enum: [131072, 262144, 524288, 1048576, 2097152]
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
                   ` (5 preceding siblings ...)
  2025-04-07 10:49 ` [PATCH 6/9] dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes L2 cache Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:30   ` Krzysztof Kozlowski
  2025-04-08 16:43   ` Conor Dooley
  2025-04-07 10:49 ` [PATCH 8/9] riscv: dts: andes: add Voyager board " Ben Zong-You Xie
  2025-04-07 10:49 ` [PATCH 9/9] riscv: defconfig: enable Andes SoC Ben Zong-You Xie
  8 siblings, 2 replies; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Introduce the initial device tree support for the Andes QiLai SoC.

For further information, you can refer to [1].

[1] https://www.andestech.com/en/products-solutions/andeshape-platforms/qilai-chip/

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 MAINTAINERS                          |   1 +
 arch/riscv/boot/dts/andes/qilai.dtsi | 194 +++++++++++++++++++++++++++
 2 files changed, 195 insertions(+)
 create mode 100644 arch/riscv/boot/dts/andes/qilai.dtsi

diff --git a/MAINTAINERS b/MAINTAINERS
index d1e1b98dfe7b..b974e83c9f10 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20731,6 +20731,7 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
 F:	Documentation/devicetree/bindings/riscv/andes.yaml
 F:	Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
+F:	arch/riscv/boot/dts/andes/
 
 RISC-V ARCHITECTURE
 M:	Paul Walmsley <paul.walmsley@sifive.com>
diff --git a/arch/riscv/boot/dts/andes/qilai.dtsi b/arch/riscv/boot/dts/andes/qilai.dtsi
new file mode 100644
index 000000000000..7199a88afc9b
--- /dev/null
+++ b/arch/riscv/boot/dts/andes/qilai.dtsi
@@ -0,0 +1,194 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2025 Andes Technology Corporation. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		timebase-frequency = <62500000>;
+
+		cpu0: cpu@0 {
+			compatible = "andestech,ax45mp", "riscv";
+			device_type = "cpu";
+			status = "okay";
+			reg = <0>;
+			riscv,isa-base = "rv64i";
+			riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+					       "zicntr", "zicsr", "zifencei",
+					       "zihpm", "xandespmu";
+			mmu-type = "riscv,sv39";
+			clock-frequency = <100000000>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <256>;
+			i-cache-line-size = <64>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <128>;
+			d-cache-line-size = <64>;
+			next-level-cache = <&l2_cache>;
+
+			cpu0_intc: interrupt-controller {
+				compatible = "andestech,cpu-intc", "riscv,cpu-intc";
+				#interrupt-cells = <1>;
+				interrupt-controller;
+			};
+		};
+
+		cpu1: cpu@1 {
+			compatible = "andestech,ax45mp", "riscv";
+			device_type = "cpu";
+			status = "okay";
+			reg = <1>;
+			riscv,isa-base = "rv64i";
+			riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+					       "zicntr", "zicsr", "zifencei",
+					       "zihpm", "xandespmu";
+			mmu-type = "riscv,sv39";
+			clock-frequency = <100000000>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <256>;
+			i-cache-line-size = <64>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <128>;
+			d-cache-line-size = <64>;
+			next-level-cache = <&l2_cache>;
+
+			cpu1_intc: interrupt-controller {
+				compatible = "andestech,cpu-intc", "riscv,cpu-intc";
+				#interrupt-cells = <1>;
+				interrupt-controller;
+			};
+		};
+
+		cpu2: cpu@2 {
+			compatible = "andestech,ax45mp", "riscv";
+			device_type = "cpu";
+			status = "okay";
+			reg = <2>;
+			riscv,isa-base = "rv64i";
+			riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+					       "zicntr", "zicsr", "zifencei",
+					       "zihpm", "xandespmu";
+			mmu-type = "riscv,sv39";
+			clock-frequency = <100000000>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <256>;
+			i-cache-line-size = <64>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <128>;
+			d-cache-line-size = <64>;
+			next-level-cache = <&l2_cache>;
+
+			cpu2_intc: interrupt-controller {
+				compatible = "andestech,cpu-intc", "riscv,cpu-intc";
+				#interrupt-cells = <1>;
+				interrupt-controller;
+			};
+		};
+
+		cpu3: cpu@3 {
+			compatible = "andestech,ax45mp", "riscv";
+			device_type = "cpu";
+			status = "okay";
+			reg = <3>;
+			riscv,isa-base = "rv64i";
+			riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
+					       "zicntr", "zicsr", "zifencei",
+					       "zihpm", "xandespmu";
+			mmu-type = "riscv,sv39";
+			clock-frequency = <100000000>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <256>;
+			i-cache-line-size = <64>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <128>;
+			d-cache-line-size = <64>;
+			next-level-cache = <&l2_cache>;
+
+			cpu3_intc: interrupt-controller {
+				compatible = "andestech,cpu-intc", "riscv,cpu-intc";
+				#interrupt-cells = <1>;
+				interrupt-controller;
+			};
+		};
+	};
+
+	memory@400000000 {
+		device_type = "memory";
+		reg = <0x4 0x00000000 0x4 0x00000000>;
+	};
+
+	soc {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		compatible = "simple-bus";
+		ranges;
+
+		plic: interrupt-controller@2000000 {
+			compatible = "andestech,qilai-plic", "andestech,nceplic100";
+			#address-cells = <0>;
+			#interrupt-cells = <2>;
+			interrupt-controller;
+			reg = <0x0 0x2000000 0x0 0x2000000>;
+			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+					      <&cpu1_intc 11>, <&cpu1_intc 9>,
+					      <&cpu2_intc 11>, <&cpu2_intc 9>,
+					      <&cpu3_intc 11>, <&cpu3_intc 9>;
+			riscv,ndev = <71>;
+		};
+
+		plic_sw: interrupt-controller@400000 {
+			compatible = "andestech,qilai-plicsw", "andestech,plicsw";
+			reg = <0x0 0x400000 0x0 0x400000>;
+			interrupts-extended = <&cpu0_intc 3>,
+					      <&cpu1_intc 3>,
+					      <&cpu2_intc 3>,
+					      <&cpu3_intc 3>;
+		};
+
+		plmt: timer@100000 {
+			compatible = "andestech,qilai-aclint-mtimer", "andestech,plmt0";
+			reg = <0x0 0x100000 0x0 0x100000>;
+			interrupts-extended = <&cpu0_intc 7>,
+					      <&cpu1_intc 7>,
+					      <&cpu2_intc 7>,
+					      <&cpu3_intc 7>;
+		};
+
+		l2_cache: cache-controller@200000 {
+			compatible = "andestech,ax45mp-cache", "cache";
+			reg = <0x0 0x200000 0x0 0x100000>;
+			interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&plic>;
+			cache-line-size = <64>;
+			cache-level = <2>;
+			cache-sets = <2048>;
+			cache-size = <0x200000>;
+			cache-unified;
+		};
+
+		uart0: serial@30300000 {
+			compatible = "andestech,uart16550", "ns16550a";
+			reg = <0x0 0x30300000 0x0 0x100000>;
+			interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
+			clock-frequency = <50000000>;
+			reg-offset = <32>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			no-loopback-test;
+			interrupt-parent = <&plic>;
+		};
+	};
+};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 8/9] riscv: dts: andes: add Voyager board device tree
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
                   ` (6 preceding siblings ...)
  2025-04-07 10:49 ` [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  2025-04-07 14:31   ` Krzysztof Kozlowski
  2025-04-07 10:49 ` [PATCH 9/9] riscv: defconfig: enable Andes SoC Ben Zong-You Xie
  8 siblings, 1 reply; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Introduce the device tree support for Voyager development board.

Currently only support booting into console with only uart,
other features will be added later.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 arch/riscv/boot/dts/Makefile                |  1 +
 arch/riscv/boot/dts/andes/Makefile          |  2 ++
 arch/riscv/boot/dts/andes/qilai-voyager.dts | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 arch/riscv/boot/dts/andes/Makefile
 create mode 100644 arch/riscv/boot/dts/andes/qilai-voyager.dts

diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
index 64a898da9aee..3b99e91efa25 100644
--- a/arch/riscv/boot/dts/Makefile
+++ b/arch/riscv/boot/dts/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 subdir-y += allwinner
+subdir-y += andes
 subdir-y += canaan
 subdir-y += microchip
 subdir-y += renesas
diff --git a/arch/riscv/boot/dts/andes/Makefile b/arch/riscv/boot/dts/andes/Makefile
new file mode 100644
index 000000000000..c833e041c220
--- /dev/null
+++ b/arch/riscv/boot/dts/andes/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_ANDES) += qilai-voyager.dtb
\ No newline at end of file
diff --git a/arch/riscv/boot/dts/andes/qilai-voyager.dts b/arch/riscv/boot/dts/andes/qilai-voyager.dts
new file mode 100644
index 000000000000..469025b0efc4
--- /dev/null
+++ b/arch/riscv/boot/dts/andes/qilai-voyager.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2025 Andes Technology Corporation. All rights reserved.
+ */
+
+#include "qilai.dtsi"
+
+/ {
+	model = "Voyager";
+	compatible = "andestech,voyager", "andestech,qilai";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 9/9] riscv: defconfig: enable Andes SoC
  2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
                   ` (7 preceding siblings ...)
  2025-04-07 10:49 ` [PATCH 8/9] riscv: dts: andes: add Voyager board " Ben Zong-You Xie
@ 2025-04-07 10:49 ` Ben Zong-You Xie
  8 siblings, 0 replies; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-07 10:49 UTC (permalink / raw)
  To: devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609,
	Ben Zong-You Xie

Enable Andes SoC config in defconfig to allow the default
upstream kernel to boot on Voyager board.

Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 arch/riscv/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 3c8e16d71e17..c9214635fb2f 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -25,6 +25,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_EXPERT=y
 # CONFIG_SYSFS_SYSCALL is not set
 CONFIG_PROFILING=y
+CONFIG_ARCH_ANDES=y
 CONFIG_ARCH_MICROCHIP=y
 CONFIG_ARCH_SIFIVE=y
 CONFIG_ARCH_SOPHGO=y
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/9] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings
  2025-04-07 10:49 ` [PATCH 2/9] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings Ben Zong-You Xie
@ 2025-04-07 14:13   ` Rob Herring (Arm)
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring (Arm) @ 2025-04-07 14:13 UTC (permalink / raw)
  To: Ben Zong-You Xie
  Cc: conor+dt, devicetree, tglx, prabhakar.mahadev-lad.rj, krzk+dt,
	alex, aou, tim609, daniel.lezcano, paul.walmsley, palmer,
	linux-riscv, linux-kernel


On Mon, 07 Apr 2025 18:49:30 +0800, Ben Zong-You Xie wrote:
> Add DT binding documentation for the Andes QiLai SoC and the
> Voyager development board.
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  .../devicetree/bindings/riscv/andes.yaml      | 25 +++++++++++++++++++
>  MAINTAINERS                                   |  5 ++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/riscv/andes.yaml
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 3/9] dt-bindings: interrupt-controller: add Andes QiLai PLIC
  2025-04-07 10:49 ` [PATCH 3/9] dt-bindings: interrupt-controller: add Andes QiLai PLIC Ben Zong-You Xie
@ 2025-04-07 14:14   ` Rob Herring (Arm)
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring (Arm) @ 2025-04-07 14:14 UTC (permalink / raw)
  To: Ben Zong-You Xie
  Cc: palmer, alex, conor+dt, linux-riscv, prabhakar.mahadev-lad.rj,
	paul.walmsley, linux-kernel, devicetree, aou, krzk+dt, tim609,
	tglx, daniel.lezcano


On Mon, 07 Apr 2025 18:49:31 +0800, Ben Zong-You Xie wrote:
> Add a new compatible string for Andes QiLai PLIC.
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml         | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller
  2025-04-07 10:49 ` [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller Ben Zong-You Xie
@ 2025-04-07 14:17   ` Rob Herring
  2025-04-21 12:19     ` Ben Zong-You Xie
  0 siblings, 1 reply; 19+ messages in thread
From: Rob Herring @ 2025-04-07 14:17 UTC (permalink / raw)
  To: Ben Zong-You Xie
  Cc: devicetree, linux-riscv, linux-kernel, paul.walmsley, palmer, aou,
	alex, krzk+dt, conor+dt, tglx, daniel.lezcano,
	prabhakar.mahadev-lad.rj, tim609

On Mon, Apr 07, 2025 at 06:49:32PM +0800, Ben Zong-You Xie wrote:
> Add the DT binding documentation for Andes machine-level software
> interrupt controller.
> 
> In the Andes platform such as QiLai SoC, the PLIC module is instantiated a
> second time with all interrupt sources tied to zero as the software
> interrupt controller (PLICSW). PLICSW can generate machine-level software
> interrupts through programming its registers.
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  .../andestech,plicsw.yaml                     | 48 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml b/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> new file mode 100644
> index 000000000000..5432fcfd95ed
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/interrupt-controller/andestech,plicsw.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Andes machine-level software interrupt controller
> +
> +description:
> +  In the Andes platform such as QiLai SoC, the PLIC module is instantiated a
> +  second time with all interrupt sources tied to zero as the software interrupt
> +  controller (PLIC_SW). PLIC_SW can generate machine-level software interrupts
> +  through programming its registers.
> +
> +maintainers:
> +  - Ben Zong-You Xie <ben717@andestech.com>
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - andestech,qilai-plicsw
> +      - const: andestech,plicsw

Drop the fallback. If you have another implementation that's compatible, 
then andestech,qilai-plicsw will be the fallback.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts-extended:
> +    minItems: 1
> +    maxItems: 15872
> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts-extended
> +
> +examples:
> +  - |
> +    interrupt-controller@400000 {
> +      compatible = "andestech,qilai-plicsw", "andestech,plicsw";
> +      reg = <0x400000 0x400000>;
> +      interrupts-extended = <&cpu0intc 3>,
> +                            <&cpu1intc 3>,
> +                            <&cpu2intc 3>,
> +                            <&cpu3intc 3>;
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a0ccac1cca29..645d7137cb07 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -20728,6 +20728,7 @@ F:	include/linux/irqchip/riscv-imsic.h
>  RISC-V ANDES SoC Support
>  M:	Ben Zong-You Xie <ben717@andestech.com>
>  S:	Maintained
> +F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
>  F:	Documentation/devicetree/bindings/riscv/andes.yaml
>  
>  RISC-V ARCHITECTURE
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 5/9] dt-bindings: timer: add Andes machine timer
  2025-04-07 10:49 ` [PATCH 5/9] dt-bindings: timer: add Andes machine timer Ben Zong-You Xie
@ 2025-04-07 14:18   ` Rob Herring
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring @ 2025-04-07 14:18 UTC (permalink / raw)
  To: Ben Zong-You Xie
  Cc: devicetree, linux-riscv, linux-kernel, paul.walmsley, palmer, aou,
	alex, krzk+dt, conor+dt, tglx, daniel.lezcano,
	prabhakar.mahadev-lad.rj, tim609

On Mon, Apr 07, 2025 at 06:49:33PM +0800, Ben Zong-You Xie wrote:
> Add the DT binding documentation for Andes machine timer.
> 
> The RISC-V architecture defines a machine timer that provides a real-time
> counter and generates timer interrupts. Andes machiner timer (PLMT0) is
> the implementation of the machine timer, and it contains memory-mapped
> registers (mtime and mtimecmp). This device supports up to 32 cores.
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  .../bindings/timer/andestech,plmt0.yaml       | 42 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 43 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
> 
> diff --git a/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml b/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
> new file mode 100644
> index 000000000000..e0ea3ce86b76
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/timer/andestech,plmt0.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Andes machine timer
> +
> +maintainers:
> +  - Ben Zong-You Xie <ben717@andestech.com>
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - andestech,qilai-aclint-mtimer
> +      - const: andestech,plmt0

Drop the fallback.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts-extended:
> +    minItems: 1
> +    maxItems: 32

Here and in the plicsw, it would be good to describe what determines how 
many interrupts there are and what's the mapping (index 0 is ???, index 
1 is ???).

> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts-extended
> +
> +examples:
> +  - |
> +    interrupt-controller@100000 {
> +      compatible = "andestech,qilai-aclint-mtimer", "andestech,plmt0";
> +      reg = <0x100000 0x100000>;
> +      interrupts-extended = <&cpu0intc 7>,
> +                            <&cpu1intc 7>,
> +                            <&cpu2intc 7>,
> +                            <&cpu3intc 7>;
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 645d7137cb07..d1e1b98dfe7b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -20730,6 +20730,7 @@ M:	Ben Zong-You Xie <ben717@andestech.com>
>  S:	Maintained
>  F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
>  F:	Documentation/devicetree/bindings/riscv/andes.yaml
> +F:	Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
>  
>  RISC-V ARCHITECTURE
>  M:	Paul Walmsley <paul.walmsley@sifive.com>
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 6/9] dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes L2 cache
  2025-04-07 10:49 ` [PATCH 6/9] dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes L2 cache Ben Zong-You Xie
@ 2025-04-07 14:19   ` Rob Herring (Arm)
  0 siblings, 0 replies; 19+ messages in thread
From: Rob Herring (Arm) @ 2025-04-07 14:19 UTC (permalink / raw)
  To: Ben Zong-You Xie
  Cc: linux-riscv, krzk+dt, devicetree, tim609, palmer, paul.walmsley,
	prabhakar.mahadev-lad.rj, linux-kernel, tglx, aou, daniel.lezcano,
	conor+dt, alex


On Mon, 07 Apr 2025 18:49:34 +0800, Ben Zong-You Xie wrote:
> The current device tree binding for the Andes AX45MP L2 cache enforces
> a fixed number of cache-sets (1024). However, there are 2048 cache-sets in
> the QiLai SoC. This change allows both 1024 and 2048 as valid values for
> "cache-sets".
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  .../devicetree/bindings/cache/andestech,ax45mp-cache.yaml       | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree
  2025-04-07 10:49 ` [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree Ben Zong-You Xie
@ 2025-04-07 14:30   ` Krzysztof Kozlowski
  2025-04-08 16:43   ` Conor Dooley
  1 sibling, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-07 14:30 UTC (permalink / raw)
  To: Ben Zong-You Xie, devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609

On 07/04/2025 12:49, Ben Zong-You Xie wrote:
> +/dts-v1/;
> +
> +#include <dt-bindings/interrupt-controller/irq.h>
> +
> +/ {
> +	#address-cells = <2>;
> +	#size-cells = <2>;
> +
> +	aliases {
> +		serial0 = &uart0;

This belongs to the board.

> +	};
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		timebase-frequency = <62500000>;
> +
> +		cpu0: cpu@0 {
> +			compatible = "andestech,ax45mp", "riscv";
> +			device_type = "cpu";
> +			status = "okay";

Drop. See DTS coding style.


...

> +
> +	memory@400000000 {
> +		device_type = "memory";
> +		reg = <0x4 0x00000000 0x4 0x00000000>;

This belongs to the board usually. Are you sure your SoC has physically
fixed memory?

> +	};
> +
> +	soc {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		compatible = "simple-bus";
> +		ranges;
> +
> +		plic: interrupt-controller@2000000 {
> +			compatible = "andestech,qilai-plic", "andestech,nceplic100";
> +			#address-cells = <0>;
> +			#interrupt-cells = <2>;
> +			interrupt-controller;
> +			reg = <0x0 0x2000000 0x0 0x2000000>;
> +			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
> +					      <&cpu1_intc 11>, <&cpu1_intc 9>,
> +					      <&cpu2_intc 11>, <&cpu2_intc 9>,
> +					      <&cpu3_intc 11>, <&cpu3_intc 9>;
> +			riscv,ndev = <71>;
> +		};
> +
> +		plic_sw: interrupt-controller@400000 {
> +			compatible = "andestech,qilai-plicsw", "andestech,plicsw";
> +			reg = <0x0 0x400000 0x0 0x400000>;
> +			interrupts-extended = <&cpu0_intc 3>,
> +					      <&cpu1_intc 3>,
> +					      <&cpu2_intc 3>,
> +					      <&cpu3_intc 3>;
> +		};
> +
> +		plmt: timer@100000 {

Order the nodes, see DTS coding style.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 8/9] riscv: dts: andes: add Voyager board device tree
  2025-04-07 10:49 ` [PATCH 8/9] riscv: dts: andes: add Voyager board " Ben Zong-You Xie
@ 2025-04-07 14:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-07 14:31 UTC (permalink / raw)
  To: Ben Zong-You Xie, devicetree, linux-riscv, linux-kernel
  Cc: paul.walmsley, palmer, aou, alex, robh, krzk+dt, conor+dt, tglx,
	daniel.lezcano, prabhakar.mahadev-lad.rj, tim609

On 07/04/2025 12:49, Ben Zong-You Xie wrote:
> Introduce the device tree support for Voyager development board.
> 
> Currently only support booting into console with only uart,
> other features will be added later.
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  arch/riscv/boot/dts/Makefile                |  1 +
>  arch/riscv/boot/dts/andes/Makefile          |  2 ++
>  arch/riscv/boot/dts/andes/qilai-voyager.dts | 19 +++++++++++++++++++
>  3 files changed, 22 insertions(+)
>  create mode 100644 arch/riscv/boot/dts/andes/Makefile
>  create mode 100644 arch/riscv/boot/dts/andes/qilai-voyager.dts
> 
> diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
> index 64a898da9aee..3b99e91efa25 100644
> --- a/arch/riscv/boot/dts/Makefile
> +++ b/arch/riscv/boot/dts/Makefile
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>  subdir-y += allwinner
> +subdir-y += andes
>  subdir-y += canaan
>  subdir-y += microchip
>  subdir-y += renesas
> diff --git a/arch/riscv/boot/dts/andes/Makefile b/arch/riscv/boot/dts/andes/Makefile
> new file mode 100644
> index 000000000000..c833e041c220
> --- /dev/null
> +++ b/arch/riscv/boot/dts/andes/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0
> +dtb-$(CONFIG_ARCH_ANDES) += qilai-voyager.dtb
> \ No newline at end of file

You have patch warnings.

> diff --git a/arch/riscv/boot/dts/andes/qilai-voyager.dts b/arch/riscv/boot/dts/andes/qilai-voyager.dts
> new file mode 100644


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree
  2025-04-07 10:49 ` [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree Ben Zong-You Xie
  2025-04-07 14:30   ` Krzysztof Kozlowski
@ 2025-04-08 16:43   ` Conor Dooley
  1 sibling, 0 replies; 19+ messages in thread
From: Conor Dooley @ 2025-04-08 16:43 UTC (permalink / raw)
  To: Ben Zong-You Xie
  Cc: devicetree, linux-riscv, linux-kernel, paul.walmsley, palmer, aou,
	alex, robh, krzk+dt, conor+dt, tglx, daniel.lezcano,
	prabhakar.mahadev-lad.rj, tim609

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

On Mon, Apr 07, 2025 at 06:49:35PM +0800, Ben Zong-You Xie wrote:
> Introduce the initial device tree support for the Andes QiLai SoC.
> 
> For further information, you can refer to [1].
> 
> [1] https://www.andestech.com/en/products-solutions/andeshape-platforms/qilai-chip/
> 
> Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> ---
>  MAINTAINERS                          |   1 +
>  arch/riscv/boot/dts/andes/qilai.dtsi | 194 +++++++++++++++++++++++++++
>  2 files changed, 195 insertions(+)
>  create mode 100644 arch/riscv/boot/dts/andes/qilai.dtsi
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d1e1b98dfe7b..b974e83c9f10 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -20731,6 +20731,7 @@ S:	Maintained
>  F:	Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
>  F:	Documentation/devicetree/bindings/riscv/andes.yaml
>  F:	Documentation/devicetree/bindings/timer/andestech,plmt0.yaml
> +F:	arch/riscv/boot/dts/andes/

New platform, but your maintainers entry contains no git tree. Who are
you expecting to apply patches and send PRs to the soc maintainers for
this platform? Hint: I really hope it is you.

If it is you, please look at the soc platform maintainers documentation
entry:
https://docs.kernel.org/process/maintainer-soc.html

Cheers,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller
  2025-04-07 14:17   ` Rob Herring
@ 2025-04-21 12:19     ` Ben Zong-You Xie
  0 siblings, 0 replies; 19+ messages in thread
From: Ben Zong-You Xie @ 2025-04-21 12:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-riscv, linux-kernel, paul.walmsley, palmer, aou,
	alex, krzk+dt, conor+dt, tglx, daniel.lezcano,
	prabhakar.mahadev-lad.rj, tim609

On Mon, Apr 07, 2025 at 09:17:08AM -0500, Rob Herring wrote:
> [EXTERNAL MAIL]
> 
> On Mon, Apr 07, 2025 at 06:49:32PM +0800, Ben Zong-You Xie wrote:
> > Add the DT binding documentation for Andes machine-level software
> > interrupt controller.
> >
> > In the Andes platform such as QiLai SoC, the PLIC module is instantiated a
> > second time with all interrupt sources tied to zero as the software
> > interrupt controller (PLICSW). PLICSW can generate machine-level software
> > interrupts through programming its registers.
> >
> > Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
> > ---
> >  .../andestech,plicsw.yaml                     | 48 +++++++++++++++++++
> >  MAINTAINERS                                   |  1 +
> >  2 files changed, 49 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml b/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> > new file mode 100644
> > index 000000000000..5432fcfd95ed
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> > @@ -0,0 +1,48 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/interrupt-controller/andestech,plicsw.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Andes machine-level software interrupt controller
> > +
> > +description:
> > +  In the Andes platform such as QiLai SoC, the PLIC module is instantiated a
> > +  second time with all interrupt sources tied to zero as the software interrupt
> > +  controller (PLIC_SW). PLIC_SW can generate machine-level software interrupts
> > +  through programming its registers.
> > +
> > +maintainers:
> > +  - Ben Zong-You Xie <ben717@andestech.com>
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - andestech,qilai-plicsw
> > +      - const: andestech,plicsw
> 
> Drop the fallback. If you have another implementation that's compatible,
> then andestech,qilai-plicsw will be the fallback.
>

Hi Rob,

Maybe this is a stupid question, but I don't understand the reason for
dropping the fallback. I follow the same logic in commit 1267d9831171
(dt-bindings: interrupt-controller: sifive,plic: Document Renesas RZ/Five
SoC). Thus, I think if there is a new SoC also equipped with Andes
PLIC-SW (NCEPLIC100-SW), the SoC vendor can simply add a new compatible
string under the enum.

Also, I will rename andestech,plisw to andestech,nceplic100-sw if the
fallback string is not dropped.

Thanks,
Ben

> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts-extended:
> > +    minItems: 1
> > +    maxItems: 15872
> > +
> > +additionalProperties: false
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts-extended
> > +
> > +examples:
> > +  - |
> > +    interrupt-controller@400000 {
> > +      compatible = "andestech,qilai-plicsw", "andestech,plicsw";
> > +      reg = <0x400000 0x400000>;
> > +      interrupts-extended = <&cpu0intc 3>,
> > +                            <&cpu1intc 3>,
> > +                            <&cpu2intc 3>,
> > +                            <&cpu3intc 3>;
> > +    };
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index a0ccac1cca29..645d7137cb07 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -20728,6 +20728,7 @@ F:    include/linux/irqchip/riscv-imsic.h
> >  RISC-V ANDES SoC Support
> >  M:   Ben Zong-You Xie <ben717@andestech.com>
> >  S:   Maintained
> > +F:   Documentation/devicetree/bindings/interrupt-controller/andestech,plicsw.yaml
> >  F:   Documentation/devicetree/bindings/riscv/andes.yaml
> >
> >  RISC-V ARCHITECTURE
> > --
> > 2.34.1
> >

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-04-21 12:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 10:49 [PATCH 0/9] add Voyager board support Ben Zong-You Xie
2025-04-07 10:49 ` [PATCH 1/9] riscv: add Andes SoC family Kconfig support Ben Zong-You Xie
2025-04-07 10:49 ` [PATCH 2/9] dt-bindings: riscv: add Andes QiLai SoC and the Voyager board bindings Ben Zong-You Xie
2025-04-07 14:13   ` Rob Herring (Arm)
2025-04-07 10:49 ` [PATCH 3/9] dt-bindings: interrupt-controller: add Andes QiLai PLIC Ben Zong-You Xie
2025-04-07 14:14   ` Rob Herring (Arm)
2025-04-07 10:49 ` [PATCH 4/9] dt-bindings: interrupt-controller: add Andes machine-level software interrupt controller Ben Zong-You Xie
2025-04-07 14:17   ` Rob Herring
2025-04-21 12:19     ` Ben Zong-You Xie
2025-04-07 10:49 ` [PATCH 5/9] dt-bindings: timer: add Andes machine timer Ben Zong-You Xie
2025-04-07 14:18   ` Rob Herring
2025-04-07 10:49 ` [PATCH 6/9] dt-bindings: cache: ax45mp-cache: allow variable cache-sets for Andes L2 cache Ben Zong-You Xie
2025-04-07 14:19   ` Rob Herring (Arm)
2025-04-07 10:49 ` [PATCH 7/9] riscv: dts: andes: add QiLai SoC device tree Ben Zong-You Xie
2025-04-07 14:30   ` Krzysztof Kozlowski
2025-04-08 16:43   ` Conor Dooley
2025-04-07 10:49 ` [PATCH 8/9] riscv: dts: andes: add Voyager board " Ben Zong-You Xie
2025-04-07 14:31   ` Krzysztof Kozlowski
2025-04-07 10:49 ` [PATCH 9/9] riscv: defconfig: enable Andes SoC Ben Zong-You Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).