From: Conor Dooley <conor.dooley@microchip.com>
To: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
Cc: Conor Dooley <conor@kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, <linux-rtc@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
NXP S32 Linux Team <s32@nxp.com>,
Bogdan-Gabriel Roman <bogdan-gabriel.roman@nxp.com>,
Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
Subject: Re: [PATCH 1/4] dt-bindings: rtc: add schema for NXP S32G2/S32G3 SoCs
Date: Thu, 12 Sep 2024 12:27:22 +0100 [thread overview]
Message-ID: <20240912-immersion-obvious-81a2a0c7a9cb@wendy> (raw)
In-Reply-To: <62ba70ca-429e-476c-bb7b-78f743574a68@oss.nxp.com>
[-- Attachment #1: Type: text/plain, Size: 3471 bytes --]
On Thu, Sep 12, 2024 at 01:50:25PM +0300, Ciprian Marian Costea wrote:
> On 9/11/2024 9:21 PM, Conor Dooley wrote:
> > On Wed, Sep 11, 2024 at 10:00:25AM +0300, Ciprian Costea wrote:
> > > From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
> > > + nxp,clksel:
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > + description:
> > > + Input clock selector. Choose between 0-SIRC and 2-FIRC.
> > > + The reason for these IDs not being consecutive is because
> > > + they are hardware coupled.
> > > + enum:
> > > + - 0 # SIRC
> > > + - 2 # FIRC
> >
> > Could you please explain why, given both clocks must be provided by
> > the hardware for there to be a choice, why choosing between them is a
> > property of the hardware?
> >
>
>
> According to RTC module's clocking scheme for S32G2/S32G3 SoCs, it has three
> potential clock sources to select between:
> 1. FIRC:
> - fast clock - ~48 MHz output
> - chosen by default because it is proven to be more reliable (e.g:
> temperature drift).
> 2. SIRC:
> - slow clock - ~32 kHz output
> - When in Standby mode, SIRC_CLK is the only available clock for RTC.
> This is important because RTC module is used as a wakeup source from Suspend
> to RAM on S32G2/S32G3 SoC. Therefore, a temporary switch to SIRC clock is
> performed when entering Suspend to RAM.
>
> 3. EXT_CLK:
> - has not been tested/validated for those SoCs within NXP's downstream
> Linux. Therefore, I did not treat it, nor mention it, for the moment.
>
> Now to answer your question, all above clocks are entering a RTCC[CLKSEL]
> (RTCC - RTC Control Register) mux. Therefore, a selection can be made,
> according to one's needs.
Given both clocks must be provided, what is the benefit of using the
slow clock outside of standby mode? Why would someone not just always
use the fast clock outside of standby and slow in standby?
> I will add a shorter version of above information in the bindings
> documentation in the V2 of this patchset.
>
> > > +
> > > + nxp,dividers:
> > > + $ref: /schemas/types.yaml#/definitions/uint32-array
> > > + description:
> > > + An array of two u32 elements, the former encoding DIV512,
> > > + the latter encoding DIV32. These are dividers that can be enabled
> > > + individually, or cascaded. Use 0 to disable the respective divider,
> > > + and 1 to enable it.
> >
> > Please explain to me what makes this a property of the hardware and how
> > someone would go about choosing the divider settings for their hardware.
> >
>
> As per hardware RTC module clocking scheme, the output of the clock mux can
> be optionally divided by a combination of 512 and 32 (via other two input
> cascaded muxes) to give various count periods for different clock sources.
>
> With respect to choosing the divider settings for custom hardware, it
What do you mean by "custom" hardware? I assume that you mean on a per
board basis?
> depends on the clock source being selected and the desired rollover time.
> For example, on S32G2 or S32G3 SoC based boards, using FIRC (~48-51 MHz)
> with DIV512 enabled results in a rollover time of aprox. 13 hours.
So a different user of the same board might want a different rollover
time? If so, this doesn't really seem like something that should be
controlled from devicetree.
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-09-12 11:29 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 7:00 [PATCH 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs Ciprian Costea
2024-09-11 7:00 ` [PATCH 1/4] dt-bindings: rtc: add schema for NXP " Ciprian Costea
2024-09-11 18:21 ` Conor Dooley
2024-09-12 10:50 ` Ciprian Marian Costea
2024-09-12 11:27 ` Conor Dooley [this message]
2024-09-12 13:02 ` Ciprian Marian Costea
2024-09-12 12:26 ` Alexandre Belloni
2024-09-12 12:36 ` Ciprian Marian Costea
2024-09-12 14:03 ` Alexandre Belloni
2024-09-17 7:21 ` Ciprian Marian Costea
2024-09-17 12:37 ` Conor Dooley
2024-09-17 13:01 ` Alexandre Belloni
2024-09-11 18:22 ` Conor Dooley
2024-09-12 10:55 ` Ciprian Marian Costea
2024-09-12 11:13 ` Conor Dooley
2024-09-12 12:00 ` Ciprian Marian Costea
2024-09-12 12:12 ` Conor Dooley
2024-09-12 12:16 ` Ciprian Marian Costea
2024-09-11 7:00 ` [PATCH 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support Ciprian Costea
2024-09-12 4:41 ` kernel test robot
2024-09-13 11:58 ` kernel test robot
2024-09-17 17:40 ` Krzysztof Kozlowski
2024-09-18 7:51 ` Ciprian Marian Costea
2024-09-18 10:26 ` Alexandre Belloni
2024-09-18 15:08 ` Ciprian Marian Costea
2024-09-11 7:00 ` [PATCH 3/4] arm64: defconfig: add S32G RTC module support Ciprian Costea
2024-09-17 17:36 ` Krzysztof Kozlowski
2024-09-18 8:02 ` Ciprian Marian Costea
2024-09-18 8:10 ` Krzysztof Kozlowski
2024-09-11 7:00 ` [PATCH 4/4] MAINTAINERS: add MAINTAINER for S32G2/S32G3 RTC driver Ciprian Costea
2024-09-17 17:37 ` Krzysztof Kozlowski
2024-09-18 8:13 ` Ciprian Marian Costea
2024-09-18 10:36 ` Krzysztof Kozlowski
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=20240912-immersion-obvious-81a2a0c7a9cb@wendy \
--to=conor.dooley@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bogdan-gabriel.roman@nxp.com \
--cc=catalin.marinas@arm.com \
--cc=ciprianmarian.costea@oss.nxp.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ghennadi.procopciuc@nxp.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=s32@nxp.com \
--cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox