mirror of
https://github.com/edk2-porting/edk2-rk3588.git
synced 2026-01-08 02:53:39 +08:00
Platform/IndiedroidNova: Do not override eMMC and FSPI pin muxing
The eMMC slot is shared with FSPI, making it possible to connect either an eMMC or SPI NOR module. Pin muxing is already configured by earlier boot stages depending on what's detected in the slot, thus no need to perform the detection ourselves.
This commit is contained in:
@@ -55,9 +55,7 @@ SdhciEmmcDxeIoMux (
|
||||
)
|
||||
{
|
||||
/* sdmmc0 iomux */
|
||||
BUS_IOC->GPIO2A_IOMUX_SEL_L = (0xFFFFUL << 16) | (0x1111); //EMMC_CMD,EMMC_CLKOUT,EMMC_DATASTROBE,EMMC_RSTN
|
||||
BUS_IOC->GPIO2D_IOMUX_SEL_L = (0xFFFFUL << 16) | (0x1111); //EMMC_D0,EMMC_D1,EMMC_D2,EMMC_D3
|
||||
BUS_IOC->GPIO2D_IOMUX_SEL_H = (0xFFFFUL << 16) | (0x1111); //EMMC_D4,EMMC_D5,EMMC_D6,EMMC_D7
|
||||
/* Do not override, set by earlier boot stages. */
|
||||
}
|
||||
|
||||
#define NS_CRU_BASE 0xFD7C0000
|
||||
@@ -111,25 +109,7 @@ NorFspiIomux (
|
||||
)
|
||||
{
|
||||
/* io mux */
|
||||
MmioWrite32(NS_CRU_BASE + CRU_CLKSEL_CON78,
|
||||
(((0x3 << 12) | (0x3f << 6)) << 16) | (0x0 << 12) | (0x3f << 6));
|
||||
#define FSPI_M1
|
||||
#if defined(FSPI_M0)
|
||||
/*FSPI M0*/
|
||||
BUS_IOC->GPIO2A_IOMUX_SEL_L = ((0xF << 0) << 16) | (2 << 0); //FSPI_CLK_M0
|
||||
BUS_IOC->GPIO2D_IOMUX_SEL_L = (0xFFFFUL << 16) | (0x2222); //FSPI_D0_M0,FSPI_D1_M0,FSPI_D2_M0,FSPI_D3_M0
|
||||
BUS_IOC->GPIO2D_IOMUX_SEL_H = ((0xF << 8) << 16) | (0x2 << 8); //FSPI_CS0N_M0
|
||||
#elif defined(FSPI_M1)
|
||||
/*FSPI M1*/
|
||||
BUS_IOC->GPIO2A_IOMUX_SEL_H = (0xFF00UL << 16) | (0x3300); //FSPI_D0_M1,FSPI_D1_M1
|
||||
BUS_IOC->GPIO2B_IOMUX_SEL_L = (0xF0FFUL << 16) | (0x3033); //FSPI_D2_M1,FSPI_D3_M1,FSPI_CLK_M1
|
||||
BUS_IOC->GPIO2B_IOMUX_SEL_H = (0xF << 16) | (0x3); //FSPI_CS0N_M1
|
||||
#else
|
||||
/*FSPI M2*/
|
||||
BUS_IOC->GPIO3A_IOMUX_SEL_L = (0xFFFFUL << 16) | (0x5555); //[FSPI_D0_M2-FSPI_D3_M2]
|
||||
BUS_IOC->GPIO3A_IOMUX_SEL_H = (0xF0UL << 16) | (0x50); //FSPI_CLK_M2
|
||||
BUS_IOC->GPIO3C_IOMUX_SEL_H = (0xF << 16) | (0x2); //FSPI_CS0_M2
|
||||
#endif
|
||||
/* Do not override, set by earlier boot stages. */
|
||||
}
|
||||
|
||||
VOID
|
||||
|
||||
Reference in New Issue
Block a user