Hello Yao Zi, Junhui Liu,
On 18.08.26 08:53, Yao Zi wrote:
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 me the series is okay now, if you (Junhui Liu) have not prepared a
v3 with the merge Yao Zi explained already ... I will pick v2 up for next...
Please give me feedback, what you plan, thanks!
For the whole series,
Reviewed-by: Yao Zi <[email protected]>
Thanks!
bye,
Heiko
Regards,
Yao Zi
--
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic