From 7d9c6f1781be08512703aa1aa2f6bb9b17b7150f Mon Sep 17 00:00:00 2001 From: Jesse Taube Date: Tue, 26 Jul 2022 01:43:44 -0400 Subject: [PATCH] RAM: Add changes for i.MXRT11xx series The i.MXRT11 series has different offsets for IOCR_MUX, it also can address 64MiB of SDRAM so add a macro for that. Signed-off-by: Jesse Taube --- drivers/ram/imxrt_sdram.c | 9 +++++++++ include/dt-bindings/memory/imxrt-sdram.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c index ca2eec767d..d0a88845cf 100644 --- a/drivers/ram/imxrt_sdram.c +++ b/drivers/ram/imxrt_sdram.c @@ -87,12 +87,21 @@ struct imxrt_semc_regs { u32 sts[16]; }; +#if !defined(TARGET_IMXRT1170_EVK) #define SEMC_IOCR_MUX_A8_SHIFT 0 #define SEMC_IOCR_MUX_CSX0_SHIFT 3 #define SEMC_IOCR_MUX_CSX1_SHIFT 6 #define SEMC_IOCR_MUX_CSX2_SHIFT 9 #define SEMC_IOCR_MUX_CSX3_SHIFT 12 #define SEMC_IOCR_MUX_RDY_SHIFT 15 +#else +#define SEMC_IOCR_MUX_A8_SHIFT 0 +#define SEMC_IOCR_MUX_CSX0_SHIFT 4 +#define SEMC_IOCR_MUX_CSX1_SHIFT 8 +#define SEMC_IOCR_MUX_CSX2_SHIFT 12 +#define SEMC_IOCR_MUX_CSX3_SHIFT 16 +#define SEMC_IOCR_MUX_RDY_SHIFT 20 +#endif struct imxrt_sdram_mux { u8 a8; diff --git a/include/dt-bindings/memory/imxrt-sdram.h b/include/dt-bindings/memory/imxrt-sdram.h index acb35bce27..4b3b0c2f50 100644 --- a/include/dt-bindings/memory/imxrt-sdram.h +++ b/include/dt-bindings/memory/imxrt-sdram.h @@ -82,6 +82,7 @@ #define MEM_WIDTH_8BITS 0x0 #define MEM_WIDTH_16BITS 0x1 +#define MEM_WIDTH_32BITS 0x2 #define BL_1 0x0 #define BL_2 0x1 -- 2.39.5