mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
01b452fe2d
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
78 lines
1.8 KiB
Diff
78 lines
1.8 KiB
Diff
From c813fbe806257c574240770ef716fbee19f7dbfa Mon Sep 17 00:00:00 2001
|
|
From: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
|
|
Date: Thu, 6 Jun 2019 16:29:04 +0800
|
|
Subject: [PATCH] spi: spi-mem: Mediatek: Add SPI Nand support for MT7629
|
|
|
|
Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
|
|
---
|
|
arch/arm/boot/dts/mt7629-rfb.dts | 45 ++++++++++++++++++++++++++++++++
|
|
arch/arm/boot/dts/mt7629.dtsi | 22 ++++++++++++++++
|
|
3 files changed, 79 insertions(+)
|
|
|
|
--- a/arch/arm/boot/dts/mt7629.dtsi
|
|
+++ b/arch/arm/boot/dts/mt7629.dtsi
|
|
@@ -272,6 +272,22 @@
|
|
status = "disabled";
|
|
};
|
|
|
|
+ snand: snfi@1100d000 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&serial_nand_pins>;
|
|
+ compatible = "mediatek,mt7629-snand";
|
|
+ reg = <0x1100d000 0x1000>, <0x1100e000 0x1000>;
|
|
+ reg-names = "nfi", "ecc";
|
|
+ interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
|
|
+ clocks = <&pericfg CLK_PERI_NFI_PD>,
|
|
+ <&pericfg CLK_PERI_SNFI_PD>,
|
|
+ <&pericfg CLK_PERI_NFIECC_PD>;
|
|
+ clock-names = "nfi_clk", "pad_clk", "ecc_clk";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ status = "disabled";
|
|
+ };
|
|
+
|
|
spi: spi@1100a000 {
|
|
compatible = "mediatek,mt7629-spi",
|
|
"mediatek,mt7622-spi";
|
|
--- a/arch/arm/boot/dts/mt7629-rfb.dts
|
|
+++ b/arch/arm/boot/dts/mt7629-rfb.dts
|
|
@@ -254,6 +254,38 @@
|
|
};
|
|
};
|
|
|
|
+&snand {
|
|
+ status = "okay";
|
|
+ mediatek,quad-spi;
|
|
+
|
|
+ partitions {
|
|
+ compatible = "fixed-partitions";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+
|
|
+ partition@0 {
|
|
+ label = "Bootloader";
|
|
+ reg = <0x00000 0x0100000>;
|
|
+ read-only;
|
|
+ };
|
|
+
|
|
+ partition@100000 {
|
|
+ label = "Config";
|
|
+ reg = <0x100000 0x0040000>;
|
|
+ };
|
|
+
|
|
+ partition@140000 {
|
|
+ label = "factory";
|
|
+ reg = <0x140000 0x0080000>;
|
|
+ };
|
|
+
|
|
+ partition@1c0000 {
|
|
+ label = "firmware";
|
|
+ reg = <0x1c0000 0x1000000>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
&spi {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&spi_pins>;
|