ASoC: stm32: sai: add stm32mp25 support
authorOlivier Moysan <olivier.moysan@foss.st.com>
Thu, 7 Nov 2024 15:51:42 +0000 (16:51 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 8 Nov 2024 13:32:45 +0000 (13:32 +0000)
commit2cfe1ff22555717bf63526f9e6ea096dde13cc59
treef3d5311e523582e976be20d5912b900e4e9b1f9f
parent8509bb1f11a1fed710271631c2e06fd66452f510
ASoC: stm32: sai: add stm32mp25 support

Add STM32MP25 support for STM32 SAI.

On STM32MP25 the SAI driver does not manage SAI kernel clock rate
by chosing its parent clock, dependending on audio stream rate.

The driver requests a rate change on SAI kernel clock instead.
This rate change is performed with the following guidelines:
- Chose highest rate multiple of the audio stream
  (Try to get clock accuracy within 1000 ppm)
- Ensure clock rate compatibility between SAI sub-blocks A&B
  and between instances sharing the same flexgen.
  Use clk_rate_exclusive API to fulfill this requirement.

The STM32 SAI peripheral does not support the DMA burst mode
on STM32MP25. Add a field in compatible structure to manage DMA
burst support capability.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241107155143.1340523-3-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai.c
sound/soc/stm/stm32_sai.h
sound/soc/stm/stm32_sai_sub.c