Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp298547rdb; Wed, 17 Jan 2024 02:12:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGehV8MvvHccthwFOEOs9HXm30cDsHFF59ZzfxUlh2gAyR9V7RRCw93vuxX3XfqSqLcMQ0o X-Received: by 2002:a05:6808:1819:b0:3bd:94b8:8c36 with SMTP id bh25-20020a056808181900b003bd94b88c36mr745295oib.47.1705486379496; Wed, 17 Jan 2024 02:12:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705486379; cv=pass; d=google.com; s=arc-20160816; b=Ok7T9dRnuiSagGOVbozf+Cc7w14PtPJaK+R2Ja9A5l49iI+ZWSAcwFgahbWnVdF1B4 Joa7sVPH2BJmV/txFk3WA2ld7Y/xRoAI24Ie6gkOmWa1kF0dpOi1adbdGD1F7aDZ90rF lUFOBHSZZIIpXjUb/DQnOgTuGmToogv8iMXaIB+Dnb+mUPIgxA6E82cJrRguSxqdxYQU L5zcYZV4AI70Gf6XI79LCIqLmx/8X3Chvu15yyHYZZENF4A0pvlI7oYlU9+Kerhuu8dr b8m2e4GU7iymVo1EQIW3MZeBiohomnWWds55M5okOu5ZrS8DfOxX23eoBWKCH+V9MupI qKbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=7wMkS8Old4swOOf+36J4+LH8y/2w+i/lxZ0l3Z/+Jf0=; fh=CAlSEaVY7a2CSshuhne15b9LKclJmA6pV8izIkqhl3A=; b=h6SwG8yMZNqSkdh81POlfD8RZWZrzQ801y23xDF84EGEMNOy6HkTnKvoOlhMWvxNmM p8v/TF3VbuVSb4HWef24gdVdZ+UGU7xSeCxUAJVDi/mEk0mepOulwYUqeOtdvAjHvzz3 4wKhTP2+JjXP3rGKiEdL10g6VJP1DROMXrQ9WUl1Pe3jJKh889GWP0TR7QCIZ8DXiS9J eDgHg4tk7HvcStCO8NrCl+mVIu2IFwVUX4y5NWbULyANuanK2qhLhRoFQRABrPMes9zc Wee75mOHTAnSIpS3Y3Tw7NDyS6nTk00AeVc9h8R58OihyduFcZQRrVeCpJc/9/8oTH7I +qKQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QWUTyFho; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-28815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28815-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i198-20020a636dcf000000b005cdf55c87f0si4960325pgc.740.2024.01.17.02.12.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:12:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QWUTyFho; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-28815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28815-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 20DAA288CFA for ; Wed, 17 Jan 2024 10:12:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 048D714A83; Wed, 17 Jan 2024 10:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QWUTyFho" Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FCD314276; Wed, 17 Jan 2024 10:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705486351; cv=none; b=KB7YbEZ/Q/SHg+KtsTk2poZ/LwhZy+hO8Vi1JwHDQzMCYIHg23kJT2HXz1FNzyYo7R/DmNlFz9Bxpt0IOr142P8Ue8xhAY/ReoAst9m4p6Sa1+wJ7mDZBkHaBpaeSplWj7GxwyzC+P/NoDij2IAFW1D1O0QSK11nb7s501642Hk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705486351; c=relaxed/simple; bh=ia8LAy1qRW53Whay4jiw2TwI9CXHaMpl6mIWk44GDKI=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=Z9oK/JgHVaOwKm+UKOH3SLSYENf8ISGmejEt4vlD2bCZGiAlMrE+9LwbYKWSf7Uoz5HNKveFY7iGI26Q/wPuvj5VwzBPgKAiOQZFEaF79F4w/TYEul5g5qSLzJCZRDGL+2DjkPwRzkSJ2+c9H/qTHmWU+VTrif+IjbVqbZD6OyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QWUTyFho; arc=none smtp.client-ip=209.85.161.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-59502aa878aso4956572eaf.1; Wed, 17 Jan 2024 02:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705486348; x=1706091148; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7wMkS8Old4swOOf+36J4+LH8y/2w+i/lxZ0l3Z/+Jf0=; b=QWUTyFhofYepTG2hJcri/FjtMXvR2pPK4VnGcIVDwExpFRTJkEIt52eGqsygeD9XBk rmBwY+xzCsJtBZzM/xGG2JUh5SAwKQtZ51UdkQoh50rSEiUqD3j6cBz0aKzXZZD9x6zQ fKCVKXMjPcJAdiMzaLkhZMrM1zHCzULrkMBozotf0lq+ARInCQyYdmY1r31T8M5d2jD8 H+Jk+xfi9LjZ4gpEz/JJpTmCtXQ+HPJZmUvcE0inTMB5m4QZxpHzBqDxiwULVAowAfhw pj/iKx48d7PEWYKvXySULN/z10wxjch2XARDNrZMcqNfR6MMKxLMVAcrtZboaRPzilbn mr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705486348; x=1706091148; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7wMkS8Old4swOOf+36J4+LH8y/2w+i/lxZ0l3Z/+Jf0=; b=XhWgR7OKWEkNn3JqzzupnESxAbORtdOwlH2Q3PTxsibLZ4Lx3ZSDGl0SIrC2SBHYfO rHuzENMsBscCMA7MMFMM76o3f0uBFVSwfXw0NZfD1cbTdIKsuJ3MkIa1zk0q5Ubiwg4d LcVw36iP/N269E68QNfQ4z8heJveCEVi8sghwfnnydpohG1YykJA5ZV6TiObWSrUkbX1 PQfyWSOLOHx38j3Dsz3AInZDmwB7VPZQBhXnTPEd2tv7z0QdRcHQY8W/5ru+WArKcFQ4 P6ajf1lGVpsLpyu/cF0yh8aV9mzjD7g3PfCkK7nkWoe62sZjdayPNsyr8SDyAp659FU0 CIqw== X-Gm-Message-State: AOJu0Yy1zbFUxnuKXSjlV8IHR1srINsXbKCzKLyM5GiQdMRf0SRM+u/J x7BAMugMWQQEowEYAaIbIwsTkvMRfXifkz80/98= X-Received: by 2002:a4a:ac89:0:b0:595:518e:be8d with SMTP id b9-20020a4aac89000000b00595518ebe8dmr4679587oon.0.1705486348137; Wed, 17 Jan 2024 02:12:28 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240115160600.5444-1-qiujingbao.dlmu@gmail.com> <20240115160600.5444-4-qiujingbao.dlmu@gmail.com> <007e8c14-13eb-4917-b9da-8d47d6c965c7@linaro.org> <20240116165356eaa221fe@mail.local> <2024011709010227b73d33@mail.local> In-Reply-To: <2024011709010227b73d33@mail.local> From: Jingbao Qiu Date: Wed, 17 Jan 2024 18:12:17 +0800 Message-ID: Subject: Re: [PATCH v6 3/3] riscv: dts: sophgo: add rtc dt node for CV1800 To: Alexandre Belloni 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 17, 2024 at 5:01=E2=80=AFPM Alexandre Belloni wrote: > > On 17/01/2024 10:54:08+0800, Jingbao Qiu wrote: > > On Wed, Jan 17, 2024 at 12:53=E2=80=AFAM Alexandre Belloni > > wrote: > > > > > > On 17/01/2024 00:29:28+0800, Jingbao Qiu wrote: > > > > On Wed, Jan 17, 2024 at 12:03=E2=80=AFAM 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 conc= ise replies. > > > > > > > > > > > > Thanks, What I mean is that this hardware includes two function= s, RTC > > > > > > and POR. How should I describe their relationship? > > > > > > > > > > Your POR does not need to take any resources, so no need to descr= ibe 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 dev= ice information? > > > > > > > > > > Delete completely. > > > > > > > > > > Device information? What is this? We already agreed you don't hav= e any > > > > > resources for POR. > > > > > > > > > > .... > > > > > > > > > > >> Device is only one thing, not two. > > > > > >> > > > > > >>> reg =3D <0x5025000 0x2000>; > > > > > >>> interrupts =3D <17 IRQ_TYPE_LEVEL_HIGH>; > > > > > >>> clocks =3D <&osc>; > > > > > >>> }; > > > > > >>> However, in reality, the POR submodule does not use IRQ and C= LK. > > > > > >>> Please do not hesitate to teach. Thanks. > > > > > >> > > > > > >> I expect one device node. How many drivers you have does not m= atter: you > > > > > >> can instantiate 100 Linux devices in 100 Linux device drivers. > > > > > > > > > > > > I understand what you mean. A device node corresponds to multip= le 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. Compl= etely > > > > > delete. You do not add it back! Because if you ever intended to a= dd 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 R= TC, 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 =3D "cirrus,ep9301-rtc"; > > > > reg =3D <0x80920000 0x100>; > > > > }; > > > > > > > > Link: Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml > > > > > > > > > > > > > > To summarize: Drop POR from DTS and never bring it back, unless y= ou 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 RT= C > > > driver? > > > > Thanks, POR provides power off and restart functions as a child node of= RTC. > > So, I think it should be placed in the power/reset directory. > > No it doesn't, have a look at the jz4740 rtc driver Thank you for your suggestion. Best regards, Jingbao Qiu