linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BD71847 clk driver disables clk-32k-out causing RTC/WDT failure
@ 2022-09-01 22:23 Tim Harvey
  2022-09-02  4:14 ` Matti Vaittinen
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Harvey @ 2022-09-01 22:23 UTC (permalink / raw)
  To: linux-clk, open list, Fabio Estevam, Shawn Guo
  Cc: NXP Linux Team, Stephen Boyd, Matti Vaittinen, Michael Turquette

Greetings,

I've found that the bd71847 clk driver (CONFIG_COMMON_CLK_BD718XX
drivers/clk/clk-bd718x7.c) disables clk-32k-out (the BD71847 C32K_OUT
pin) which is connected IMX8MM RTC_XTALI which ends up disabling the
IMX RTC as well as the IMX WDOG functionality.

You can see this with:
# cat /sys/kernel/debug/clk/clk-32k-out/clk_rate
32768
# cat /sys/kernel/debug/clk/clk-32k-out/clk_enable_count
0
# cat /sys/class/rtc/rtc0/name
snvs_rtc 30370000.snvs:snvs-rtc-lp
# cat /sys/class/rtc/rtc0/time
00:00:03
^^^ time never changes

This happens via clk_unprepare_unused() as nothing is flagging the
clk-32k-out as being used. What should be added to the device-tree to
signify that this clk is indeed necessary and should not be disabled?

Best Regards,

Tim

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

end of thread, other threads:[~2022-09-13 18:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 22:23 BD71847 clk driver disables clk-32k-out causing RTC/WDT failure Tim Harvey
2022-09-02  4:14 ` Matti Vaittinen
2022-09-08 16:00   ` Tim Harvey
2022-09-08 16:55     ` Marek Vasut
2022-09-08 19:25       ` Tim Harvey
2022-09-08 20:39         ` Marek Vasut
2022-09-09  2:06           ` Peng Fan
2022-09-09  2:35             ` Marek Vasut
2022-09-09  5:06               ` Matti Vaittinen
2022-09-12  7:40                 ` Peng Fan
2022-09-12 17:15                   ` Tim Harvey
2022-09-12 20:40                     ` Matti Vaittinen
2022-09-13  2:27                       ` Peng Fan
2022-09-13 15:21                         ` Sebastian Reichel
2022-09-13 17:01                           ` Matti Vaittinen
2022-09-13  2:30                     ` Peng Fan
2022-09-09  6:56               ` Peng Fan
2022-09-09  7:01                 ` Peng Fan

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).