summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/imx8m/soc.c33
-rw-r--r--board/freescale/imx8mn_evk/Kconfig4
-rw-r--r--board/freescale/imx8mn_evk/spl.c8
-rw-r--r--configs/imx8mn_ddr4_evk_nom_defconfig74
4 files changed, 119 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 65ecb90c65..c4144f8140 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -710,6 +710,39 @@ usb_modify_speed:
disable_cpu_nodes(blob, 2);
else if (is_imx8mms() || is_imx8mmsl())
disable_cpu_nodes(blob, 3);
+
+#elif defined(CONFIG_IMX8MN)
+
+#ifdef CONFIG_IMX8MN_FORCE_NOM_SOC
+ /* Disable the DVFS by removing 1.4Ghz and 1.5Ghz operating-points*/
+ int rc;
+ int nodeoff;
+ static const char * const nodes_path = "/cpus/cpu@0";
+ u32 val[] = {1200000, 850000};
+
+ nodeoff = fdt_path_offset(blob, nodes_path);
+ if (nodeoff < 0) {
+ printf("Unable to find node %s, err=%s\n",
+ nodes_path, fdt_strerror(nodeoff));
+ return nodeoff;
+ }
+
+ printf("Found %s node\n", nodes_path);
+
+ val[0] = cpu_to_fdt32(val[0]);
+ val[1] = cpu_to_fdt32(val[1]);
+ rc = fdt_setprop(blob, nodeoff, "operating-points", &val, 2 * sizeof(u32));
+ if (rc) {
+ printf("Unable to update operating-points for node %s, err=%s\n",
+ nodes_path, fdt_strerror(rc));
+ return rc;
+ }
+
+ printf("Update %s:%s\n", nodes_path,
+ "operating-points");
+
+#endif /* CONFIG_IMX8MN_FORCE_NOM_SOC */
+
#endif
return ft_add_optee_node(blob, bd);
diff --git a/board/freescale/imx8mn_evk/Kconfig b/board/freescale/imx8mn_evk/Kconfig
index 38ac846802..5a16a8c6bb 100644
--- a/board/freescale/imx8mn_evk/Kconfig
+++ b/board/freescale/imx8mn_evk/Kconfig
@@ -9,6 +9,10 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "imx8mn_evk"
+config IMX8MN_FORCE_NOM_SOC
+ bool "Force to use nominal mode for SOC and ARM"
+ default n
+
source "board/freescale/common/Kconfig"
endif
diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
index 7d4b371b6b..835053f5f2 100644
--- a/board/freescale/imx8mn_evk/spl.c
+++ b/board/freescale/imx8mn_evk/spl.c
@@ -161,8 +161,16 @@ int power_init_board(void)
/* unlock the PMIC regs */
pmic_reg_write(p, BD71837_REGLOCK, 0x1);
+#ifdef CONFIG_IMX8MN_FORCE_NOM_SOC
+ /* increase VDD_ARM to typical value 0.85v for 1.2Ghz */
+ pmic_reg_write(p, BD71837_BUCK2_VOLT_RUN, 0xf);
+
+ /* increase VDD_SOC/VDD_DRAM to typical value 0.85v for nominal mode */
+ pmic_reg_write(p, BD71837_BUCK1_VOLT_RUN, 0xf);
+#else
/* increase VDD_SOC/VDD_DRAM to typical value 0.95v for 3Ghz DDRs */
pmic_reg_write(p, BD71837_BUCK1_VOLT_RUN, 0x19);
+#endif
#ifdef CONFIG_IMX8M_DDR4
/* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */
diff --git a/configs/imx8mn_ddr4_evk_nom_defconfig b/configs/imx8mn_ddr4_evk_nom_defconfig
new file mode 100644
index 0000000000..7a77bb00f1
--- /dev/null
+++ b/configs/imx8mn_ddr4_evk_nom_defconfig
@@ -0,0 +1,74 @@
+CONFIG_ARM=y
+CONFIG_ARCH_IMX8M=y
+CONFIG_SYS_TEXT_BASE=0x40200000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_USB_TCPC=y
+CONFIG_TARGET_IMX8MN_EVK=y
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,SPL_TEXT_BASE=0x912000"
+CONFIG_FIT=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_ARCH_MISC_INIT=y
+CONFIG_SPL=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_OF_LIBFDT=y
+CONFIG_FS_FAT=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8mn-ddr4-evk"
+CONFIG_DEFAULT_FDT_FILE="fsl-imx8mn-ddr4-evk.dtb"
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_OF_CONTROL=y
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FSL_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x42800000
+CONFIG_FASTBOOT_BUF_SIZE=0x40000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MXC=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_PMIC=y
+CONFIG_EFI_PARTITION=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_DM_ETH=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX8M=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SPI=y
+CONFIG_FSL_FSPI=y
+CONFIG_NXP_TMU=y
+CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+
+CONFIG_USB_GADGET_MANUFACTURER="FSL"
+CONFIG_USB_GADGET_VENDOR_NUM=0x0525
+CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
+
+CONFIG_VIDEO=y
+CONFIG_IMX_SEC_MIPI_DSI=y
+
+CONFIG_SPL_IMX_ROMAPI_SUPPORT=y
+CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
+
+CONFIG_IMX8MN_FORCE_NOM_SOC=y