diff --git a/docs/reference/hardware/esp32-p4-eth.md b/docs/reference/hardware/esp32-p4-eth.md new file mode 100644 index 00000000..d6f7916f --- /dev/null +++ b/docs/reference/hardware/esp32-p4-eth.md @@ -0,0 +1,57 @@ +# Waveshare ESP32-P4-ETH hardware reference + +Pin maps and onboard features for the **Waveshare ESP32-P4-ETH**, read from the schematic so MoonLight work reads this instead of re-scraping the PDF. The board runs the plain `esp32p4rev1-eth` firmware, the same build the P4-NANO uses, and is `"Waveshare ESP32-P4-ETH"` in the device catalog. + +**Sources** +- Schematic: +- Board drawing: + +Same family as the Waveshare ESP32-P4-NANO: ESP32-P4, RISC-V dual-core, the same onboard IP101 Ethernet PHY wiring, and the same CSI/DSI/I2C accessory-bus convention. See [gpio-usage.md § ESP32-P4](gpio-usage.md#esp32-p4) for the pin map. It carries the same onboard **ES8311** audio codec, feeding an SMD mic and a 2-pin JST speaker header. The [MHC-WLED ESP32-P4 shield](mhc-wled-esp32-p4-shield.md) is a different, unrelated P4 carrier board, with RS-485/line-in and no onboard codec. + +## Audio (ES8311 codec) + +The onboard SMD mic and speaker header connect through an **ES8311 mono codec** and an **NS4150B** class-D amplifier, the same amplifier chip the ESP32-S31 uses. The ESP is the I2S master, driving MCLK. + +| Signal | GPIO | Role | +|---|---|---| +| I2S MCLK | 13 | master clock to the codec, 256 × sample_rate | +| I2S SCLK (BCLK) | 12 | bit clock | +| I2S LRCK (WS) | 10 | word select | +| I2S ASDOUT | 11 | mic data, codec to ESP, the record path | +| I2S DSDIN | 9 | speaker data, ESP to codec; wired on the board, playback is not implemented | +| ESP_I2C_SDA | 7 | codec control bus, shared with the CSI/DSI accessory headers | +| ESP_I2C_SCL | 8 | codec control bus | +| PA_Ctrl | 53 | NS4150B amplifier enable; wired on the board, not implemented | + +The ES8311's I2C address is `0x18`, the hardware default with no address-select strap. The catalog entry configures [AudioService](../../moonmodules/core/moxygen/AudioService.md)'s ES8311 codec on these pins, through the board's [I2cBusModule](../../moonmodules/core/moxygen/I2cBusModule.md). The speaker path (DSDIN, PA_Ctrl) is a separate, unimplemented capability. + +## Ethernet (IP101GRI PHY, RMII) + +The board uses the `P4 RMII` preset, shared with the Waveshare P4-NANO: MDC 31, MDIO 52, PHY reset 51, reference clock 50 (see [EthernetModule](../../moonmodules/core/moxygen/EthernetModule.md)). The RMII data lines, fixed by the chip and not part of that preset, read from the schematic: + +| Signal | GPIO | +|---|---| +| TXD0 | 34 | +| TXD1 | 35 | +| TXEN | 49 | +| RXD0 | 29 | +| RXD1 | 30 | +| RXDV | 28 | + +## microSD slot + +Wired on the board; MoonLight does not mount it: + +| Signal | GPIO | +|---|---| +| D0 | 39 | +| D1 | 40 | +| D2 | 41 | +| CD/D3 | 42 | +| CLK | 43 | +| CMD | 44 | +| VDD gate (pMOS) | 45 | + +## Other onboard features + +From the Waveshare wiki: MIPI-CSI (2-lane, OV5647-compatible) and MIPI-DSI (2-lane, 5, 7, 8 and 10.1-inch panels) accessory headers, plus BOOT and RESET buttons. USB-C is native, with D- on GPIO 24 and D+ on GPIO 25, and a UART-bridge variant also exists. diff --git a/docs/reference/hardware/firmware-variants.md b/docs/reference/hardware/firmware-variants.md index 62f4c7b1..2bca970b 100644 --- a/docs/reference/hardware/firmware-variants.md +++ b/docs/reference/hardware/firmware-variants.md @@ -12,7 +12,7 @@ Selected by `build_esp32.py --firmware `, reported by `SystemModule.firmwar | `esp32-eth` | classic | Ethernet only, WiFi excluded | | `esp32-16mb` | classic, 16 MB flash | WiFi and Ethernet | | `esp32s3-n16r8`, `esp32s3-n8r8` | S3 | WiFi and W5500 SPI Ethernet | -| `esp32p4rev1-eth` | P4 rev 1 (Waveshare ESP32-P4-NANO) | Ethernet only | +| `esp32p4rev1-eth` | P4 rev 1 (Waveshare ESP32-P4-NANO, Waveshare ESP32-P4-ETH) | Ethernet only | | `esp32p4rev1-eth-wifi` | P4 rev 1 | Ethernet, plus WiFi via the on-board ESP32-C6 over esp_hosted | | `esp32p4rev3-eth`, `esp32p4rev3-eth-wifi` | P4 rev 3 silicon | As rev 1. Rev 3 is not binary-compatible with rev 1; untested, no v3 board on the bench | diff --git a/docs/reference/hardware/gpio-usage.md b/docs/reference/hardware/gpio-usage.md index 66a78575..2d2d6493 100644 --- a/docs/reference/hardware/gpio-usage.md +++ b/docs/reference/hardware/gpio-usage.md @@ -70,8 +70,11 @@ For **LED output** specifically — the pins a WS2812-class strand data line can | Role-conflict | **34-38** | Strapping pins (boot mode). Don't drive at reset; the first LED-driver default wrongly landed here (see [lessons.md](../../work/past/lessons.md)). | | Role-conflict | **37, 38** | UART0 console on the P4-NANO (`CONFIG_ESP_CONSOLE_UART_DEFAULT`) — the runtime `ESP_LOGI` lines come out here, not over USB. | | Board-wired (P4-NANO) | **Ethernet RMII** 28-31 / 49-52, **C6 SDIO** 14-19 / 54, **I2C** 7-8 | Consumed by the NANO's on-board Ethernet PHY, the C6 WiFi co-processor, and the I2C bus. | +| Board-wired (P4-ETH) | **Ethernet RMII** 28-31 / 34-35 / 49-52, **ES8311 audio** 7-13, **USB D-/D+** 24-25, **microSD** (unimplemented) 39-45 | The [Waveshare ESP32-P4-ETH](esp32-p4-eth.md) has no C6/WiFi. It carries its own onboard ES8311 codec, a native USB-C port, and a microSD slot; that page has the full per-signal map. | -**Clear on the P4-NANO:** 20-27, 32-33, 39-48 (the LED-driver default is `pins="20,21,22,23,24,25,26,27"`). Exact free set is board-specific; the NANO's is the reference. A carrier board changes what's exposed and how — the [MHC-WLED ESP32-P4 shield](mhc-wled-esp32-p4-shield.md) routes every terminal through level shifters / RS-485 transceivers / protected inputs (no bare GPIO), which is why a direct loopback jumper fails on it; its full terminal map is on that page. +**Clear on the P4-NANO:** 20-27, 32-33, 39-48 (the LED-driver default is `pins="20,21,22,23,24,25,26,27"`). Exact free set is board-specific; the NANO's is the reference. A carrier board changes what's exposed and how. The [MHC-WLED ESP32-P4 shield](mhc-wled-esp32-p4-shield.md) routes every terminal through level shifters, RS-485 transceivers, or protected inputs, with no bare GPIO. A direct loopback jumper fails on it for that reason. Its full terminal map is on that page. + +**Clear on the P4-ETH:** 2-6, 14-23, 26, 27, 32, 33, 46-48, 54. ## ESP32-S31 diff --git a/mkdocs.yml b/mkdocs.yml index b13d16b4..30fbde4f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -232,6 +232,7 @@ nav: - GPIO usage per MCU: reference/hardware/gpio-usage.md - ESP32-S31 coreboard: reference/hardware/esp32-s31-coreboard.md - MHC-WLED ESP32-P4 shield: reference/hardware/mhc-wled-esp32-p4-shield.md + - Waveshare ESP32-P4-ETH: reference/hardware/esp32-p4-eth.md - Light fixtures and DMX nodes: reference/hardware/light-fixtures.md - Control surfaces: reference/hardware/control-surfaces.md # The rules bind a contributor rather than serving a reader need, so they sit outside diff --git a/mooninstaller/deviceModels.json b/mooninstaller/deviceModels.json index 3f5dfd78..db177e51 100644 --- a/mooninstaller/deviceModels.json +++ b/mooninstaller/deviceModels.json @@ -1060,7 +1060,7 @@ "parent_id": "Drivers", "controls": { "peripheral": "Parlio", - "pins": "20,21,22,23,24,25,26,27" + "pins": "16,17,18,19,20,21,22,23" } }, {