Skip to contentSkip to conversation

imx: patches in queue

PATCH In review Peng Fan (OSS) 4 participants 26 messages Jun 11, 2022 – Jun 23, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover imx: patches in queue

From: Peng Fan <[email protected]>

Stefano,
Is there a chance to get this into your next branch, then into Tom's next branch? There are often conflicts when applying after pending some time.

V2:
Rebased on Tom's next branch.
Drop the imx8m.h patches, since Tom already migrated most Kconfig Merge the verdi SPL_DM_SERIAL convertion patch to patch 1

Peng Fan (17):
imx: drop CONFIG_MXC_UART_BASE
imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL
imx: imx8mm-cl-iot-gate: Enable DM_SERIAL
imx: imx8mm_icore: Enable SPL_DM_SERIAL
imx: imx8m[m/p]_phycore: Enable DM_SERIAL
imx: imx8mn_var_som: enable DM_SERIAL
imx: kontron-sl-mx8mm: enable DM_SERIAL
configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE
imx: imx8mm_beacon: enable pinctrl_wdog in SPL
imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL
imx: engicam-imx8mm: drop unused macro
imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL
imx: imx8mn-beacon: enable pinctrl_wdog in SPL
imx: imx8mn_var_som: clean up board watchdog code
imx: imx8mp_rsb7320a1: enable wdog driver model in SPL
imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
imx: phycore_imx8mm/p: clean up board watchdog code

 arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi    |  4 +++
 arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi   |  4 +++
 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi |  4 +++
 arch/arm/dts/imx8mm-venice-u-boot.dtsi        |  4 +++
 arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi    |  4 +++
 arch/arm/dts/imx8mn-venice-u-boot.dtsi        |  4 +++
 arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi    |  8 +++++
 arch/arm/dts/imx8mp-venice-u-boot.dtsi        |  4 +++
 .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c       | 12 -------
 board/beacon/imx8mm/spl.c                     | 31 ++-----------------
 board/beacon/imx8mn/spl.c                     | 21 ++-----------
 board/compulab/imx8mm-cl-iot-gate/spl.c       | 31 ++-----------------
 board/engicam/imx8mm/spl.c                    | 16 ++--------
 board/gateworks/venice/spl.c                  | 29 -----------------
 board/kontron/sl-mx8mm/spl.c                  | 30 ++----------------
 board/phytec/phycore_imx8mm/spl.c             | 31 ++-----------------
 board/phytec/phycore_imx8mp/spl.c             | 27 ----------------
 board/variscite/imx8mn_var_som/spl.c          | 22 ++-----------
 configs/imx8mm-cl-iot-gate-optee_defconfig    |  1 +
 configs/imx8mm-cl-iot-gate_defconfig          |  1 +
 configs/imx8mm-icore-mx8mm-ctouch2_defconfig  |  1 -
 configs/imx8mm-icore-mx8mm-edimm2.2_defconfig |  1 -
 configs/imx8mm_beacon_defconfig               |  1 -
 configs/imx8mn_beacon_2g_defconfig            |  1 -
 configs/imx8mn_beacon_defconfig               |  1 -
 configs/imx8mn_var_som_defconfig              |  1 +
 configs/kontron-sl-mx8mm_defconfig            |  1 +
 configs/phycore-imx8mm_defconfig              |  1 +
 configs/phycore-imx8mp_defconfig              |  1 +
 include/configs/aristainetos2.h               |  2 --
 include/configs/capricorn-common.h            |  1 -
 include/configs/cgtqmx8.h                     |  1 -
 include/configs/imx8mm-cl-iot-gate.h          |  3 --
 include/configs/imx8mm_beacon.h               |  3 --
 include/configs/imx8mm_data_modul_edm_sbc.h   |  1 -
 include/configs/imx8mm_evk.h                  |  3 --
 include/configs/imx8mm_icore_mx8mm.h          |  4 ---
 include/configs/imx8mm_venice.h               |  4 ---
 include/configs/imx8mn_beacon.h               |  3 --
 include/configs/imx8mn_bsh_smm_s2_common.h    |  4 ---
 include/configs/imx8mn_evk.h                  |  3 --
 include/configs/imx8mn_var_som.h              |  2 --
 include/configs/imx8mn_venice.h               |  4 ---
 include/configs/imx8mp_evk.h                  |  3 --
 include/configs/imx8mp_rsb3720.h              |  1 -
 include/configs/imx8mp_venice.h               |  4 ---
 include/configs/imx8mq_cm.h                   |  1 -
 include/configs/imx8mq_evk.h                  |  1 -
 include/configs/imx8mq_phanbell.h             |  1 -
 include/configs/imx8qm_mek.h                  |  1 -
 include/configs/imx8qxp_mek.h                 |  1 -
 include/configs/imx8ulp_evk.h                 |  1 -
 include/configs/kontron-sl-mx8mm.h            |  1 -
 include/configs/kontron_pitx_imx8m.h          |  1 -
 include/configs/mx7dsabresd.h                 |  1 -
 include/configs/phycore_imx8mm.h              |  4 ---
 include/configs/phycore_imx8mp.h              |  4 ---
 include/configs/pico-imx8mq.h                 |  1 -
 include/configs/somlabs_visionsom_6ull.h      |  1 -
 include/configs/tbs2910.h                     |  3 --
 include/configs/verdin-imx8mm.h               |  4 ---
 include/configs/verdin-imx8mp.h               |  4 ---
 62 files changed, 57 insertions(+), 316 deletions(-)
Signature · 1 line
2.36.0
#1 lore raw

PATCH v2 1/17 imx: drop CONFIG_MXC_UART_BASE

From: Peng Fan <[email protected]>

Since these boards has CONFIG_DM_SERIAL and/or CONFIG_SPL_DM_SERIAL, the legacy macro no need to be defined.

---
 include/configs/aristainetos2.h            | 2 --
 include/configs/imx8mm_evk.h               | 2 --
 include/configs/imx8mm_venice.h            | 3 ---
 include/configs/imx8mn_bsh_smm_s2_common.h | 4 ----
 include/configs/imx8mn_evk.h               | 2 --
 include/configs/imx8mn_venice.h            | 3 ---
 include/configs/imx8mp_evk.h               | 2 --
 include/configs/imx8mp_venice.h            | 3 ---
 include/configs/mx7dsabresd.h              | 1 -
 include/configs/somlabs_visionsom_6ull.h   | 1 -
 include/configs/tbs2910.h                  | 3 ---
 include/configs/verdin-imx8mm.h            | 3 ---
 include/configs/verdin-imx8mp.h            | 3 ---
 13 files changed, 32 deletions(-)
include/configs/aristainetos2.h +0 -2
index 026775de7c5..de4f4407abb 100644
@@ -14,10 +14,8 @@
 #define CONFIG_HOSTNAME		"aristainetos2"
 
 #if (CONFIG_SYS_BOARD_VERSION == 5)
-#define CONFIG_MXC_UART_BASE	UART2_BASE
 #define CONSOLE_DEV	"ttymxc1"
 #elif (CONFIG_SYS_BOARD_VERSION == 6)
-#define CONFIG_MXC_UART_BASE	UART1_BASE
 #define CONSOLE_DEV	"ttymxc0"
 #endif
 
include/configs/imx8mm_evk.h +0 -2
index 983743b5093..6da09deba85 100644
@@ -57,8 +57,6 @@
 #define PHYS_SDRAM                      0x40000000
 #define PHYS_SDRAM_SIZE			0x80000000 /* 2GB DDR */
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 #define CONFIG_FEC_MXC_PHYADDR          0
 
 #endif
include/configs/imx8mm_venice.h +0 -3
index 595c1074966..7a2ef8f533b 100644
@@ -90,9 +90,6 @@
 #define PHYS_SDRAM_SIZE			SZ_4G
 #define CONFIG_SYS_BOOTM_LEN		SZ_256M
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 /* FEC */
 #define CONFIG_FEC_MXC_PHYADDR          0
 #define FEC_QUIRK_ENET_MAC
include/configs/imx8mn_bsh_smm_s2_common.h +0 -4
index 5bdbd37e9cb..63f7da740ef 100644
@@ -32,8 +32,4 @@
 #define CONFIG_SYS_SDRAM_BASE		0x40000000
 #define PHYS_SDRAM			0x40000000
 
-#define CONFIG_MXC_UART_BASE		UART4_BASE_ADDR
-
-/* I2C */
-
 #endif /* __IMX8MN_BSH_SMM_S2_COMMON_H */
include/configs/imx8mn_evk.h +0 -2
index 73ba49b0d8f..506d1ffd5a6 100644
@@ -64,6 +64,4 @@
 #define PHYS_SDRAM                      0x40000000
 #define PHYS_SDRAM_SIZE			0x80000000 /* 2GB DDR */
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 #endif
include/configs/imx8mn_venice.h +0 -3
index 8565ba7fdb1..8c45c8462c2 100644
@@ -86,9 +86,6 @@
 #define PHYS_SDRAM_SIZE			SZ_4G
 #define CONFIG_SYS_BOOTM_LEN		SZ_256M
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 /* FEC */
 #define CONFIG_FEC_MXC_PHYADDR          0
 #define FEC_QUIRK_ENET_MAC
include/configs/imx8mp_evk.h +0 -2
index 65c1616bca7..465e1cb4a7e 100644
@@ -69,6 +69,4 @@
 #define PHYS_SDRAM_2			0x100000000
 #define PHYS_SDRAM_2_SIZE		0xC0000000	/* 3 GB */
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 #endif
include/configs/imx8mp_venice.h +0 -3
index e1d33553956..d9baffb3a24 100644
@@ -86,9 +86,6 @@
 #define PHYS_SDRAM_SIZE			SZ_4G
 #define CONFIG_SYS_BOOTM_LEN		SZ_256M
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART2_BASE_ADDR
-
 /* FEC */
 #define FEC_QUIRK_ENET_MAC
 
include/configs/mx7dsabresd.h +0 -1
index 36cef252ea2..a6b8c275fe7 100644
@@ -12,7 +12,6 @@
 
 #define PHYS_SDRAM_SIZE			SZ_1G
 
-#define CONFIG_MXC_UART_BASE            UART1_IPS_BASE_ADDR
 
 #ifdef CONFIG_IMX_BOOTAUX
 /* Set to QSPI1 A flash at default */
include/configs/somlabs_visionsom_6ull.h +0 -1
index 98966cfeb91..f1886cb2145 100644
@@ -16,7 +16,6 @@
 /* SPL options */
 #include "imx6_spl.h"
 
-#define CONFIG_MXC_UART_BASE		UART1_BASE
 
 /* MMC Configs */
 #ifdef CONFIG_FSL_USDHC
include/configs/tbs2910.h +0 -3
index 1ebe28b7c1b..c355083519f 100644
@@ -20,9 +20,6 @@
 
 #define CONFIG_SYS_BOOTMAPSZ		0x10000000
 
-/* Serial console */
-#define CONFIG_MXC_UART_BASE		UART1_BASE /* select UART1/UART2 */
-
 /* Framebuffer */
 #define CONFIG_IMX_HDMI
 #define CONFIG_IMX_VIDEO_SKIP
include/configs/verdin-imx8mm.h +0 -3
index 8f464dd39f0..4fb0d69f579 100644
@@ -72,9 +72,6 @@
 #define PHYS_SDRAM                      0x40000000
 #define PHYS_SDRAM_SIZE			SZ_2G /* 2GB DDR */
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
-
 /* ENET */
 #define CONFIG_FEC_MXC_PHYADDR          7
 
include/configs/verdin-imx8mp.h +0 -3
index 906a20fd840..704a0538a9c 100644
@@ -89,7 +89,4 @@
 #define PHYS_SDRAM_2			0x100000000
 #define PHYS_SDRAM_2_SIZE		(SZ_4G + SZ_1G)
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
-
 #endif /* __VERDIN_IMX8MP_H */
Signature · 1 line
2.36.0
#2 lore raw

PATCH v2 2/17 imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver model work.

---
 board/beacon/imx8mm/spl.c          | 12 ++----------
 board/beacon/imx8mn/spl.c          | 11 ++---------
 configs/imx8mm_beacon_defconfig    |  1 -
 configs/imx8mn_beacon_2g_defconfig |  1 -
 configs/imx8mn_beacon_defconfig    |  1 -
 include/configs/imx8mm_beacon.h    |  2 --
 include/configs/imx8mn_beacon.h    |  2 --
 7 files changed, 4 insertions(+), 26 deletions(-)
board/beacon/imx8mm/spl.c +2 -10
index 12266b22a42..f92b4c3ed0a 100644
@@ -59,14 +59,8 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	IMX8MM_PAD_UART2_RXD_UART2_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MM_PAD_UART2_TXD_UART2_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
 	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -79,8 +73,6 @@ int board_early_init_f(void)
 
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
 	return 0;
 }
 
@@ -128,8 +120,6 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -139,6 +129,8 @@ void board_init_f(ulong dummy)
 		hang();
 	}
 
+	preloader_console_init();
+
 	ret = uclass_get_device_by_name(UCLASS_CLK,
 					"clock-controller@30380000",
 					&dev);
board/beacon/imx8mn/spl.c +2 -9
index bb51be01c52..4563446db19 100644
@@ -68,7 +68,6 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define PWM1_PAD_CTRL (PAD_CTL_FSEL2 | PAD_CTL_DSE6)
 
@@ -76,11 +75,6 @@ static iomux_v3_cfg_t const pwm_pads[] = {
 	IMX8MN_PAD_GPIO1_IO01__PWM1_OUT | MUX_PAD_CTRL(PWM1_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	IMX8MN_PAD_UART2_RXD__UART2_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MN_PAD_UART2_TXD__UART2_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
 	IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -95,7 +89,6 @@ int board_early_init_f(void)
 	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
 	init_uart_clk(1);
 
 	return 0;
@@ -114,14 +107,14 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	ret = spl_init();
 	if (ret) {
 		debug("spl_init() failed: %d\n", ret);
 		hang();
 	}
 
+	preloader_console_init();
+
 	enable_tzc380();
 
 	/* DDR initialization */
configs/imx8mm_beacon_defconfig +0 -1
index 417ece1ef8c..e1acf7e8810 100644
@@ -125,7 +125,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_CONS_INDEX=2
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/imx8mn_beacon_2g_defconfig +0 -1
index 5b9b3715b34..cadef45028d 100644
@@ -127,7 +127,6 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_RESET=y
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/imx8mn_beacon_defconfig +0 -1
index b296898d6db..357109e32e5 100644
@@ -131,7 +131,6 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_RESET=y
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
include/configs/imx8mm_beacon.h +0 -2
index 897eac66b14..899d2ec34f9 100644
@@ -80,6 +80,4 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE		0x80000000 /* 2GB DDR */
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 #endif
include/configs/imx8mn_beacon.h +0 -2
index 99cbc1d07c8..cadad050d07 100644
@@ -96,6 +96,4 @@
 #define PHYS_SDRAM_SIZE		0x40000000 /* 1GB DDR */
 #endif
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 #endif
Signature · 1 line
2.36.0
Tested-by on v2 2/17
#3 lore raw

Re: [PATCH V2 02/17] imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL

Quoted 7 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver model work.

For what it's worth, the series doesn't appear to apply cleanly on the current master, but I tested a Nano in addition to the Mini that I tested before.

Quoted 3 lines
Quoted 167 lines
---
 board/beacon/imx8mm/spl.c          | 12 ++----------
 board/beacon/imx8mn/spl.c          | 11 ++---------
 configs/imx8mm_beacon_defconfig    |  1 -
 configs/imx8mn_beacon_2g_defconfig |  1 -
 configs/imx8mn_beacon_defconfig    |  1 -
 include/configs/imx8mm_beacon.h    |  2 --
 include/configs/imx8mn_beacon.h    |  2 --
 7 files changed, 4 insertions(+), 26 deletions(-)
board/beacon/imx8mm/spl.c +2 -10
index 12266b22a42..f92b4c3ed0a 100644
@@ -59,14 +59,8 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define UART_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-       IMX8MM_PAD_UART2_RXD_UART2_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-       IMX8MM_PAD_UART2_TXD_UART2_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
        IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -79,8 +73,6 @@ int board_early_init_f(void)
 
        set_wdog_reset(wdog);
 
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
        return 0;
 }
 
@@ -128,8 +120,6 @@ void board_init_f(ulong dummy)
 
        timer_init();
 
-       preloader_console_init();
-
        /* Clear the BSS. */
        memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -139,6 +129,8 @@ void board_init_f(ulong dummy)
                hang();
        }
 
+       preloader_console_init();
+
        ret = uclass_get_device_by_name(UCLASS_CLK,
                                        "clock-controller@30380000",
                                        &dev);
board/beacon/imx8mn/spl.c +2 -9
index bb51be01c52..4563446db19 100644
@@ -68,7 +68,6 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define UART_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define PWM1_PAD_CTRL (PAD_CTL_FSEL2 | PAD_CTL_DSE6)
 
@@ -76,11 +75,6 @@ static iomux_v3_cfg_t const pwm_pads[] = {
        IMX8MN_PAD_GPIO1_IO01__PWM1_OUT | MUX_PAD_CTRL(PWM1_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const uart_pads[] = {
-       IMX8MN_PAD_UART2_RXD__UART2_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-       IMX8MN_PAD_UART2_TXD__UART2_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
        IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -95,7 +89,6 @@ int board_early_init_f(void)
        imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
        set_wdog_reset(wdog);
 
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
        init_uart_clk(1);
 
        return 0;
@@ -114,14 +107,14 @@ void board_init_f(ulong dummy)
 
        timer_init();
 
-       preloader_console_init();
-
        ret = spl_init();
        if (ret) {
                debug("spl_init() failed: %d\n", ret);
                hang();
        }
 
+       preloader_console_init();
+
        enable_tzc380();
 
        /* DDR initialization */
configs/imx8mm_beacon_defconfig +0 -1
index 417ece1ef8c..e1acf7e8810 100644
@@ -125,7 +125,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_CONS_INDEX=2
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/imx8mn_beacon_2g_defconfig +0 -1
index 5b9b3715b34..cadef45028d 100644
@@ -127,7 +127,6 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_RESET=y
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/imx8mn_beacon_defconfig +0 -1
index b296898d6db..357109e32e5 100644
@@ -131,7 +131,6 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_RESET=y
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
include/configs/imx8mm_beacon.h +0 -2
index 897eac66b14..899d2ec34f9 100644
@@ -80,6 +80,4 @@
 #define PHYS_SDRAM                     0x40000000
 #define PHYS_SDRAM_SIZE                0x80000000 /* 2GB DDR */
 
-#define CONFIG_MXC_UART_BASE           UART_BASE_ADDR(2)
-
 #endif
include/configs/imx8mn_beacon.h +0 -3
index 99cbc1d07c8..cadad050d07 100644
@@ -96,6 +96,4 @@
 #define PHYS_SDRAM_SIZE                0x40000000 /* 1GB DDR */
 #endif
 
-#define CONFIG_MXC_UART_BASE           UART_BASE_ADDR(2)
-
 #endif
--

2.36.0

#4 lore raw

Re: [PATCH V2 02/17] imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL

Quoted 7 lines · Adam Ford
Quoted 6 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver model work.

Quoted 7 lines

For what it's worth, the series doesn't appear to apply cleanly on the current master, but I tested a Nano in addition to the Mini that I tested before.

Quoted 2 lines

Thanks, the patchset is based or Tom's next branch as described in cover letter.

Thanks,
Peng.

Quoted 168 lines
Quoted 168 lines
---
  board/beacon/imx8mm/spl.c          | 12 ++----------
  board/beacon/imx8mn/spl.c          | 11 ++---------
  configs/imx8mm_beacon_defconfig    |  1 -
  configs/imx8mn_beacon_2g_defconfig |  1 -
  configs/imx8mn_beacon_defconfig    |  1 -
  include/configs/imx8mm_beacon.h    |  2 --
  include/configs/imx8mn_beacon.h    |  2 --
  7 files changed, 4 insertions(+), 26 deletions(-)
board/beacon/imx8mm/spl.c +2 -10
index 12266b22a42..f92b4c3ed0a 100644
@@ -59,14 +59,8 @@ int board_fit_config_name_match(const char *name)
  }
  #endif
 
-#define UART_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
  #define WDOG_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-       IMX8MM_PAD_UART2_RXD_UART2_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-       IMX8MM_PAD_UART2_TXD_UART2_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
  static iomux_v3_cfg_t const wdog_pads[] = {
         IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
  };
@@ -79,8 +73,6 @@ int board_early_init_f(void)
 
         set_wdog_reset(wdog);
 
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
         return 0;
  }
 
@@ -128,8 +120,6 @@ void board_init_f(ulong dummy)
 
         timer_init();
 
-       preloader_console_init();
-
         /* Clear the BSS. */
         memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -139,6 +129,8 @@ void board_init_f(ulong dummy)
                 hang();
         }
 
+       preloader_console_init();
+
         ret = uclass_get_device_by_name(UCLASS_CLK,
                                         "clock-controller@30380000",
                                         &dev);
board/beacon/imx8mn/spl.c +2 -9
index bb51be01c52..4563446db19 100644
@@ -68,7 +68,6 @@ int board_fit_config_name_match(const char *name)
  }
  #endif
 
-#define UART_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
  #define WDOG_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
  #define PWM1_PAD_CTRL (PAD_CTL_FSEL2 | PAD_CTL_DSE6)
 
@@ -76,11 +75,6 @@ static iomux_v3_cfg_t const pwm_pads[] = {
         IMX8MN_PAD_GPIO1_IO01__PWM1_OUT | MUX_PAD_CTRL(PWM1_PAD_CTRL),
  };
 
-static iomux_v3_cfg_t const uart_pads[] = {
-       IMX8MN_PAD_UART2_RXD__UART2_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-       IMX8MN_PAD_UART2_TXD__UART2_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
  static iomux_v3_cfg_t const wdog_pads[] = {
         IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
  };
@@ -95,7 +89,6 @@ int board_early_init_f(void)
         imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
         set_wdog_reset(wdog);
 
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
         init_uart_clk(1);
 
         return 0;
@@ -114,14 +107,14 @@ void board_init_f(ulong dummy)
 
         timer_init();
 
-       preloader_console_init();
-
         ret = spl_init();
         if (ret) {
                 debug("spl_init() failed: %d\n", ret);
                 hang();
         }
 
+       preloader_console_init();
+
         enable_tzc380();
 
         /* DDR initialization */
configs/imx8mm_beacon_defconfig +0 -1
index 417ece1ef8c..e1acf7e8810 100644
@@ -125,7 +125,6 @@ CONFIG_SPL_DM_REGULATOR_FIXED=y
  CONFIG_DM_REGULATOR_GPIO=y
  CONFIG_CONS_INDEX=2
  CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
  CONFIG_MXC_UART=y
  CONFIG_SPI=y
  CONFIG_DM_SPI=y
configs/imx8mn_beacon_2g_defconfig +0 -1
index 5b9b3715b34..cadef45028d 100644
@@ -127,7 +127,6 @@ CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_DM_REGULATOR_GPIO=y
  CONFIG_DM_RESET=y
  CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
  CONFIG_MXC_UART=y
  CONFIG_SPI=y
  CONFIG_DM_SPI=y
configs/imx8mn_beacon_defconfig +0 -1
index b296898d6db..357109e32e5 100644
@@ -131,7 +131,6 @@ CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_DM_REGULATOR_GPIO=y
  CONFIG_DM_RESET=y
  CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
  CONFIG_MXC_UART=y
  CONFIG_SPI=y
  CONFIG_DM_SPI=y
include/configs/imx8mm_beacon.h +0 -2
index 897eac66b14..899d2ec34f9 100644
@@ -80,6 +80,4 @@
  #define PHYS_SDRAM                     0x40000000
  #define PHYS_SDRAM_SIZE                0x80000000 /* 2GB DDR */
 
-#define CONFIG_MXC_UART_BASE           UART_BASE_ADDR(2)
-
  #endif
include/configs/imx8mn_beacon.h +0 -3
index 99cbc1d07c8..cadad050d07 100644
@@ -96,6 +96,4 @@
  #define PHYS_SDRAM_SIZE                0x40000000 /* 1GB DDR */
  #endif
 
-#define CONFIG_MXC_UART_BASE           UART_BASE_ADDR(2)
-
  #endif
--

2.36.0

#5 lore raw

PATCH v2 3/17 imx: imx8mm-cl-iot-gate: Enable DM_SERIAL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_DM_SERIAL. uart3 and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver model work.

---
 board/compulab/imx8mm-cl-iot-gate/spl.c    | 12 ++----------
 configs/imx8mm-cl-iot-gate-optee_defconfig |  1 +
 configs/imx8mm-cl-iot-gate_defconfig       |  1 +
 include/configs/imx8mm-cl-iot-gate.h       |  2 --
 4 files changed, 4 insertions(+), 12 deletions(-)
board/compulab/imx8mm-cl-iot-gate/spl.c +2 -10
index 2dc62d6682e..f183704c9d2 100644
@@ -83,14 +83,8 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
 	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -103,8 +97,6 @@ int board_early_init_f(void)
 
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
 	return 0;
 }
 
@@ -155,8 +147,6 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -166,6 +156,8 @@ void board_init_f(ulong dummy)
 		hang();
 	}
 
+	preloader_console_init();
+
 	ret = uclass_get_device_by_name(UCLASS_CLK,
 					"clock-controller@30380000",
 					&dev);
configs/imx8mm-cl-iot-gate-optee_defconfig +1 -0
index 57ecd7bb3b6..80055912096 100644
@@ -121,6 +121,7 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_ABX80X=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/imx8mm-cl-iot-gate_defconfig +1 -0
index 67f7576f996..dae7ddc20e0 100644
@@ -124,6 +124,7 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_ABX80X=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
include/configs/imx8mm-cl-iot-gate.h +0 -2
index 297d56b427f..fc738ed410e 100644
@@ -134,8 +134,6 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE			0x80000000 /* 2GB DDR */
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
-
 /* USDHC */
 
 #define CONFIG_SYS_FSL_USDHC_NUM	2
Signature · 1 line
2.36.0
#6 lore raw

PATCH v2 4/17 imx: imx8mm_icore: Enable SPL_DM_SERIAL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver model work.

---
 board/engicam/imx8mm/spl.c                    | 14 +++-----------
 configs/imx8mm-icore-mx8mm-ctouch2_defconfig  |  1 -
 configs/imx8mm-icore-mx8mm-edimm2.2_defconfig |  1 -
 include/configs/imx8mm_icore_mx8mm.h          |  3 ---
 4 files changed, 3 insertions(+), 16 deletions(-)
board/engicam/imx8mm/spl.c +3 -11
index f9be769ec59..f75f2dc634c 100644
@@ -54,19 +54,11 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	IMX8MM_PAD_UART2_RXD_UART2_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MM_PAD_UART2_TXD_UART2_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 int board_early_init_f(void)
 {
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
-	return 0;
+       return 0;
 }
 
 void board_init_f(ulong dummy)
@@ -81,8 +73,6 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -92,6 +82,8 @@ void board_init_f(ulong dummy)
 		hang();
 	}
 
+	preloader_console_init();
+
 	enable_tzc380();
 
 	/* DDR initialization */
configs/imx8mm-icore-mx8mm-ctouch2_defconfig +0 -1
index c95ff3e74fb..b831adb1121 100644
@@ -87,7 +87,6 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_CONS_INDEX=2
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
configs/imx8mm-icore-mx8mm-edimm2.2_defconfig +0 -1
index 62d23949969..614bacbfbf2 100644
@@ -87,7 +87,6 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_CONS_INDEX=2
 CONFIG_DM_SERIAL=y
-# CONFIG_SPL_DM_SERIAL is not set
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
include/configs/imx8mm_icore_mx8mm.h +0 -3
index e6642936cba..a3db85004e2 100644
@@ -54,9 +54,6 @@
 #define PHYS_SDRAM_SIZE			SZ_2G /* 2GB DDR */
 #define CONFIG_SYS_BOOTM_LEN		SZ_256M
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
-
 /* USDHC */
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
Signature · 1 line
2.36.0
#7 lore raw

PATCH v2 5/17 imx: imx8m[m/p]_phycore: Enable DM_SERIAL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver model work.

---
 board/phytec/phycore_imx8mm/spl.c | 12 ++----------
 board/phytec/phycore_imx8mp/spl.c |  8 --------
 configs/phycore-imx8mm_defconfig  |  1 +
 configs/phycore-imx8mp_defconfig  |  1 +
 include/configs/phycore_imx8mm.h  |  3 ---
 include/configs/phycore_imx8mp.h  |  3 ---
 6 files changed, 4 insertions(+), 24 deletions(-)
board/phytec/phycore_imx8mm/spl.c +2 -10
index d54145ef995..7f24a3affc8 100644
@@ -57,14 +57,8 @@ int board_fit_config_name_match(const char *name)
 	return 0;
 }
 
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
 	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -77,8 +71,6 @@ int board_early_init_f(void)
 
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
 	return 0;
 }
 
@@ -92,8 +84,6 @@ void board_init_f(ulong dummy)
 
 	board_early_init_f();
 
-	preloader_console_init();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -103,6 +93,8 @@ void board_init_f(ulong dummy)
 		hang();
 	}
 
+	preloader_console_init();
+
 	enable_tzc380();
 
 	/* DDR initialization */
board/phytec/phycore_imx8mp/spl.c +0 -8
index 19c486e5517..38a581bef57 100644
@@ -89,14 +89,8 @@ int board_fit_config_name_match(const char *name)
 	return 0;
 }
 
-#define UART_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	MX8MP_PAD_UART1_RXD__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX8MP_PAD_UART1_TXD__UART1_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
 	MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -109,8 +103,6 @@ int board_early_init_f(void)
 
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
 	return 0;
 }
 
configs/phycore-imx8mm_defconfig +1 -0
index b8cda9f64f2..0316d45caeb 100644
@@ -120,6 +120,7 @@ CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
configs/phycore-imx8mp_defconfig +1 -0
index d10ab2a22c1..2c53a5ff8c6 100644
@@ -111,6 +111,7 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPL_POWER_I2C=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
include/configs/phycore_imx8mm.h +0 -3
index 1d01104cfe8..a14a076172c 100644
@@ -72,7 +72,4 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE                 SZ_2G /* 2GB DDR */
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
-
 #endif /* __PHYCORE_IMX8MM_H */
include/configs/phycore_imx8mp.h +0 -3
index 75ddcf465f9..9c7331a4167 100644
@@ -72,7 +72,4 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE			0x80000000
 
-/* UART */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
-
 #endif /* __PHYCORE_IMX8MP_H */
Signature · 1 line
2.36.0
#8 lore raw

PATCH v2 6/17 imx: imx8mn_var_som: enable DM_SERIAL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver model work.

---
 board/variscite/imx8mn_var_som/spl.c | 11 ++---------
 configs/imx8mn_var_som_defconfig     |  1 +
 include/configs/imx8mn_var_som.h     |  2 --
 3 files changed, 3 insertions(+), 11 deletions(-)
board/variscite/imx8mn_var_som/spl.c +2 -9
index 32703c5f0b3..1a8b64fc0a9 100644
@@ -40,14 +40,8 @@ void spl_board_init(void)
 		puts("Failed to find clock node. Check device tree\n");
 }
 
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static const iomux_v3_cfg_t uart_pads[] = {
-	IMX8MN_PAD_UART4_RXD__UART4_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MN_PAD_UART4_TXD__UART4_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static const iomux_v3_cfg_t wdog_pads[] = {
 	IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -59,7 +53,6 @@ int board_early_init_f(void)
 	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
 	init_uart_clk(3);
 
 	return 0;
@@ -78,14 +71,14 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	ret = spl_init();
 	if (ret) {
 		debug("spl_init() failed: %d\n", ret);
 		hang();
 	}
 
+	preloader_console_init();
+
 	/* DDR initialization */
 	spl_dram_init();
 
configs/imx8mn_var_som_defconfig +1 -0
index 898f3f2f9f6..889bcf7dc58 100644
@@ -96,6 +96,7 @@ CONFIG_SPL_DM_PMIC_BD71837=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
include/configs/imx8mn_var_som.h +0 -2
index ce679098e5c..ccf83128f28 100644
@@ -53,8 +53,6 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE			SZ_1G /* 1GB DDR */
 
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(4)
-
 /* USDHC */
 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
 
Signature · 1 line
2.36.0
#9 lore raw

PATCH v2 7/17 imx: kontron-sl-mx8mm: enable DM_SERIAL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver model work.

---
 board/kontron/sl-mx8mm/spl.c       | 12 ++----------
 configs/kontron-sl-mx8mm_defconfig |  1 +
 include/configs/kontron-sl-mx8mm.h |  1 -
 3 files changed, 3 insertions(+), 11 deletions(-)
board/kontron/sl-mx8mm/spl.c +2 -10
index 4ef03c8c172..a58a75dc958 100644
@@ -32,7 +32,6 @@ enum {
 
 #define GPIO_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define I2C_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
-#define UART_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
 #define TOUCH_RESET_GPIO	IMX_GPIO_NR(3, 23)
@@ -51,11 +50,6 @@ static iomux_v3_cfg_t const touch_gpio[] = {
 	IMX8MM_PAD_SAI5_RXD2_GPIO3_IO23 | MUX_PAD_CTRL(GPIO_PAD_CTRL)
 };
 
-static iomux_v3_cfg_t const uart_pads[] = {
-	IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
 	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -230,8 +224,6 @@ int board_early_init_f(void)
 
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
 	return 0;
 }
 
@@ -273,8 +265,6 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -284,6 +274,8 @@ void board_init_f(ulong dummy)
 		hang();
 	}
 
+	preloader_console_init();
+
 	enable_tzc380();
 
 	/* PMIC initialization */
configs/kontron-sl-mx8mm_defconfig +1 -0
index 0fceb60c612..d508bcbd61e 100644
@@ -114,6 +114,7 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
 CONFIG_CONS_INDEX=2
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
include/configs/kontron-sl-mx8mm.h +0 -1
index 95b836c5470..c4be62c3721 100644
@@ -23,7 +23,6 @@
 #define CONFIG_SYS_INIT_RAM_SIZE	0x200000
 
 /* Board and environment settings */
-#define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
 #define CONFIG_HOSTNAME			"kontron-mx8mm"
 
 #ifdef CONFIG_USB_EHCI_HCD
Signature · 1 line
2.36.0
Tested-by on v2 7/17
#10 lore raw

Re: [PATCH V2 07/17] imx: kontron-sl-mx8mm: enable DM_SERIAL

Am 11.06.22 um 14:21 schrieb Peng Fan (OSS):

Quoted 10 lines

From: Peng Fan <[email protected]>

Enable CONFIG_DM_SERIAL. uart and its pinmux was already marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver model work.

#11 lore raw

PATCH v2 8/17 configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

CONFIG_SPL_RAW_IMAGE_SUPPORT default y has been used to replace CONFIG_SPL_ABORT_ON_RAW_IMAGE for quite some time, so drop CONFIG_SPL_ABORT_ON_RAW_IMAGE.

---
 include/configs/capricorn-common.h          | 1 -
 include/configs/cgtqmx8.h                   | 1 -
 include/configs/imx8mm-cl-iot-gate.h        | 1 -
 include/configs/imx8mm_beacon.h             | 1 -
 include/configs/imx8mm_data_modul_edm_sbc.h | 1 -
 include/configs/imx8mm_evk.h                | 1 -
 include/configs/imx8mm_icore_mx8mm.h        | 1 -
 include/configs/imx8mm_venice.h             | 1 -
 include/configs/imx8mn_beacon.h             | 1 -
 include/configs/imx8mn_evk.h                | 1 -
 include/configs/imx8mn_venice.h             | 1 -
 include/configs/imx8mp_evk.h                | 1 -
 include/configs/imx8mp_rsb3720.h            | 1 -
 include/configs/imx8mp_venice.h             | 1 -
 include/configs/imx8mq_cm.h                 | 1 -
 include/configs/imx8mq_evk.h                | 1 -
 include/configs/imx8mq_phanbell.h           | 1 -
 include/configs/imx8qm_mek.h                | 1 -
 include/configs/imx8qxp_mek.h               | 1 -
 include/configs/imx8ulp_evk.h               | 1 -
 include/configs/kontron_pitx_imx8m.h        | 1 -
 include/configs/phycore_imx8mm.h            | 1 -
 include/configs/phycore_imx8mp.h            | 1 -
 include/configs/pico-imx8mq.h               | 1 -
 include/configs/verdin-imx8mm.h             | 1 -
 include/configs/verdin-imx8mp.h             | 1 -
 26 files changed, 26 deletions(-)
include/configs/capricorn-common.h +0 -1
index 933fcfcfd28..0bbfe0c2174 100644
@@ -20,7 +20,6 @@
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif /* CONFIG_SPL_BUILD */
 
include/configs/cgtqmx8.h +0 -1
index 0266d6988ce..a8ff0a1317d 100644
@@ -19,7 +19,6 @@
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
 
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 /* Flat Device Tree Definitions */
include/configs/imx8mm-cl-iot-gate.h +0 -1
index fc738ed410e..7135a83e042 100644
@@ -20,7 +20,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x912000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mm_beacon.h +0 -1
index 899d2ec34f9..79ed3971225 100644
@@ -17,7 +17,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x930000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mm_data_modul_edm_sbc.h +0 -1
index bb19aa292b8..282b295497c 100644
@@ -18,7 +18,6 @@
 #define CONFIG_MALLOC_F_ADDR		0x930000
 
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mm_evk.h +0 -1
index 6da09deba85..e4b2544410b 100644
@@ -19,7 +19,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x930000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mm_icore_mx8mm.h +0 -1
index a3db85004e2..dfe6966c462 100644
@@ -18,7 +18,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 # define CONFIG_MALLOC_F_ADDR		0x930000
 /* For RAW image gives a error info not panic */
-# define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif /* CONFIG_SPL_BUILD */
 
 #ifndef CONFIG_SPL_BUILD
include/configs/imx8mm_venice.h +0 -1
index 7a2ef8f533b..8a6cc69b5eb 100644
@@ -17,7 +17,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x930000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mn_beacon.h +0 -1
index cadad050d07..6faecbde776 100644
@@ -18,7 +18,6 @@
 #define CONFIG_MALLOC_F_ADDR		0x184000
 
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif /* CONFIG_SPL_BUILD */
 
include/configs/imx8mn_evk.h +0 -1
index 506d1ffd5a6..1396ae1422e 100644
@@ -18,7 +18,6 @@
 
 #ifdef CONFIG_SPL_BUILD
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mn_venice.h +0 -1
index 8c45c8462c2..8ef55aa6eba 100644
@@ -15,7 +15,6 @@
 
 #ifdef CONFIG_SPL_BUILD
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
include/configs/imx8mp_evk.h +0 -1
index 465e1cb4a7e..618010db9fb 100644
@@ -18,7 +18,6 @@
 #ifdef CONFIG_SPL_BUILD
 /*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
 
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #define CONFIG_POWER_PCA9450
 
include/configs/imx8mp_rsb3720.h +0 -1
index efff6b95553..1d4c057ccc0 100644
@@ -32,7 +32,6 @@
 						  * set \
 						  */
 
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #if defined(CONFIG_NAND_BOOT)
 #define CONFIG_SPL_NAND_MXS
include/configs/imx8mp_venice.h +0 -1
index d9baffb3a24..fce87b1657d 100644
@@ -15,7 +15,6 @@
 
 #ifdef CONFIG_SPL_BUILD
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
include/configs/imx8mq_cm.h +0 -1
index a242d5e3e8e..a5d6adfaa4c 100644
@@ -20,7 +20,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x182000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #endif
 
include/configs/imx8mq_evk.h +0 -1
index 98ddb06fe33..182f45bb74d 100644
@@ -21,7 +21,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x182000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #define CONFIG_POWER_PFUZE100
 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
include/configs/imx8mq_phanbell.h +0 -1
index 1b3c0493ebd..97bd5044501 100644
@@ -18,7 +18,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x182000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 /* ENET Config */
include/configs/imx8qm_mek.h +0 -1
index f4d19f87312..b59502e5895 100644
@@ -20,7 +20,6 @@
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
 
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 #ifdef CONFIG_AHAB_BOOT
include/configs/imx8qxp_mek.h +0 -1
index a6aabc7add7..511f6c8d9bb 100644
@@ -18,7 +18,6 @@
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
 
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 #ifdef CONFIG_AHAB_BOOT
include/configs/imx8ulp_evk.h +0 -1
index 987069447d5..f9080216f1f 100644
@@ -16,7 +16,6 @@
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_MALLOC_F_ADDR		0x22040000
 
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE /* For RAW image gives a error info not panic */
 
 #endif
 
include/configs/kontron_pitx_imx8m.h +0 -1
index 88aaa55bef5..bf336b99d6a 100644
@@ -22,7 +22,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x182000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 
 #define CONFIG_POWER_PFUZE100
include/configs/phycore_imx8mm.h +0 -1
index a14a076172c..f8c3e1f10db 100644
@@ -20,7 +20,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x930000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
include/configs/phycore_imx8mp.h +0 -1
index 9c7331a4167..dd0b108a89f 100644
@@ -17,7 +17,6 @@
 		(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
 
 #ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #define CONFIG_POWER_PCA9450
 
include/configs/pico-imx8mq.h +0 -1
index 25ad936a06b..a587570ea17 100644
@@ -18,7 +18,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x182000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 /* ENET Config */
include/configs/verdin-imx8mm.h +0 -1
index 4fb0d69f579..afc507b32a3 100644
@@ -19,7 +19,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR		0x930000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 #endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
include/configs/verdin-imx8mp.h +0 -1
index 704a0538a9c..97f537e8e06 100644
@@ -19,7 +19,6 @@
 /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
 #define CONFIG_MALLOC_F_ADDR				0x184000
 /* For RAW image gives a error info not panic */
-#define CONFIG_SPL_ABORT_ON_RAW_IMAGE
 
 #define CONFIG_POWER_PCA9450
 
Signature · 1 line
2.36.0
#12 lore raw

PATCH v2 9/17 imx: imx8mm_beacon: enable pinctrl_wdog in SPL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi |  4 ++++
 board/beacon/imx8mm/spl.c                  | 19 -------------------
 2 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi +4 -0
index e33e10ac129..c94b4ffa4c3 100644
@@ -73,6 +73,10 @@
 	u-boot,dm-spl;
 };
 
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
+
 &uart2 {
 	u-boot,dm-spl;
 };
board/beacon/imx8mm/spl.c +0 -19
index f92b4c3ed0a..a93cc938784 100644
@@ -59,23 +59,6 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 static int power_init_board(void)
 {
 	struct udevice *dev;
@@ -116,8 +99,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(1);
 
-	board_early_init_f();
-
 	timer_init();
 
 	/* Clear the BSS. */
Signature · 1 line
2.36.0
#13 lore raw

PATCH v2 10/17 imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi |  4 ++++
 board/compulab/imx8mm-cl-iot-gate/spl.c     | 19 -------------------
 2 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +4 -0
index 433b02cceee..a7044b63699 100644
@@ -84,6 +84,10 @@
 	u-boot,dm-spl;
 };
 
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
+
 &uart3 {
 	u-boot,dm-spl;
 };
board/compulab/imx8mm-cl-iot-gate/spl.c +0 -19
index f183704c9d2..d2d20269ba0 100644
@@ -83,23 +83,6 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 static int power_init_board(void)
 {
 	struct udevice *dev;
@@ -141,8 +124,6 @@ void board_init_f(ulong dummy)
 
 	arch_cpu_init();
 
-	board_early_init_f();
-
 	init_uart_clk(2);
 
 	timer_init();
Signature · 1 line
2.36.0
#14 lore raw

PATCH v2 11/17 imx: engicam-imx8mm: drop unused macro

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Drop unused WDOG macro

---
 board/engicam/imx8mm/spl.c | 2 --
 1 file changed, 2 deletions(-)
board/engicam/imx8mm/spl.c +0 -2
index f75f2dc634c..1846134a492 100644
@@ -54,8 +54,6 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
 int board_early_init_f(void)
 {
        return 0;
Signature · 1 line
2.36.0
#15 lore raw

PATCH v2 12/17 imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 arch/arm/dts/imx8mm-venice-u-boot.dtsi |  4 ++++
 arch/arm/dts/imx8mn-venice-u-boot.dtsi |  4 ++++
 arch/arm/dts/imx8mp-venice-u-boot.dtsi |  4 ++++
 board/gateworks/venice/spl.c           | 29 --------------------------
 4 files changed, 12 insertions(+), 29 deletions(-)
arch/arm/dts/imx8mm-venice-u-boot.dtsi +4 -0
index c61c6de935f..68978a0413e 100644
@@ -72,3 +72,7 @@
 &wdog1 {
 	u-boot,dm-spl;
 };
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
arch/arm/dts/imx8mn-venice-u-boot.dtsi +4 -0
index 4f23da35676..35819553879 100644
@@ -110,6 +110,10 @@
 	u-boot,dm-spl;
 };
 
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
+
 &binman {
 	u-boot-spl-ddr {
 		align = <4>;
arch/arm/dts/imx8mp-venice-u-boot.dtsi +4 -0
index 37f3edc9817..96b9fa89cf4 100644
@@ -72,3 +72,7 @@
 &wdog1 {
 	u-boot,dm-spl;
 };
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
board/gateworks/venice/spl.c +0 -29
index 6e6ce015f28..4c0feb4381c 100644
@@ -87,33 +87,6 @@ static void spl_dram_init(int size)
 	ddr_init(dram_timing);
 }
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-#ifdef CONFIG_IMX8MM
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-#elif CONFIG_IMX8MN
-static const iomux_v3_cfg_t wdog_pads[] = {
-	IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-#elif CONFIG_IMX8MP
-static const iomux_v3_cfg_t wdog_pads[] = {
-	MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-#endif
-
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 /*
  * Model specific PMIC adjustments necessary prior to DRAM init
  *
@@ -253,8 +226,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(1);
 
-	board_early_init_f();
-
 	timer_init();
 
 	/* Clear the BSS. */
Signature · 1 line
2.36.0
#16 lore raw

PATCH v2 13/17 imx: imx8mn-beacon: enable pinctrl_wdog in SPL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi |  4 ++++
 board/beacon/imx8mn/spl.c                  | 10 ----------
 2 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi +4 -0
index 69fd69c8d02..eb1dd8debba 100644
@@ -132,6 +132,10 @@
 	u-boot,dm-spl;
 };
 
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
+
 &binman {
 	 u-boot-spl-ddr {
 		filename = "u-boot-spl-ddr.bin";
board/beacon/imx8mn/spl.c +0 -10
index 4563446db19..029f71bc995 100644
@@ -68,27 +68,17 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define PWM1_PAD_CTRL (PAD_CTL_FSEL2 | PAD_CTL_DSE6)
 
 static iomux_v3_cfg_t const pwm_pads[] = {
 	IMX8MN_PAD_GPIO1_IO01__PWM1_OUT | MUX_PAD_CTRL(PWM1_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 int board_early_init_f(void)
 {
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
 	/* Claiming pwm pins prevents LCD flicker during startup*/
 	imx_iomux_v3_setup_multiple_pads(pwm_pads, ARRAY_SIZE(pwm_pads));
 
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-	set_wdog_reset(wdog);
-
 	init_uart_clk(1);
 
 	return 0;
Signature · 1 line
2.36.0
#17 lore raw

PATCH v2 14/17 imx: imx8mn_var_som: clean up board watchdog code

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

pinctrl_wdog already marked u-boot,dm-spl, so clean up board code.

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 board/variscite/imx8mn_var_som/spl.c | 11 -----------
 1 file changed, 11 deletions(-)
board/variscite/imx8mn_var_som/spl.c +0 -11
index 1a8b64fc0a9..41e70505774 100644
@@ -40,19 +40,8 @@ void spl_board_init(void)
 		puts("Failed to find clock node. Check device tree\n");
 }
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static const iomux_v3_cfg_t wdog_pads[] = {
-	IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 int board_early_init_f(void)
 {
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-	set_wdog_reset(wdog);
-
 	init_uart_clk(3);
 
 	return 0;
Signature · 1 line
2.36.0
#18 lore raw

PATCH v2 15/17 imx: imx8mp_rsb7320a1: enable wdog driver model in SPL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark wdog1/pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi          |  8 ++++++++
 board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 12 ------------
 2 files changed, 8 insertions(+), 12 deletions(-)
arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi +8 -0
index 2848b24f655..4419967ee42 100644
@@ -89,6 +89,14 @@
 	u-boot,dm-spl;
 };
 
+&wdog1 {
+	u-boot,dm-spl;
+};
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
+
 &pinctrl_i2c1 {
 	u-boot,dm-spl;
 };
board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +0 -12
index f129ebd429b..0a1b2c94161 100644
@@ -28,12 +28,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static const iomux_v3_cfg_t wdog_pads[] = {
-	MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 #ifdef CONFIG_NAND_MXS
 static void setup_gpmi_nand(void)
 {
@@ -69,12 +63,6 @@ u8 num_image_type_guids = ARRAY_SIZE(fw_images);
 
 int board_early_init_f(void)
 {
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
 	init_uart_clk(2);
 
 	return 0;
Signature · 1 line
2.36.0
#19 lore raw

PATCH v2 16/17 imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi |  4 ++++
 board/kontron/sl-mx8mm/spl.c                  | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +4 -0
index 22d18e6f1cf..6882513f161 100644
@@ -126,3 +126,7 @@
 &wdog1 {
 	u-boot,dm-spl;
 };
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
board/kontron/sl-mx8mm/spl.c +0 -18
index a58a75dc958..63361f1d2ab 100644
@@ -32,7 +32,6 @@ enum {
 
 #define GPIO_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define I2C_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
 #define TOUCH_RESET_GPIO	IMX_GPIO_NR(3, 23)
 
@@ -50,10 +49,6 @@ static iomux_v3_cfg_t const touch_gpio[] = {
 	IMX8MM_PAD_SAI5_RXD2_GPIO3_IO23 | MUX_PAD_CTRL(GPIO_PAD_CTRL)
 };
 
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
@@ -216,17 +211,6 @@ void spl_board_init(void)
 		printf("Failed to find clock node. Check device tree\n");
 }
 
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 static int power_init_board(void)
 {
 	struct udevice *dev;
@@ -261,8 +245,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(2);
 
-	board_early_init_f();
-
 	timer_init();
 
 	/* Clear the BSS. */
Signature · 1 line
2.36.0
Reviewed-by Tested-by on v2 16/17
#20 lore raw

Re: [PATCH V2 16/17] imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL

Am 11.06.22 um 14:21 schrieb Peng Fan (OSS):

Quoted 9 lines

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

Thanks for the cleanup!!!

The subject line should probably be:

imx: kontron-sl-mx8mm: enable pinctrl_wdog in SPL

Otherwise:

Quoted 67 lines
---
 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi |  4 ++++
 board/kontron/sl-mx8mm/spl.c                  | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +4 -0
index 22d18e6f1cf..6882513f161 100644
@@ -126,3 +126,7 @@
 &wdog1 {
 	u-boot,dm-spl;
 };
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
board/kontron/sl-mx8mm/spl.c +0 -18
index a58a75dc958..63361f1d2ab 100644
@@ -32,7 +32,6 @@ enum {
 
 #define GPIO_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define I2C_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
 #define TOUCH_RESET_GPIO	IMX_GPIO_NR(3, 23)
 
@@ -50,10 +49,6 @@ static iomux_v3_cfg_t const touch_gpio[] = {
 	IMX8MM_PAD_SAI5_RXD2_GPIO3_IO23 | MUX_PAD_CTRL(GPIO_PAD_CTRL)
 };
 
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
@@ -216,17 +211,6 @@ void spl_board_init(void)
 		printf("Failed to find clock node. Check device tree\n");
 }
 
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 static int power_init_board(void)
 {
 	struct udevice *dev;
@@ -261,8 +245,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(2);
 
-	board_early_init_f();
-
 	timer_init();
 
 	/* Clear the BSS. */
#21 lore raw

Re: [PATCH V2 16/17] imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL

Am 14.06.22 um 12:18 schrieb Frieder Schrempf:

Quoted 13 lines

Am 11.06.22 um 14:21 schrieb Peng Fan (OSS):

Quoted 9 lines

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

Thanks for the cleanup!!!

Quoted 8 lines

The subject line should probably be:

imx: kontron-sl-mx8mm: enable pinctrl_wdog in SPL

Otherwise:

Stefano, I see that my tags have been picked up in next, but the subject line hasn't been fixed. Especially mx8mm instead of mx8mn would be a meaningful correction.

Just for your information. If this is difficult to fix before merging to master, then it's probably fine to leave it as it is.

#22 lore raw

Re: [PATCH V2 16/17] imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL

Quoted 19 lines · Frieder Schrempf

Am 14.06.22 um 12:18 schrieb Frieder Schrempf:

Quoted 18 lines

Am 11.06.22 um 14:21 schrieb Peng Fan (OSS):

Quoted 9 lines

From: Peng Fan <[email protected]>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

Thanks for the cleanup!!!

The subject line should probably be:

imx: kontron-sl-mx8mm: enable pinctrl_wdog in SPL

Otherwise:

Quoted 8 lines
Quoted 2 lines

Stefano, I see that my tags have been picked up in next, but the subject line hasn't been fixed. Especially mx8mm instead of mx8mn would be a meaningful correction.

Just for your information. If this is difficult to fix before merging to master, then it's probably fine to leave it as it is.

oops, I overlooked your reply.

Regards,
Peng.

#23 lore raw

PATCH v2 17/17 imx: phycore_imx8mm/p: clean up board watchdog code

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

pinctrl_wdog already marked u-boot,dm-spl, so clean up board code.

The set_wdog_reset() function is not necessary as this is handled by the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property being set.

---
 board/phytec/phycore_imx8mm/spl.c | 19 -------------------
 board/phytec/phycore_imx8mp/spl.c | 19 -------------------
 2 files changed, 38 deletions(-)
board/phytec/phycore_imx8mm/spl.c +0 -19
index 7f24a3affc8..d87ab6d4497 100644
@@ -57,23 +57,6 @@ int board_fit_config_name_match(const char *name)
 	return 0;
 }
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE)
-
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 void board_init_f(ulong dummy)
 {
 	int ret;
@@ -82,8 +65,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(2);
 
-	board_early_init_f();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
board/phytec/phycore_imx8mp/spl.c +0 -19
index 38a581bef57..faed6fc3b76 100644
@@ -89,23 +89,6 @@ int board_fit_config_name_match(const char *name)
 	return 0;
 }
 
-#define WDOG_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static iomux_v3_cfg_t const wdog_pads[] = {
-	MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 void board_init_f(ulong dummy)
 {
 	int ret;
@@ -114,8 +97,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(0);
 
-	board_early_init_f();
-
 	ret = spl_early_init();
 	if (ret) {
 		debug("spl_early_init() failed: %d\n", ret);
Signature · 1 line
2.36.0
#24 lore raw
In reply to Peng Fan (OSS)
Quoted 4 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Stefano,
Is there a chance to get this into your next branch, then into Tom's next branch?

Yes, I will do in this way.

Stefano

Quoted 90 lines

There are often conflicts when applying after pending some time.

V2:
Rebased on Tom's next branch.
Drop the imx8m.h patches, since Tom already migrated most Kconfig Merge the verdi SPL_DM_SERIAL convertion patch to patch 1

Peng Fan (17):
imx: drop CONFIG_MXC_UART_BASE
imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL
imx: imx8mm-cl-iot-gate: Enable DM_SERIAL
imx: imx8mm_icore: Enable SPL_DM_SERIAL
imx: imx8m[m/p]_phycore: Enable DM_SERIAL
imx: imx8mn_var_som: enable DM_SERIAL
imx: kontron-sl-mx8mm: enable DM_SERIAL
configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE
imx: imx8mm_beacon: enable pinctrl_wdog in SPL
imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL
imx: engicam-imx8mm: drop unused macro
imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL
imx: imx8mn-beacon: enable pinctrl_wdog in SPL
imx: imx8mn_var_som: clean up board watchdog code
imx: imx8mp_rsb7320a1: enable wdog driver model in SPL
imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
imx: phycore_imx8mm/p: clean up board watchdog code

  arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi    |  4 +++
  arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi   |  4 +++
  arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi |  4 +++
  arch/arm/dts/imx8mm-venice-u-boot.dtsi        |  4 +++
  arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi    |  4 +++
  arch/arm/dts/imx8mn-venice-u-boot.dtsi        |  4 +++
  arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi    |  8 +++++
  arch/arm/dts/imx8mp-venice-u-boot.dtsi        |  4 +++
  .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c       | 12 -------
  board/beacon/imx8mm/spl.c                     | 31 ++-----------------
  board/beacon/imx8mn/spl.c                     | 21 ++-----------
  board/compulab/imx8mm-cl-iot-gate/spl.c       | 31 ++-----------------
  board/engicam/imx8mm/spl.c                    | 16 ++--------
  board/gateworks/venice/spl.c                  | 29 -----------------
  board/kontron/sl-mx8mm/spl.c                  | 30 ++----------------
  board/phytec/phycore_imx8mm/spl.c             | 31 ++-----------------
  board/phytec/phycore_imx8mp/spl.c             | 27 ----------------
  board/variscite/imx8mn_var_som/spl.c          | 22 ++-----------
  configs/imx8mm-cl-iot-gate-optee_defconfig    |  1 +
  configs/imx8mm-cl-iot-gate_defconfig          |  1 +
  configs/imx8mm-icore-mx8mm-ctouch2_defconfig  |  1 -
  configs/imx8mm-icore-mx8mm-edimm2.2_defconfig |  1 -
  configs/imx8mm_beacon_defconfig               |  1 -
  configs/imx8mn_beacon_2g_defconfig            |  1 -
  configs/imx8mn_beacon_defconfig               |  1 -
  configs/imx8mn_var_som_defconfig              |  1 +
  configs/kontron-sl-mx8mm_defconfig            |  1 +
  configs/phycore-imx8mm_defconfig              |  1 +
  configs/phycore-imx8mp_defconfig              |  1 +
  include/configs/aristainetos2.h               |  2 --
  include/configs/capricorn-common.h            |  1 -
  include/configs/cgtqmx8.h                     |  1 -
  include/configs/imx8mm-cl-iot-gate.h          |  3 --
  include/configs/imx8mm_beacon.h               |  3 --
  include/configs/imx8mm_data_modul_edm_sbc.h   |  1 -
  include/configs/imx8mm_evk.h                  |  3 --
  include/configs/imx8mm_icore_mx8mm.h          |  4 ---
  include/configs/imx8mm_venice.h               |  4 ---
  include/configs/imx8mn_beacon.h               |  3 --
  include/configs/imx8mn_bsh_smm_s2_common.h    |  4 ---
  include/configs/imx8mn_evk.h                  |  3 --
  include/configs/imx8mn_var_som.h              |  2 --
  include/configs/imx8mn_venice.h               |  4 ---
  include/configs/imx8mp_evk.h                  |  3 --
  include/configs/imx8mp_rsb3720.h              |  1 -
  include/configs/imx8mp_venice.h               |  4 ---
  include/configs/imx8mq_cm.h                   |  1 -
  include/configs/imx8mq_evk.h                  |  1 -
  include/configs/imx8mq_phanbell.h             |  1 -
  include/configs/imx8qm_mek.h                  |  1 -
  include/configs/imx8qxp_mek.h                 |  1 -
  include/configs/imx8ulp_evk.h                 |  1 -
  include/configs/kontron-sl-mx8mm.h            |  1 -
  include/configs/kontron_pitx_imx8m.h          |  1 -
  include/configs/mx7dsabresd.h                 |  1 -
  include/configs/phycore_imx8mm.h              |  4 ---
  include/configs/phycore_imx8mp.h              |  4 ---
  include/configs/pico-imx8mq.h                 |  1 -
  include/configs/somlabs_visionsom_6ull.h      |  1 -
  include/configs/tbs2910.h                     |  3 --
  include/configs/verdin-imx8mm.h               |  4 ---
  include/configs/verdin-imx8mp.h               |  4 ---
  62 files changed, 57 insertions(+), 316 deletions(-)
#25 lore raw
In reply to Peng Fan (OSS)
Quoted 6 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Stefano,
Is there a chance to get this into your next branch, then into Tom's next branch? There are often conflicts when applying after pending some time.

Series is merged into u-boot-imx, -next branch. PR will follow.

Best regards,
Stefano

Quoted 88 lines

V2:
Rebased on Tom's next branch.
Drop the imx8m.h patches, since Tom already migrated most Kconfig Merge the verdi SPL_DM_SERIAL convertion patch to patch 1

Peng Fan (17):
imx: drop CONFIG_MXC_UART_BASE
imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL
imx: imx8mm-cl-iot-gate: Enable DM_SERIAL
imx: imx8mm_icore: Enable SPL_DM_SERIAL
imx: imx8m[m/p]_phycore: Enable DM_SERIAL
imx: imx8mn_var_som: enable DM_SERIAL
imx: kontron-sl-mx8mm: enable DM_SERIAL
configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE
imx: imx8mm_beacon: enable pinctrl_wdog in SPL
imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL
imx: engicam-imx8mm: drop unused macro
imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL
imx: imx8mn-beacon: enable pinctrl_wdog in SPL
imx: imx8mn_var_som: clean up board watchdog code
imx: imx8mp_rsb7320a1: enable wdog driver model in SPL
imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
imx: phycore_imx8mm/p: clean up board watchdog code

  arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi    |  4 +++
  arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi   |  4 +++
  arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi |  4 +++
  arch/arm/dts/imx8mm-venice-u-boot.dtsi        |  4 +++
  arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi    |  4 +++
  arch/arm/dts/imx8mn-venice-u-boot.dtsi        |  4 +++
  arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi    |  8 +++++
  arch/arm/dts/imx8mp-venice-u-boot.dtsi        |  4 +++
  .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c       | 12 -------
  board/beacon/imx8mm/spl.c                     | 31 ++-----------------
  board/beacon/imx8mn/spl.c                     | 21 ++-----------
  board/compulab/imx8mm-cl-iot-gate/spl.c       | 31 ++-----------------
  board/engicam/imx8mm/spl.c                    | 16 ++--------
  board/gateworks/venice/spl.c                  | 29 -----------------
  board/kontron/sl-mx8mm/spl.c                  | 30 ++----------------
  board/phytec/phycore_imx8mm/spl.c             | 31 ++-----------------
  board/phytec/phycore_imx8mp/spl.c             | 27 ----------------
  board/variscite/imx8mn_var_som/spl.c          | 22 ++-----------
  configs/imx8mm-cl-iot-gate-optee_defconfig    |  1 +
  configs/imx8mm-cl-iot-gate_defconfig          |  1 +
  configs/imx8mm-icore-mx8mm-ctouch2_defconfig  |  1 -
  configs/imx8mm-icore-mx8mm-edimm2.2_defconfig |  1 -
  configs/imx8mm_beacon_defconfig               |  1 -
  configs/imx8mn_beacon_2g_defconfig            |  1 -
  configs/imx8mn_beacon_defconfig               |  1 -
  configs/imx8mn_var_som_defconfig              |  1 +
  configs/kontron-sl-mx8mm_defconfig            |  1 +
  configs/phycore-imx8mm_defconfig              |  1 +
  configs/phycore-imx8mp_defconfig              |  1 +
  include/configs/aristainetos2.h               |  2 --
  include/configs/capricorn-common.h            |  1 -
  include/configs/cgtqmx8.h                     |  1 -
  include/configs/imx8mm-cl-iot-gate.h          |  3 --
  include/configs/imx8mm_beacon.h               |  3 --
  include/configs/imx8mm_data_modul_edm_sbc.h   |  1 -
  include/configs/imx8mm_evk.h                  |  3 --
  include/configs/imx8mm_icore_mx8mm.h          |  4 ---
  include/configs/imx8mm_venice.h               |  4 ---
  include/configs/imx8mn_beacon.h               |  3 --
  include/configs/imx8mn_bsh_smm_s2_common.h    |  4 ---
  include/configs/imx8mn_evk.h                  |  3 --
  include/configs/imx8mn_var_som.h              |  2 --
  include/configs/imx8mn_venice.h               |  4 ---
  include/configs/imx8mp_evk.h                  |  3 --
  include/configs/imx8mp_rsb3720.h              |  1 -
  include/configs/imx8mp_venice.h               |  4 ---
  include/configs/imx8mq_cm.h                   |  1 -
  include/configs/imx8mq_evk.h                  |  1 -
  include/configs/imx8mq_phanbell.h             |  1 -
  include/configs/imx8qm_mek.h                  |  1 -
  include/configs/imx8qxp_mek.h                 |  1 -
  include/configs/imx8ulp_evk.h                 |  1 -
  include/configs/kontron-sl-mx8mm.h            |  1 -
  include/configs/kontron_pitx_imx8m.h          |  1 -
  include/configs/mx7dsabresd.h                 |  1 -
  include/configs/phycore_imx8mm.h              |  4 ---
  include/configs/phycore_imx8mp.h              |  4 ---
  include/configs/pico-imx8mq.h                 |  1 -
  include/configs/somlabs_visionsom_6ull.h      |  1 -
  include/configs/tbs2910.h                     |  3 --
  include/configs/verdin-imx8mm.h               |  4 ---
  include/configs/verdin-imx8mp.h               |  4 ---
  62 files changed, 57 insertions(+), 316 deletions(-)
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]
=====================================================================