From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Conor Dooley <conor@kernel.org>
Cc: geert+renesas@glider.be, mturquette@baylibre.com,
sboyd@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, lee@kernel.org,
alexandre.belloni@bootlin.com, magnus.damm@gmail.com,
linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 02/12] dt-bindings: clock: renesas,rzg3s-vbattb-clk: Document the VBATTB clock driver
Date: Tue, 18 Jun 2024 10:34:03 +0300 [thread overview]
Message-ID: <0a4ba0e5-3fb1-4ffc-b2d8-a4eb418707eb@tuxon.dev> (raw)
In-Reply-To: <20240617-subsoil-creed-04bf5f13d081@spud>
On 17.06.2024 18:19, Conor Dooley wrote:
> On Mon, Jun 17, 2024 at 10:02:47AM +0300, claudiu beznea wrote:
>>
>>
>> On 15.06.2024 15:17, Conor Dooley wrote:
>>> On Fri, Jun 14, 2024 at 10:19:22AM +0300, Claudiu wrote:
>>>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>
>>>> The VBATTB IP of the Renesas RZ/G3S SoC controls the clock that feeds
>>>> the RTC and the tamper detector. Add documentation for the VBATTB clock
>>>> driver.
>>>>
>>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>> ---
>>>> .../clock/renesas,rzg3s-vbattb-clk.yaml | 90 +++++++++++++++++++
>>>> 1 file changed, 90 insertions(+)
>>>> create mode 100644 Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml b/Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml
>>>> new file mode 100644
>>>> index 000000000000..ef52a0c0f874
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/clock/renesas,rzg3s-vbattb-clk.yaml
>>>> @@ -0,0 +1,90 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/clock/renesas,rzg3s-vbattb-clk.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Renesas VBATTB clock
>>>> +
>>>> +maintainers:
>>>> + - Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>> +
>>>> +description:
>>>> + Renesas VBATTB module is an always on powered module (backed by battery) which
>>>> + generates a clock (VBATTCLK). This clocks feeds the RTC and the tamper detector
>>>> + modules.
>>>> +
>>>> +properties:
>>>> + compatible:
>>>> + const: renesas,rzg3s-vbattb-clk
>>>> +
>>>> + reg:
>>>> + maxItems: 1
>>>> +
>>>> + clocks:
>>>> + items:
>>>> + - description: VBATTB module clock
>>>> + - description: VBATTB input xtal
>>>> +
>>>> + clock-names:
>>>> + items:
>>>> + - const: bclk
>>>> + - const: vbattb_xtal
>>>> +
>>>> + '#clock-cells':
>>>> + const: 0
>>>> +
>>>> + power-domains:
>>>> + maxItems: 1
>>>> +
>>>> + renesas,vbattb-load-nanofarads:
>>>> + description: load capacitance of the on board xtal
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> + enum: [ 4000, 7000, 9000, 12500 ]
>>>> +
>>>> + renesas,vbattb-osc-bypass:
>>>> + description: set when external clock is connected to RTXOUT pin
>>>> + type: boolean
>>>
>>> When you say "external clock", is that an input or an output?
>>
>> I took that statement from the HW manual. As of the HW manual [1], table
>> 42.2, that would be an input.
>
> Forgive me for not wanting to open the zip etc and find the information
> in the document, but why do you need an extra property? Is it not
> something you can determine from the clocks/clock-names properties?
It can't be determined from clocks/clock-names as of my understanding. It
depends on the type of the input clock (crystal oscillator or external
hardware device generating the clock).
> It sounds like an additional clock from your description, is it actually
> different way to provide the second clock you mention above?
This is the block diagram (see [1], only picture this time) of the module
controlling the clock. Please open it, it helps in understanding what I'll
explain above.
The VBATTB blocks controlling the VBATTBCLK are:
- 32KHz-clock oscillator
- the mux controlled by BKSCCR.SOSEL
- the gate who's input is the mux output and XOSCCR.OUTEN
To the 32 KHz-clock oscillator block could be connected:
1/ either a crystal oscillator in which case it will be connected to both
RTXIN and RTXOUT pins (the direction of RTXOUT is wrong in this picture for
this case)
2/ or a device (like [2]) generating a clock which has a single output and,
from my understanding and experience with devices like this, only RTXIN is
needed, RTXOUT is connected to the ground; for this case the 32KHz-clock
oscillator block from [1] need to be bypassed in which case the newly
introduced property will be used; this will select the XBYP on the mux.
Thank you,
Claudiu Beznea
[1] https://pasteboard.co/QYsCvhfQlX6n.png
[2]
https://ro.mouser.com/datasheet/2/268/DSC1001_3_4_1_8V_3_3V_Low_Power_Precision_CMOS_Osc-3314582.pdf
>
>>
>> [1]
>> https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzg3s-general-purpose-microprocessors-single-core-arm-cortex-a55-11-ghz-cpu-and-dual-core-cortex-m33-250
>>
next prev parent reply other threads:[~2024-06-18 7:34 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 7:19 [PATCH 00/12] Add RTC support for the Renesas RZ/G3S SoC Claudiu
2024-06-14 7:19 ` [PATCH 01/12] clk: renesas: r9a08g045: Add clock, reset and power domain support for the VBATTB IP Claudiu
2024-06-26 12:09 ` Geert Uytterhoeven
2024-06-14 7:19 ` [PATCH 02/12] dt-bindings: clock: renesas,rzg3s-vbattb-clk: Document the VBATTB clock driver Claudiu
2024-06-15 12:17 ` Conor Dooley
2024-06-17 7:02 ` claudiu beznea
2024-06-17 15:19 ` Conor Dooley
2024-06-18 7:34 ` claudiu beznea [this message]
2024-06-18 7:56 ` Geert Uytterhoeven
2024-06-18 8:11 ` claudiu beznea
2024-06-16 7:38 ` Krzysztof Kozlowski
2024-06-17 7:34 ` claudiu beznea
2024-06-14 7:19 ` [PATCH 03/12] dt-bindings: mfd: renesas,rzg3s-vbattb: Document VBATTB Claudiu
2024-06-15 12:19 ` Conor Dooley
2024-06-17 7:04 ` claudiu beznea
2024-06-16 7:38 ` Krzysztof Kozlowski
2024-06-17 7:16 ` claudiu beznea
2024-06-17 7:25 ` claudiu beznea
2024-06-17 8:10 ` Krzysztof Kozlowski
2024-06-14 7:19 ` [PATCH 04/12] clk: renesas: clk-vbattb: Add VBATTB clock driver Claudiu
2024-06-15 22:25 ` kernel test robot
2024-06-16 0:19 ` kernel test robot
2024-06-14 7:19 ` [PATCH 05/12] dt-bindings: rtc: renesas,rzg3s-rtc: Document the Renesas RZ/G3S RTC Claudiu
2024-06-14 7:53 ` Biju Das
2024-06-14 8:16 ` claudiu beznea
2024-06-14 8:22 ` Biju Das
2024-06-15 12:16 ` Conor Dooley
2024-06-15 12:20 ` Conor Dooley
2024-06-17 7:19 ` claudiu beznea
2024-06-17 15:17 ` Conor Dooley
2024-06-16 7:40 ` Krzysztof Kozlowski
2024-06-17 7:24 ` claudiu beznea
2024-06-14 7:19 ` [PATCH 06/12] rtc: renesas-rtca3: Add driver for RTCA-3 available on Renesas RZ/G3S SoC Claudiu
2024-06-14 7:51 ` Biju Das
2024-06-14 9:21 ` Alexandre Belloni
2024-06-14 11:06 ` claudiu beznea
2024-06-17 7:25 ` Alexandre Belloni
2024-06-17 7:31 ` claudiu beznea
2024-07-16 8:01 ` claudiu beznea
2024-06-14 7:19 ` [PATCH 07/12] arm64: dts: renesas: r9a08g045: Add VBATTB node Claudiu
2024-06-14 7:19 ` [PATCH 08/12] arm64: dts: renesas: r9a08g045: Add RTC node Claudiu
2024-06-14 7:19 ` [PATCH 09/12] arm64: dts: renesas: rzg3s-smarc-som: Enable VBATTB clock Claudiu
2024-06-14 7:19 ` [PATCH 10/12] arm64: dts: renesas: rzg3s-smarc-som: Enable RTC Claudiu
2024-06-14 7:19 ` [PATCH 11/12] arm64: defconfig: Enable VBATTB clock flag Claudiu
2024-06-14 7:19 ` [PATCH 12/12] arm64: defconfig: Enable Renesas RTCA-3 flag Claudiu
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=0a4ba0e5-3fb1-4ffc-b2d8-a4eb418707eb@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=lee@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=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).