ARM: dts: imx: Make DRAM coding GPIOs available in all phases on Data Modul i.MX8M Mini/Plus eDM SBC
Subsystems (2)
PATCH 1/4 ARM: dts: imx: Make DRAM coding GPIOs available in all phases on Data Modul i.MX8M Mini/Plus eDM SBC
The DRAM configuration GPIO straps must be accessible in all boot phases because the GPIOs are sampled both in U-Boot SPL as well as early on in U-Boot proper. The already present bootph-pre-ram DT property made the GPIO controllers available in SPL, but not early on in U-Boot proper, which made gpio_request_list_by_name_nodev() in board dmo_get_memcfg() fail. Add missing bootph-all DT property to all GPIO controllers which are referenced in dmo,ram-coding-gpios DT property to make those GPIO controllers available early in U-Boot proper as well.
---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
NOTE: For v2025.01
--- arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi | 1 + arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi | 2 ++ 2 files changed, 3 insertions(+)
arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi +1 -0
@@ -77,6 +77,7 @@ &gpio2 { bootph-pre-ram; + bootph-all; dsi-reset-hog { bootph-pre-ram;
arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi +2 -0
@@ -64,6 +64,7 @@ &gpio3 { bootph-pre-ram; + bootph-all; bl-enable-hog { bootph-pre-ram;
@@ -92,6 +93,7 @@ &gpio4 { bootph-pre-ram; + bootph-all; dsi-reset-hog { bootph-pre-ram;
Signature · 1 line
2.45.2
PATCH 2/4 ARM: dts: imx: Pick safe DRAM size on failure on Data Modul i.MX8M Mini/Plus eDM SBC
In case gpio_request_list_by_name_nodev() in board dmo_get_memcfg() returns error code, pick a safe default DRAM configuration instead of bailing out with some sort of hang() or panic(). The BIT(2)|BIT(0) strap option is the lowest known option of 2 GiB , use that.
---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
NOTE: For v2025.01
--- board/data_modul/common/common.c | 3 +++ 1 file changed, 3 insertions(+)
board/data_modul/common/common.c +3 -0
@@ -47,6 +47,9 @@ u8 dmo_get_memcfg(void)"dmo,ram-coding-gpios" , gpio,ARRAY_SIZE (gpio), GPIOD_IS_IN); +if (ret <0 ) +return BIT (2 ) |BIT (0 ); +for (i =0 ; i < ret; i++) memcfg |= !!dm_gpio_get_value (&(gpio[i])) << i;
Signature · 1 line
2.45.2
PATCH 3/4 ARM: imx: Perform plain boot in altbootcmd on Data Modul i.MX8M Mini/Plus eDM SBC
In reply to Marek VasutThe current A/B switching preparatory altbootcmd is confusing to users, replace it with plain 'run bootcmd' which can be replaced by proper A/B switching altbootcmd when the matching updater is added on top of the platform. By default, keep the boot counter incrementing, but do not do any A/B partition switching.
---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
NOTE: For v2025.01
--- include/configs/imx8mm_data_modul_edm_sbc.h | 2 +- include/configs/imx8mp_data_modul_edm_sbc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/configs/imx8mm_data_modul_edm_sbc.h +1 -1
@@ -34,7 +34,7 @@#define CFG_SYS_FSL_ESDHC_ADDR 0#define CFG_EXTRA_ENV_SETTINGS \ - "altbootcmd=setenv devpart 2 && run bootcmd ; reset\0" \ + "altbootcmd=run bootcmd\0" \ "bootlimit=3\0" \ "devtype=mmc\0" \ "devpart=1\0" \
include/configs/imx8mp_data_modul_edm_sbc.h +1 -1
@@ -24,7 +24,7 @@#define FEC_QUIRK_ENET_MAC #define CFG_EXTRA_ENV_SETTINGS \ - "altbootcmd=setenv devpart 2 && run bootcmd ; reset\0" \ + "altbootcmd=run bootcmd\0" \ "bootlimit=3\0" \ "devtype=mmc\0" \ "devpart=1\0" \
Signature · 1 line
2.45.2
PATCH 4/4 ARM: imx: Deduplicate Data Modul i.MX8M eDM SBC defconfigs
In reply to Marek VasutDeduplicate defconfigs for all Data Modul i.MX8M eDM SBC systems by factoring out the common parts into generic imx8m_data_modul.config and including those using the #include <configs/...> preprocessor macro in the current set of board specific defconfigs. The preprocessor macro is applicable to defconfigs as well.
This introduces no functional change, the resulting .config is identical for all Data Modul i.MX8M eDM SBC systems.
---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
NOTE: Would be nice to have in v2025.01
--- configs/imx8m_data_modul.config | 217 +++++++++++++++++++ configs/imx8mm_data_modul_edm_sbc_defconfig | 219 +------------------- configs/imx8mp_data_modul_edm_sbc_defconfig | 219 +------------------- 3 files changed, 221 insertions(+), 434 deletions(-) create mode 100644 configs/imx8m_data_modul.config
configs/imx8m_data_modul.config new file +217 -0
@@ -0,0 +1,217 @@ +# CONFIG_BOOTM_NETBSD is not set +# CONFIG_BOOTM_PLAN9 is not set +# CONFIG_BOOTM_RTEMS is not set +# CONFIG_BOOTM_VXWORKS is not set +# CONFIG_CMD_EXPORTENV is not set +# CONFIG_INPUT is not set +# CONFIG_SPI_FLASH_UNLOCK_ALL is not set +# CONFIG_SPL_DM_USB is not set +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_ARCH_IMX8M=y +CONFIG_ARCH_MISC_INIT=y +CONFIG_ARM=y +CONFIG_BOARD_LATE_INIT=y +CONFIG_BOOTCOMMAND="run dmo_update_env ; load ${devtype} ${devnum}:${devpart} ${loadaddr} boot/fitImage && source ${loadaddr}:bootscr-boot.cmd ; reset" +CONFIG_BOOTCOUNT_BOOTLIMIT=3 +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_CLK_COMPOSITE_CCF=y +CONFIG_CMD_ASKENV=y +CONFIG_CMD_BKOPS_ENABLE=y +CONFIG_CMD_BOOTCOUNT=y +CONFIG_CMD_BTRFS=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_CAT=y +CONFIG_CMD_CLK=y +CONFIG_CMD_DFU=y +CONFIG_CMD_DHCP6=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_EEPROM=y +CONFIG_CMD_ERASEENV=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_FS_UUID=y +CONFIG_CMD_FUSE=y +CONFIG_CMD_GETTIME=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +CONFIG_CMD_GPT_RENAME=y +CONFIG_CMD_I2C=y +CONFIG_CMD_KASLRSEED=y +CONFIG_CMD_LSBLK=y +CONFIG_CMD_MBR=y +CONFIG_CMD_MD5SUM=y +CONFIG_CMD_MEMTEST=y +CONFIG_CMD_MII=y +CONFIG_CMD_MMC=y +CONFIG_CMD_MTD=y +CONFIG_CMD_MTDPARTS=y +CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y +CONFIG_CMD_PART=y +CONFIG_CMD_PING=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_PXE=y +CONFIG_CMD_READ=y +CONFIG_CMD_REGULATOR=y +CONFIG_CMD_SHA1SUM=y +CONFIG_CMD_SMC=y +CONFIG_CMD_SPI=y +CONFIG_CMD_SYSBOOT=y +CONFIG_CMD_TFTPPUT=y +CONFIG_CMD_TIME=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_USB_SDP=y +CONFIG_CMD_UUID=y +CONFIG_CMD_WGET=y +CONFIG_CMD_XXD=y +CONFIG_CONSOLE_MUX=y +CONFIG_CRC32_VERIFY=y +CONFIG_DFU_MMC=y +CONFIG_DFU_MTD=y +CONFIG_DFU_RAM=y +CONFIG_DFU_TFTP=y +CONFIG_DFU_TIMEOUT=y +CONFIG_DM_ETH_PHY=y +CONFIG_DM_GPIO=y +CONFIG_DM_I2C=y +CONFIG_DM_MDIO=y +CONFIG_DM_MTD=y +CONFIG_DM_PMIC=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_RESET=y +CONFIG_DM_RNG=y +CONFIG_DM_RTC=y +CONFIG_DM_SERIAL=y +CONFIG_DM_SPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_DM_THERMAL=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_OFFSET=0xFFFC0000 +CONFIG_ENV_OFFSET_REDUND=0xFFFC0000 +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_SIZE=0x40000 +CONFIG_ENV_VARS_UBOOT_CONFIG=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_FASTBOOT_BUF_ADDR=0x42800000 +CONFIG_FASTBOOT_BUF_SIZE=0x20000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 +CONFIG_FEC_MXC=y +CONFIG_FIT=y +CONFIG_FIT_EXTERNAL_OFFSET=0x3000 +CONFIG_FSL_CAAM=y +CONFIG_FSL_USDHC=y +CONFIG_GPIO_HOG=y +CONFIG_HASH_VERIFY=y +CONFIG_HUSH_PARSER=y +CONFIG_I2C_EEPROM=y +CONFIG_IMX8M_POWER_DOMAIN=y +CONFIG_IMX_BOOTAUX=y +CONFIG_IMX_TMU=y +CONFIG_IMX_WATCHDOG=y +CONFIG_IPV6=y +CONFIG_IP_DEFRAG=y +CONFIG_MD5SUM_VERIFY=y +CONFIG_MII=y +CONFIG_MMC_HS400_ES_SUPPORT=y +CONFIG_MMC_HS400_SUPPORT=y +CONFIG_MMC_IO_VOLTAGE=y +CONFIG_MMC_SPEED_MODE_SET=y +CONFIG_MMC_UHS_SUPPORT=y +CONFIG_MTD=y +CONFIG_MTDIDS_DEFAULT="nor0=flash@0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=flash@0:-(sf)" +CONFIG_MXC_GPIO=y +CONFIG_MXC_SPI=y +CONFIG_MXC_UART=y +CONFIG_NETCONSOLE=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_OF_CONTROL=y +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_OF_SYSTEM_SETUP=y +CONFIG_PARTITION_TYPE_GUID=y +CONFIG_PHY_ANEG_TIMEOUT=20000 +CONFIG_PHY_ATHEROS=y +CONFIG_PHY_BROADCOM=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_DOMAIN=y +CONFIG_PROT_TCP_SACK=y +CONFIG_REGMAP=y +CONFIG_RGMII=y +CONFIG_RTC_M41T62=y +CONFIG_SF_DEFAULT_SPEED=50000000 +CONFIG_SHA1SUM_VERIFY=y +CONFIG_SPI=y +CONFIG_SPI_FLASH_MTD=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPL=y +CONFIG_SPL_CLK_COMPOSITE_CCF=y +CONFIG_SPL_DM=y +CONFIG_SPL_DM_REGULATOR=y +CONFIG_SPL_DRIVERS_MISC=y +CONFIG_SPL_GPIO=y +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y +CONFIG_SPL_I2C=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_MMC=y +CONFIG_SPL_MMC_IO_VOLTAGE=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_SPL_PINCTRL=y +CONFIG_SPL_POWER=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_SYSRESET=y +CONFIG_SPL_SYS_MALLOC=y +CONFIG_SPL_SYS_MMCSD_RAW_MODE=y +CONFIG_SPL_WATCHDOG=y +CONFIG_SUPPORT_EMMC_BOOT=y +CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_SYSCON=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_PSCI=y +CONFIG_SYSRESET_WATCHDOG=y +CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090 +CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C40000 +CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y +CONFIG_SYS_BOOTM_LEN=0x8000000 +CONFIG_SYS_CBSIZE=2048 +CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y +CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=6 +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=20 +CONFIG_SYS_EEPROM_SIZE=16384 +CONFIG_SYS_I2C_EEPROM_ADDR=0x50 +CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 +CONFIG_SYS_MALLOC_LEN=0x1000000 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 +CONFIG_SYS_MMC_ENV_PART=1 +CONFIG_SYS_MONITOR_LEN=1048576 +CONFIG_SYS_PROMPT="u-boot=> " +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_TEXT_BASE=0x40200000 +CONFIG_TFTP_TSIZE=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_FUNCTION_ACM=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="Data Modul" +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_HUB_USB251XB=y +CONFIG_USB_STORAGE=y +CONFIG_USE_BOOTARGS=y +CONFIG_USE_BOOTCOMMAND=y +CONFIG_USE_PREBOOT=y +CONFIG_VERSION_VARIABLE=y
configs/imx8mm_data_modul_edm_sbc_defconfig +2 -217
244 lines not on this page · raw message
configs/imx8mp_data_modul_edm_sbc_defconfig +2 -217
273 lines not on this page · raw message
Signature · 1 line
2.45.2
Hi Marek,
Quoted 32 lines · Marek Vasut
The DRAM configuration GPIO straps must be accessible in all boot phases because the GPIOs are sampled both in U-Boot SPL as well as early on in U-Boot proper. The already present bootph-pre-ram DT property made the GPIO controllers available in SPL, but not early on in U-Boot proper, which made
gpio_request_list_by_name_nodev()in boarddmo_get_memcfg()fail. Add missing bootph-all DT property to all GPIO controllers which are referenced in dmo,ram-coding-gpios DT property to make those GPIO controllers available early in U-Boot proper as well.Fixes 8c103c33fb14 ("dm: dts: Convert driver model tags to use new schema")Signed-off-by Marek Vasut <[email protected]>---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
NOTE: For v2025.01--- arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi | 1 + arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi | 2 ++ 2 files changed, 3 insertions(+)arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi +0
-0
arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi line 80
Quoted 4 lines
arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi +1
-0@@ -77,6 +77,7 @@ &gpio2 { bootph-pre-ram; + bootph-all;
aren't those supposed to be bootph-some-ram for matching U-Boot proper pre-reloc? bootph-all would enable it in TPL as well (if there's one on imx8mp).
https://docs.u-boot.org/en/latest/develop/driver-model/design.html#pre-relocation-support
If not, isn't bootph-pre-ram implied when bootph-all is selected?
Cheers,
Quentin
Quoted 41 lines · Quentin Schulz
Hi Marek,
Quoted 32 lines · Marek Vasut
The DRAM configuration GPIO straps must be accessible in all boot phases because the GPIOs are sampled both in U-Boot SPL as well as early on in U-Boot proper. The already present bootph-pre-ram DT property made the GPIO controllers available in SPL, but not early on in U-Boot proper, which made
gpio_request_list_by_name_nodev()in boarddmo_get_memcfg()fail. Add missing bootph-all DT property to all GPIO controllers which are referenced in dmo,ram-coding-gpios DT property to make those GPIO controllers available early in U-Boot proper as well.Fixes 8c103c33fb14 ("dm: dts: Convert driver model tags to use new schema")Signed-off-by Marek Vasut <[email protected]>---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Quentin Schulz <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
NOTE: For v2025.01
---
arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi| 1 +arch/arm/dts/imx8mp-data-modul-edm-sbc-u-boot.dtsi| 2 ++2 files changed, 3 insertions(+)arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi +0
-0arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi line 79
Quoted 3 lines
arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi +1
-0@@ -77,6 +77,7 @@ &gpio2 { bootph-pre-ram; + bootph-all;aren't those supposed to be bootph-some-ram for matching U-Boot proper pre-reloc? bootph-all would enable it in TPL as well (if there's one on imx8mp).
Quoted 3 lines
https://docs.u-boot.org/en/latest/develop/driver-model/design.html#pre- relocation-support
If not, isn't bootph-pre-ram implied when bootph-all is selected?
Fixed in v2 via bootph-some-ram , thanks .
Fabio Estevam
reviewerHi Marek,
Quoted 10 lines · Marek Vasut
The DRAM configuration GPIO straps must be accessible in all boot phases because the GPIOs are sampled both in U-Boot SPL as well as early on in U-Boot proper. The already present bootph-pre-ram DT property made the GPIO controllers available in SPL, but not early on in U-Boot proper, which made
gpio_request_list_by_name_nodev()in boarddmo_get_memcfg()fail. Add missing bootph-all DT property to all GPIO controllers which are referenced in dmo,ram-coding-gpios DT property to make those GPIO controllers available early in U-Boot proper as well.
Quoted 2 lines
Fixes 8c103c33fb14 ("dm: dts: Convert driver model tags to use new schema")Signed-off-by Marek Vasut <[email protected]>
I'm getting CI errors with this series applied:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/962602
Please check and resend.
Quoted 13 lines · Fabio Estevam
Hi Marek,
Quoted 10 lines · Marek Vasut
The DRAM configuration GPIO straps must be accessible in all boot phases because the GPIOs are sampled both in U-Boot SPL as well as early on in U-Boot proper. The already present bootph-pre-ram DT property made the GPIO controllers available in SPL, but not early on in U-Boot proper, which made
gpio_request_list_by_name_nodev()in boarddmo_get_memcfg()fail. Add missing bootph-all DT property to all GPIO controllers which are referenced in dmo,ram-coding-gpios DT property to make those GPIO controllers available early in U-Boot proper as well.
Quoted 8 lines
Quoted 2 lines
Fixes 8c103c33fb14 ("dm: dts: Convert driver model tags to use new schema")Signed-off-by Marek Vasut <[email protected]>I'm getting CI errors with this series applied:
https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/962602
Please check and resend.
Fixed in V2 by adding CONFIG_ARM and CONFIG_ARCH_IMX8M to each defconfig , so buildman would recognize them as arm64 targets.