summaryrefslogtreecommitdiff
path: root/hw/bsp
diff options
context:
space:
mode:
Diffstat (limited to 'hw/bsp')
-rw-r--r--hw/bsp/board_api.h4
-rw-r--r--hw/bsp/lpc40/boards/ea4088_quickstart/board.h7
-rw-r--r--hw/bsp/lpc40/family.c5
-rw-r--r--hw/bsp/lpc40/family.cmake4
-rw-r--r--hw/bsp/lpc40/family.mk3
-rw-r--r--hw/bsp/nrf/boards/nrf54h20dk/board.mk3
-rw-r--r--hw/bsp/rp2040/family.cmake1
-rw-r--r--hw/bsp/stm32f7/boards/stm32f723disco/board.h6
8 files changed, 24 insertions, 9 deletions
diff --git a/hw/bsp/board_api.h b/hw/bsp/board_api.h
index 73c06078a..27316af09 100644
--- a/hw/bsp/board_api.h
+++ b/hw/bsp/board_api.h
@@ -39,6 +39,10 @@ extern "C" {
#include "tusb.h"
+#if defined(LOGGER_RTT)
+#include "SEGGER_RTT.h"
+#endif
+
#if CFG_TUSB_OS == OPT_OS_ZEPHYR
#include <zephyr/kernel.h>
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
diff --git a/hw/bsp/lpc40/boards/ea4088_quickstart/board.h b/hw/bsp/lpc40/boards/ea4088_quickstart/board.h
index ede0a306d..95251f16a 100644
--- a/hw/bsp/lpc40/boards/ea4088_quickstart/board.h
+++ b/hw/bsp/lpc40/boards/ea4088_quickstart/board.h
@@ -59,9 +59,10 @@ static const PINMUX_GRP_T pinmuxing[] = {
{ 0, 29, (IOCON_FUNC1 | IOCON_MODE_INACT) }, // D+1
{ 0, 30, (IOCON_FUNC1 | IOCON_MODE_INACT) }, // D-1
{ 1, 18, (IOCON_FUNC1 | IOCON_MODE_INACT) }, // UP LED1
- { 1, 19, (IOCON_FUNC2 | IOCON_MODE_INACT) }, // PPWR1
-// {2, 14, (IOCON_FUNC2 | IOCON_MODE_INACT)}, // VBUS1
-// {2, 15, (IOCON_FUNC2 | IOCON_MODE_INACT)}, // OVRCR1
+ // U7 (STMPS2171) enables VBUS on a HIGH level, but USB_PPWR1 asserts LOW, so the port
+ // never gets power while the peripheral function drives this pin. Keep it a GPIO and
+ // drive it high in board_init() instead.
+ { 1, 19, (IOCON_FUNC0 | IOCON_MODE_INACT) }, // VBUS1 enable (active high)
// USB2 as Device
{ 0, 31, (IOCON_FUNC1 | IOCON_MODE_INACT) }, // D+2
diff --git a/hw/bsp/lpc40/family.c b/hw/bsp/lpc40/family.c
index 750bd2660..1f26e205c 100644
--- a/hw/bsp/lpc40/family.c
+++ b/hw/bsp/lpc40/family.c
@@ -121,6 +121,11 @@ void board_init(void) {
// set portfunc: USB1 = host, USB2 = device
LPC_USB->StCtrl = 0x3;
+
+ // VBUS on the USB1 host connector, see the P1.19 note in board.h. Driven either way:
+ // left as an input it would float the switch enable in a device-only build.
+ Chip_GPIO_SetPinState(LPC_GPIO, 1, 19, CFG_TUH_ENABLED);
+ Chip_GPIO_SetPinDIROutput(LPC_GPIO, 1, 19);
}
//--------------------------------------------------------------------+
diff --git a/hw/bsp/lpc40/family.cmake b/hw/bsp/lpc40/family.cmake
index 01430bbb1..7cdc6efb2 100644
--- a/hw/bsp/lpc40/family.cmake
+++ b/hw/bsp/lpc40/family.cmake
@@ -33,6 +33,10 @@ function(family_add_board BOARD_TARGET)
__USE_LPCOPEN
CORE_M4
CFG_TUSB_MEM_SECTION=__attribute__\(\(section\(\".data.$RAM2\"\)\)\)
+ CFG_TUD_MEM_SECTION=__attribute__\(\(section\(\".data.$RAM2\"\)\)\)
+ CFG_TUH_MEM_SECTION=__attribute__\(\(section\(\".data.$RAM2\"\)\)\)
+ # host is on root-hub port index 0; the dual examples would otherwise default it to 1
+ BOARD_TUH_RHPORT=0
)
target_include_directories(${BOARD_TARGET} PUBLIC
${SDK_DIR}/inc
diff --git a/hw/bsp/lpc40/family.mk b/hw/bsp/lpc40/family.mk
index af8864335..02903d374 100644
--- a/hw/bsp/lpc40/family.mk
+++ b/hw/bsp/lpc40/family.mk
@@ -8,6 +8,9 @@ CFLAGS += \
-DCORE_M4 \
-D__USE_LPCOPEN \
-DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
+ -DCFG_TUD_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
+ -DCFG_TUH_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \
+ -DBOARD_TUH_RHPORT=0 \
-DCFG_TUSB_MCU=OPT_MCU_LPC40XX
# mcu driver cause following warnings
diff --git a/hw/bsp/nrf/boards/nrf54h20dk/board.mk b/hw/bsp/nrf/boards/nrf54h20dk/board.mk
index 3333a76f1..150a6f38c 100644
--- a/hw/bsp/nrf/boards/nrf54h20dk/board.mk
+++ b/hw/bsp/nrf/boards/nrf54h20dk/board.mk
@@ -6,9 +6,6 @@ CFLAGS += -DNRF54H20_XXAA
# RAM00 (512 KB) and drop this.
CFLAGS += -DCFG_EXAMPLE_VIDEO_READONLY
-# enable max3421 host driver for this board
-MAX3421_HOST = 1
-
# caused by void SystemStoreFICRNS() (without void) in system_nrf5340_application.c
CFLAGS += -Wno-error=strict-prototypes
diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake
index 57be416a2..ba63cf44b 100644
--- a/hw/bsp/rp2040/family.cmake
+++ b/hw/bsp/rp2040/family.cmake
@@ -122,6 +122,7 @@ target_sources(tinyusb_host_base INTERFACE
${TOP}/src/host/usbh.c
${TOP}/src/host/hub.c
${TOP}/src/class/cdc/cdc_host.c
+ ${TOP}/src/class/audio/audio_host.c
${TOP}/src/class/hid/hid_host.c
${TOP}/src/class/midi/midi_host.c
${TOP}/src/class/midi/midi2_host.c
diff --git a/hw/bsp/stm32f7/boards/stm32f723disco/board.h b/hw/bsp/stm32f7/boards/stm32f723disco/board.h
index 698a1a230..78942b884 100644
--- a/hw/bsp/stm32f7/boards/stm32f723disco/board.h
+++ b/hw/bsp/stm32f7/boards/stm32f723disco/board.h
@@ -103,9 +103,9 @@ static inline void board_clock_init(void) {
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = HSE_VALUE / 1000000;
- RCC_OscInitStruct.PLL.PLLN = 432;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
- RCC_OscInitStruct.PLL.PLLQ = 9;
+ RCC_OscInitStruct.PLL.PLLN = 288;
+ RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
+ RCC_OscInitStruct.PLL.PLLQ = 6;
HAL_RCC_OscConfig(&RCC_OscInitStruct);
/* Activate the OverDrive to reach the 216 MHz Frequency */