summaryrefslogtreecommitdiff
path: root/rust/kernel/xarray.rs
diff options
context:
space:
mode:
authorTroy Mitchell <troy.mitchell@linux.spacemit.com>2025-09-11 11:34:05 +0800
committerStephen Boyd <sboyd@kernel.org>2025-09-19 22:54:46 -0700
commit519cff1d85694cbdf33b27591740e7e37348e6b4 (patch)
tree114cdeff7da85933e44e401b40927757d0b97881 /rust/kernel/xarray.rs
parent74246a820c817f195f6191e370c3df98d2df5d91 (diff)
clk: spacemit: fix i2s clock
Defining i2s_bclk and i2s_sysclk as fixed-rate clocks is insufficient for real I2S use cases. Moreover, the current I2S clock configuration does not work as expected due to missing parent clocks. This patch adds the missing parent clocks, defines i2s_sysclk as a DDN clock, and i2s_bclk as a DIV clock. A special note for i2s_bclk: From the register definition, the i2s_bclk divider always implies an additional 1/2 factor. The following table shows the correspondence between index and frequency division coefficients: | index | div | |-------|-------| | 0 | 2 | | 1 | 4 | | 2 | 6 | | 3 | 8 | From a software perspective, introducing i2s_bclk_factor as the parent of i2s_bclk is sufficient to address the issue. The I2S-related clock registers can be found here [1]. Link: https://developer.spacemit.com/documentation?token=LCrKwWDasiJuROkVNusc2pWTnEb [1] Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC") Co-developer: Jinmei Wei <weijinmei@linux.spacemit.com> Suggested-by: Haylen Chu <heylenay@4d2.org> Signed-off-by: Jinmei Wei <weijinmei@linux.spacemit.com> Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'rust/kernel/xarray.rs')
0 files changed, 0 insertions, 0 deletions