From 0d13bfb9a28325404f04528ba7ddaddc3c2aed19 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 20 Aug 2024 17:41:37 +0200 Subject: [PATCH] FriendlyELEC/NanoPC-T6: enable USB 2.0 on LTS board NanoPC-T6 LTS has different USB configuration. There is no minipcie slot, two usb 2.0 ports are accessible from outside and another two on internal header. To have it working we need to enable USB20_HOST_PWREN line. Closes: #153 Signed-off-by: Marcin Juszkiewicz --- .../Library/RockchipPlatformLib/RockchipPlatformLib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/Library/RockchipPlatformLib/RockchipPlatformLib.c b/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/Library/RockchipPlatformLib/RockchipPlatformLib.c index f27cee8e..ec071169 100644 --- a/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/Library/RockchipPlatformLib/RockchipPlatformLib.c +++ b/edk2-rockchip/Platform/FriendlyElec/NanoPC-T6/Library/RockchipPlatformLib/RockchipPlatformLib.c @@ -211,6 +211,9 @@ UsbPortPowerEnable ( GpioPinWrite (1, GPIO_PIN_PD2, TRUE); GpioPinSetDirection (1, GPIO_PIN_PD2, GPIO_PIN_OUTPUT); + /* Set GPIO1 PA4 (USB20_HOST_PWREN) output high to power USB 2.0 ports */ + GpioPinWrite (1, GPIO_PIN_PA4, TRUE); + GpioPinSetDirection (1, GPIO_PIN_PA4, GPIO_PIN_OUTPUT); // DEBUG((DEBUG_INFO, "Trying to enable on-board LED1\n")); // GpioPinWrite (2, GPIO_PIN_PC0, TRUE); // GpioPinSetDirection (2, GPIO_PIN_PC0, GPIO_PIN_OUTPUT);