Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp237327rdb; Tue, 16 Jan 2024 23:40:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyFNG4jcKAvmv/PHku8rmd+CPZBXJqdAw3Vh1Lw62L91FZhts2LuXFjiQMwZjRID7fh/Fk X-Received: by 2002:aa7:d4cb:0:b0:558:6000:6b0f with SMTP id t11-20020aa7d4cb000000b0055860006b0fmr4752354edr.74.1705477201356; Tue, 16 Jan 2024 23:40:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705477201; cv=pass; d=google.com; s=arc-20160816; b=FdU9cJoCWpD5r/6vBZYIyerASNh5ea6MIsDQ3yhaP2hC7C/z6EXhxtq1U7rVqoTFww nMR87MnhE8juKQ+DpMDLW4Mm/NgcZ7ORPkBedvkIPDsn3/Y4rYp6ZRkgzkZNrzYKaPKT h2oFt0flvMZvHjOxz8UI1eofnWpG4/aBedtm2S9zYbjQlMVdHRN8hNoj8OSYiYXXl3x5 7X1pavsUsN9Gb/+gVzmh52EUuUAxCTq03hSMD5T0d78pyyhRh9ZI6GeiPrjUx4Q+vBxY NOeHdtagGoCPrERyMYqmGyd6iF/bXKXvyCs5R0GpziWea46UM7Fje10kvnuA7b7mfCOV apdw== 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=DYD5zbvtfChyDlLcJIGs/Zw02fCfi4YRD1ZA/Szr5FU=; fh=6BiYVYSAVJn+eOQZZm3G+5dMrUGWG1eublQWqkmy7tA=; b=a+K2ky1FXvju3Z0YsrrSNZYGcJwmADhuq3xEu15HyWGhOsiOANBQ/nLrotJZ0opIO2 PFjI0HOPhZtr+rkHonlzuAvqBWDmk4h0Pru/O0NcJObuPfrWF47NMkIfx2wB/ltpsCGw +P+Y8yZsHzal8T0ayLF0QtmwX1dUgCQToRVoTsxHUWAezv3vpA9dNgarSdJbPmOOcpt5 caNPzexCSXAxUzKc/PSoGz9tyl/uwAr57Y1jW29Dcn9k4UBwKpE/fE3VBNWy7WDEuash 3XloRNQ5b0DYqs/WTZN3nKYk3QTHtpNhTu3hC3eF9o4cVA0iH1snR9M1+MonwOIpGt6+ 2j/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y4vfPQV1; 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-28604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28604-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 en22-20020a056402529600b00557a605a6c6si5537197edb.52.2024.01.16.23.40.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 23:40:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28604-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=Y4vfPQV1; 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-28604-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28604-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 D73B11F250A1 for ; Wed, 17 Jan 2024 07:40:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 124B4C2E3; Wed, 17 Jan 2024 07:39:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y4vfPQV1" Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.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 7D85BBE4C; Wed, 17 Jan 2024 07:39:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705477187; cv=none; b=jNLpkc8B1XuBuN5PJ9BHyp5u0snSIUS3uROPXvYukNGKUQQfjxFrNRtTlix/o5WifaEKFE6Uq4zZiGBzWezpCS1qTtvoTyiQsyoSSFTTauemZ8yJuVAHfbNnh/eJfgaMEoufuzCs12uk9gzpOu5DqDrXGptvejgyPmoxVeL+amo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705477187; c=relaxed/simple; bh=SL3d01vukiAcAwQr9Teceq0pf76CwAOdJoe3PhM0S8Q=; 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=PTpeEQBlVo6zQBY9mT2MKZ8PnISC9bsx49zBObI8y+yMvjCsBK4Z4a410Y+BlU3Xt4kisMRtPzGFwMc48RHb8ePadgJnWpev/tUD0EVJx5yWkha2IHDu+hR3sGfHDPj9GFWUIVMrGgdoRbVrDqLYOSrW4OT3IovTJy0GdM9/d0I= 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=Y4vfPQV1; arc=none smtp.client-ip=209.85.160.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-oa1-f52.google.com with SMTP id 586e51a60fabf-204dfd7a89aso4713340fac.1; Tue, 16 Jan 2024 23:39:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705477184; x=1706081984; 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=DYD5zbvtfChyDlLcJIGs/Zw02fCfi4YRD1ZA/Szr5FU=; b=Y4vfPQV1DsXIyI0dn/SsqRssPo8jZeKvRk6p+PWRLuQQ8BDuIeRYb2AKIV8ybN1PeL XOIB9XQDOWU9eD0NpME1hKUSnqImONCojBkJ+2xYfYbM2C38Fu9qYYn7VqBEHKMbjOSO HsDawO4vYUJ/7/SIuh1YC+6pQh8VolgOra5PZgs4QelZITgxIPl1gjvxId3BpSMVx84h f7gHjP6u+jFmnzfwc+GbtB2yTAFUw4MuVhBIezKRWdNVyzLpmMsAV9uHm2JW2tKt8hd9 JCGrrhLSE0i+QTyQvd4/gOux2PzPXnSSw0e/8E5Jc+bV5oFvLIiQt0UTjy/shdB6Vam6 J0XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705477184; x=1706081984; 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=DYD5zbvtfChyDlLcJIGs/Zw02fCfi4YRD1ZA/Szr5FU=; b=FaMWdylEdQnshOQTPISBZEd8vAZgTv2xNsRmoJV6Pkh4WsCz+ZGYLtCAc5YprGo+dH N0U6V9vA2IYJIfwQmMs7ilZ4RoDt6aIQA/z/sJlsnrPo8hVZIUZJvfkiVLoGEqThTScE LyMIj+GblM4hKtipx4nlSi0kXxx8tV1bNJA7xnxmXZ++EiuUSWYRmxJPcOEjJ4noW7Ma v18dAsXTs2/DPqW5y+OVIHKl/4CeFDcp7WFxaHf0A+MQ4ta6T9j5voN+mpGyUw9yxuU5 LOyaGTIVRe1OCn6pi8KLfDyTzF6WuZiCESE7FMyEvBwSaRjViXvm0epx6Ek1KilEb66u aHnw== X-Gm-Message-State: AOJu0Yy4/dJztr86bblCR/22KzADishITqLF601CYydKcbntBiJsZpbS U+gmYvQZBhf5pGsVd0ZzSFizrgr8ZyPF7ZtLpfVsKzTkNh/MCFYR92YyNBWSUqJmlNaN3VaKQIh rHrRNx83AbTfm//mOF1Z0svJOQB0= X-Received: by 2002:a05:6870:a7a1:b0:210:5f0c:ddfe with SMTP id x33-20020a056870a7a100b002105f0cddfemr148730oao.4.1705477183947; Tue, 16 Jan 2024 23:39:43 -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> <326dd12e-2d52-4d4c-8197-5d35a0c52cf5@linaro.org> In-Reply-To: <326dd12e-2d52-4d4c-8197-5d35a0c52cf5@linaro.org> From: Jingbao Qiu Date: Wed, 17 Jan 2024 15:39:33 +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 3:28=E2=80=AFPM Krzysztof Kozlowski wrote: > > On 17/01/2024 04:24, Jingbao Qiu wrote: > > On Wed, Jan 17, 2024 at 12:58=E2=80=AFAM Krzysztof Kozlowski > > wrote: > >> > >> On 16/01/2024 17:29, 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 concise = replies. > >>>>> > >>>>> Thanks, What I mean is that this hardware includes two functions, R= TC > >>>>> 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 a= ny > >>>> 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 matte= r: you > >>>>>> can instantiate 100 Linux devices in 100 Linux device drivers. > >>>>> > >>>>> I understand what you mean. A device node corresponds to multiple d= rivers. > >>>>> 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. Complete= ly > >>>> 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 th= ere. > >>>> 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 meant, separate from the RTC. I had impression that IO space is shar= ed > >> or mixed with RTC? If it is separate, why it wasn't listed? > >> > >>> > >>> 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 > >> > >> And? > >> > >>> > >>>> > >>>> 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? > >> > >> The same as currently. Does your POR node has reg? No, so according to > >> your logic it cannot obtain address space. > >> > >> Children Linux devices share regmap with parent device. > >> > > > > Thanks, Power-On-Reset/POR driver requires Reg to complete its function= s. > > The compatible of POR is required in DTS to load the corresponding driv= er. > > No, it is not needed. I also wrote to in previous messages to keep > drivers out of this. They are not related to this topic and don't use > them as arguments. > > > > The POR driver was not submitted in the patch. However, this patch requ= ires > > the addition of RTC in DTS. Considering the future addition of POR > > No. Bindings *MUST BE COMPLETE*, not depend on some other drivers. > Submit *COMPLETE* bindings for entire hardware. Then submit complete > DTS. I don't care about the drivers and they do not have to be complete. > > > > driver, I added a POR node. > > I'm not sure why the POR node needs to be deleted, just because it > > only has the compatible attribute? > > This is like a tenth message and I was explaining it multiple times. Go > back to previous emails. > > > Or maybe it's because I didn't submit the POR driver, so I need to > > delete the POR node. > > Please don't mention drivers anymore in this discussions. It only > confuses you. > > > I found an example. > > > > st: timer@fffffd00 { > > compatible =3D "atmel,at91rm9200-st", "syscon", "simple-mfd"; > > reg =3D <0xfffffd00 0x100>; > > interrupts =3D <1 IRQ_TYPE_LEVEL_HIGH 7>; > > clocks =3D <&slow_xtal>; > > watchdog { > > compatible =3D "atmel,at91rm9200-wdt"; > > }; > > }; > > > > Link:arch/arm/boot/dts/microchip/at91rm9200.dtsi:114 > > > > Like this, when the por driver insmod is activated, the por driver can > > obtain the regs of the parent device. > > Example of what? What is the question? I found a bug in Linux, so can I > create such bug again? > > This discussion is fruitless and tiresome. You are repeating the same > issues and asking the same questions. > Thank you, I have been misled by historical legacy code. I will completely delete POR. Sorry again for wasting your time on repetitive discussions. Best regards, Jingbao Qiu