All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
@ 2022-12-12  0:09 Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 01/16] apalis-imx8: fix booting caused by missing dm_event Marcel Ziswiler
                   ` (16 more replies)
  0 siblings, 17 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot
  Cc: Marcel Ziswiler, Fabio Estevam, Heinrich Schuchardt,
	NXP i.MX U-Boot Team, Stefano Babic

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


This series fixes a boot issue and refreshes Apalis iMX8 support as
follows:
- fix booting caused by missing DM_EVENT
- implement PCB version and SoC variant handling
- turn off LCD backlight before OS handover
- display build info
- provide proper prompt
- set bootdelay
- add overlays support
- remove global environment variable script
- enable environment bootcount limit
- update SPDX license identifier string
- remove obsolete SDHC related config defines
- remove obsolete net usb start
- introduce setup setting setupargs
- drop obsolete environment variables
- update update_uboot confirmation message
- update env memory layout


Igor Opaniuk (1):
  apalis-imx8: provide proper config_sys_prompt

Marcel Ziswiler (13):
  apalis-imx8: fix booting caused by missing dm_event
  apalis-imx8: implement pcb version and soc variant handling
  apalis-imx8: turn off lcd backlight before os handover
  apalis-imx8: display build info
  apalis-imx8: set bootdelay
  apalis-imx8: enable environment bootcount limit
  apalis-imx8: update spdx license identifier string
  apalis-imx8: remove obsolete sdhc related config defines
  apalis-imx8: remove obsolete net usb start
  apalis-imx8: introduce setup setting setupargs
  apalis-imx8: drop obsolete environment variables
  apalis-imx8: update update_uboot confirmation message
  apalis-imx8: update env memory layout

Oleksandr Suvorov (2):
  apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
  apalis/colibri-imx8/8x: remove global variable script

 arch/arm/dts/fsl-imx8qm-apalis.dts            |   4 +-
 board/toradex/apalis-imx8/Makefile            |   4 +-
 .../apalis-imx8/apalis-imx8-imximage.cfg      |   4 +-
 board/toradex/apalis-imx8/apalis-imx8.c       | 129 +++++++++++++++++-
 configs/apalis-imx8_defconfig                 |  10 +-
 configs/colibri-imx8x_defconfig               |   1 +
 include/configs/apalis-imx8.h                 |  45 ++----
 include/configs/colibri-imx8x.h               |   1 -
 8 files changed, 156 insertions(+), 42 deletions(-)

-- 
2.35.1


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

* [PATCH v1 01/16] apalis-imx8: fix booting caused by missing dm_event
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 02/16] apalis-imx8: implement pcb version and soc variant handling Marcel Ziswiler
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler, Heinrich Schuchardt

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

Without the DM_EVENT absolutely no output whatsoever and the system does
not boot at all.

Fixes: c5ef2025579e ("dm: fix DM_EVENT dependencies")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

 configs/apalis-imx8_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index 6226d50c8ac..b2f8416e326 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -22,6 +22,7 @@ CONFIG_OF_SYSTEM_SETUP=y
 CONFIG_LOG=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_EVENT=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SYS_MAXARGS=64
 CONFIG_SYS_CBSIZE=2048
-- 
2.35.1


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

* [PATCH v1 02/16] apalis-imx8: implement pcb version and soc variant handling
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 01/16] apalis-imx8: fix booting caused by missing dm_event Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 03/16] apalis-imx8: turn off lcd backlight before os handover Marcel Ziswiler
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Implement PCB version and SoC variant handling which automatically loads
the correct device tree for the Linux kernel.

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

 board/toradex/apalis-imx8/apalis-imx8.c | 104 +++++++++++++++++++++++-
 configs/apalis-imx8_defconfig           |   2 +
 include/configs/apalis-imx8.h           |   3 +-
 3 files changed, 106 insertions(+), 3 deletions(-)

diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index 408198843fd..d4be999e24d 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -15,10 +15,12 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <command.h>
 #include <env.h>
 #include <errno.h>
-#include <linux/libfdt.h>
 #include <linux/bitops.h>
+#include <linux/delay.h>
+#include <linux/libfdt.h>
 
 #include "../common/tdx-cfg-block.h"
 
@@ -29,11 +31,41 @@ DECLARE_GLOBAL_DATA_PTR;
 			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
 			 (SC_PAD_28FDSOI_PS_PU << PADRING_PULL_SHIFT))
 
+#define PCB_VERS_DETECT	((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | \
+			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
+			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
+			 (SC_PAD_28FDSOI_PS_PU << PADRING_PULL_SHIFT))
+
+#define GPIO_PAD_CTRL	((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | \
+			 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
+			 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \
+			 (SC_PAD_28FDSOI_PS_PU << PADRING_PULL_SHIFT))
+
+#define PCB_VERS_DEFAULT	((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | \
+				 (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \
+				 (SC_PAD_28FDSOI_PS_PD << PADRING_PULL_SHIFT) | \
+				 (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT))
+
 #define TDX_USER_FUSE_BLOCK1_A	276
 #define TDX_USER_FUSE_BLOCK1_B	277
 #define TDX_USER_FUSE_BLOCK2_A	278
 #define TDX_USER_FUSE_BLOCK2_B	279
 
+enum pcb_rev_t {
+	PCB_VERSION_1_0,
+	PCB_VERSION_1_1
+};
+
+static iomux_cfg_t pcb_vers_detect[] = {
+	SC_P_MIPI_DSI0_GPIO0_00 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(PCB_VERS_DETECT),
+	SC_P_MIPI_DSI0_GPIO0_01 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(PCB_VERS_DETECT),
+};
+
+static iomux_cfg_t pcb_vers_default[] = {
+	SC_P_MIPI_DSI0_GPIO0_00 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(PCB_VERS_DEFAULT),
+	SC_P_MIPI_DSI0_GPIO0_01 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(PCB_VERS_DEFAULT),
+};
+
 static iomux_cfg_t uart1_pads[] = {
 	SC_P_UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
 	SC_P_UART1_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
@@ -180,6 +212,74 @@ int checkboard(void)
 	return 0;
 }
 
+static enum pcb_rev_t get_pcb_revision(void)
+{
+	unsigned int pcb_vers = 0;
+
+	imx8_iomux_setup_multiple_pads(pcb_vers_detect,
+				       ARRAY_SIZE(pcb_vers_detect));
+
+	gpio_request(IMX_GPIO_NR(1, 18),
+		     "PCB version detection on PAD SC_P_MIPI_DSI0_GPIO0_00");
+	gpio_request(IMX_GPIO_NR(1, 19),
+		     "PCB version detection on PAD SC_P_MIPI_DSI0_GPIO0_01");
+	gpio_direction_input(IMX_GPIO_NR(1, 18));
+	gpio_direction_input(IMX_GPIO_NR(1, 19));
+
+	udelay(1000);
+
+	pcb_vers = gpio_get_value(IMX_GPIO_NR(1, 18));
+	pcb_vers |= gpio_get_value(IMX_GPIO_NR(1, 19)) << 1;
+
+	/* Set muxing back to default values for saving energy */
+	imx8_iomux_setup_multiple_pads(pcb_vers_default,
+				       ARRAY_SIZE(pcb_vers_default));
+
+	switch (pcb_vers) {
+	case 0b11:
+		return PCB_VERSION_1_0;
+	case 0b10:
+		return PCB_VERSION_1_1;
+	default:
+		printf("Unknown PCB version=0x%x, default to V1.1\n", pcb_vers);
+		return PCB_VERSION_1_1;
+	}
+}
+
+static void select_dt_from_module_version(void)
+{
+	env_set("soc", "imx8qm");
+	env_set("variant", "-v1.1");
+
+	switch (tdx_hw_tag.prodid) {
+	/* Select Apalis iMX8QM device trees */
+	case APALIS_IMX8QM_IT:
+	case APALIS_IMX8QM_WIFI_BT_IT:
+		if (get_pcb_revision() == PCB_VERSION_1_0)
+			env_set("variant", "");
+		break;
+	/* Select Apalis iMX8QP device trees */
+	case APALIS_IMX8QP_WIFI_BT:
+	case APALIS_IMX8QP:
+		env_set("soc", "imx8qp");
+		break;
+	default:
+		printf("Unknown Apalis iMX8 module\n");
+		return;
+	}
+}
+
+static int do_select_dt_from_module_version(struct cmd_tbl *cmdtp, int flag,
+					    int argc, char * const argv[])
+{
+	select_dt_from_module_version();
+	return 0;
+}
+
+U_BOOT_CMD(select_dt_from_module_version, CONFIG_SYS_MAXARGS, 1, do_select_dt_from_module_version,
+	   "\n", "    - select devicetree from module version"
+);
+
 int board_init(void)
 {
 	board_gpio_init();
@@ -215,5 +315,7 @@ int board_late_init(void)
 	env_set("board_rev", "v1.0");
 #endif
 
+	select_dt_from_module_version();
+
 	return 0;
 }
diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index b2f8416e326..c14cb996a3e 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -19,6 +19,8 @@ CONFIG_REMAKE_ELF=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-apalis${variant}-${fdt_board}.dtb"
 CONFIG_LOG=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index e2e491bdb0a..6275751273c 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -41,8 +41,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" \
-- 
2.35.1


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

* [PATCH v1 03/16] apalis-imx8: turn off lcd backlight before os handover
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 01/16] apalis-imx8: fix booting caused by missing dm_event Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 02/16] apalis-imx8: implement pcb version and soc variant handling Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 04/16] apalis-imx8: display build info Marcel Ziswiler
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

U-Boot typically tears down the display controller before handing
control over to Linux. On LCD displays disabling pixel clock leads to a
fading out effect with vertical/horizontal lines. Make sure to disable
back light GPIO Apalis BKL1 before booting Linux.

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

 board/toradex/apalis-imx8/apalis-imx8.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index d4be999e24d..d8c68765d16 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -182,9 +182,18 @@ int board_early_init_f(void)
 }
 
 #if CONFIG_IS_ENABLED(DM_GPIO)
+
+#define BKL1_GPIO   IMX_GPIO_NR(1, 10)
+
+static iomux_cfg_t board_gpios[] = {
+	SC_P_LVDS1_GPIO00 | MUX_MODE_ALT(3) | MUX_PAD_CTRL(GPIO_PAD_CTRL),
+};
+
 static void board_gpio_init(void)
 {
-	/* TODO */
+	imx8_iomux_setup_multiple_pads(board_gpios, ARRAY_SIZE(board_gpios));
+
+	gpio_request(BKL1_GPIO, "BKL1_GPIO");
 }
 #else
 static inline void board_gpio_init(void) {}
@@ -202,6 +211,14 @@ int board_phy_config(struct phy_device *phydev)
 }
 #endif
 
+/*
+ * Backlight off before OS handover
+ */
+void board_preboot_os(void)
+{
+	gpio_direction_output(BKL1_GPIO, 0);
+}
+
 int checkboard(void)
 {
 	puts("Model: Toradex Apalis iMX8\n");
-- 
2.35.1


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

* [PATCH v1 04/16] apalis-imx8: display build info
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (2 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 03/16] apalis-imx8: turn off lcd backlight before os handover Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 05/16] apalis-imx8: provide proper config_sys_prompt Marcel Ziswiler
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Display build info with information about the version of SCFW, SECO and
TF-A (ATF).

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

 board/toradex/apalis-imx8/apalis-imx8.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index d8c68765d16..84d700107af 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -332,6 +332,8 @@ int board_late_init(void)
 	env_set("board_rev", "v1.0");
 #endif
 
+	build_info();
+
 	select_dt_from_module_version();
 
 	return 0;
-- 
2.35.1


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

* [PATCH v1 05/16] apalis-imx8: provide proper config_sys_prompt
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (3 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 04/16] apalis-imx8: display build info Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 06/16] apalis-imx8: set bootdelay Marcel Ziswiler
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Igor Opaniuk, Marcel Ziswiler

From: Igor Opaniuk <igor.opaniuk@toradex.com>

This provides correct system prompt for U-Boot console.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

 configs/apalis-imx8_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index c14cb996a3e..92a0c67b32e 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -9,6 +9,7 @@ CONFIG_ENV_OFFSET=0xFFFFDE00
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-apalis"
 CONFIG_TARGET_APALIS_IMX8=y
+CONFIG_SYS_PROMPT="Apalis iMX8 # "
 CONFIG_SYS_LOAD_ADDR=0x80280000
 CONFIG_SYS_MEMTEST_START=0x88000000
 CONFIG_SYS_MEMTEST_END=0x89000000
-- 
2.35.1


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

* [PATCH v1 06/16] apalis-imx8: set bootdelay
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (4 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 05/16] apalis-imx8: provide proper config_sys_prompt Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 07/16] apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms Marcel Ziswiler
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Set the boot delay to one second.

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

 configs/apalis-imx8_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index 92a0c67b32e..aee43d07816 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -20,6 +20,7 @@ CONFIG_REMAKE_ELF=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_BOOTDELAY=1
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-apalis${variant}-${fdt_board}.dtb"
 CONFIG_LOG=y
-- 
2.35.1


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

* [PATCH v1 07/16] apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (5 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 06/16] apalis-imx8: set bootdelay Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 08/16] apalis/colibri-imx8/8x: remove global variable script Marcel Ziswiler
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Oleksandr Suvorov, Marcel Ziswiler

From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

There is no "apply" command enabled for "fdt".
Enable "apply" command to allow overlays to be applied.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

 configs/apalis-imx8_defconfig   | 1 +
 configs/colibri-imx8x_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index aee43d07816..eabdb12478c 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -80,4 +80,5 @@ CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_SCU_THERMAL=y
+CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/colibri-imx8x_defconfig b/configs/colibri-imx8x_defconfig
index 6896236045b..70b9927406d 100644
--- a/configs/colibri-imx8x_defconfig
+++ b/configs/colibri-imx8x_defconfig
@@ -74,4 +74,5 @@ CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_SCU_THERMAL=y
+CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER is not set
-- 
2.35.1


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

* [PATCH v1 08/16] apalis/colibri-imx8/8x: remove global variable script
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (6 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 07/16] apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 09/16] apalis-imx8: enable environment bootcount limit Marcel Ziswiler
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Oleksandr Suvorov, Marcel Ziswiler

From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

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 <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---

 include/configs/apalis-imx8.h   | 1 -
 include/configs/colibri-imx8x.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 6275751273c..d08d211f495 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -50,7 +50,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 d641fbf47e7..734034e9944 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -81,7 +81,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 " \
-- 
2.35.1


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

* [PATCH v1 09/16] apalis-imx8: enable environment bootcount limit
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (7 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 08/16] apalis/colibri-imx8/8x: remove global variable script Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 10/16] apalis-imx8: update spdx license identifier string Marcel Ziswiler
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Enable optional environment bootcount limit functionality.

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

 configs/apalis-imx8_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index eabdb12478c..019846e1af2 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -53,6 +53,8 @@ CONFIG_VERSION_VARIABLE=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_TFTP_TSIZE=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
 CONFIG_CLK_IMX8=y
 CONFIG_CPU=y
 CONFIG_MXC_GPIO=y
-- 
2.35.1


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

* [PATCH v1 10/16] apalis-imx8: update spdx license identifier string
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (8 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 09/16] apalis-imx8: enable environment bootcount limit Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 11/16] apalis-imx8: remove obsolete sdhc related config defines Marcel Ziswiler
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot
  Cc: Marcel Ziswiler, Fabio Estevam, NXP i.MX U-Boot Team, Stefano Babic

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

Update SPDX license identifier string.

While at it also update copyright period.

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

 arch/arm/dts/fsl-imx8qm-apalis.dts                 | 4 ++--
 board/toradex/apalis-imx8/Makefile                 | 4 ++--
 board/toradex/apalis-imx8/apalis-imx8-imximage.cfg | 4 ++--
 board/toradex/apalis-imx8/apalis-imx8.c            | 4 ++--
 include/configs/apalis-imx8.h                      | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/dts/fsl-imx8qm-apalis.dts b/arch/arm/dts/fsl-imx8qm-apalis.dts
index 0d8d3b3e8e8..7daa4483d72 100644
--- a/arch/arm/dts/fsl-imx8qm-apalis.dts
+++ b/arch/arm/dts/fsl-imx8qm-apalis.dts
@@ -1,6 +1,6 @@
-// SPDX-License-Identifier: GPL-2.0+ OR X11
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /*
- * Copyright 2017-2019 Toradex
+ * Copyright 2017-2022 Toradex
  */
 
 /dts-v1/;
diff --git a/board/toradex/apalis-imx8/Makefile b/board/toradex/apalis-imx8/Makefile
index a8c3eb7240b..fe19cfdf695 100644
--- a/board/toradex/apalis-imx8/Makefile
+++ b/board/toradex/apalis-imx8/Makefile
@@ -1,6 +1,6 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier: GPL-2.0-or-later
 #
-# Copyright 2019 Toradex
+# Copyright 2019-2022 Toradex
 #
 
 obj-y += apalis-imx8.o
diff --git a/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg b/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg
index 16183f96679..fc4aa74990c 100644
--- a/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg
+++ b/board/toradex/apalis-imx8/apalis-imx8-imximage.cfg
@@ -1,6 +1,6 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
- * Copyright 2019 Toradex
+ * Copyright 2019-2022 Toradex
  *
  * Refer doc/imx/mkimage/imx8image.txt for more details about how-to configure
  * and create imx8image boot image
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index 84d700107af..1eaf9951d55 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -1,6 +1,6 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * Copyright 2019 Toradex
+ * Copyright 2019-2022 Toradex
  */
 
 #include <common.h>
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index d08d211f495..30cfae870cf 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -1,6 +1,6 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
- * Copyright 2019-2021 Toradex
+ * Copyright 2019-2022 Toradex
  */
 
 #ifndef __APALIS_IMX8_H
-- 
2.35.1


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

* [PATCH v1 11/16] apalis-imx8: remove obsolete sdhc related config defines
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (9 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 10/16] apalis-imx8: update spdx license identifier string Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 12/16] apalis-imx8: remove obsolete net usb start Marcel Ziswiler
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Remove obsolete SDHC related config defines. Nowadays, all SDHC related
hardware configuration comes from the device tree.

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

 include/configs/apalis-imx8.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 30cfae870cf..66e8727b60f 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -9,10 +9,6 @@
 #include <asm/arch/imx-regs.h>
 #include <linux/sizes.h>
 
-#define CFG_SYS_FSL_ESDHC_ADDR	0
-#define USDHC1_BASE_ADDR		0x5b010000
-#define USDHC2_BASE_ADDR		0x5b020000
-
 /* Networking */
 #define CONFIG_IPADDR			192.168.10.2
 #define CONFIG_NETMASK			255.255.255.0
@@ -56,11 +52,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 CONFIG_SYS_SDRAM_BASE		0x80000000
 #define PHYS_SDRAM_1			0x80000000
 #define PHYS_SDRAM_2			0x880000000
-- 
2.35.1


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

* [PATCH v1 12/16] apalis-imx8: remove obsolete net usb start
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (10 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 11/16] apalis-imx8: remove obsolete sdhc related config defines Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 13/16] apalis-imx8: introduce setup setting setupargs Marcel Ziswiler
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Remove obsolete net USB start.

While at it also add a comment about enabling distro-boot.

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

 include/configs/apalis-imx8.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 66e8727b60f..92e81d8854a 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -20,14 +20,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 <config_distro_bootcmd.h>
-#undef BOOTENV_RUN_NET_USB_START
-#define BOOTENV_RUN_NET_USB_START ""
 
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS \
-- 
2.35.1


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

* [PATCH v1 13/16] apalis-imx8: introduce setup setting setupargs
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (11 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 12/16] apalis-imx8: remove obsolete net usb start Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 14/16] apalis-imx8: drop obsolete environment variables Marcel Ziswiler
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Introduce setup setting setupargs and move earlycon there.

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

 include/configs/apalis-imx8.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 92e81d8854a..92b71e7a7c5 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -34,7 +34,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" \
@@ -45,6 +45,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 " \
-- 
2.35.1


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

* [PATCH v1 14/16] apalis-imx8: drop obsolete environment variables
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (12 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 13/16] apalis-imx8: introduce setup setting setupargs Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 15/16] apalis-imx8: update update_uboot confirmation message Marcel Ziswiler
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Drop obsolete environment variables fdt_addr, finduuid, mmcargs, mmcdev,
mmcpart and panel.

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

 include/configs/apalis-imx8.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 92b71e7a7c5..85c305f8f00 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -35,16 +35,9 @@
 	"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)?; " \
-- 
2.35.1


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

* [PATCH v1 15/16] apalis-imx8: update update_uboot confirmation message
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (13 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 14/16] apalis-imx8: drop obsolete environment variables Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2022-12-12  0:09 ` [PATCH v1 16/16] apalis-imx8: update env memory layout Marcel Ziswiler
  2023-01-10 10:00 ` [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler

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

Update update_uboot confirmation message.

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

 include/configs/apalis-imx8.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 85c305f8f00..c54c4d0465a 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -40,7 +40,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 " \
-- 
2.35.1


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

* [PATCH v1 16/16] apalis-imx8: update env memory layout
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (14 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 15/16] apalis-imx8: update update_uboot confirmation message Marcel Ziswiler
@ 2022-12-12  0:09 ` Marcel Ziswiler
  2023-01-10 10:00 ` [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
  16 siblings, 0 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2022-12-12  0:09 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 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 <marcel.ziswiler@toradex.com>

---

 configs/apalis-imx8_defconfig |  2 +-
 include/configs/apalis-imx8.h | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/configs/apalis-imx8_defconfig b/configs/apalis-imx8_defconfig
index 019846e1af2..8acf645167e 100644
--- a/configs/apalis-imx8_defconfig
+++ b/configs/apalis-imx8_defconfig
@@ -10,7 +10,7 @@ CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-imx8qm-apalis"
 CONFIG_TARGET_APALIS_IMX8=y
 CONFIG_SYS_PROMPT="Apalis iMX8 # "
-CONFIG_SYS_LOAD_ADDR=0x80280000
+CONFIG_SYS_LOAD_ADDR=0x95400000
 CONFIG_SYS_MEMTEST_START=0x88000000
 CONFIG_SYS_MEMTEST_END=0x89000000
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index c54c4d0465a..c4f2cd604d5 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -15,10 +15,12 @@
 #define CONFIG_SERVERIP			192.168.10.1
 
 #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) \
-- 
2.35.1


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

* Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
  2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
                   ` (15 preceding siblings ...)
  2022-12-12  0:09 ` [PATCH v1 16/16] apalis-imx8: update env memory layout Marcel Ziswiler
@ 2023-01-10 10:00 ` Marcel Ziswiler
  2023-01-10 16:30   ` Tom Rini
  2023-01-13 13:28   ` Stefano Babic
  16 siblings, 2 replies; 23+ messages in thread
From: Marcel Ziswiler @ 2023-01-10 10:00 UTC (permalink / raw)
  To: u-boot; +Cc: festevam, trini, xypron.glpk, uboot-imx, sbabic

Any feedback?

@Stefano: Any plans to apply anything?

@Tom: Or should we be sending you pull-requests directly?

On Mon, 2022-12-12 at 01:09 +0100, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> 
> This series fixes a boot issue and refreshes Apalis iMX8 support as
> follows:
> - fix booting caused by missing DM_EVENT
> - implement PCB version and SoC variant handling
> - turn off LCD backlight before OS handover
> - display build info
> - provide proper prompt
> - set bootdelay
> - add overlays support
> - remove global environment variable script
> - enable environment bootcount limit
> - update SPDX license identifier string
> - remove obsolete SDHC related config defines
> - remove obsolete net usb start
> - introduce setup setting setupargs
> - drop obsolete environment variables
> - update update_uboot confirmation message
> - update env memory layout
> 
> 
> Igor Opaniuk (1):
>   apalis-imx8: provide proper config_sys_prompt
> 
> Marcel Ziswiler (13):
>   apalis-imx8: fix booting caused by missing dm_event
>   apalis-imx8: implement pcb version and soc variant handling
>   apalis-imx8: turn off lcd backlight before os handover
>   apalis-imx8: display build info
>   apalis-imx8: set bootdelay
>   apalis-imx8: enable environment bootcount limit
>   apalis-imx8: update spdx license identifier string
>   apalis-imx8: remove obsolete sdhc related config defines
>   apalis-imx8: remove obsolete net usb start
>   apalis-imx8: introduce setup setting setupargs
>   apalis-imx8: drop obsolete environment variables
>   apalis-imx8: update update_uboot confirmation message
>   apalis-imx8: update env memory layout
> 
> Oleksandr Suvorov (2):
>   apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
>   apalis/colibri-imx8/8x: remove global variable script
> 
>  arch/arm/dts/fsl-imx8qm-apalis.dts            |   4 +-
>  board/toradex/apalis-imx8/Makefile            |   4 +-
>  .../apalis-imx8/apalis-imx8-imximage.cfg      |   4 +-
>  board/toradex/apalis-imx8/apalis-imx8.c       | 129 +++++++++++++++++-
>  configs/apalis-imx8_defconfig                 |  10 +-
>  configs/colibri-imx8x_defconfig               |   1 +
>  include/configs/apalis-imx8.h                 |  45 ++----
>  include/configs/colibri-imx8x.h               |   1 -
>  8 files changed, 156 insertions(+), 42 deletions(-)

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

* Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
  2023-01-10 10:00 ` [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
@ 2023-01-10 16:30   ` Tom Rini
  2023-01-13 17:36     ` Stefano Babic
  2023-01-13 13:28   ` Stefano Babic
  1 sibling, 1 reply; 23+ messages in thread
From: Tom Rini @ 2023-01-10 16:30 UTC (permalink / raw)
  To: Marcel Ziswiler, Stefano Babic; +Cc: u-boot, festevam, xypron.glpk, uboot-imx

[-- Attachment #1: Type: text/plain, Size: 2690 bytes --]

On Tue, Jan 10, 2023 at 10:00:25AM +0000, Marcel Ziswiler wrote:
> Any feedback?
> 
> @Stefano: Any plans to apply anything?
> 
> @Tom: Or should we be sending you pull-requests directly?

Stefano, do you want some help with the iMX queue?

> 
> On Mon, 2022-12-12 at 01:09 +0100, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > 
> > This series fixes a boot issue and refreshes Apalis iMX8 support as
> > follows:
> > - fix booting caused by missing DM_EVENT
> > - implement PCB version and SoC variant handling
> > - turn off LCD backlight before OS handover
> > - display build info
> > - provide proper prompt
> > - set bootdelay
> > - add overlays support
> > - remove global environment variable script
> > - enable environment bootcount limit
> > - update SPDX license identifier string
> > - remove obsolete SDHC related config defines
> > - remove obsolete net usb start
> > - introduce setup setting setupargs
> > - drop obsolete environment variables
> > - update update_uboot confirmation message
> > - update env memory layout
> > 
> > 
> > Igor Opaniuk (1):
> >   apalis-imx8: provide proper config_sys_prompt
> > 
> > Marcel Ziswiler (13):
> >   apalis-imx8: fix booting caused by missing dm_event
> >   apalis-imx8: implement pcb version and soc variant handling
> >   apalis-imx8: turn off lcd backlight before os handover
> >   apalis-imx8: display build info
> >   apalis-imx8: set bootdelay
> >   apalis-imx8: enable environment bootcount limit
> >   apalis-imx8: update spdx license identifier string
> >   apalis-imx8: remove obsolete sdhc related config defines
> >   apalis-imx8: remove obsolete net usb start
> >   apalis-imx8: introduce setup setting setupargs
> >   apalis-imx8: drop obsolete environment variables
> >   apalis-imx8: update update_uboot confirmation message
> >   apalis-imx8: update env memory layout
> > 
> > Oleksandr Suvorov (2):
> >   apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
> >   apalis/colibri-imx8/8x: remove global variable script
> > 
> >  arch/arm/dts/fsl-imx8qm-apalis.dts            |   4 +-
> >  board/toradex/apalis-imx8/Makefile            |   4 +-
> >  .../apalis-imx8/apalis-imx8-imximage.cfg      |   4 +-
> >  board/toradex/apalis-imx8/apalis-imx8.c       | 129 +++++++++++++++++-
> >  configs/apalis-imx8_defconfig                 |  10 +-
> >  configs/colibri-imx8x_defconfig               |   1 +
> >  include/configs/apalis-imx8.h                 |  45 ++----
> >  include/configs/colibri-imx8x.h               |   1 -
> >  8 files changed, 156 insertions(+), 42 deletions(-)

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
  2023-01-10 10:00 ` [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
  2023-01-10 16:30   ` Tom Rini
@ 2023-01-13 13:28   ` Stefano Babic
  2023-01-13 17:26     ` Francesco Dolcini
  1 sibling, 1 reply; 23+ messages in thread
From: Stefano Babic @ 2023-01-13 13:28 UTC (permalink / raw)
  To: Marcel Ziswiler, u-boot; +Cc: festevam, trini, xypron.glpk, uboot-imx, sbabic

Hi Marcel,

On 10.01.23 11:00, Marcel Ziswiler wrote:
> Any feedback?
> 
> @Stefano: Any plans to apply anything?

I am not in my office until 23.1, I won't be able to do any merge / PR 
before I will be back, sorry.

Best regards,
Stefano

> 
> @Tom: Or should we be sending you pull-requests directly?
> 
> On Mon, 2022-12-12 at 01:09 +0100, Marcel Ziswiler wrote:
>> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>
>>
>> This series fixes a boot issue and refreshes Apalis iMX8 support as
>> follows:
>> - fix booting caused by missing DM_EVENT
>> - implement PCB version and SoC variant handling
>> - turn off LCD backlight before OS handover
>> - display build info
>> - provide proper prompt
>> - set bootdelay
>> - add overlays support
>> - remove global environment variable script
>> - enable environment bootcount limit
>> - update SPDX license identifier string
>> - remove obsolete SDHC related config defines
>> - remove obsolete net usb start
>> - introduce setup setting setupargs
>> - drop obsolete environment variables
>> - update update_uboot confirmation message
>> - update env memory layout
>>
>>
>> Igor Opaniuk (1):
>>    apalis-imx8: provide proper config_sys_prompt
>>
>> Marcel Ziswiler (13):
>>    apalis-imx8: fix booting caused by missing dm_event
>>    apalis-imx8: implement pcb version and soc variant handling
>>    apalis-imx8: turn off lcd backlight before os handover
>>    apalis-imx8: display build info
>>    apalis-imx8: set bootdelay
>>    apalis-imx8: enable environment bootcount limit
>>    apalis-imx8: update spdx license identifier string
>>    apalis-imx8: remove obsolete sdhc related config defines
>>    apalis-imx8: remove obsolete net usb start
>>    apalis-imx8: introduce setup setting setupargs
>>    apalis-imx8: drop obsolete environment variables
>>    apalis-imx8: update update_uboot confirmation message
>>    apalis-imx8: update env memory layout
>>
>> Oleksandr Suvorov (2):
>>    apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
>>    apalis/colibri-imx8/8x: remove global variable script
>>
>>   arch/arm/dts/fsl-imx8qm-apalis.dts            |   4 +-
>>   board/toradex/apalis-imx8/Makefile            |   4 +-
>>   .../apalis-imx8/apalis-imx8-imximage.cfg      |   4 +-
>>   board/toradex/apalis-imx8/apalis-imx8.c       | 129 +++++++++++++++++-
>>   configs/apalis-imx8_defconfig                 |  10 +-
>>   configs/colibri-imx8x_defconfig               |   1 +
>>   include/configs/apalis-imx8.h                 |  45 ++----
>>   include/configs/colibri-imx8x.h               |   1 -
>>   8 files changed, 156 insertions(+), 42 deletions(-)

-- 
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

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

* Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
  2023-01-13 13:28   ` Stefano Babic
@ 2023-01-13 17:26     ` Francesco Dolcini
  0 siblings, 0 replies; 23+ messages in thread
From: Francesco Dolcini @ 2023-01-13 17:26 UTC (permalink / raw)
  To: Stefano Babic
  Cc: Marcel Ziswiler, u-boot, festevam, trini, xypron.glpk, uboot-imx

Hello Stefano, Marcel and all

On Fri, Jan 13, 2023 at 02:28:12PM +0100, Stefano Babic wrote:
> On 10.01.23 11:00, Marcel Ziswiler wrote:
> > Any feedback?
> > 
> > @Stefano: Any plans to apply anything?
> 
> I am not in my office until 23.1, I won't be able to do any merge / PR
> before I will be back, sorry.
> 
> > @Tom: Or should we be sending you pull-requests directly?

I sent a v2 of this series [0], sharing this here to be sure that v1 is not
applied by mistake.

Francesco

[0] https://lore.kernel.org/u-boot/20230113171751.331268-1-francesco@dolcini.it/


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

* Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
  2023-01-10 16:30   ` Tom Rini
@ 2023-01-13 17:36     ` Stefano Babic
  2023-01-16 19:15       ` Francesco Dolcini
  0 siblings, 1 reply; 23+ messages in thread
From: Stefano Babic @ 2023-01-13 17:36 UTC (permalink / raw)
  To: Tom Rini, Marcel Ziswiler, Stefano Babic
  Cc: u-boot, festevam, xypron.glpk, uboot-imx



On 10.01.23 17:30, Tom Rini wrote:
> On Tue, Jan 10, 2023 at 10:00:25AM +0000, Marcel Ziswiler wrote:
>> Any feedback?
>>
>> @Stefano: Any plans to apply anything?
>>
>> @Tom: Or should we be sending you pull-requests directly?
> 
> Stefano, do you want some help with the iMX queue?

I am not in office until 23.1, and I could not merge / send PR until 
then. Please apply directly series if they cannot wait, I will go on 
when I will be back.

Stefano


> 
>>
>> On Mon, 2022-12-12 at 01:09 +0100, Marcel Ziswiler wrote:
>>> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>
>>>
>>> This series fixes a boot issue and refreshes Apalis iMX8 support as
>>> follows:
>>> - fix booting caused by missing DM_EVENT
>>> - implement PCB version and SoC variant handling
>>> - turn off LCD backlight before OS handover
>>> - display build info
>>> - provide proper prompt
>>> - set bootdelay
>>> - add overlays support
>>> - remove global environment variable script
>>> - enable environment bootcount limit
>>> - update SPDX license identifier string
>>> - remove obsolete SDHC related config defines
>>> - remove obsolete net usb start
>>> - introduce setup setting setupargs
>>> - drop obsolete environment variables
>>> - update update_uboot confirmation message
>>> - update env memory layout
>>>
>>>
>>> Igor Opaniuk (1):
>>>    apalis-imx8: provide proper config_sys_prompt
>>>
>>> Marcel Ziswiler (13):
>>>    apalis-imx8: fix booting caused by missing dm_event
>>>    apalis-imx8: implement pcb version and soc variant handling
>>>    apalis-imx8: turn off lcd backlight before os handover
>>>    apalis-imx8: display build info
>>>    apalis-imx8: set bootdelay
>>>    apalis-imx8: enable environment bootcount limit
>>>    apalis-imx8: update spdx license identifier string
>>>    apalis-imx8: remove obsolete sdhc related config defines
>>>    apalis-imx8: remove obsolete net usb start
>>>    apalis-imx8: introduce setup setting setupargs
>>>    apalis-imx8: drop obsolete environment variables
>>>    apalis-imx8: update update_uboot confirmation message
>>>    apalis-imx8: update env memory layout
>>>
>>> Oleksandr Suvorov (2):
>>>    apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms
>>>    apalis/colibri-imx8/8x: remove global variable script
>>>
>>>   arch/arm/dts/fsl-imx8qm-apalis.dts            |   4 +-
>>>   board/toradex/apalis-imx8/Makefile            |   4 +-
>>>   .../apalis-imx8/apalis-imx8-imximage.cfg      |   4 +-
>>>   board/toradex/apalis-imx8/apalis-imx8.c       | 129 +++++++++++++++++-
>>>   configs/apalis-imx8_defconfig                 |  10 +-
>>>   configs/colibri-imx8x_defconfig               |   1 +
>>>   include/configs/apalis-imx8.h                 |  45 ++----
>>>   include/configs/colibri-imx8x.h               |   1 -
>>>   8 files changed, 156 insertions(+), 42 deletions(-)
> 

-- 
=====================================================================
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich,   Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

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

* Re: [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh
  2023-01-13 17:36     ` Stefano Babic
@ 2023-01-16 19:15       ` Francesco Dolcini
  0 siblings, 0 replies; 23+ messages in thread
From: Francesco Dolcini @ 2023-01-16 19:15 UTC (permalink / raw)
  To: Stefano Babic
  Cc: Tom Rini, Marcel Ziswiler, u-boot, festevam, xypron.glpk, uboot-imx

Hello Stefano,

On Fri, Jan 13, 2023 at 06:36:04PM +0100, Stefano Babic wrote:
> On 10.01.23 17:30, Tom Rini wrote:
> > On Tue, Jan 10, 2023 at 10:00:25AM +0000, Marcel Ziswiler wrote:
> > > Any feedback?
> > > 
> > > @Stefano: Any plans to apply anything?
> > > 
> > > @Tom: Or should we be sending you pull-requests directly?
> > 
> > Stefano, do you want some help with the iMX queue?
> 
> I am not in office until 23.1, and I could not merge / send PR until then.
> Please apply directly series if they cannot wait, I will go on when I will
> be back.

Just a quick head-up for when you are back, please apply version 3 of
this series:

https://lore.kernel.org/all/20230116190515.125561-1-francesco@dolcini.it/
http://patchwork.ozlabs.org/project/uboot/list/?series=336920

Thanks!
Francesco


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

end of thread, other threads:[~2023-01-16 19:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12  0:09 [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 01/16] apalis-imx8: fix booting caused by missing dm_event Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 02/16] apalis-imx8: implement pcb version and soc variant handling Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 03/16] apalis-imx8: turn off lcd backlight before os handover Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 04/16] apalis-imx8: display build info Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 05/16] apalis-imx8: provide proper config_sys_prompt Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 06/16] apalis-imx8: set bootdelay Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 07/16] apalis/colibri-imx8/8x: add overlay support for i.mx 8/8x-based soms Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 08/16] apalis/colibri-imx8/8x: remove global variable script Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 09/16] apalis-imx8: enable environment bootcount limit Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 10/16] apalis-imx8: update spdx license identifier string Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 11/16] apalis-imx8: remove obsolete sdhc related config defines Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 12/16] apalis-imx8: remove obsolete net usb start Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 13/16] apalis-imx8: introduce setup setting setupargs Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 14/16] apalis-imx8: drop obsolete environment variables Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 15/16] apalis-imx8: update update_uboot confirmation message Marcel Ziswiler
2022-12-12  0:09 ` [PATCH v1 16/16] apalis-imx8: update env memory layout Marcel Ziswiler
2023-01-10 10:00 ` [PATCH v1 00/16] apalis-imx8: boot issue fix and support refresh Marcel Ziswiler
2023-01-10 16:30   ` Tom Rini
2023-01-13 17:36     ` Stefano Babic
2023-01-16 19:15       ` Francesco Dolcini
2023-01-13 13:28   ` Stefano Babic
2023-01-13 17:26     ` Francesco Dolcini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.