Rp1 Peripherals
Rp1 Peripherals
Colophon
Copyright © 2023 Raspberry Pi Ltd
This documentation is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND).
All rights reserved. Used with permission. Synopsys & DesignWare are registered trademarks of Synopsys, Inc.
Portions Copyright © 2000-2001, 2005, 2007, 2009, 2011-2012, 2016 ARM Limited.
build-date: 2023-11-07
build-version: b9b6f74-clean
RPL reserves the right to make any enhancements, improvements, corrections or any other modifications to the
RESOURCES or any products described in them at any time and without further notice.
The RESOURCES are intended for skilled users with suitable levels of design knowledge. Users are solely responsible for
their selection and use of the RESOURCES and any application of the products described in them. User agrees to
indemnify and hold RPL harmless against all liabilities, costs, damages or other losses arising out of their use of the
RESOURCES.
RPL grants users permission to use the RESOURCES solely in conjunction with the Raspberry Pi products. All other use
of the RESOURCES is prohibited. No licence is granted to any other RPL or other third party intellectual property right.
HIGH RISK ACTIVITIES. Raspberry Pi products are not designed, manufactured or intended for use in hazardous
environments requiring fail safe performance, such as in the operation of nuclear facilities, aircraft navigation or
communication systems, air traffic control, weapons systems or safety-critical applications (including life support
systems and other medical devices), in which the failure of the products could lead directly to death, personal injury or
severe physical or environmental damage (“High Risk Activities”). RPL specifically disclaims any express or implied
warranty of fitness for High Risk Activities and accepts no liability for use or inclusions of Raspberry Pi products in High
Risk Activities.
Raspberry Pi products are provided subject to RPL’s Standard Terms. RPL’s provision of the RESOURCES does not
expand or otherwise modify RPL’s Standard Terms including but not limited to the disclaimers and warranties
expressed in them.
Table of contents
Colophon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Legal disclaimer notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. System description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1. Interconnect details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2. Address map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3. Peripheral address map details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1. PCIe and 40-bit to peripheral address mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4. Atomic register access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5. Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5.1. Crystal and PLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5.2. Core Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.3. RGMII clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.4. Audio clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.5. Other Peripheral clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5.6. Clock controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3. Low speed peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1. GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.1. Function select. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.2. Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.3. Pads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.4. Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2. UART. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.1. Register base addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3. RIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3.1. Latency considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.3.2. Register base addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.4. PWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.2. Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.3. Principle of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.4. Output modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.4.5. List of registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.5. I2C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.5.1. Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.5.2. Register base addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.6. SPI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.6.1. Instance configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.6.2. Register base addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.7. I2S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.7.1. Instance configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.7.2. Register base addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.8. TICKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.8.1. List of registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4. SDIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.1. Configuration and feature set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.2. Supported speed modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3. Register base addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5. USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.1. Register base addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6. PCI Express endpoint controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.1. PCIe endpoint configuration registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.2. MSIx configuration registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7. Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.1. Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Table of contents 2
Raspberry Pi RP1 Peripherals
Table of contents 3
Raspberry Pi RP1 Peripherals
Chapter 1. Introduction
RP1 is a peripheral controller, designed by Raspberry Pi for use on Raspberry Pi 5. It connects to an application
processor (AP) via a PCIe 2.0 x4 bus, and aggregates many digital controllers and analog PHYs for Raspberry Pi 5’s
external interfaces. In the case of Raspberry Pi 5, the AP is the 16nm Broadcom BCM2712.
Figure 1. Raspberry Pi
RP1 Southbridge
Raspberry Pi single-board computers, with the exception of Raspberry Pi Zero, have historically adopted a two-chip
architecture. The chipset comprises an AP, which provides the core high-speed digital functionality and a subset of the
platform interfaces; and a peripheral controller, which provides any additional required interfaces.
In the case of Raspberry Pi 1, 1+, 2, 3 and 3+, the peripheral controller provides Ethernet and downstream USB 2.0 ports,
and is connected to the AP via USB 2.0. In the case of Raspberry Pi 4, it provides downstream USB 3.0 and USB 2.0
ports, and is connected to the AP via PCI Express.
• USB. Two independent XHCI controllers are each connected to a single USB 3.0 PHY, and a single USB 2.0 PHY.
Together, they support more than 10Gbps of downstream USB traffic.
• MIPI camera and display. Two MIPI CSI-2 camera controllers, and two MIPI DSI display controllers, are connected
to two shared 4-lane MIPI DPHY transceiver PHYs. Together, they support 8Gbps of downstream traffic, to two
cameras, two displays, or one camera and one display. Each camera controller incorporates an image signal
processor front-end (ISP-FE) which pre-processes incoming image data.
• Gigabit Ethernet. An integrated media access controller (MAC) drives an external Gigabit PHY over an RGMII bus.
• General-purpose I/O (GPIO). Twenty-eight GPIO pins are provided, to implement the standard Raspberry Pi 40-pin
GPIO connector.
• Low-speed peripherals. GPIO alternate functions are provided that have compatibility with the feature set offered
on Raspberry Pi 4 Model B.
The internal fabric allows prioritisation of real-time camera and display traffic over non-real-time USB and Ethernet
traffic. QoS signalling over the PCI Express link supports dynamic prioritisation between traffic from RP1, and traffic
from real-time and non-real-time bus masters within the AP.
Chapter 1. Introduction 4
Raspberry Pi RP1 Peripherals
• ADC. A five-input successive-approximation analogue-to-digital converter with 12-bit (ENOB of 9.5-bit) resolution at
500kSPS. 4 external inputs, one internal temperature sensor
• Shared SRAM. 64kB of general-purpose RAM that the AP or RP1 bus masters can access.
• Timebase generators. Configurable 'ticks' for pacing DMA, or for debouncing GPIO events.
Moving the bulk of the platform interfaces to RP1 simplifies the design and reduces the cost of the AP, and makes it
easier to migrate to newer, more advanced process nodes.
Chapter 1. Introduction 5
Raspberry Pi RP1 Peripherals
Figure 2. System
diagram of RP1.
Primary connectivity to the AP is via a PCIe 2.0 X4 bus. The PCIe Endpoint (EP) controller connects to the AXI busfabric
as a bus master and a bus slave, providing access from the AP to RP1, and from RP1 to AP host memory.
A local dual-core ARM Cortex M3 processor cluster is used to perform platform configuration and management. The
processor cluster has access to both peripheral registers and a steerable window into AP host memory. The cluster
also has per core local tightly-coupled memories and a shared boot ROM.
All bus masters can access the shared SRAM, and the PCIe slave port (to access host memory on the AP). The PCIe EP
and local processors can also access peripheral control and configuration registers.
• Certain bus masters are AXI4 compliant. For these master ports there are integrated shims that perform
transparent AXI4 to AXI3 protocol conversion.
• SDIO0 uses a 64-bit data bus, so generate TLPs that are up to half the Maximum Packet Size.
• Bus masters typically have implementation-specific means of limiting the type and length of burst traffic that they
can produce, independently of the endpoint configuration.
• There are no PCIe data link-layer semantics that allow for interpretation of WRAP or FIXED type AXI transactions,
therefore all upstream transactions of this type are decomposed, and there is no assembly of back-to-back
downstream reads or writes to the same address into a FIXED transaction.
Behaviour of the various bus masters can be monitored or constrained by shims instantiated on each bus master port -
these shims allow for throttling based on number of pending transactions, ensuring AXI and PCIe address boundary
requirements are met, and have statistics counters for Quality-of-Service or performance measurement.
NOTE
The processors have a 32-bit address view whereas the PCIe Host and other bus masters have a 40-bit address
view.
NOTE
Ports prefixed with Proc are accessible only to the management processor complex. Bus masters other than the
DMA controller cannot access peripheral registers, but can access shared SRAM.
The AP accesses Peripherals and Shared SRAM over PCIe as offsets from the assigned base addresses in BAR1 and
BAR2 respectively.
Table 2. Peripheral
Block Bus Type Atomic Access Address
Address Map
The read alias at 0x1000 will return normal read data but will not advance the state of any RF/RWF registers. This allows
debug access to peek at the next word in a FIFO interface.
2.5. Clocks
The reference clock is a 50MHz crystal input. The frequency is selected to meet PHY requirements for USB, Ethernet,
PCIe, and MIPI DPHY.
• PCIe
• USB3
• USB2
• DSI
Internal clocks are generated from clock dividers using a selectable clock source.
Figure 3. Clock
diagram
2.5. Clocks 12
Raspberry Pi RP1 Peripherals
SPI master interfaces are clocked from clk_sys, but the SPI slave interface has the TX shift register directly clocked from
the GPIO SCLK input pad. I2C interfaces are also clocked from clk_sys. Both SPI and I2C have internal divisors that
control the interface data rate.
There are two PWM controllers with outputs driven from an independent clock (clk_pwm) for an up-to 150MHz reference
clock.
Table 3. Peripheral
Block Bus Type Atomic Access Address
Address Map
For a reference implementation see the RP1 Clocks Linux kernel driver.
2.5. Clocks 13
Raspberry Pi RP1 Peripherals
3.1. GPIO
RP1 has 28 multi-functional General-Purpose Input/Output pins available to implement the standard Raspberry Pi 40-pin
GPIO connector.
The pins are in a single electrical bank (VDDIO0). The GPIO bank (IO_BANK0) can be powered from 1.8V or 3.3V, but
interface timings have been specified at 3.3V. Each pin can be controlled directly by software, or by a number of other
functional blocks.
• 5 × UART
• 6 × SPI
• 4 × I2C
• 2 × I2S - 1× Clock Producer instance, 1× Clock Consumer instance.
• RIO - Registered IO interface
• 24-bit DPI output
• 4-channel PWM output
• AUDIO_OUT - Stereo PWM audio output
• GPCLK - General-purpose clock input and output
• eMMC/SDIO bus with a 4-bit interface
• Interrupt generation from pin level or edge transitions
The functional blocks and their locations on the GPIO pins have been chosen to match user-facing functions on the 40-
pin header of a Raspberry Pi 4 Model B.
For a detailed description of each of the functions, refer to the datasheet sections linked above.
NOTE
3.1. GPIO 14
15
Table 4. GPIO function
Function
selection
GPIO a0 a1 a2 a3 a4 a5 a6 a7 a8
3.1. GPIO
21 SPI1_SCLK DPI_D[17] I2S0_SDO[0] GPCLK[1] I2S1_SDO[0] SYS_RIO[21] PROC_RIO[21] PIO[21]
16
Function
3.1. GPIO
Raspberry Pi RP1 Peripherals
Each GPIO can have one function selected at a time. Likewise, each peripheral input (e.g. I2C3_SCL) should only be
selected on one GPIO at a time. If the same peripheral input is connected to multiple GPIOs, the peripheral sees the
logical OR of these GPIO inputs.
NOTE
3.1.2. Interrupts
An interrupt can be generated for every GPIO pin in eight scenarios:
The level interrupts are not latched. This means that if the pin is a logical 1 and the level high interrupt is active, it will
become inactive as soon as the pin changes to a logical 0. The edge interrupts are stored in the GPIOn_STATUS register
and cleared by writing 1 to the GPIOn_CTRL.IRQRESET register bit. All interrupt sources are ORed together and
presented in a top-level enable, status, and force registers for three interrupt destinations: Proc 0, Proc 1, and PCIe (host
processor). For PCIE the registers are enable (PCIE_INTE0), status (PCIE_INTS0), and force (PCIE_INTF0).
NOTE
If any level-based interrupts are required, then the interrupt-to-message translation block (see PCIE MSIn_CFG
section) must enable the IACK mechanism to properly sequence software through the Pending, Active, and EOI
states. Interrupts may be missed by the host processor if this feature is not used.
3.1.3. Pads
Each GPIO is connected via a bidirectional CMOS pad, see Figure 4. The GPIOs offer:
• Fault-tolerant operation - very little current flows into the pin whilst it is below 3.63V and IOVDD is 0V
• Output drive strength of 2mA, 4mA, 8mA or 12mA
• Optional input Schmitt trigger hysteresis
• Optional output slew rate limiter
• Integrated pull-up, pull-down, bus-keeper or high-impedance behaviour when the output drive is disabled
• Input buffer disable to reduce current consumption when the pad is unconnected, or connected to an
indeterminate signal level
3.1. GPIO 17
Raspberry Pi RP1 Peripherals
Figure 4. Diagram of a
single IO pad.
Slew Rate
Drive Strength
2
Input Enable
Input Data
Schmitt Trigger
The pad’s Output Enable, Output Data and Input Data ports are connected, via the IO mux, to the function controlling the
pad. These signals can be individually manipulated (forced 1, forced 0, or inverted) by software with the
IO_BANK0_GPIOn_CTRL override register fields. All other ports are controlled from the pad control register. See
PADS_BANK0_GPIO0 for an example.
Both the output signal level and acceptable input signal level at the pad are determined by the bank IO supply (VDDIO0).
VDDIO0 can be any nominal voltage between 1.8V and 3.3V, but to meet specification when powered at 1.8V, the pad
input thresholds must be adjusted by writing a 1 to the PADS_BANK0_VOLTAGE_SELECT register. By default the pad
input thresholds are valid for an VDDIO voltage between 2.5V and 3.3V. Using a voltage of 1.8V with the default input
thresholds is a safe operating mode, though it will result in input thresholds that don’t meet specification.
Using VDDIO voltages greater than 1.8V, with the input thresholds set for 1.8V may result in damage to the chip.
3.1.4. Registers
The base address of the GPIO registers are:
Table 5. Peripheral
Block Bus Type Atomic Access Address
Address Map
For a reference implementation see the RP1 GPIO Linux kernel driver.
Table 6. List of
Offset Name Info
IO_BANK0 registers
3.1. GPIO 18
Raspberry Pi RP1 Peripherals
3.1. GPIO 19
Raspberry Pi RP1 Peripherals
0x10c PROC0_INTS Interrupt status after masking & forcing for proc0
0x118 PROC1_INTS Interrupt status after masking & forcing for proc1
0x124 PCIE_INTS Interrupt status after masking & forcing for pcie
Description
GPIO status
Table 7.
Bits Name Description Type Reset
GPIO0_STATUS,
GPIO1_STATUS, …,
31:30 Reserved. - - -
GPIO26_STATUS,
GPIO27_STATUS
29 IRQTOPROC interrupt to processors, after mask and override is applied RO 0x0
Registers
3.1. GPIO 20
Raspberry Pi RP1 Peripherals
25 EVENT_F_EDGE_H Input pin has seen a filtered rising edge. Clear with RO 0x0
IGH ctrl_irqreset
24 EVENT_F_EDGE_L Input pin has seen a filtered falling edge. Clear with RO 0x0
OW ctrl_irqreset
21 EVENT_EDGE_HIG Input pin has seen rising edge. Clear with ctrl_irqreset RO 0x0
H
20 EVENT_EDGE_LO Input pin has seen falling edge. Clear with ctrl_irqreset RO 0x0
W
19 INTOPERI input signal to peripheral, after filtering and override are RO 0x0
applied, not valid if inisdirect=1
18 INFILTERED input signal from pad, after filtering is applied but before RO 0x0
override, not valid if inisdirect=1
17 INFROMPAD input signal from pad, before filtering and override are RO 0x0
applied
16 INISDIRECT input signal from pad, goes directly to the selected RO 0x0
peripheral without filtering or override
15:14 Reserved. - - -
11:10 Reserved. - - -
7:0 Reserved. - - -
Description
GPIO control including function select and overrides.
Table 8. GPIO0_CTRL,
Bits Name Description Type Reset
GPIO1_CTRL, …,
GPIO26_CTRL,
31:30 IRQOVER 0x0 → don’t invert the interrupt RW 0x0
GPIO27_CTRL
Registers 0x1 → invert the interrupt
0x2 → drive interrupt low
0x3 → drive interrupt high
29 Reserved. - - -
3.1. GPIO 21
Raspberry Pi RP1 Peripherals
27 IRQMASK_DB_LE Masks the debounced level high interrupt into the interrupt RW 0x0
VEL_HIGH output
26 IRQMASK_DB_LE Masks the debounced level low interrupt into the interrupt RW 0x0
VEL_LOW output
25 IRQMASK_F_EDG Masks the filtered edge high interrupt into the interrupt RW 0x0
E_HIGH output
24 IRQMASK_F_EDG Masks the filtered edge low interrupt into the interrupt RW 0x0
E_LOW output
23 IRQMASK_LEVEL_ Masks the level high interrupt into the interrupt output RW 0x0
HIGH
22 IRQMASK_LEVEL_ Masks the level low interrupt into the interrupt output RW 0x0
LOW
21 IRQMASK_EDGE_ Masks the edge high interrupt into the interrupt output RW 0x0
HIGH
20 IRQMASK_EDGE_ Masks the edge low interrupt into the interrupt output RW 0x0
LOW
19:18 Reserved. - - -
15:14 OEOVER 0x0 → drive output enable from peripheral signal selected RW 0x0
by funcsel
0x1 → drive output enable from inverse of peripheral
signal selected by funcsel
0x2 → disable output
0x3 → enable output
13:12 OUTOVER 0x0 → drive output from peripheral signal selected by RW 0x0
funcsel
0x1 → drive output from inverse of peripheral signal
selected by funcsel
0x2 → drive output low
0x3 → drive output high
4:0 FUNCSEL Function select. 31 == NULL. See GPIO function table for RW 0x1f
available functions.
Description
Raw Interrupts
3.1. GPIO 22
Raspberry Pi RP1 Peripherals
31:28 Reserved. - - -
27 GPIO27 RO 0x0
26 GPIO26 RO 0x0
25 GPIO25 RO 0x0
24 GPIO24 RO 0x0
23 GPIO23 RO 0x0
22 GPIO22 RO 0x0
21 GPIO21 RO 0x0
20 GPIO20 RO 0x0
19 GPIO19 RO 0x0
18 GPIO18 RO 0x0
17 GPIO17 RO 0x0
16 GPIO16 RO 0x0
15 GPIO15 RO 0x0
14 GPIO14 RO 0x0
13 GPIO13 RO 0x0
12 GPIO12 RO 0x0
11 GPIO11 RO 0x0
10 GPIO10 RO 0x0
9 GPIO9 RO 0x0
8 GPIO8 RO 0x0
7 GPIO7 RO 0x0
6 GPIO6 RO 0x0
5 GPIO5 RO 0x0
4 GPIO4 RO 0x0
3 GPIO3 RO 0x0
2 GPIO2 RO 0x0
1 GPIO1 RO 0x0
0 GPIO0 RO 0x0
Description
Interrupt Enable for proc0
31:28 Reserved. - - -
3.1. GPIO 23
Raspberry Pi RP1 Peripherals
27 GPIO27 RW 0x0
26 GPIO26 RW 0x0
25 GPIO25 RW 0x0
24 GPIO24 RW 0x0
23 GPIO23 RW 0x0
22 GPIO22 RW 0x0
21 GPIO21 RW 0x0
20 GPIO20 RW 0x0
19 GPIO19 RW 0x0
18 GPIO18 RW 0x0
17 GPIO17 RW 0x0
16 GPIO16 RW 0x0
15 GPIO15 RW 0x0
14 GPIO14 RW 0x0
13 GPIO13 RW 0x0
12 GPIO12 RW 0x0
11 GPIO11 RW 0x0
10 GPIO10 RW 0x0
9 GPIO9 RW 0x0
8 GPIO8 RW 0x0
7 GPIO7 RW 0x0
6 GPIO6 RW 0x0
5 GPIO5 RW 0x0
4 GPIO4 RW 0x0
3 GPIO3 RW 0x0
2 GPIO2 RW 0x0
1 GPIO1 RW 0x0
0 GPIO0 RW 0x0
Description
Interrupt Force for proc0
31:28 Reserved. - - -
27 GPIO27 RW 0x0
3.1. GPIO 24
Raspberry Pi RP1 Peripherals
26 GPIO26 RW 0x0
25 GPIO25 RW 0x0
24 GPIO24 RW 0x0
23 GPIO23 RW 0x0
22 GPIO22 RW 0x0
21 GPIO21 RW 0x0
20 GPIO20 RW 0x0
19 GPIO19 RW 0x0
18 GPIO18 RW 0x0
17 GPIO17 RW 0x0
16 GPIO16 RW 0x0
15 GPIO15 RW 0x0
14 GPIO14 RW 0x0
13 GPIO13 RW 0x0
12 GPIO12 RW 0x0
11 GPIO11 RW 0x0
10 GPIO10 RW 0x0
9 GPIO9 RW 0x0
8 GPIO8 RW 0x0
7 GPIO7 RW 0x0
6 GPIO6 RW 0x0
5 GPIO5 RW 0x0
4 GPIO4 RW 0x0
3 GPIO3 RW 0x0
2 GPIO2 RW 0x0
1 GPIO1 RW 0x0
0 GPIO0 RW 0x0
Description
Interrupt status after masking & forcing for proc0
31:28 Reserved. - - -
27 GPIO27 RO 0x0
26 GPIO26 RO 0x0
3.1. GPIO 25
Raspberry Pi RP1 Peripherals
25 GPIO25 RO 0x0
24 GPIO24 RO 0x0
23 GPIO23 RO 0x0
22 GPIO22 RO 0x0
21 GPIO21 RO 0x0
20 GPIO20 RO 0x0
19 GPIO19 RO 0x0
18 GPIO18 RO 0x0
17 GPIO17 RO 0x0
16 GPIO16 RO 0x0
15 GPIO15 RO 0x0
14 GPIO14 RO 0x0
13 GPIO13 RO 0x0
12 GPIO12 RO 0x0
11 GPIO11 RO 0x0
10 GPIO10 RO 0x0
9 GPIO9 RO 0x0
8 GPIO8 RO 0x0
7 GPIO7 RO 0x0
6 GPIO6 RO 0x0
5 GPIO5 RO 0x0
4 GPIO4 RO 0x0
3 GPIO3 RO 0x0
2 GPIO2 RO 0x0
1 GPIO1 RO 0x0
0 GPIO0 RO 0x0
Description
Interrupt Enable for proc1
31:28 Reserved. - - -
27 GPIO27 RW 0x0
26 GPIO26 RW 0x0
25 GPIO25 RW 0x0
3.1. GPIO 26
Raspberry Pi RP1 Peripherals
24 GPIO24 RW 0x0
23 GPIO23 RW 0x0
22 GPIO22 RW 0x0
21 GPIO21 RW 0x0
20 GPIO20 RW 0x0
19 GPIO19 RW 0x0
18 GPIO18 RW 0x0
17 GPIO17 RW 0x0
16 GPIO16 RW 0x0
15 GPIO15 RW 0x0
14 GPIO14 RW 0x0
13 GPIO13 RW 0x0
12 GPIO12 RW 0x0
11 GPIO11 RW 0x0
10 GPIO10 RW 0x0
9 GPIO9 RW 0x0
8 GPIO8 RW 0x0
7 GPIO7 RW 0x0
6 GPIO6 RW 0x0
5 GPIO5 RW 0x0
4 GPIO4 RW 0x0
3 GPIO3 RW 0x0
2 GPIO2 RW 0x0
1 GPIO1 RW 0x0
0 GPIO0 RW 0x0
Description
Interrupt Force for proc1
31:28 Reserved. - - -
27 GPIO27 RW 0x0
26 GPIO26 RW 0x0
25 GPIO25 RW 0x0
24 GPIO24 RW 0x0
3.1. GPIO 27
Raspberry Pi RP1 Peripherals
23 GPIO23 RW 0x0
22 GPIO22 RW 0x0
21 GPIO21 RW 0x0
20 GPIO20 RW 0x0
19 GPIO19 RW 0x0
18 GPIO18 RW 0x0
17 GPIO17 RW 0x0
16 GPIO16 RW 0x0
15 GPIO15 RW 0x0
14 GPIO14 RW 0x0
13 GPIO13 RW 0x0
12 GPIO12 RW 0x0
11 GPIO11 RW 0x0
10 GPIO10 RW 0x0
9 GPIO9 RW 0x0
8 GPIO8 RW 0x0
7 GPIO7 RW 0x0
6 GPIO6 RW 0x0
5 GPIO5 RW 0x0
4 GPIO4 RW 0x0
3 GPIO3 RW 0x0
2 GPIO2 RW 0x0
1 GPIO1 RW 0x0
0 GPIO0 RW 0x0
Description
Interrupt status after masking & forcing for proc1
31:28 Reserved. - - -
27 GPIO27 RO 0x0
26 GPIO26 RO 0x0
25 GPIO25 RO 0x0
24 GPIO24 RO 0x0
23 GPIO23 RO 0x0
3.1. GPIO 28
Raspberry Pi RP1 Peripherals
22 GPIO22 RO 0x0
21 GPIO21 RO 0x0
20 GPIO20 RO 0x0
19 GPIO19 RO 0x0
18 GPIO18 RO 0x0
17 GPIO17 RO 0x0
16 GPIO16 RO 0x0
15 GPIO15 RO 0x0
14 GPIO14 RO 0x0
13 GPIO13 RO 0x0
12 GPIO12 RO 0x0
11 GPIO11 RO 0x0
10 GPIO10 RO 0x0
9 GPIO9 RO 0x0
8 GPIO8 RO 0x0
7 GPIO7 RO 0x0
6 GPIO6 RO 0x0
5 GPIO5 RO 0x0
4 GPIO4 RO 0x0
3 GPIO3 RO 0x0
2 GPIO2 RO 0x0
1 GPIO1 RO 0x0
0 GPIO0 RO 0x0
Description
Interrupt Enable for pcie
31:28 Reserved. - - -
27 GPIO27 RW 0x0
26 GPIO26 RW 0x0
25 GPIO25 RW 0x0
24 GPIO24 RW 0x0
23 GPIO23 RW 0x0
22 GPIO22 RW 0x0
3.1. GPIO 29
Raspberry Pi RP1 Peripherals
21 GPIO21 RW 0x0
20 GPIO20 RW 0x0
19 GPIO19 RW 0x0
18 GPIO18 RW 0x0
17 GPIO17 RW 0x0
16 GPIO16 RW 0x0
15 GPIO15 RW 0x0
14 GPIO14 RW 0x0
13 GPIO13 RW 0x0
12 GPIO12 RW 0x0
11 GPIO11 RW 0x0
10 GPIO10 RW 0x0
9 GPIO9 RW 0x0
8 GPIO8 RW 0x0
7 GPIO7 RW 0x0
6 GPIO6 RW 0x0
5 GPIO5 RW 0x0
4 GPIO4 RW 0x0
3 GPIO3 RW 0x0
2 GPIO2 RW 0x0
1 GPIO1 RW 0x0
0 GPIO0 RW 0x0
Description
Interrupt Force for pcie
31:28 Reserved. - - -
27 GPIO27 RW 0x0
26 GPIO26 RW 0x0
25 GPIO25 RW 0x0
24 GPIO24 RW 0x0
23 GPIO23 RW 0x0
22 GPIO22 RW 0x0
21 GPIO21 RW 0x0
3.1. GPIO 30
Raspberry Pi RP1 Peripherals
20 GPIO20 RW 0x0
19 GPIO19 RW 0x0
18 GPIO18 RW 0x0
17 GPIO17 RW 0x0
16 GPIO16 RW 0x0
15 GPIO15 RW 0x0
14 GPIO14 RW 0x0
13 GPIO13 RW 0x0
12 GPIO12 RW 0x0
11 GPIO11 RW 0x0
10 GPIO10 RW 0x0
9 GPIO9 RW 0x0
8 GPIO8 RW 0x0
7 GPIO7 RW 0x0
6 GPIO6 RW 0x0
5 GPIO5 RW 0x0
4 GPIO4 RW 0x0
3 GPIO3 RW 0x0
2 GPIO2 RW 0x0
1 GPIO1 RW 0x0
0 GPIO0 RW 0x0
Description
Interrupt status after masking & forcing for pcie
31:28 Reserved. - - -
27 GPIO27 RO 0x0
26 GPIO26 RO 0x0
25 GPIO25 RO 0x0
24 GPIO24 RO 0x0
23 GPIO23 RO 0x0
22 GPIO22 RO 0x0
21 GPIO21 RO 0x0
20 GPIO20 RO 0x0
3.1. GPIO 31
Raspberry Pi RP1 Peripherals
19 GPIO19 RO 0x0
18 GPIO18 RO 0x0
17 GPIO17 RO 0x0
16 GPIO16 RO 0x0
15 GPIO15 RO 0x0
14 GPIO14 RO 0x0
13 GPIO13 RO 0x0
12 GPIO12 RO 0x0
11 GPIO11 RO 0x0
10 GPIO10 RO 0x0
9 GPIO9 RO 0x0
8 GPIO8 RO 0x0
7 GPIO7 RO 0x0
6 GPIO6 RO 0x0
5 GPIO5 RO 0x0
4 GPIO4 RO 0x0
3 GPIO3 RO 0x0
2 GPIO2 RO 0x0
1 GPIO1 RO 0x0
0 GPIO0 RO 0x0
3.1. GPIO 32
Raspberry Pi RP1 Peripherals
Table 20.
Bits Description Type Reset
VOLTAGE_SELECT
Register
31:1 Reserved. - -
Description
Pad control register
3.1. GPIO 33
Raspberry Pi RP1 Peripherals
3.2. UART
RP1 has six instances of a UART peripheral, five of which are available on GPIO bank 0, based on the ARM Primecell
UART (PL011) (Revision r1p5).
3.3. RIO
The Registered IO (RIO) interface allows the host processor to manipulate GPIOs. There are four registers:
3.2. UART 34
Raspberry Pi RP1 Peripherals
committed.
PCIe reads consist of a request and a response, therefore incur at least double the link latency. To avoid round-tripping
twice in a poll-type loop, it is recommended to insert a write barrier after the last write that toggles a pin, then issue the
read. This ensures that a write has sufficient time to change the actual output state of the pin, and a read will sample
the point after the state change.
NOTE
Other bus master read activity to peripherals sharing the same APB splitter as RIO0, namely the ADC, may affect the
speed at which RIO operations happen. Avoid polling the ADC’s status register and instead use DMA or FIFO-based
operation if simultaneous use of both is required.
Writes across PCIe are naturally pipelined, as they are all Posted transactions. Pipelining writes using stores without
memory barriers and using CPU-local busy-wait loops to space them will largely hide the effect of latency, but
precautions should be taken to avoid reordering of processor store instructions through an architecture-specific
mechanism, e.g. MMU page flags. For AARCH64, the recommended mapping is Device_nGnRE.
If PCIe ASPM is enabled, then the respective L0s or bidirectional L1 wake latency will be added to the first read or write
to be presented to the Root Complex. This will add delays of approximately 2μs for an L0s wake and 5μs for an L1
wake. If infrequent access is likely, for example if the delay inside a GPIO polling loop is 10-100μs, then disable ASPM to
keep the link in L0.
For a reference implementation see the RP1 GPIO Linux kernel driver.
3.4. PWM
3.4. PWM 35
Raspberry Pi RP1 Peripherals
3.4.1. Overview
The PWM peripheral is a flexible waveform generator with a variety of operational modes. RP1 has two instances of the
PWM peripheral, one of which is available on GPIO bank 0.
3.4.2. Features
• Four independent output channels with separate duty-cycle and range registers
• 32-bit counter widths
• Seven output generation modes
• Optional per-channel output inversion
• Channels can be selectively bound to a common range register for synchronous operation
• Optional duty-cycle data FIFO with DMA support
• Channels can be selectively bound to the FIFO output and fed duty-cycle data in round-robin sequence
• Optional sigma-delta noise shaping engine with integral dither to support high-precision DC outputs
The duty-cycle value presented to the PWM channel can optionally pass through a sigma-delta noise-shaping engine.
This treats input duty-cycle values as 16-bit signed numbers and quantises them to a smaller width. It then filters the
resulting quantisation error with a second-order loop that significantly reduces the noise power at low frequencies, at
the expense of more noise at higher frequencies. The noise-shaping engine has optional in-loop dither to suppress idle
tones, and a configurable static bias that can convert input signed quantities to unsigned output quantities. The noise-
shaping algorithm advances on each assertion of the duty-cycle strobe from the respective PWM channel.
The source of a channel’s duty-cycle is selectable between a common FIFO interface or a register. The DUTY register can
be freely updated by host software, the value is synchronised and latched on strobe assertion.
The asynchronous FIFO has a single 32-bit input port and selectable output striping. The FIFO input is striped according
to the channels that are enabled and using the FIFO. Data written to the DUTY_FIFO register is forwarded round-robin to
each channel’s FIFO segment. The FIFO’s pop signal is asserted based on a logical OR of a masked version of each
individual channel’s pop signal - see the CHANx_CTRL.FIFO_POP_MASK and CHANx_CTRL.BIND registers.
The FIFO has a DMA handshake connection that allows the DMAC to pump data into FIFO_DUTY.
The block has an overall settings update register that can synchronously enable, disable, start and stop channels
glitchlessly. A top-level interrupt is provided that can trigger on FIFO state, DMA request assertion, or each channel’s
overflow strobe.
The PWM circuitry is clocked from clk_pwm, and the register interface is clocked from clk_sys.
3.4. PWM 36
Raspberry Pi RP1 Peripherals
3.4.4.1. PWM_MODE_TRAILING_EDGE
The internal count starts at 0, and increments on each cycle until it reaches RANGE. It then reloads at 0 and signals an
overflow. The output is 1 when the internal count is less than the DUTY input and 0 when the internal count is greater than
or equal to the DUTY input.
3.4.4.2. PWM_MODE_LEADING_EDGE
The internal count starts at RANGE, and decrements on each cycle until it reaches 0. It then reloads at RANGE and signals an
overflow. The output is 1 when the internal count is less than the DUTY input and 0 when the internal count is greater than
or equal to the DUTY input. This produces the inverse of the PWM_MODE_TRAILING_EDGE waveform.
3.4.4.3. PWM_MODE_DOUBLE_EDGE
The internal counter starts at RANGE, and decrements on each cycle until it reaches 0. It then starts incrementing each
cycle until it reaches RANGE and signals an overflow. The output is 1 when the internal count is less than the DUTY input
and 0 when the internal count is greater than or equal to the DUTY input. This mode produces a centre-aligned (also
known as phase-correct) pulse.
3.4.4.4. PWM_MODE_PDM
The internal counter starts at 0 and increments on each cycle until it reaches RANGE. It then reloads at 0 and signals an
overflow. The output is produced by a comparison operating on the output of an error accumulator, which is initialised
to 0 and updated as follows:
This produces a pulse-density output train whose proportion of 1 bits is equal to the ratio between DUTY and RANGE.
3.4.4.5. PWM_MODE_PPM
The internal counter starts at 0 and increments on each cycle until it reaches RANGE. It then reloads at 0 and signals an
overflow. When the internal count is equal to DUTY the output is 1, and is 0 otherwise. This generates pulse-position
modulation.
3.4.4.6. PWM_MODE_SERIALISER_MSB
The internal counter starts at 0 and increments on each cycle until it reaches RANGE. It then reloads at 0 and signals an
overflow. The DUTY input is treated as a shift register. The selected bit in DUTY is 31 - (COUNT % 32).
3.4. PWM 37
Raspberry Pi RP1 Peripherals
3.4.4.7. PWM_MODE_SERIALISER_LSB
The internal counter starts at 0 and increments on each cycle until it reaches RANGE. It then reloads at 0 and signals an
overflow. The DUTY input is treated as a shift register. The selected bit in DUTY is COUNT % 32.
For a reference implementation see the RP1 PWM Linux kernel driver.
0x08 COMMON_RANGE
0x0c COMMON_DUTY
0x10 DUTY_FIFO
0x18 CHAN0_RANGE
0x1c CHAN0_PHASE
0x20 CHAN0_DUTY
0x28 CHAN1_RANGE
0x2c CHAN1_PHASE
0x30 CHAN1_DUTY
0x38 CHAN2_RANGE
0x3c CHAN2_PHASE
0x40 CHAN2_DUTY
0x48 CHAN3_RANGE
0x4c CHAN3_PHASE
0x50 CHAN3_DUTY
3.4. PWM 38
Raspberry Pi RP1 Peripherals
Description
Global control bits
Table 26.
Bits Name Description Type Reset
GLOBAL_CTRL
Register
31 SET_UPDATE To prevent mis-sampling of multi-bit bus signals in the SC 0x0
PWM clock domain,
this bit should be used to trigger a settings update. This
ensures that
all PWM channel settings update on the same PWM clock
cycle.
Write 1 to trigger a settings update to the block. Self
clears to 0.
This bit affects the chan*_en bits, chan*_phase, chan*_ctrl
and common_range registers.
Writes to the *_duty and *_range registers have an integral
update strobe and writes take effect on
the next counter overflow of the respective PWM channel.
30:4 Reserved. - - -
3 CHAN3_EN RW 0x0
2 CHAN2_EN RW 0x0
1 CHAN1_EN RW 0x0
0 CHAN0_EN 1 - Enable the respective PWM channel in the mode set by RW 0x0
the chanN_ctrl registers
0 - Channel disabled
Description
FIFO thresholding and status
30:21 Reserved. - - -
20:16 DWELL_TIME Delay in number of bus cycles before successive DREQs RW 0x02
are generated.
Used to account for system bus latency in write data
arriving at the FIFO.
15:11 THRESHOLD Threshold for the comparator. DREQ is asserted when RW 0x00
level <= threshold.
10:7 Reserved. - - -
3.4. PWM 39
Raspberry Pi RP1 Peripherals
Table 28.
Bits Description Type Reset
COMMON_RANGE
Register
31:0 Counter range register for channels that are set to use channel binding RW 0x00000000
Table 29.
Bits Description Type Reset
COMMON_DUTY
Register
31:0 Counter compare register for channels that are set to use channel binding RW 0x00000000
and are not set to use the common FIFO
Description
Channel 0 control register
Table 31.
Bits Name Description Type Reset
CHAN0_CTRL Register
31:16 SDM_BIAS Unsigned offset to be added to the output PWM code RW 0x0000
generated by the sigma-delta modulator.
11:9 Reserved. - - -
7 DITHER 1 - When SDM mode is used, add a 1-bit LSB dither inside RW 0x0
the noise shaping loop
to suppress idle tones
0 - No dither applied
3.4. PWM 40
Raspberry Pi RP1 Peripherals
5 USEFIFO 1 - Use the duty_fifo. Note: setting bind=0 and usefifo=1 RW 0x0
will lead to
unpredictable operation
0 - Use the duty cycle register common_duty/chan0_duty
Table 32.
Bits Description Type Reset
CHAN0_RANGE
Register
31:0 Channel 0 counter range RW 0x00000000
Table 33.
Bits Description Type Reset
CHAN0_PHASE
Register
31:0 Channel 0 counter phase offset register RW 0x00000000
This register preloads the internal counter such that phase offsets between
channels can be introduced. Do not set higher than the respective range
register.
3.4. PWM 41
Raspberry Pi RP1 Peripherals
Table 34.
Bits Description Type Reset
CHAN0_DUTY Register
Description
Channel 1 control register
Table 35.
Bits Name Description Type Reset
CHAN1_CTRL Register
31:16 SDM_BIAS Unsigned offset to be added to the output PWM code RW 0x0000
generated by the sigma-delta modulator.
11:9 Reserved. - - -
7 DITHER 1 - When SDM mode is used, add a 1-bit LSB dither inside RW 0x0
the noise shaping loop
to suppress idle tones
0 - No dither applied
5 USEFIFO 1 - Use the duty_fifo. Note: setting bind=0 and usefifo=1 RW 0x0
will lead to
unpredictable operation
0 - Use the duty cycle register common_duty/chan1_duty
3.4. PWM 42
Raspberry Pi RP1 Peripherals
Offset: 0x28
Table 36.
Bits Description Type Reset
CHAN1_RANGE
Register
31:0 Channel 1 counter range RW 0x00000000
Table 37.
Bits Description Type Reset
CHAN1_PHASE
Register
31:0 Channel 1 counter phase offset register RW 0x00000000
This register preloads the internal counter such that phase offsets between
channels can be introduced. Do not set higher than the respective range
register.
Table 38.
Bits Description Type Reset
CHAN1_DUTY Register
Description
Channel 2 control register
Table 39.
Bits Name Description Type Reset
CHAN2_CTRL Register
31:16 SDM_BIAS Unsigned offset to be added to the output PWM code RW 0x0000
generated by the sigma-delta modulator.
11:9 Reserved. - - -
7 DITHER 1 - When SDM mode is used, add a 1-bit LSB dither inside RW 0x0
the noise shaping loop
to suppress idle tones
0 - No dither applied
3.4. PWM 43
Raspberry Pi RP1 Peripherals
5 USEFIFO 1 - Use the duty_fifo. Note: setting bind=0 and usefifo=1 RW 0x0
will lead to
unpredictable operation
0 - Use the duty cycle register common_duty/chan2_duty
Table 40.
Bits Description Type Reset
CHAN2_RANGE
Register
31:0 Channel 2 counter range RW 0x00000000
Table 41.
Bits Description Type Reset
CHAN2_PHASE
Register
31:0 Channel 2 counter phase offset register RW 0x00000000
This register preloads the internal counter such that phase offsets between
channels can be introduced. Do not set higher than the respective range
register.
Table 42.
Bits Description Type Reset
CHAN2_DUTY Register
Description
Channel 3 control register
Table 43.
CHAN3_CTRL Register
3.4. PWM 44
Raspberry Pi RP1 Peripherals
31:16 SDM_BIAS Unsigned offset to be added to the output PWM code RW 0x0000
generated by the sigma-delta modulator.
11:9 Reserved. - - -
7 DITHER 1 - When SDM mode is used, add a 1-bit LSB dither inside RW 0x0
the noise shaping loop
to suppress idle tones
0 - No dither applied
5 USEFIFO 1 - Use the duty_fifo. Note: setting bind=0 and usefifo=1 RW 0x0
will lead to
unpredictable operation
0 - Use the duty cycle register common_duty/chan3_duty
Table 44.
Bits Description Type Reset
CHAN3_RANGE
Register
31:0 Channel 3 counter range RW 0x00000000
3.4. PWM 45
Raspberry Pi RP1 Peripherals
Table 45.
Bits Description Type Reset
CHAN3_PHASE
Register
31:0 Channel 3 counter phase offset register RW 0x00000000
This register preloads the internal counter such that phase offsets between
channels can be introduced. Do not set higher than the respective range
register.
Table 46.
Bits Description Type Reset
CHAN3_DUTY Register
Description
Raw Interrupts
31:9 Reserved. - - -
8 CHAN3_RELOAD WC 0x0
7 CHAN2_RELOAD WC 0x0
6 CHAN1_RELOAD WC 0x0
5 CHAN0_RELOAD WC 0x0
4 DREQ_ACTIVE RO 0x0
3 FIFO_FULL RO 0x0
2 FIFO_EMPTY RO 0x0
1 FIFO_OVERFLOW WC 0x0
0 FIFO_UNDERFLOW WC 0x0
Description
Interrupt Enable
31:9 Reserved. - - -
8 CHAN3_RELOAD RW 0x0
7 CHAN2_RELOAD RW 0x0
6 CHAN1_RELOAD RW 0x0
5 CHAN0_RELOAD RW 0x0
4 DREQ_ACTIVE RW 0x0
3 FIFO_FULL RW 0x0
3.4. PWM 46
Raspberry Pi RP1 Peripherals
2 FIFO_EMPTY RW 0x0
1 FIFO_OVERFLOW RW 0x0
0 FIFO_UNDERFLOW RW 0x0
Description
Interrupt Force
31:9 Reserved. - - -
8 CHAN3_RELOAD RW 0x0
7 CHAN2_RELOAD RW 0x0
6 CHAN1_RELOAD RW 0x0
5 CHAN0_RELOAD RW 0x0
4 DREQ_ACTIVE RW 0x0
3 FIFO_FULL RW 0x0
2 FIFO_EMPTY RW 0x0
1 FIFO_OVERFLOW RW 0x0
0 FIFO_UNDERFLOW RW 0x0
Description
Interrupt status after masking & forcing
31:9 Reserved. - - -
8 CHAN3_RELOAD RO 0x0
7 CHAN2_RELOAD RO 0x0
6 CHAN1_RELOAD RO 0x0
5 CHAN0_RELOAD RO 0x0
4 DREQ_ACTIVE RO 0x0
3 FIFO_FULL RO 0x0
2 FIFO_EMPTY RO 0x0
1 FIFO_OVERFLOW RO 0x0
0 FIFO_UNDERFLOW RO 0x0
3.4. PWM 47
Raspberry Pi RP1 Peripherals
3.5. I2C
The I2C bus is a two-wire serial interface, consisting of a serial data line SDA and a serial clock SCL. These wires carry
information between the devices connected to the bus. Each device is recognised by a unique address and can operate
as either a transmitter or receiver, depending on the function of the device. Devices can also be considered as masters
or slaves when performing data transfers. A master is a device that initiates a data transfer on the bus and generates
the clock signals to permit that transfer. At that time, any device addressed is considered a slave.
NOTE
The I2C block must be programmed to operate in master or slave mode only. Operating as a master and slave
simultaneously is not supported.
NOTE
3.5.1. Features
Each I2C controller is based on a configuration of the Synopsys DW_apb_i2c (v2.02) IP. The following features are
supported:
3.5. I2C 48
Raspberry Pi RP1 Peripherals
3.5.1.1. Standard
The I2C controller was designed for I2C Bus specification, version 6.0, dated April 2014.
3.5.1.2. Clocking
All clocks in the I2C controller are connected to clk_sys, including ic_clk which is mentioned in later sections. The I2C
clock is generated by dividing down this clock, controlled by registers inside the block.
3.5.1.3. IOs
Each controller must connect its clock SCL and data SDA to one pair of GPIOs. The I2C standard requires that drivers drive
a signal low, or when not driven the signal will be pulled high. This applies to SCL and SDA. The GPIO pads should be
configured for:
• pull-up enable
• slew rate limited
• Schmitt trigger enabled.
3.5. I2C 49
Raspberry Pi RP1 Peripherals
For a reference implementation see the Designware I2C Linux kernel driver.
3.6. SPI
RP1 has nine Synchronous Serial Interface (SSI) controllers, six of which are available on GPIO bank 0. Each SSI
controller is based on a configuration of the Synopsys DW_apb_ssi IP (v4.02a).
SPI0 M 4 Quad
SPI1 M 3 Dual
SPI2 M 2 Dual
SPI3 M 2 Dual
SPI4 S 1 Single
SPI5 M 2 Dual
SPI6 M 3 Dual
SPI7 S 1 Single
SPI8 M 2 Dual
3.6.1.1. IO connections
On master instances:
3.6. SPI 50
Raspberry Pi RP1 Peripherals
For a reference implementation see the Designware SPI/SSI Linux kernel driver.
3.7. I2S
RP1 has three instances of the Synopsys Designware I2S peripheral, revision 1.11a, two of which are available on GPIO
bank 0. Each I2S instance can operate in a bidirectional mode with a configurable number of channel pairs.
• Tx and Rx data FIFOs have been configured for a separate and overall depth of 16
3.7. I2S 51
Raspberry Pi RP1 Peripherals
• Each instance has a single top-level interrupt output for CPU-driven operation
• Maximum audio channel data resolution is 32 bits, i.e. I2S_RX_WORDSIZE_n=32 and I2S_TX_WORDSIZE_n=32
For a reference implementation see the Synopsys I2S Linux kernel driver.
3.8. TICKS
Tick generators are low-frequency timing sources that provide events for several other subsystems.
The ticks are independently controllable and use clk_ref (nominally XOSC frequency) as the clock source. The tick output
is a 9-bit integer division of this clock, and the divisor can be modified at runtime.
TICK_DMA0 and TICK_DMA1 are routed to dummy DREQ generators in the DMA_TICK block to generate paced transfer requests
for DMA. TICK_IOBANK0 provides the timebase for debounce and filtering features of the GPIO interrupt generators.
NOTE
0x04 TIMER_CYCLES
0x08 TIMER_COUNT
0x10 WATCHDOG_CYCLES
0x14 WATCHDOG_COUNT
0x1c PROC_CYCLES
0x20 PROC_COUNT
0x28 DMA0_CYCLES
0x2c DMA0_COUNT
3.8. TICKS 52
Raspberry Pi RP1 Peripherals
0x34 DMA1_CYCLES
0x38 DMA1_COUNT
0x40 IO_BANK0_CYCLES
0x44 IO_BANK0_COUNT
0x4c IO_BANK1_CYCLES
0x50 IO_BANK1_COUNT
0x58 IO_BANK2_CYCLES
0x5c IO_BANK2_COUNT
Description
Controls the tick generator
31:2 Reserved. - - -
Table 56.
Bits Description Type Reset
TIMER_CYCLES
Register
31:9 Reserved. - -
8:0 Total number of clk_tick cycles before the next tick. RW 0x000
Table 57.
Bits Description Type Reset
TIMER_COUNT
Register
31:9 Reserved. - -
8:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
3.8. TICKS 53
Raspberry Pi RP1 Peripherals
Table 58.
Bits Name Description Type Reset
WATCHDOG_CTRL
Register
31:2 Reserved. - - -
Table 59.
Bits Description Type Reset
WATCHDOG_CYCLES
Register
31:9 Reserved. - -
8:0 Total number of clk_tick cycles before the next tick. RW 0x000
Table 60.
Bits Description Type Reset
WATCHDOG_COUNT
Register
31:9 Reserved. - -
8:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
31:2 Reserved. - - -
Table 62.
Bits Description Type Reset
PROC_CYCLES
Register
31:9 Reserved. - -
8:0 Total number of clk_tick cycles before the next tick. RW 0x000
3.8. TICKS 54
Raspberry Pi RP1 Peripherals
Table 63.
Bits Description Type Reset
PROC_COUNT Register
31:9 Reserved. - -
8:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
31:2 Reserved. - - -
Table 65.
Bits Description Type Reset
DMA0_CYCLES
Register
31:9 Reserved. - -
8:0 Total number of clk_tick cycles before the next tick. RW 0x000
Table 66.
Bits Description Type Reset
DMA0_COUNT
Register
31:9 Reserved. - -
8:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
31:2 Reserved. - - -
3.8. TICKS 55
Raspberry Pi RP1 Peripherals
Table 68.
Bits Description Type Reset
DMA1_CYCLES
Register
31:9 Reserved. - -
8:0 Total number of clk_tick cycles before the next tick. RW 0x000
Table 69.
Bits Description Type Reset
DMA1_COUNT
Register
31:9 Reserved. - -
8:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
Table 70.
Bits Name Description Type Reset
IO_BANK0_CTRL
Register
31:2 Reserved. - - -
Table 71.
Bits Description Type Reset
IO_BANK0_CYCLES
Register
31:28 Reserved. - -
27:0 Total number of clk_tick cycles before the next tick. RW 0x0000000
Table 72.
Bits Description Type Reset
IO_BANK0_COUNT
Register
31:28 Reserved. - -
27:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
Table 73.
Bits Name Description Type Reset
IO_BANK1_CTRL
Register
31:2 Reserved. - - -
3.8. TICKS 56
Raspberry Pi RP1 Peripherals
Table 74.
Bits Description Type Reset
IO_BANK1_CYCLES
Register
31:28 Reserved. - -
27:0 Total number of clk_tick cycles before the next tick. RW 0x0000000
Table 75.
Bits Description Type Reset
IO_BANK1_COUNT
Register
31:28 Reserved. - -
27:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
Description
Controls the tick generator
Table 76.
Bits Name Description Type Reset
IO_BANK2_CTRL
Register
31:2 Reserved. - - -
Table 77.
Bits Description Type Reset
IO_BANK2_CYCLES
Register
31:28 Reserved. - -
27:0 Total number of clk_tick cycles before the next tick. RW 0x0000000
3.8. TICKS 57
Raspberry Pi RP1 Peripherals
Table 78.
Bits Description Type Reset
IO_BANK2_COUNT
Register
31:28 Reserved. - -
27:0 Count down timer: the remaining number clk_tick cycles before the next tick is RO -
generated.
3.8.1.1. DMA_TICK
0x4 TICK0_CTRL
0xc TICK1_CTRL
Description
These bits self-clear to 0 if the tick generator is stopped by a dma_finish or abort.
31:2 Reserved. - - -
31:13 Reserved. - - -
12 DREQ Current state of the dreq input (debug only, asserted for 1 RO 0x0
cycle)
11:9 Reserved. - - -
8:4 DWELL Handshake state machine idle dwell period in bus-clk RW 0x00
cycles
3:2 Reserved. - - -
3.8. TICKS 58
Raspberry Pi RP1 Peripherals
1 DISABLE Write-1 to the SET alias to force-disable the handshake - SAC 0x0
NB: will race with any DMAC activity. Use with caution.
0 FINISH_CLEAR 1 - clear the enable and single registers when the DMAC RW 0x0
asserts dma_finish
Description
These bits self-clear to 0 if the tick generator is stopped by a dma_finish or abort.
31:2 Reserved. - - -
31:13 Reserved. - - -
12 DREQ Current state of the dreq input (debug only, asserted for 1 RO 0x0
cycle)
11:9 Reserved. - - -
8:4 DWELL Handshake state machine idle dwell period in bus-clk RW 0x00
cycles
3:2 Reserved. - - -
1 DISABLE Write-1 to the SET alias to force-disable the handshake - SAC 0x0
NB: will race with any DMAC activity. Use with caution.
0 FINISH_CLEAR 1 - clear the enable and single registers when the DMAC RW 0x0
asserts dma_finish
3.8. TICKS 59
Raspberry Pi RP1 Peripherals
Chapter 4. SDIO
The SDIO controller is a Synopsys MSHC peripheral v1.70a. There are two separate, identical instances which each
support SDIO v4.2 and eMMC v5.1. One instance is available on GPIO bank 0.
The peripheral is compliant with the SD Host Controller specification v4.20. Users should refer to the SD Association’s
Physical Specification and Host Controller Specification for the programmer’s model.
• Command queueing
• Dedicated card-detect pin
• UHS-II interface
• eMMC Boot Protocol
Tuning support is provided by a custom DLL IP that uses the VCO output from PLL_SYS at 1GHz to provide 10 or 20
clock phases. The 16-way phase select from the controller tuning engine is mapped on to the available phases by a
linear compression or expansion, depending on the selected mode.
NOTE
The eMMC standard specifies 52MHz maximum for high-speed modes, but the controller has a maximum frequency
of 50MHz.
NOTE
The SDIO clock generator can be configured to output higher card clocks, but operation in a pseudo-SDR104 mode is
not guaranteed.
Chapter 5. USB
The USB Host subsystem is based on Synopsys IP dwc_usb3, v3.30b. There are two identical USB3.0 xHCI Host
Controllers conforming to the Extensible Host Controller Interface Specification v1.2. Each controller has two
downstream ports, implemented with one USB2.0 PHY and one USB3.0 PHY. The USB 3.0 ports are backward-
compatible with USB 2.0, so up to four USB 2.0 or two USB 2.0 and two USB 3.0 connections may be supported.
The controllers are configured with two USB2.0 HS/FS/LS Bus Instances and a dedicated SuperSpeed Bus Instance, so
every downstream port has independent and uncontended bandwidth. The controllers each support 64 device slots and
up to 64 periodic endpoints. The controllers have been configured for high system latency tolerance; SuperSpeed and
High Speed FIFO sizes have been increased from their defaults to eight and three packets respectively, and TRB caches
are sized accordingly. Four interrupt vectors are provided per controller.
Communication over the PCIe link is handled by a Synopsys Designware PCIe Endpoint Controller (v5.30a). This
controller handles inbound (downstream) requests from Root Complexes, and forwards outbound (upstream) requests
from internal bus masters. The maximum unidirectional link bandwidth is 14.7Gbit/s, and close to full-duplex
bidirectional bandwidth can be achieved.
• Gen 2 four-lane PHY with automatic or manual lane flip and reversal
• Data-link layer MTU of 256 bytes
• Single Function, single Virtual Channel
• Three Base Address Registers (32-bit non-prefetchable)
• Integrated MSIx capability
• Advanced Error Reporting capability
• Tolerance of Read Completion TLPs sized up to the MTU size
• ASPM L0s+L1 with Reference Clock Removal
• AXI3 bridge interface (40-bit address bus, 128-bit data bus)
• Four configurable inbound address translation windows (4kB to 4GB)
• Four configurable outbound address translation windows (4kB to 4GB)
• Maximum 32 pending inbound non-posted transactions
• Maximum 32 pending outbound non-posted transactions
Other features of the PCIe EP block include:
• A priority-forwarding mechanism that allows bus masters to signal elevated QoS requests on ARQOS/AWQOS, or
instead via configurable heuristics
• A configuration interface that allows control over most PCI space register defaults - e.g. to shrink the configured
link width, selectively disable ASPM, resize BARs
• An interrupt vector configuration block that allows for reliable generation of MSIx messages from level-sensitive
interrupt sources
• Power-management controls for management firmware to coordinate entry and exit of low-power chip states
0x140 AXI_LOOKUP_0
0x144 AXI_LOOKUP_1
0x148 AXI_LOOKUP_2
0x14c AXI_LOOKUP_3
0x150 AXI_LOOKUP_4
0x154 AXI_LOOKUP_5
0x158 AXI_LOOKUP_6
0x15c AXI_LOOKUP_7
0x160 AXI_LOOKUP_8
0x164 AXI_LOOKUP_9
0x168 AXI_LOOKUP_10
0x16c AXI_LOOKUP_11
0x170 AXI_LOOKUP_12
0x174 AXI_LOOKUP_13
0x178 AXI_LOOKUP_14
0x17c AXI_LOOKUP_15
Description
address fields for dbi access
31:14 Reserved. - - -
Description
miscellaneous control bits
31:10 Reserved. - - -
8 CPERSTN_ASSER RW 0x0
T
Description
msix configuration
Table 89.
Bits Name Description Type Reset
MSIX_CFG_0,
MSIX_CFG_1, …,
31:19 Reserved. - - -
MSIX_CFG_62,
MSIX_CFG_63
18:16 FUNC pcie function RW 0x0
Registers
15 Reserved. - - -
11:4 Reserved. - - -
Description
Raw interrupt status [31:0]
Description
Raw interrupt status [63:32]
Description
address fields for pcie phy_test access
31:3 Reserved. - - -
0 POWERDOWN All Circuits Power-Down Control in the PHY for IDDQ RW 0x0
testing
Description
phy parameter control0
Table 93.
Bits Name Description Type Reset
PHY_PARAM_CTRL0
Register
31:27 PHY_TX3_TERM_ tx3 termination offset RW 0x00
OFFSET
Description
phy parameter control1
Table 94.
Bits Name Description Type Reset
PHY_PARAM_CTRL1
Register
31:25 PCS_TX_SWING_L tx amplitude - low swing mode RW 0x73
OW
Description
phy control-register access - control
Table 95.
Bits Name Description Type Reset
PHY_CR_ACC_CTRL
Register
31:20 Reserved. - - -
19 PHY_PIPE_RST gated into phy pcs/pipe reset - advisable to assert during RW 0x0
phy control-register writes
Description
phy control-register access - read/write data
Table 96.
Bits Name Description Type Reset
PHY_CR_ACC_DATA
Register
31:16 RDATA register read data RO 0x0000
Description
new ltssm state
Table 97.
Bits Name Description Type Reset
LTSSM_STATE_NEW
Register
31:6 Reserved. - - -
Description
ltssm_state filter0
Table 98.
Bits Name Description Type Reset
LTSSM_STATE_FILTER
_0 Register
31:6 Reserved. - - -
5:0 VAL ltssm state filter - filter out state changes to this state. RW 0x3f
Description
ltssm_state filter1
Table 99.
Bits Name Description Type Reset
LTSSM_STATE_FILTER
_1 Register
31:6 Reserved. - - -
5:0 VAL ltssm state filter - filter out state changes to this state. RW 0x3f
Description
ltssm_state filter2
Table 100.
Bits Name Description Type Reset
LTSSM_STATE_FILTER
_2 Register
31:6 Reserved. - - -
5:0 VAL ltssm state filter - filter out state changes to this state. RW 0x3f
Description
ltssm_state filter3
Table 101.
Bits Name Description Type Reset
LTSSM_STATE_FILTER
_3 Register
31:6 Reserved. - - -
5:0 VAL ltssm state filter - filter out state changes to this state. RW 0x3f
Table 102.
Bits Name Description Type Reset
AXI_LOOKUP_0
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 103.
Bits Name Description Type Reset
AXI_LOOKUP_1
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 104.
Bits Name Description Type Reset
AXI_LOOKUP_2
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 105.
Bits Name Description Type Reset
AXI_LOOKUP_3
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 106.
Bits Name Description Type Reset
AXI_LOOKUP_4
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 107.
Bits Name Description Type Reset
AXI_LOOKUP_5
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 108.
Bits Name Description Type Reset
AXI_LOOKUP_6
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 109.
Bits Name Description Type Reset
AXI_LOOKUP_7
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 110.
Bits Name Description Type Reset
AXI_LOOKUP_8
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 111.
Bits Name Description Type Reset
AXI_LOOKUP_9
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 112.
Bits Name Description Type Reset
AXI_LOOKUP_10
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 113.
Bits Name Description Type Reset
AXI_LOOKUP_11
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 114.
Bits Name Description Type Reset
AXI_LOOKUP_12
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 115.
Bits Name Description Type Reset
AXI_LOOKUP_13
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 116.
Bits Name Description Type Reset
AXI_LOOKUP_14
Register
31:7 Reserved. - - -
3 Reserved. - - -
Table 117.
Bits Name Description Type Reset
AXI_LOOKUP_15
Register
31:7 Reserved. - - -
3 Reserved. - - -
Description
vdm config_reg0
Table 118.
Bits Name Description Type Reset
VDM_CONFIG_REG0
Register
31:0 PAYLOAD message payload RW 0x00000000
Description
vdm config_reg1
Table 119.
Bits Name Description Type Reset
VDM_CONFIG_REG1
Register
31:1 Reserved. - - -
Description
vdm panic_reg
Table 120.
Bits Name Description Type Reset
VDM_PANIC_REG
Register
31:8 PAYLOAD message payload [31:8] RW 0x000000
7:0 Reserved. - - -
Description
vdm test requesters
31:16 Reserved. - - -
15 REQ3_PANIC req3 panic bit: a state change triggers vdm message RW 0x0
11 REQ2_PANIC req2 panic bit: a state change triggers vdm message RW 0x0
7 REQ1_PANIC req1 panic bit: a state change triggers vdm message RW 0x0
3 REQ0_PANIC req0 panic bit: a state change triggers vdm message RW 0x0
Description
vendor defined message header
Table 122.
Bits Name Description Type Reset
VDM_HEADER
Register
31 Reserved. - - -
Description
power management control
Table 123.
Bits Name Description Type Reset
PM_CONTROL
Register
31:7 Reserved. - - -
5 APPS_PM_XMT_P request L1/L2 PM exit - self clearing PME support must be SC 0x0
ME enabled (sends PME message)
1 APP_XFER_PENDI indicates app has transfers pending, and so inhibits entry RW 0x1
NG to L1-ASPM note: assertion does not prevent entry to L1-
PM, but does cause immediate exit
Description
power management status
Table 124.
Bits Name Description Type Reset
PM_STATUS Register
31:22 Reserved. - - -
Description
internal signals for debug
Description
internal signals for debug
Description
internal signals for debug
31:24 Reserved. - - -
Description
Raw Interrupts
31:7 Reserved. - - -
6 RDLH_LINK_UP WC 0x0
5 SMLH_LINK_UP WC 0x0
4 RADM_PM_TURNOFF WC 0x0
3 LTSSM_STATE_FIFO_NOT_EMPTY RO 0x0
2 LINK_RESET_REQ WC 0x0
1 PERSTN WC 0x0
0 CORE_ALIVE WC 0x0
Description
Interrupt Enable
31:7 Reserved. - - -
6 RDLH_LINK_UP RW 0x0
5 SMLH_LINK_UP RW 0x0
4 RADM_PM_TURNOFF RW 0x0
3 LTSSM_STATE_FIFO_NOT_EMPTY RW 0x0
2 LINK_RESET_REQ RW 0x0
1 PERSTN RW 0x0
0 CORE_ALIVE RW 0x0
Description
Interrupt Force
31:7 Reserved. - - -
6 RDLH_LINK_UP RW 0x0
5 SMLH_LINK_UP RW 0x0
4 RADM_PM_TURNOFF RW 0x0
3 LTSSM_STATE_FIFO_NOT_EMPTY RW 0x0
2 LINK_RESET_REQ RW 0x0
1 PERSTN RW 0x0
0 CORE_ALIVE RW 0x0
Description
Interrupt status after masking & forcing
31:7 Reserved. - - -
6 RDLH_LINK_UP RO 0x0
5 SMLH_LINK_UP RO 0x0
4 RADM_PM_TURNOFF RO 0x0
3 LTSSM_STATE_FIFO_NOT_EMPTY RO 0x0
2 LINK_RESET_REQ RO 0x0
1 PERSTN RO 0x0
0 CORE_ALIVE RO 0x0
MSIx is an extension of the MSI standard, which allows for per-vector configuration of destination address and write
data. Up to 1024 vectors are supported per function; RP1 has 61 vectors connected to interrupt sources.
Most top-level interrupts in RP1 assert a physical line continuously for as long as the logical OR of all their interrupt
sources is high. This leads to a possible race condition that would lead to a 'stuck' interrupt:
To avoid this race condition and the inefficient workaround, each MSIx vector has an optional acknowledge function
controlled by MSIn_CFG.IACK_EN that masks the interrupt line when initially asserted, and unmasks the interrupt line when
the respective MSIn_CFG.IACK register bit is written with a 1. If a peripheral interrupt is still asserted at the time the IACK
register is written, a new MSIx write is generated.
NOTE
The only true edge-level interrupts in RP1 are the set of vectors assigned to USBHOST0 and USBHOST1.
Chapter 7. Ethernet
The ethernet subsystem is implemented using the Cadence Gigabit Ethernet MAC (GEM_GXL 1p09) IP. The GEM_GXL
configuration is:
• 10/100/1000 Mbps Ethernet MAC compatible with the IEEE 802.3 standard.
• RGMII interface.
• Half or full duplex.
• 64-bit MAC data bus width
• SRAM based packet buffer DMA 64-bit address, 128-bit data.
• AXI4 bus master interface.
• Four maskable address filters (source or destination).
• Support for jumbo frames up to 16383 bytes.
• Internal loopback.
• DMA full store and forward mode (partial store and forward not supported).
• IEEE 1588 time stamp unit.
Figure 5. Ethernet
controller
configuration
The core is well documented in "Cadence Gigabit Ethernet MAC with DMA, 1588, AVB and PCS (GEM_GXL) User Guide
Rev 15".
Chapter 7. Ethernet 81
Raspberry Pi RP1 Peripherals
7.1. Registers
The base address of the Ethernet peripheral is:
0x08 TSU_TIMER_CNT0
0x0c TSU_TIMER_CNT1
0x10 TSU_TIMER_CNT2
0x18 CLK2FC
Description
General Ethernet control register
31:5 Reserved. - - -
3 BUSERR_EN Enable MAC bus errors to pass through to the fabric. RW 0x0
The MAC normally generates bus errors for any
unmapped address, which causes the debugger to
generate lots of bus errors.
Therefore default is that MAC bus errors are off
Description
General Ethernet status register
7.1. Registers 82
Raspberry Pi RP1 Peripherals
31:6 Reserved. - - -
5 AWLEN_ILLEGAL Illegal AXI write address transaction - larger than 16 beats. RO 0x0
Will need block reset, and maybe system reset
4 ARLEN_ILLEGAL Illegal AXI read address transaction - larger than 16 beats. RO 0x0
Will need block reset, and maybe system reset
Table 136.
Bits Name Description Type Reset
TSU_TIMER_CNT0
Register
31:0 CNT0 tsu timer count value [31:0] RO 0x00000000
Table 137.
Bits Name Description Type Reset
TSU_TIMER_CNT1
Register
31:0 CNT1 tsu timer count value [63:32] RO 0x00000000
Table 138.
Bits Name Description Type Reset
TSU_TIMER_CNT2
Register
31:30 Reserved. - - -
Description
Clock control, can be changed on-the-fly
31:10 Reserved. - - -
7.1. Registers 83
Raspberry Pi RP1 Peripherals
3 SPEED_OVERRIDE Use speed we specify here instead of speed from mac RW 0x0
_EN speed - 0=10M; 1=100M (default); 2=1000M
2 Reserved. - - -
31:2 Reserved. - - -
Description
Raw Interrupts
31:13 Reserved. - - -
12 IEEE1588_TSU_TI TSU timer comparison valid. Asserted high when upper 70 WC 0x0
MER_CMP_VAL bits of TSU timer count value are equal to programmed
comparison value.
7.1. Registers 84
Raspberry Pi RP1 Peripherals
Description
Interrupt Enable
31:13 Reserved. - - -
12 IEEE1588_TSU_TI TSU timer comparison valid. Asserted high when upper 70 RW 0x0
MER_CMP_VAL bits of TSU timer count value are equal to programmed
comparison value.
Description
Interrupt Force
7.1. Registers 85
Raspberry Pi RP1 Peripherals
31:13 Reserved. - - -
12 IEEE1588_TSU_TI TSU timer comparison valid. Asserted high when upper 70 RW 0x0
MER_CMP_VAL bits of TSU timer count value are equal to programmed
comparison value.
Description
Interrupt status after masking & forcing
31:13 Reserved. - - -
12 IEEE1588_TSU_TI TSU timer comparison valid. Asserted high when upper 70 RO 0x0
MER_CMP_VAL bits of TSU timer count value are equal to programmed
comparison value.
7.1. Registers 86
Raspberry Pi RP1 Peripherals
7.1. Registers 87
Raspberry Pi RP1 Peripherals
The Video Encoder (VEC), together with the built-in Video DAC, can generate composite or Y/C output for a variety of TV
standards (interlaced or progressive).
A DPI block can output (progressive, separated sync) video in parallel through GPIO pins, with programmable format
and timings. By routing RGB through the Triple Video DAC, it is possible to support VGA output. Contention for shared
resources may restrict the concurrent use of VEC and DPI.
RP1 also has two independent four-lane MIPI D-PHY interfaces, each of which can support either a DSI display or a CSI-
2 camera. It includes facilities to stream RGB video out, handle incoming CSI-2 imagery and metadata, and perform
some basic image processing and statistics.
8.3. Registers
The base address of the MIPI peripherals are:
8.3. Registers 89
Raspberry Pi RP1 Peripherals
Chapter 9. DMA
An eight-channel Synopsys AXI DMAC based on version 1.02a-lp02 is instantiated. The purpose of this DMA controller
is to service low-bandwidth APB peripherals and interface with their flow control handshakes to pace DMA transfers
across PCIe. A secondary intent is that DMA traffic can be more efficiently bursted across the PCIe using this controller,
as each TLP carries a fixed overhead that becomes large when small (e.g. single 32-bit) transfers are used.
The AXI DMAC has eight almost-identical channels. Channels 1 and 2 have double-sized internal FIFOs with 8-beat
storage, channels 3-8 have 4-beat storage. The DMA channels all arbitrate internally with configurable priority, and
conduct reads and writes over a single 128-bit AXI master port. An AXI slave port is used for access to control and
status registers. The DMAC is configured to allow Channel Aborts, does not permit Channel Locking, and has a
maximum transfer block size of 2^18 - 1 elements.
The AXI DMAC will only issue as many outstanding AXI transfers as there is space in the channel’s internal FIFO, so
read bandwidth is heavily dependent on PCIe link round-trip time. Typical per-channel read bandwidth is expected to be
500-600Mbs, and write bandwidth 2Gbps. The vast majority of the target peripherals operate with single-digit megabits
per second of throughput.
The DMAC is configured with a separate core clock, running at 100MHz. Clock-crossing between the clk_sys domain
and clk_dma domain is done internally using SNPS synchroniser modules. The DMAC is configured with CSLP (top-level
automatic clock gating) to gate off large sections of the core clock when idle and enabled.
Peripherals that implement a DMA flow control handshake are connected to the DMAC according to the handshake
table below. Almost all peripherals are connected, with the exception of I2C6. There are also two "tick" peripherals for
periodic triggering of a handshake input, to allow for time-based pacing of arbitrary transfers.
For a reference implementation see the Synopsys DesignWare AXI DMA Linux kernel driver.