Skip to content

Commit 80bf13c

Browse files
mwallealexandrebelloni
authored andcommitted
rtc: sun6i: disable automatic clock input switching
The V3(s) will detect a valid external low frequency clock and if it is not present will automatically switch to the internal one. This might hide bugs and (hardware) configuration errors. It's even worse because the internal RTC runs significantly slower (32.000Hz vs 32.768Hz). Fortunately for us, the V3(s) has an (undocumented) bypass of this switching and the driver already supports it by setting the .has_auto_swt flag. Signed-off-by: Michael Walle <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 0cfd26c commit 80bf13c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/rtc/rtc-sun6i.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ CLK_OF_DECLARE_DRIVER(sun8i_r40_rtc_clk, "allwinner,sun8i-r40-rtc",
402402
static const struct sun6i_rtc_clk_data sun8i_v3_rtc_data = {
403403
.rc_osc_rate = 32000,
404404
.has_out_clk = 1,
405+
.has_auto_swt = 1,
405406
};
406407

407408
static void __init sun8i_v3_rtc_clk_init(struct device_node *node)

0 commit comments

Comments
 (0)