From 7f77adbb65ec47f37bac2334ff2dcce498405dfd Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Mon, 25 Mar 2024 09:27:39 -0700 Subject: imx8m*-venice: enable TPM support Enable support for TPM2 devices. As the ATTPM20P TPM2 used on the Gateworks Venice boards hangs off the SPI bus we enable SPI support as well. Signed-off-by: Tim Harvey --- configs/imx8mm_venice_defconfig | 10 ++++++++++ configs/imx8mn_venice_defconfig | 10 ++++++++++ configs/imx8mp_venice_defconfig | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig index cb6b97d097c..86928687df2 100644 --- a/configs/imx8mm_venice_defconfig +++ b/configs/imx8mm_venice_defconfig @@ -68,6 +68,7 @@ CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_TPM=y CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set @@ -127,14 +128,20 @@ CONFIG_SPL_DM_PMIC_MP5416=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +# CONFIG_DM_RNG is not set CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MXC_SPI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_TMU=y +# CONFIG_TPM_V1 is not set +CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_HOST_ETHER=y @@ -152,4 +159,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y +CONFIG_TPM=y +# CONFIG_SPL_SHA512 is not set +# CONFIG_SPL_SHA384 is not set CONFIG_HEXDUMP=y diff --git a/configs/imx8mn_venice_defconfig b/configs/imx8mn_venice_defconfig index 0a4fba5f1ca..6bb0f015a9b 100644 --- a/configs/imx8mn_venice_defconfig +++ b/configs/imx8mn_venice_defconfig @@ -71,6 +71,7 @@ CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_TPM=y CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set @@ -128,14 +129,20 @@ CONFIG_SPL_DM_PMIC_MP5416=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +# CONFIG_DM_RNG is not set CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MXC_SPI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_TMU=y +# CONFIG_TPM_V1 is not set +CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_HOST_ETHER=y @@ -153,4 +160,7 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y +CONFIG_TPM=y +# CONFIG_SPL_SHA512 is not set +# CONFIG_SPL_SHA384 is not set CONFIG_HEXDUMP=y diff --git a/configs/imx8mp_venice_defconfig b/configs/imx8mp_venice_defconfig index 6e4addc7728..b1055ef2f06 100644 --- a/configs/imx8mp_venice_defconfig +++ b/configs/imx8mp_venice_defconfig @@ -73,6 +73,7 @@ CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y CONFIG_CMD_PMIC=y CONFIG_CMD_REGULATOR=y +CONFIG_CMD_TPM=y CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set # CONFIG_SPL_EFI_PARTITION is not set @@ -135,14 +136,20 @@ CONFIG_SPL_DM_PMIC_MP5416=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +# CONFIG_DM_RNG is not set CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MXC_SPI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_TMU=y +# CONFIG_TPM_V1 is not set +CONFIG_TPM2_TIS_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y @@ -160,4 +167,7 @@ CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_IMX_WATCHDOG=y +CONFIG_TPM=y +# CONFIG_SPL_SHA512 is not set +# CONFIG_SPL_SHA384 is not set CONFIG_HEXDUMP=y -- cgit v1.2.3 From 8c352a61eef6a8a2d7ffc4159a499f78f5fae99c Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 15 Apr 2024 18:57:17 -0300 Subject: imx93: Move SoC and lifeclycle information to debug level The following information printed on every boot is not very helpful for the users: SOC: 0xa0009300 LC: 0x40040 Move them to debug() level. Signed-off-by: Fabio Estevam Reviewed-by: Mathieu Othacehe --- board/freescale/imx93_evk/spl.c | 4 ++-- board/phytec/phycore_imx93/spl.c | 4 ++-- board/variscite/imx93_var_som/spl.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c index 7331a20f94c..6d5e110b277 100644 --- a/board/freescale/imx93_evk/spl.c +++ b/board/freescale/imx93_evk/spl.c @@ -120,8 +120,8 @@ void board_init_f(ulong dummy) if (ret) { printf("Fail to init Sentinel API\n"); } else { - printf("SOC: 0x%x\n", gd->arch.soc_rev); - printf("LC: 0x%x\n", gd->arch.lifecycle); + debug("SOC: 0x%x\n", gd->arch.soc_rev); + debug("LC: 0x%x\n", gd->arch.lifecycle); } power_init_board(); diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c index f03bfee9ffa..5efa38a1442 100644 --- a/board/phytec/phycore_imx93/spl.c +++ b/board/phytec/phycore_imx93/spl.c @@ -126,8 +126,8 @@ void board_init_f(ulong dummy) if (ret) { printf("Fail to init ELE API\n"); } else { - printf("SOC: 0x%x\n", gd->arch.soc_rev); - printf("LC: 0x%x\n", gd->arch.lifecycle); + debug("SOC: 0x%x\n", gd->arch.soc_rev); + debug("LC: 0x%x\n", gd->arch.lifecycle); } clock_init(); diff --git a/board/variscite/imx93_var_som/spl.c b/board/variscite/imx93_var_som/spl.c index 71f346cf77b..8852aea156b 100644 --- a/board/variscite/imx93_var_som/spl.c +++ b/board/variscite/imx93_var_som/spl.c @@ -125,8 +125,8 @@ void board_init_f(ulong dummy) if (ret) { printf("Fail to init ELE API\n"); } else { - printf("SOC: 0x%x\n", gd->arch.soc_rev); - printf("LC: 0x%x\n", gd->arch.lifecycle); + debug("SOC: 0x%x\n", gd->arch.soc_rev); + debug("LC: 0x%x\n", gd->arch.lifecycle); } power_init_board(); -- cgit v1.2.3 From 45d14c0120537a6fda4968d33bf57bfdef53e5f5 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 17 Apr 2024 10:49:02 +0200 Subject: arm: dts: verdin-imx8mm/imx8mp: use gpio-hog for sleep moci In Linux, we allow sleep moci to be turned off when the carrier board supports it and the system is in suspend. In U-Boot, however, we want the sleep moci to be always on. So we use a gpio hog and disable the regulator. This change is necessary because we switched to upstream device tree files with commit 23fe2def1edf ("verdin-imx8mm/verdin-imx8mp: move imx verdins to OF_UPSTREAM"). A recent upstream patch removes the gpio hog from the Linux device tree, so we need to add it to the u-boot dtsi. The following patch will remove the gpio hog from the Linux device tree: https://lore.kernel.org/linux-devicetree/20240405160720.5977-1-eichest@gmail.com/ The U-Boot patch can be applied without it and will not break the build. Signed-off-by: Stefan Eichenberger --- arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi | 5 +++++ arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi index 38db56059d6..8b397f535c1 100644 --- a/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-verdin-wifi-dev-u-boot.dtsi @@ -60,6 +60,11 @@ ctrl-sleep-moci-hog { bootph-pre-ram; + gpio-hog; + output-high; + gpios = <1 GPIO_ACTIVE_HIGH>; + line-name = "CTRL_SLEEP_MOCI#"; + }; }; diff --git a/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi b/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi index 03f211d5f7d..7b45a87450b 100644 --- a/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi +++ b/arch/arm/dts/imx8mp-verdin-wifi-dev-u-boot.dtsi @@ -58,6 +58,10 @@ ctrl-sleep-moci-hog { bootph-pre-ram; + gpio-hog; + output-high; + gpios = <29 GPIO_ACTIVE_HIGH>; + line-name = "CTRL_SLEEP_MOCI#"; }; }; -- cgit v1.2.3 From 8d22015d23662a886e4f79c347e5e9cd717fe067 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 17 Apr 2024 13:01:53 -0700 Subject: board: gateworks: venice: fix dt adjustment for gw73xx baseboard for imx8mp The GW73xx baseboard needs a PCI dt adjustment for revC/D based on a change of the PCIe switch. Make sure we are only doing this for a pci based ethernet to avoid causing a boot hang when the ethernet1 alias points to eqos or fec. To know this is a pcie device ensure the alias begins with the pcie controller. Signed-off-by: Tim Harvey --- board/gateworks/venice/venice.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c index f54f1186b68..5b105d7659e 100644 --- a/board/gateworks/venice/venice.c +++ b/board/gateworks/venice/venice.c @@ -230,6 +230,7 @@ uint mmc_get_env_part(struct mmc *mmc) int ft_board_setup(void *fdt, struct bd_info *bd) { const char *base_model = eeprom_get_baseboard_model(); + const char *path; char pcbrev; int off; @@ -238,10 +239,10 @@ int ft_board_setup(void *fdt, struct bd_info *bd) if (!strncmp(base_model, "GW73", 4)) { pcbrev = get_pcb_rev(base_model); + path = fdt_get_alias(fdt, "ethernet1"); - if (pcbrev > 'B' && pcbrev < 'E') { - printf("adjusting dt for %s\n", base_model); - + if (pcbrev > 'B' && pcbrev < 'E' && path && !strncmp(path, "/soc@0/pcie@", 12)) { + printf("adjusting %s pcie\n", base_model); /* * revC/D/E has PCIe 4-port switch which changes * ethernet1 PCIe GbE: -- cgit v1.2.3 From 0e8e7be117a17474385f95fdaf733353cd891f91 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 17 Apr 2024 13:03:25 -0700 Subject: imx8m*_venice_defconfig: enable ipv6, wget and tftpput Enable ipv6, wget, and tftpput support Signed-off-by: Tim Harvey --- configs/imx8mm_venice_defconfig | 5 +++++ configs/imx8mn_venice_defconfig | 5 +++++ configs/imx8mp_venice_defconfig | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig index 86928687df2..517b70b6947 100644 --- a/configs/imx8mm_venice_defconfig +++ b/configs/imx8mm_venice_defconfig @@ -62,7 +62,10 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_DHCP6=y +CONFIG_CMD_TFTPPUT=y CONFIG_SYS_DISABLE_AUTOLOAD=y +CONFIG_CMD_WGET=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y @@ -84,6 +87,8 @@ CONFIG_ETHPRIME="eth0" CONFIG_NET_RANDOM_ETHADDR=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=4096 +CONFIG_PROT_TCP_SACK=y +CONFIG_IPV6=y CONFIG_SPL_DM=y CONFIG_SPL_CLK_COMPOSITE_CCF=y CONFIG_CLK_COMPOSITE_CCF=y diff --git a/configs/imx8mn_venice_defconfig b/configs/imx8mn_venice_defconfig index 6bb0f015a9b..b28e5f6d8bb 100644 --- a/configs/imx8mn_venice_defconfig +++ b/configs/imx8mn_venice_defconfig @@ -65,7 +65,10 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_DHCP6=y +CONFIG_CMD_TFTPPUT=y CONFIG_SYS_DISABLE_AUTOLOAD=y +CONFIG_CMD_WGET=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y @@ -87,6 +90,8 @@ CONFIG_ETHPRIME="eth0" CONFIG_NET_RANDOM_ETHADDR=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=4096 +CONFIG_PROT_TCP_SACK=y +CONFIG_IPV6=y CONFIG_SPL_DM=y CONFIG_SPL_CLK_IMX8MN=y CONFIG_CLK_IMX8MN=y diff --git a/configs/imx8mp_venice_defconfig b/configs/imx8mp_venice_defconfig index b1055ef2f06..420a1699788 100644 --- a/configs/imx8mp_venice_defconfig +++ b/configs/imx8mp_venice_defconfig @@ -67,7 +67,10 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_USB=y +CONFIG_CMD_DHCP6=y +CONFIG_CMD_TFTPPUT=y CONFIG_SYS_DISABLE_AUTOLOAD=y +CONFIG_CMD_WGET=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_UUID=y @@ -87,6 +90,8 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_IP_DEFRAG=y CONFIG_TFTP_BLOCKSIZE=4096 +CONFIG_PROT_TCP_SACK=y +CONFIG_IPV6=y CONFIG_SPL_DM=y CONFIG_REGMAP=y CONFIG_SYSCON=y -- cgit v1.2.3 From 51aaaf5e79757c893632fdd8125bb65bed1d09a8 Mon Sep 17 00:00:00 2001 From: Francesco Dolcini Date: Thu, 18 Apr 2024 15:12:47 +0200 Subject: board: toradex: imx: Remove not needed env variables Remove not needed variables from environment and include config files. - setup variable used to be executed from some bootscript, however it's not required and there is no point on having this small helper here - boot_file, kernel_file, ip_dyn variables are not used anywhere - fdt_fixup variable is just set empty - defargs, vidargs variables used to be used from some bootscript, however there is no point on having it here and even old legacy bootscript can work without them - removed CONFIG_ENABLE_DDR_TRAINING_DEBUG, this is a leftover from some copy/paste On colibri imx6ull/imx7 NAND module, remove consoleblank=0, this is already the Linux kernel default therefore useless. Various Linux Kernel command line options removed are not-existing left-over that applied to some old NXP i.MX downstream branch Signed-off-by: Francesco Dolcini --- include/configs/apalis-imx8.h | 2 -- include/configs/apalis_imx6.h | 9 +-------- include/configs/colibri-imx6ull.h | 10 +++------- include/configs/colibri-imx8x.h | 2 -- include/configs/colibri_imx6.h | 9 +-------- include/configs/colibri_imx7.h | 11 +++-------- include/configs/verdin-imx8mm.h | 3 --- include/configs/verdin-imx8mp.h | 5 ----- 8 files changed, 8 insertions(+), 43 deletions(-) diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h index 845705c86db..c8ec034fc97 100644 --- a/include/configs/apalis-imx8.h +++ b/include/configs/apalis-imx8.h @@ -46,8 +46,6 @@ "fdt_board=eval\0" \ "initrd_addr=0x83800000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ - "consoleblank=0 earlycon\0" \ "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 " \ diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 8a9f3ef75a7..0df3917e200 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -64,12 +64,9 @@ #define CFG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "boot_file=zImage\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttymxc0\0" \ - "defargs=enable_wait_mode=off vmalloc=400M\0" \ "fdt_board=eval\0" \ - "fdt_fixup=;\0" \ MEM_LAYOUT_ENV_SETTINGS \ UBOOT_UPDATE \ "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ @@ -80,16 +77,12 @@ "|| setenv drive 2; mmc rescan; load ${interface} ${drive}:1" \ " ${loadaddr} flash_blk.img && " \ "source ${loadaddr}\0" \ - "setup=setenv setupargs fec_mac=${ethaddr} " \ - "consoleblank=0 no_console_suspend=1 console=tty1 " \ - "console=${console},${baudrate}n8\0 " \ "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \ "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \ "source ${loadaddr}\0" \ "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "vidargs=mxc_hdmi.only_cea=1 fbmem=32M\0" + "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" /* Miscellaneous configurable options */ diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 561a61ebc03..7c9d633b68d 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -48,8 +48,8 @@ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs " \ "ubi.fm_autoconvert=1\0" \ "ubiboot=run setup; " \ - "setenv bootargs ${defargs} ${ubiargs} " \ - "${setupargs} ${vidargs} ${tdxargs}; echo Booting from NAND...; " \ + "setenv bootargs ${ubiargs} " \ + "${setupargs} ${tdxargs}; echo Booting from NAND...; " \ "ubi part ubi &&" \ "ubi read ${kernel_addr_r} kernel && " \ "ubi read ${fdt_addr_r} dtb && " \ @@ -86,11 +86,7 @@ UBOOT_UPDATE \ "boot_script_dhcp=boot.scr\0" \ "console=ttymxc0\0" \ - "defargs=user_debug=30\0" \ "fdt_board=eval-v3\0" \ - "fdt_fixup=;\0" \ - "ip_dyn=yes\0" \ - "kernel_file=zImage\0" \ "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ "00:14:2d:00:00:00; fi; tftpboot ${loadaddr} " \ "${board}/flash_eth.img && source ${loadaddr}\0" \ @@ -99,7 +95,7 @@ "${board}/flash_blk.img && source ${loadaddr}\0" \ "setup=setenv setupargs " \ "console=tty1 console=${console}" \ - ",${baudrate}n8 ${memargs} ${mtdparts} consoleblank=0\0" \ + ",${baudrate}n8 ${memargs} ${mtdparts}\0" \ "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ "setusbupdate=usb start && setenv interface usb && " \ "fatload ${interface} 0:1 ${loadaddr} " \ diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h index 042fcb8757f..2b7fea30116 100644 --- a/include/configs/colibri-imx8x.h +++ b/include/configs/colibri-imx8x.h @@ -40,8 +40,6 @@ "fdt_board=eval-v3\0" \ "initrd_addr=0x83800000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ - "consoleblank=0 earlycon\0" \ "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 " \ diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h index 4b2841833b5..79e5b870b81 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h @@ -58,12 +58,9 @@ #define CFG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "boot_file=zImage\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttymxc0\0" \ - "defargs=enable_wait_mode=off galcore.contiguousSize=50331648\0" \ "fdt_board=eval-v3\0" \ - "fdt_fixup=;\0" \ MEM_LAYOUT_ENV_SETTINGS \ UBOOT_UPDATE \ "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ @@ -72,16 +69,12 @@ "setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; load " \ "${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \ "source ${loadaddr}\0" \ - "setup=setenv setupargs fec_mac=${ethaddr} " \ - "consoleblank=0 no_console_suspend=1 console=tty1 " \ - "console=${console},${baudrate}n8\0 " \ "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \ "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \ "source ${loadaddr}\0" \ "splashpos=m,m\0" \ - "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ - "vidargs=fbmem=8M\0" + "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" /* Miscellaneous configurable options */ diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 7a9f4afe7d1..c34f1f903df 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -89,8 +89,8 @@ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \ "ubi.fm_autoconvert=1\0" \ "ubiboot=run setup; " \ - "setenv bootargs ${defargs} ${ubiargs} " \ - "${setupargs} ${vidargs} ${tdxargs}; echo Booting from NAND...; " \ + "setenv bootargs ${ubiargs} " \ + "${setupargs} ${tdxargs}; echo Booting from NAND...; " \ "ubi part ubi && run m4boot && " \ "ubi read ${kernel_addr_r} kernel && " \ "ubi read ${fdt_addr_r} dtb && " \ @@ -123,15 +123,10 @@ MEM_LAYOUT_ENV_SETTINGS \ MODULE_EXTRA_ENV_SETTINGS \ UBOOT_UPDATE \ - "boot_file=zImage\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttymxc0\0" \ - "defargs=\0" \ "fdt_board=eval-v3\0" \ - "fdt_fixup=;\0" \ "m4boot=;\0" \ - "ip_dyn=yes\0" \ - "kernel_file=zImage\0" \ "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \ "00:14:2d:00:00:00; fi; tftpboot ${loadaddr} " \ "${board}/flash_eth.img && source ${loadaddr}\0" \ @@ -140,7 +135,7 @@ "${board}/flash_blk.img && source ${loadaddr}\0" \ "setup=setenv setupargs " \ "console=tty1 console=${console}" \ - ",${baudrate}n8 ${memargs} ${mtdparts} consoleblank=0\0" \ + ",${baudrate}n8 ${memargs} ${mtdparts}\0" \ "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ "setusbupdate=usb start && setenv interface usb && " \ "fatload ${interface} 0:1 ${loadaddr} " \ diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h index a7ea02807dd..34238d3b505 100644 --- a/include/configs/verdin-imx8mm.h +++ b/include/configs/verdin-imx8mm.h @@ -37,14 +37,11 @@ #define CFG_EXTRA_ENV_SETTINGS \ BOOTENV \ MEM_LAYOUT_ENV_SETTINGS \ - "boot_file=Image\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttymxc0\0" \ "fdt_board=dev\0" \ "initrd_addr=0x43800000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ - "consoleblank=0 earlycon\0" \ "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \ "if test \"$confirm\" = \"y\"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h index 256bab089ff..0b88e95603d 100644 --- a/include/configs/verdin-imx8mp.h +++ b/include/configs/verdin-imx8mp.h @@ -13,7 +13,6 @@ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) #ifdef CONFIG_SPL_BUILD -/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ #define CFG_MALLOC_F_ADDR 0x184000 @@ -40,15 +39,11 @@ #define CFG_EXTRA_ENV_SETTINGS \ BOOTENV \ MEM_LAYOUT_ENV_SETTINGS \ - "boot_file=Image\0" \ - "boot_scripts=boot.scr\0" \ "boot_script_dhcp=boot.scr\0" \ "console=ttymxc2\0" \ "fdt_board=dev\0" \ "initrd_addr=0x43800000\0" \ "initrd_high=0xffffffffffffffff\0" \ - "setup=setenv setupargs console=tty1 console=${console},${baudrate} " \ - "consoleblank=0 earlycon\0" \ "update_uboot=askenv confirm Did you load flash.bin (y/N)?; " \ "if test \"$confirm\" = \"y\"; then " \ "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ -- cgit v1.2.3 From 2b3310ef13998dfd03196a0806e03035212b102c Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Fri, 19 Apr 2024 08:29:00 -0700 Subject: clk: imx8mm: Add support for PCIe clocks Add support for PCIe clocks required to enable PCIe support on iMX8MM SoC. Signed-off-by: Tim Harvey Reviewed-by: Marek Vasut --- drivers/clk/imx/clk-imx8mm.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index b5c253e4966..1a00dd1d287 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -66,6 +66,17 @@ static const char *imx8mm_i2c3_sels[] = {"clock-osc-24m", "sys_pll1_160m", "sys_ static const char *imx8mm_i2c4_sels[] = {"clock-osc-24m", "sys_pll1_160m", "sys_pll2_50m", "sys_pll3_out", "audio_pll1_out", "video_pll1_out", "audio_pll2_out", "sys_pll1_133m", }; +#if CONFIG_IS_ENABLED(PCIE_DW_IMX) +static const char *imx8mm_pcie1_ctrl_sels[] = {"clock-osc-24m", "sys_pll2_250m", "sys_pll2_200m", "sys_pll1_266m", + "sys_pll1_800m", "sys_pll2_500m", "sys_pll2_333m", "sys_pll3_out", }; + +static const char *imx8mm_pcie1_phy_sels[] = {"clock-osc-24m", "sys_pll2_100m", "sys_pll2_500m", "clk_ext1", "clk_ext2", + "clk_ext3", "clk_ext4", "sys_pll1_400m", }; + +static const char *imx8mm_pcie1_aux_sels[] = {"clock-osc-24m", "sys_pll2_200m", "sys_pll2_50m", "sys_pll3_out", + "sys_pll2_100m", "sys_pll1_80m", "sys_pll1_160m", "sys_pll1_200m", }; +#endif + #ifndef CONFIG_SPL_BUILD static const char *imx8mm_pwm1_sels[] = {"clock-osc-24m", "sys_pll2_100m", "sys_pll1_160m", "sys_pll1_40m", "sys_pll3_out", "clk_ext1", "sys_pll1_80m", "video_pll1_out", }; @@ -256,6 +267,17 @@ static int imx8mm_clk_probe(struct udevice *dev) imx8m_clk_composite("usb_bus", imx8mm_usb_bus_sels, base + 0x8b80)); /* IP */ +#if CONFIG_IS_ENABLED(PCIE_DW_IMX) + clk_dm(IMX8MM_CLK_PCIE1_CTRL, + imx8m_clk_composite("pcie1_ctrl", imx8mm_pcie1_ctrl_sels, + base + 0xa300)); + clk_dm(IMX8MM_CLK_PCIE1_PHY, + imx8m_clk_composite("pcie1_phy", imx8mm_pcie1_phy_sels, + base + 0xa380)); + clk_dm(IMX8MM_CLK_PCIE1_AUX, + imx8m_clk_composite("pcie1_aux", imx8mm_pcie1_aux_sels, + base + 0xa400)); +#endif clk_dm(IMX8MM_CLK_USDHC1, imx8m_clk_composite("usdhc1", imx8mm_usdhc1_sels, base + 0xac00)); @@ -339,6 +361,11 @@ static int imx8mm_clk_probe(struct udevice *dev) imx_clk_gate4("pwm4_root_clk", "pwm4", base + 0x42b0, 0)); #endif +#if CONFIG_IS_ENABLED(PCIE_DW_IMX) + clk_dm(IMX8MM_CLK_PCIE1_ROOT, + imx_clk_gate4("pcie1_root_clk", "pcie1_ctrl", base + 0x4250, 0)); +#endif + #if CONFIG_IS_ENABLED(DM_SPI) clk_dm(IMX8MM_CLK_ECSPI1, imx8m_clk_composite("ecspi1", imx8mm_ecspi1_sels, base + 0xb280)); -- cgit v1.2.3 From def1d18fb82e6ce4fe4a631381817e0b20f6febd Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Fri, 19 Apr 2024 08:29:01 -0700 Subject: pci: dw_imx: add support for IMX8MM Add support for the IMX8MM SoC by adding driver data with the compatible string of the GPR controller. Reviewed-by: Marek Vasut Signed-off-by: Tim Harvey --- drivers/pci/pcie_dw_imx.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pcie_dw_imx.c b/drivers/pci/pcie_dw_imx.c index a2ee228224b..fdb463710ba 100644 --- a/drivers/pci/pcie_dw_imx.c +++ b/drivers/pci/pcie_dw_imx.c @@ -56,6 +56,18 @@ struct pcie_dw_imx { struct udevice *vpcie; }; +struct pcie_chip_info { + const char *gpr; +}; + +static const struct pcie_chip_info imx8mm_chip_info = { + .gpr = "fsl,imx8mm-iomuxc-gpr", +}; + +static const struct pcie_chip_info imx8mp_chip_info = { + .gpr = "fsl,imx8mp-iomuxc-gpr", +}; + static void pcie_dw_configure(struct pcie_dw_imx *priv, u32 cap_speed) { dw_pcie_dbi_write_enable(&priv->dw, true); @@ -242,6 +254,7 @@ static int pcie_dw_imx_remove(struct udevice *dev) static int pcie_dw_imx_of_to_plat(struct udevice *dev) { + struct pcie_chip_info *info = (void *)dev_get_driver_data(dev); struct pcie_dw_imx *priv = dev_get_priv(dev); ofnode gpr; int ret; @@ -287,7 +300,7 @@ static int pcie_dw_imx_of_to_plat(struct udevice *dev) goto err_phy; } - gpr = ofnode_by_compatible(ofnode_null(), "fsl,imx8mp-iomuxc-gpr"); + gpr = ofnode_by_compatible(ofnode_null(), info->gpr); if (ofnode_equal(gpr, ofnode_null())) { dev_err(dev, "unable to find GPR node\n"); ret = -ENODEV; @@ -322,7 +335,8 @@ static const struct dm_pci_ops pcie_dw_imx_ops = { }; static const struct udevice_id pcie_dw_imx_ids[] = { - { .compatible = "fsl,imx8mp-pcie" }, + { .compatible = "fsl,imx8mm-pcie", .data = (ulong)&imx8mm_chip_info, }, + { .compatible = "fsl,imx8mp-pcie", .data = (ulong)&imx8mp_chip_info, }, { } }; -- cgit v1.2.3 From 8b8c699d88171b0d40f072e114f32cce93cb2987 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Fri, 19 Apr 2024 08:29:02 -0700 Subject: imx8mm_venice_defconfig: Enable PCIe/NVMe support Enable PCIe/NVMe support. Also, enable the reset driver which is a prerequisite for PCIe support. Signed-off-by: Tim Harvey --- configs/imx8mm_venice_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configs/imx8mm_venice_defconfig b/configs/imx8mm_venice_defconfig index 517b70b6947..0f97b4b8424 100644 --- a/configs/imx8mm_venice_defconfig +++ b/configs/imx8mm_venice_defconfig @@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="freescale/imx8mm-venice-gw71xx-0x" CONFIG_SPL_TEXT_BASE=0x7E1000 CONFIG_TARGET_IMX8MM_VENICE=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_DM_RESET=y CONFIG_SYS_MONITOR_LEN=524288 CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y @@ -20,6 +21,7 @@ CONFIG_SPL_STACK=0x920000 CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x3f8000 CONFIG_SYS_LOAD_ADDR=0x48200000 +CONFIG_PCI=y CONFIG_SYS_MEMTEST_START=0x40000000 CONFIG_SYS_MEMTEST_END=0x80000000 CONFIG_FIT=y @@ -60,6 +62,7 @@ CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_DHCP6=y @@ -120,6 +123,9 @@ CONFIG_PHY_GIGE=y CONFIG_FEC_MXC=y CONFIG_KSZ9477=y CONFIG_MII=y +CONFIG_NVME_PCI=y +CONFIG_PCIE_DW_IMX=y +CONFIG_PHY_IMX8M_PCIE=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y -- cgit v1.2.3