From nobody Thu Nov 14 07:33:55 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F154C4332F for ; Sun, 6 Nov 2022 08:51:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbiKFIvT (ORCPT ); Sun, 6 Nov 2022 03:51:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbiKFIu4 (ORCPT ); Sun, 6 Nov 2022 03:50:56 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A859FEE1B; Sun, 6 Nov 2022 01:50:48 -0700 (PDT) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id 15F041007FA; Sun, 6 Nov 2022 08:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1667724647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvVMLiuM+XeZ0ADmdp7nYgDyGhyaL6XbW/9kpCQCWGs=; b=KoKDbAsFd0Q7TrVi1k6jLVIkUPdeGEuPyy0MaUNB0crwRGb1k6RQl49+uVB6mdL+VsRyp6 pLAXBv2iZCH9vx33nKcK9m6jbR8Rxx/eWLdBEi6tUQXR9EXrR9pJClSVP+h0fcyxqYHBur agxBoH+/axY77lP4t/nJhDIq5pUyn6c= Received: from frank-G5.. (fttx-pool-80.245.79.199.bambit.de [80.245.79.199]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 81F3E360707; Sun, 6 Nov 2022 08:50:46 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Matthias Brugger , Rob Herring , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v3 11/11] arm64: dts: mt7986: add BPI-R3 nand/nor overlays Date: Sun, 6 Nov 2022 09:50:34 +0100 Message-Id: <20221106085034.12582-12-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221106085034.12582-1-linux@fw-web.de> References: <20221106085034.12582-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mail-ID: 7abe5213-43d3-49b9-acfc-560d931496e8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add devicetree overlays for using nand and nor on BPI-R3. Signed-off-by: Frank Wunderlich --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-nand.dts | 53 +++++++++++++++ .../mediatek/mt7986a-bananapi-bpi-r3-nor.dts | 67 +++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-na= nd.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-no= r.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index e8902f2cc58f..d42208c4090d 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-bananapi-bpi-r64.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-nand.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-nor.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986b-rfb.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts = b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts new file mode 100644 index 000000000000..e12ff825bb50 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ + +/dts-v1/; +/plugin/; + +//dtc -O dtb -o bpi-r3-nand.dtbo mt7986a-bananapi-bpi-r3-nand.dts + +/ { + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path =3D "/soc/spi@1100a000"; + __overlay__ { + #address-cells =3D <1>; + #size-cells =3D <0>; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "bl2"; + reg =3D <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label =3D "reserved"; + reg =3D <0x80000 0x300000>; + }; + + partition@380000 { + label =3D "fip"; + reg =3D <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label =3D "ubi"; + reg =3D <0x580000 0x7a80000>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts b= /arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts new file mode 100644 index 000000000000..f11ffd9c4bce --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ + +/dts-v1/; +/plugin/; + +//dtc -O dtb -o bpi-r3-nor.dtbo mt7986a-bananapi-bpi-r3-nor.dts + +/ { + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path =3D "/soc/spi@1100a000"; + __overlay__ { + #address-cells =3D <1>; + #size-cells =3D <0>; + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "bl2"; + reg =3D <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label =3D "reserved"; + reg =3D <0x20000 0x20000>; + }; + + partition@40000 { + label =3D "u-boot-env"; + reg =3D <0x40000 0x40000>; + }; + + partition@80000 { + label =3D "reserved2"; + reg =3D <0x80000 0x80000>; + }; + + partition@100000 { + label =3D "fip"; + reg =3D <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label =3D "recovery"; + reg =3D <0x180000 0xa80000>; + }; + + partition@c00000 { + label =3D "fit"; + reg =3D <0xc00000 0x1400000>; + compatible =3D "denx,fit"; + }; + }; + }; + }; + }; +}; --=20 2.34.1