ram: stm32mp1: Add STM32MP13xx support
authorMarek Vasut <marek.vasut@mailbox.org>
Mon, 12 May 2025 17:09:05 +0000 (19:09 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 11 Jun 2025 07:42:56 +0000 (09:42 +0200)
commit447d1bd05acbfb155abe66514d71629f11fb3927
treeb04cac97e3eae75c7a96f7f64089790271b9f9d0
parent0298696b1efcbaf05317e5559bdc99cbac36293c
ram: stm32mp1: Add STM32MP13xx support

Add support for configuring DRAM controller on STM32MP13xx SoC.
The DRAM controller is basically identical to the DWC controller
on STM32MP15xx SoC, except the bus width is reduced from 32bit to
16bit and a few registers and bits are therefore not present.

Handle the difference by factoring these parts out. Use IS_ENABLE()
as much as possible to assure code which is not enabled on builds
for a single SoC gets compiled out. Handle the different offset of
RCC_DDRITFCR register and missing DDRC2 clock the same way.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
drivers/ram/stm32mp1/stm32mp1_ddr.c
drivers/ram/stm32mp1/stm32mp1_ddr.h
drivers/ram/stm32mp1/stm32mp1_ram.c