Re: [PATCH v2 0/4] i2c/clk: spacemit: k1: fix I2C bus configuration and clock handling

Yao Zi <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <aoQBacTKiBXUDddj@pie>
On Sat, Aug 15, 2026 at 11:40:20AM +0800, Junhui Liu wrote:
> Fix two issues in the SpacemiT K1 I2C driver and clock provider.
> 
> The first issue is that the controller bus mode is selected using the
> functional clock rate instead of the requested I2C bus speed from the
> device tree.
> 
> The second issue is that the TWSI functional clocks incorrectly include
> the bus clock enable bit in their gate masks. As a result the I2C driver
> can operate with only the functional clock enabled, which diverges from
> the device tree description and the Linux driver (both expect separate
> "func" and "bus" clocks).
> 
> To fix the second issue without breaking intermediate states, the
> patches are ordered as follows:
> 
> - First add the missing bus clocks (and their parent chain) to the SPL
>   clock tree.
> - Then update the I2C driver to acquire and enable both the functional
>   and bus clocks by name.
> - Finally remove the bus gate bit from the functional clock definitions
>   (except TWSI8, whose write-only register requires the combined gate).

Personally I think it's okay to break booting in this case as long as
you explicitly point it out. Merging the conceptually related PATCH 2
and PATCH 4 which together fix description of TWSI controller clocks
would make the commit description shorter and clearer. But it depends on
you.

For the whole series,

Reviewed-by: Yao Zi <[email protected]>

Regards,
Yao Zi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.