From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Biju Das <biju.das.jz@bp.renesas.com>,
"geert+renesas@glider.be" <geert+renesas@glider.be>,
"mturquette@baylibre.com" <mturquette@baylibre.com>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>
Cc: "linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH v3 01/12] dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB
Date: Tue, 3 Sep 2024 10:44:22 +0300 [thread overview]
Message-ID: <a1a665b9-05f1-43a8-88bc-2701cdd0e4ee@tuxon.dev> (raw)
In-Reply-To: <TY3PR01MB11346F4625C5C7D321490306E86932@TY3PR01MB11346.jpnprd01.prod.outlook.com>
On 03.09.2024 10:36, Biju Das wrote:
> Hi Claudiu,
>
>> -----Original Message-----
>> From: claudiu beznea <claudiu.beznea@tuxon.dev>
>> Sent: Tuesday, September 3, 2024 8:28 AM
>> Subject: Re: [PATCH v3 01/12] dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB
>>
>>
>>
>> On 03.09.2024 09:58, Biju Das wrote:
>>> Hi Claudiu,
>>>
>>>> -----Original Message-----
>>>> From: Claudiu <claudiu.beznea@tuxon.dev>
>>>> Sent: Friday, August 30, 2024 2:02 PM
>>>> Subject: [PATCH v3 01/12] dt-bindings: clock:
>>>> renesas,r9a08g045-vbattb: Document VBATTB
>>>>
>>>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>
>>>> The VBATTB IP of the Renesas RZ/G3S SoC controls the clock for RTC,
>>>> the tamper detector and a small general usage memory of 128B. Add documentation for it.
>>>>
>>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>> ---
>>>>
>>>> Changes in v3:
>>>> - moved the file to clock dt bindings directory as it is the
>>>> only functionality supported at the moment; the other functionalities
>>>> (tamper detector, SRAM) are offered though register spreaded
>>>> though the address space of the VBATTB IP and not actually
>>>> individual devices; the other functionalities are not
>>>> planned to be supported soon and if they will be I think they
>>>> fit better on auxiliary bus than MFD
>>>> - dropped interrupt names as requested in the review process
>>>> - dropped the inner node for clock controller
>>>> - added #clock-cells
>>>> - added rtx clock
>>>> - updated description for renesas,vbattb-load-nanofarads
>>>> - included dt-bindings/interrupt-controller/irq.h in examples section
>>>>
>>>> Changes in v2:
>>>> - changed file name and compatible
>>>> - updated title, description sections
>>>> - added clock controller part documentation and drop dedicated file
>>>> for it included in v1
>>>> - used items to describe interrupts, interrupt-names, clocks, clock-names,
>>>> resets
>>>> - dropped node labels and status
>>>> - updated clock-names for clock controller to cope with the new
>>>> logic on detecting the necessity to setup bypass
>>>>
>>>> .../clock/renesas,r9a08g045-vbattb.yaml | 81 +++++++++++++++++++
>>>> 1 file changed, 81 insertions(+)
>>>> create mode 100644
>>>> Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.yaml
>>>>
>>>> diff --git
>>>> a/Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.ya
>>>> ml
>>>> b/Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbattb.ya
>>>> ml
>>>> new file mode 100644
>>>> index 000000000000..29df0e01fae5
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/clock/renesas,r9a08g045-vbatt
>>>> +++ b.y
>>>> +++ aml
>>>> @@ -0,0 +1,81 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
>>>> +---
>>>> +$id:
>>>> +http://devicetree.org/schemas/clock/renesas,r9a08g045-vbattb.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Renesas Battery Backup Function (VBATTB)
>>>> +
>>>> +description:
>>>> + Renesas VBATTB is an always on powered module (backed by battery)
>>>> +which
>>>> + controls the RTC clock (VBATTCLK), tamper detection logic and a
>>>> +small
>>>> + general usage memory (128B).
>>>> +
>>>> +maintainers:
>>>> + - Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>> +
>>>> +properties:
>>>> + compatible:
>>>> + const: renesas,r9a08g045-vbattb
>>>> +
>>>> + reg:
>>>> + maxItems: 1
>>>> +
>>>> + interrupts:
>>>> + items:
>>>> + - description: tamper detector interrupt
>>>> +
>>>> + clocks:
>>>> + items:
>>>> + - description: VBATTB module clock
>>>> + - description: RTC input clock (crystal oscillator or external
>>>> + clock device)
>>>> +
>>>> + clock-names:
>>>> + items:
>>>> + - const: bclk
>>>> + - const: rtx
>>>> +
>>>> + '#clock-cells':
>>>> + const: 1
>>>> +
>>>> + power-domains:
>>>> + maxItems: 1
>>>
>>> Not sure, you need to document "PD_VBATT" power domain as per Table
>>> 41.2, this LSI supports 3 power domains(PD_ISOVCC, PD_VCC, PD_VBATT)
>>>
>>> Power Mode PD_ISOVCC PD_VCC PD_VBATT
>>> ALL_ON ON ON ON
>>> AWO OFF ON ON
>>> VBATT OFF OFF ON
>>> ALL_OFF OFF OFF OFF
>>>
>>> PD_VBATT domain is the area where the RTC/backup register is located,
>>> works on battery power when the power of PD_VCC and PD_ISOVCC domain are turned off.
>>
>> In Linux, the CPG is the power domain provider for all the IPs in RZ/G3S SoC (modeled though MSTOP CPG
>> support). This is how it is currently implemented.
>>
>> Then groups of IPs are part of power domains PD_ISOVCC, PD_VCC, PD_VBATT.
>> These power domains are i2c controlled with the help of firmware (at least at the moment).
>>
>> From HW manual:
>> - PD_VCC domain always powered on area.
>>
>> - PD_ISOVCC domain is the area where the power can be turned off.
>>
>> - PD_VBATT domain is the area where the RTC/backup register is located,
>> works on battery power when the power of .
>>
>> The power to these domains are controlled with the help of firmware. Linux cannot do control itself as
>> the CPU is in the PD_ISOVCC. If you look at picture 41.3 Power mode transition [1] it is mentioned the
>> relation b/w these power domains (controlled by PMIC though firmware) and the supported power saving
>> modes: ALL_ON, AWO, VBATT.
>>
>
> DT describes hardware. So, the question was, from that perspective, do we need to document PD_VBATT domain,
> as it can be controlled outside linux??
The control to these domains is passed to firmware.
From my point of view these will never be used by Linux becuase:
- the PD_ISOVCC is where the CPU resides and it cannot cut itself its power
- the PD_VCC is a domain where critical IPs like CPG, SYSC resides
- the VBATT is where the RTC resides, RTC that should stay on forever
Should we document something that will be never used?
>
> Cheers,
> Biju
next prev parent reply other threads:[~2024-09-03 7:44 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 13:02 [PATCH v3 00/12] Add RTC support for the Renesas RZ/G3S SoC Claudiu
2024-08-30 13:02 ` [PATCH v3 01/12] dt-bindings: clock: renesas,r9a08g045-vbattb: Document VBATTB Claudiu
2024-08-30 17:46 ` Rob Herring
2024-08-30 22:06 ` Alexandre Belloni
2024-09-02 14:55 ` claudiu beznea
2024-09-03 6:58 ` Biju Das
2024-09-03 7:23 ` Geert Uytterhoeven
2024-09-03 7:25 ` Biju Das
2024-09-03 7:29 ` Biju Das
2024-09-03 7:28 ` claudiu beznea
2024-09-03 7:36 ` Biju Das
2024-09-03 7:40 ` Geert Uytterhoeven
2024-09-03 7:44 ` claudiu beznea [this message]
2024-09-03 7:51 ` Biju Das
2024-10-10 9:58 ` Geert Uytterhoeven
2024-10-10 10:08 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 02/12] dt-bindings: clock: r9a08g045-vbattb: Add clock IDs for the VBATTB controller Claudiu
2024-08-30 17:47 ` Rob Herring
2024-10-10 9:55 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 03/12] clk: linux/clk-provider.h: Add devm_clk_hw_register_gate_parent_hw() Claudiu
2024-10-10 10:00 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 04/12] clk: renesas: clk-vbattb: Add VBATTB clock driver Claudiu
2024-10-10 10:06 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 05/12] dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RTCA-3 IP Claudiu
2024-08-30 15:44 ` Rob Herring (Arm)
2024-10-10 9:29 ` Geert Uytterhoeven
2024-10-10 9:52 ` claudiu beznea
2024-10-10 15:31 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 06/12] rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC Claudiu
2024-08-30 22:25 ` Alexandre Belloni
2024-09-02 14:49 ` claudiu beznea
2024-09-02 20:28 ` Alexandre Belloni
2024-09-03 7:29 ` claudiu beznea
2024-09-03 16:09 ` claudiu beznea
2024-09-03 17:36 ` Alexandre Belloni
2024-10-17 10:45 ` Wolfram Sang
2024-10-17 10:51 ` Geert Uytterhoeven
2024-10-17 11:04 ` Wolfram Sang
2024-08-30 13:02 ` [PATCH v3 07/12] arm64: dts: renesas: r9a08g045: Add VBATTB node Claudiu
2024-09-03 19:48 ` Stephen Boyd
2024-09-04 12:17 ` claudiu beznea
2024-09-05 18:09 ` Stephen Boyd
2024-09-06 7:28 ` Geert Uytterhoeven
2024-09-06 23:01 ` Stephen Boyd
2024-09-09 12:11 ` Geert Uytterhoeven
2024-09-09 21:18 ` Stephen Boyd
2024-09-10 8:02 ` Geert Uytterhoeven
2024-10-10 15:17 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 08/12] arm64: dts: renesas: r9a08g045: Add RTC node Claudiu
2024-10-10 15:22 ` Geert Uytterhoeven
2024-10-11 10:28 ` claudiu beznea
2024-10-16 22:03 ` Alexandre Belloni
2024-10-17 7:57 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 09/12] arm64: dts: renesas: rzg3s-smarc-som: Enable VBATTB Claudiu
2024-10-10 15:28 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 10/12] arm64: dts: renesas: rzg3s-smarc-som: Enable RTC Claudiu
2024-10-10 15:28 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 11/12] arm64: defconfig: Enable VBATTB clock Claudiu
2024-10-10 15:29 ` Geert Uytterhoeven
2024-08-30 13:02 ` [PATCH v3 12/12] arm64: defconfig: Enable Renesas RTCA-3 flag Claudiu
2024-10-10 15:30 ` Geert Uytterhoeven
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=a1a665b9-05f1-43a8-88bc-2701cdd0e4ee@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).