From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 7/8] riscv: Add device tree bindings for SPI
Date: Thu, 5 Mar 2020 14:19:24 -0500 [thread overview]
Message-ID: <20200305191925.959494-8-seanga2@gmail.com> (raw)
In-Reply-To: <20200305191925.959494-1-seanga2@gmail.com>
This patch adds bindings for the MMC slot and SPI flash on the Sipeed Maix
Bit.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
arch/riscv/dts/k210-maix-bit.dts | 90 ++++++++++++++++++++++++++++++++
arch/riscv/dts/k210.dtsi | 12 +++++
2 files changed, 102 insertions(+)
diff --git a/arch/riscv/dts/k210-maix-bit.dts b/arch/riscv/dts/k210-maix-bit.dts
index c0ec572552..cb4dba5e13 100644
--- a/arch/riscv/dts/k210-maix-bit.dts
+++ b/arch/riscv/dts/k210-maix-bit.dts
@@ -235,9 +235,99 @@
pins = "IO_47";
};
};
+
+ fpioa_spi0: spi0 {
+ cs0 {
+ function = "GPIOHS28";
+ pins = "IO_36";
+ };
+ rst {
+ function = "GPIOHS29";
+ pins = "IO_37";
+ };
+ dc {
+ function = "GPIOHS30";
+ pins = "IO_38";
+ };
+ wr {
+ function = "SPI0_SCK";
+ pins = "IO_39";
+ };
+ };
+
+ fpioa_spi1: spi1 {
+ miso {
+ function = "SPI1_D1";
+ pins = "IO_26";
+ };
+ clk {
+ function = "SPI1_SCLK";
+ pins = "IO_27";
+ };
+ mosi {
+ function = "SPI1_D0";
+ pins = "IO_28";
+ };
+ cs0 {
+ function = "GPIOHS31";
+ pins = "IO_29";
+ };
+ };
+};
+
+&wdt0 {
+ status = "okay";
};
&dvp0 {
pinctrl-0 = <&fpioa_dvp>;
pinctrl-names = "default";
};
+
+&spi0 {
+ pinctrl-0 = <&fpioa_spi0>;
+ pinctrl-names = "default";
+ num-cs = <1>;
+ cs-gpios = <&gpio0 28 0>;
+
+ panel at 0 {
+ compatible = "sitronix,st8898v";
+ reg = <0>;
+ reset-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
+ spi-max-frequency = <15000000>;
+ status = "disabled";
+ };
+};
+
+&spi1 {
+ pinctrl-0 = <&fpioa_spi1>;
+ pinctrl-names = "default";
+ num-cs = <1>;
+ cs-gpios = <&gpio0 31 0>;
+ status = "okay";
+
+ slot at 0 {
+ compatible = "mmc-spi-slot";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ voltage-ranges = <3300 3300>;
+ broken-cd;
+ disable-wp;
+ };
+};
+
+&spi3 {
+ status = "okay";
+
+ spi-flash at 0 {
+ compatible = "winbond,w25q128fw", "jedec,spi-nor";
+ reg = <0>;
+ /*
+ * Datasheet says it should work at 100 MHz with fast read, but
+ * after testing it doesn't probe at that frequency
+ */
+ spi-max-frequency = <50000000>;
+ m25p,fast-read;
+ broken-flash-reset;
+ };
+};
diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi
index 0192ce5eae..a74620281c 100644
--- a/arch/riscv/dts/k210.dtsi
+++ b/arch/riscv/dts/k210.dtsi
@@ -592,6 +592,10 @@
spi-max-frequency = <25000000>;
num-cs = <4>;
reg-io-width = <4>;
+ snps,dfs-offset = <16>;
+ snps,frf-offset = <21>;
+ snps,tmod-offset = <8>;
+ snps,mode-offset = <6>;
status = "disabled";
};
@@ -608,6 +612,10 @@
spi-max-frequency = <25000000>;
num-cs = <4>;
reg-io-width = <4>;
+ snps,dfs-offset = <16>;
+ snps,frf-offset = <21>;
+ snps,tmod-offset = <8>;
+ snps,mode-offset = <6>;
status = "disabled";
};
@@ -625,6 +633,10 @@
spi-max-frequency = <100000000>;
num-cs = <4>;
reg-io-width = <4>;
+ snps,dfs-offset = <0>;
+ snps,frf-offset = <22>;
+ snps,tmod-offset = <10>;
+ snps,mode-offset = <8>;
status = "disabled";
};
};
--
2.25.0
next prev parent reply other threads:[~2020-03-05 19:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 19:19 [PATCH v1 0/8] riscv: Add SPI support for Kendryte K210 Sean Anderson
2020-03-05 19:19 ` [PATCH v1 1/8] doc: Fix typo in FIT documentation Sean Anderson
2020-03-22 1:52 ` Marek Vasut
2020-03-23 13:58 ` Tom Rini
2020-03-05 19:19 ` [PATCH v1 2/8] spi: dw: Add device tree properties for fields in CTRL0 Sean Anderson
2020-03-22 1:51 ` Marek Vasut
2020-03-22 2:36 ` Sean Anderson
2020-03-22 3:04 ` Marek Vasut
2020-03-22 3:08 ` Sean Anderson
2020-03-22 3:13 ` Marek Vasut
2020-03-22 3:33 ` Sean Anderson
2020-03-22 4:22 ` Marek Vasut
2020-03-05 19:19 ` [PATCH v1 3/8] spi: dw: Rename "cs-gpio" to "cs-gpios" Sean Anderson
2020-04-02 12:17 ` Jagan Teki
2020-04-02 12:33 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 4/8] spi: dw: Use generic function to read reg address Sean Anderson
2020-04-02 12:24 ` Jagan Teki
2020-04-02 12:32 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 5/8] spi: dw: Speed up transfer loops Sean Anderson
2020-03-22 1:49 ` Marek Vasut
2020-03-22 3:54 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 6/8] spi: dw: Add mem_ops Sean Anderson
2020-03-05 22:15 ` Eugeniy Paltsev
2020-03-06 0:48 ` Sean Anderson
2020-03-06 17:03 ` Eugeniy Paltsev
2020-03-06 20:36 ` Sean Anderson
2020-03-06 21:20 ` Sean Anderson
2020-03-12 16:01 ` Eugeniy Paltsev
2020-03-05 19:19 ` Sean Anderson [this message]
2020-03-22 1:55 ` [PATCH v1 7/8] riscv: Add device tree bindings for SPI Marek Vasut
2020-03-22 2:39 ` Sean Anderson
2020-03-05 19:19 ` [PATCH v1 8/8] riscv: Add support for SPI on Kendryte K210 Sean Anderson
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=20200305191925.959494-8-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/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