From patchwork Fri Feb 23 10:16:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 10237315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3CAC602A0 for ; Fri, 23 Feb 2018 10:25:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 874E929505 for ; Fri, 23 Feb 2018 10:25:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BD4C2950D; Fri, 23 Feb 2018 10:25:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D78F429505 for ; Fri, 23 Feb 2018 10:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wF8ksNdNz37JPf1rGeN8m0Q+1Uzl94TSUKnAouH/MKc=; b=rbso12C1JMTRF1 7zKlBavqRdr60BRUvYVGP1y0QLU+JoDgSGs+Z9y9X4KFtYtMezYrEX4hBL13QdU1Rfpq00vmCDkx7 epE6/kTU5yp0gGnxnYgJo4vh4N/YT6XfdCfhDOOYC7rIz5Q1N10bw7+Yk+DRoenEzspZS0n7Aa/ei MXH8JJRT1V6lI9Gn3w9uNoJEUM6PL/yqVG4BUbi2r4uCbIW/sR3D8Y3M/j2hDmOu7O48wmNGFF0vh MFvlkdKOQnxxYGwPyslvEsiNo8US5vJz1KobenbrlZ5T1ENhkxOdyhZ8i+ioTksLEniE91e/jXmvq VwkhdbLTqUthxKznYmNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1epAXE-0006MP-Co; Fri, 23 Feb 2018 10:25:00 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1epASV-0000xS-6l; Fri, 23 Feb 2018 10:21:44 +0000 X-UUID: 1311f815ed0741a88a14381b1d276f0f-20180223 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 124472332; Fri, 23 Feb 2018 18:16:52 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 23 Feb 2018 18:16:51 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 23 Feb 2018 18:16:51 +0800 From: To: , , , , Subject: [PATCH v1 18/19] arm: dts: mt7623: add MT7623A reference boards Date: Fri, 23 Feb 2018 18:16:38 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180223_022008_105929_D239C510 X-CRM114-Status: GOOD ( 12.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Wang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Wang Add mt7623a-rfb.dtsi where most nodes can be inherited from mt7623n-rfb.dtsi and keep these distinctions from MT7623A boards in mt7623a-rfb.dtsi for most definition can be reused among MT7623A board variants. MT7623A has its specific definition of power domain and thus we need to change related devices such as audio, ethernet, crypto, high-speed DMA, NAND, and USB controller to the power domain they specifically belong to. In addition, MT7530 exists as built-in module inside MT7623A SoC and I2C2 and UART[0-1] get being removed and UART2 have distinct pin usage. Those all differences can be totally seen in mt7623a-rfb.dtsi. Signed-off-by: Sean Wang --- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 22 +++++++++ arch/arm/boot/dts/mt7623a-rfb-nand.dts | 26 +++++++++++ arch/arm/boot/dts/mt7623a-rfb.dtsi | 84 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/mt7623n-rfb.dtsi | 15 ++++++ 5 files changed, 149 insertions(+) create mode 100644 arch/arm/boot/dts/mt7623a-rfb-emmc.dts create mode 100644 arch/arm/boot/dts/mt7623a-rfb-nand.dts create mode 100644 arch/arm/boot/dts/mt7623a-rfb.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5af6fce..818817c 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1122,6 +1122,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ mt6580-evbp1.dtb \ mt6589-aquaris5.dtb \ mt6592-evb.dtb \ + mt7623a-rfb-emmc.dtb \ + mt7623a-rfb-nand.dtb \ mt7623n-rfb-emmc.dtb \ mt7623n-rfb-nand.dtb \ mt7623n-bananapi-bpi-r2.dtb \ diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts new file mode 100644 index 0000000..ef6398e --- /dev/null +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2017-2018 MediaTek Inc. + * Author: Sean Wang + * + */ + +/dts-v1/; +#include "mt7623a-rfb.dtsi" + +/ { + model = "MediaTek MT7623A with eMMC reference board"; + compatible = "mediatek,mt7623a-rfb-emmc", "mediatek,mt7623"; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; +}; + +&mmc0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/mt7623a-rfb-nand.dts b/arch/arm/boot/dts/mt7623a-rfb-nand.dts new file mode 100644 index 0000000..592d5d7 --- /dev/null +++ b/arch/arm/boot/dts/mt7623a-rfb-nand.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2017-2018 MediaTek Inc. + * Author: Sean Wang + * + */ + +/dts-v1/; +#include "mt7623a-rfb.dtsi" + +/ { + model = "MediaTek MT7623A with NAND reference board"; + compatible = "mediatek,mt7623a-rfb-nand", "mediatek,mt7623"; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; +}; + +&bch { + status = "okay"; +}; + +&nandc { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/mt7623a-rfb.dtsi b/arch/arm/boot/dts/mt7623a-rfb.dtsi new file mode 100644 index 0000000..3a15c46 --- /dev/null +++ b/arch/arm/boot/dts/mt7623a-rfb.dtsi @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2017-2018 MediaTek Inc. + * Author: Sean Wang + * + */ + +/dts-v1/; +#include +#include "mt7623n-rfb.dtsi" + +/ { + memory { + device_type = "memory"; + reg = <0 0x80000000 0 0x20000000>; + }; +}; + +&afe { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>; +}; + +&cir { + status = "disabled"; +}; + +&crypto { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>; +}; + +ð { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>; +}; + +&hsdma { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_b>; +}; + +&mt7530 { + mediatek,mcm; + resets = <ðsys MT2701_ETHSYS_MCM_RST>; + reset-names = "mcm"; +}; + +&nandc { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_IFR_MSC>; +}; + +&pcie { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>; +}; + +&scpsys { + compatible = "mediatek,mt7623a-scpsys", + "syscon"; + clocks = <&topckgen CLK_TOP_ETHIF_SEL>; + clock-names = "ethif"; +}; + +&uart0 { + status = "disabled"; +}; + +&uart1 { + status = "disabled"; +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins_b>; +}; + +&usb1 { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>; +}; + +&usb2 { + power-domains = <&scpsys MT7623A_POWER_DOMAIN_HIF>; +}; diff --git a/arch/arm/boot/dts/mt7623n-rfb.dtsi b/arch/arm/boot/dts/mt7623n-rfb.dtsi index 0237476..07ed15d 100644 --- a/arch/arm/boot/dts/mt7623n-rfb.dtsi +++ b/arch/arm/boot/dts/mt7623n-rfb.dtsi @@ -380,6 +380,14 @@ }; }; + i2c2_pins_b: i2c2-alt { + pin-i2c2 { + pinmux = , + ; + bias-disable; + }; + }; + i2s0_pins_a: i2s0-default { pin-i2s0 { pinmux = , @@ -629,6 +637,13 @@ ; }; }; + + uart2_pins_b: uart2-alt { + pins-dat { + pinmux = , + ; + }; + }; }; &pwm {