Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1170126rwb; Fri, 18 Nov 2022 13:59:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eLYHVCyOTDv01qig2VgfM/KJUQ4n+FQg474wuOMcaSmJbBJ86mMqg0BlsXinuVSlZbRGl X-Received: by 2002:a17:903:456:b0:186:880c:167e with SMTP id iw22-20020a170903045600b00186880c167emr1524796plb.7.1668808785473; Fri, 18 Nov 2022 13:59:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668808785; cv=none; d=google.com; s=arc-20160816; b=LFf8YNcN2MKkzwgNacEozI8GQQIMBegvuOoIMeUpcp5bQJj+9/C4cpVoXqJrohXFrv /ppWbPCj7iSaf8gOhUvGWH0MEQXyQG1GiuEdBHjxf0UASjMdhaKVRVWACRRzK8EAffON 9kpc17UdR1eJDx8YmD4MYdlGvGgBnDjGPumMnwt4M4lVVrpP5ewk3oiCo0tuzdm5N9ph 7VfLtutrv6iabRqyK5d+fac6/W+uoKsuhieDKZOaPgasJL818WE5MuaGcM5F+EMF+iZa kV3LcBuligJwHN2S0yJIqfpKatZIHEjBlY9KMiZiwUrT8X6Pm45N7qObvt2qaxt/hGMV Rl/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Z+xwnrsoUobmreQpAn1cmLZ/77U1MlbEyuwhh2UKlVo=; b=w0x7B/l47OoqWia9wL/RsAR3tSHB3b7PGQcW6v/KQ8fEkSsqduDbIYUmlGjCzsx7CE gykwFmLAXim3e0XxQo4wTWLuJYq/ZwguSG52pUk7DhfEopJBZ4PT7SWhTSYXXeUFBJSN SThL2tbXUkkfgvsFHfmF8f1xl+AuTBFBDRx4bMR/0UBaLFRdQG7NA1lRdEWNjEIhr+R7 NaXZzFvko5l1EGNK+l5JbIP6BQF3Drvf+S/DooVH6mtP7cIIgKdBvEgnE6rHrSc2blCz VMZtMyzvVv32a3gtLbiTrREgZ1mh/Lu/y7DOnxjyG4fKz6BMuYOPG0LD4ehet/vXO2nD trOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KDveWRKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i129-20020a625487000000b005731d316830si3103514pfb.23.2022.11.18.13.59.34; Fri, 18 Nov 2022 13:59:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KDveWRKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229533AbiKRVkR (ORCPT + 91 others); Fri, 18 Nov 2022 16:40:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbiKRVkH (ORCPT ); Fri, 18 Nov 2022 16:40:07 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 189685E9FE; Fri, 18 Nov 2022 13:40:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A7DF5625DC; Fri, 18 Nov 2022 21:40:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15EDCC43140; Fri, 18 Nov 2022 21:40:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668807603; bh=YKUHTSPq5IDGNDGLjf/sjbiqE0AZozBsTwTI13qMcZU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KDveWRKNOZyZVU+/76UW6M5Q/08kv/yJiaBcxH6kTaAvK0EC/0oB/lPwlzQXRfmt6 Zm/6M8sSh3ksyjPfsLmQgNXmslxy66uL5hS1qxIj6follviijaqOxF2Ylk8xrW33Tq tROHgNpz9156QXsea3C6WmNgnCpvTK33f5e0Kl8qKFQujqsYAELF2CIoRERiHLZSQS RWX1QktikpkEd0k51tItGSYnnudBdJPC0ZiXCrXF9/tj55S2jo8fCS6mpcV6k2X5mq 2BxJRJFcUCadrZkCMXM/Y8JSeEMHRoKa07VJ9fAMRabmA+AXFrZYTMVzJX+sgyxq1O erfDoFG1bweNQ== Received: by mail-lf1-f42.google.com with SMTP id a29so10243073lfj.9; Fri, 18 Nov 2022 13:40:02 -0800 (PST) X-Gm-Message-State: ANoB5pm9vecbdu77tVVB6cesyfMA80EX0F1B3J1ariFKWxfLoDbWQB6m qmHvwP+KNdTOQAdgNCzWeeS7nL0el4YY0cx/zw== X-Received: by 2002:a05:6512:b97:b0:4a4:6ee3:f57b with SMTP id b23-20020a0565120b9700b004a46ee3f57bmr2843395lfv.17.1668807600996; Fri, 18 Nov 2022 13:40:00 -0800 (PST) MIME-Version: 1.0 References: <20221118190126.100895-1-linux@fw-web.de> <20221118190126.100895-12-linux@fw-web.de> In-Reply-To: <20221118190126.100895-12-linux@fw-web.de> From: Rob Herring Date: Fri, 18 Nov 2022 15:39:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 11/11] arm64: dts: mt7986: add BPI-R3 nand/nor overlays To: Frank Wunderlich Cc: linux-mediatek@lists.infradead.org, Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 18, 2022 at 1:01 PM Frank Wunderlich wrote: > > From: Frank Wunderlich > > Add devicetree overlays for using nand and nor on BPI-R3. Can you not tell at runtime which one you booted from? If not, how does one choose which overlay to apply? If you can, why not populate both nodes and enable the right one? IMO, if all h/w is present, it should all be in the DT. Selecting what h/w to use is a separate problem and overlays aren't a great solution for that. > Signed-off-by: Frank Wunderlich > --- > maybe rename to dtso? > > "kbuild: Allow DTB overlays to built from .dtso named source files" > https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=dt/next&id=363547d2191cbc32ca954ba75d72908712398ff2 > > more comments about the dt overlay-support: > > https://patchwork.kernel.org/comment/25092116/ > https://patchwork.kernel.org/comment/25085681/ > --- > v4: > - drop compile-comment from overlays > - add author-information to dt-overlays > --- > arch/arm64/boot/dts/mediatek/Makefile | 2 + > .../mediatek/mt7986a-bananapi-bpi-r3-nand.dts | 55 +++++++++++++++ > .../mediatek/mt7986a-bananapi-bpi-r3-nor.dts | 69 +++++++++++++++++++ > 3 files changed, 126 insertions(+) > create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts > create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts > > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/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) += mt6797-x20-dev.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-emmc.dtb > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo These need rules to apply them to the base dtb(s). You just need: full.dtb := base.dtb overlay.dtb dtb-y += full.dtb Rob