summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/starfive/devkits/spl.c11
-rw-r--r--board/starfive/devkits/starfive_devkits.c16
2 files changed, 27 insertions, 0 deletions
diff --git a/board/starfive/devkits/spl.c b/board/starfive/devkits/spl.c
index d20c74b3a5..0e31c14fd8 100644
--- a/board/starfive/devkits/spl.c
+++ b/board/starfive/devkits/spl.c
@@ -112,6 +112,17 @@ void board_init_f(ulong dummy)
clrsetbits_le32(SYS_IOMUX_BASE + 0x274, 0x3, BIT(0) & 0x3);
clrsetbits_le32(SYS_IOMUX_BASE + 0x278, 0x3, BIT(0) & 0x3);
clrsetbits_le32(SYS_IOMUX_BASE + 0x27c, 0x3, BIT(0) & 0x3);
+ /*jtag*/
+ SYS_IOMUX_DOEN(36, HIGH);
+ SYS_IOMUX_DIN(36, 4);
+ SYS_IOMUX_DOEN(61, HIGH);
+ SYS_IOMUX_DIN(61, 19);
+ SYS_IOMUX_DOEN(63, HIGH);
+ SYS_IOMUX_DIN(63, 20);
+ SYS_IOMUX_DOEN(60, HIGH);
+ SYS_IOMUX_DIN(60, 29);
+ SYS_IOMUX_DOEN(44, 8);
+ SYS_IOMUX_DOUT(44, 22);
SYS_IOMUX_DOEN(62, LOW);
SYS_IOMUX_DOUT(62, 19);
diff --git a/board/starfive/devkits/starfive_devkits.c b/board/starfive/devkits/starfive_devkits.c
index 8fd1cb4784..df8ad6982f 100644
--- a/board/starfive/devkits/starfive_devkits.c
+++ b/board/starfive/devkits/starfive_devkits.c
@@ -91,6 +91,21 @@ static void jh7110_i2c_init (int id)
}
}
+static void jh7110_jtag_init(void)
+{
+ /*jtag*/
+ SYS_IOMUX_DOEN(36, HIGH);
+ SYS_IOMUX_DIN(36, 4);
+ SYS_IOMUX_DOEN(61, HIGH);
+ SYS_IOMUX_DIN(61, 19);
+ SYS_IOMUX_DOEN(63, HIGH);
+ SYS_IOMUX_DIN(63, 20);
+ SYS_IOMUX_DOEN(60, HIGH);
+ SYS_IOMUX_DIN(60, 29);
+ SYS_IOMUX_DOEN(44, 8);
+ SYS_IOMUX_DOUT(44, 22);
+}
+
static void jh7110_gmac_sel_tx_to_rgmii(int id)
{
switch (id) {
@@ -320,6 +335,7 @@ int board_init(void)
{
enable_caches();
+ jh7110_jtag_init();
jh7110_timer_init();
jh7110_usb_init(true);
jh7110_gmac_init(0);