board_config.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * board_config.h — hardware pin map for the ESP32-P4 Dante/AES67 endpoint.
  3. *
  4. * Reference target: DatanoiseTV ESP32-P4-NANO (Ethernet via IP101 GRI PHY on
  5. * RMII, onboard ES8311 codec + NS4150B amp). Values mirror the pin table in
  6. * README.md. If the deployed board differs, update BOTH this file and the
  7. * README table together (see CLAUDE.md).
  8. *
  9. * NOTE: some I2S functions have alternate "onboard" pin options noted in the
  10. * README. The active values below use the primary column; onboard variants
  11. * are listed in comments for quick swapping.
  12. */
  13. #pragma once
  14. /* ---- Ethernet (RMII to IP101 GRI PHY) ---- */
  15. #define BOARD_ETH_MDC_GPIO 31
  16. #define BOARD_ETH_MDIO_GPIO 52
  17. #define BOARD_ETH_REF_CLK_GPIO 50 /* external 50 MHz clock */
  18. #define BOARD_ETH_PHY_RST_GPIO 51
  19. #define BOARD_ETH_PHY_ADDR 1
  20. /* ---- I2S audio to ES8311 codec ---- */
  21. #define BOARD_I2S_MCLK_GPIO 13 /* 18.432 MHz via APLL */
  22. #define BOARD_I2S_BCLK_GPIO 36 /* onboard alt: 12 */
  23. #define BOARD_I2S_LRCLK_GPIO 33 /* onboard alt: 10 */
  24. #define BOARD_I2S_DOUT_GPIO 32 /* onboard alt: 9 */
  25. #define BOARD_I2S_DIN_GPIO 11 /* codec ADC input */
  26. /* ---- Power amp enable (NS4150B) ---- */
  27. #define BOARD_PA_ENABLE_GPIO 53 /* active high */
  28. /* ---- I2C control bus (ES8311) ---- */
  29. #define BOARD_I2C_SCL_GPIO 8
  30. #define BOARD_I2C_SDA_GPIO 7
  31. /* ---- Default audio format ---- */
  32. #define BOARD_AUDIO_SAMPLE_RATE 48000
  33. #define BOARD_AUDIO_BIT_DEPTH 24 /* AES67 L24 */
  34. #define BOARD_AUDIO_CHANNELS 2