2023-06-12 11:52 PM
Hi,
I'm looking into creating sound cards with STM32MP135F-DK discovery board, and it seems that all the tutorials point to editing the /core/arch/arm/dts/stm32mp135f-dk.dts so that it takes the new sound card into account. Previously I had a chance to work with Raspberry Pi and there it's not uncommon to have multiple .dts files handling different things.
Is it possible to define a sound card in a separate file from the main board.dts also on the stm32 MPUs, or is it really a necessity to append to the the main file? If so, how?
2023-06-12 11:57 PM
HI @Antoni Jankowski ,
as far as I know, you could add as many 'include' as you want in dts files.
https://wiki.st.com/stm32mpu/wiki/STM32_MPU_device_tree
For instance: https://github.com/STMicroelectronics/u-boot/blob/v2021.10-stm32mp/arch/arm/dts/stm32mp135f-dk.dts
Regards.
2023-06-13 12:04 AM
Shall I then include the stm32mp135f-dk.dts in my soundcard.dts file or the other way? The soundcard.dts has to use the i2s nodes, so my intuition tells me that the latter is correct.
2023-06-13 01:09 AM
If you are using an STM32MP135F-DK board, I think easier way is to #include your own dts 'adds' in existing stm32mp135f-dk.dts file.
In other way, you could define a new myboard.dts with all your wished additional settings and #include the stm32mp135f-dk.dts in it, but I guess this will require to modify some compilation script and configuration files to use a new myboard.dtb file name.
I'm not expert and if you did not reach a working solution, feel free to continue this thread or better open a new one with details of encountered issues.
Regards.
2023-06-13 02:21 AM
Can you maybe provide an example of I2S-only based soundcard device tree configuration? The codec I want to use is rather simple, similar to PCM5102a, however the set up still isn't clear. The examples seem to mostly rely on sai bus.
2023-06-13 02:42 AM
We use I2S on STM32MP157F-DK2 for audio output on HDMI chipset (SiI9022).
https://github.com/STMicroelectronics/u-boot/blob/v2021.10-stm32mp/arch/arm/dts/stm32mp15xx-dkx.dtsi
If possible on your board, we recommend using SAI as it is likely more flexible than SPI/I2S as fully tailored for audio purposes.
Regards.