imx: add i.MX8MN DDR3L evk board support
Subsystems (3)
PATCH v3 1/1 imx: add i.MX8MN DDR3L evk board support
Add the support for the 8MNANOD3L-EVK board. The board has an i.MX8MNano UltraLite Quad SoC and uses 1GB DDR3L memory.
U-Boot 2022.04-00011-gf0e15e3761 (Apr 06 2022 - 13:54:41 +0200)
CPU: Freescale i.MX8MNano UltraLite Quad rev1.0 at 1200 MHz Reset cause: WDOG Model: NXP i.MX8MNano DDR3L EVK board DRAM: 1 GiB Core: 56 devices, 18 uclasses, devicetree: separate WDT: Started watchdog@30280000 with servicing (60s timeout) MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@30890000 Out: serial@30890000 Err: serial@30890000
BuildInfo:
- ATF
Net: eth0: ethernet@30be0000
u-boot=>
---
v3:
- fix config option description in Kconfig (TARGET_IMX8MN_DDR3L_EVK)
v2:
- change license formatting (thanks Marcel)
arch/arm/dts/imx8mn-ddr3l-evk-u-boot.dtsi | 33 + arch/arm/dts/imx8mn-ddr3l-evk.dts | 114 +++ arch/arm/dts/imx8mn-u-boot.dtsi | 12 + arch/arm/mach-imx/imx8m/Kconfig | 7 + board/freescale/imx8mn_evk/Kconfig | 2 +- board/freescale/imx8mn_evk/Makefile | 1 + board/freescale/imx8mn_evk/ddr3l_timing.c | 943 ++++++++++++++++++++++ board/freescale/imx8mn_evk/spl.c | 9 + configs/imx8mn_ddr3l_evk_defconfig | 99 +++ include/configs/imx8mn_evk.h | 4 + 10 files changed, 1223 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx8mn-ddr3l-evk-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mn-ddr3l-evk.dts create mode 100644 board/freescale/imx8mn_evk/ddr3l_timing.c create mode 100644 configs/imx8mn_ddr3l_evk_defconfig
arch/arm/dts/imx8mn-ddr3l-evk-u-boot.dtsi new file +33 -0
@@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "imx8mn-u-boot.dtsi" + + +&{/soc@0} { + u-boot,dm-pre-reloc; + u-boot,dm-spl; +}; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-parents; + /delete-property/ assigned-clock-rates; +}; + +&i2c1 { + u-boot,dm-spl; +}; + +&{/soc@0/bus@30800000/i2c@30a20000/pmic@25} { + u-boot,dm-spl; +}; + +&{/soc@0/bus@30800000/i2c@30a20000/pmic@25/regulators} { + u-boot,dm-spl; +}; + +&wdog1 { + u-boot,dm-spl; +};
arch/arm/dts/imx8mn-ddr3l-evk.dts new file +114 -0
114 lines not on this page · raw message
arch/arm/dts/imx8mn-u-boot.dtsi +12 -0
@@ -151,6 +151,18 @@ size = <0x4000>; }; }; +#elif CONFIG_IMX8M_DDR3L +&u_boot_spl_ddr { + blob_1: blob-ext@1 { + filename = "ddr3_imem_1d.bin"; + size = <0x8000>; + }; + + blob_2: blob-ext@2 { + filename = "ddr3_dmem_1d.bin"; + size = <0x4000>; + }; +}; #else #error "no valid ddr config selected" #endif
arch/arm/mach-imx/imx8m/Kconfig +7 -0
@@ -99,6 +99,13 @@ config TARGET_IMX8MN_DDR4_EVK select SUPPORT_SPL select IMX8M_DDR4 +config TARGET_IMX8MN_DDR3L_EVK + bool "imx8mn DDR3L EVK board" + select BINMAN + select IMX8MN + select SUPPORT_SPL + select IMX8M_DDR3L + config TARGET_IMX8MN_VENICE bool "Support Gateworks Venice iMX8M Nano module" select BINMAN
board/freescale/imx8mn_evk/Kconfig +1 -1
@@ -1,4 +1,4 @@ -if TARGET_IMX8MN_EVK || TARGET_IMX8MN_DDR4_EVK +if TARGET_IMX8MN_EVK || TARGET_IMX8MN_DDR4_EVK || TARGET_IMX8MN_DDR3L_EVK config SYS_BOARD default "imx8mn_evk"
board/freescale/imx8mn_evk/Makefile +1 -0
@@ -14,5 +14,6 @@ obj-$(CONFIG_IMX8M_DDR4) += ddr4_timing_ld.o else obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o obj-$(CONFIG_IMX8M_DDR4) += ddr4_timing.o +obj-$(CONFIG_IMX8M_DDR3L) += ddr3l_timing.o endif endif
board/freescale/imx8mn_evk/ddr3l_timing.c new file +943 -0
943 lines not on this page · raw message
board/freescale/imx8mn_evk/spl.c +9 -0
@@ -78,6 +78,15 @@ int power_init_board(void)#ifdef CONFIG_IMX8MN_LOW_DRIVE_MODE /* Set VDD_SOC/VDD_DRAM to 0.8v for low drive mode */ pmic_reg_write (dev,PCA9450_BUCK1OUT_DVS0 ,0x10 ); +#elif defined(CONFIG_TARGET_IMX8MN_DDR3L_EVK ) +/* Set VDD_SOC to 0.85v for DDR3L at 1600MTS */ +pmic_reg_write (dev,PCA9450_BUCK1OUT_DVS0 ,0x14 ); + +/* Disable the BUCK2 */ +pmic_reg_write (dev,PCA9450_BUCK2CTRL ,0x48 ); + +/* Set NVCC_DRAM to 1.35v */ +pmic_reg_write (dev,PCA9450_BUCK6OUT ,0x1E );#else /* increase VDD_SOC/VDD_DRAM to typical value 0.95V before first DRAM access */ pmic_reg_write (dev,PCA9450_BUCK1OUT_DVS0 ,0x1C );
configs/imx8mn_ddr3l_evk_defconfig new file +99 -0
99 lines not on this page · raw message
include/configs/imx8mn_evk.h +4 -0
@@ -74,7 +74,11 @@#define CONFIG_SYS_SDRAM_BASE 0x40000000#define PHYS_SDRAM 0x40000000 +#ifdef CONFIG_TARGET_IMX8MN_DDR3L_EVK +#define PHYS_SDRAM_SIZE 0x40000000/* 1GB DDR */ +#else #define PHYS_SDRAM_SIZE 0x80000000/* 2GB DDR */ +#endif #define CONFIG_MXC_UART_BASE UART2_BASE_ADDR
Signature · 1 line
2.30.2
Hi Heiko,
Quoted 18 lines · Heiko Thiery
Add the support for the 8MNANOD3L-EVK board. The board has an i.MX8MNano UltraLite Quad SoC and uses 1GB DDR3L memory.
U-Boot 2022.04-00011-gf0e15e3761 (Apr 06 2022 - 13:54:41 +0200)
CPU: Freescale i.MX8MNano UltraLite Quad rev1.0 at 1200 MHz Reset cause: WDOG Model: NXP i.MX8MNano DDR3L EVK board DRAM: 1 GiB Core: 56 devices, 18 uclasses, devicetree: separate WDT: Started watchdog@30280000 with servicing (60s timeout) MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@30890000 Out: serial@30890000 Err: serial@30890000
Quoted 7 lines
BuildInfo:
- ATFNet: eth0: ethernet@30be0000
u-boot=>Signed-off-by Heiko Thiery <[email protected]>