summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-06-18 17:07:49 +0300
committerTom Rini <trini@konsulko.com>2020-06-18 17:07:49 +0300
commit83fdb4388253240138e2ce364abe6b070b756d87 (patch)
tree93767bc8b7fcbbb7f5668f7cb241a5eada644a9d /board
parent7a81989b7b04bd87d1e684f2bafdc92a9c16fecc (diff)
parentc0a8d6e1e67cc7feee5c9e6c7e8c13bb953734f1 (diff)
downloadu-boot-83fdb4388253240138e2ce364abe6b070b756d87.tar.xz
Merge tag 'ti-v2020.10-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti into next
- DM conversion for OMAP4, OMAP5 platforms. - Other minor fixes for Nokia RX51, am33, am57, am654.
Diffstat (limited to 'board')
-rw-r--r--board/davinci/da8xxevm/omapl138_lcdk.c12
-rw-r--r--board/nokia/rx51/rx51.c2
-rw-r--r--board/ti/am335x/board.c1
-rw-r--r--board/ti/am57xx/board.c9
-rw-r--r--board/ti/am65x/evm.c6
-rw-r--r--board/ti/common/board_detect.c14
-rw-r--r--board/ti/omap5_uevm/evm.c78
-rw-r--r--board/ti/panda/panda.c50
-rw-r--r--board/ti/sdp4430/sdp.c12
9 files changed, 63 insertions, 121 deletions
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index adb56c6c87..84603cb117 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -368,8 +368,20 @@ U_BOOT_DEVICE(omapl138_uart) = {
.platdata = &serial_pdata,
};
+static const struct davinci_mmc_plat mmc_platdata = {
+ .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,
+ .cfg = {
+ .f_min = 200000,
+ .f_max = 25000000,
+ .voltages = MMC_VDD_32_33 | MMC_VDD_33_34,
+ .host_caps = MMC_MODE_4BIT,
+ .b_max = DAVINCI_MAX_BLOCKS,
+ .name = "da830-mmc",
+ },
+};
U_BOOT_DEVICE(omapl138_mmc) = {
.name = "davinci_mmc",
+ .platdata = &mmc_platdata,
};
void spl_board_init(void)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 60a2e3619c..93d1b2febc 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -146,7 +146,7 @@ static void reuse_omap_atags(struct tag_omap *t)
}
break;
case OMAP_TAG_UART:
- if (!t->u.uart.enabled_uarts)
+ if (t->u.uart.enabled_uarts)
serial_was_console_enabled = 1;
break;
case OMAP_TAG_SERIAL_CONSOLE:
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 4199bee2e6..123ccaac44 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -912,7 +912,6 @@ struct cpsw_platform_data am335_eth_data = {
.slaves = 2,
.slave_data = slave_data,
.ale_entries = 1024,
- .bd_ram_ofs = 0x2000,
.mac_control = 0x20,
.active_slave = 0,
.mdio_base = 0x4a101000,
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 8720eb87a5..511858a5e9 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -61,6 +61,10 @@ static int board_bootmode_has_emmc(void);
#define board_is_am571x_idk() board_ti_is("AM571IDK")
#define board_is_bbai() board_ti_is("BBONE-AI")
+#define board_is_ti_idk() board_is_am574x_idk() || \
+ board_is_am572x_idk() || \
+ board_is_am571x_idk()
+
#ifdef CONFIG_DRIVER_TI_CPSW
#include <cpsw.h>
#endif
@@ -68,8 +72,7 @@ static int board_bootmode_has_emmc(void);
DECLARE_GLOBAL_DATA_PTR;
#define GPIO_ETH_LCD GPIO_TO_PIN(2, 22)
-/* GPIO 7_11 */
-#define GPIO_DDR_VTT_EN 203
+#define GPIO_DDR_VTT_EN GPIO_TO_PIN(7, 11)
/* Touch screen controller to identify the LCD */
#define OSD_TS_FT_BUS_ADDRESS 0
@@ -667,7 +670,7 @@ void am57x_idk_lcd_detect(void)
struct udevice *dev;
/* Only valid for IDKs */
- if (board_is_x15() || board_is_am572x_evm() || board_is_bbai())
+ if (!board_is_ti_idk())
return;
/* Only AM571x IDK has gpio control detect.. so check that */
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index a22900dcf9..20b75ba133 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -108,10 +108,10 @@ int ft_board_setup(void *blob, bd_t *bd)
}
#if defined(CONFIG_TI_SECURE_DEVICE)
- /* Make HW RNG reserved for secure world use */
- ret = fdt_disable_node(blob, "/interconnect@100000/trng@4e10000");
+ /* Make Crypto HW reserved for secure world use */
+ ret = fdt_disable_node(blob, "/interconnect@100000/crypto@4E00000");
if (ret)
- printf("%s: disabling TRGN failed %d\n", __func__, ret);
+ printf("%s: disabling SA2UL failed %d\n", __func__, ret);
#endif
return 0;
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index 429668404a..e09ecda4d7 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -669,17 +669,17 @@ void __maybe_unused set_board_info_env(char *name)
if (name)
env_set("board_name", name);
- else if (ep->name)
+ else if (strlen(ep->name) != 0)
env_set("board_name", ep->name);
else
env_set("board_name", unknown);
- if (ep->version)
+ if (strlen(ep->version) != 0)
env_set("board_rev", ep->version);
else
env_set("board_rev", unknown);
- if (ep->serial)
+ if (strlen(ep->serial) != 0)
env_set("board_serial", ep->serial);
else
env_set("board_serial", unknown);
@@ -692,22 +692,22 @@ void __maybe_unused set_board_info_env_am6(char *name)
if (name)
env_set("board_name", name);
- else if (ep->name)
+ else if (strlen(ep->name) != 0)
env_set("board_name", ep->name);
else
env_set("board_name", unknown);
- if (ep->version)
+ if (strlen(ep->version) != 0)
env_set("board_rev", ep->version);
else
env_set("board_rev", unknown);
- if (ep->software_revision)
+ if (strlen(ep->software_revision) != 0)
env_set("board_software_revision", ep->software_revision);
else
env_set("board_software_revision", unknown);
- if (ep->serial)
+ if (strlen(ep->serial) != 0)
env_set("board_serial", ep->serial);
else
env_set("board_serial", unknown);
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index e35f319b46..319bb6aa64 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -12,6 +12,7 @@
#include <asm/arch/omap.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
+#include <serial.h>
#include <tca642x.h>
#include <usb.h>
#include <linux/delay.h>
@@ -149,39 +150,21 @@ int board_init(void)
return 0;
}
-int board_eth_init(bd_t *bis)
+#if defined(CONFIG_SPL_OS_BOOT)
+int spl_start_uboot(void)
{
+ /* break into full u-boot on 'c' */
+ if (serial_tstc() && serial_getc() == 'c')
+ return 1;
+
return 0;
}
+#endif /* CONFIG_SPL_OS_BOOT */
-#if defined(CONFIG_USB_EHCI_HCD) || defined(CONFIG_USB_XHCI_OMAP)
-static void enable_host_clocks(void)
+int board_eth_init(bd_t *bis)
{
- int auxclk;
- int hs_clk_ctrl_val = (OPTFCLKEN_HSIC60M_P3_CLK |
- OPTFCLKEN_HSIC480M_P3_CLK |
- OPTFCLKEN_HSIC60M_P2_CLK |
- OPTFCLKEN_HSIC480M_P2_CLK |
- OPTFCLKEN_UTMI_P3_CLK | OPTFCLKEN_UTMI_P2_CLK);
-
- /* Enable port 2 and 3 clocks*/
- setbits_le32((*prcm)->cm_l3init_hsusbhost_clkctrl, hs_clk_ctrl_val);
-
- /* Enable port 2 and 3 usb host ports tll clocks*/
- setbits_le32((*prcm)->cm_l3init_hsusbtll_clkctrl,
- (OPTFCLKEN_USB_CH1_CLK_ENABLE | OPTFCLKEN_USB_CH2_CLK_ENABLE));
-#ifdef CONFIG_USB_XHCI_OMAP
- /* Enable the USB OTG Super speed clocks */
- setbits_le32((*prcm)->cm_l3init_usb_otg_ss_clkctrl,
- (OPTFCLKEN_REFCLK960M | OTG_SS_CLKCTRL_MODULEMODE_HW));
-#endif
-
- auxclk = readl((*prcm)->scrm_auxclk1);
- /* Request auxilary clock */
- auxclk |= AUXCLK_ENABLE_MASK;
- writel(auxclk, (*prcm)->scrm_auxclk1);
+ return 0;
}
-#endif
/**
* @brief misc_init_r - Configure EVM board specific configurations
@@ -223,45 +206,6 @@ int board_mmc_init(bd_t *bis)
}
#endif
-#ifdef CONFIG_USB_EHCI_HCD
-static struct omap_usbhs_board_data usbhs_bdata = {
- .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[1] = OMAP_EHCI_PORT_MODE_HSIC,
- .port_mode[2] = OMAP_EHCI_PORT_MODE_HSIC,
-};
-
-int ehci_hcd_init(int index, enum usb_init_type init,
- struct ehci_hccr **hccr, struct ehci_hcor **hcor)
-{
- int ret;
-
- enable_host_clocks();
-
- ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
- if (ret < 0) {
- puts("Failed to initialize ehci\n");
- return ret;
- }
-
- return 0;
-}
-
-int ehci_hcd_stop(void)
-{
- return omap_ehci_hcd_stop();
-}
-
-void usb_hub_reset_devices(struct usb_hub_device *hub, int port)
-{
- /* The LAN9730 needs to be reset after the port power has been set. */
- if (port == 3) {
- gpio_direction_output(CONFIG_OMAP_EHCI_PHY3_RESET_GPIO, 0);
- udelay(10);
- gpio_direction_output(CONFIG_OMAP_EHCI_PHY3_RESET_GPIO, 1);
- }
-}
-#endif
-
#ifdef CONFIG_USB_XHCI_OMAP
/**
* @brief board_usb_init - Configure EVM board specific configurations
@@ -276,8 +220,6 @@ int board_usb_init(int index, enum usb_init_type init)
ret = palmas_enable_ss_ldo();
#endif
- enable_host_clocks();
-
return 0;
}
#endif
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index 9ebecfdbf5..232d999a29 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -8,6 +8,7 @@
#include <init.h>
#include <log.h>
#include <net.h>
+#include <serial.h>
#include <asm/mach-types.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
@@ -19,12 +20,6 @@
#include "panda_mux_data.h"
-#ifdef CONFIG_USB_EHCI_HCD
-#include <usb.h>
-#include <asm/arch/ehci.h>
-#include <asm/ehci-omap.h>
-#endif
-
#define PANDA_ULPI_PHY_TYPE_GPIO 182
#define PANDA_BOARD_ID_1_GPIO 101
#define PANDA_ES_BOARD_ID_1_GPIO 48
@@ -55,6 +50,17 @@ int board_init(void)
return 0;
}
+#if defined(CONFIG_SPL_OS_BOOT)
+int spl_start_uboot(void)
+{
+ /* break into full u-boot on 'c' */
+ if (serial_tstc() && serial_getc() == 'c')
+ return 1;
+
+ return 0;
+}
+#endif /* CONFIG_SPL_OS_BOOT */
+
int board_eth_init(bd_t *bis)
{
return 0;
@@ -305,38 +311,6 @@ void board_mmc_power_init(void)
#endif
#endif
-#ifdef CONFIG_USB_EHCI_HCD
-
-static struct omap_usbhs_board_data usbhs_bdata = {
- .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
- .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
- .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-};
-
-int ehci_hcd_init(int index, enum usb_init_type init,
- struct ehci_hccr **hccr, struct ehci_hcor **hcor)
-{
- int ret;
- unsigned int utmi_clk;
-
- /* Now we can enable our port clocks */
- utmi_clk = readl((void *)CM_L3INIT_HSUSBHOST_CLKCTRL);
- utmi_clk |= HSUSBHOST_CLKCTRL_CLKSEL_UTMI_P1_MASK;
- setbits_le32((void *)CM_L3INIT_HSUSBHOST_CLKCTRL, utmi_clk);
-
- ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor);
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
-int ehci_hcd_stop(int index)
-{
- return omap_ehci_hcd_stop();
-}
-#endif
-
/*
* get_board_rev() - get board revision
*/
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index a5b3504045..5b294ea79b 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <net.h>
#include <twl6030.h>
+#include <serial.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
@@ -91,6 +92,17 @@ void board_mmc_power_init(void)
#endif
#endif
+#if defined(CONFIG_SPL_OS_BOOT)
+int spl_start_uboot(void)
+{
+ /* break into full u-boot on 'c' */
+ if (serial_tstc() && serial_getc() == 'c')
+ return 1;
+
+ return 0;
+}
+#endif /* CONFIG_SPL_OS_BOOT */
+
/*
* get_board_rev() - get board revision
*/