Skip to content
ncguk edited this page Jun 20, 2015 · 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).

raspberrypi/linux:rpi-4.0.y currently works with all drivers on ARCH_BCM2835 except dwc_otg and lirc_rpi.
Further work to close in on mainline will happen in the rpi-4.1.y branch.

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

VideoCore bootloader

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

Default config

bcm2835_defconfig has been changed to match the options in bcmrpi_defconfig.

Mainline: bcm2835-dma
Downstream: bcm2708_dma

bcm2708-dmaengine has to be used for 2 reasons:

linux-next: bcm2835-mailbox
Downstream: bcm2708-vcio

bcm2708-vcio is used because several drivers depends on it's legacy API: bcm2835_thermal, bcm2835-cpufreq, rpi-ft5406, bcm2708-power, bcm2708_fb and vchiq.

Eric Anholt has a made a firmware driver that provides an API for the mailbox property channel: dt/bindings: Add binding for the Raspberry Pi firmware driver.

Even with this driver, the legacy API is still needed, because bcm2708_fb and vchiq use their own mailbox channels, not the property channel.

Thermal

Downstream: bcm2835_thermal

Depends on the legacy mailbox API (property), can use the firmware driver API. The thermal driver will be sent upstream when the firmware driver lands in linux-next.

CPU Frequency

Downstream: bcm2835-cpufreq

Depends on the legacy mailbox API (property).

[PATCH v3 1/7] dt/bindings: Add binding for the Raspberry Pi clock provider adds an 'arm' clock. This is the clock that the cpufreq driver uses. This cpufreq driver will be sent upstream when the clock driver is in.

Touchscreen driver for pi LCD display

Downstream: rpi-ft5406

Depends on the legacy mailbox API (property).

Power Domain

Downstream: bcm2708-power

All power domains except USB is turned on by the firmware. bcm2708-power turns on USB power. It uses it's own mailbox channel, but could also have used the property channnel.

Eric Anholt had power domain functionality in his first firmware driver patch: [PATCH 2/3] ARM: bcm2835: Add the Raspberry Pi firmware driver This was pulled out becuause the PD susbsystem could not handle deferred probing. The USB driver is probed before the firmware driver and without deferred probing the USB driver loads without power turned on.

MMC

Mainline: sdhci-bcm2835
Downstream: bcm2835-mmc

bcm2835-mmc has increased throughput.

Framebuffer

Mainline: simplefb
Downstream: bcm2708_fb

Depends on the legacy DMA API for DMA memcpy and the legacy mailbox API.

VCHIQ

Downstream: vchiq

Kernel to VideoCore communication interface.

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.
ARCH_BCM2835 currently does not support FIQ. However there's a patch trying to rectify that: [PATCH] irqchip: bcm2835: Add FIQ support

GPIO LIRC

Downstream: lirc_rpi

Homebrew GPIO Port Receiver/Transmitter for the RaspberryPi

Does not work with ARCH_BCM2835 because it depends on some ARCH_BCM270x code.

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.0.y/sound/soc/bcm

Clone this wiki locally