Multifunction Ports on the Raspberry Pi 4B, Pinout and Alternate Name Functions

Multifunction Ports on the Raspberry Pi 4B,  Pinout and Alternate Name Functions

https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269104  John R.  forum Post

https://www.studiopieters.nl/raspberry-pi-4-model-b-pinout/  Sudio Pieters Netherlands Raspi4B pinout.

https://lambdaland.org/posts/2020-12-23_freebsd_rpi4/  2020 FreeBSD install, Tier 3 now Tier 1,  Rust Language setup.

https://github.com/raspberrypi/linux/blob/7f465f823c2ecbade5877b8bbcb2093a8060cb0e/arch/arm/boot/dts/bcm2711.dtsi#L41

Interrupt Code for Raspberry Pi 4 from Raspberry Pi Linux

As Joan has stated only 1 of UART0/1 is accessible (UART0 /dev/ttyAMA0 is connected to Bluetooth on later model Pi).

There are additional UART on the Pi4.

Raspberry Pi4 UART is a more up to date answer.

https://raspberrypi.stackexchange.com/questions/104464/where-are-the-uarts-on-the-raspberry-pi-4/104466#104466

The following summarises the pin usage:-

        TXD RXD CTS RTS     Board Pins
uart0   14  15              8   10
uart1   14  15              8   10
uart2   0   1   2   3       27  28  (I2C)
uart3   4   5   6   7       7   29
uart4   8   9   10  11      24  21  (SPI0)
uart5   12  13  14  15      32  33  (gpio-fan)

I doubt UART2 would be usable as GPIO0/1 are used for HATs (and shown as reserved).
I suspect that the SDA0/SCL0 connected to these pins are used for other internal functions.

I have extracted the GPIO Alternate Functions from the data sheet, as I have been unable to find any existing list.

This shows the mode and function of each.

   ALT0       ALT1       ALT2       ALT3       ALT4       ALT5      
 0 SDA0       SA5        PCLK       SPI3_CE0_N TXD2       SDA6      
 1 SCL0       SA4        DE         SPI3_MISO  RXD2       SCL6      
 2 SDA1       SA3        LCD_VSYNC  SPI3_MOSI  CTS2       SDA3      
 3 SCL1       SA2        LCD_HSYNC  SPI3_SCLK  RTS2       SCL3      
 4 GPCLK0     SA1        DPI_D0     SPI4_CE0_N TXD3       SDA3      
 5 GPCLK1     SAO        DPI_D1     SPI4_MISO  RXD3       SCL3      
 6 GPCLK2     SOE_N      DPI_D2     SPI4_MOSI  CTS3       SDA4      
 7 SPI0_CE1_N SWE_N      DPI_D3     SPI4_SCLK  RTS3       SCL4      
 8 SPI0_CE0_N SDO        DPI_D4     _          TXD4       SDA4      
 9 SPI0_MISO  SD1        DPI_D5     _          RXD4       SCL4      
10 SPI0_MOSI  SD2        DPI_D6     _          CTS4       SDA5      
11 SPI0_SCLK  SD3        DPI_D7     _          RTS4       SCL5      
12 PWM0       SD4        DPI_D8     SPI5_CE0_N TXD5       SDA5      
13 PWM1       SD5        DPI_D9     SPI5_MISO  RXD5       SCL5      
14 TXD0       SD6        DPI_D10    SPI5_MOSI  CTS5       TXD1      
15 RXD0       SD7        DPI_D11    SPI5_SCLK  RTS5       RXD1      
16 FL0        SD8        DPI_D12    CTS0       SPI1_CE2_N CTS1      
17 FL1        SD9        DPI_D13    RTS0       SPI1_CE1_N RTS1      
18 PCM_CLK    SD10       DPI_D14    SPI6_CE0_N SPI1_CE0_N PWM0      
19 PCM_FS     SD11       DPI_D15    SPI6_MISO  SPI1_MISO  PWM1      
20 PCM_DIN    SD12       DPI_D16    SPI6_MOSI  SPIl_MOSI  GPCLK0    
21 PCM_DOUT   SD13       DPI_D17    SPI6_SCLK  SPI1_SCLK  GPCLK1    
22 SD0_CLK    SD14       DPI_D18    SD1_CLK    ARM_TRST   SDA6      
23 SD0_XMD    SD15       DPI_D19    SD1_CMD    ARM_RTCK   SCL6      
24 SD0_DATO   SD16       DPI_D20    SD1_DAT0   ARM_TDO    SPI3_CE1_N
25 SD0_DAT1   SD17       DPI_D21    SD1_DAT1   ARM_TCK    SPI4_CE1_N
26 SD0_DAT2   TE0        DPI_D22    SD1_DAT2   ARM_TDI    SPI5_CE1_N
27 SD0_DAT3   TE1        DPI_D23    SD1_DAT3   ARM_TMS    SPI6_CE1_N

Comments

Popular posts from this blog

FreeBSD 14.0 Compiling kernel for Raspberry Pi 4B

HDMI Audio sound patches into GhostBSD source code /usr/ghost14/ghostbsd-src SOLVED Jan20 2024

How to install GhostBSD-Arm64 into a USB Flash Drive stick April 24, 2024 update edition.