Re: [PATCH 0/7] rtc: sun6i: Add support for Allwinner A733 SoC
From: Junhui Liu
Date: Wed Feb 25 2026 - 07:03:06 EST
Hi Jernej,
Thanks for your review.
On Sun Feb 22, 2026 at 6:41 PM CST, Jernej Škrabec wrote:
> Hi!
>
> Dne sreda, 21. januar 2026 ob 11:59:06 Srednjeevropski standardni čas je Junhui Liu napisal(a):
>> Add support for the Allwinner A733 RTC and its internal Clock Control
>> Unit (CCU). Reuse the rtc-sun6i rtc driver while introducing a new
>> SoC-specific RTC CCU driver to handle the hardware's evolved clock
>> structure.
>>
>> To facilitate this addition and improve driver modularity, transition
>> the binding between the RTC and its internal CCU from direct
>> cross-subsystem function calls to the auxiliary bus. Also extract shared
>> IOSC and 32kHz clock logic into a standalone ccu_rtc module for reuse
>> across newer SoC generations.
>>
>> The A733 implementation supports hardware detection of three external
>> crystal frequencies (19.2MHz, 24MHz and 26MHz), which is represented in
>> the driver via read-only mux operations. Implement logic to derive a
>> normalized 32kHz reference from these DCXO sources using fixed
>> pre-dividers. Additionally, provide several new DCXO gate clocks for
>> peripherals, including SerDes, HDMI, and UFS.
>
> This work looks nice, but I have some questions/comments:
> - you're missing RTC SPI clock, which is needed for RTC, at least according
> to vendor 5.15 DT. Could it be that this bit set by vendor U-Boot so you
> missed it during testing? Manual says that it's disabled by default.
You're right! I tried disabling the RTC SPI clock in U-Boot and found
that the output of UART became garbled during booting kernel. I will add
it in the next version.
> - Vendor DT has strange RTC CCU phandles for UFS and HDMI. In first case
> uses RTC wakeup and in second DCXO, which doesn't make any sense. Did you
> do any experimentation with these clocks? It wouldn't be the first time
> that either code or manual contained some kind of error.
Regarding UFS, I am still working on getting UFS functional on the
mainline kernel. I will investigate the actual relationship between the
RTC wakeup clock and UFS during this process.
As for HDMI, I believe it actually requires the hosc_hdmi_clk
(DCXO_HDMI_GATING in the manual) provided by the RTC module.
>
> Btw, switch last two patches. With current order during bisection you would
> get a complaint that A733 RTC CCU driver is not present.
Okay, I will do it.
>
> Best regards,
> Jernej
--
Best regards,
Junhui Liu