Re: [PATCH v2 0/4] i2c/clk: spacemit: k1: fix I2C bus configuration and clock handling
Heiko Schocher <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <[email protected]> |
Hello Junhui Liu, On 24.08.26 16:21, Junhui Liu wrote: > Hi Heiko, > Thanks for checking. > > On Mon Aug 24, 2026 at 4:21 PM CST, Heiko Schocher wrote: >> 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! > > I don't plan to send a v3. I think the current structure and patch > ordering in v2 are fine, so please feel free to pick it up. thanks for clarifying. I will add it to next, as the fixes you reference to, are there. > Thanks to you and Yao Zi for the review. You are welcome! bye, Heiko > >> >>> 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