diff options
| author | Haylen Chu <[email protected]> | 2025-04-16 13:54:04 +0000 |
|---|---|---|
| committer | Yixun Lan <[email protected]> | 2025-04-16 19:22:56 +0000 |
| commit | 49625c6e4d90a9221127c49a11eb8c95732bb690 (patch) | |
| tree | d55ceb438055bbd99becb49d2e435898749eb02c /rust/helpers/platform.c | |
| parent | clk: spacemit: Add clock support for SpacemiT K1 SoC (diff) | |
| download | kernel-49625c6e4d90a9221127c49a11eb8c95732bb690.tar.gz kernel-49625c6e4d90a9221127c49a11eb8c95732bb690.zip | |
clk: spacemit: k1: Add TWSI8 bus and function clocks
The control register for TWSI8 clocks, APBC_TWSI8_CLK_RST, contains mux
selection bits, reset assertion bit and enable bits for function and bus
clocks. It has a quirk that reading always results in zero.
As a workaround, let's hardcode the mux value as zero to select
pll1_d78_31p5 as parent and treat twsi8_clk as a gate, whose enable mask
is combined from the real bus and function clocks to avoid the
write-only register being shared between two clk_hws, in which case
updates of one clk_hw zero the other's bits.
With a 1:1 factor serving as placeholder for the bus clock, the I2C-8
controller could be brought up, which is essential for boards attaching
power-management chips to it.
Signed-off-by: Haylen Chu <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Reviewed-by: Yixun Lan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Yixun Lan <[email protected]>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions
