board_config.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * board_config.h — hardware pin map for the ESP32-P4 Dante/AES67 endpoint.
  3. *
  4. * Target board: Waveshare ESP32-P4-ETH (Ethernet via IP101 GRI PHY on RMII,
  5. * onboard ES8311 codec + NS4150B amplifier + mic + 8ohm speaker connector,
  6. * 32MB PSRAM, 32MB flash). Pins verified against the board schematic
  7. * (docs/esp32-p4_schematic_en.pdf). Values mirror the pin table in README.md
  8. * — if the board ever changes, update BOTH this file and the README table
  9. * together (see CLAUDE.md).
  10. *
  11. * Note on I2S data direction: DOUT (GPIO9) drives the codec's DAC serial
  12. * input (ES8311 DSDIN); DIN (GPIO11) reads the codec's ADC serial output
  13. * (ES8311 ASDOUT).
  14. */
  15. #pragma once
  16. /* ---- Ethernet (RMII to IP101 GRI PHY) ---- */
  17. #define BOARD_ETH_MDC_GPIO 31
  18. #define BOARD_ETH_MDIO_GPIO 52
  19. #define BOARD_ETH_REF_CLK_GPIO 50 /* external 50 MHz clock */
  20. #define BOARD_ETH_PHY_RST_GPIO 51
  21. #define BOARD_ETH_PHY_ADDR 1
  22. /* ---- I2S audio to onboard ES8311 codec ---- */
  23. #define BOARD_I2S_MCLK_GPIO 13 /* 18.432 MHz via APLL */
  24. #define BOARD_I2S_BCLK_GPIO 12 /* bit clock */
  25. #define BOARD_I2S_LRCLK_GPIO 10 /* word/frame clock */
  26. #define BOARD_I2S_DOUT_GPIO 9 /* data out -> codec DAC */
  27. #define BOARD_I2S_DIN_GPIO 11 /* data in <- codec ADC / mic */
  28. /* ---- Power amp enable (NS4150B) ---- */
  29. #define BOARD_PA_ENABLE_GPIO 53 /* active high */
  30. /* ---- I2C control bus (ES8311) ---- */
  31. #define BOARD_I2C_SCL_GPIO 8
  32. #define BOARD_I2C_SDA_GPIO 7
  33. /* ---- Default audio format ---- */
  34. #define BOARD_AUDIO_SAMPLE_RATE 48000
  35. #define BOARD_AUDIO_BIT_DEPTH 24 /* AES67 L24 */
  36. #define BOARD_AUDIO_CHANNELS 2