public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] RTC: update APM X-Gene RTC driver by adding the pre-scaler support
@ 2024-04-12  8:01 wefu
  2024-04-12  8:01 ` [PATCH 1/5] drivers/rtc/rtc-xgene: Add prescaler support in APM X-Gene RTC driver wefu
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: wefu @ 2024-04-12  8:01 UTC (permalink / raw)
  To: jszhang, alexandre.belloni, robh, krzysztof.kozlowski+dt,
	conor+dt, guoren, paul.walmsley, palmer, aou
  Cc: linux-riscv, devicetree, linux-kernel, linux-rtc, Wei Fu

From: Wei Fu <wefu@redhat.com>

This patch add Counter Prescaler support in APM X-Gene RTC driver by
getting prescaler (Optional) property value from dtb. 

This hardware support can only be found in DW_apb_rtc after v2.06a.

And adds the optional property "prescaler" in bindings for APM X-Gene RTC.
Because 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.

This patch also add "snps,dw-apb-rtc" into the "compatible".

Since XuanTie TH1520 is using the same RTC, so this patch enables 
APM X-Gene RTC driver for XuanTie TH1520, and add a device node in 
the XuanTie TH1520 Soc dts: th1520.dtsi.

Wei Fu (5):
  drivers/rtc/rtc-xgene: Add prescaler support in APM X-Gene RTC driver
  dt-bindings: rtc: Add optional property "prescaler" in APM X-Gene RTC
    Document
  drivers/rtc/rtc-xgene: Add "snps,dw-apb-rtc" into the "compatible"
  Kconfig: Enable APM X-Gene RTC for XuanTie TH1520
  riscv: dts: thead: Add XuanTie TH1520 RTC device node

 .../devicetree/bindings/rtc/xgene-rtc.txt     | 16 ++++++++++
 arch/riscv/boot/dts/thead/th1520.dtsi         | 11 +++++++
 drivers/rtc/Kconfig                           | 12 ++++++-
 drivers/rtc/rtc-xgene.c                       | 32 +++++++++++++++++++
 4 files changed, 70 insertions(+), 1 deletion(-)

-- 
2.44.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-12  9:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12  8:01 [PATCH 0/5] RTC: update APM X-Gene RTC driver by adding the pre-scaler support wefu
2024-04-12  8:01 ` [PATCH 1/5] drivers/rtc/rtc-xgene: Add prescaler support in APM X-Gene RTC driver wefu
2024-04-12  8:23   ` Alexandre Belloni
2024-04-12  8:01 ` [PATCH 2/5] dt-bindings: rtc: Add optional property "prescaler" in APM X-Gene RTC Document wefu
2024-04-12  8:20   ` Alexandre Belloni
2024-04-12  8:01 ` [PATCH 3/5] drivers/rtc/rtc-xgene: Add "snps,dw-apb-rtc" into the "compatible" wefu
2024-04-12  9:17   ` Krzysztof Kozlowski
2024-04-12  9:39     ` Conor Dooley
2024-04-12  8:01 ` [PATCH 4/5] Kconfig: Enable APM X-Gene RTC for XuanTie TH1520 wefu
2024-04-12  9:47   ` Conor Dooley
2024-04-12  8:01 ` [PATCH 5/5] riscv: dts: thead: Add XuanTie TH1520 RTC device node wefu
2024-04-12  8:21   ` Alexandre Belloni
2024-04-12  9:19   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox