From fe7b2b322ec49ab3c78494054f15e23ad5256fc9 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:04:56 +0100 Subject: apalis-imx8: implement pcb version and soc variant handling Implement PCB version and SoC variant handling which automatically loads the correct device tree for the Linux kernel. Signed-off-by: Marcel Ziswiler Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 73d8d245a96..a8b2b0774fe 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -38,8 +38,7 @@ "boot_script_dhcp=boot.scr\0" \ "console=ttyLP1 earlycon\0" \ "fdt_addr=0x83000000\0" \ - "fdt_file=fsl-imx8qm-apalis-eval.dtb\0" \ - "fdtfile=fsl-imx8qm-apalis-eval.dtb\0" \ + "fdt_board=eval\0" \ "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ "initrd_addr=0x83800000\0" \ "initrd_high=0xffffffffffffffff\0" \ -- cgit v1.2.3 From 73b8c05221aae5c0fac978909bf263d77673754e Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Mon, 16 Jan 2023 20:05:02 +0100 Subject: apalis/colibri-imx8/8x: remove global variable script The distroboot script system scans boot_scripts variable and try to find and use to boot each script name mentioned there. Setting global variable "script" breaks this general mechanism of searching and running a distro boot script. Remove global variables "script" to fix working the general distro boot script mechanism. Signed-off-by: Oleksandr Suvorov Signed-off-by: Marcel Ziswiler Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 1 - include/configs/colibri-imx8x.h | 1 - 2 files changed, 2 deletions(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index a8b2b0774fe..df431261306 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -47,7 +47,6 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ "panel=NULL\0" \ - "script=boot.scr\0" \ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ "if test \"$confirm\" = \"y\"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 2de116c59da..3ec36aa773e 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -77,7 +77,6 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ "panel=NULL\0" \ - "script=boot.scr\0" \ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ "if test \"$confirm\" = \"y\"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ -- cgit v1.2.3 From b3d41fb8aea8069a8a0dedf6072cb658dc591015 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:05:06 +0100 Subject: apalis-imx8: introduce setup setting setupargs Introduce setup setting setupargs and move earlycon there. Signed-off-by: Marcel Ziswiler Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index df431261306..4043a8c7d42 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -36,7 +36,7 @@ MEM_LAYOUT_ENV_SETTINGS \ "boot_file=Image\0" \ "boot_script_dhcp=boot.scr\0" \ - "console=ttyLP1 earlycon\0" \ + "console=ttyLP1\0" \ "fdt_addr=0x83000000\0" \ "fdt_board=eval\0" \ "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ @@ -47,6 +47,8 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ "panel=NULL\0" \ + "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ + "consoleblank=0 earlycon\0" \ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ "if test \"$confirm\" = \"y\"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ -- cgit v1.2.3 From d48827e323465bb0524a2b9ece2307bd34d77288 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:05:04 +0100 Subject: apalis-imx8: remove obsolete sdhc related config defines Remove obsolete SDHC related config defines. Nowadays, all SDHC related hardware configuration comes from the device tree. Signed-off-by: Marcel Ziswiler Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 4043a8c7d42..6b0541f1d84 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -9,10 +9,6 @@ #include #include -#define CFG_SYS_FSL_ESDHC_ADDR 0 -#define USDHC1_BASE_ADDR 0x5b010000 -#define USDHC2_BASE_ADDR 0x5b020000 - /* Networking */ #define MEM_LAYOUT_ENV_SETTINGS \ @@ -55,11 +51,6 @@ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \ "${blkcnt}; fi\0" -/* Link Definitions */ - -/* On Apalis iMX8 USDHC1 is eMMC, USDHC2 is 8-bit and USDHC3 is 4-bit MMC/SD */ -#define CFG_SYS_FSL_USDHC_NUM 3 - #define CFG_SYS_SDRAM_BASE 0x80000000 #define PHYS_SDRAM_1 0x80000000 #define PHYS_SDRAM_2 0x880000000 -- cgit v1.2.3 From b2f2ee3e7ba5c9c7060648f1c19fb15b1deca547 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:05:05 +0100 Subject: apalis-imx8: remove obsolete net usb start Remove obsolete net USB start. While at it also add a comment about enabling distro-boot. Signed-off-by: Marcel Ziswiler Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 6b0541f1d84..5d1ee490fb0 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -17,14 +17,13 @@ "ramdisk_addr_r=0x94400000\0" \ "scriptaddr=0x87000000\0" +/* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 2) \ func(MMC, mmc, 0) \ func(DHCP, dhcp, na) #include -#undef BOOTENV_RUN_NET_USB_START -#define BOOTENV_RUN_NET_USB_START "" /* Initial environment variables */ #define CFG_EXTRA_ENV_SETTINGS \ -- cgit v1.2.3 From 49db56852f01dcd1dc92127389b3ca16de664e8f Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:05:07 +0100 Subject: apalis-imx8: drop obsolete environment variables Drop obsolete environment variables fdt_addr, finduuid, boot_file, mmcargs, mmcdev, mmcpart and panel. Signed-off-by: Marcel Ziswiler Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 5d1ee490fb0..a54e0185552 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -29,19 +29,11 @@ #define CFG_EXTRA_ENV_SETTINGS \ BOOTENV \ MEM_LAYOUT_ENV_SETTINGS \ - "boot_file=Image\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttyLP1\0" \ - "fdt_addr=0x83000000\0" \ "fdt_board=eval\0" \ - "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ "initrd_addr=0x83800000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=PARTUUID=${uuid} rootwait " \ - "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ - "mmcpart=1\0" \ - "panel=NULL\0" \ "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ "consoleblank=0 earlycon\0" \ "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ -- cgit v1.2.3 From 8930143e87c607af7430f871fa1c8e249e2fe6a4 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:05:08 +0100 Subject: apalis-imx8: update update_uboot confirmation message Update update_uboot confirmation message. Signed-off-by: Marcel Ziswiler Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index a54e0185552..0c37aa7e384 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -36,7 +36,7 @@ "initrd_high=0xffffffffffffffff\0" \ "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ "consoleblank=0 earlycon\0" \ - "update_uboot=askenv confirm Did you load u-boot-dtb.imx (y/N)?; " \ + "update_uboot=askenv confirm Did you load flash.bin resp. u-boot-dtb.imx (y/N)?; " \ "if test \"$confirm\" = \"y\"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ "${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 " \ -- cgit v1.2.3 From a9f1e35bedc4ed0ce62b3eceddfe8ffbef12a44f Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 16 Jan 2023 20:05:09 +0100 Subject: apalis-imx8: update env memory layout Update the distro config env memory layout for the Apalis iMX8 aka QuadMax: - kernel_comp_addr_r=0xf0000000 temporary area for uncompressing (ie FIT images or Image.gz booted using booti) - kernel_comp_size=0x08000000 - loadaddr=0x95400000 avoiding any reserved areas located before that - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Basic idea of memory layout taken from commit fd5c7173ade4 ("imx8m{m,n}_venice: update env memory layout"). However, moved past any reserved areas to avoid any kind of conflicts. Note that for our regular BSP Layers and Reference Images for Yocto Project an updated distro boot script is required (see meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot). Signed-off-by: Marcel Ziswiler Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 0c37aa7e384..9eedf36b41e 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -12,10 +12,12 @@ /* Networking */ #define MEM_LAYOUT_ENV_SETTINGS \ - "fdt_addr_r=0x84000000\0" \ - "kernel_addr_r=0x82000000\0" \ - "ramdisk_addr_r=0x94400000\0" \ - "scriptaddr=0x87000000\0" + "fdt_addr_r=0x9d400000\0" \ + "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ + "kernel_comp_addr_r=0xf0000000\0" \ + "kernel_comp_size=0x08000000\0" \ + "ramdisk_addr_r=0x9d500000\0" \ + "scriptaddr=0x9d480000\0" /* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \ -- cgit v1.2.3 From baa7550c14156f9dda65e0c3267f35a0dfc3cf10 Mon Sep 17 00:00:00 2001 From: Andrejs Cainikovs Date: Mon, 16 Jan 2023 20:05:14 +0100 Subject: apalis-imx8: add M4 boot environment helpers Add M4 boot environment functions for reference. Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Reviewed-by: Fabio Estevam --- include/configs/apalis-imx8.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 9eedf36b41e..845705c86db 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -19,6 +19,15 @@ "ramdisk_addr_r=0x9d500000\0" \ "scriptaddr=0x9d480000\0" +/* Boot M4 */ +#define M4_BOOT_ENV \ + "m4_0_image=m4_0.bin\0" \ + "m4_1_image=m4_1.bin\0" \ + "loadm4image_0=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \ + "loadm4image_1=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_1_image}\0" \ + "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \ + "m4boot_1=run loadm4image_1; dcache flush; bootaux ${loadaddr} 1\0" \ + /* Enable Distro Boot */ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ @@ -30,6 +39,7 @@ /* Initial environment variables */ #define CFG_EXTRA_ENV_SETTINGS \ BOOTENV \ + M4_BOOT_ENV \ MEM_LAYOUT_ENV_SETTINGS \ "boot_script_dhcp=boot.scr\0" \ "console=ttyLP1\0" \ -- cgit v1.2.3 From 910c7a881f5b64dc92d3ba9232ce59ae54fd6486 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 9 Dec 2022 20:35:46 +0100 Subject: pmic: pca9450: Make warm reset on WDOG_B assertion The default configuration of the PMIC behavior makes the PMIC power cycle most regulators on WDOG_B assertion. This power cycling causes the memory contents of OCRAM to be lost. Some systems neeeds some memory that survives reset and reboot, therefore this patch is created. The implementation is taken almost verbatim from Linux commit 2364a64d0673f ("regulator: pca9450: Make warm reset on WDOG_B assertion") Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Reviewed-by: Peng Fan --- include/power/pca9450.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/power/pca9450.h b/include/power/pca9450.h index fa0405fcb87..6efecee96c8 100644 --- a/include/power/pca9450.h +++ b/include/power/pca9450.h @@ -67,4 +67,8 @@ enum { #define PCA9450_LDO34_MASK 0x1f #define PCA9450_LDO5_MASK 0x0f +#define PCA9450_PMIC_RESET_WDOG_B_CFG_MASK 0xc0 +#define PCA9450_PMIC_RESET_WDOG_B_CFG_WARM 0x40 +#define PCA9450_PMIC_RESET_WDOG_B_CFG_COLD_LDO12 0x80 + #endif -- cgit v1.2.3 From d12618b9279647e10055b9d086e454823496b0ff Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 10 Jan 2023 17:18:08 -0300 Subject: imx8mm-phg: Add board support Add the board support for the i.MX8MM Cloos PHG board. This board uses a imx8mm-tqma8mqml SoM from TQ-Group. imx8mm-phg.dts and imx8mm-tqma8mqml.dtsi are taken directly from Linux 6.2-rc3. Signed-off-by: Fabio Estevam Reviewed-by: Tom Rini --- include/configs/imx8mm_phg.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/configs/imx8mm_phg.h (limited to 'include') diff --git a/include/configs/imx8mm_phg.h b/include/configs/imx8mm_phg.h new file mode 100644 index 00000000000..d2d7ffa0f5b --- /dev/null +++ b/include/configs/imx8mm_phg.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2019 NXP + */ + +#ifndef __IMX8MM_PHG_H +#define __IMX8MM_PHG_H + +#include +#include +#include +#include + +#define CFG_SYS_UBOOT_BASE \ + (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) + +#ifdef CONFIG_SPL_BUILD +/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +#define CFG_MALLOC_F_ADDR 0x930000 +#endif + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(DHCP, dhcp, na) + +#include + +/* Initial environment variables */ +#define CFG_EXTRA_ENV_SETTINGS BOOTENV + +/* Link Definitions */ + +#define CFG_SYS_INIT_RAM_ADDR 0x40000000 +#define CFG_SYS_INIT_RAM_SIZE 0x200000 + +#define CFG_SYS_SDRAM_BASE 0x40000000 +#define PHYS_SDRAM 0x40000000 +#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */ + +#endif -- cgit v1.2.3 From ab79811c9f0118314c13fefb8d8739ff8e4c7669 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 3 Jan 2023 10:19:40 -0300 Subject: pico-imx7d: Convert to DM_I2C and DM_PMIC The conversion to DM_I2C is mandatory, so convert to it and also to DM_PMIC. Signed-off-by: Fabio Estevam --- include/configs/pico-imx7d.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 5774184300c..096e5bbe663 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -97,9 +97,6 @@ #define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE -/* PMIC */ -#define CFG_POWER_PFUZE3000_I2C_ADDR 0x08 - /* FLASH and environment organization */ /* Environment starts at 768k = 768 * 1024 = 786432 */ -- cgit v1.2.3 From e64bfd7b71b5d100bc7e682748caea8a24bf4f72 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 14 Nov 2022 22:07:54 +0000 Subject: include/configs: mx6/mx7: drop dangling comments Cleanup some dangling comments left by automated migration processes that are no longer value. Signed-off-by: Peter Robinson Acked-by: Peng Fan --- include/configs/mx6_common.h | 4 ---- include/configs/mx7_common.h | 12 ------------ 2 files changed, 16 deletions(-) (limited to 'include') diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h index 0b8233de8c4..3db8e09b42a 100644 --- a/include/configs/mx6_common.h +++ b/include/configs/mx6_common.h @@ -21,8 +21,4 @@ #include #include -/* Miscellaneous configurable options */ - -/* MMC */ - #endif diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h index a542839ce1d..d0718bfa03e 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -16,16 +16,4 @@ /* Timer settings */ #define CFG_SC_TIMER_CLK 8000000 /* 8Mhz */ -/* Miscellaneous configurable options */ - -/* UART */ - -/* MMC */ - -/* - * If we have defined the OPTEE ram size and not OPTEE it means that we were - * launched by OPTEE, because of that we shall skip all the low level - * initialization since it was already done by ATF or OPTEE - */ - #endif -- cgit v1.2.3 From 945c118409a40bfa18fa65bf7fc0afa04634e6dd Mon Sep 17 00:00:00 2001 From: Manoj Sai Date: Mon, 28 Nov 2022 17:15:31 +0530 Subject: configs: imx8mp_evk: revert to old ram settings The 'commit 864ac2cf383e ("board: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit")' has changed the imx8mp evk ram settings from 6GB ram to 2GB. This changeset reverts the above change. Signed-off-by: Manoj Sai Reported-by : Peter Bergin Reviewed-by: Peng Fan Reviewed-by: Fabio Estevam --- include/configs/imx8mp_evk.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h index 1fea5b72deb..1759318fdd3 100644 --- a/include/configs/imx8mp_evk.h +++ b/include/configs/imx8mp_evk.h @@ -46,9 +46,11 @@ #define CFG_SYS_INIT_RAM_SIZE 0x80000 -/* Totally 2GB DDR */ +/* Totally 6GB DDR */ #define CFG_SYS_SDRAM_BASE 0x40000000 #define PHYS_SDRAM 0x40000000 -#define PHYS_SDRAM_SIZE 0x80000000 +#define PHYS_SDRAM_SIZE 0xC0000000 /* 3 GB */ +#define PHYS_SDRAM_2 0x100000000 +#define PHYS_SDRAM_2_SIZE 0xC0000000 /* 3 GB */ #endif -- cgit v1.2.3