Skip to content

Commit 7aa8781

Browse files
committed
clk: sunxi-ng: sun6i-rtc: Add A523 specifics
The A523's RTC block is backward compatible with the R329's, but it also has a calibration function for its internal oscillator, which would allow it to provide a clock rate closer to the desired 32.768 KHz. This is useful on the Radxa Cubie A5E, which does not have an external 32.768 KHz crystal. Add new compatible-specific data for it. Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://patch.msgid.link/20250909170947.2221611-1-wens@kernel.org Signed-off-by: Chen-Yu Tsai <wens@csie.org>
1 parent 8f5ae30 commit 7aa8781

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/clk/sunxi-ng/ccu-sun6i-rtc.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,13 @@ static const struct sun6i_rtc_match_data sun50i_r329_rtc_ccu_data = {
325325
.osc32k_fanout_nparents = ARRAY_SIZE(sun50i_r329_osc32k_fanout_parents),
326326
};
327327

328+
static const struct sun6i_rtc_match_data sun55i_a523_rtc_ccu_data = {
329+
.have_ext_osc32k = true,
330+
.have_iosc_calibration = true,
331+
.osc32k_fanout_parents = sun50i_r329_osc32k_fanout_parents,
332+
.osc32k_fanout_nparents = ARRAY_SIZE(sun50i_r329_osc32k_fanout_parents),
333+
};
334+
328335
static const struct of_device_id sun6i_rtc_ccu_match[] = {
329336
{
330337
.compatible = "allwinner,sun50i-h616-rtc",
@@ -334,6 +341,10 @@ static const struct of_device_id sun6i_rtc_ccu_match[] = {
334341
.compatible = "allwinner,sun50i-r329-rtc",
335342
.data = &sun50i_r329_rtc_ccu_data,
336343
},
344+
{
345+
.compatible = "allwinner,sun55i-a523-rtc",
346+
.data = &sun55i_a523_rtc_ccu_data,
347+
},
337348
{},
338349
};
339350
MODULE_DEVICE_TABLE(of, sun6i_rtc_ccu_match);

0 commit comments

Comments
 (0)