From ddac3c9318e95f476c1df371027f68162ab4f72c Mon Sep 17 00:00:00 2001 From: Dmitry Ermakov Date: Sun, 19 Feb 2023 01:22:42 +0300 Subject: [PATCH] [T31] Hualai/Wyze MMC hacks (#643) --- .../kernel/patches/0010-wyze-mmc-gpio.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 br-ext-chip-ingenic/board/t31/kernel/patches/0010-wyze-mmc-gpio.patch diff --git a/br-ext-chip-ingenic/board/t31/kernel/patches/0010-wyze-mmc-gpio.patch b/br-ext-chip-ingenic/board/t31/kernel/patches/0010-wyze-mmc-gpio.patch new file mode 100644 index 00000000..3c0cbce8 --- /dev/null +++ b/br-ext-chip-ingenic/board/t31/kernel/patches/0010-wyze-mmc-gpio.patch @@ -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 \