summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authoryanhong.wang <yanhong.wang@starfivetech.com>2022-05-19 09:02:54 +0300
committerYanhong Wang <yanhong.wang@linux.starfivetech.com>2022-10-18 11:24:36 +0300
commit9ca1a627b4363ea3a08853cf1bbb821291ea0710 (patch)
treeb0fb4854fdd31ef758bf78c4ef3e4e269b98415d /board
parent967e3296edfa01d8109213f5dd89b7bc9e6c1801 (diff)
downloadu-boot-9ca1a627b4363ea3a08853cf1bbb821291ea0710.tar.xz
board:starfive:evb: modify the GPIO configuration for sd module
Modify the GPIO configuration for sd&emmc module, switch the clk of sd&emmc to high frequency Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
Diffstat (limited to 'board')
-rw-r--r--board/starfive/evb/spl.c11
-rw-r--r--board/starfive/evb/starfive_evb.c13
2 files changed, 15 insertions, 9 deletions
diff --git a/board/starfive/evb/spl.c b/board/starfive/evb/spl.c
index 5b2b397508..50469b33c3 100644
--- a/board/starfive/evb/spl.c
+++ b/board/starfive/evb/spl.c
@@ -116,9 +116,20 @@ void board_init_f(ulong dummy)
CLK_QSPI_REF_SW_MASK,
(0 << CLK_QSPI_REF_SW_SHIFT) & CLK_QSPI_REF_SW_MASK);
+ clrsetbits_le32(SYS_CRG_BASE + CLK_SDIO_SOURCEMUX_OFFSET,
+ CLK_SDIO_SCLK_SW_MASK,
+ (0 << CLK_SDIO_SCLK_SW_SHIFT) & CLK_SDIO_SCLK_SW_MASK);
+
/*set GPIO to 1.8v*/
setbits_be32(SYS_SYSCON_BASE + 0xC, 0xf);
+ /* reset emmc */
+ SYS_IOMUX_DOEN(22, LOW);
+ SYS_IOMUX_DOUT(22, 19);
+ /* reset sdio */
+ SYS_IOMUX_DOEN(24, LOW);
+ SYS_IOMUX_DOUT(24, 66);
+
ret = spl_early_init();
if (ret)
panic("spl_early_init() failed: %d\n", ret);
diff --git a/board/starfive/evb/starfive_evb.c b/board/starfive/evb/starfive_evb.c
index ff527a8768..d59bad49ee 100644
--- a/board/starfive/evb/starfive_evb.c
+++ b/board/starfive/evb/starfive_evb.c
@@ -101,16 +101,11 @@ static void jh7110_usb_init(void)
static void jh7110_mmc_init(int id)
{
if (id == 0) {
- SYS_IOMUX_DOEN(62, LOW);
- SYS_IOMUX_DOUT(62, 19);
+ SYS_IOMUX_DOEN(22, LOW);
+ SYS_IOMUX_DOUT(22, 19);
} else {
- SYS_IOMUX_DOEN(10, LOW);
- SYS_IOMUX_DOUT(10, 55);
- SYS_IOMUX_COMPLEX(9, 44, 57, 19);
- SYS_IOMUX_COMPLEX(11, 45, 58, 20);
- SYS_IOMUX_COMPLEX(12, 46, 59, 21);
- SYS_IOMUX_COMPLEX(7, 47, 60, 22);
- SYS_IOMUX_COMPLEX(8, 48, 61, 23);
+ SYS_IOMUX_DOEN(24, LOW);
+ SYS_IOMUX_DOUT(24, 66);
}
}