linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
	FLATTENED DEVICE TREE BINDINGS),
	linux-arm-kernel@lists.infradead.org (moderated
	list:ARM/Rockchip SoC support),
	linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC
	support), linux-kernel@vger.kernel.org (open list)
Cc: Dongjin Kim <tobetter@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>
Subject: [PATCH v3 04/13] arm64: dts: rockchip: Add NOR flash to ODROID-M1
Date: Fri, 30 Sep 2022 07:12:37 +0200	[thread overview]
Message-ID: <20220930051246.391614-5-aurelien@aurel32.net> (raw)
In-Reply-To: <20220930051246.391614-1-aurelien@aurel32.net>

Enable the Rockchip Serial Flash Controller for the ODROID-M1 and add
the corresponding SPI NOR flash entry. The SFC is used in dual I/O mode
and not quad I/O mode, as the FSPI_D2 pin is shared with the EMMC_RSTn
pin.

The partitions addresses and sizes are taken from the ODROID-M1
Partition Table page on the ODROID wiki.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 .../boot/dts/rockchip/rk3568-odroid-m1.dts    | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
index 112c65af3f55..94e839c9afab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts
@@ -351,6 +351,20 @@ rgmii_phy0: ethernet-phy@0 {
 };
 
 &pinctrl {
+	fspi {
+		fspi_dual_io_pins: fspi-dual-io-pins {
+			rockchip,pins =
+				/* fspi_clk */
+				<1 RK_PD0 1 &pcfg_pull_none>,
+				/* fspi_cs0n */
+				<1 RK_PD3 1 &pcfg_pull_none>,
+				/* fspi_d0 */
+				<1 RK_PD1 1 &pcfg_pull_none>,
+				/* fspi_d1 */
+				<1 RK_PD2 1 &pcfg_pull_none>;
+		};
+	};
+
 	leds {
 		led_power_pin: led-power-pin {
 			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -409,6 +423,50 @@ &sdmmc0 {
 	status = "okay";
 };
 
+&sfc {
+	/* Dual I/O mode as the D2 pin conflicts with the eMMC */
+	pinctrl-0 = <&fspi_dual_io_pins>;
+	pinctrl-names = "default";
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <100000000>;
+		spi-rx-bus-width = <2>;
+		spi-tx-bus-width = <1>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "SPL";
+				reg = <0x0 0xe0000>;
+			};
+			partition@e0000 {
+				label = "U-Boot Env";
+				reg = <0xe0000 0x20000>;
+			};
+			partition@100000 {
+				label = "U-Boot";
+				reg = <0x100000 0x200000>;
+			};
+			partition@300000 {
+				label = "splash";
+				reg = <0x300000 0x100000>;
+			};
+			partition@400000 {
+				label = "Filesystem";
+				reg = <0x400000 0xc00000>;
+			};
+		};
+	};
+};
+
 &tsadc {
 	rockchip,hw-tshut-mode = <1>;
 	rockchip,hw-tshut-polarity = <0>;
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-09-30  5:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30  5:12 [PATCH v3 00/13] Add support for the Hardkernel ODROID-M1 board Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 01/13] dt-bindings: rockchip: Add " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 02/13] arm64: dts: " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 03/13] arm64: dts: rockchip: add thermal support to ODROID-M1 Aurelien Jarno
2022-09-30  5:12 ` Aurelien Jarno [this message]
2022-09-30  5:12 ` [PATCH v3 05/13] arm64: dts: rockchip: Add analog audio on ODROID-M1 Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 06/13] arm64: dts: rockchip: Enable vop2 and hdmi tx " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 07/13] arm64: dts: rockchip: Enable HDMI audio " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 08/13] arm64: dts: rockchip: Enable the GPU " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 09/13] arm64: dts: rockchip: Enable the USB 2.0 ports " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 10/13] arm64: dts: rockchip: Enable the USB 3.0 " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 11/13] arm64: dts: rockchip: Add SATA support to ODROID-M1 Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 12/13] arm64: dts: rockchip: Add PCIEe v3 nodes " Aurelien Jarno
2022-09-30  5:12 ` [PATCH v3 13/13] arm64: dts: rockchip: Add IR receiver node " Aurelien Jarno
2022-10-08 12:11 ` [PATCH v3 00/13] Add support for the Hardkernel ODROID-M1 board Dan Johansen
2022-10-08 13:53   ` Aurelien Jarno
2022-10-15 18:47     ` Aurelien Jarno
2022-10-16  9:35       ` Dan Johansen
2022-10-16  9:56         ` Dan Johansen
2022-10-16 10:49       ` Dan Johansen
2022-10-17 12:34 ` Heiko Stuebner

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=20220930051246.391614-5-aurelien@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=tobetter@gmail.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;
as well as URLs for NNTP newsgroup(s).