Commit 49625c6
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]>1 parent 1b72c59 commit 49625c6
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
331 | 337 | | |
332 | 338 | | |
333 | 339 | | |
| |||
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
| 421 | + | |
| 422 | + | |
415 | 423 | | |
416 | 424 | | |
417 | 425 | | |
| |||
896 | 904 | | |
897 | 905 | | |
898 | 906 | | |
| 907 | + | |
899 | 908 | | |
900 | 909 | | |
901 | 910 | | |
| |||
947 | 956 | | |
948 | 957 | | |
949 | 958 | | |
| 959 | + | |
950 | 960 | | |
951 | 961 | | |
952 | 962 | | |
| |||
0 commit comments