[T31] Hualai/Wyze MMC hacks (#643)

pull/644/head
Dmitry Ermakov 2023-02-19 01:22:42 +03:00 committed by GitHub
parent 98e3bca726
commit ddac3c9318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
--- a/arch/mips/xburst/soc-t31/common/gpio.c
+++ b/arch/mips/xburst/soc-t31/common/gpio.c
@@ -981,6 +981,10 @@
pr_info("Skipping MSC1_PB GPIO setup\n");
continue;
}
+ if ((!strcmp(g->name,"wyze-mmc-enable") || !strcmp(g->name,"wyze-mmc-detect")) && !disable_gmac){
+ pr_info("Skipping WYZE GPIO setup\n");
+ continue;
+ }
jz = &jz_gpio_chips[g->port];
if (GPIO_AS_FUNC(g->func)) {
--- a/arch/mips/xburst/soc-t31/include/mach/platform.h
+++ b/arch/mips/xburst/soc-t31/include/mach/platform.h
@@ -23,7 +23,9 @@
#define MSC0_PORTB_4BIT \
{ .name = "msc0-pb-4bit", .port = GPIO_PORT_B, .func = GPIO_OUTPUT0, .pins = (0x3f<<0), }
#define MSC1_PORTB \
- { .name = "msc1-pB", .port = GPIO_PORT_B, .func = GPIO_FUNC_1, .pins = (0x6f<<8), }
+ { .name = "msc1-pB", .port = GPIO_PORT_B, .func = GPIO_FUNC_1, .pins = (0x6f<<8), }, \
+ { .name = "wyze-mmc-enable", .port = GPIO_PORT_B, .func = GPIO_OUTPUT0, .pins = 0x8000, }, \
+ { .name = "wyze-mmc-detect", .port = GPIO_PORT_B, .func = GPIO_OUTPUT1, .pins = 0x40000000, }
#define MSC1_PORTC \
{ .name = "msc1-pC", .port = GPIO_PORT_C, .func = GPIO_FUNC_0, .pins = (0x3f<<2), }
#define I2S_PORTC \