Skip to content

GPIO Map

This page documents all GPIO allocations on the ESP32-P4-WIFI6-DEV-KIT, covering both the external 40-pin header and internal connections to onboard peripherals.

The header uses a 2x20 layout at 2.54 mm pitch. Pin 1 is top-left.

PinFunctionGPIOPinFunctionGPIO
13V325V
3SDAGPIO745V
5SCLGPIO86GND
7GPIOGPIO238TXDGPIO37
9GND10RXDGPIO38
11GPIOGPIO2112GPIOGPIO22
13GPIOGPIO2014GND
15GPIOGPIO616GPIOGPIO5
173V318GPIOGPIO4
19GPIOGPIO320GND
21GPIOGPIO222GPIOGPIO1
23GPIOGPIO024GPIOGPIO36
25GND26GPIOGPIO32
27GPIOGPIO2428GPIOGPIO25
29GPIOGPIO3330GND
31GPIOGPIO2632GPIOGPIO54
33GPIOGPIO4834GND
35GPIOGPIO5336GPIOGPIO46
37GPIOGPIO4738GPIOGPIO27
39GND40GPIOGPIO45

These GPIOs are connected to onboard hardware and are not exposed on the 40-pin header. Reassigning them in software will disable the corresponding onboard peripheral.

SignalGPIODirectionDescription
MCLKGPIO13OutputMaster clock to ES8311
SCLKGPIO12OutputSerial clock (bit clock)
ASDOUTGPIO11OutputAudio serial data out (P4 to codec)
LRCKGPIO10OutputLeft/right channel clock (word select)
DSDINGPIO9InputAudio serial data in (codec to P4)
PA_CtrlGPIO53OutputNS4150B amplifier enable
SignalGPIODirectionNotes
SCLGPIO8BidirectionalAlso on header pin 5 and I2C port
SDAGPIO7BidirectionalAlso on header pin 3 and I2C port

The default I2C bus is shared across three physical connectors: the 40-pin header (pins 3, 5), the dedicated I2C port (component 15), and the internal connection to the ES8311 codec. All devices on these connections share the same I2C bus.

SignalGPIODirectionNotes
TXDGPIO37OutputHeader pin 8
RXDGPIO38InputHeader pin 10
GPIOPrimary AssignmentSharedExposed on Header
GPIO0General GPIONoYes (pin 23)
GPIO1General GPIONoYes (pin 22)
GPIO2General GPIONoYes (pin 21)
GPIO3General GPIONoYes (pin 19)
GPIO4General GPIONoYes (pin 18)
GPIO5General GPIONoYes (pin 16)
GPIO6General GPIONoYes (pin 15)
GPIO7I2C SDAYes (header + I2C port + codec)Yes (pin 3)
GPIO8I2C SCLYes (header + I2C port + codec)Yes (pin 5)
GPIO9I2S DSDINInternal (audio)No
GPIO10I2S LRCKInternal (audio)No
GPIO11I2S ASDOUTInternal (audio)No
GPIO12I2S SCLKInternal (audio)No
GPIO13I2S MCLKInternal (audio)No
GPIO20General GPIONoYes (pin 13)
GPIO21General GPIONoYes (pin 11)
GPIO22General GPIONoYes (pin 12)
GPIO23General GPIONoYes (pin 7)
GPIO24General GPIONoYes (pin 27)
GPIO25General GPIONoYes (pin 28)
GPIO26General GPIONoYes (pin 31)
GPIO27General GPIONoYes (pin 38)
GPIO32General GPIONoYes (pin 26)
GPIO33General GPIONoYes (pin 29)
GPIO36General GPIONoYes (pin 24)
GPIO37UART TXDNoYes (pin 8)
GPIO38UART RXDNoYes (pin 10)
GPIO45General GPIONoYes (pin 40)
GPIO46General GPIONoYes (pin 36)
GPIO47General GPIONoYes (pin 37)
GPIO48General GPIONoYes (pin 33)
GPIO53PA_Ctrl / GPIOYes (audio amp + header)Yes (pin 35)
GPIO54General GPIONoYes (pin 32)

GPIO assignments sourced from the Waveshare ESP32-P4-WIFI6-DEV-KIT Wiki and ESP32-P4 datasheet.