]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
engicam: imx6: migrate to DM_SERIAL
authorMichael Trimarchi <michael@amarulasolutions.com>
Fri, 9 Dec 2022 09:35:49 +0000 (15:05 +0530)
committerStefano Babic <sbabic@denx.de>
Tue, 31 Jan 2023 18:44:23 +0000 (19:44 +0100)
Add the needed DT overrides and configs to enable UART in SPL.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Tested-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
arch/arm/dts/imx6qdl-icore-u-boot.dtsi
arch/arm/dts/imx6ul-isiot-u-boot.dtsi
board/engicam/common/spl.c
configs/imx6dl_icore_nand_defconfig
configs/imx6q_icore_nand_defconfig
configs/imx6qdl_icore_mipi_defconfig
configs/imx6qdl_icore_mmc_defconfig
configs/imx6qdl_icore_nand_defconfig
configs/imx6qdl_icore_rqs_defconfig

index f95d49d00d665899ded69bfd5dfc219da1c832dc..12e46e38f6a57d666b0909d94ca12a415f49ab41 100644 (file)
@@ -5,6 +5,22 @@
 
 #include "imx6qdl-u-boot.dtsi"
 
+&soc {
+       u-boot,dm-pre-reloc;
+};
+
+&aips1 {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl_uart4 {
+       u-boot,dm-pre-reloc;
+};
+
+&uart4 {
+       u-boot,dm-pre-reloc;
+};
+
 &usdhc1 {
        u-boot,dm-spl;
 };
index aa8e9804bfe3d1660bb3ccae6c432c13fa946212..7213e719892f346dae7d2b19aad3f0372e562326 100644 (file)
@@ -5,6 +5,22 @@
 
 #include "imx6ul-u-boot.dtsi"
 
+&soc {
+       u-boot,dm-pre-reloc;
+};
+
+&aips1 {
+       u-boot,dm-pre-reloc;
+};
+
+&pinctrl_uart1 {
+       u-boot,dm-pre-reloc;
+};
+
+&uart1 {
+       u-boot,dm-pre-reloc;
+};
+
 &usdhc1 {
        u-boot,dm-spl;
 };
index 6a0612481a8adebd7e21af19f0db748cd232ed82..f1ccdc334363b45e6d0f7431bb98a311b7a4f584 100644 (file)
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/video.h>
 
-#define UART_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |             \
-        PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |               \
-        PAD_CTL_DSE_40ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
-
-static iomux_v3_cfg_t const uart_pads[] = {
-#ifdef CONFIG_MX6QDL
-        IOMUX_PADS(PAD_KEY_COL0__UART4_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
-        IOMUX_PADS(PAD_KEY_ROW0__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)),
-#elif CONFIG_MX6UL
-       IOMUX_PADS(PAD_UART1_TX_DATA__UART1_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL)),
-       IOMUX_PADS(PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL)),
-#endif
-};
-
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
@@ -421,12 +407,12 @@ void board_init_f(ulong dummy)
        if (!(is_mx6ul()))
                gpr_init();
 
-       /* iomux */
-       SETUP_IOMUX_PADS(uart_pads);
-
        /* 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();
 
index 759bbf9b34e5e9fe08244896a04e2aebeb8e52d3..f4adda5b6d41c733ce647b7de11546edfaab334b 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_VIDEO=y
index c7d31d502ba2a6e5a3da7c4af44dbc32743eb01f..3b579bac460389f867aced54e54e2141659bddb0 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_VIDEO=y
index 90eb153c45fe33f193b841de48519eae835ca64f..8dd5e895112e5ab4d881730a5b51dba76343d2ac 100644 (file)
@@ -74,5 +74,6 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
index f5a7e969786314e4e10296b544abc015bba31b63..05925d8b933e733c645d242aaf93898027f2ef97 100644 (file)
@@ -90,6 +90,7 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_VIDEO=y
index c7d31d502ba2a6e5a3da7c4af44dbc32743eb01f..3b579bac460389f867aced54e54e2141659bddb0 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_VIDEO=y
index ee2c597bcb2116bc7f8e9e551ec286bece353cf8..3bab6739d09f9d9eee1daa2a7c09f7da67dedea2 100644 (file)
@@ -72,4 +72,5 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y