Message ID | 20231113005503.2423-5-jszhang@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp936866vqg; Sun, 12 Nov 2023 17:07:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOJ6DObOBkj06GJlj09zkX8pxdBOqO6TrlwGDRdM87Z8ec2KuhHBai9c+U8gx3sMAk6ZFo X-Received: by 2002:a05:6870:170a:b0:1e9:9be0:e8b0 with SMTP id h10-20020a056870170a00b001e99be0e8b0mr7319323oae.29.1699837675410; Sun, 12 Nov 2023 17:07:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699837675; cv=none; d=google.com; s=arc-20160816; b=pbeJnAHT5yjlNhDRWjdI5yPihAUC/bnNbKl3xIGzLqj0DiQ7Y9j6Dw6iqT6pGADEGd OjCglxHpAzcY0zNSoc3DIS4OEkysJXP2IKpZ2c4Deayolxp6QUMjCLE1XH9oRy1npyB7 3dooc3CSAzNHhLyCx7h0SCtIzAzr3TjNN0nMEHZ8M/IbWfxfQDVKw+69FaC5j+UkAUpq Ptx39e+V+Aj3N7+6R2bKcB8Scj/Pq5WNbwYjPqzAckmUFEgjas81TvJiULR2SeLSmLKs e8RijWVkHg+5UOpDW/+D7Fs8/v1EugQCHVn//TEN529n5FZU3Z/WsS5dhbDfoV8ujd/I B5Fg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jE+kGcqQqNWPTBKS28JA1u6NB+hyXW4EDy6NJvQkTNs=; fh=G1VPGV+Fv1YvSNBmeopyBqHwP48EXI6WzRcNW/DAi2I=; b=vQfQ9G2QFKlrMbz/80vM5BR2z7+XZrI0fJeaMJR0NTnXT38RLHoa8ihdJJymdZa9T4 2iebGEuV91ZRTcLVNxfZEaNmgMKlekKwWtQI/7STbvkITLwEYn6r/dAs0mV6QRsDlOI9 uVVzqR5B92Bp441HsbGo4n5IounIfZ8hcZ3Sf5cHA2NuD4pSjCMLNE95TyqDdXgQuq6g hw1XBOa56em3fxK8Wf+KYpNGydCJwmzmHtQzYSe0FykHbB7xOtTUtzOzw3MNOstV4+3N McYnAvogpjbwvS/9dYVcZfJpkduahEbZoyU//ObqixTP0mttiZarq4s5Ltdxino5A0k0 6siA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y6uMoOfY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j7-20020a17090a7e8700b00268a8e0cab3si8902351pjl.178.2023.11.12.17.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 17:07:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y6uMoOfY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B94D580A5F54; Sun, 12 Nov 2023 17:07:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232854AbjKMBHw (ORCPT <rfc822;lhua1029@gmail.com> + 30 others); Sun, 12 Nov 2023 20:07:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232779AbjKMBHt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 12 Nov 2023 20:07:49 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED897259D for <linux-kernel@vger.kernel.org>; Sun, 12 Nov 2023 17:07:44 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6946C433CC; Mon, 13 Nov 2023 01:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699837664; bh=UhAD3REvQmN6OP/l2BKhCL7Kmd6UirEftGJf0TofIdk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y6uMoOfYrKHbDT9xNVOIrXAwjAY43Ti2zC6vtPyKcRWafuAZjfKl6WmszSJQYykgw 2e0Yzh5UwKRsaPVpDNNdaMWZyYD2zNAb2kQycdaM6oNPdpuu/GHIoM3ZDJVWneYJ6p jZjB1fFrmEFRN2OTgxnpZ9jb39mUe2a69KzqXquh4iXUBEIUDAjvZMsJVgPabVhmjH PqpjoutGlz4Xi9No7OQtLnlD5h0F0SKVX3XyF/S3pPXA7jdIEF7xXRm+sI89cinVJG fTXhBwwvfs4kZwxhkfl5XUpCSW63h91O82PyDqEVqzYID1bCs6/wLY/Rk1YOW+OLcf rSD4k41qZCW0A== From: Jisheng Zhang <jszhang@kernel.org> To: Philipp Zabel <p.zabel@pengutronix.de>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Chao Wei <chao.wei@sophgo.com>, Chen Wang <unicorn_wang@outlook.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH 4/4] riscv: dts: sophgo: add reset phandle to all uart nodes Date: Mon, 13 Nov 2023 08:55:03 +0800 Message-Id: <20231113005503.2423-5-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20231113005503.2423-1-jszhang@kernel.org> References: <20231113005503.2423-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 12 Nov 2023 17:07:54 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782408990292522037 X-GMAIL-MSGID: 1782408990292522037 |
Series |
riscv: sophgo: add reset support for cv1800b
|
|
Commit Message
Jisheng Zhang
Nov. 13, 2023, 12:55 a.m. UTC
Although, the resets are deasserted by default. Add them for
completeness.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
Comments
Hi Jisheng, On 2023-11-12 6:55 PM, Jisheng Zhang wrote: > Although, the resets are deasserted by default. Add them for > completeness. > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > --- > arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi > index 4032419486be..e04df04a91c0 100644 > --- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi > +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi > @@ -4,6 +4,7 @@ > */ > > #include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/reset/sophgo,cv1800b-reset.h> > > / { > compatible = "sophgo,cv1800b"; > @@ -65,6 +66,7 @@ uart0: serial@4140000 { > reg = <0x04140000 0x100>; > interrupts = <44 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&osc>; > + resets = <&rst RST_UART0>; Since it's not obvious: this breaks devicetree forward compatibility. An existing kernel will fail the devm_reset_control_get_optional_exclusive() in 8250_dw.c because it has no driver for the reset controller. This may not be a concern yet, since the devicetree is still "in development". But it is something to keep in mind for the future. To avoid this sort of problem, it's best to fully model the clocks/resets/other dependencies as early as possible, and not rely on the firmware setting anything up. Regards, Samuel > reg-shift = <2>; > reg-io-width = <4>; > status = "disabled"; > @@ -75,6 +77,7 @@ uart1: serial@4150000 { > reg = <0x04150000 0x100>; > interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&osc>; > + resets = <&rst RST_UART1>; > reg-shift = <2>; > reg-io-width = <4>; > status = "disabled"; > @@ -85,6 +88,7 @@ uart2: serial@4160000 { > reg = <0x04160000 0x100>; > interrupts = <46 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&osc>; > + resets = <&rst RST_UART2>; > reg-shift = <2>; > reg-io-width = <4>; > status = "disabled"; > @@ -95,6 +99,7 @@ uart3: serial@4170000 { > reg = <0x04170000 0x100>; > interrupts = <47 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&osc>; > + resets = <&rst RST_UART3>; > reg-shift = <2>; > reg-io-width = <4>; > status = "disabled"; > @@ -105,6 +110,7 @@ uart4: serial@41c0000 { > reg = <0x041c0000 0x100>; > interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; > clocks = <&osc>; > + resets = <&rst RST_UART4>; > reg-shift = <2>; > reg-io-width = <4>; > status = "disabled";
Hi Jisheng,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20231110]
[also build test ERROR on linus/master v6.7-rc1]
[cannot apply to robh/for-next krzk/for-next krzk-dt/for-next pza/reset/next pza/imx-drm/next v6.6 v6.6-rc7 v6.6-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jisheng-Zhang/dt-bindings-reset-Add-binding-for-Sophgo-CV1800B-reset-controller/20231113-091129
base: next-20231110
patch link: https://lore.kernel.org/r/20231113005503.2423-5-jszhang%40kernel.org
patch subject: [PATCH 4/4] riscv: dts: sophgo: add reset phandle to all uart nodes
config: riscv-randconfig-001-20231113 (https://download.01.org/0day-ci/archive/20231113/202311131220.lnq9Gdut-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231113/202311131220.lnq9Gdut-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311131220.lnq9Gdut-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/riscv/boot/dts/sophgo/cv1800b.dtsi:7,
from arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts:8:
>> scripts/dtc/include-prefixes/dt-bindings/reset/sophgo,cv1800b-reset.h:7: error: unterminated #ifndef
7 | #ifndef _DT_BINDINGS_CV1800B_RESET_H
|
vim +7 scripts/dtc/include-prefixes/dt-bindings/reset/sophgo,cv1800b-reset.h
On Sun, Nov 12, 2023 at 09:04:55PM -0500, Samuel Holland wrote: > Hi Jisheng, > > On 2023-11-12 6:55 PM, Jisheng Zhang wrote: > > Although, the resets are deasserted by default. Add them for > > completeness. > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > --- > > arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi > > index 4032419486be..e04df04a91c0 100644 > > --- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi > > +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi > > @@ -4,6 +4,7 @@ > > */ > > > > #include <dt-bindings/interrupt-controller/irq.h> > > +#include <dt-bindings/reset/sophgo,cv1800b-reset.h> > > > > / { > > compatible = "sophgo,cv1800b"; > > @@ -65,6 +66,7 @@ uart0: serial@4140000 { > > reg = <0x04140000 0x100>; > > interrupts = <44 IRQ_TYPE_LEVEL_HIGH>; > > clocks = <&osc>; > > + resets = <&rst RST_UART0>; > > Since it's not obvious: this breaks devicetree forward compatibility. An > existing kernel will fail the devm_reset_control_get_optional_exclusive() in > 8250_dw.c because it has no driver for the reset controller. > > This may not be a concern yet, since the devicetree is still "in development". > But it is something to keep in mind for the future. To avoid this sort of > problem, it's best to fully model the clocks/resets/other dependencies as early > as possible, and not rely on the firmware setting anything up. Thank you. This may be discussed before, "DT backward compatibility is a must while forward compatibility is optional"? maybe I'm wrong. And Indeed, it's better if we can have forward compatibility, will take care this in future. > > Regards, > Samuel > > > reg-shift = <2>; > > reg-io-width = <4>; > > status = "disabled"; > > @@ -75,6 +77,7 @@ uart1: serial@4150000 { > > reg = <0x04150000 0x100>; > > interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; > > clocks = <&osc>; > > + resets = <&rst RST_UART1>; > > reg-shift = <2>; > > reg-io-width = <4>; > > status = "disabled"; > > @@ -85,6 +88,7 @@ uart2: serial@4160000 { > > reg = <0x04160000 0x100>; > > interrupts = <46 IRQ_TYPE_LEVEL_HIGH>; > > clocks = <&osc>; > > + resets = <&rst RST_UART2>; > > reg-shift = <2>; > > reg-io-width = <4>; > > status = "disabled"; > > @@ -95,6 +99,7 @@ uart3: serial@4170000 { > > reg = <0x04170000 0x100>; > > interrupts = <47 IRQ_TYPE_LEVEL_HIGH>; > > clocks = <&osc>; > > + resets = <&rst RST_UART3>; > > reg-shift = <2>; > > reg-io-width = <4>; > > status = "disabled"; > > @@ -105,6 +110,7 @@ uart4: serial@41c0000 { > > reg = <0x041c0000 0x100>; > > interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; > > clocks = <&osc>; > > + resets = <&rst RST_UART4>; > > reg-shift = <2>; > > reg-io-width = <4>; > > status = "disabled"; >
diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi index 4032419486be..e04df04a91c0 100644 --- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi @@ -4,6 +4,7 @@ */ #include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/reset/sophgo,cv1800b-reset.h> / { compatible = "sophgo,cv1800b"; @@ -65,6 +66,7 @@ uart0: serial@4140000 { reg = <0x04140000 0x100>; interrupts = <44 IRQ_TYPE_LEVEL_HIGH>; clocks = <&osc>; + resets = <&rst RST_UART0>; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -75,6 +77,7 @@ uart1: serial@4150000 { reg = <0x04150000 0x100>; interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; clocks = <&osc>; + resets = <&rst RST_UART1>; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -85,6 +88,7 @@ uart2: serial@4160000 { reg = <0x04160000 0x100>; interrupts = <46 IRQ_TYPE_LEVEL_HIGH>; clocks = <&osc>; + resets = <&rst RST_UART2>; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -95,6 +99,7 @@ uart3: serial@4170000 { reg = <0x04170000 0x100>; interrupts = <47 IRQ_TYPE_LEVEL_HIGH>; clocks = <&osc>; + resets = <&rst RST_UART3>; reg-shift = <2>; reg-io-width = <4>; status = "disabled"; @@ -105,6 +110,7 @@ uart4: serial@41c0000 { reg = <0x041c0000 0x100>; interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; clocks = <&osc>; + resets = <&rst RST_UART4>; reg-shift = <2>; reg-io-width = <4>; status = "disabled";