[PATCH] mx6cuboxi: migrate to DM_SERIAL

Baruch Siach baruch at tkos.co.il
Thu Nov 3 17:03:38 CET 2022


Add the needed DT overrides to enable UART in SPL.

Cc: Fabio Estevam <festevam at gmail.com>
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 ...mx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi | 16 ++++++++++++++++
 board/solidrun/mx6cuboxi/mx6cuboxi.c             |  3 +++
 configs/mx6cuboxi_defconfig                      |  2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
index 400b885e4370..e1cb9b3e89ec 100644
--- a/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
+++ b/arch/arm/dts/imx6qdl-hummingboard2-emmc-som-v15-u-boot.dtsi
@@ -15,6 +15,22 @@
 	};
 };
 
+&soc {
+	u-boot,dm-pre-reloc;
+};
+
+&aips1 {
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_microsom_uart1 {
+	u-boot,dm-pre-reloc;
+};
+
+&uart1 {
+	u-boot,dm-pre-reloc;
+};
+
 &gpio2 {
 	u-boot,dm-pre-reloc;
 };
diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
index debf4f6a3b06..8e80ca6e17e0 100644
--- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
@@ -844,6 +844,9 @@ void board_init_f(ulong dummy)
 	/* setup GP timer */
 	timer_init();
 
+	/* Enable device tree and early DM support*/
+	spl_early_init();
+
 	/* UART clocks enabled and gd valid - init serial console */
 	preloader_console_init();
 
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 9de5e77c75ad..4fa51a483bfb 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -46,7 +46,6 @@ CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="imx6dl-hummingboard2-emmc-som-v15 imx6q-hummingboard2-emmc-som-v15"
 CONFIG_MULTI_DTB_FIT=y
-CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -68,6 +67,7 @@ CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_DM_THERMAL=y
 CONFIG_IMX_THERMAL=y
-- 
2.35.1



More information about the U-Boot mailing list