From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
Cc: Inochi Amaoto <inochiama@outlook.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
Subject: Re: [PATCH v8 2/2] rtc: sophgo: add rtc support for Sophgo CV1800 SoC
Date: Wed, 1 May 2024 13:20:01 +0200 [thread overview]
Message-ID: <20240501112001dc47d549@mail.local> (raw)
In-Reply-To: <CAJRtX8Ruh4BethYcGM2RueNBDioXpn8dJ3yvUD4iW_1cmiVFqg@mail.gmail.com>
On 01/05/2024 17:14:43+0800, Jingbao Qiu wrote:
> On Wed, May 1, 2024 at 3:43 PM Inochi Amaoto <inochiama@outlook.com> wrote:
> >
> > On Wed, May 01, 2024 at 01:03:58PM GMT, Jingbao Qiu wrote:
> > > Hi, Inochi
> > >
> > > On Wed, May 1, 2024 at 10:19 AM Inochi Amaoto <inochiama@outlook.com> 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
Then you will have to have a driver for the 8051 firmware before being
able to access registers that are outside of the RTC range. However, I
se the firmware is using RTC_INFOx without any form of locking but I
guess this just means Linux will have to ensure it never writes to
those.
>
>
> > > > > 2.25.1
> > > > >
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-05-01 11:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-04 4:41 [PATCH v8 0/2] riscv: rtc: sophgo: add rtc support for CV1800 Jingbao Qiu
2024-02-04 4:41 ` [PATCH v8 1/2] dt-bindings: rtc: sophgo: add RTC support for Sophgo CV1800 series SoC Jingbao Qiu
2024-02-04 4:41 ` [PATCH v8 2/2] rtc: sophgo: add rtc support for Sophgo CV1800 SoC Jingbao Qiu
2024-03-05 10:25 ` Jingbao Qiu
2024-04-17 21:23 ` Alexandre Belloni
2024-04-24 7:35 ` Jingbao Qiu
2024-05-01 2:19 ` Inochi Amaoto
2024-05-01 5:03 ` Jingbao Qiu
2024-05-01 7:43 ` Inochi Amaoto
2024-05-01 9:14 ` Jingbao Qiu
2024-05-01 11:20 ` Alexandre Belloni [this message]
2024-05-02 7:39 ` Jingbao Qiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240501112001dc47d549@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=inochiama@outlook.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=qiujingbao.dlmu@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.