esp32: Merge the per-SoC "main" components back together.

Removes redundant metadata from each, shouldn't otherwise change
any build output.

Reverts the split originally added in e4650125.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index 059989c..0995236 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -14,6 +14,18 @@
     get_filename_component(MICROPY_PORT_DIR ${MICROPY_DIR}/ports/esp32 ABSOLUTE)
 endif()
 
+# RISC-V specific inclusions
+if(CONFIG_IDF_TARGET_ARCH_RISCV)
+    list(APPEND MICROPY_SOURCE_LIB ${MICROPY_DIR}/shared/runtime/gchelper_generic.c)
+    list(APPEND IDF_COMPONENTS riscv)
+endif()
+
+if(NOT DEFINED MICROPY_PY_TINYUSB)
+    if(CONFIG_IDF_TARGET_ESP32S2 OR CONFIG_IDF_TARGET_ESP32S3)
+        set(MICROPY_PY_TINYUSB ON)
+    endif()
+endif()
+
 # Include core source components.
 include(${MICROPY_DIR}/py/py.cmake)
 
@@ -182,7 +194,7 @@
 if (MICROPY_USER_LDFRAGMENTS)
     set(MICROPY_LDFRAGMENTS ${MICROPY_USER_LDFRAGMENTS})
 else()
-    set(MICROPY_LDFRAGMENTS linker.lf)
+    set(MICROPY_LDFRAGMENTS linker_esp32.lf)
 endif()
 
 # Register the main IDF component.