From patchwork Wed Apr 27 23:36:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 12829835 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1F13C433EF for ; Wed, 27 Apr 2022 23:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5qfUJyFoQEmq7e5TyH7gP8Hkzc5N7ggW2lkf7b/zfgU=; b=bVKlS5iYoQrT17 zbWV3dabMvcF98LE3T9Mu68Ouqp/JyZRocKtun16jqKV/bsoZvEM7Mxa807NdF9iqb/UBJlle2SdG hM8cnQzu1LoL7oMtvsjqr3cZZTjBeMiZlc1dVASIinZjiV7giB0eck33wxXe8welw5Q9XS40Di3uI PbhB9ojyCTVPr5RzZgvR5WHqHwam7X259NkHxBGsNAHcKPW0/geZICURtJcZbNdnV0W6y/9eJGalL 40PesiajZW9uAvTEmkRGIpxQl/W4Z4c2wEUaBHVg3XbNNI8tTLp4ZBImstk7gcSpGEc8plwQXcceC mrJCVDEMJKBttGfCJu2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njrDF-003wsW-JD; Wed, 27 Apr 2022 23:36:49 +0000 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njrCs-003wlq-EY; Wed, 27 Apr 2022 23:36:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=mcZNMidGbI3QR8Qt+O+V4KAmj1ZTFMV4YJOKIvJrc/o=; b=uqT/3MFkZUPeR3Qs4qBxKqyiOg aUXNrRn+Im8GqeQ1L3IItVBItxz4twbQl9NAzElSthGHnzk5m5osuEEiYBefel5O8Q0nVVSXHtm3c fa38+wL18hK/yLOH9mGR3fzmIuLTFSWouEit/reb1QPm2LGg1U3+4A5Dbi/ib3ZflnKNLjRrlnSdn 4+xLsT+CiRS7MKdr43dh1Uh4iVVIZTW0edkgFE2iuo/MpCUm6xZwSsfPh5jOtVbofkb6xcQuu8241 zSK1U9TcQBHyVZmm1LBj0w2zGBCVcTLmB9XSAmKpKipfY8uvF8Y0oEAgdeNnspKakp8KX2aIP/L6j SGfuey6w==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1njrCe-006YNT-DN; Thu, 28 Apr 2022 01:36:12 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.95) (envelope-from ) id 1njrCd-0058nF-37; Thu, 28 Apr 2022 01:36:11 +0200 From: Aurelien Jarno To: Arnd Bergmann , Krzysztof Kozlowski , Olof Johansson , Rob Herring , bcm-kernel-feedback-list@broadcom.com Cc: Stefan Wahren , Nicolas Saenz Julienne , Linus Walleij , devicetree@vger.kernel.org, Phil Elwell , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, soc@kernel.org, Aurelien Jarno Subject: [PATCH RESEND 1/2] arm64: dts: broadcom: Enable device-tree overlay support for RPi devices Date: Thu, 28 Apr 2022 01:36:06 +0200 Message-Id: <20220427233607.1225419-2-aurelien@aurel32.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220427233607.1225419-1-aurelien@aurel32.net> References: <20220427233607.1225419-1-aurelien@aurel32.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_163626_517070_52199FBD X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the '-@' DTC option for the Raspberry Pi devices. This option populates the '__symbols__' node that contains all the necessary symbols for supporting device-tree overlays (for instance from the firmware or the bootloader) on these devices. The Rasbperry Pi devices are well known for their GPIO header, that allow various "HATs" or other modules do be connected and this enables users to create out-of-tree device-tree overlays for these modules. Please note that this change does increase the size of the resulting DTB by ~40%. For example, with v5.17 increase in size is as follows: bcm2711-rpi-400.dtb 26481 -> 36830 bytes bcm2711-rpi-4-b.dtb 26537 -> 36886 bytes bcm2711-rpi-cm4-io.dtb 26426 -> 36945 bytes bcm2837-rpi-3-a-plus.dtb 14133 -> 19740 bytes bcm2837-rpi-3-b.dtb 14310 -> 20006 bytes bcm2837-rpi-3-b-plus.dtb 14670 -> 20474 bytes bcm2837-rpi-cm3-io3.dtb 13680 -> 19266 bytes Signed-off-by: Aurelien Jarno --- arch/arm64/boot/dts/broadcom/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile index 5082fcd1fea5..0aa8ee2afdd5 100644 --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile @@ -1,4 +1,15 @@ # SPDX-License-Identifier: GPL-2.0 + +# Enables support for device-tree overlays +DTC_FLAGS_bcm2711-rpi-400 := -@ +DTC_FLAGS_bcm2711-rpi-4-b := -@ +DTC_FLAGS_bcm2711-rpi-cm4-io := -@ +DTC_FLAGS_bcm2837-rpi-3-a-plus := -@ +DTC_FLAGS_bcm2837-rpi-3-b := -@ +DTC_FLAGS_bcm2837-rpi-3-b-plus := -@ +DTC_FLAGS_bcm2837-rpi-cm3-io3 := -@ +DTC_FLAGS_bcm2837-rpi-zero-2-w := -@ + dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ bcm2711-rpi-cm4-io.dtb \ From patchwork Wed Apr 27 23:36:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 12829834 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C476C433F5 for ; Wed, 27 Apr 2022 23:37:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PBnnUl72jxuSfxHgG3gP/BMhhjFQPk0VskWtti+7pkI=; b=Vf73C9Vg7DPGmx +AO5Epw4noC//9Q9VHiq1JUBzwC+nncBwHLLWgB2q292QFwHsAPlf4ORL93fpgpfpZ7JW+ReF6viM 0y19Rn24xX6bwxdxuZI3IoRAUmLBTLVhSbEJdshimRjpmJcIWynAfAHYp2K87iWxsNy8DALMxbbqF LRviYeah10dXonMho8LCMh5AE6o8GPd8+WRyamstYRW558lLxLy/Qcx9hZFyXmV3WPAkg9njEWDHN 92jwd5hRxWOQZfu7+BX7TWRGMnxqRDF8O8L19ScLPVNjxmU/LxbD5q6Q9pNEOLF9sARCVOnhBvUpR HT8Wn4gl6nEACiuvrvWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1njrD4-003wpz-Bx; Wed, 27 Apr 2022 23:36:38 +0000 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1njrCs-003wly-BS; Wed, 27 Apr 2022 23:36:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=rtzKHvK52/YyI9iOUl+5leZ5LnRvydEZvetZFryYg2U=; b=Zx+O39PPyuUBhiteC14mio57+7 nOMjcMHAFS1hEvfY4kGaYQfrIuPkToHKgWsn6Fo0Ikhw4PZTSvElgHFaIQX9nMxMV/08cIcKmTuDR GZzs/KI8QJ+fAZKglFnhC4sKvlkvN9hQZmyGkpT/ifbwtX8mlk5AHuR2LdE6Ln+pIeWxhJfnSTxyr CH+1H+q+nEwsR/2tC6juNIwL4NeV6KVRoS8f9122iVQhDokWs/o+BQWEQ5sbAMMG1DBbfqI6jGzp7 O4bY6I904nUiaCgfKffuyCt+gUF+T0hmCUmn0korLJscXd0vSsyRFnfW8KEfJ6743551GgIxWiRZF eM9W1CaA==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1njrCe-006YNU-Ea; Thu, 28 Apr 2022 01:36:12 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.95) (envelope-from ) id 1njrCd-0058nI-4A; Thu, 28 Apr 2022 01:36:11 +0200 From: Aurelien Jarno To: Arnd Bergmann , Krzysztof Kozlowski , Olof Johansson , Rob Herring , bcm-kernel-feedback-list@broadcom.com Cc: Stefan Wahren , Nicolas Saenz Julienne , Linus Walleij , devicetree@vger.kernel.org, Phil Elwell , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, soc@kernel.org, Aurelien Jarno Subject: [PATCH RESEND 2/2] arm: dts: Enable device-tree overlay support for RPi devices Date: Thu, 28 Apr 2022 01:36:07 +0200 Message-Id: <20220427233607.1225419-3-aurelien@aurel32.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220427233607.1225419-1-aurelien@aurel32.net> References: <20220427233607.1225419-1-aurelien@aurel32.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220427_163626_416297_3D4791CB X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the '-@' DTC option for the Raspberry Pi devices. This option populates the '__symbols__' node that contains all the necessary symbols for supporting device-tree overlays (for instance from the firmware or the bootloader) on these devices. The Rasbperry Pi devices are well known for their GPIO header, that allow various "HATs" or other modules do be connected and this enables users to create out-of-tree device-tree overlays for these modules. Please note that this change does increase the size of the resulting DTB by ~40%. For example, with v5.17 increase in size is as follows: bcm2711-rpi-400.dtb 26481 -> 36830 bytes bcm2711-rpi-4-b.dtb 26537 -> 36886 bytes bcm2711-rpi-cm4-io.dtb 26426 -> 36945 bytes bcm2835-rpi-a.dtb 12641 -> 17852 bytes bcm2835-rpi-a-plus.dtb 12765 -> 17976 bytes bcm2835-rpi-b.dtb 12763 -> 17998 bytes bcm2835-rpi-b-plus.dtb 12979 -> 18263 bytes bcm2835-rpi-b-rev2.dtb 12847 -> 18131 bytes bcm2835-rpi-cm1-io1.dtb 12839 -> 18113 bytes bcm2835-rpi-zero.dtb 12681 -> 17924 bytes bcm2835-rpi-zero-w.dtb 13135 -> 18430 bytes bcm2836-rpi-2-b.dtb 13687 -> 19255 bytes bcm2837-rpi-3-a-plus.dtb 14133 -> 19740 bytes bcm2837-rpi-3-b.dtb 14310 -> 20006 bytes bcm2837-rpi-3-b-plus.dtb 14670 -> 20474 bytes bcm2837-rpi-cm3-io3.dtb 13680 -> 19266 bytes Signed-off-by: Aurelien Jarno --- arch/arm/boot/dts/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 7c16f8a2b738..85644149de44 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -81,6 +81,24 @@ dtb-$(CONFIG_SOC_SAMA7G5) += \ at91-sama7g5ek.dtb dtb-$(CONFIG_ARCH_AXXIA) += \ axm5516-amarillo.dtb +# Enables support for device-tree overlays +DTC_FLAGS_bcm2835-rpi-b := -@ +DTC_FLAGS_bcm2835-rpi-a := -@ +DTC_FLAGS_bcm2835-rpi-b-rev2 := -@ +DTC_FLAGS_bcm2835-rpi-b-plus := -@ +DTC_FLAGS_bcm2835-rpi-a-plus := -@ +DTC_FLAGS_bcm2835-rpi-cm1-io1 := -@ +DTC_FLAGS_bcm2836-rpi-2-b := -@ +DTC_FLAGS_bcm2837-rpi-3-a-plus := -@ +DTC_FLAGS_bcm2837-rpi-3-b := -@ +DTC_FLAGS_bcm2837-rpi-3-b-plus := -@ +DTC_FLAGS_bcm2837-rpi-cm3-io3 := -@ +DTC_FLAGS_bcm2837-rpi-zero-2-w := -@ +DTC_FLAGS_bcm2711-rpi-400 := -@ +DTC_FLAGS_bcm2711-rpi-4-b := -@ +DTC_FLAGS_bcm2711-rpi-cm4-io := -@ +DTC_FLAGS_bcm2835-rpi-zero := -@ +DTC_FLAGS_bcm2835-rpi-zero-w := -@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b.dtb \ bcm2835-rpi-a.dtb \