Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp577036rdb; Tue, 16 Jan 2024 09:07:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGpB/7GEmASI+T38Ji5sP629f52dudX6KGzrkkvHarnp5EizquBKbaOxMkxeN81J0bKXfqQ X-Received: by 2002:ac2:4c01:0:b0:50e:699b:55f with SMTP id t1-20020ac24c01000000b0050e699b055fmr3244647lfq.66.1705424825336; Tue, 16 Jan 2024 09:07:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705424825; cv=pass; d=google.com; s=arc-20160816; b=cH3bKgsCMdwvxc8c1JikU8wwmonG6Rs1ygbb+kzr/gtPNY97Nqp01CShVcgq+FZoJ3 Mf9lrKfZcPRfPhFPjvqZNbcTvivpLrX56yO9Xfcip8/sXLtOvt5af0+l8D5ynIB9p90h Q4F39ovr34ydSiEX+mtgvb9MR/uANmzjWh0GSxTX7UlIPxAo7OMQprzjwXr7tUtayWLv niHgW3+c4L8YGy11IbLvF2+g/L+FGBwJUTzrrcu8SQ1rINNZ53w/R7W5Gi57XzhT9PRl JbSmUcH0z453S6hU4Mcax73tDJo9f1LtMUsOH4WUhMY2Ag9vzArUnmGVKnIFq15ln36S 4A0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=3VGcJoUzgugAcMhoIstgiUVP/tM57SrNlpYbezL9TQU=; fh=IswBVEE0PxQfCldKXNDlkYDPJRXrFNWOQ9ilG90A3h4=; b=dJR9t4lNbgJbZNCv8CIrR98i1pEu2Uu1lzkt9nh3LlhpwxYsexorSVNueVr+JqqSay RY9Ep5DaM3eTVHAM+sqoIs/vIkkhGWurH3wmwwHZegLYYse6n5nI7VpaG5VU32rSRrGh VJ0R/jVBLGpJ/qeXZFRjfcOhYvpMwOIP2SDetYPNq32qVTyWV5oEnofBTnv7bfYjav6S DMJsAUaVpMlJb5iDxkgVzfc6hY88EpfXGsRQWPXZz9W64uiCmzflQ0etfhXtdi3gutvW DTRza0OKxLmyZed/N/p9Sb8LyF62F6XRwkz3esTGzzt+BBPby2FSSaa7rRyzlIvEpE6q Ed+w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h7jY/vIK"; arc=pass (i=1 dkim=pass dkdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-27602-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q16-20020a1709060e5000b00a2dc78278c7si2088126eji.965.2024.01.16.09.07.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 09:07:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27602-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=@linaro.org header.s=google header.b="h7jY/vIK"; arc=pass (i=1 dkim=pass dkdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-27602-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 29DCB1F263BD for ; Tue, 16 Jan 2024 16:59:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D07B21CABF; Tue, 16 Jan 2024 16:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="h7jY/vIK" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 282091CF83 for ; Tue, 16 Jan 2024 16:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705424336; cv=none; b=FuGM2jaAnIPYaPb0ybeAGaKVtbQVvZWYavdLVicIk8LFJ4TLw2MFgtYV469jpepQhSCWJXIzcYHRtNgBwfuXs0BVxW0BMDmmYTo+3A+n2FI+doiF4UBXI3R4kkBuj9TcDE474rgPAwK26B7dbxNl3JnlcXe9pMdXCx4aclU6naU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705424336; c=relaxed/simple; bh=gcXcjopMWR5DqoKpPfgcIHWzFHgpzOizG/IvJSBvb0c=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:Content-Language: To:Cc:References:From:Autocrypt:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=XQqgvYo+PFp9IZvUiZdiDL4tIkHPL++i5QR/A62lkh3yI2+F1tsvpJFOQNDLCAx46k0CtyKtB2F0exDJ8siYkSbNs1cvME9d9eZTc1mxaazp17tONqFfMVe6pwg8KW+MO1STJCQzICYustxnt0fMAy/W6jfPod+py6xXf5W33gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=h7jY/vIK Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a2eac2aae6cso11418466b.1 for ; Tue, 16 Jan 2024 08:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705424333; x=1706029133; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3VGcJoUzgugAcMhoIstgiUVP/tM57SrNlpYbezL9TQU=; b=h7jY/vIK7rc+QJYw43Ps+aLXce/uzSRDxGYU4vDYScJu5TK0kPc8JBf6YmkebZGeU7 GOg6T//EPQQOFozKR9jpck2Ra5XrApV/uF3+qp3B3VOuUW41fnj+KYpxMSQRrdoNsnRi Ty9n2MhIrpBNxLREWwl4lDFFUNodpfjvJ9SzhEUc+S5gwnnZ1Hh+cRo5IMMvbYAPbcwn 4fyawZbulDEL5wbufWmA6CCNHVF5BjAT3JXBfpyfZ7HySgLgKdCrEmXdSKQ3yK2VtD/4 5M9Q1de4/AqVACrsRarJL1cPMTvO6x72yDSL13+Y6x17nQqRQZWw82+iAmQ4BLAj2KTe EmHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705424333; x=1706029133; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3VGcJoUzgugAcMhoIstgiUVP/tM57SrNlpYbezL9TQU=; b=e8oRJeXz2qxhAoAOeZC7v2crcLqqei7GDUr94aCRkD6ZmrZEuf3nV1vfhioOnA/MEq g4VipuWCaQhJMk7ElAQFstcJGVByEvT2CTnD9j2FYRaqxf3wNWszAKVkB/ibioatGEDT UuNNAughHPgGTNjKmQ3EnqZeggPgp4B1UL4JzjfgX4hqlaSA8525G62dz4wsW63t5J0Q K6hiw6T91HWSo8hYWksi4UUfHdbWirRszF84juqJgvydJ8foynp45EmhiGx2/zmrUEAS 5VTh6ZMziXEjLx3bjgdW3KuYQB/TltbNUYQ7bZEZnvDilq7WiWbEjD3j5EPgnnn1qVed fehA== X-Gm-Message-State: AOJu0Yz36hhigoAnEqpYu3RnmzyMxlqcmAOkW6n1mSaGcHSmVROoFuBB H4EdSFsrHbRCWggCieAMXn3iifE9MDlSxg== X-Received: by 2002:a17:906:18ea:b0:a28:da64:ac06 with SMTP id e10-20020a17090618ea00b00a28da64ac06mr3906828ejf.73.1705424333188; Tue, 16 Jan 2024 08:58:53 -0800 (PST) Received: from [192.168.1.20] ([178.197.215.66]) by smtp.gmail.com with ESMTPSA id m23-20020a17090607d700b00a233efe6aa7sm6693928ejc.51.2024.01.16.08.58.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jan 2024 08:58:52 -0800 (PST) Message-ID: Date: Tue, 16 Jan 2024 17:58:49 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 3/3] riscv: dts: sophgo: add rtc dt node for CV1800 Content-Language: en-US To: Jingbao Qiu 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 References: <20240115160600.5444-1-qiujingbao.dlmu@gmail.com> <20240115160600.5444-4-qiujingbao.dlmu@gmail.com> <007e8c14-13eb-4917-b9da-8d47d6c965c7@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDSzG1oZyM4kyvO XeodvvYv49/ng473E8ZF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 8bit On 16/01/2024 17:29, 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 meant, separate from the RTC. I had impression that IO space is shared 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 = "cirrus,ep9301-rtc"; > reg = <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. Best regards, Krzysztof