All of lore.kernel.org
 help / color / mirror / Atom feed
From: SkyLake Huang <SkyLake.Huang@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] arm: dts: enable MTK SPI NOR controller driver
Date: Fri, 13 Nov 2020 11:02:43 +0800	[thread overview]
Message-ID: <20201113030243.22462-3-SkyLake.Huang@mediatek.com> (raw)
In-Reply-To: <20201113030243.22462-1-SkyLake.Huang@mediatek.com>

From: "SkyLake.Huang" <skylake.huang@mediatek.com>

Enable MTK SPI NOR controller driver on mt7622 & mt7629.

Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
---
 arch/arm/dts/mt7622-rfb.dts  | 14 +++++++++++++-
 arch/arm/dts/mt7622.dtsi     |  7 +++++++
 arch/arm/dts/mt7629-rfb.dts  | 14 +++++++++++++-
 arch/arm/dts/mt7629.dtsi     |  9 +++++++++
 configs/mt7622_rfb_defconfig |  3 ++-
 configs/mt7629_rfb_defconfig |  3 ++-
 6 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/arch/arm/dts/mt7622-rfb.dts b/arch/arm/dts/mt7622-rfb.dts
index 52b34fa3b3..9322c54a3c 100644
--- a/arch/arm/dts/mt7622-rfb.dts
+++ b/arch/arm/dts/mt7622-rfb.dts
@@ -19,7 +19,7 @@
 	};
 
 	aliases {
-		spi0 = &snfi;
+		spi0 = &snor;
 	};
 
 	memory at 40000000 {
@@ -151,6 +151,18 @@
 	quad-spi;
 };
 
+&snor {
+	pinctrl-names = "default";
+	pinctrl-0 = <&snor_pins>;
+	status = "okay";
+
+	spi-flash at 0{
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins>;
diff --git a/arch/arm/dts/mt7622.dtsi b/arch/arm/dts/mt7622.dtsi
index e511432da9..53d24ac63d 100644
--- a/arch/arm/dts/mt7622.dtsi
+++ b/arch/arm/dts/mt7622.dtsi
@@ -68,7 +68,14 @@
 
 		assigned-clock-parents = <&topckgen CLK_TOP_SYSPLL1_D2>,
 					 <&topckgen CLK_TOP_UNIVPLL2_D8>;
+	};
 
+	snor: snor at 11014000 {
+		compatible = "mediatek,mtk-snor";
+		reg = <0x11014000 0x1000>;
+		clocks = <&pericfg CLK_PERI_FLASH_PD>,
+			 <&topckgen CLK_TOP_FLASH_SEL>;
+		clock-names = "spi", "sf";
 		status = "disabled";
 	};
 
diff --git a/arch/arm/dts/mt7629-rfb.dts b/arch/arm/dts/mt7629-rfb.dts
index 687fe1c029..c75c4c7a38 100644
--- a/arch/arm/dts/mt7629-rfb.dts
+++ b/arch/arm/dts/mt7629-rfb.dts
@@ -14,7 +14,7 @@
 	compatible = "mediatek,mt7629-rfb", "mediatek,mt7629";
 
 	aliases {
-		spi0 = &snfi;
+		spi0 = &snor;
 	};
 
 	chosen {
@@ -76,6 +76,18 @@
 	};
 };
 
+&snor {
+	pinctrl-names = "default";
+	pinctrl-0 = <&snor_pins>;
+	status = "okay";
+
+	spi-flash at 0{
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		u-boot,dm-pre-reloc;
+	};
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins>;
diff --git a/arch/arm/dts/mt7629.dtsi b/arch/arm/dts/mt7629.dtsi
index a33a74a556..b268db7498 100644
--- a/arch/arm/dts/mt7629.dtsi
+++ b/arch/arm/dts/mt7629.dtsi
@@ -222,6 +222,15 @@
 		#size-cells = <0>;
 	};
 
+	snor: snor at 11014000 {
+		compatible = "mediatek,mtk-snor";
+		reg = <0x11014000 0x1000>;
+		clocks = <&pericfg CLK_PERI_FLASH_PD>,
+			 <&topckgen CLK_TOP_FLASH_SEL>;
+		clock-names = "spi", "sf";
+		status = "disabled";
+	};
+
 	ethsys: syscon at 1b000000 {
 		compatible = "mediatek,mt7629-ethsys", "syscon";
 		reg = <0x1b000000 0x1000>;
diff --git a/configs/mt7622_rfb_defconfig b/configs/mt7622_rfb_defconfig
index ae5fda52d7..4747470f08 100644
--- a/configs/mt7622_rfb_defconfig
+++ b/configs/mt7622_rfb_defconfig
@@ -54,7 +54,8 @@ CONFIG_DM_SERIAL=y
 CONFIG_MTK_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
-CONFIG_MTK_SNFI_SPI=y
+# CONFIG_MTK_SNFI_SPI is not set
+CONFIG_MTK_SNOR=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_TIMER=y
 CONFIG_MTK_TIMER=y
diff --git a/configs/mt7629_rfb_defconfig b/configs/mt7629_rfb_defconfig
index 9b94c2038e..b5a5059998 100644
--- a/configs/mt7629_rfb_defconfig
+++ b/configs/mt7629_rfb_defconfig
@@ -65,7 +65,8 @@ CONFIG_DM_SERIAL=y
 CONFIG_MTK_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
-CONFIG_MTK_SNFI_SPI=y
+# CONFIG_MTK_SNFI_SPI is not set
+CONFIG_MTK_SNOR=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_WATCHDOG=y
-- 
2.18.0

  parent reply	other threads:[~2020-11-13  3:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13  3:02 [PATCH 0/2] *** Add support for Mediatek mt762x SoC *** SkyLake Huang
2020-11-13  3:02 ` [PATCH 1/2] spi: mtk_snor: add support for MTK SPI NOR controller SkyLake Huang
2020-12-07 17:48   ` Jagan Teki
2021-01-18  4:19     ` SkyLake Huang
2020-11-13  3:02 ` SkyLake Huang [this message]
2020-11-26  3:54 ` [PATCH 0/2] *** Add support for Mediatek mt762x SoC *** SkyLake Huang

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=20201113030243.22462-3-SkyLake.Huang@mediatek.com \
    --to=skylake.huang@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.