[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240412082000279430d0@mail.local>
Date: Fri, 12 Apr 2024 10:20:00 +0200
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: wefu@...hat.com
Cc: jszhang@...nel.org, robh@...nel.org, krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org, guoren@...nel.org, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu,
linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-rtc@...r.kernel.org
Subject: Re: [PATCH 2/5] dt-bindings: rtc: Add optional property "prescaler"
in APM X-Gene RTC Document
On 12/04/2024 16:01:44+0800, wefu@...hat.com wrote:
> From: Wei Fu <wefu@...hat.com>
>
> Add optional property "prescaler" for APM X-Gene RTC.
> The clock source on some platform to RTC is NOT 1HZ,
> so we need to prescale the clock to make the input clock become 1HZ,
> like (32K/prescaler) = 1HZ on the XuanTie TH1520 AP sub-system RTC.
>
> Signed-off-by: Wei Fu <wefu@...hat.com>
> ---
> .../devicetree/bindings/rtc/xgene-rtc.txt | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt
> index fd195c358446..25ba8cf0cc31 100644
> --- a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt
> +++ b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt
> @@ -10,6 +10,9 @@ Required properties:
> - #clock-cells: Should be 1.
> - clocks: Reference to the clock entry.
>
> +Optional properties:
> +- prescaler: Reference to the Value of Counter Prescaler.
What about getting the input clock rate and calculate the needed
prescaler instead of having it in the device tree?
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists