|
|
@@ -0,0 +1,56 @@
|
|
|
+# Board GPIO profiles
|
|
|
+
|
|
|
+The GPIO manager must not expose every pin supported by an ESP SoC. A pin is
|
|
|
+available to a user only when the selected complete board profile lists it
|
|
|
+and declares the capabilities that the requested mode needs.
|
|
|
+
|
|
|
+## Policy
|
|
|
+
|
|
|
+- At most four user-configurable GPIO channels may be active at one time.
|
|
|
+- The board profile is the source of truth for the pins that may be exposed.
|
|
|
+- Camera, SD-card, flash/PSRAM, UART, boot-strapping, status-LED and other
|
|
|
+ board-owned pins are reserved.
|
|
|
+- Board-owned functions (for example the AI-Thinker flash LED) are not user
|
|
|
+ channels and are not exposed through the generic GPIO endpoint.
|
|
|
+- Unknown or unaudited boards fail closed: no user GPIO pin is enabled.
|
|
|
+- A SoC-valid pin is not automatically a board-safe pin.
|
|
|
+- PWM and other peripheral modes must not be enabled until both the board
|
|
|
+ profile and the GPIO driver backend implement and validate them.
|
|
|
+
|
|
|
+## Current profiles
|
|
|
+
|
|
|
+### AI-Thinker ESP32-CAM
|
|
|
+
|
|
|
+The current build selects BOARD_ESP32CAM_AITHINKER and defines
|
|
|
+__SD_USE_ONE_LINE_MODE__.
|
|
|
+
|
|
|
+GPIO13 is the only pin retained in the user whitelist, and it is input only
|
|
|
+(optionally with pull-up and interrupt). It is connected to the SD DAT3
|
|
|
+contact but is not part of the active 1-bit SD data bus. It is not advertised
|
|
|
+when 4-bit SD mode is selected.
|
|
|
+
|
|
|
+GPIO0, GPIO1, GPIO3, GPIO4, GPIO12 and all active camera/SD/flash/memory pins
|
|
|
+are not general-purpose user pins. In particular:
|
|
|
+- GPIO0 is the camera XCLK and a boot-strapping pin.
|
|
|
+- GPIO1/GPIO3 are UART0 TX/RX.
|
|
|
+- GPIO4 is the board flash LED.
|
|
|
+- GPIO12 is a boot-strapping pin.
|
|
|
+- GPIO2, GPIO14 and GPIO15 belong to the active 1-bit SDMMC interface.
|
|
|
+- Camera, flash/PSRAM and board status LED pins remain reserved.
|
|
|
+
|
|
|
+## Adding another board (including ESP32-S3)
|
|
|
+
|
|
|
+A new board must have its own profile. Before adding any user pin, audit the
|
|
|
+complete module and carrier-board schematics, including camera wiring,
|
|
|
+SD-card wiring, flash/PSRAM package and module variant, USB/JTAG, UART,
|
|
|
+strapping pins, status LEDs, and any external peripherals.
|
|
|
+
|
|
|
+ESP32-S3 SoC GPIO availability alone is not sufficient. For example, GPIO0,
|
|
|
+GPIO3, GPIO45 and GPIO46 are strapping pins; GPIO19/GPIO20 may be used by
|
|
|
+USB Serial/JTAG; GPIO26-GPIO32 are commonly used by flash/PSRAM, and GPIO33-
|
|
|
+GPIO37 may be used by octal flash/PSRAM depending on the module. The exact
|
|
|
+reserved set depends on the selected ESP32-S3 module and board.
|
|
|
+
|
|
|
+Until a specific ESP32-S3 board has been audited, its profile must expose no
|
|
|
+user GPIOs. Do not copy the AI-Thinker pin list or create a generic ESP32-S3
|
|
|
+allow-list.
|