Skip to contentSkip to conversation

verdin-imx8mm: verdin-imx8mp: various additions and improvements

PATCH Superseded Marcel Ziswiler 3 participants 15 messages Aug 22, 2022 – Sep 22, 2022 Arm i.MX and Layerscape

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover verdin-imx8mm: verdin-imx8mp: various additions and improvements

From: Marcel Ziswiler <[email protected]>

Various additions and improvements for the Verdin iMX8M Mini and Verdin iMX8M Plus:

- updated env memory layout
- verdin-imx8mm: prepare for optional job ring driver model
- verdin-imx8mm: improve and extend boot devices
- various config additions and improvements

Changes in v2:
- Moved loadaddr by an additional 0.5MB to avoid "Moving Image from 0x48200000 to 0x48280000" during booti plus increasing kernel_comp_size by same 0.5MB.

Marcel Ziswiler (5):
verdin-imx8mm: verdin-imx8mp: update env memory layout
verdin-imx8mm: prepare for optional job ring driver model
verdin-imx8mm: improve and extend boot devices
verdin-imx8mm: various config additions and improvements
verdin-imx8mp: various config additions and improvements

 board/toradex/verdin-imx8mm/spl.c | 17 +++++++++-----
 configs/verdin-imx8mm_defconfig   | 37 +++++++++++++++++++++++++------
 configs/verdin-imx8mp_defconfig   | 35 ++++++++++++++++++++++++-----
 include/configs/verdin-imx8mm.h   | 10 +++++----
 include/configs/verdin-imx8mp.h   | 10 +++++----
 5 files changed, 83 insertions(+), 26 deletions(-)
Signature · 1 line
2.35.1
#1 lore raw

PATCH v2 1/5 verdin-imx8mm: verdin-imx8mp: update env memory layout

From: Marcel Ziswiler <[email protected]>

Update the distro config env memory layout for the Verdin iMX8M Mini and Verdin iMX8M Plus:

- loadaddr=0x48280000 allows for 128.5MB area for uncompressing (ie FIT images, kernel_comp_addr_r, kernel_comp_size)
- fdt_addr_r = loadaddr + 127.5MB : allows for 127.5MB kernel
- scriptaddr = fdt_addr_r + 512KB : allows for 512KB fdt
- ramdisk_addr_r = scriptaddr + 512KB : allows for 512KB script

Memory layout taken from commit fd5c7173ade4 ("imx8m{m,n}_venice: update env memory layout") but moved loadaddr by an additional 0.5MB to avoid "Moving Image from 0x48200000 to 0x48280000" during booti plus actually defining kernel_comp_size to make booti work.

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).

---

Changes in v2:
- Moved loadaddr by an additional 0.5MB to avoid "Moving Image from 0x48200000 to 0x48280000" during booti plus increasing kernel_comp_size by same 0.5MB.

 configs/verdin-imx8mm_defconfig |  2 +-
 configs/verdin-imx8mp_defconfig |  2 +-
 include/configs/verdin-imx8mm.h | 10 ++++++----
 include/configs/verdin-imx8mp.h | 10 ++++++----
 4 files changed, 14 insertions(+), 10 deletions(-)
configs/verdin-imx8mm_defconfig +1 -1
index 275a29bf4f9..336d3245988 100644
@@ -15,7 +15,7 @@ CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
-CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_SYS_LOAD_ADDR=0x48280000
 CONFIG_SYS_MEMTEST_START=0x40000000
 CONFIG_SYS_MEMTEST_END=0x80000000
 CONFIG_DISTRO_DEFAULTS=y
configs/verdin-imx8mp_defconfig +1 -1
index 0804fbff915..993153267a6 100644
@@ -21,7 +21,7 @@ CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
-CONFIG_SYS_LOAD_ADDR=0x43500000
+CONFIG_SYS_LOAD_ADDR=0x48280000
 CONFIG_SYS_MEMTEST_START=0x40000000
 CONFIG_SYS_MEMTEST_END=0x80000000
 CONFIG_DISTRO_DEFAULTS=y
include/configs/verdin-imx8mm.h +6 -4
index 5b5fce9bda1..4d20b86591f 100644
@@ -20,10 +20,12 @@
 #endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
-	"fdt_addr_r=0x44000000\0" \
-	"kernel_addr_r=0x42000000\0" \
-	"ramdisk_addr_r=0x46400000\0" \
-	"scriptaddr=0x46000000\0"
+	"fdt_addr_r=0x50200000\0" \
+	"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+	"kernel_comp_addr_r=0x40200000\0" \
+	"kernel_comp_size=0x08080000\0" \
+	"ramdisk_addr_r=0x50300000\0" \
+	"scriptaddr=0x50280000\0"
 
 /* Enable Distro Boot */
 #define BOOT_TARGET_DEVICES(func) \
include/configs/verdin-imx8mp.h +6 -4
index fca40beba18..9b8db223bb2 100644
@@ -34,10 +34,12 @@
 #endif /* CONFIG_CMD_NET */
 
 #define MEM_LAYOUT_ENV_SETTINGS \
-	"fdt_addr_r=0x43000000\0" \
-	"kernel_addr_r=0x40000000\0" \
-	"ramdisk_addr_r=0x46400000\0" \
-	"scriptaddr=0x46000000\0"
+	"fdt_addr_r=0x50200000\0" \
+	"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+	"kernel_comp_addr_r=0x40200000\0" \
+	"kernel_comp_size=0x08080000\0" \
+	"ramdisk_addr_r=0x50300000\0" \
+	"scriptaddr=0x50280000\0"
 
 /* Enable Distro Boot */
 #define BOOT_TARGET_DEVICES(func) \
Signature · 1 line
2.35.1
#2 lore raw

PATCH v2 1/5 verdin-imx8mm: verdin-imx8mp: update env memory layout

Quoted 15 lines

From: Marcel Ziswiler <[email protected]>
Update the distro config env memory layout for the Verdin iMX8M Mini and Verdin iMX8M Plus:
- loadaddr=0x48280000 allows for 128.5MB area for uncompressing (ie FIT images, kernel_comp_addr_r, kernel_comp_size)
- fdt_addr_r = loadaddr + 127.5MB : allows for 127.5MB kernel
- scriptaddr = fdt_addr_r + 512KB : allows for 512KB fdt
- ramdisk_addr_r = scriptaddr + 512KB : allows for 512KB script Memory layout taken from commit fd5c7173ade4 ("imx8m{m,n}_venice: update env memory layout") but moved loadaddr by an additional 0.5MB to avoid "Moving Image from 0x48200000 to 0x48280000" during booti plus actually defining kernel_comp_size to make booti work. 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).

Quoted 1 line

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#3 lore raw

PATCH v2 2/5 verdin-imx8mm: prepare for optional job ring driver model

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Prepare for optional job ring driver model. Sec may be initialized based on the job ring information processed from the device tree.

---

(no changes since v1)

 board/toradex/verdin-imx8mm/spl.c | 9 +++++++++
 1 file changed, 9 insertions(+)
board/toradex/verdin-imx8mm/spl.c +9 -0
index 243c97e0ba0..685ac94f4ca 100644
@@ -56,6 +56,15 @@ void spl_dram_init(void)
 
 void spl_board_init(void)
 {
+	if (IS_ENABLED(CONFIG_FSL_CAAM)) {
+		struct udevice *dev;
+		int ret;
+
+		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
+		if (ret)
+			printf("Failed to initialize %s: %d\n", dev->name, ret);
+	}
+
 	/* Serial download mode */
 	if (is_usb_boot()) {
 		puts("Back to ROM, SDP\n");
Signature · 1 line
2.35.1
#4 lore raw

PATCH v2 2/5 verdin-imx8mm: prepare for optional job ring driver model

Quoted 4 lines

From: Marcel Ziswiler <[email protected]>
Prepare for optional job ring driver model. Sec may be initialized based on the job ring information processed from the device tree.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#5 lore raw

PATCH v2 3/5 verdin-imx8mm: improve and extend boot devices

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

- Annotate boot devices available in spl_board_boot_device().
- Drop SD3_BOOT/MMC3_BOOT not available for boot on Verdin iMX8M Mini.

---

(no changes since v1)

 board/toradex/verdin-imx8mm/spl.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
board/toradex/verdin-imx8mm/spl.c +2 -6
index 685ac94f4ca..fb9aae6c9c8 100644
@@ -34,14 +34,11 @@ DECLARE_GLOBAL_DATA_PTR;
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
-	case MMC1_BOOT:
+	case MMC1_BOOT: /* eMMC */
 		return BOOT_DEVICE_MMC1;
-	case SD2_BOOT:
+	case SD2_BOOT: /* SD card */
 	case MMC2_BOOT:
 		return BOOT_DEVICE_MMC2;
-	case SD3_BOOT:
-	case MMC3_BOOT:
-		return BOOT_DEVICE_MMC1;
 	case USB_BOOT:
 		return BOOT_DEVICE_BOARD;
 	default:
@@ -83,7 +80,6 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-
 __weak void board_early_init(void)
 {
 	init_uart_clk(0);
Signature · 1 line
2.35.1
#6 lore raw

PATCH v2 3/5 verdin-imx8mm: improve and extend boot devices

Quoted 4 lines

From: Marcel Ziswiler <[email protected]>
- Annotate boot devices available in spl_board_boot_device().
- Drop SD3_BOOT/MMC3_BOOT not available for boot on Verdin iMX8M Mini.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#7 lore raw

PATCH v2 4/5 verdin-imx8mm: various config additions and improvements

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

---

(no changes since v1)

 configs/verdin-imx8mm_defconfig | 35 +++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)
configs/verdin-imx8mm_defconfig +29 -6
index 336d3245988..9e19c4f063b 100644
@@ -14,10 +14,14 @@ CONFIG_TARGET_VERDIN_IMX8MM=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
+CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090
 CONFIG_SPL=y
+CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
 CONFIG_SYS_LOAD_ADDR=0x48280000
 CONFIG_SYS_MEMTEST_START=0x40000000
 CONFIG_SYS_MEMTEST_END=0x80000000
+CONFIG_LTO=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
@@ -25,7 +29,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_SYSTEM_SETUP=y
-# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOOTDELAY=1
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx8mm-verdin-${variant}-${fdt_board}.dtb"
 CONFIG_LOG=y
@@ -54,20 +58,26 @@ CONFIG_SYS_PBSIZE=2081
 # CONFIG_BOOTM_NETBSD is not set
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_CRC32 is not set
+CONFIG_CRC32_VERIFY=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_MD5SUM_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_READ=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_BOOTCOUNT=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
 CONFIG_CMD_UUID=y
+CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
@@ -76,11 +86,13 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_USE_ETHPRIME=y
-CONFIG_ETHPRIME="FEC"
+CONFIG_ETHPRIME="eth0"
 CONFIG_VERSION_VARIABLE=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_SPL_DM=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C40000
 CONFIG_SPL_CLK_COMPOSITE_CCF=y
 CONFIG_CLK_COMPOSITE_CCF=y
 CONFIG_SPL_CLK_IMX8MM=y
@@ -91,12 +103,21 @@ CONFIG_DM_I2C=y
 CONFIG_MISC=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_SPL_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_SPL_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_ES_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_SPL_MMC_HS400_SUPPORT=y
 CONFIG_FSL_USDHC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_PHY_FIXED=y
 CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
@@ -106,7 +127,6 @@ CONFIG_POWER_DOMAIN=y
 CONFIG_IMX8M_POWER_DOMAIN=y
 CONFIG_DM_PMIC=y
 CONFIG_SPL_DM_PMIC_PCA9450=y
-CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
@@ -117,8 +137,11 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
+CONFIG_IMX_TMU=y
 CONFIG_USB=y
-# CONFIG_SPL_DM_USB is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_HOST_ETHER=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_HEXDUMP=y
 CONFIG_OF_LIBFDT_OVERLAY=y
Signature · 1 line
2.35.1
#8 lore raw

PATCH v2 4/5 verdin-imx8mm: various config additions and improvements

Quoted 15 lines

From: Marcel Ziswiler <[email protected]>
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

Quoted 1 line

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#9 lore raw

Re: [PATCH v2 4/5] verdin-imx8mm: various config additions and improvements

Quoted 16 lines · On 18.09.22 22:41, [email protected] wrote:
Quoted 15 lines

From: Marcel Ziswiler <[email protected]>
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

Quoted 1 line
Quoted 2 lines

Applied to u-boot-imx, master, thanks !

Not yet: Patch 4/5 and 5/5 require a rebase, I avoid to do it myself as I cannot then test if it is ok. These two patches are not in my PR, I can pick them up if you repost them.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#10 lore raw

Re: [PATCH v2 4/5] verdin-imx8mm: various config additions and improvements

Hi Stefano

Quoted 17 lines · Stefano Babic
Quoted 16 lines · On 18.09.22 22:41, [email protected] wrote:
Quoted 16 lines

From: Marcel Ziswiler <[email protected]>
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

Quoted 6 lines
Quoted 2 lines

Applied to u-boot-imx, master, thanks !

Not yet: Patch 4/5 and 5/5 require a rebase, I avoid to do it myself as I cannot then test if it is ok. These two patches are not in my PR, I can pick them up if you repost them.

Sure.

Sorry, I missed this email as you missed CCing anybody else (e.g. like my work email).

Plus you probably missed this:

https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/#2953792

Anyway, I will send an additional series including Patch 4/5, Patch 5/5 and fixing v2 vs. v1 (and more).

Thanks!

Quoted 2 lines

Best regards,
Stefano Babic

Cheers

Marcel

#11 lore raw

Re: [PATCH v2 4/5] verdin-imx8mm: various config additions and improvements

Quoted 23 lines · Marcel Ziswiler

Hi Stefano

Quoted 20 lines · Stefano Babic
Quoted 18 lines · On 18.09.22 22:41, [email protected] wrote:
Quoted 15 lines

From: Marcel Ziswiler <[email protected]>
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

Quoted 1 line

Applied to u-boot-imx, master, thanks !

Quoted 8 lines
Quoted 3 lines

Not yet: Patch 4/5 and 5/5 require a rebase, I avoid to do it myself as I cannot then test if it is ok. These two patches are not in my PR, I can pick them up if you repost them.

Sure.

Sorry, I missed this email as you missed CCing anybody else (e.g. like my work email).

Sorry, you're right.

Quoted 5 lines

Plus you probably missed this:

https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/#2953792

Anyway, I will send an additional series including Patch 4/5, Patch 5/5 and fixing v2 vs. v1 (and more).

Thanks !

Regards,
Stefano

Quoted 9 lines

Thanks!

Quoted 2 lines

Best regards,
Stefano Babic

Cheers

Marcel

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#12 lore raw

Re: [PATCH v2 4/5] verdin-imx8mm: various config additions and improvements

Quoted 28 lines · Stefano Babic
Quoted 27 lines · Marcel Ziswiler

Hi Stefano

Quoted 23 lines · Stefano Babic
Quoted 16 lines · On 18.09.22 22:41, [email protected] wrote:
Quoted 15 lines

From: Marcel Ziswiler <[email protected]>
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

Quoted 1 line
Quoted 2 lines

Applied to u-boot-imx, master, thanks !

Not yet: Patch 4/5 and 5/5 require a rebase, I avoid to do it myself as I cannot then test if it is ok. These two patches are not in my PR, I can pick them up if you repost them.

Quoted 12 lines
Quoted 4 lines

Sure.

Sorry, I missed this email as you missed CCing anybody else (e.g. like my work email).

Sorry, you're right.

Quoted 5 lines

Plus you probably missed this:

https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/#2953792

Anyway, I will send an additional series including Patch 4/5, Patch 5/5 and fixing v2 vs. v1 (and more).

https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/

Quoted 14 lines

Thanks !

Regards,
Stefano

Quoted 9 lines

Thanks!

Quoted 2 lines

Best regards,
Stefano Babic

Cheers

Marcel

#13 lore raw

PATCH v2 5/5 verdin-imx8mp: various config additions and improvements

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable CRC32 and MD5
- enable time commands
- enable GPIO LED support
- enable further eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- enable USB host functionality
- enable thermal management unit driver
- enable hexdump

---

(no changes since v1)

 configs/verdin-imx8mp_defconfig | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)
configs/verdin-imx8mp_defconfig +29 -4
index 993153267a6..171d6a4c42b 100644
@@ -18,7 +18,10 @@ CONFIG_TARGET_VERDIN_IMX8MP=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
+CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090
 CONFIG_SPL=y
+CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
 CONFIG_SYS_LOAD_ADDR=0x48280000
@@ -65,7 +68,9 @@ CONFIG_SYS_PBSIZE=2081
 # CONFIG_BOOTM_NETBSD is not set
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_CRC32 is not set
+CONFIG_CRC32_VERIFY=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_MD5SUM_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_CLK=y
 CONFIG_CMD_FUSE=y
@@ -74,12 +79,14 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_READ=y
 CONFIG_CMD_USB=y
+CONFIG_CMD_BOOTCOUNT=y
 CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
 CONFIG_CMD_UUID=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 # CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
@@ -97,7 +104,7 @@ CONFIG_SPL_DM=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_BOOTCOUNT_LIMIT=y
-CONFIG_BOOTCOUNT_ENV=y
+CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C40000
 CONFIG_CLK_COMPOSITE_CCF=y
 CONFIG_CLK_IMX8MP=y
 CONFIG_GPIO_HOG=y
@@ -106,30 +113,39 @@ CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
 # CONFIG_SPL_DM_I2C is not set
 CONFIG_SPL_SYS_I2C_LEGACY=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
 CONFIG_MISC=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_SPL_MMC_IO_VOLTAGE=y
 CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_SPL_MMC_UHS_SUPPORT=y
 CONFIG_MMC_HS400_ES_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_SPL_MMC_HS400_SUPPORT=y
 CONFIG_FSL_USDHC=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_PHY_FIXED=y
 CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_DM_ETH_PHY=y
 CONFIG_DWC_ETH_QOS=y
 CONFIG_DWC_ETH_QOS_IMX=y
 CONFIG_FEC_MXC=y
 CONFIG_RGMII=y
 CONFIG_MII=y
+CONFIG_PHY_IMX8MQ_USB=y
 CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_SPL_POWER_LEGACY=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_IMX8M_POWER_DOMAIN=y
+CONFIG_IMX8MP_HSIOMIX_BLKCTRL=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
@@ -141,8 +157,17 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
 CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_DM_THERMAL=y
+CONFIG_IMX_TMU=y
 CONFIG_USB=y
-# CONFIG_SPL_DM_USB is not set
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_XHCI_DWC3_OF_SIMPLE=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_MXC_USB_OTG_HACTIVE=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_KEYBOARD=y
+CONFIG_USB_HOST_ETHER=y
 CONFIG_IMX_WATCHDOG=y
+CONFIG_HEXDUMP=y
 CONFIG_OF_LIBFDT_OVERLAY=y
Signature · 1 line
2.35.1
#14 lore raw
In reply to Marcel Ziswiler

Hi there

Quoted 1 line · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Please disregard this version 2 as version 1 [1] is/was just fine. I meanwhile found out that it is actually a property of the kernel binary whether or not any additional moving/relocation will (need) to be done [2].

Thanks!

[1] https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
[2] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/lib/image.c#L48

Cheers

Marcel

Quoted 26 lines

Various additions and improvements for the Verdin iMX8M Mini and Verdin iMX8M Plus:

- updated env memory layout
- verdin-imx8mm: prepare for optional job ring driver model
- verdin-imx8mm: improve and extend boot devices
- various config additions and improvements

Changes in v2:
- Moved loadaddr by an additional 0.5MB to avoid "Moving Image from 0x48200000 to 0x48280000" during booti plus increasing kernel_comp_size by same 0.5MB.

Marcel Ziswiler (5):
  verdin-imx8mm: verdin-imx8mp: update env memory layout
  verdin-imx8mm: prepare for optional job ring driver model
  verdin-imx8mm: improve and extend boot devices
  verdin-imx8mm: various config additions and improvements
  verdin-imx8mp: various config additions and improvements

 board/toradex/verdin-imx8mm/spl.c | 17 +++++++++-----

 configs/verdin-imx8mm_defconfig   | 37 +++++++++++++++++++++++++------
 configs/verdin-imx8mp_defconfig   | 35 ++++++++++++++++++++++++-----
 include/configs/verdin-imx8mm.h   | 10 +++++----
 include/configs/verdin-imx8mp.h   | 10 +++++----
 5 files changed, 83 insertions(+), 26 deletions(-)