From mboxrd@z Thu Jan 1 00:00:00 1970 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 C9755C2BA4C for ; Wed, 26 Jan 2022 07:45:53 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kVoHU44U1kwQKoDrdv8MrKPe8BfpK+BUdkK0b3+RJU8=; b=isw4dFZDsJGIuq cRbCzOTojwaxI6JkkjJ5+v7PK9m1tQiOKQ2udmAxc5K1Ktwne2iSyuz9U8LMLrEm08TOpBTZUMcGg ucvwNm682cPi75WIwzibuLdn/22X1HakhPcFqeWXn7/k/5RVD+yor8MhDd1V2msaaF38QkMzcPg7f XBuzLKKCdBvftyrsXo+YAfDH7tysHbMc2XiRAxYnGGBuuu09S2ENALD6rEU9GyoaaTAgYytLX9pRo EMWNJN50L1lkR0N2bJdvk3Q3Rr8ubaiF1K+nLaooZhTMjJ7W5tX+erU7vazT26OAs8M4RFSZ+g2aq tYZ22EtwnF48jmeDwp5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCcz0-00AbIZ-7g; Wed, 26 Jan 2022 07:44:46 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCcyv-00AbHK-QP for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 07:44:43 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 8ADFAB8173C; Wed, 26 Jan 2022 07:44:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 722BCC340E3; Wed, 26 Jan 2022 07:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643183079; bh=vtPURswq1do/5958Qsa3FJW0cYlaVmXbhfDTYeU+OH4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JHMlhykQSTpMDY9BR/P6/EVFcCO5+WXfKtFcxPg6oEu2Uje+HF1ShNlhHxK+2Uc0r UZnFaEtebexA08W5OtXlZTsGTPPyXSinP7HLuZGQx3bvNYXtkECHYk254FYQvpRvcD WsMIIJWk9SG94/a/lzLZU/2HPh2i1awWLXVAMM6qmyT5apTO2MGiuWe2O6dtK5ttd3 tfwXoxJxe9CNjESfsQNdUHiffW6nKI1sTvrZMqIDKzOXSwB9fd7PCoiJiyGfd9eOl2 HLj6KKZ13hiIJ0h8fOU6NI6KwKEpIL4FdkYvL9T6/I6ivvxrja/05mol41kyKveDSy Ibi/gNTdqPaxw== Date: Wed, 26 Jan 2022 15:44:32 +0800 From: Shawn Guo To: Alexander Stein Cc: Tim Harvey , Rob Herring , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Device Tree Mailing List , open list , Linux ARM Mailing List Subject: Re: (EXT) Re: (EXT) Re: [PATCH] arm64: dts: imx8mm-venice-gw73xx-0x: add dt overlays for serial modes Message-ID: <20220126074432.GF4686@dragon> References: <20211214213630.14819-1-tharvey@gateworks.com> <2226437.ElGaqSPkdT@steina-w> <6686721.lOV4Wx5bFT@steina-w> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6686721.lOV4Wx5bFT@steina-w> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_234442_158889_734BC6A7 X-CRM114-Status: GOOD ( 39.22 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 12, 2022 at 07:58:00AM +0100, Alexander Stein wrote: > Am Dienstag, 11. Januar 2022, 18:53:29 CET schrieb Tim Harvey: > > On Mon, Jan 10, 2022 at 11:20 PM Alexander Stein > > > > wrote: > > > Am Dienstag, 11. Januar 2022, 01:00:21 CET schrieb Tim Harvey: > > > > [SNIP] > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/Makefile > > > > > b/arch/arm64/boot/dts/freescale/Makefile index > > > > > a14a6173b765..5ec8d59347b6 > > > > > 100644 > > > > > --- a/arch/arm64/boot/dts/freescale/Makefile > > > > > +++ b/arch/arm64/boot/dts/freescale/Makefile > > > > > @@ -44,6 +44,9 @@ dtb-$(CONFIG_ARCH_MXC) += > > > > > imx8mm-var-som-symphony.dtb > > > > > > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw71xx-0x.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x.dtb > > > > > > > > > > +dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs232-rts.dtbo > > > > > +dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs422.dtbo > > > > > +dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs485.dtbo > > > > > > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw7901.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw7902.dtb > > > > > dtb-$(CONFIG_ARCH_MXC) += imx8mn-beacon-kit.dtb > > > > > > > > [SNIP] > > > > I'm mostly interested to see if my approach to dt fragments here and > > > > the naming of the files makes sense to others. > > > > > > > > This patch causes the kernel to build dtbo files for: > > > > arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs232-rts.dtbo > > > > arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs422.dtbo > > > > arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x-rs485.dtbo > > > > > > > > The intention is that these files are used by boot firmware (U-Boot) > > > > to adjust the dtb before passing it to the kernel. > > > > > > Hi Tim, > > > > > > do these dtbo actually work? I'm wondering because I was trying to > > > useoverlays myself and noticed that the had to be compiled with -@ for > > > u-boot to be able > > > to apply them. Apparently there are 2 possibilities: > > Alexander, > > > > Yes, they work, but I do manually set DTC_FLAGS=-@ when building > > kernel dtbs to make them work. > > I see, I expected something like this. That's why I responded to you. > > > > * Set "DTC_FLAGS_[dtb] := -@" yourself > > > See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ > > > commit/?id=e426d63e752bdbe7d5ba2d872319dde9ab844a07 > > > > > > * Use dedicated overlay target > > > See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ > > > commit/?id=15d16d6dadf6947ac7f9a686c615995c5a426ce2 > > > > > > You use neither of them. IIRC just naming the target file .dtbo will not > > > apply symbols (-Q) during dtc call. Can you verify using 'V=1' > > > Also I'm wondering which way is the best to go. > > > > I wasn't aware there was a way to do this via Makefiles. It seems that > > perhaps Rob's approach with 'kbuild: Add generic rule to apply > > fdtoverlay' is a way to avoid having to add them all manually in the > > first approach? I must admit I'm not sure how to use that. > > I tried using this myself for my custom board. I feel it is a bit cumbersome > to get it right. > See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/ > arch/arm64/boot/dts/xilinx/Makefile for an example. > > Essentially you define your .dtb as before and add another target (e.g. sm- > k26-revA-sck-kv-g-revA-dtbs) where you add your .dtbo _after_ the original > .dtb. This target needs to be added to 'dtb-y' as before. > > I suspect this way is needed to check the .dtbo against the base .dtb if it > actually matches. Yeah, I like this check. Tim, could you update your patch to follow this pattern? Shawn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel