Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp555690rdb; Tue, 16 Jan 2024 08:29:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIAGDdsRSiJ7TV2uNKUZSbnAesWzfDHIaBrEfRRDajFxa38DYsnScYMmeQLXb03rYNIodF X-Received: by 2002:a7b:cd97:0:b0:40d:5b15:eaff with SMTP id y23-20020a7bcd97000000b0040d5b15eaffmr3734982wmj.59.1705422592602; Tue, 16 Jan 2024 08:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705422592; cv=none; d=google.com; s=arc-20160816; b=z2AVRmd0bjqgfm/oJAumQspmWSS5Gr7LngdOxAj6zHG80LarMBbenczepcDdEWa32D s6ZeS2RfnC7xCSYQ9nix4bVP7y/nKUnmt4UxLeqXbOqUqg22pGqnpTYvC6KDDf2DiMln Wo7wXQO7bH0Rq9wQFm40f8azCzFNVpls2M0o5JVfdswFV19lsipMXK9IT76CBWIzU9K8 K0VEVj6af8shFmFkeXDvNtEtG9RMgSQk9Yxc9xmTBKTRDIbkSLA4GpOBOYCQixQIKYtF HbEzlal4iFA6YUATHTfT3/3KQVnv8UmKGX3nnYEIyqKG/FR+5wxASQyXP2NrdVgGAj6t HWaQ== ARC-Message-Signature: i=1; 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=e2EGnddz4HVPEzCJyDOKwQL+fRJZRBk2jtXoB7hv7LM=; fh=6BiYVYSAVJn+eOQZZm3G+5dMrUGWG1eublQWqkmy7tA=; b=NVYZquIm2hbyuIwX1b9EM0b9pPbnAOMW58w6NuLqVmZMqM3wffNGJcm0KTL9B6GkmU WkoPNQX9DurScD8a6Dj67R3is8n7BmoC8ONY7WoF4mXwCkhBX/Pt20gN8fOZU3jI5fYH QcRdI2NRcODynUfgfECZU9unSqzttZaKigCw7kM4/aoEQkev9JkSq7C2yQZmhY1YEkoA EEDptwnXsFivMxA/UG/zEEV2W7OURL1c+FOuZIgL0uQmaVtuFygL5f66zUSG1ZxvtPBd cO6GghLcmqndE40s1K5ldxWUSm/x+Wc5fflasaqOck7kD8HRZAVVxvWPnnrXr1/7Umdw lkpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GpukmRnR; spf=pass (google.com: domain of linux-kernel+bounces-27574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c10-20020a0564021f8a00b0055967c65c49si1610702edc.196.2024.01.16.08.29.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 08:29:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GpukmRnR; spf=pass (google.com: domain of linux-kernel+bounces-27574-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27574-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 37C701F24666 for ; Tue, 16 Jan 2024 16:29:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3583F1C6B9; Tue, 16 Jan 2024 16:29:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GpukmRnR" Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (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 1EA4B1C6A0; Tue, 16 Jan 2024 16:29:40 +0000 (UTC) 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-oa1-f50.google.com with SMTP id 586e51a60fabf-21086556f32so211786fac.3; Tue, 16 Jan 2024 08:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705422580; x=1706027380; 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=e2EGnddz4HVPEzCJyDOKwQL+fRJZRBk2jtXoB7hv7LM=; b=GpukmRnRlfDL3rFVYNUsCDvhMKNI/5C0Os/NCg6p7CavfcRcNh+mv35N8gFbvqsxHu EYGSLoIMiOtpOAKqiM9pBw/lp+0F6wZnduxVvN7ObhRGGah1R7CwKImtwBQLfjct3pOP xEwm4VViy32BUzhIB1zkOcmkTgWteqDRlj+SgkjRHTnnLDrDvVKpdTQrgVL+YjYK9WXa jETKW/vIuYisq5d3CnkEHju5CqsxAh2084DNO79CPXEdxZzhhDReBZQ/s8E2mVolVx5Z meSKK9++gdEruk5saczDHwbmbWjhEZZMLbK1jXpvZEBTlVdSNCEA0IDM6LHntN15zBjF lyHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705422580; x=1706027380; 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=e2EGnddz4HVPEzCJyDOKwQL+fRJZRBk2jtXoB7hv7LM=; b=BKhGsjP8a5JvJZMQAAhNQRofVyJLmWoW68e/5rqJEJJsk16nKiBNw3xUtRswxA223H jdsR9ncj278vala0SDrYGQgtA9xUNEjZvD208feiZZKjIaAu6QBGWj8PFmlJ/AHSq/kD MrT2erdsYd34lpA9j0jJ5Mc6Swq6gArNReGbjfmr3lKeEmfx+aRLE2UVIijgWqaXG7Vr hX4PiE/igtRWx0Ld8YVXfirxIm3w+le9KEkdeQIYluLZ39brfKQnUz4CLE83Y3BEY73Y BKShn8eknqfFWrGx6nKx0dGsPvEpoFDYZ2/8DX1e9l5VxoS1p99vDvn6qVMsHyoF5TKw 4Hhg== X-Gm-Message-State: AOJu0YwZttRnJ1jWrcfZXb2ViRuehfhKiuCZ97n2xKFNxrK+Tb3ecesh UQvT3NzhzrTJJ0q7CUKExqt74ZuhpjasyZ4G5EM= X-Received: by 2002:a05:6871:413:b0:203:743e:ba22 with SMTP id d19-20020a056871041300b00203743eba22mr10223706oag.89.1705422579663; Tue, 16 Jan 2024 08:29:39 -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> In-Reply-To: From: Jingbao Qiu Date: Wed, 17 Jan 2024 00:29:28 +0800 Message-ID: Subject: Re: [PATCH v6 3/3] riscv: dts: sophgo: add rtc dt node for CV1800 To: Krzysztof Kozlowski Cc: alexandre.belloni@bootlin.com, 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 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 concise repl= ies. > > > > 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 info= rmation? > > 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 =3D <0x5025000 0x2000>; > >>> interrupts =3D <17 IRQ_TYPE_LEVEL_HIGH>; > >>> clocks =3D <&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: y= ou > >> can instantiate 100 Linux devices in 100 Linux device drivers. > > > > I understand what you mean. A device node corresponds to multiple drive= rs. > > 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 =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 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? Thank you again. Best regards, Jingbao Qiu