From 2c69e7b6617d3703d707e6d4272a865c6ae1e6ce Mon Sep 17 00:00:00 2001 From: Skr-niao Date: Fri, 5 Apr 2024 20:38:15 +0800 Subject: [PATCH] Platform/ROCK5B: Enable WIFI Bluetooth regulator --- .../RockchipPlatformLib/RockchipPlatformLib.c | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/edk2-rockchip/Platform/Radxa/ROCK5B/Library/RockchipPlatformLib/RockchipPlatformLib.c b/edk2-rockchip/Platform/Radxa/ROCK5B/Library/RockchipPlatformLib/RockchipPlatformLib.c index 94d541c9..2b49a67a 100644 --- a/edk2-rockchip/Platform/Radxa/ROCK5B/Library/RockchipPlatformLib/RockchipPlatformLib.c +++ b/edk2-rockchip/Platform/Radxa/ROCK5B/Library/RockchipPlatformLib/RockchipPlatformLib.c @@ -352,6 +352,26 @@ PlatformSetStatusLed ( GpioPinWrite (0, GPIO_PIN_PB7, Enable); } +VOID +EFIAPI +PlatformPcieWiFiEnable ( + IN BOOLEAN Enable + ) +{ + // WiFi - enable + GpioPinWrite (0, GPIO_PIN_PC4, Enable); + GpioPinSetDirection (0, GPIO_PIN_PC4, GPIO_PIN_OUTPUT); + GpioPinWrite (4, GPIO_PIN_PA2, Enable); + GpioPinSetDirection (4, GPIO_PIN_PA2, GPIO_PIN_OUTPUT); + + // bluetooth - enable + GpioPinWrite (3, GPIO_PIN_PD5, Enable); + GpioPinSetDirection (3, GPIO_PIN_PD5, GPIO_PIN_OUTPUT); + GpioPinWrite (3, GPIO_PIN_PA6, Enable); + GpioPinSetDirection (3, GPIO_PIN_PA6, GPIO_PIN_OUTPUT); + +} + VOID EFIAPI PlatformEarlyInit ( @@ -359,5 +379,6 @@ PlatformEarlyInit ( ) { // Configure various things specific to this platform + PlatformPcieWiFiEnable(TRUE); GpioPinSetFunction(1, GPIO_PIN_PD5, 0); //jdet }