devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <sean.wang@mediatek.com>
To: robh+dt@kernel.org, matthias.bgg@gmail.com, mark.rutland@arm.com,
	devicetree@vger.kernel.org, john@phrozen.org,
	linux-mediatek@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Sean Wang <sean.wang@mediatek.com>
Subject: [PATCH v4 8/9] arm: dts: mt7623: enable the nand device on the mt7623n nand rfb
Date: Thu, 25 May 2017 12:02:46 +0800	[thread overview]
Message-ID: <a5820f7be6a00cb49454c52eba2989e39e1b912e.1495683769.git.sean.wang@mediatek.com> (raw)
In-Reply-To: <cover.1495683769.git.sean.wang@mediatek.com>

From: John Crispin <john@phrozen.org>

Enable the nand device and setup pinmux on the mt7632m rfb with nand
support.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 arch/arm/boot/dts/mt7623n-rfb-nand.dts | 88 ++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/arch/arm/boot/dts/mt7623n-rfb-nand.dts b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
index 436d51c..9356095 100644
--- a/arch/arm/boot/dts/mt7623n-rfb-nand.dts
+++ b/arch/arm/boot/dts/mt7623n-rfb-nand.dts
@@ -19,3 +19,91 @@
 	model = "MediaTek MT7623N NAND reference board";
 	compatible = "mediatek,mt7623n-rfb-nand", "mediatek,mt7623";
 };
+
+&pio {
+	nand_pins_default: nanddefault {
+		pins_dat {
+			pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_NLD7>,
+				 <MT7623_PIN_112_MSDC0_DAT6_FUNC_NLD6>,
+				 <MT7623_PIN_114_MSDC0_DAT4_FUNC_NLD4>,
+				 <MT7623_PIN_118_MSDC0_DAT3_FUNC_NLD3>,
+				 <MT7623_PIN_121_MSDC0_DAT0_FUNC_NLD0>,
+				 <MT7623_PIN_120_MSDC0_DAT1_FUNC_NLD1>,
+				 <MT7623_PIN_113_MSDC0_DAT5_FUNC_NLD5>,
+				 <MT7623_PIN_115_MSDC0_RSTB_FUNC_NLD8>,
+				 <MT7623_PIN_119_MSDC0_DAT2_FUNC_NLD2>;
+			input-enable;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up;
+		};
+
+		pins_we {
+			pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_NWEB>;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
+		};
+
+		pins_ale {
+			pinmux = <MT7623_PIN_116_MSDC0_CMD_FUNC_NALE>;
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
+		};
+	};
+};
+
+&nandc {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_pins_default>;
+	nand@0 {
+		reg = <0>;
+		spare_per_sector = <64>;
+		nand-ecc-mode = "hw";
+		nand-ecc-strength = <12>;
+		nand-ecc-step-size = <1024>;
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "preloader";
+				reg = <0x0 0x40000>;
+			};
+
+			partition@40000 {
+				label = "uboot";
+				reg = <0x40000 0x80000>;
+			};
+
+			partition@C0000 {
+				label = "uboot-env";
+				reg = <0xC0000 0x40000>;
+			};
+
+			partition@140000 {
+				label = "bootimg";
+				reg = <0x140000 0x2000000>;
+			};
+
+			partition@2140000 {
+				label = "recovery";
+				reg = <0x2140000 0x2000000>;
+			};
+
+			partition@4140000 {
+				label = "rootfs";
+				reg = <0x4140000 0x1000000>;
+			};
+
+			partition@5140000 {
+				label = "usrdata";
+				reg = <0x5140000 0x1000000>;
+			};
+		};
+	};
+};
+
+&bch {
+	status = "okay";
+};
-- 
2.7.4

  parent reply	other threads:[~2017-05-25  4:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25  4:02 [PATCH v4 0/9] arm: dts: extend mt7623 support sean.wang
2017-05-25  4:02 ` [PATCH v4 1/9] dt-bindings: arm: mediatek: update for MT7623n SoC and relevant boards sean.wang
2017-05-31 17:54   ` Rob Herring
2017-05-25  4:02 ` [PATCH v4 3/9] arm: dts: mt7623: add mt7623-mt6323.dtsi file sean.wang
     [not found]   ` <2c770301279b10b78382b53529a6b83a6d847e32.1495683769.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-28 11:31     ` kbuild test robot
     [not found]       ` <201705281908.LU8TFOQ8%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-29 15:27         ` Matthias Brugger
     [not found]           ` <d565b4dd-f6b7-ee43-ddfe-ae98328646ed-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-31  8:08             ` [kbuild-all] " Ye Xiaolong
2017-05-25  4:02 ` [PATCH v4 5/9] ARM: mediatek: add MT7623a smp bringup code sean.wang
2017-05-25  4:02 ` sean.wang [this message]
     [not found] ` <cover.1495683769.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-25  4:02   ` [PATCH v4 2/9] dt-bindings: arm: mediatek: add bindings for mediatek MT7623a SoC Platform sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-05-25  4:02   ` [PATCH v4 4/9] arm: dts: mt7623: rename mt7623-evb.dts to arch/arm/boot/dts/mt7623n-rfb.dtsi sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-05-25  4:02   ` [PATCH v4 6/9] arm: dts: mt7623: cleanup the mt7623n rfb uart nodes sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-05-25  4:02   ` [PATCH v4 7/9] arm: dts: mt7623: enable the usb device on the mt7623n rfb sean.wang-NuS5LvNUpcJWk0Htik3J/w
     [not found]     ` <4cb528c77f4d44bd0932b69f39b0d5b557d9eab1.1495683769.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-28 16:02       ` kbuild test robot
2017-05-25  4:02   ` [PATCH v4 9/9] arm: dts: mt7623: add dts file for Bananapi R2 (BPI-R2) board sean.wang-NuS5LvNUpcJWk0Htik3J/w
     [not found]     ` <5cc5489b38fc2723c30c8cfe0d4353f967d100f3.1495683769.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-28 20:53       ` kbuild test robot
2017-07-27 14:39     ` Matthias Brugger
     [not found]       ` <805ad5c4-db47-ef10-565d-b63e33a84bdf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-31  2:46         ` Sean Wang

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=a5820f7be6a00cb49454c52eba2989e39e1b912e.1495683769.git.sean.wang@mediatek.com \
    --to=sean.wang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    /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).