Skip to content
Snippets Groups Projects
Commit 32ab13f8 authored by Troy Kisky's avatar Troy Kisky
Browse files

nitrogen8m: use common ddr files

parent 03e3191f
No related branches found
No related tags found
No related merge requests found
...@@ -8,5 +8,9 @@ obj-y += nitrogen8m.o mmc.o ...@@ -8,5 +8,9 @@ obj-y += nitrogen8m.o mmc.o
ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_BUILD
obj-y += spl.o obj-y += spl.o
ifdef CONFIG_IMX8M_LPDDR4
obj-y += lpddr4_timing.o
else
obj-y += ddr/ddr_init.o ddr/ddrphy_train.o ddr/helper.o obj-y += ddr/ddr_init.o ddr/ddrphy_train.o ddr/helper.o
endif endif
endif
This diff is collapsed.
...@@ -19,15 +19,23 @@ ...@@ -19,15 +19,23 @@
#include <asm/mach-imx/mxc_i2c.h> #include <asm/mach-imx/mxc_i2c.h>
#include <fsl_esdhc.h> #include <fsl_esdhc.h>
#include <mmc.h> #include <mmc.h>
#ifdef CONFIG_IMX8M_LPDDR4
#include <asm/arch/imx8m_ddr.h>
#else
#include "ddr/ddr.h" #include "ddr/ddr.h"
#include "ddr/ddr_memory_map.h" #include "ddr/ddr_memory_map.h"
#endif
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
void spl_dram_init(void) void spl_dram_init(void)
{ {
/* ddr init */ /* ddr init */
#ifdef CONFIG_IMX8M_LPDDR4
ddr_init(&lpddr4_timing);
#else
ddr_init(); ddr_init();
#endif
} }
#define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE) #define I2C_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
......
CONFIG_ARM=y CONFIG_ARM=y
CONFIG_ARCH_IMX8M=y CONFIG_ARCH_IMX8M=y
CONFIG_SYS_TEXT_BASE=0x40200000 CONFIG_SYS_TEXT_BASE=0x40200000
# CONFIG_IMX8M_LPDDR4=y
CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment