Skip to content
Stefan Wahren edited this page Aug 13, 2016 · 57 revisions

Recently there has been a focused effort to lay the ground work for a future switch from ARCH_BCM2708 to ARCH_BCM2835. This document has been updated to reflect the current status of using ARCH_BCM2835 downstream.

The official Raspberry Pi kernels support dual booting with Device Tree and with ATAGS. The bootloader inspects the kernel image for a trailing tag to determine if it should boot with Device Tree (mkknlimg). This can be overridden in /boot/config.txt.
So a switch to ARCH_BCM2835 necessitates dropping ATAGS support (no roadmap is known).

From 4.2 ARCH_BCM2835 should be functionally equivalent to ARCH_BCM2708.

Another status page: http://elinux.org/RPi_Upstreaming

VideoCore bootloader

The boot loader can boot ARCH_BCM2835 directly. The kernel has to be tagged with the mkknlimg utility.

Default configs

For Raspberry Pi 1, use bcm2835_defconfig

For Raspberry Pi 2, use multi_v7_defconfig

For Raspberry Pi 3, use defconfig on arm64. Note that as of 4.8-rc1, the defconfig has not been updated to include Raspberry Pi support, so you'll need to include:

CONFIG_ARCH_BCM2835
CONFIG_SERIAL_8250_BCM2835AUX
CONFIG_I2C_BCM2835
CONFIG_BCM2835_WDT
CONFIG_SPI_BCM2835
CONFIG_SPI_BCM2835AUX
CONFIG_DRM_VC4
CONFIG_SND_BCM2835_SOC_I2S
CONFIG_USB_DWC2_HOST
CONFIG_DMA_BCM2835
CONFIG_BCM2835_MBOX
CONFIG_RASPBERRYPI_POWER
CONFIG_RASPBERRYPI_FIRMWARE

Mainline: bcm2835-dma
Downstream: bcm2708_dma

bcm2708-dmaengine has to be used for 2 reasons:

Mainline: bcm2835-mailbox

Firmware

Acked patch: dt/bindings: Add binding for the Raspberry Pi firmware driver
Downstream: raspberrypi-firmware

Provides an API to access the mailbox property channel.

This driver has a downstream patch to turn on USB power.

Thermal

Downstream: bcm2835_thermal

Depends on the firmware API.

CPU Frequency

Downstream: bcm2835-cpufreq

Depends on the firmware API.

Touchscreen driver for pi LCD display

Downstream: rpi-ft5406

Depends on the firmware API.

MMC

Mainline: sdhci-iproc
Downstream: bcm2835-mmc

bcm2835-mmc has increased throughput.

Framebuffer

Mainline: simplefb
Downstream: bcm2708_fb

Depends on the firmware API.

VCHIQ

Downstream: vchiq

Kernel to VideoCore communication interface.
Depends on the firmware API.

Onboard audio

Downstream: sound/arm/bcm2835.c

Depends on vchiq.

USB controller

Mainline: dwc2
Downstream: dwc_otg

The downstream driver uses FIQ resulting in increased performance.

GPIO LIRC

Downstream: lirc_rpi

Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi

Videocore Memory

Downstream: vc-mem

Helper for videocore memory access and total size allocation.

Example:

$ sudo vcdbg log msg 2>&1 | grep Loading
000913.584: Loading 'kernel.img' from SD card

Videocore CMA

Downstream: vc_cma

Helper for videocore CMA access.

VMCS Shared Memory

Downstream: vc-sm

Support for the VC shared memory on the Broadcom reference design. Uses the VCHIQ stack.

Poweroff

Currently poweroff/halt leads to reboot.

The restart/poweroff code is being moved to the watchdog driver (linux-next): ARM: bcm2835: Move the restart/power_off handling to the WDT driver

This acked patch fixes the poweroff problem: [PATCH v3] watchdog: bcm2835: Fix poweroff behaviour

Revision & Serial numbers

Downstream commit: ARM: bcm2835: Set Serial number and Revision

Several Pi specific applications depend on the Revision and Serial numbers in /proc/cpuinfo:

$ cat /proc/cpuinfo
Revision        : 000e
Serial          : 000000004939788f

GPIO

Mainline: pinctrl-bcm2835

Downstream patches:

SPI

Mainline: spi-bcm2835

I2C

Mainline: i2c-bcm2835

I2S

Mainline: bcm2835-i2s

Various downstream audio cards: https://github.com/raspberrypi/linux/tree/rpi-4.2.y/sound/soc/bcm

PWM

Mainline: pwm-bcm2835

Clone this wiki locally