From: Kongyang Liu <seashell11234455@gmail.com>
To: u-boot@lists.denx.de
Cc: Leo <ycliang@andestech.com>, Rick Chen <rick@andestech.com>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH 2/3] riscv: dts: sophgo: Add spi nor flash controller node
Date: Sat, 20 Apr 2024 15:08:24 +0800 [thread overview]
Message-ID: <20240420070923.9154-3-seashell11234455@gmail.com> (raw)
In-Reply-To: <20240420070923.9154-1-seashell11234455@gmail.com>
Add spi nor flash controller node for cv18xx SoCs
Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
---
arch/riscv/dts/cv1800b-milkv-duo.dts | 13 +++++++++++++
arch/riscv/dts/cv18xx.dtsi | 17 +++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/arch/riscv/dts/cv1800b-milkv-duo.dts b/arch/riscv/dts/cv1800b-milkv-duo.dts
index 94e64ddce8..dd2c9cd17c 100644
--- a/arch/riscv/dts/cv1800b-milkv-duo.dts
+++ b/arch/riscv/dts/cv1800b-milkv-duo.dts
@@ -41,6 +41,19 @@
no-sdio;
};
+&spif {
+ status = "okay";
+
+ spiflash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <75000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ m25p,fast-read;
+ };
+}
+
&uart0 {
status = "okay";
};
diff --git a/arch/riscv/dts/cv18xx.dtsi b/arch/riscv/dts/cv18xx.dtsi
index ec99c4deeb..1623e354df 100644
--- a/arch/riscv/dts/cv18xx.dtsi
+++ b/arch/riscv/dts/cv18xx.dtsi
@@ -52,6 +52,13 @@
#clock-cells = <0>;
};
+ spif_clk: spi-flash-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <300000000>;
+ clock-output-names = "spif_clk";
+ #clock-cells = <0>;
+ };
+
soc {
compatible = "simple-bus";
interrupt-parent = <&plic>;
@@ -197,6 +204,16 @@
status = "disabled";
};
+ spif: spi-nor@10000000 {
+ compatible = "sophgo,cv1800b-spif";
+ reg = <0x10000000 0x10000000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clocks = <&spif_clk>;
+ interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
plic: interrupt-controller@70000000 {
reg = <0x70000000 0x4000000>;
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
--
2.41.0
next prev parent reply other threads:[~2024-04-20 10:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-20 7:08 [PATCH 0/3] spi: sophgo: milkv_duo: Add spi nor flash support for Milk-V Duo board Kongyang Liu
2024-04-20 7:08 ` [PATCH 1/3] spi: cv1800b: Add spi nor flash controller driver for cv1800b SoC Kongyang Liu
2024-05-01 14:28 ` Leo Liang
2024-04-20 7:08 ` Kongyang Liu [this message]
2024-05-01 14:27 ` [PATCH 2/3] riscv: dts: sophgo: Add spi nor flash controller node Leo Liang
2024-04-20 7:08 ` [PATCH 3/3] configs: milkv_duo: Add spi nor configs Kongyang Liu
2024-05-01 14:25 ` Leo Liang
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=20240420070923.9154-3-seashell11234455@gmail.com \
--to=seashell11234455@gmail.com \
--cc=rick@andestech.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=ycliang@andestech.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