diff options
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/cpu.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx6/Kconfig | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx7/Kconfig | 1 |
4 files changed, 50 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index cd8b8d2882..e687048b31 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -1,3 +1,6 @@ +config HAS_CAAM + bool + config IMX_CONFIG string @@ -28,7 +31,7 @@ config USE_IMXIMG_PLUGIN config SECURE_BOOT bool "Support i.MX HAB features" depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX5 - select FSL_CAAM + select FSL_CAAM if HAS_CAAM imply CMD_DEKBLOB help This option enables the support for secure boot (HAB). @@ -61,3 +64,11 @@ config CMD_HDMIDETECT help This enables the 'hdmidet' command which detects if an HDMI monitor is connected. + +config NXP_BOARD_REVISION + bool "Read NXP board revision from fuses" + depends on ARCH_MX6 || ARCH_MX7 + help + NXP boards based on i.MX6/7 contain the board revision information + stored in the fuses. Select this option if you want to be able to + retrieve the board revision information. diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index 18205dc984..a32ab87e9b 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -323,3 +323,28 @@ void set_chipselect_size(int const cs_size) writel(reg, &iomuxc_regs->gpr[1]); } + +#ifdef CONFIG_NXP_BOARD_REVISION +int nxp_board_rev(void) +{ + /* + * Get Board ID information from OCOTP_GP1[15:8] + * RevA: 0x1 + * RevB: 0x2 + * RevC: 0x3 + */ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = &ocotp->bank[4]; + struct fuse_bank4_regs *fuse = + (struct fuse_bank4_regs *)bank->fuse_regs; + + return (readl(&fuse->gp1) >> 8 & 0x0F); +} + +char nxp_board_rev_string(void) +{ + const char *rev = "A"; + + return (*rev + nxp_board_rev() - 1); +} +#endif diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index bee7eabe02..58ee20a8b6 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -14,28 +14,34 @@ config MX6 imply CMD_FUSE config MX6D + select HAS_CAAM select MX6_SMP bool config MX6DL + select HAS_CAAM select MX6_SMP bool config MX6Q + select HAS_CAAM select MX6_SMP bool config MX6QDL + select HAS_CAAM select MX6_SMP bool config MX6S + select HAS_CAAM bool config MX6SL bool config MX6SX + select HAS_CAAM select ROM_UNIFIED_SECTIONS bool @@ -44,6 +50,7 @@ config MX6SLL bool config MX6UL + select HAS_CAAM select SYS_L2CACHE_OFF select ROM_UNIFIED_SECTIONS bool @@ -66,8 +73,9 @@ config MX6UL_OPOS6UL select SUPPORT_SPL config MX6ULL + select SYS_L2CACHE_OFF + select ROM_UNIFIED_SECTIONS bool - select MX6UL config MX6_DDRCAL bool "Include dynamic DDR calibration routines" @@ -244,6 +252,7 @@ config TARGET_MX6SABRESD config TARGET_MX6SLEVK bool "mx6slevk" + select MX6SL select SUPPORT_SPL config TARGET_MX6SLLEVK @@ -255,6 +264,7 @@ config TARGET_MX6SLLEVK config TARGET_MX6SXSABRESD bool "mx6sxsabresd" + select BOARD_LATE_INIT select MX6SX select SUPPORT_SPL select DM @@ -395,6 +405,7 @@ config TARGET_WANDBOARD config TARGET_WARP bool "WaRP" + select MX6SL select BOARD_LATE_INIT config TARGET_XPRESS diff --git a/arch/arm/mach-imx/mx7/Kconfig b/arch/arm/mach-imx/mx7/Kconfig index 365501d518..4f8b4e138e 100644 --- a/arch/arm/mach-imx/mx7/Kconfig +++ b/arch/arm/mach-imx/mx7/Kconfig @@ -10,6 +10,7 @@ config MX7 default y config MX7D + select HAS_CAAM select ROM_UNIFIED_SECTIONS imply CMD_FUSE bool |