[T20] Enable SDIO & Wyze V2 hacks (#735)

Co-authored-by: Dmitry Ermakov <ermakov.dmitry8@gmail.com>
pull/737/head
Dmitry Ermakov 2023-04-21 16:27:51 +03:00 committed by GitHub
parent 3e30f92559
commit f3f310a649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 88 additions and 1 deletions

View File

@ -1601,7 +1601,11 @@ CONFIG_JZMMC_V12_MMC0=y
CONFIG_JZMMC_V12_MMC0_PB_4BIT=y
CONFIG_MMC0_MAX_FREQ=48000000
# CONFIG_MMC0_PIO_MODE is not set
# CONFIG_JZMMC_V12_MMC1 is not set
CONFIG_JZMMC_V12_MMC1=y
# CONFIG_JZMMC_V12_MMC1_PD_4BIT is not set
# CONFIG_JZMMC_V12_MMC1_PB_4BIT is not set
CONFIG_JZMMC_V12_MMC1_PC_4BIT=y
CONFIG_MMC1_MAX_FREQ=24000000
# CONFIG_JZMMC_V12_MMC2 is not set
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_VUB300 is not set

View File

@ -24,6 +24,76 @@
jz = &jz_gpio_chips[g->port];
if (GPIO_AS_FUNC(g->func)) {
if(jz->dev_map[0] & g->pins) {
--- a/arch/mips/xburst/soc-t10/common/platform.c
+++ b/arch/mips/xburst/soc-t10/common/platform.c
@@ -960,3 +960,13 @@
return 1;
}
__setup("ispmem=", ispmem_parse);
+
+int disable_gmac = 0;
+EXPORT_SYMBOL(disable_gmac);
+
+static int __init extras_parse(char *str)
+{
+ disable_gmac = 1;
+ return 0;
+}
+__setup("nogmac", extras_parse);
--- a/arch/mips/xburst/soc-t20/common/platform.c
+++ b/arch/mips/xburst/soc-t20/common/platform.c
@@ -927,3 +927,13 @@
return 1;
}
__setup("ispmem=", ispmem_parse);
+
+int disable_gmac = 0;
+EXPORT_SYMBOL(disable_gmac);
+
+static int __init extras_parse(char *str)
+{
+ disable_gmac = 1;
+ return 0;
+}
+__setup("nogmac", extras_parse);
--- a/arch/mips/xburst/soc-t21/common/platform.c
+++ b/arch/mips/xburst/soc-t21/common/platform.c
@@ -935,6 +935,16 @@
*size = ispmem_size;
}
+int disable_gmac = 0;
+EXPORT_SYMBOL(disable_gmac);
+
+static int __init extras_parse(char *str)
+{
+ disable_gmac = 1;
+ return 0;
+}
+__setup("nogmac", extras_parse);
+
#ifndef CONFIG_PROC_FS
#error NOT config procfs
#endif
--- a/arch/mips/xburst/soc-t30/common/platform.c
+++ b/arch/mips/xburst/soc-t30/common/platform.c
@@ -936,6 +936,16 @@
*size = ispmem_size;
}
+int disable_gmac = 0;
+EXPORT_SYMBOL(disable_gmac);
+
+static int __init extras_parse(char *str)
+{
+ disable_gmac = 1;
+ return 0;
+}
+__setup("nogmac", extras_parse);
+
#ifndef CONFIG_PROC_FS
#error NOT config procfs
#endif
--- a/arch/mips/xburst/soc-t31/common/platform.c
+++ b/arch/mips/xburst/soc-t31/common/platform.c
@@ -1032,6 +1032,16 @@

View File

@ -24,3 +24,16 @@
#define MSC1_PORTC \
{ .name = "msc1-pC", .port = GPIO_PORT_C, .func = GPIO_FUNC_0, .pins = (0x3f<<2), }
#define I2S_PORTC \
--- a/arch/mips/xburst/soc-t20/include/mach/platform.h
+++ b/arch/mips/xburst/soc-t20/include/mach/platform.h
@@ -21,8 +21,9 @@
#define MSC0_PORTB_4BIT \
{ .name = "msc0-pb-4bit", .port = GPIO_PORT_B, .func = GPIO_FUNC_0, .pins = (0x3<<4|0xf<<0), }
#define MSC1_PORTC \
- { .name = "msc1-pC", .port = GPIO_PORT_C, .func = GPIO_FUNC_0, .pins = (0x3f<<2), }
-
+ { .name = "msc1-pC", .port = GPIO_PORT_C, .func = GPIO_FUNC_0, .pins = (0x3f<<2), }, \
+ { .name = "wyze-mmc-enable", .port = GPIO_PORT_B, .func = GPIO_OUTPUT0, .pins = 0x620<<10, }, \
+ { .name = "wyze-mmc-detect", .port = GPIO_PORT_B, .func = GPIO_OUTPUT1, .pins = 0x20<<10, }
/*******************************************************************************************************************/
/*****************************************************************************************************************/