u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] verdin-imx8mm: verdin-imx8mp: various additions and improvements
@ 2022-09-22 21:28 Marcel Ziswiler
  2022-09-22 21:28 ` [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again) Marcel Ziswiler
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Marcel Ziswiler @ 2022-09-22 21:28 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>


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 (already
  applied)
- verdin-imx8mm: improve and extend boot devices (already applied)
- various config additions and improvements

Changes in v3:
- Moved loadaddr back by 0.5MB as 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. However, a pre-maturely
  applied v2 did not take that into account as of yet [1].
[1] https://patchwork.ozlabs.org/project/uboot/cover/20220822130604.843081-1-marcel@ziswiler.com/#2953792
- Drop SNVS_LP general purpose register LPGPR0 based bootcount
  integration in favour of using the environment based one as that is
  what our update system uses.
- Update patch 1 again after wrong version got pre-maturely epplied.
- Drop patches 2 and 3 which already got applied.
- Drop SNVS_LP general purpose register LPGPR0 based bootcount
  integration in favour of using the environment based one as that is
  what our update system uses.

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 (3):
  verdin-imx8mm: verdin-imx8mp: update env memory layout (again)
  verdin-imx8mm: various config additions and improvements
  verdin-imx8mp: various config additions and improvements

 configs/verdin-imx8mm_defconfig |  7 ++-----
 configs/verdin-imx8mp_defconfig | 30 ++++++++++++++++++++++++++----
 include/configs/verdin-imx8mm.h |  2 +-
 include/configs/verdin-imx8mp.h |  2 +-
 4 files changed, 30 insertions(+), 11 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again)
  2022-09-22 21:28 [PATCH v3 0/3] verdin-imx8mm: verdin-imx8mp: various additions and improvements Marcel Ziswiler
@ 2022-09-22 21:28 ` Marcel Ziswiler
  2022-10-24 13:54   ` sbabic
  2022-09-22 21:28 ` [PATCH v3 2/3] verdin-imx8mm: various config additions and improvements Marcel Ziswiler
  2022-09-22 21:28 ` [PATCH v3 3/3] verdin-imx8mp: " Marcel Ziswiler
  2 siblings, 1 reply; 7+ messages in thread
From: Marcel Ziswiler @ 2022-09-22 21:28 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

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

- loadaddr=0x48200000 allows for 128MB area for uncompressing (ie FIT
  images, kernel_comp_addr_r, kernel_comp_size)
- 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

Memory layout taken from commit fd5c7173ade4
("imx8m{m,n}_venice: update env memory layout").

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

Note that this corrects a pre-maturely applied version 2 of the same
patch set.

Fixes: bbe0089d29e ("verdin-imx8mm: verdin-imx8mp: update env memory layout")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v3:
- Moved loadaddr back by 0.5MB as 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. However, a pre-maturely
  applied v2 did not take that into account as of yet [1].
[1] https://patchwork.ozlabs.org/project/uboot/cover/20220822130604.843081-1-marcel@ziswiler.com/#2953792

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 | 2 +-
 include/configs/verdin-imx8mp.h | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index f65b4a7f307..9b9b684ccbc 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -19,7 +19,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090
 CONFIG_SPL=y
 CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
-CONFIG_SYS_LOAD_ADDR=0x48280000
+CONFIG_SYS_LOAD_ADDR=0x48200000
 CONFIG_SYS_MEMTEST_START=0x40000000
 CONFIG_SYS_MEMTEST_END=0x80000000
 CONFIG_LTO=y
diff --git a/configs/verdin-imx8mp_defconfig b/configs/verdin-imx8mp_defconfig
index 5d0c57c52e4..071a2223d41 100644
--- a/configs/verdin-imx8mp_defconfig
+++ b/configs/verdin-imx8mp_defconfig
@@ -22,7 +22,7 @@ CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
-CONFIG_SYS_LOAD_ADDR=0x48280000
+CONFIG_SYS_LOAD_ADDR=0x48200000
 CONFIG_SYS_MEMTEST_START=0x40000000
 CONFIG_SYS_MEMTEST_END=0x80000000
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h
index 4d20b86591f..ec893763215 100644
--- a/include/configs/verdin-imx8mm.h
+++ b/include/configs/verdin-imx8mm.h
@@ -23,7 +23,7 @@
 	"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" \
+	"kernel_comp_size=0x08000000\0" \
 	"ramdisk_addr_r=0x50300000\0" \
 	"scriptaddr=0x50280000\0"
 
diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h
index 9b8db223bb2..959c15f598e 100644
--- a/include/configs/verdin-imx8mp.h
+++ b/include/configs/verdin-imx8mp.h
@@ -37,7 +37,7 @@
 	"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" \
+	"kernel_comp_size=0x08000000\0" \
 	"ramdisk_addr_r=0x50300000\0" \
 	"scriptaddr=0x50280000\0"
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/3] verdin-imx8mm: various config additions and improvements
  2022-09-22 21:28 [PATCH v3 0/3] verdin-imx8mm: verdin-imx8mp: various additions and improvements Marcel Ziswiler
  2022-09-22 21:28 ` [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again) Marcel Ziswiler
@ 2022-09-22 21:28 ` Marcel Ziswiler
  2022-10-24 13:55   ` sbabic
  2022-09-22 21:28 ` [PATCH v3 3/3] verdin-imx8mp: " Marcel Ziswiler
  2 siblings, 1 reply; 7+ messages in thread
From: Marcel Ziswiler @ 2022-09-22 21:28 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

- enable bootcount command
- 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

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v3:
- Drop SNVS_LP general purpose register LPGPR0 based bootcount
  integration in favour of using the environment based one as that is
  what our update system uses.

 configs/verdin-imx8mm_defconfig | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index 9b9b684ccbc..25cd59b185e 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -15,10 +15,7 @@ CONFIG_SYS_PROMPT="Verdin iMX8MM # "
 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=0x48200000
 CONFIG_SYS_MEMTEST_START=0x40000000
 CONFIG_SYS_MEMTEST_END=0x80000000
@@ -92,7 +89,7 @@ CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_SPL_DM=y
 CONFIG_BOOTCOUNT_LIMIT=y
-CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C40000
+CONFIG_BOOTCOUNT_ENV=y
 CONFIG_SPL_CLK_COMPOSITE_CCF=y
 CONFIG_CLK_COMPOSITE_CCF=y
 CONFIG_SPL_CLK_IMX8MM=y
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 3/3] verdin-imx8mp: various config additions and improvements
  2022-09-22 21:28 [PATCH v3 0/3] verdin-imx8mm: verdin-imx8mp: various additions and improvements Marcel Ziswiler
  2022-09-22 21:28 ` [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again) Marcel Ziswiler
  2022-09-22 21:28 ` [PATCH v3 2/3] verdin-imx8mm: various config additions and improvements Marcel Ziswiler
@ 2022-09-22 21:28 ` Marcel Ziswiler
  2022-10-24 13:54   ` sbabic
  2 siblings, 1 reply; 7+ messages in thread
From: Marcel Ziswiler @ 2022-09-22 21:28 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

- enable bootcount command
- 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

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v3:
- Update patch 1 again after wrong version got pre-maturely epplied.
- Drop patches 2 and 3 which already got applied.
- Drop SNVS_LP general purpose register LPGPR0 based bootcount
  integration in favour of using the environment based one as that is
  what our update system uses.

 configs/verdin-imx8mp_defconfig | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/configs/verdin-imx8mp_defconfig b/configs/verdin-imx8mp_defconfig
index 071a2223d41..c476b734573 100644
--- a/configs/verdin-imx8mp_defconfig
+++ b/configs/verdin-imx8mp_defconfig
@@ -65,7 +65,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 +76,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
@@ -106,29 +110,38 @@ 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_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
@@ -140,8 +153,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
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 3/3] verdin-imx8mp: various config additions and improvements
  2022-09-22 21:28 ` [PATCH v3 3/3] verdin-imx8mp: " Marcel Ziswiler
@ 2022-10-24 13:54   ` sbabic
  0 siblings, 0 replies; 7+ messages in thread
From: sbabic @ 2022-10-24 13:54 UTC (permalink / raw)
  To: Marcel Ziswiler, u-boot

> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> - enable bootcount command
> - 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
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again)
  2022-09-22 21:28 ` [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again) Marcel Ziswiler
@ 2022-10-24 13:54   ` sbabic
  0 siblings, 0 replies; 7+ messages in thread
From: sbabic @ 2022-10-24 13:54 UTC (permalink / raw)
  To: Marcel Ziswiler, u-boot

> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Update the distro config env memory layout for the Verdin iMX8M Mini and
> Verdin iMX8M Plus again:
> - loadaddr=0x48200000 allows for 128MB area for uncompressing (ie FIT
>   images, kernel_comp_addr_r, kernel_comp_size)
> - 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
> Memory layout taken from commit fd5c7173ade4
> ("imx8m{m,n}_venice: update env memory layout").
> 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).
> Note that this corrects a pre-maturely applied version 2 of the same
> patch set.
> Fixes: bbe0089d29e ("verdin-imx8mm: verdin-imx8mp: update env memory layout")
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 2/3] verdin-imx8mm: various config additions and improvements
  2022-09-22 21:28 ` [PATCH v3 2/3] verdin-imx8mm: various config additions and improvements Marcel Ziswiler
@ 2022-10-24 13:55   ` sbabic
  0 siblings, 0 replies; 7+ messages in thread
From: sbabic @ 2022-10-24 13:55 UTC (permalink / raw)
  To: Marcel Ziswiler, u-boot

> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> - enable bootcount command
> - 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
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-24 14:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 21:28 [PATCH v3 0/3] verdin-imx8mm: verdin-imx8mp: various additions and improvements Marcel Ziswiler
2022-09-22 21:28 ` [PATCH v3 1/3] verdin-imx8mm: verdin-imx8mp: update env memory layout (again) Marcel Ziswiler
2022-10-24 13:54   ` sbabic
2022-09-22 21:28 ` [PATCH v3 2/3] verdin-imx8mm: various config additions and improvements Marcel Ziswiler
2022-10-24 13:55   ` sbabic
2022-09-22 21:28 ` [PATCH v3 3/3] verdin-imx8mp: " Marcel Ziswiler
2022-10-24 13:54   ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).