Created attachment 212825 [details] Use external or internal clock source Tested on stable r359316 PB, BBB The RTC on AM335x are used in the shutdown process of the system. Current code assumes it exists an external 32kHz clock source and configure register RTC_OSC_REG with bit RTC_OSC_REG set [1]. PocketBeagle doent have a external clock as a consequence it cant power down correctly. Attached patch check if RTC contains a clock [2] it assumes its an external clock otherwise an internal clock source. Maybe a better solution is to check the name of the clocks if it contains "ext-clk" as defined in sys/gnu/dts/arm/am335x-bone-common.dtsi (used by BBB) [1] ch 20.3.5.19 http://www.ti.com/lit/ug/spruh73q/spruh73q.pdf [2] Documentation/devicetree/bindings/rtc/rtc-omap.txt
Since we have no proper clock support on AM33XX I think it would be better the at least check the clock names and do the proper thing based on if ext-clk/int-clk is present. This will not break if pocketbeagle dts is updated to include the internal clock.
Hi Oskar, Is this bug still relevant after your clock driver ? Thanks,
(In reply to Emmanuel Vadot from comment #2) Yes, i will update with new code.
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
^Triage: bring this PR up to modern standards. To submitter: is this PR still relevant?