public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Inochi Amaoto <inochiama@outlook.com>
Cc: Jisheng Zhang <jszhang@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Anup Patel <anup@brainfault.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, chao.wei@sophgo.com,
	xiaoguang.xing@sophgo.com
Subject: Re: [PATCH 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree
Date: Sun, 1 Oct 2023 12:34:29 +0100	[thread overview]
Message-ID: <20231001-abruptly-giddily-ef340b924774@spud> (raw)
In-Reply-To: <IA1PR20MB4953CFE2FB68704D03082B4EBBC7A@IA1PR20MB4953.namprd20.prod.outlook.com>

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

On Sun, Oct 01, 2023 at 06:34:21AM +0800, Inochi Amaoto wrote:
> Hi, Jisheng

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

> 
> You add the clint dt-bindings of CV1800B clint, but I don't see the clint
> node in this dt. The SBI needs this clint node to provide timer for linux.
> AFAIK, the dt of SBI comes from the linux or the bootloader, and bootloader
> may load the linux dt and pass it to the SBI. I think it is better to add
> the clint node.

> In addition, please separate the peripheral node to a different file, which
> can be reused by both the CV1800 series and CV1810 series.

How do these SoCs differ?
Documentation seems rather lacking, but I was able to find something on
github that suggests there is also a cv180zb. The difference between the
three seems to, from a quick look, be their video encoding capabilities.
Is that correct?

Cheers,
Conor.

> >
> >Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> >---
> > arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 117 ++++++++++++++++++++++++
> > 1 file changed, 117 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..8829bebaa017
> >--- /dev/null
> >+++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
> >@@ -0,0 +1,117 @@
> >+// 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@04140000 {
> >+			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@04150000 {
> >+			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@04160000 {
> >+			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@04170000 {
> >+			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@041c0000 {
> >+			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>;
> >+		};
> >+	};
> >+};
> >--
> >2.40.1
> >
> >

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

  reply	other threads:[~2023-10-01 11:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-30 12:39 [PATCH 0/5] Add Milk-V Duo board support Jisheng Zhang
2023-09-30 12:39 ` [PATCH 1/5] dt-bindings: interrupt-controller: Add SOPHGO CV1800B plic Jisheng Zhang
2023-10-01 11:25   ` Conor Dooley
2023-09-30 12:39 ` [PATCH 2/5] dt-bindings: timer: Add SOPHGO CV1800B clint Jisheng Zhang
2023-10-01 11:25   ` Conor Dooley
2023-09-30 12:39 ` [PATCH 3/5] dt-bindings: riscv: Add Milk-V Duo board compatibles Jisheng Zhang
2023-10-01 11:26   ` Conor Dooley
2023-10-04  6:40   ` Chen Wang
2023-09-30 12:39 ` [PATCH 4/5] riscv: dts: sophgo: add initial CV1800B SoC device tree Jisheng Zhang
2023-09-30 22:34   ` Inochi Amaoto
2023-10-01 11:34     ` Conor Dooley [this message]
2023-10-01 12:19       ` Inochi Amaoto
2023-10-01 12:22         ` Inochi Amaoto
2023-10-02 12:11           ` Conor Dooley
2023-10-02 12:09   ` Conor Dooley
2023-10-06 12:21     ` Jisheng Zhang
2023-10-02 12:19   ` Conor Dooley
2023-10-04  7:23   ` Chen Wang
2023-10-04  7:57     ` Krzysztof Kozlowski
2023-10-04  9:13       ` Conor Dooley
2023-10-04 11:43         ` Chen Wang
2023-09-30 12:39 ` [PATCH 5/5] riscv: dts: sophgo: add Milk-V Duo board " Jisheng Zhang
2023-10-04  6:50   ` Chen Wang
2023-09-30 14:18 ` [PATCH 0/5] Add Milk-V Duo board support Chen Wang
2023-10-02 12:10   ` Conor Dooley
2023-10-02 12:22 ` Conor Dooley
2023-10-03  2:32   ` Chen Wang
2023-10-03  7:56     ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231001-abruptly-giddily-ef340b924774@spud \
    --to=conor@kernel.org \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=chao.wei@sophgo.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=inochiama@outlook.com \
    --cc=jszhang@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=xiaoguang.xing@sophgo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox