Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp568502rdb; Tue, 16 Jan 2024 08:54:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnofViICILoQ+J2YmDUJCN0KzXpjkRniX4QINtNQcsOMgyEXukyPbENDfkvNh+jeleftLW X-Received: by 2002:a05:600c:3546:b0:40e:7e0a:65f2 with SMTP id i6-20020a05600c354600b0040e7e0a65f2mr1536661wmq.163.1705424054915; Tue, 16 Jan 2024 08:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705424054; cv=none; d=google.com; s=arc-20160816; b=nyXtQPnugMiaZfIjiLAlnx1LfjSYlYtzvjsb1fi4YfEVIJPdcslwUol8sPakstVxo4 /b9Qdiw+jWUJKzrB2PAp1+oi7kIeFbNtGA7klhUxiO7cTJUhBKSoXsIRBrWQgb3JXp4H 9x69jO8ydcZQgxTfRigeUf5QQ3GDhHhZSd11QH47FDqE2pHtJ+yfvL8DVICNmwggkBrf ElC2GW1rzKCUNRQJpO3dQoDPpEbiSm2NMhbJ1bhGmLXZYWu0H5J0b3ei/Qjwh0hT4FfG 8fGnEes+ts98fPZjE6b9HoGX3XyLu/TgfDMPw0TO8mZLielBVkVw3pLOLxV941qR1/HK F8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TDyxxPBWASolnrw6aGy7NIdq8Al0r2BJ6k5gaCOPFq4=; fh=rV2uj4oJFI6rwSpOmfnWZ9G6eoFmg5RjzGYOW3AK7JI=; b=mKYpkDaTtitvmWcQLJqJdxtBwvEs63qoxRMSsKbZ+7/h+GxH35iTEhyRvzkOIlnP5X oQxyIfAiiW1W+hJ9pp/NYjkQRXiYvIHpwXh3dj+kQOGsz6GWY57/+wCKRNHwgVBMsHIb c1wEuppq4UO8cb19vyMx8wey3jbeE7d3PuxwOwN86i9d8/jmcrw/rk//Zx7rhuQwN0qN 7UPemLVoLhKwIUGnsUneXZVUgYceqciVJz/muJa4IJUK4O73OXS7h8aN/EqlMWeOuh8b inDLzah4heR1J62cp6/w2DnShC04EXJY8VRGej796r3rtj1EKyKUPapKVMW2Y4/CcYiG QhuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=IqlFBjCP; spf=pass (google.com: domain of linux-kernel+bounces-27596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dt20-20020a170906b79400b00a28fbf42caesi4949369ejb.633.2024.01.16.08.54.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:54:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=IqlFBjCP; spf=pass (google.com: domain of linux-kernel+bounces-27596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A53761F2480D for ; Tue, 16 Jan 2024 16:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E79D71C6BF; Tue, 16 Jan 2024 16:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="IqlFBjCP" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD6E51CA80; Tue, 16 Jan 2024 16:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 9D3A724000F; Tue, 16 Jan 2024 16:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1705424038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TDyxxPBWASolnrw6aGy7NIdq8Al0r2BJ6k5gaCOPFq4=; b=IqlFBjCPvjbP+0obF3YLWMwVTCrrKFs+4+Y+zMfcO5kgJ8f4UIXOwBmLYpDIH8lmcL74nv wM8MG1uCTl4p9Vnp1xVfi8ut+EBMtPnhcPKZ/IEtKt3lbVCoaJD0PoEdOF+70WE0NhqOFn iwUV7sSusENcH7+qULDhnq+YGIVrMCMCtVharXSW6erFGu7BbBtOMMr1pMcb7RZ1rzRxgu G+tDZsIPW4RpJSG02Rsp8dCfpItzSAJcwtOHTl0S0YYtXAudFip1C9KfQi0a4MNfYj+NmF Li0xVRIVUJHqt7zZ+V8illQ3RgVBJl4UbtznAUpsDtb2yi7rtODiqlKBN7oXhQ== Date: Tue, 16 Jan 2024 17:53:56 +0100 From: Alexandre Belloni To: Jingbao Qiu Cc: Krzysztof Kozlowski , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, chao.wei@sophgo.com, unicorn_wang@outlook.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, dlan@gentoo.org, inochiama@outlook.com Subject: Re: [PATCH v6 3/3] riscv: dts: sophgo: add rtc dt node for CV1800 Message-ID: <20240116165356eaa221fe@mail.local> References: <20240115160600.5444-1-qiujingbao.dlmu@gmail.com> <20240115160600.5444-4-qiujingbao.dlmu@gmail.com> <007e8c14-13eb-4917-b9da-8d47d6c965c7@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-GND-Sasl: alexandre.belloni@bootlin.com On 17/01/2024 00:29:28+0800, Jingbao Qiu wrote: > On Wed, Jan 17, 2024 at 12:03 AM Krzysztof Kozlowski > wrote: > > > > On 16/01/2024 16:51, Jingbao Qiu wrote: > > >>> CV1800 is a RISCV based SOC that includes an RTC module. The RTC > > >>> module has an OSC oscillator > > >> > > >> > > >> I am not going to read pages of description. Please write concise replies. > > > > > > Thanks, What I mean is that this hardware includes two functions, RTC > > > and POR. How should I describe their relationship? > > > > Your POR does not need to take any resources, so no need to describe any > > relationship. > > > > ... > > > > >>> Your suggestion is, firstly, the por submodule does not have any > > >>> resources, so it should be deleted. > > >> > > >> So where did you delete it? I still see it in this patch. > > > > > > Should I completely delete him? How can a por driver obtain device information? > > > > Delete completely. > > > > Device information? What is this? We already agreed you don't have any > > resources for POR. > > > > .... > > > > >> Device is only one thing, not two. > > >> > > >>> reg = <0x5025000 0x2000>; > > >>> interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; > > >>> clocks = <&osc>; > > >>> }; > > >>> However, in reality, the POR submodule does not use IRQ and CLK. > > >>> Please do not hesitate to teach. Thanks. > > >> > > >> I expect one device node. How many drivers you have does not matter: you > > >> can instantiate 100 Linux devices in 100 Linux device drivers. > > > > > > I understand what you mean. A device node corresponds to multiple drivers. > > > Should I completely delete the POR device tree node and add it when > > > submitting the POR driver? > > > > ? I wrote it in previous messages and twice in this thread. Completely > > delete. You do not add it back! Because if you ever intended to add it > > back, it should be added since beginning. I don't understand what > > submitting later would solve. > > > > > If that's the case, how can I explain that the rtc device tree node > > > uses the syscon tag? > > > How can I describe a POR device in DTS? POR is a submodule of RTC, and > > > it also has corresponding drivers. > > > > I said, there is no need for POR in DTS, because you have nothing there. > > Why do you insist on putting it on DTS? > > > > > It's just that his resources are only shared with RTC's Reg. > > > > What resources? Reg? That's not a separate resource. > > I'm very sorry about this. > But I found a binding file that only contains Reg and Compatible. > > rtc@80920000 { > compatible = "cirrus,ep9301-rtc"; > reg = <0x80920000 0x100>; > }; > > Link: Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml > > > > > To summarize: Drop POR from DTS and never bring it back, unless you come > > with some different arguments, which you did not say already. > > > > You are right, if there is no por device tree node, how can the por > driver obtain the Reg? I guess the question is why don't you register everything from the RTC driver? -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com