Re: [PATCH v6 3/8] clk: sunxi-ng: a733: Add PRCM CCU
From: Junhui Liu
Date: Sun Nov 08 2026 - 23:56:08 EST
Hi Enzo,
On Tue Nov 3, 2026 at 9:33 AM CST, Enzo Adriano wrote:
> Hi Junhui,
>
> On Fri, Oct 09, 2026 at 11:52:08PM +0800, Junhui Liu wrote:
>> +static SUNXI_CCU_P_DATA_WITH_MUX_GATE(r_cpu_timer0, "r-timer0", r_apb_parents, 0x100,
>> + 1, 3, /* P */
>> + 4, 3, /* mux */
>> + BIT(0), /* gate */
>> + 0);
>
> On a Cubie A7S with vendor boot firmware, v6 reaches a Linux shell but
> stalls at warm reboot. The system-controller firmware uses the R-domain
> timer and mailboxes without Linux clock consumers, so disabling these
> clocks as unused can leave its services unavailable.
>
> Could you consider marking r-timer0, bus-r-timer, bus-r-riscv and
> bus-r-msgbox here, and bus-msgbox0 in 7/8, CLK_IS_CRITICAL in the next
> revision? My standalone patch has the diff, firmware references and
> board results:
> https://lore.kernel.org/r/20261031020640-263f7b05-a7s-clock@xxxxxxxxx
I'd prefer not to mark these clocks as critical just for the vendor
firmware. You can see my reply in v5:
https://lore.kernel.org/linux-sunxi/DLYAHDTH3129.3AYF0OSHL8RJ8@xxxxxxxxxxxxx/
Since you've already submitted a separate patch adding these critical
flags, I'll leave that to you. If the maintainers agree that these
clocks should be marked critical, your patch can be picked up.
>
> With those five flags, two RAM boots of my A7S integration completed
> warm reboots without clk_ignore_unused, and all five clocks reported
> enabled. That is one board on vendor firmware. Vinicius reported native
> PSCI reboot working on an A7Z without local critical flags on
> bus-r-riscv and bus-r-msgbox, with TF-A and U-Boot built from source, so
> the boot chain may matter. I haven't tested suspend, or shown that each
> of the five flags is needed on its own.
>
> Thanks,
> Enzo
--
Best regards,
Junhui Liu