diff options
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile | 29 | ||||
-rw-r--r-- | arch/arm/mach-imx/cpu.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx8/Kconfig | 18 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx8/cpu.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx6/Kconfig | 18 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx6/opos6ul.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx7/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mx7/soc.c | 45 |
9 files changed, 118 insertions, 46 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index ec09ef240f..b6fd1595f0 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -29,7 +29,7 @@ config IMX_BOOTAUX config USE_IMXIMG_PLUGIN bool "Use imximage plugin code" - depends on ARCH_MX7 || ARCH_MX6 + depends on ARCH_MX7 || ARCH_MX6 || ARCH_MX7ULP help i.MX6/7 supports DCD and Plugin. Enable this configuration to use Plugin, otherwise DCD will be used. diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 37675d0558..898478fc4a 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -61,21 +61,6 @@ obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o obj-$(CONFIG_CMD_DEKBLOB) += cmd_dek.o endif -ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) -BOARD_SIZE_CHECK = \ - @actual=`wc -c $@ | awk '{print $$1}'`; \ - limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ - if test $$actual -gt $$limit; then \ - echo "$@ exceeds file size limit:" >&2 ; \ - echo " limit: $$limit bytes" >&2 ; \ - echo " actual: $$actual bytes" >&2 ; \ - echo " excess: $$((actual - limit)) bytes" >&2; \ - exit 1; \ - fi -else -BOARD_SIZE_CHECK = -endif - PLUGIN = board/$(BOARDDIR)/plugin ifeq ($(CONFIG_USE_IMXIMG_PLUGIN),y) @@ -107,7 +92,9 @@ IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%) ifeq ($(CONFIG_ARCH_IMX8), y) CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh IMAGE_TYPE := imx8image +ifeq ($(CONFIG_SPL_BUILD),y) SPL_DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o spl/u-boot-spl.cfgout $(srctree)/$(IMX_CONFIG); if [ -f spl/u-boot-spl.cfgout ]; then $(CNTR_DEPFILES) spl/u-boot-spl.cfgout; echo $$?; fi) +endif DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o u-boot-dtb.cfgout $(srctree)/$(IMX_CONFIG); if [ -f u-boot-dtb.cfgout ]; then $(CNTR_DEPFILES) u-boot-dtb.cfgout; echo $$?; fi) else ifeq ($(CONFIG_ARCH_IMX8M), y) IMAGE_TYPE := imx8mimage @@ -124,9 +111,17 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE $(call if_changed,mkimage) - $(BOARD_SIZE_CHECK) -ifeq ($(CONFIG_OF_SEPARATE),y) +ifeq ($(CONFIG_MULTI_DTB_FIT),y) +MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ + -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE) +u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log + +u-boot-dtb.imx: u-boot-fit-dtb.bin u-boot-dtb.cfgout $(PLUGIN).bin FORCE +ifeq ($(DEPFILE_EXISTS),0) + $(call if_changed,mkimage) +endif +else ifeq ($(CONFIG_OF_SEPARATE),y) MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \ -T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE) u-boot-dtb.imx: MKIMAGEOUTPUT = u-boot-dtb.imx.log diff --git a/arch/arm/mach-imx/cpu.c b/arch/arm/mach-imx/cpu.c index 6b83f92662..d62ff6ef25 100644 --- a/arch/arm/mach-imx/cpu.c +++ b/arch/arm/mach-imx/cpu.c @@ -285,7 +285,7 @@ u32 get_ahb_clk(void) void arch_preboot_os(void) { -#if defined(CONFIG_PCIE_IMX) +#if defined(CONFIG_PCIE_IMX) && !CONFIG_IS_ENABLED(DM_PCI) imx_pcie_remove(); #endif #if defined(CONFIG_SATA) @@ -298,7 +298,7 @@ void arch_preboot_os(void) /* disable video before launching O/S */ ipuv3_fb_shutdown(); #endif -#if defined(CONFIG_VIDEO_MXS) +#if defined(CONFIG_VIDEO_MXS) && !defined(CONFIG_DM_VIDEO) lcdif_power_down(); #endif } diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index c32f7dbb61..bbe323d5ca 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -27,8 +27,13 @@ choice prompt "i.MX8 board select" optional -config TARGET_IMX8QXP_MEK - bool "Support i.MX8QXP MEK board" +config TARGET_APALIS_IMX8 + bool "Support Apalis iMX8 module" + select BOARD_LATE_INIT + select IMX8QM + +config TARGET_COLIBRI_IMX8X + bool "Support Colibri iMX8X module" select BOARD_LATE_INIT select IMX8QXP @@ -37,9 +42,16 @@ config TARGET_IMX8QM_MEK select BOARD_LATE_INIT select IMX8QM +config TARGET_IMX8QXP_MEK + bool "Support i.MX8QXP MEK board" + select BOARD_LATE_INIT + select IMX8QXP + endchoice -source "board/freescale/imx8qxp_mek/Kconfig" source "board/freescale/imx8qm_mek/Kconfig" +source "board/freescale/imx8qxp_mek/Kconfig" +source "board/toradex/apalis-imx8/Kconfig" +source "board/toradex/colibri-imx8x/Kconfig" endif diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c index 53f9a8735a..f2fa262ac8 100644 --- a/arch/arm/mach-imx/imx8/cpu.c +++ b/arch/arm/mach-imx/imx8/cpu.c @@ -11,6 +11,7 @@ #include <dm/lists.h> #include <dm/uclass.h> #include <errno.h> +#include <thermal.h> #include <asm/arch/sci/sci.h> #include <asm/arch/sys_proto.h> #include <asm/arch-imx/cpu.h> @@ -573,15 +574,50 @@ const char *get_core_name(void) return "?"; } +#if IS_ENABLED(CONFIG_IMX_SCU_THERMAL) +static int cpu_imx_get_temp(void) +{ + struct udevice *thermal_dev; + int cpu_tmp, ret; + + ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal0", + &thermal_dev); + + if (!ret) { + ret = thermal_get_temp(thermal_dev, &cpu_tmp); + if (ret) + return 0xdeadbeef; + } else { + return 0xdeadbeef; + } + + return cpu_tmp; +} +#else +static int cpu_imx_get_temp(void) +{ + return 0; +} +#endif + int cpu_imx_get_desc(struct udevice *dev, char *buf, int size) { struct cpu_imx_platdata *plat = dev_get_platdata(dev); + int ret; if (size < 100) return -ENOSPC; - snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz\n", - plat->type, plat->rev, plat->name, plat->freq_mhz); + ret = snprintf(buf, size, "NXP i.MX8%s Rev%s %s at %u MHz", + plat->type, plat->rev, plat->name, plat->freq_mhz); + + if (IS_ENABLED(CONFIG_IMX_SCU_THERMAL)) { + buf = buf + ret; + size = size - ret; + ret = snprintf(buf, size, " at %dC", cpu_imx_get_temp()); + } + + snprintf(buf + ret, size - ret, "\n"); return 0; } @@ -623,8 +659,10 @@ static ulong imx8_get_cpu_rate(void) { ulong rate; int ret; + int type = is_cortex_a35() ? SC_R_A35 : is_cortex_a53() ? + SC_R_A53 : SC_R_A72; - ret = sc_pm_get_clock_rate(-1, SC_R_A35, SC_PM_CLK_CPU, + ret = sc_pm_get_clock_rate(-1, type, SC_PM_CLK_CPU, (sc_pm_clock_rate_t *)&rate); if (ret) { printf("Could not read CPU frequency: %d\n", ret); diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index f513c4c06f..fe5991e7c6 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -455,6 +455,18 @@ config TARGET_PCL063 select DM_THERMAL select SUPPORT_SPL +config TARGET_PCL063_ULL + bool "PHYTEC PCL063 (phyCORE-i.MX6ULL)" + select MX6ULL + select DM + select DM_ETH + select DM_GPIO + select DM_I2C + select DM_MMC + select DM_SERIAL + select DM_THERMAL + select SUPPORT_SPL + config TARGET_SECOMX6 bool "secomx6 boards" @@ -498,8 +510,8 @@ config TARGET_UDOO_NEO select SUPPORT_SPL imply CMD_DM -config TARGET_SAMTEC_VINING_2000 - bool "samtec VIN|ING 2000" +config TARGET_SOFTING_VINING_2000 + bool "Softing VIN|ING 2000" select BOARD_LATE_INIT select DM select DM_THERMAL @@ -580,7 +592,7 @@ source "board/phytec/pfla02/Kconfig" source "board/phytec/pcl063/Kconfig" source "board/gateworks/gw_ventana/Kconfig" source "board/kosagi/novena/Kconfig" -source "board/samtec/vining_2000/Kconfig" +source "board/softing/vining_2000/Kconfig" source "board/liebherr/display5/Kconfig" source "board/liebherr/mccmon6/Kconfig" source "board/logicpd/imx6/Kconfig" diff --git a/arch/arm/mach-imx/mx6/opos6ul.c b/arch/arm/mach-imx/mx6/opos6ul.c index 94a3d71201..264fa8a48e 100644 --- a/arch/arm/mach-imx/mx6/opos6ul.c +++ b/arch/arm/mach-imx/mx6/opos6ul.c @@ -192,6 +192,8 @@ struct mx6_ddr_sysinfo ddr_sysinfo = { .sde_to_rst = 0x10, /* 14 cycles, 200us (JEDEC default) */ .rst_to_cke = 0x23, /* 33 cycles, 500us (JEDEC default) */ .ddr_type = DDR_TYPE_DDR3, + .refsel = 1, /* Refresh cycles at 32KHz */ + .refr = 7, /* 8 refreshes commands per refresh cycle */ }; static struct mx6_ddr3_cfg mem_ddr = { diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c index 8cda71cf55..e364b162d9 100644 --- a/arch/arm/mach-imx/mx7/clock.c +++ b/arch/arm/mach-imx/mx7/clock.c @@ -53,7 +53,7 @@ static u32 get_ipg_clk(void) u32 imx_get_uartclk(void) { - return get_root_clk(UART1_CLK_ROOT); + return get_root_clk(UART_CLK_ROOT); } u32 imx_get_fecclk(void) diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 7cfdff0981..1b4bbc5037 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -164,15 +164,6 @@ u32 __weak get_board_rev(void) } #endif -#ifndef CONFIG_SKIP_LOWLEVEL_INIT -/* enable all periherial can be accessed in nosec mode */ -static void init_csu(void) -{ - int i = 0; - for (i = 0; i < CSU_NUM_REGS; i++) - writel(CSU_INIT_SEC_LEVEL0, CSU_IPS_BASE_ADDR + i * 4); -} - static void imx_enet_mdio_fixup(void) { struct iomuxc_gpr_base_regs *gpr_regs = @@ -191,6 +182,26 @@ static void imx_enet_mdio_fixup(void) } } +static void init_cpu_basic(void) +{ + imx_enet_mdio_fixup(); + +#ifdef CONFIG_APBH_DMA + /* Start APBH DMA */ + mxs_dma_init(); +#endif +} + +#ifndef CONFIG_SKIP_LOWLEVEL_INIT +/* enable all periherial can be accessed in nosec mode */ +static void init_csu(void) +{ + int i = 0; + + for (i = 0; i < CSU_NUM_REGS; i++) + writel(CSU_INIT_SEC_LEVEL0, CSU_IPS_BASE_ADDR + i * 4); +} + static void imx_gpcv2_init(void) { u32 val, i; @@ -269,12 +280,7 @@ int arch_cpu_init(void) /* Disable PDE bit of WMCR register */ imx_wdog_disable_powerdown(); - imx_enet_mdio_fixup(); - -#ifdef CONFIG_APBH_DMA - /* Start APBH DMA */ - mxs_dma_init(); -#endif + init_cpu_basic(); #if CONFIG_IS_ENABLED(IMX_RDC) isolate_resource(); @@ -286,6 +292,13 @@ int arch_cpu_init(void) return 0; } +#else +int arch_cpu_init(void) +{ + init_cpu_basic(); + + return 0; +} #endif #ifdef CONFIG_ARCH_MISC_INIT @@ -369,7 +382,7 @@ void s_init(void) void reset_misc(void) { #ifndef CONFIG_SPL_BUILD -#ifdef CONFIG_VIDEO_MXS +#if defined(CONFIG_VIDEO_MXS) && !defined(CONFIG_DM_VIDEO) lcdif_power_down(); #endif #endif |