aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-17 11:24:43 -0500
committerTom Rini <trini@konsulko.com>2022-01-17 11:24:43 -0500
commit4e81f3be340072ad2c0aac093677333702f14f22 (patch)
tree447e16a695d5e55d52cf4687495a35fda48dacd6 /board
parent6d2ebcd7be3e7f9cc81011ddb97540c81a301701 (diff)
parent609983e981a0a7f053ee6f9f6cd2772226a33000 (diff)
downloadu-boot-4e81f3be340072ad2c0aac093677333702f14f22.zip
u-boot-4e81f3be340072ad2c0aac093677333702f14f22.tar.gz
u-boot-4e81f3be340072ad2c0aac093677333702f14f22.tar.bz2
Merge branch '2022-01-15-TI-platform-updates'WIP/17Jan2022
- Let am335x_evm use the CPSW or PRUSS ethernet. - Implement timer_get_boot_us in the omap timer driver - gpmc bitflip, QSPI clock calculation on am437x, da8xx_gpio bugfixes - Assorted K3 updates
Diffstat (limited to 'board')
-rw-r--r--board/ti/am335x/board.c18
-rw-r--r--board/ti/am64x/evm.c3
2 files changed, 21 insertions, 0 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index e8555de..9b70670 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <env.h>
#include <errno.h>
+#include <hang.h>
#include <image.h>
#include <init.h>
#include <malloc.h>
@@ -38,6 +39,7 @@
#include <miiphy.h>
#include <cpsw.h>
#include <linux/bitops.h>
+#include <linux/compiler.h>
#include <linux/delay.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
@@ -691,6 +693,8 @@ done:
}
#endif
+static bool __maybe_unused prueth_is_mii = true;
+
/*
* Basic board specific setup. Pinmux has been handled already.
*/
@@ -710,6 +714,8 @@ int board_init(void)
if (board_is_icev2()) {
int rv;
u32 reg;
+ bool eth0_is_mii = true;
+ bool eth1_is_mii = true;
REQUEST_AND_SET_GPIO(GPIO_PR1_MII_CTRL);
/* Make J19 status available on GPIO1_26 */
@@ -740,6 +746,7 @@ int board_init(void)
writel(reg, GPIO0_IRQSTATUS1); /* clear irq */
/* RMII mode */
printf("ETH0, CPSW\n");
+ eth0_is_mii = false;
} else {
/* MII mode */
printf("ETH0, PRU\n");
@@ -752,12 +759,21 @@ int board_init(void)
/* RMII mode */
printf("ETH1, CPSW\n");
gpio_set_value(GPIO_MUX_MII_CTRL, 1);
+ eth1_is_mii = false;
} else {
/* MII mode */
printf("ETH1, PRU\n");
cdce913_data.pdiv2 = 4; /* 25MHz PHY clk */
}
+ if (eth0_is_mii != eth1_is_mii) {
+ printf("Unsupported Ethernet port configuration\n");
+ printf("Both ports must be set as RMII or MII\n");
+ hang();
+ }
+
+ prueth_is_mii = eth0_is_mii;
+
/* disable rising edge IRQs */
reg = readl(GPIO0_RISINGDETECT) & ~BIT(11);
writel(reg, GPIO0_RISINGDETECT);
@@ -852,6 +868,8 @@ int board_late_init(void)
if (is_valid_ethaddr(mac_addr))
eth_env_set_enetaddr("eth1addr", mac_addr);
}
+
+ env_set("ice_mii", prueth_is_mii ? "mii" : "rmii");
#endif
if (!env_get("serial#")) {
diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
index 1a9f69c..8373c76 100644
--- a/board/ti/am64x/evm.c
+++ b/board/ti/am64x/evm.c
@@ -196,5 +196,8 @@ void spl_board_init(void)
val = readl(CTRLMMR_USB0_PHY_CTRL);
val &= ~(CORE_VOLTAGE);
writel(val, CTRLMMR_USB0_PHY_CTRL);
+
+ /* Init DRAM size for R5/A53 SPL */
+ dram_init_banksize();
}
#endif