10

The BCM2711's hardware documentation lists multiple I/O interface options. Among others these are:

  • up to 6 × I2C,
  • up to 6 × UART (muxed with I2C),
  • up to 6 × SPI (only five exposed on Raspberry Pi 4B)

The Pi 4 however shares the pinout of its GPIO header with the older models (see here).

So where exactly are the additional serial interfaces?

Ghanima
  • 15,855
  • 15
  • 61
  • 119

1 Answers1

13

The preliminary Raspberry Pi 4 Model B datasheet, section "5.1.1 GPIO Pin Assignments" says:

As well as being able to be used as straightforward software controlled input and output (with programmable pulls), GPIO pins can be switched (multiplexed) into various other modes backed by dedicated peripheral blocks such as I2C, UART and SPI.

In addition to the standard peripheral options found on legacy Pis, extra I2C, UART and SPI peripherals have been added to the BCM2711 chip and are available as further mux options on the Pi4. This gives users much more flexibility when attaching add-on hardware as compared to older models.

The "additional" interfaces are alternate functions that are multiplexed to the existing GPIO pins. So while it is true that this gives the user more flexibility using any of these functions will reduce the number of available general purpose I/O pins. The alternate functions are listed in section "5.1.2 GPIO Alternate Functions":

enter image description here


How to go about activating alternate functions: How can i turn an GPIO to its alternate function?

Ghanima
  • 15,855
  • 15
  • 61
  • 119
  • 3
    Btw, this kind of 'multiplexing' is very common on embedded systems/CPUs. Microcontrollers, for example, almost always pack more 'features', i.e. peripherals, than physical pins available. The most basic form allows a peripheral's pin(s) to be disconnected from the peripheral and used as GPIO. Obviously, every pin can only serve one function at a time, and the physical connection of the pin to another device most of the time prohibits switching the functions in a time-multiplexing fashion. – JimmyB Jun 26 '19 at 10:25