mirror-linux/include/soc
Troy Mitchell 519cff1d85
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: 1b72c59db0 ("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>
2025-09-19 22:54:46 -07:00
..
amlogic reset: amlogic: aux: drop aux registration helper 2025-01-15 17:59:31 +01:00
arc arc: rename aux.h to arc_aux.h 2024-12-10 10:12:56 -08:00
at91 ARM: at91: Remove unused extern declarations 2023-07-29 16:56:09 +03:00
bcm2835 clk: bcm: rpi: Add disp clock 2025-01-16 13:27:12 -08:00
canaan
fsl soc: fsl_qbman: use be16_to_cpu() in qm_sg_entry_get_off() 2024-11-04 18:44:43 -08:00
imx clk: imx25: print silicon revision during init 2023-08-14 12:41:05 +03:00
mediatek iommu/mediatek: Add enable IOMMU SMC command for INFRA masters 2023-08-07 14:15:48 +02:00
microchip clk, reset: microchip: mpfs: fix incorrect preprocessor conditions 2024-05-08 18:38:12 -07:00
mscc net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
nuvoton reset: npcm: register npcm8xx clock auxiliary bus device 2024-10-17 15:17:51 -07:00
qcom soc: qcom: spmi-pmic: add more PMIC SUBTYPE IDs 2025-07-16 22:58:03 -05:00
rockchip soc: rockchip: add header for suspend mode SIP interface 2025-02-13 14:47:48 +01:00
sa1100
sifive
spacemit clk: spacemit: fix i2s clock 2025-09-19 22:54:46 -07:00
starfive clk: starfive: Avoid casting iomem pointers 2023-04-13 15:45:46 -07:00
tegra firmware: tegra: bpmp: Fix typo in bpmp-abi.h 2025-03-06 20:02:26 +01:00