[PATCH] clk: rockchip: rk3568: Add PCIe pipe clock gates
Shawn Lin
shawn.lin at rock-chips.com
Fri Mar 6 04:05:43 PST 2026
Hi Heiko,
在 2026/03/06 星期五 18:52, Heiko Stuebner 写道:
> Hi Shawn,
>
> Am Donnerstag, 5. März 2026, 09:06:51 Mitteleuropäische Normalzeit schrieb Shawn Lin:
>> The PCIe pipe clocks are currently left as orphan clocks and remain
>> enabled indefinitely, which is suboptimal. Add the missing clock gates
>> so the PCIe driver can explicitly manage them when not in use.
>>
>> Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
>> ---
>> Hi Heiko,
>>
>> This patch should be considered only after David's patch[1] is merged,
>> otherwise it breaks PCIe on RK3566/RK3568 due to clk_disable_unused().
>
> This would also break compatiblity with old devicetrees.
>
> The devicetree used by the kernel can also be embedded for example
> in an already installed u-boot and handed to the kernel from there.
> You cannot expect board devicetrees and the kernel image to be updated
> in lockstep.
Indeed.
>
> We also sort of guarantee this backwards compatiblity - old DTB with
> newer kernel.
>
> The solution is to add a CLK_IGNORE_UNUSED flag (but not CLK_IS_CRITICAL)
> to the newly added gate.
>
Thanks, will improve it.
> This lets the clock stay and keeps the original behavious on old DTBs,
> but also allows the PCIe driver in newer kernels to turn off the clock
> if it wants to.
>
> Thanks
> Heiko
>
>
>
>
More information about the Linux-rockchip
mailing list