#define SD_DETECT_NAME GPIO2A2_SDMMC0DETECTN_NAME
#define SD_DETECT_GPIO_MODE GPIO2L_GPIO2A2
#define SD_DETECT_DET_MODE GPIO2L_SDMMC0_DETECT_N
-#elif defined(CONFIG_ARCH_RK30)
+#elif defined(CONFIG_ARCH_RK30) || defined(CONFIG_ARCH_RK31)
#define SD_DETECT_PIN RK30_PIN3_PB6
#define SD_DETECT_NAME GPIO3B6_SDMMC0DETECTN_NAME
#define SD_DETECT_GPIO_MODE GPIO3B_GPIO3B6
-#define SD_DETECT_DET_MODE GPIO3B_SDMMC_DETECT_N
+#define SD_DETECT_DET_MODE GPIO3B_SDMMC0_DETECT_N
#elif defined(CONFIG_ARCH_RK2928)
#define SD_DETECT_PIN RK2928_PIN1_PC7
#define SD_DETECT_NAME GPIO1C1_MMC0_DETN_NAME