From: SkyLake Huang <SkyLake.Huang@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH,v2,2/2] arm: dts: enable MTK SPI NOR controller driver
Date: Wed, 20 Jan 2021 15:31:34 +0800 [thread overview]
Message-ID: <20210120073134.20814-3-SkyLake.Huang@mediatek.com> (raw)
In-Reply-To: <20210120073134.20814-1-SkyLake.Huang@mediatek.com>
From: "SkyLake.Huang" <skylake.huang@mediatek.com>
1. Enable MTK SPI NOR controller driver on mt7622 & mt7629.
2. Enable quad mode for read and single mode for write.
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
---
arch/arm/dts/mt7622-rfb.dts | 16 +++++++++++++++-
arch/arm/dts/mt7622.dtsi | 11 +++++++++++
arch/arm/dts/mt7629-rfb.dts | 16 +++++++++++++++-
arch/arm/dts/mt7629.dtsi | 11 +++++++++++
configs/mt7622_rfb_defconfig | 3 ++-
configs/mt7629_rfb_defconfig | 3 ++-
6 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/arch/arm/dts/mt7622-rfb.dts b/arch/arm/dts/mt7622-rfb.dts
index ef7d0f0270..c2f1ad2011 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 {
@@ -165,11 +165,25 @@
pinctrl-names = "default", "snfi";
pinctrl-0 = <&snor_pins>;
pinctrl-1 = <&snfi_pins>;
+ status = "disabled";
+
+ spi-flash at 0{
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ u-boot,dm-pre-reloc;
+ };
+};
+
+&snor {
+ pinctrl-names = "default";
+ pinctrl-0 = <&snor_pins>;
status = "okay";
spi-flash at 0{
compatible = "jedec,spi-nor";
reg = <0>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <4>;
u-boot,dm-pre-reloc;
};
};
diff --git a/arch/arm/dts/mt7622.dtsi b/arch/arm/dts/mt7622.dtsi
index 5c2e0251de..0127474c95 100644
--- a/arch/arm/dts/mt7622.dtsi
+++ b/arch/arm/dts/mt7622.dtsi
@@ -53,6 +53,17 @@
#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";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&gic>;
diff --git a/arch/arm/dts/mt7629-rfb.dts b/arch/arm/dts/mt7629-rfb.dts
index 5cc7294de6..df43cc49c5 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 {
@@ -69,11 +69,25 @@
pinctrl-names = "default", "snfi";
pinctrl-0 = <&snor_pins>;
pinctrl-1 = <&snfi_pins>;
+ status = "disabled";
+
+ spi-flash at 0{
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ u-boot,dm-pre-reloc;
+ };
+};
+
+&snor {
+ pinctrl-names = "default";
+ pinctrl-0 = <&snor_pins>;
status = "okay";
spi-flash at 0{
compatible = "jedec,spi-nor";
reg = <0>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <4>;
u-boot,dm-pre-reloc;
};
};
diff --git a/arch/arm/dts/mt7629.dtsi b/arch/arm/dts/mt7629.dtsi
index 6850e0058d..05394266e0 100644
--- a/arch/arm/dts/mt7629.dtsi
+++ b/arch/arm/dts/mt7629.dtsi
@@ -223,6 +223,17 @@
#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";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
ssusbsys: ssusbsys at 1a000000 {
compatible = "mediatek,mt7629-ssusbsys", "syscon";
reg = <0x1a000000 0x1000>;
diff --git a/configs/mt7622_rfb_defconfig b/configs/mt7622_rfb_defconfig
index ccf926e104..347f5f6b12 100644
--- a/configs/mt7622_rfb_defconfig
+++ b/configs/mt7622_rfb_defconfig
@@ -49,7 +49,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 d9032d4493..3691223510 100644
--- a/configs/mt7629_rfb_defconfig
+++ b/configs/mt7629_rfb_defconfig
@@ -75,7 +75,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
next prev parent reply other threads:[~2021-01-20 7:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 7:31 [PATCH 0/2] *** Add support for Mediatek mt762x SoC *** SkyLake Huang
2021-01-20 7:31 ` [PATCH,v2,1/2] spi: mtk_snor: add support for MTK SPI NOR controller SkyLake Huang
2021-01-30 19:21 ` Tom Rini
2021-01-20 7:31 ` SkyLake Huang [this message]
2021-01-30 19:21 ` [PATCH,v2,2/2] arm: dts: enable MTK SPI NOR controller driver Tom Rini
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=20210120073134.20814-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.