Message ID | 20230712100042.317856-1-durai.manickamkr@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1051863vqm; Wed, 12 Jul 2023 03:35:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlHhCWzdFcdbqCsktkhgVP2u7+dodXnnlXMlrN7YYo6AJKpxSbf+cdXOB8Q9q561g7RXlgKV X-Received: by 2002:a05:6a20:a417:b0:10b:8bc7:e112 with SMTP id z23-20020a056a20a41700b0010b8bc7e112mr12582166pzk.10.1689158135251; Wed, 12 Jul 2023 03:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689158135; cv=none; d=google.com; s=arc-20160816; b=Q8H4GMk/jZ62YERtzLevTWPg0R53ns0EOasERK5Fq2HsKLl6SOiONaH30fwnZk3aJ8 nj2JWroFvQnwdUs9Cguw323j0EKnR3eKPsvXsZGy3dgYiOhRdg1ZDShZtt8N3UPLfTlz SDEpHICIdS6/bxpqCFvWSm0af/K/U9JCfiVy8Tz1CJpN59dq0pPfZNPDcW+wVHjxSu0h PqyTvpuc8b/5fOfBEjYpsdXpIMvNU2l0BxTn2l/5C51LKIo6sepN81qUcpsuFChN4lsZ me4+zwb/7dnwyGc3f8s3Z8dh1anUjysAQ1v+EP1pH+wyfgwMy0t1FF8PFB+kWRu4n/QR bDNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8MpYkj9pbtiBu4SZivYgZqt8bpNLiy3hP+PqLFLEGks=; fh=izPDQ/5grIIsHPUOUmDDX2pgZJTmC/pmRbe0QEdh6YM=; b=fNPYt5MLcOXubws77oPkwUIck58fuwpvOVfK72DWA8sm34MOfZ73KEb7PKm1RE+VHT fQ/PdmW+kpLJ7/ZpI3KflyhbTGzld7AWEkI/mtPJ3WoKmIfN7vhnMRkw+rbDHAYLHl3u yVTQFoKyFM4N5Gv+tJijh1Vra03VpOw9Ih5Elvw5qN4gZ90U6ID9iZaXhURzK2DXLmVd ZCp1I25u+XDKDVNn0voo1GqnCMAszBKMulhPNWU6ebGTCnngIwtF5VyiYzhh5HHAhVeT pP/bTTcuiCXIfznjyFYVkP7jCgkSDF1gHmF8xlqqmo4LQvORaatd+p1Imid6oG4rrbn3 PJTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=FwCOhJST; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br7-20020a056a00440700b00682c0908d51si3019091pfb.126.2023.07.12.03.35.22; Wed, 12 Jul 2023 03:35:35 -0700 (PDT) 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=@microchip.com header.s=mchp header.b=FwCOhJST; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232142AbjGLKB1 (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Wed, 12 Jul 2023 06:01:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbjGLKA5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 06:00:57 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22A5D1712; Wed, 12 Jul 2023 03:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1689156056; x=1720692056; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ghNugLqQAvBbZy9Tk0TttINi11WxlS1QwI84imFrjHY=; b=FwCOhJSTQS4XMTaPd/0JkAUKqGHqOs1MvE1UbZzPrvjP7vDkWfOJMOke VD4M4G9aUEQoAw9FHjnMbkGdEUkBTzt65UYjiNNya0JT9S0/51ypNvojp EuqsDEX9fxTsApLXX5YyQBEKTMoUJtPFVEvngjh7lPYS2Idwka+FhJeZE 5abofuOduAyoVGNlwye9z2wFSG4YEOEHLhsLIRJV8vDm1Uv2uTWqp7g4u WILSsm3pRZqz67a8vnOMkujOY4FLZg4Ojhpnbx1ljNSa2EwoIahJLKAfB 3Cn6O1mZZXUtagx2cCXmxCDA8bsGdgclYOxOigtsuact+b9XoZa1IxiLG Q==; X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="223325195" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Jul 2023 03:00:55 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 12 Jul 2023 03:00:55 -0700 Received: from che-lt-i66125lx.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 12 Jul 2023 03:00:44 -0700 From: Durai Manickam KR <durai.manickamkr@microchip.com> To: <Hari.PrasathGE@microchip.com>, <balamanikandan.gunasundar@microchip.com>, <manikandan.m@microchip.com>, <varshini.rajendran@microchip.com>, <dharma.b@microchip.com>, <nayabbasha.sayed@microchip.com>, <balakrishnan.s@microchip.com>, <cristian.birsan@microchip.com>, <nicolas.ferre@microchip.com>, <krzysztof.kozlowski@linaro.org>, <alexandre.belloni@bootlin.com>, <davem@davemloft.net>, <arnd@arndb.de>, <olof@lixom.net>, <soc@kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <Kavyasree.Kotagiri@microchip.com>, <Horatiu.Vultur@microchip.com>, <robh+dt@kernel.org>, <andrew@lunn.ch>, <michael@walle.cc>, <jerry.ray@microchip.com>, <conor+dt@kernel.org>, <jesper.nilsson@axis.com>, <sergiu.moga@microchip.com>, <andre.przywara@arm.com>, <ada@thorsis.com> CC: Durai Manickam KR <durai.manickamkr@microchip.com> Subject: [PATCH] ARM: dts: at91: sam9x60: fix the SOC detection Date: Wed, 12 Jul 2023 15:30:42 +0530 Message-ID: <20230712100042.317856-1-durai.manickamkr@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771210680598531375 X-GMAIL-MSGID: 1771210680598531375 |
Series |
ARM: dts: at91: sam9x60: fix the SOC detection
|
|
Commit Message
Durai Manickam KR
July 12, 2023, 10 a.m. UTC
Remove the dbgu compatible strings in the UART submodule of the
flexcom for the proper SOC detection.
Fixes: 99c808335877 (ARM: dts: at91: sam9x60: Add missing flexcom definitions)
Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
---
arch/arm/boot/dts/microchip/sam9x60.dtsi | 26 ++++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
Comments
On 12/07/2023 19:43:51+0100, Conor Dooley wrote: > Hey, > > On Wed, Jul 12, 2023 at 03:30:42PM +0530, Durai Manickam KR wrote: > > Remove the dbgu compatible strings in the UART submodule of the > > flexcom for the proper SOC detection. > > I am afraid that I do not understand what this means. The first > compatible, before and after your patch, is a sam9x60 one, so I don't > see how the SoC comes into it. Grepping to try and understand: > rg microchip,sam9x60-usart drivers/ > > rg microchip,sam9x60-dbgu drivers/ > > rg atmel,at91sam9260-dbgu drivers/ > drivers/soc/atmel/soc.c > 259: "atmel,at91sam9260-dbgu"); > > rg atmel,at91sam9260-usart drivers/ > drivers/tty/serial/atmel_serial.c > 2723:OF_EARLYCON_DECLARE(atmel_serial, "atmel,at91sam9260-usart", > > drivers/mfd/at91-usart.c > 50: { .compatible = "atmel,at91sam9260-usart" }, > > It looks like you are trying to avoid the atmel soc driver from > detecting the atmel,at91sam9260-dbgu compatible? > Is this not actually compatible with the sam9260's debug uart? > > Please try to explain things in more detail so that people unfamiliar > with at91 hardware are not confused. As an outsider, removing > compatibles to fix detection seems like it would not work - the sam9x60 > compatibles are first in the list. To me it seems like this removes, > rather than fixes detection, and to fix detection you would need to > make some changes to the driver? > > Also, the binding says: > - items: > - const: microchip,sam9x60-dbgu > - const: microchip,sam9x60-usart > - const: atmel,at91sam9260-dbgu > - const: atmel,at91sam9260-usart > > Your patch here makes the dts non-compliant with the bindings, as far as > I can tell, so you will need to go and modify the bindings to do this > either way. There can be only one dbgu on a SoC and it has the chipid register. It has always been wrong to have a dbgu compatible on the flexcom uart as they are not dbgu. Anyway, my advice has always been that you must not do chipid detection on at91 because there is no point in doing it because you need to have a correct dts to be able to find the dbgu chipid register so you either you already know what you are running on or you are going to read bogus registers anyway. > > Thanks, > Conor. > > > > > Fixes: 99c808335877 (ARM: dts: at91: sam9x60: Add missing flexcom definitions) > > Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com> > > --- > > arch/arm/boot/dts/microchip/sam9x60.dtsi | 26 ++++++++++++------------ > > 1 file changed, 13 insertions(+), 13 deletions(-) > > > > diff --git a/arch/arm/boot/dts/microchip/sam9x60.dtsi b/arch/arm/boot/dts/microchip/sam9x60.dtsi > > index 8b53997675e7..73d570a17269 100644 > > --- a/arch/arm/boot/dts/microchip/sam9x60.dtsi > > +++ b/arch/arm/boot/dts/microchip/sam9x60.dtsi > > @@ -172,7 +172,7 @@ flx4: flexcom@f0000000 { > > status = "disabled"; > > > > uart4: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -240,7 +240,7 @@ flx5: flexcom@f0004000 { > > status = "disabled"; > > > > uart5: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > atmel,usart-mode = <AT91_USART_MODE_SERIAL>; > > interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>; > > @@ -370,7 +370,7 @@ flx11: flexcom@f0020000 { > > status = "disabled"; > > > > uart11: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -419,7 +419,7 @@ flx12: flexcom@f0024000 { > > status = "disabled"; > > > > uart12: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -576,7 +576,7 @@ flx6: flexcom@f8010000 { > > status = "disabled"; > > > > uart6: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -625,7 +625,7 @@ flx7: flexcom@f8014000 { > > status = "disabled"; > > > > uart7: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -674,7 +674,7 @@ flx8: flexcom@f8018000 { > > status = "disabled"; > > > > uart8: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -723,7 +723,7 @@ flx0: flexcom@f801c000 { > > status = "disabled"; > > > > uart0: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -791,7 +791,7 @@ flx1: flexcom@f8020000 { > > status = "disabled"; > > > > uart1: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -859,7 +859,7 @@ flx2: flexcom@f8024000 { > > status = "disabled"; > > > > uart2: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -927,7 +927,7 @@ flx3: flexcom@f8028000 { > > status = "disabled"; > > > > uart3: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -1050,7 +1050,7 @@ flx9: flexcom@f8040000 { > > status = "disabled"; > > > > uart9: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > @@ -1099,7 +1099,7 @@ flx10: flexcom@f8044000 { > > status = "disabled"; > > > > uart10: serial@200 { > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > reg = <0x200 0x200>; > > interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>; > > dmas = <&dma0 > > -- > > 2.25.1 > >
On 12/07/2023 20:42:00+0100, Conor Dooley wrote: > > There can be only one dbgu on a SoC and it has the chipid register. It > > has always been wrong to have a dbgu compatible on the flexcom uart as > > they are not dbgu. > > Ahh, thanks for the explanation. Sounds like stuff that might be obvious > to those working on arm stuff all the time, but not all of those CCed on > the patch ;) Well, this is not really arm specific, rather microchip specific ;) > The correct thing to do would seem to be updating the dt-binding to > something that permits what is listed below, or just removing the second > compatible, to leave "microchip,sam9x60-usart" in isolation, since that > is permitted also. > > > Anyway, my advice has always been that you must not do chipid detection > > on at91 because there is no point in doing it because you need to have > > a correct dts to be able to find the dbgu chipid register so you either > > you already know what you are running on or you are going to read bogus > > registers anyway. > > I won't claim to have an opinion on any of that, but sounds like you'd > be better off just reading the board/SoC level compatibles to figure out > what you are running on... > Yeah, exactly my point! > Thanks, > Conor. > > > > > Fixes: 99c808335877 (ARM: dts: at91: sam9x60: Add missing flexcom definitions) > > > > Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com> > > > > --- > > > > arch/arm/boot/dts/microchip/sam9x60.dtsi | 26 ++++++++++++------------ > > > > 1 file changed, 13 insertions(+), 13 deletions(-) > > > > > > > > diff --git a/arch/arm/boot/dts/microchip/sam9x60.dtsi b/arch/arm/boot/dts/microchip/sam9x60.dtsi > > > > index 8b53997675e7..73d570a17269 100644 > > > > --- a/arch/arm/boot/dts/microchip/sam9x60.dtsi > > > > +++ b/arch/arm/boot/dts/microchip/sam9x60.dtsi > > > > @@ -172,7 +172,7 @@ flx4: flexcom@f0000000 { > > > > status = "disabled"; > > > > > > > > uart4: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -240,7 +240,7 @@ flx5: flexcom@f0004000 { > > > > status = "disabled"; > > > > > > > > uart5: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > atmel,usart-mode = <AT91_USART_MODE_SERIAL>; > > > > interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>; > > > > @@ -370,7 +370,7 @@ flx11: flexcom@f0020000 { > > > > status = "disabled"; > > > > > > > > uart11: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -419,7 +419,7 @@ flx12: flexcom@f0024000 { > > > > status = "disabled"; > > > > > > > > uart12: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -576,7 +576,7 @@ flx6: flexcom@f8010000 { > > > > status = "disabled"; > > > > > > > > uart6: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -625,7 +625,7 @@ flx7: flexcom@f8014000 { > > > > status = "disabled"; > > > > > > > > uart7: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -674,7 +674,7 @@ flx8: flexcom@f8018000 { > > > > status = "disabled"; > > > > > > > > uart8: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -723,7 +723,7 @@ flx0: flexcom@f801c000 { > > > > status = "disabled"; > > > > > > > > uart0: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -791,7 +791,7 @@ flx1: flexcom@f8020000 { > > > > status = "disabled"; > > > > > > > > uart1: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -859,7 +859,7 @@ flx2: flexcom@f8024000 { > > > > status = "disabled"; > > > > > > > > uart2: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -927,7 +927,7 @@ flx3: flexcom@f8028000 { > > > > status = "disabled"; > > > > > > > > uart3: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -1050,7 +1050,7 @@ flx9: flexcom@f8040000 { > > > > status = "disabled"; > > > > > > > > uart9: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > @@ -1099,7 +1099,7 @@ flx10: flexcom@f8044000 { > > > > status = "disabled"; > > > > > > > > uart10: serial@200 { > > > > - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; > > > > + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; > > > > reg = <0x200 0x200>; > > > > interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>; > > > > dmas = <&dma0 > > > > -- > > > > 2.25.1 > > > > > > > > > > > > -- > > Alexandre Belloni, co-owner and COO, Bootlin > > Embedded Linux and Kernel engineering > > https://bootlin.com
On 13/07/23 01:34, Alexandre Belloni wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On 12/07/2023 20:42:00+0100, Conor Dooley wrote: >>> There can be only one dbgu on a SoC and it has the chipid register. It >>> has always been wrong to have a dbgu compatible on the flexcom uart as >>> they are not dbgu. >> Ahh, thanks for the explanation. Sounds like stuff that might be obvious >> to those working on arm stuff all the time, but not all of those CCed on >> the patch ;) > Well, this is not really arm specific, rather microchip specific ;) > >> The correct thing to do would seem to be updating the dt-binding to >> something that permits what is listed below, or just removing the second >> compatible, to leave "microchip,sam9x60-usart" in isolation, since that >> is permitted also. Noted, I hope updating the yaml would be proper approach. >>> Anyway, my advice has always been that you must not do chipid detection >>> on at91 because there is no point in doing it because you need to have >>> a correct dts to be able to find the dbgu chipid register so you either >>> you already know what you are running on or you are going to read bogus >>> registers anyway. >> I won't claim to have an opinion on any of that, but sounds like you'd >> be better off just reading the board/SoC level compatibles to figure out >> what you are running on... >> > Yeah, exactly my point! > >> Thanks, >> Conor. >> >>>>> Fixes: 99c808335877 (ARM: dts: at91: sam9x60: Add missing flexcom definitions) >>>>> Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com> >>>>> --- >>>>> arch/arm/boot/dts/microchip/sam9x60.dtsi | 26 ++++++++++++------------ >>>>> 1 file changed, 13 insertions(+), 13 deletions(-) >>>>> >>>>> diff --git a/arch/arm/boot/dts/microchip/sam9x60.dtsi b/arch/arm/boot/dts/microchip/sam9x60.dtsi >>>>> index 8b53997675e7..73d570a17269 100644 >>>>> --- a/arch/arm/boot/dts/microchip/sam9x60.dtsi >>>>> +++ b/arch/arm/boot/dts/microchip/sam9x60.dtsi >>>>> @@ -172,7 +172,7 @@ flx4: flexcom@f0000000 { >>>>> status = "disabled"; >>>>> >>>>> uart4: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -240,7 +240,7 @@ flx5: flexcom@f0004000 { >>>>> status = "disabled"; >>>>> >>>>> uart5: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> atmel,usart-mode = <AT91_USART_MODE_SERIAL>; >>>>> interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> @@ -370,7 +370,7 @@ flx11: flexcom@f0020000 { >>>>> status = "disabled"; >>>>> >>>>> uart11: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -419,7 +419,7 @@ flx12: flexcom@f0024000 { >>>>> status = "disabled"; >>>>> >>>>> uart12: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -576,7 +576,7 @@ flx6: flexcom@f8010000 { >>>>> status = "disabled"; >>>>> >>>>> uart6: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -625,7 +625,7 @@ flx7: flexcom@f8014000 { >>>>> status = "disabled"; >>>>> >>>>> uart7: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -674,7 +674,7 @@ flx8: flexcom@f8018000 { >>>>> status = "disabled"; >>>>> >>>>> uart8: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -723,7 +723,7 @@ flx0: flexcom@f801c000 { >>>>> status = "disabled"; >>>>> >>>>> uart0: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -791,7 +791,7 @@ flx1: flexcom@f8020000 { >>>>> status = "disabled"; >>>>> >>>>> uart1: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -859,7 +859,7 @@ flx2: flexcom@f8024000 { >>>>> status = "disabled"; >>>>> >>>>> uart2: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -927,7 +927,7 @@ flx3: flexcom@f8028000 { >>>>> status = "disabled"; >>>>> >>>>> uart3: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -1050,7 +1050,7 @@ flx9: flexcom@f8040000 { >>>>> status = "disabled"; >>>>> >>>>> uart9: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> @@ -1099,7 +1099,7 @@ flx10: flexcom@f8044000 { >>>>> status = "disabled"; >>>>> >>>>> uart10: serial@200 { >>>>> - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; >>>>> + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; >>>>> reg = <0x200 0x200>; >>>>> interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>; >>>>> dmas = <&dma0 >>>>> -- >>>>> 2.25.1 >>>>> >>> >>> >>> -- >>> Alexandre Belloni, co-owner and COO, Bootlin >>> Embedded Linux and Kernel engineering >>> https://bootlin.com > > > -- > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com
diff --git a/arch/arm/boot/dts/microchip/sam9x60.dtsi b/arch/arm/boot/dts/microchip/sam9x60.dtsi index 8b53997675e7..73d570a17269 100644 --- a/arch/arm/boot/dts/microchip/sam9x60.dtsi +++ b/arch/arm/boot/dts/microchip/sam9x60.dtsi @@ -172,7 +172,7 @@ flx4: flexcom@f0000000 { status = "disabled"; uart4: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -240,7 +240,7 @@ flx5: flexcom@f0004000 { status = "disabled"; uart5: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; atmel,usart-mode = <AT91_USART_MODE_SERIAL>; interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>; @@ -370,7 +370,7 @@ flx11: flexcom@f0020000 { status = "disabled"; uart11: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -419,7 +419,7 @@ flx12: flexcom@f0024000 { status = "disabled"; uart12: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -576,7 +576,7 @@ flx6: flexcom@f8010000 { status = "disabled"; uart6: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -625,7 +625,7 @@ flx7: flexcom@f8014000 { status = "disabled"; uart7: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -674,7 +674,7 @@ flx8: flexcom@f8018000 { status = "disabled"; uart8: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -723,7 +723,7 @@ flx0: flexcom@f801c000 { status = "disabled"; uart0: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -791,7 +791,7 @@ flx1: flexcom@f8020000 { status = "disabled"; uart1: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -859,7 +859,7 @@ flx2: flexcom@f8024000 { status = "disabled"; uart2: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -927,7 +927,7 @@ flx3: flexcom@f8028000 { status = "disabled"; uart3: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -1050,7 +1050,7 @@ flx9: flexcom@f8040000 { status = "disabled"; uart9: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0 @@ -1099,7 +1099,7 @@ flx10: flexcom@f8044000 { status = "disabled"; uart10: serial@200 { - compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart"; + compatible = "microchip,sam9x60-usart", "atmel,at91sam9260-usart"; reg = <0x200 0x200>; interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>; dmas = <&dma0