Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp344593lqm; Wed, 1 May 2024 02:15:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0sWrd+9azhu9VfBpais+Drfk/pm3JHQmY3JU3Nx97AV9ke72kGPKdOhIoLdxR38GC7uJRn2UVeZhTzPjKbn10on9AjStKhbwlW74CZQ== X-Google-Smtp-Source: AGHT+IG5yxaxmWv0j6McqKxgvVh/S6mD2eDByhTROxipfvCuHaSczNfMyE62R8bLP2eH02DfpnaV X-Received: by 2002:ac2:4257:0:b0:518:b283:1078 with SMTP id m23-20020ac24257000000b00518b2831078mr1466091lfl.26.1714554907243; Wed, 01 May 2024 02:15:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714554907; cv=pass; d=google.com; s=arc-20160816; b=adNwXPMwQpS39hpf1CCn8wjEr88m5A+Wi+MQs+cMf1GwwcfkrSqN4HpDEg9rDN0+Ws c3wNOHlPH17QCLswOwbcKzpScSR29dbO92jZycLGl+f6Z1U4hnPivIvLl108X3n6mZTx +eyeVFygE5mgo5A+KbOoKsCD6g1wbsrH8mguBU4QcsBFVbmXy4bqLaUaxS7aPrA90uz4 ypnpLvJJfiacSGLeML7MQIGvqBxMpHPlW1H1DSttngk5HBKBQY3NSg4ZhkmXl+WT+CGb PM8sdmjtKl2jj+Fjkv+MdICFkeyp+vbFEPOY6+hH4MGsBNw8I9SCI16+lfH6Ma85FeD+ Oh+w== 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=Yrwu+7N9ljC9VYp3+kNHnWjn/O68b7FpSGtuKjbJJhY=; fh=MsHzs1/cK5b9hc6/mNITbUH523S6A95E2oDS4KukAaE=; b=bwQj9OyIxXm2BhHsBr/0ZYwuzPSQDtmpjtKF0j3D2hgIMzHKU8S0VfVk+k759dyVuo +vPdslmwe7HkpD4g7oHIFVPq5H9KkbT5yrNLvKl3cB2Ae7Tqo0Yu67lVa8FMdj2ylR8D KfBUQatgt76RFrh9IN5BDUJEYrgmnJQdWyfBrt5jqJAsnGNZ6EnX529jCJ1514el4YJC to7gql6DnF3oFz5ZUWlIwyhZRyrcg6PJiBeDMmkoa8xAFZG4O2Prj29jWx8NnknDB/Is rMvLcqgnLlZi5Aon6moJw2q+zvwDxHCUqJttJrplRB9vM4/Mn46G4kE5ibyJvpy8//EV SSDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M0r5kY3t; 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-165073-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165073-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 g33-20020a056402322100b00572701284d7si4971781eda.243.2024.05.01.02.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 02:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165073-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=M0r5kY3t; 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-165073-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165073-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 C58341F23C7E for ; Wed, 1 May 2024 09:15:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FD06502B8; Wed, 1 May 2024 09:14:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M0r5kY3t" Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.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 5F0994E1A2; Wed, 1 May 2024 09:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714554897; cv=none; b=YZKdSW0PrmN7sRIGxt0Ox8Pa5xxNOIloka564YKlsOr9FPvYV1M/Vpp/nFCugGc26JrybLaiFehYEJPKo1DVsXGDQFRUz0k/KnNRRg+3cnH8fsdy4x1idJS0uH/E31Ge0e26i4VOQ9CHZeN76zm4CDDhfZHiLFbb0d+jCLfcswU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714554897; c=relaxed/simple; bh=Yrwu+7N9ljC9VYp3+kNHnWjn/O68b7FpSGtuKjbJJhY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ermcCul/qXbAHOFhEjqCSOkXRB7nGtQWY3IyMbJoB2+C1795wUNhND/L2ODE/G/IOskgnl20orwLDRbDNYE9c/sjF+xFRCzbzgjzZcJZ6sDQ/54e0Tt/IMQqV5PzDd8dqi21lxGs+zD6d7St0lvssy/Zh965NCczzP/sLe8jkEY= 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=M0r5kY3t; arc=none smtp.client-ip=209.85.210.43 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-ot1-f43.google.com with SMTP id 46e09a7af769-6ee135f6a21so1621185a34.2; Wed, 01 May 2024 02:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714554895; x=1715159695; 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=Yrwu+7N9ljC9VYp3+kNHnWjn/O68b7FpSGtuKjbJJhY=; b=M0r5kY3t1nO4bNB28p7iMtY3sMVpBrFsqYZbaC6pGBWTEoQXD2ilndJVA9WOaj1whV itcUqXfhI7IlJK8QLfgiM2mVXp2mKpFzfoneE1pbIud+za0rT5+uKXRmTs9Xo6OviR9l S7kPME1DuLd0He7Zjrw0Gj+cXtIKuhcw+BjiUjiKdLuswB69uFRWTCbm+5dRF3M9GzSx OBVfxf8+MM87/BrH0DYrwTa0qP4/+l+b/3w3e/9lQSLOlYQYDePKsRvDfw0C496obxTP wPj7ygIs0k+y+rjA9Od8XlEq6ZP4WhOVie59GtljpVUYOpAKAGLtLF90MskYfH9si3pz VR+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714554895; x=1715159695; 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=Yrwu+7N9ljC9VYp3+kNHnWjn/O68b7FpSGtuKjbJJhY=; b=WZETvk714pVfyTNDW9/N54PSKnJc3/C5bWLmbbQEVojXGbIYNOmq1YubGi21v2aqcV tH5shAtk3QCdY6GBF2bp+5/xpNk4qQ8QcvhIb5838KC9RLC6Ppu3mY4lTZ0AA14LKyZ7 sX6z7So08EufcoRktFElvHShOY9CIr9Uq+brCI4Gw7XkQvjX0TeOzMc+jhTVN7voRT36 VUDAYittN8yYnW75KLqO7DlSJu7wtTWMu7C3mcaSPRzKtIU0q3K64MrGnREDwvttiZYk k1f98wzQyxF1qcIztrSR0TypNZBFEd/XE4uLZ75T1APbMEP2Sr91ooQA6LLNRHrsSAFG NnWg== X-Forwarded-Encrypted: i=1; AJvYcCVSf+iJIlIcUMKu1kQFaWjA0kSVPqjG7fRM39ReDgxsCRq3CB7hNGKlZxL+bIfADG0yAuCWYtIvXHzMZfI7BCeeAbigI8cQLxuuQYYmL0Sc/25Aq6h7NmegKDSJ4UB2/wTzUAi/uePQIiYHAXuyK5FYEaGtTA0TVSIVdNTvtbYK46MvKA== X-Gm-Message-State: AOJu0YzjjLCZQTJ19SQ2O7xVvuoornRUkXd3HDdUwBUu8ekJ2DumrIF1 GJM4x76nWUdsG6nSmVVLX4W5ws4gUh2rfsCl8jm9MFHqgn+n1Raxfl3VdbUr9yjvV3pISnW61T/ T0oi0FEi1d1lDuHVWwDjv+Pwctak= X-Received: by 2002:a9d:6209:0:b0:6ee:1bfe:9a6b with SMTP id g9-20020a9d6209000000b006ee1bfe9a6bmr2006443otj.34.1714554895055; Wed, 01 May 2024 02:14:55 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240204044143.415915-1-qiujingbao.dlmu@gmail.com> <20240204044143.415915-3-qiujingbao.dlmu@gmail.com> In-Reply-To: From: Jingbao Qiu Date: Wed, 1 May 2024 17:14:43 +0800 Message-ID: Subject: Re: [PATCH v8 2/2] rtc: sophgo: add rtc support for Sophgo CV1800 SoC To: Inochi Amaoto Cc: alexandre.belloni@bootlin.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, 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, dlan@gentoo.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 1, 2024 at 3:43=E2=80=AFPM Inochi Amaoto wrote: > > On Wed, May 01, 2024 at 01:03:58PM GMT, Jingbao Qiu wrote: > > Hi, Inochi > > > > On Wed, May 1, 2024 at 10:19=E2=80=AFAM Inochi Amaoto wrote: > > > Another thing is that I do not think is a good way to let the > > > rtc driver access RTC_CTRL area directly. You have already > > > know there is a 8051 device in the 0x05025000. It is necessary > > > to make some room for this device. Maybe you want to implement > > > them all in the rtc driver? If so, I do think it is a bad idea. > > > > > > Do you mean that RTC drivers should not directly access the 0x05025000 = address? > > Because there is an 8051 subsystem on this address. > > Yes. At least we need some mechanism to share these address between > this devices. > > > Firstly, I do not intend to implement 8051 in the RTC driver, > > but the 8051 subsystem is located within a module independently > > powered by the RTC. > > So if we want to implement the 8051 subsystem in the future, it can be > > used as a node in RTC? I'm not sure. > > Yes, this is what I care about. > > > Then, Alexandre told me that there are operations related to PM in > > RTC, such as the following files. > > This matches the description of address 0x05025000. > > > > drivers/rtc/rtc jz4740. c > > > > I do not think this is something related to the PM. 8051 is more > like remoteproc. So it is necessary to arrange them carefully. > You are right. I learned from official documents that 8051 works in the RTC domain. Linux does not provide relevant interfaces to operate 8051, Just providing a mailbox for communication between them, or through interruptions. I don't understand how 8051 works, so I shouldn't write to the corresponding registers in RTC. https://milkv.io/docs/duo/getting-started/8051core > > > > 2.25.1 > > > >