imx: mx7dsabresd: enable DM_SERIAL
Subsystems (2)
PATCH v2 1/1 imx: mx7dsabresd: enable DM_SERIAL
From: Peng Fan <[email protected]>
Enable CONFIG_DM_SERIAL, and dm tree could show:
serial 1 [ ] serial_mxc | |-- serial@30a80000
---
V2:
Per Fabio's comments, drop board uart pinmux setting. Mark u-boot,dm-pre-reloc for dm serial
arch/arm/dts/imx7d-sdb-u-boot.dtsi | 36 +++++++++++++++++++++++ board/freescale/mx7dsabresd/mx7dsabresd.c | 15 ---------- configs/mx7dsabresd_defconfig | 1 + configs/mx7dsabresd_qspi_defconfig | 1 + 4 files changed, 38 insertions(+), 15 deletions(-)
arch/arm/dts/imx7d-sdb-u-boot.dtsi +36 -0
@@ -1,3 +1,39 @@ +&{/soc} { + u-boot,dm-pre-reloc; +}; + +&aips1 { + u-boot,dm-pre-reloc; +}; + +&aips3 { + u-boot,dm-pre-reloc; +}; + +&{/soc/bus@30800000/spba-bus@30800000} { + u-boot,dm-pre-reloc; +}; + +&iomuxc { + u-boot,dm-pre-reloc; +}; + +&iomuxc_lpsr { + u-boot,dm-pre-reloc; +}; + +&{/soc/bus@30000000/iomuxc@30330000/imx7d-sdb} { + u-boot,dm-pre-reloc; +}; + +&pinctrl_uart1 { + u-boot,dm-pre-reloc; +}; + +&uart1 { + u-boot,dm-pre-reloc; +}; + &fec2 { status = "disable"; };
board/freescale/mx7dsabresd/mx7dsabresd.c +0 -15
@@ -28,9 +28,6 @@DECLARE_GLOBAL_DATA_PTR ; -#define UART_PAD_CTRL (PAD_CTL_DSE_3P3V_49OHM | \ - PAD_CTL_PUS_PU100KOHM | PAD_CTL_HYS) -#define LCD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_PU100KOHM | \ PAD_CTL_DSE_3P3V_49OHM)
@@ -71,11 +68,6 @@ static iomux_v3_cfg_t const wdog_pads[] = { MX7D_PAD_GPIO1_IO00__WDOG1_WDOG_B | MUX_PAD_CTRL(NO_PAD_CTRL), }; -static iomux_v3_cfg_t const uart1_pads[] = { -MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX |MUX_PAD_CTRL (UART_PAD_CTRL ), -MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX |MUX_PAD_CTRL (UART_PAD_CTRL ), -}; -#ifdef CONFIG_NAND_MXS static iomux_v3_cfg_t const gpmi_pads[] = { MX7D_PAD_SD3_DATA0__NAND_DATA00 | MUX_PAD_CTRL(NAND_PAD_CTRL),
@@ -167,11 +159,6 @@ static int setup_lcd(void) }#endif -static void setup_iomux_uart (void ) -{ -imx_iomux_v3_setup_multiple_pads (uart1_pads,ARRAY_SIZE (uart1_pads)); -} -int board_mmc_get_env_dev (int devno) {if (devno ==2 )
@@ -228,8 +215,6 @@ int board_qspi_init(void)int board_early_init_f (void ) { -setup_iomux_uart (); -return 0 ; }
configs/mx7dsabresd_defconfig +1 -0
@@ -67,6 +67,7 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_PFUZE100=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/mx7dsabresd_qspi_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_PFUZE100=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
Signature · 1 line
2.35.1
Fabio Estevam
reviewerarch/arm/dts/imx7d-sdb-u-boot.dtsi line 13
Quoted 5 lines · Peng Fan (OSS)
+&aips3 {
arch/arm/dts/imx7d-sdb-u-boot.dtsi +4
-0+ u-boot,dm-pre-reloc; +}; + +&{/soc/bus@30800000/spba-bus@30800000} {
&aips3 would be easier to read.
arch/arm/dts/imx7d-sdb-u-boot.dtsi line 25
Quoted 5 lines
+&iomuxc_lpsr {
arch/arm/dts/imx7d-sdb-u-boot.dtsi +4
-0+ u-boot,dm-pre-reloc; +}; + +&{/soc/bus@30000000/iomuxc@30330000/imx7d-sdb} {
&iomuxc would be easier to read.
board/freescale/mx7dsabresd/mx7dsabresd.c int board_qspi_init(void) · line 218
Quoted 5 lines
int
board_early_init_f(void)
{board/freescale/mx7dsabresd/mx7dsabresd.c +0
-2-setup_iomux_uart (); -return 0 ;
After this change board_early_init_f() is unnecessary. Please remove it.
Quoted 9 lines · Fabio Estevam
arch/arm/dts/imx7d-sdb-u-boot.dtsi line 13
Quoted 5 lines · Peng Fan (OSS)
+&aips3 {
arch/arm/dts/imx7d-sdb-u-boot.dtsi +4
-0+ u-boot,dm-pre-reloc; +}; + +&{/soc/bus@30800000/spba-bus@30800000} {&aips3 would be easier to read.
There is no alias to spba-bus@30800000.
Quoted 8 lines
arch/arm/dts/imx7d-sdb-u-boot.dtsi line 25
Quoted 6 lines
+&iomuxc_lpsr {
arch/arm/dts/imx7d-sdb-u-boot.dtsi +4
-0+ u-boot,dm-pre-reloc; +}; + +&{/soc/bus@30000000/iomuxc@30330000/imx7d-sdb} {&iomuxc would be easier to read.
There is no alias to imx7d-sdb
Quoted 8 lines
board/freescale/mx7dsabresd/mx7dsabresd.c int board_qspi_init(void) · line 218
Quoted 6 lines
int board_early_init_f(void) {board/freescale/mx7dsabresd/mx7dsabresd.c +0
-2-setup_iomux_uart (); -return 0 ;After this change
board_early_init_f()is unnecessary. Please remove it.
Sure.
Thanks,
Peng.