soc: arm: nxp_imx: add support for SMARTDMA for RT5xx

Add support for SMARTDMA to RT5xx SOCs. SMARTDMA ram banks will be
powered up, so code can be programmed into this region for the SMARTDMA
engine.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2023-04-05 17:11:44 +00:00 committed by Carles Cufí
parent 8d2f4633f2
commit 9e5188353e
2 changed files with 19 additions and 0 deletions

View file

@ -476,6 +476,15 @@
#io-channel-cells = <1>;
};
smartdma: dma@27020 {
compatible = "nxp,smartdma";
reg = <0x27020 0x1000>;
program-mem = <0x24100000>;
interrupts = <73 0>;
status = "disabled";
#dma-cells = <0>;
};
ctimer0: ctimer@28000 {
compatible = "nxp,lpc-ctimer";
reg = <0x28000 0x1000>;

View file

@ -364,6 +364,16 @@ static void clock_init(void)
RESET_PeripheralReset(kSDIO0_RST_SHIFT_RSTn);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(smartdma), okay) && CONFIG_DMA_MCUX_SMARTDMA
/* Power up SMARTDMA ram */
POWER_DisablePD(kPDRUNCFG_APD_SMARTDMA_SRAM);
POWER_DisablePD(kPDRUNCFG_PPD_SMARTDMA_SRAM);
POWER_ApplyPD();
RESET_ClearPeripheralReset(kSMART_DMA_RST_SHIFT_RSTn);
CLOCK_EnableClock(kCLOCK_Smartdma);
#endif
DT_FOREACH_STATUS_OKAY(nxp_lpc_ctimer, CTIMER_CLOCK_SETUP)
/* Set up dividers. */