[PATCH 0/6] mmc: mmci: stm32: add STM32MP21 SDMMC address remapping support

Christophe Kerello christophe.kerello at foss.st.com
Tue Dec 1 08:18:39 PST 2026


On STM32MP21, the DDR is mapped at 0x80000000 from the CPU point of view,
while the SDMMC IDMA can only issue 32-bit addresses, so only the first
2 GB of the DDR can be reached. The SYSCFG area dedicated to each SDMMC
instance provides an address remapping register (ARCR) which shifts the
view of the SDMMC so that the whole 4 GB of the DDR becomes reachable.

This series adds the st,stm32mp21-sdmmc2 compatible, which identifies the
presence of ARCR, and makes the driver use the dma-ranges of the SoC bus
to find where the DDR starts as seen by the SDMMC, and enable (or disable)
the remapping accordingly.

 - Patch 1 relaxes the "reg" size constraint of arm,pl18x when
   arm,primecell-periphid is set, as the SDMMC window of the STM32MP2
   SoCs is 0x400 bytes long.
 - Patch 2 adds the STM32MP21 compatible and describes the "reg" entries.
 - Patches 3 to 5 are preparatory: they introduce a private structure for
   the SDMMC variants and let the variant init callback report an error,
   so that the probe can fail when a resource needed by a variant is
   missing.
 - Patch 6 handles the address remapping on STM32MP21.

Signed-off-by: Christophe Kerello <christophe.kerello at foss.st.com>
---
Christophe Kerello (6):
      dt-bindings: mmc: arm,pl18x: Relax the reg size when the periphid is set
      dt-bindings: mmc: mmci: Add STM32MP21 compatible
      mmc: mmci: stm32: introduce a private structure for the SDMMC variants
      mmc: mmci: allow variant init to return an error
      mmc: mmci: stm32: fail the probe if the private structure can't be allocated
      mmc: mmci: stm32: handle address remapping on STM32MP21

 .../devicetree/bindings/mmc/arm,pl18x.yaml         |  28 ++++-
 drivers/mmc/host/mmci.c                            |  25 ++--
 drivers/mmc/host/mmci.h                            |  10 +-
 drivers/mmc/host/mmci_qcom_dml.c                   |   4 +-
 drivers/mmc/host/mmci_stm32_sdmmc.c                | 134 ++++++++++++++++++---
 5 files changed, 168 insertions(+), 33 deletions(-)
---
base-commit: 10485a3e61bcc427aee52ce73dfc2739b59bcb16
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next
change-id: 20261201-stm32mp21-sdmmc-remap-aed95e0ed502

Best regards,
--  
Christophe Kerello <christophe.kerello at foss.st.com>




More information about the linux-arm-kernel mailing list