STM32MP157F-DK2/40 pin pinout

The STM32MP157F-DK2 provides a connector compatible with the Raspberry Pi 40 pin pinout. Here's a quick reference of the various pins groups:

Power pins: Ground pins: I2C pins: MCO pins: UART pins: SAI pins: SDMMC pins: SPI pins: Timer pins:
 * 3V3 on pins 1 and 17
 * 5V on pins 2 and 4
 * GND on pins 6, 9, 14, 20, 25, 30, 34, 39
 * I2C5 SDA on pin 3 (STM32 pin PA12)
 * I2C5 SCL on pin 5 (STM32 pin PA11)
 * I2C1 SDA on pin 27 (STM32 pin PF15)
 * I2C1 SCL on pin 28 (STM32 pin PD12)
 * I2C5 is I2C1 on the Raspberry Pi
 * I2C1 is IC20 on the Raspberry Pi
 * MCO1 on pin 7 (STM32 pin PA8)
 * MCO2 on pin 29 (STM32 pin PG2)
 * MCO1 is GPCLK0 on the Raspberry Pi
 * MCO2 is GPCLK1 on the Raspberry Pi
 * UART3 TX on pin 8 (STM32 pin PB10)
 * UART3 RX on pin 10 (STM32 pin PB12)
 * UART3 RTS on pin 11 (STM32 pin PG8)
 * UART3 CTS on pin 36 (STM32 pin PB13)
 * UART3 is UART0 on the Raspberry Pi
 * SAI2 SCKA on pin 12 (STM32 pin PI5)
 * SAI2 FSA on pin 35 (STM32 pin PI7)
 * SAI2 SDA on pin 38 (STM32 pin PI6)
 * SAI2 SDB on pin 40 (STM32 pin PF11)
 * SAI2 is PCM on the Raspberry Pi
 * SAI2 pins are only usable as GPIO unless you desolder some bridges (see the user manual)
 * SDMMC3 CK on pin 15 (STM32 pin PG15)
 * SDMMC3 CMD on pin 16 (STM32 pin PF1)
 * SDMMC3 D0 on pin 18 (STM32 pin PF0)
 * SDMMC3 D1 on pin 22 (STM32 pin PF4)
 * SDMMC3 D2 on pin 37 (STM32 pin PF5)
 * SDMMC3 D3 on pin 13 (STM32 pin PD7)
 * SDMMC3 is SD0 on the Raspberry Pi
 * SPI5 MOSI on pin 19 (STM32 pin PF9)
 * SPI5 MISO on pin 21 (STM32 pin PF8)
 * SPI5 SCK on pin 23 (STM32 pin PF7)
 * SPI5 NSS on pin 24 (STM32 pin PF6)
 * Chip select GPIO on pin 26 (STM32 pin PF3)
 * SPI5 is SPI0 on the Raspberry Pi
 * SPI5 NSS is SPI0 CE 0 on the Raspberry Pi
 * Chip select GPIO is CE 1 on the Raspberry Pi
 * TIM5 CH2 on pin 31 (STM32 pin PH11)
 * TIM4 CH2 on pin 32 (STM32 pin PD13)
 * TIM3 CH2 on pin 33 (STM32 pin PC7)
 * TIM4 CH2 is PWM0 on the Raspberry Pi
 * TIM3 CH2 is PWM1 on the Raspberry Pi