summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-03-05 18:25:31 +0700
committerhathach <[email protected]>2025-03-05 18:25:31 +0700
commit8c0c21189c10668e6e4df1dba6daac121f3d9305 (patch)
treec24ed9755c7dc5275b5e03bcbb16d6b8f17ad43a /hw
parentd132044b7587f7e846bbec6e7b897d0842a21d13 (diff)
parent6bba41045a4224abb68256dcf2fce893da47a743 (diff)
Merge branch 'master' into fork/atoktoto/midihost
# Conflicts: # src/host/usbh.c
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/espressif/boards/family.c1
-rw-r--r--hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h5
-rw-r--r--hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h5
-rw-r--r--hw/bsp/rp2040/boards/adafruit_metro_rp2350/adafruit_metro_rp2350.h113
-rw-r--r--hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.cmake4
-rw-r--r--hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.h57
-rw-r--r--hw/bsp/rp2040/boards/pico_sdk/board.h40
-rw-r--r--hw/bsp/rp2040/boards/raspberry_pi_pico/board.h2
-rw-r--r--hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h2
9 files changed, 226 insertions, 3 deletions
diff --git a/hw/bsp/espressif/boards/family.c b/hw/bsp/espressif/boards/family.c
index 2f9ecfe4d..7049c0415 100644
--- a/hw/bsp/espressif/boards/family.c
+++ b/hw/bsp/espressif/boards/family.c
@@ -162,7 +162,6 @@ int board_getchar(void) {
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
#include "esp_private/usb_phy.h"
-#include "soc/usb_pins.h"
static usb_phy_handle_t phy_hdl;
diff --git a/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h b/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h
index f36ca14c9..d003ae828 100644
--- a/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h
+++ b/hw/bsp/rp2040/boards/adafruit_feather_rp2040_usb_host/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Feather RP2040 with USB Type A Host
+ url: https://www.adafruit.com/product/5723
+*/
+
#ifndef TUSB_BOARD_H
#define TUSB_BOARD_H
diff --git a/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h b/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h
index f81da3b70..0f53fd96f 100644
--- a/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h
+++ b/hw/bsp/rp2040/boards/adafruit_fruit_jam/board.h
@@ -24,6 +24,11 @@
* This file is part of the TinyUSB stack.
*/
+/* metadata:
+ name: Adafruit Fruit Jam - Mini RP2350
+ url: https://www.adafruit.com/product/6200
+*/
+
#ifndef TUSB_BOARD_H
#define TUSB_BOARD_H
diff --git a/hw/bsp/rp2040/boards/adafruit_metro_rp2350/adafruit_metro_rp2350.h b/hw/bsp/rp2040/boards/adafruit_metro_rp2350/adafruit_metro_rp2350.h
new file mode 100644
index 000000000..9fb9658a5
--- /dev/null
+++ b/hw/bsp/rp2040/boards/adafruit_metro_rp2350/adafruit_metro_rp2350.h
@@ -0,0 +1,113 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2025 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+#ifndef BOARDS_ADAFRUIT_METRO_RP2350_H
+#define BOARDS_ADAFRUIT_METRO_RP2350_H
+
+// required for board that is not part of pico-sdk
+
+// -----------------------------------------------------
+// NOTE: THIS HEADER IS ALSO INCLUDED BY ASSEMBLER SO
+// SHOULD ONLY CONSIST OF PREPROCESSOR DIRECTIVES
+// -----------------------------------------------------
+
+// pico_cmake_set PICO_PLATFORM=rp2350
+
+// On some samples, the xosc can take longer to stabilize than is usual
+#ifndef PICO_XOSC_STARTUP_DELAY_MULTIPLIER
+#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64
+#endif
+
+// For board detection
+#define ADAFRUIT_METRO_RP2350
+
+// --- RP2350 VARIANT ---
+#define PICO_RP2350A 0
+
+// --- UART ---
+#ifndef PICO_DEFAULT_UART
+#define PICO_DEFAULT_UART 0
+#endif
+#ifndef PICO_DEFAULT_UART_TX_PIN
+#define PICO_DEFAULT_UART_TX_PIN 0
+#endif
+#ifndef PICO_DEFAULT_UART_RX_PIN
+#define PICO_DEFAULT_UART_RX_PIN 1
+#endif
+
+// --- LED ---
+#ifndef PICO_DEFAULT_LED_PIN
+#define PICO_DEFAULT_LED_PIN 23
+#endif
+
+#ifndef PICO_DEFAULT_WS2812_PIN
+#define PICO_DEFAULT_WS2812_PIN 25
+#endif
+
+// --- I2C ---
+#ifndef PICO_DEFAULT_I2C
+#define PICO_DEFAULT_I2C 0
+#endif
+#ifndef PICO_DEFAULT_I2C_SDA_PIN
+#define PICO_DEFAULT_I2C_SDA_PIN 20
+#endif
+#ifndef PICO_DEFAULT_I2C_SCL_PIN
+#define PICO_DEFAULT_I2C_SCL_PIN 21
+#endif
+
+// --- SPI ---
+#ifndef PICO_DEFAULT_SPI
+#define PICO_DEFAULT_SPI 1
+#endif
+#ifndef PICO_DEFAULT_SPI_SCK_PIN
+#define PICO_DEFAULT_SPI_SCK_PIN 30
+#endif
+#ifndef PICO_DEFAULT_SPI_TX_PIN
+#define PICO_DEFAULT_SPI_TX_PIN 31
+#endif
+#ifndef PICO_DEFAULT_SPI_RX_PIN
+#define PICO_DEFAULT_SPI_RX_PIN 28
+#endif
+
+// --- FLASH ---
+
+// FruitJam use w25q128 but sdk does not have .s for it, use q080 instead
+#define PICO_BOOT_STAGE2_CHOOSE_W25Q080 1
+
+#ifndef PICO_FLASH_SPI_CLKDIV
+#define PICO_FLASH_SPI_CLKDIV 2
+#endif
+
+// pico_cmake_set_default PICO_FLASH_SIZE_BYTES = (8 * 1024 * 1024)
+#ifndef PICO_FLASH_SIZE_BYTES
+#define PICO_FLASH_SIZE_BYTES (8 * 1024 * 1024)
+#endif
+
+// pico_cmake_set_default PICO_RP2350_A2_SUPPORTED = 1
+#ifndef PICO_RP2350_A2_SUPPORTED
+#define PICO_RP2350_A2_SUPPORTED 1
+#endif
+
+#endif
diff --git a/hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.cmake b/hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.cmake
new file mode 100644
index 000000000..9a58821a5
--- /dev/null
+++ b/hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.cmake
@@ -0,0 +1,4 @@
+set(PICO_PLATFORM rp2350-arm-s)
+set(PICO_BOARD adafruit_metro_rp2350)
+set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_LIST_DIR})
+#set(OPENOCD_SERIAL E6614103E78E8324)
diff --git a/hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.h b/hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.h
new file mode 100644
index 000000000..0b8515d1f
--- /dev/null
+++ b/hw/bsp/rp2040/boards/adafruit_metro_rp2350/board.h
@@ -0,0 +1,57 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2025 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+
+/* metadata:
+ name: Adafruit Metro RP2350
+ url: https://www.adafruit.com/product/6003
+*/
+
+#ifndef TUSB_BOARD_H
+#define TUSB_BOARD_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+// UART and LED are already defined in pico-sdk board
+
+//--------------------------------------------------------------------+
+// PIO_USB
+//--------------------------------------------------------------------+
+// default to pico brain tester
+#define PICO_DEFAULT_PIO_USB_DP_PIN 32
+#define PICO_DEFAULT_PIO_USB_VBUSEN_PIN 29
+#define PICO_DEFAULT_PIO_USB_VBUSEN_STATE 1
+
+//--------------------------------------------------------------------
+// USB Host MAX3421E
+//--------------------------------------------------------------------
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif
diff --git a/hw/bsp/rp2040/boards/pico_sdk/board.h b/hw/bsp/rp2040/boards/pico_sdk/board.h
new file mode 100644
index 000000000..284edac7d
--- /dev/null
+++ b/hw/bsp/rp2040/boards/pico_sdk/board.h
@@ -0,0 +1,40 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2025 Ha Thach (tinyusb.org)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ * This file is part of the TinyUSB stack.
+ */
+
+#ifndef TUSB_BOARD_H
+#define TUSB_BOARD_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+// UART and LED are already defined in pico-sdk board
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif
diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.h b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.h
index 12c772b84..88f8793f4 100644
--- a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.h
+++ b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.h
@@ -26,7 +26,7 @@
/* metadata:
name: Pico
- url: https://www.raspberrypi.org/products/raspberry-pi-pico/
+ url: https://www.raspberrypi.com/products/raspberry-pi-pico/
*/
#ifndef TUSB_BOARD_H
diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h
index 139b58ceb..b5ce8b7e1 100644
--- a/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h
+++ b/hw/bsp/rp2040/boards/raspberry_pi_pico2/board.h
@@ -26,7 +26,7 @@
/* metadata:
name: Pico2
- url: https://www.raspberrypi.org/products/raspberry-pi-pico/
+ url: https://www.raspberrypi.com/products/raspberry-pi-pico-2/
*/
#ifndef TUSB_BOARD_H