mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 05:08:24 +00:00
tbs2910: Convert to DM_SERIAL
Conversion to DM_SERIAL is mandatory. Select DM_SERIAL and add a imx6q-tbs2910-u-boot.dtsi file that describes the nodes that require dm-pre-reloc, which allows the DM model to configure the UART pinctrl early. Remove the now unneeded board UART initialization. Signed-off-by: Fabio Estevam <festevam@denx.de> Tested-by: Soeren Moch <smoch@web.de>
This commit is contained in:
parent
473466a5c4
commit
8fbca1a8b9
4 changed files with 20 additions and 29 deletions
17
arch/arm/dts/imx6q-tbs2910-u-boot.dtsi
Normal file
17
arch/arm/dts/imx6q-tbs2910-u-boot.dtsi
Normal file
|
@ -0,0 +1,17 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
&aips1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
|
@ -139,7 +139,7 @@
|
|||
interrupts = <0 94 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
soc {
|
||||
soc: soc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "simple-bus";
|
||||
|
@ -283,7 +283,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
bus@2000000 { /* AIPS1 */
|
||||
aips1: bus@2000000 { /* AIPS1 */
|
||||
compatible = "fsl,aips-bus", "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
|
|
@ -22,32 +22,12 @@
|
|||
#include <asm/arch/sys_proto.h>
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define UART_PAD_CTRL (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 uart1_pads[] = {
|
||||
MX6_PAD_CSI0_DAT10__UART1_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
|
||||
MX6_PAD_CSI0_DAT11__UART1_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
|
||||
};
|
||||
|
||||
static iomux_v3_cfg_t const uart2_pads[] = {
|
||||
MX6_PAD_EIM_D26__UART2_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
|
||||
MX6_PAD_EIM_D27__UART2_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL),
|
||||
};
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = 2048ul * 1024 * 1024;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setup_iomux_uart(void)
|
||||
{
|
||||
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
|
||||
imx_iomux_v3_setup_multiple_pads(uart2_pads, ARRAY_SIZE(uart2_pads));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
/* set environment device to boot device when booting from SD */
|
||||
int board_mmc_get_env_dev(int devno)
|
||||
|
@ -150,12 +130,6 @@ static void setup_display(void)
|
|||
}
|
||||
#endif /* CONFIG_VIDEO_IPUV3 */
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
setup_iomux_uart();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_BMODE
|
||||
static const struct boot_mode board_boot_modes[] = {
|
||||
/* 4 bit bus width */
|
||||
|
|
|
@ -25,7 +25,6 @@ CONFIG_USE_PREBOOT=y
|
|||
CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
|
||||
CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb"
|
||||
CONFIG_PRE_CONSOLE_BUFFER=y
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_HUSH_PARSER=y
|
||||
CONFIG_SYS_PROMPT="Matrix U-Boot> "
|
||||
# CONFIG_CMD_BDI is not set
|
||||
|
@ -83,6 +82,7 @@ CONFIG_PINCTRL=y
|
|||
CONFIG_PINCTRL_IMX6=y
|
||||
CONFIG_DM_RTC=y
|
||||
CONFIG_RTC_DS1307=y
|
||||
CONFIG_DM_SERIAL=y
|
||||
CONFIG_MXC_UART=y
|
||||
CONFIG_DM_THERMAL=y
|
||||
CONFIG_IMX_THERMAL=y
|
||||
|
|
Loading…
Add table
Reference in a new issue