devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add Milk-V Duo board support
@ 2023-10-06 12:14 Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic Jisheng Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Jisheng Zhang @ 2023-10-06 12:14 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto

Milk-V Duo[1] board is an embedded development platform based on the
CV1800B[2] chip. Add minimal device tree files for the development board.
Currently, now it's supported to boot to a basic shell.

NOTE: this series is based on the SG2042 upstream series[3] for the vendor
prefix and ARCH_SOPHGO option.

Link: https://milkv.io/duo [1]
Link: https://en.sophgo.com/product/introduce/cv180xB.html [2]
Link: https://lore.kernel.org/linux-riscv/cover.1696433229.git.unicorn_wang@outlook.com/ [3]

since v1:
 - fix dtbs_check warning
 - add clint node
 - sort dts in Makefile

Jisheng Zhang (5):
  dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic
  dt-bindings: timer: Add SOPHGO CV1800B clint
  dt-bindings: riscv: Add Milk-V Duo board compatibles
  riscv: dts: sophgo: add initial CV1800B SoC device tree
  riscv: dts: sophgo: add Milk-V Duo board device tree

 .../sifive,plic-1.0.0.yaml                    |   1 +
 .../devicetree/bindings/riscv/sophgo.yaml     |   4 +
 .../bindings/timer/sifive,clint.yaml          |   1 +
 arch/riscv/boot/dts/sophgo/Makefile           |   2 +-
 .../boot/dts/sophgo/cv1800b-milkv-duo.dts     |  38 ++++++
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi       | 123 ++++++++++++++++++
 6 files changed, 168 insertions(+), 1 deletion(-)
 create mode 100644 arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
 create mode 100644 arch/riscv/boot/dts/sophgo/cv1800b.dtsi

-- 
2.40.1


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

* [PATCH v2 1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic
  2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
@ 2023-10-06 12:14 ` Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 2/5] dt-bindings: timer: Add SOPHGO CV1800B clint Jisheng Zhang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Jisheng Zhang @ 2023-10-06 12:14 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto,
	Conor Dooley

Add compatible string for SOPHGO CV1800B plic.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.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 16f9c4760c0f..0c07e8dda445 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
@@ -65,6 +65,7 @@ properties:
       - items:
           - enum:
               - allwinner,sun20i-d1-plic
+              - sophgo,cv1800b-plic
               - sophgo,sg2042-plic
               - thead,th1520-plic
           - const: thead,c900-plic
-- 
2.40.1


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

* [PATCH v2 2/5] dt-bindings: timer: Add SOPHGO CV1800B clint
  2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic Jisheng Zhang
@ 2023-10-06 12:14 ` Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 3/5] dt-bindings: riscv: Add Milk-V Duo board compatibles Jisheng Zhang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Jisheng Zhang @ 2023-10-06 12:14 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto,
	Conor Dooley

Add compatible string for the SOPHGO CV1800B clint.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
 Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
index a0185e15a42f..e8be6c470364 100644
--- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml
+++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
@@ -37,6 +37,7 @@ properties:
       - items:
           - enum:
               - allwinner,sun20i-d1-clint
+              - sophgo,cv1800b-clint
               - thead,th1520-clint
           - const: thead,c900-clint
       - items:
-- 
2.40.1


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

* [PATCH v2 3/5] dt-bindings: riscv: Add Milk-V Duo board compatibles
  2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 2/5] dt-bindings: timer: Add SOPHGO CV1800B clint Jisheng Zhang
@ 2023-10-06 12:14 ` Jisheng Zhang
  2023-10-06 12:14 ` [PATCH v2 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree Jisheng Zhang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Jisheng Zhang @ 2023-10-06 12:14 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto,
	Conor Dooley, Chen Wang

Document the compatible strings for the Milk-V Duo board[1] which uses
the SOPHGO CV1800B SoC[2].

Link: https://milkv.io/duo [1]
Link: https://en.sophgo.com/product/introduce/cv180xB.html [2]
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Chen Wang <unicorn_wang@outlook.com>
---
 Documentation/devicetree/bindings/riscv/sophgo.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/riscv/sophgo.yaml b/Documentation/devicetree/bindings/riscv/sophgo.yaml
index 8adb5f39ca53..86748c5390be 100644
--- a/Documentation/devicetree/bindings/riscv/sophgo.yaml
+++ b/Documentation/devicetree/bindings/riscv/sophgo.yaml
@@ -18,6 +18,10 @@ properties:
     const: '/'
   compatible:
     oneOf:
+      - items:
+          - enum:
+              - milkv,duo
+          - const: sophgo,cv1800b
       - items:
           - enum:
               - milkv,pioneer
-- 
2.40.1


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

* [PATCH v2 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree
  2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
                   ` (2 preceding siblings ...)
  2023-10-06 12:14 ` [PATCH v2 3/5] dt-bindings: riscv: Add Milk-V Duo board compatibles Jisheng Zhang
@ 2023-10-06 12:14 ` Jisheng Zhang
  2023-10-07 12:42   ` Chen Wang
  2023-10-06 12:14 ` [PATCH v2 5/5] riscv: dts: sophgo: add Milk-V Duo board " Jisheng Zhang
  2023-10-06 14:21 ` [PATCH v2 0/5] Add Milk-V Duo board support Conor Dooley
  5 siblings, 1 reply; 9+ messages in thread
From: Jisheng Zhang @ 2023-10-06 12:14 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto

Add initial device tree for the CV1800B RISC-V SoC by SOPHGO.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 123 ++++++++++++++++++++++++
 1 file changed, 123 insertions(+)
 create mode 100644 arch/riscv/boot/dts/sophgo/cv1800b.dtsi

diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
new file mode 100644
index 000000000000..df40e87ee063
--- /dev/null
+++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
@@ -0,0 +1,123 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	compatible = "sophgo,cv1800b";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus: cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		timebase-frequency = <25000000>;
+
+		cpu0: cpu@0 {
+			compatible = "thead,c906", "riscv";
+			device_type = "cpu";
+			reg = <0>;
+			d-cache-block-size = <64>;
+			d-cache-sets = <512>;
+			d-cache-size = <65536>;
+			i-cache-block-size = <64>;
+			i-cache-sets = <128>;
+			i-cache-size = <32768>;
+			mmu-type = "riscv,sv39";
+			riscv,isa = "rv64imafdc";
+			riscv,isa-base = "rv64i";
+			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
+					       "zifencei", "zihpm";
+
+			cpu0_intc: interrupt-controller {
+				compatible = "riscv,cpu-intc";
+				interrupt-controller;
+				#address-cells = <0>;
+				#interrupt-cells = <1>;
+			};
+		};
+	};
+
+	osc: oscillator {
+		compatible = "fixed-clock";
+		clock-output-names = "osc_25m";
+		#clock-cells = <0>;
+	};
+
+	soc {
+		compatible = "simple-bus";
+		interrupt-parent = <&plic>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		dma-noncoherent;
+		ranges;
+
+		uart0: serial@4140000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x04140000 0x100>;
+			interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			status = "disabled";
+		};
+
+		uart1: serial@4150000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x04150000 0x100>;
+			interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			status = "disabled";
+		};
+
+		uart2: serial@4160000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x04160000 0x100>;
+			interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			status = "disabled";
+		};
+
+		uart3: serial@4170000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x04170000 0x100>;
+			interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			status = "disabled";
+		};
+
+		uart4: serial@41c0000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x041c0000 0x100>;
+			interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			status = "disabled";
+		};
+
+		plic: interrupt-controller@70000000 {
+			compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
+			reg = <0x70000000 0x4000000>;
+			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <2>;
+			riscv,ndev = <101>;
+		};
+
+		clint: timer@74000000 {
+			compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
+			reg = <0x74000000 0x10000>;
+			interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
+		};
+	};
+};
-- 
2.40.1


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

* [PATCH v2 5/5] riscv: dts: sophgo: add Milk-V Duo board device tree
  2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
                   ` (3 preceding siblings ...)
  2023-10-06 12:14 ` [PATCH v2 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree Jisheng Zhang
@ 2023-10-06 12:14 ` Jisheng Zhang
  2023-10-07 12:44   ` Chen Wang
  2023-10-06 14:21 ` [PATCH v2 0/5] Add Milk-V Duo board support Conor Dooley
  5 siblings, 1 reply; 9+ messages in thread
From: Jisheng Zhang @ 2023-10-06 12:14 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto

Milk-V Duo[1] board is an embedded development platform based on the
CV1800B chip. Add minimal device tree files for the development board.

Support basic uart drivers, so supports booting to a basic shell.

Link: https://milkv.io/duo [1]
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 arch/riscv/boot/dts/sophgo/Makefile           |  2 +-
 .../boot/dts/sophgo/cv1800b-milkv-duo.dts     | 38 +++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts

diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
index 5a471b19df22..3fb65512c631 100644
--- a/arch/riscv/boot/dts/sophgo/Makefile
+++ b/arch/riscv/boot/dts/sophgo/Makefile
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
 dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
-
diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
new file mode 100644
index 000000000000..3af9e34b3bc7
--- /dev/null
+++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
+ */
+
+/dts-v1/;
+
+#include "cv1800b.dtsi"
+
+/ {
+	model = "Milk-V Duo";
+	compatible = "milkv,duo", "sophgo,cv1800b";
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+		serial3 = &uart3;
+		serial4 = &uart4;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x3f40000>;
+	};
+};
+
+&osc {
+	clock-frequency = <25000000>;
+};
+
+&uart0 {
+	status = "okay";
+};
-- 
2.40.1


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

* Re: [PATCH v2 0/5] Add Milk-V Duo board support
  2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
                   ` (4 preceding siblings ...)
  2023-10-06 12:14 ` [PATCH v2 5/5] riscv: dts: sophgo: add Milk-V Duo board " Jisheng Zhang
@ 2023-10-06 14:21 ` Conor Dooley
  5 siblings, 0 replies; 9+ messages in thread
From: Conor Dooley @ 2023-10-06 14:21 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Palmer Dabbelt, Paul Walmsley, Albert Ou,
	Daniel Lezcano, Jisheng Zhang
  Cc: conor, Conor Dooley, linux-kernel, devicetree, linux-riscv,
	Inochi Amaoto

From: Conor Dooley <conor.dooley@microchip.com>

On Fri, 06 Oct 2023 20:14:44 +0800, Jisheng Zhang wrote:
> Milk-V Duo[1] board is an embedded development platform based on the
> CV1800B[2] chip. Add minimal device tree files for the development board.
> Currently, now it's supported to boot to a basic shell.
> 
> NOTE: this series is based on the SG2042 upstream series[3] for the vendor
> prefix and ARCH_SOPHGO option.
> 
> [...]

These look grand to me, so I have applied them on a temp. basis to a
"sophgo" branch. I'll merge it in for real to the riscv-dt-for-next if
my changes to the prereq series for the sg2042 are acceptable to their
authors.

[1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic
      https://git.kernel.org/conor/c/101276d77e84
[2/5] dt-bindings: timer: Add SOPHGO CV1800B clint
      https://git.kernel.org/conor/c/a3a24243b83b
[3/5] dt-bindings: riscv: Add Milk-V Duo board compatibles
      https://git.kernel.org/conor/c/533874200f8c
[4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree
      https://git.kernel.org/conor/c/4e31e0e61845
[5/5] riscv: dts: sophgo: add Milk-V Duo board device tree
      https://git.kernel.org/conor/c/0edd1de88d35

Thanks,
Conor.

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

* Re: [PATCH v2 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree
  2023-10-06 12:14 ` [PATCH v2 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree Jisheng Zhang
@ 2023-10-07 12:42   ` Chen Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Chen Wang @ 2023-10-07 12:42 UTC (permalink / raw)
  To: Jisheng Zhang, Thomas Gleixner, Marc Zyngier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Palmer Dabbelt, Paul Walmsley,
	Albert Ou, Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto


On 2023/10/6 20:14, Jisheng Zhang wrote:
> Add initial device tree for the CV1800B RISC-V SoC by SOPHGO.
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

Acked-by: Chen Wang <unicorn_wang@outlook.com>

Thanks, Chen
> ---
>   arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 123 ++++++++++++++++++++++++
>   1 file changed, 123 insertions(+)
>   create mode 100644 arch/riscv/boot/dts/sophgo/cv1800b.dtsi
>
> diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
> new file mode 100644
> index 000000000000..df40e87ee063
> --- /dev/null
> +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
> @@ -0,0 +1,123 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
> + */
> +
> +#include <dt-bindings/interrupt-controller/irq.h>
> +
> +/ {
> +	compatible = "sophgo,cv1800b";
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus: cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		timebase-frequency = <25000000>;
> +
> +		cpu0: cpu@0 {
> +			compatible = "thead,c906", "riscv";
> +			device_type = "cpu";
> +			reg = <0>;
> +			d-cache-block-size = <64>;
> +			d-cache-sets = <512>;
> +			d-cache-size = <65536>;
> +			i-cache-block-size = <64>;
> +			i-cache-sets = <128>;
> +			i-cache-size = <32768>;
> +			mmu-type = "riscv,sv39";
> +			riscv,isa = "rv64imafdc";
> +			riscv,isa-base = "rv64i";
> +			riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
> +					       "zifencei", "zihpm";
> +
> +			cpu0_intc: interrupt-controller {
> +				compatible = "riscv,cpu-intc";
> +				interrupt-controller;
> +				#address-cells = <0>;
> +				#interrupt-cells = <1>;
> +			};
> +		};
> +	};
> +
> +	osc: oscillator {
> +		compatible = "fixed-clock";
> +		clock-output-names = "osc_25m";
> +		#clock-cells = <0>;
> +	};
> +
> +	soc {
> +		compatible = "simple-bus";
> +		interrupt-parent = <&plic>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		dma-noncoherent;
> +		ranges;
> +
> +		uart0: serial@4140000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x04140000 0x100>;
> +			interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&osc>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			status = "disabled";
> +		};
> +
> +		uart1: serial@4150000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x04150000 0x100>;
> +			interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&osc>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			status = "disabled";
> +		};
> +
> +		uart2: serial@4160000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x04160000 0x100>;
> +			interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&osc>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			status = "disabled";
> +		};
> +
> +		uart3: serial@4170000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x04170000 0x100>;
> +			interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&osc>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			status = "disabled";
> +		};
> +
> +		uart4: serial@41c0000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x041c0000 0x100>;
> +			interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&osc>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			status = "disabled";
> +		};
> +
> +		plic: interrupt-controller@70000000 {
> +			compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
> +			reg = <0x70000000 0x4000000>;
> +			interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
> +			interrupt-controller;
> +			#address-cells = <0>;
> +			#interrupt-cells = <2>;
> +			riscv,ndev = <101>;
> +		};
> +
> +		clint: timer@74000000 {
> +			compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
> +			reg = <0x74000000 0x10000>;
> +			interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
> +		};
> +	};
> +};

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

* Re: [PATCH v2 5/5] riscv: dts: sophgo: add Milk-V Duo board device tree
  2023-10-06 12:14 ` [PATCH v2 5/5] riscv: dts: sophgo: add Milk-V Duo board " Jisheng Zhang
@ 2023-10-07 12:44   ` Chen Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Chen Wang @ 2023-10-07 12:44 UTC (permalink / raw)
  To: Jisheng Zhang, Thomas Gleixner, Marc Zyngier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Palmer Dabbelt, Paul Walmsley,
	Albert Ou, Daniel Lezcano
  Cc: linux-kernel, devicetree, linux-riscv, Inochi Amaoto


On 2023/10/6 20:14, Jisheng Zhang wrote:
> Milk-V Duo[1] board is an embedded development platform based on the
> CV1800B chip. Add minimal device tree files for the development board.
>
> Support basic uart drivers, so supports booting to a basic shell.
>
> Link: https://milkv.io/duo [1]
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

Acked-by: Chen Wang <unicorn_wang@outlook.com>

Thanks, Chen

> ---
>   arch/riscv/boot/dts/sophgo/Makefile           |  2 +-
>   .../boot/dts/sophgo/cv1800b-milkv-duo.dts     | 38 +++++++++++++++++++
>   2 files changed, 39 insertions(+), 1 deletion(-)
>   create mode 100644 arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
>
> diff --git a/arch/riscv/boot/dts/sophgo/Makefile b/arch/riscv/boot/dts/sophgo/Makefile
> index 5a471b19df22..3fb65512c631 100644
> --- a/arch/riscv/boot/dts/sophgo/Makefile
> +++ b/arch/riscv/boot/dts/sophgo/Makefile
> @@ -1,3 +1,3 @@
>   # SPDX-License-Identifier: GPL-2.0
> +dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
>   dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
> -
> diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
> new file mode 100644
> index 000000000000..3af9e34b3bc7
> --- /dev/null
> +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
> @@ -0,0 +1,38 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
> + */
> +
> +/dts-v1/;
> +
> +#include "cv1800b.dtsi"
> +
> +/ {
> +	model = "Milk-V Duo";
> +	compatible = "milkv,duo", "sophgo,cv1800b";
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +		serial2 = &uart2;
> +		serial3 = &uart3;
> +		serial4 = &uart4;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory@80000000 {
> +		device_type = "memory";
> +		reg = <0x80000000 0x3f40000>;
> +	};
> +};
> +
> +&osc {
> +	clock-frequency = <25000000>;
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};

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

end of thread, other threads:[~2023-10-07 12:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 12:14 [PATCH v2 0/5] Add Milk-V Duo board support Jisheng Zhang
2023-10-06 12:14 ` [PATCH v2 1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic Jisheng Zhang
2023-10-06 12:14 ` [PATCH v2 2/5] dt-bindings: timer: Add SOPHGO CV1800B clint Jisheng Zhang
2023-10-06 12:14 ` [PATCH v2 3/5] dt-bindings: riscv: Add Milk-V Duo board compatibles Jisheng Zhang
2023-10-06 12:14 ` [PATCH v2 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree Jisheng Zhang
2023-10-07 12:42   ` Chen Wang
2023-10-06 12:14 ` [PATCH v2 5/5] riscv: dts: sophgo: add Milk-V Duo board " Jisheng Zhang
2023-10-07 12:44   ` Chen Wang
2023-10-06 14:21 ` [PATCH v2 0/5] Add Milk-V Duo board support Conor Dooley

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).