Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: bcm2835: Add devicetree for bcm2836 and Raspberry Pi 2 B

The Pi 2 B ends up like a Pi 1 B+, with the same peripherals and
pinout, but the CPU and memory layout changed to use the 2836.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Eric Anholt and committed by
Arnd Bergmann
80534f09 4b8c3907

+115 -1
+2 -1
arch/arm/boot/dts/Makefile
··· 62 62 bcm2835-rpi-b.dtb \ 63 63 bcm2835-rpi-b-rev2.dtb \ 64 64 bcm2835-rpi-b-plus.dtb \ 65 - bcm2835-rpi-a-plus.dtb 65 + bcm2835-rpi-a-plus.dtb \ 66 + bcm2836-rpi-2-b.dtb 66 67 dtb-$(CONFIG_ARCH_BCM_5301X) += \ 67 68 bcm4708-asus-rt-ac56u.dtb \ 68 69 bcm4708-asus-rt-ac68u.dtb \
+35
arch/arm/boot/dts/bcm2836-rpi-2-b.dts
··· 1 + /dts-v1/; 2 + #include "bcm2836.dtsi" 3 + #include "bcm2835-rpi.dtsi" 4 + 5 + / { 6 + compatible = "raspberrypi,2-model-b", "brcm,bcm2836"; 7 + model = "Raspberry Pi 2 Model B"; 8 + 9 + memory { 10 + reg = <0 0x40000000>; 11 + }; 12 + 13 + leds { 14 + act { 15 + gpios = <&gpio 47 0>; 16 + }; 17 + 18 + pwr { 19 + label = "PWR"; 20 + gpios = <&gpio 35 0>; 21 + default-state = "keep"; 22 + linux,default-trigger = "default-on"; 23 + }; 24 + }; 25 + }; 26 + 27 + &gpio { 28 + pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; 29 + 30 + /* I2S interface */ 31 + i2s_alt0: i2s_alt0 { 32 + brcm,pins = <18 19 20 21>; 33 + brcm,function = <BCM2835_FSEL_ALT0>; 34 + }; 35 + };
+78
arch/arm/boot/dts/bcm2836.dtsi
··· 1 + #include "bcm283x.dtsi" 2 + 3 + / { 4 + compatible = "brcm,bcm2836"; 5 + 6 + soc { 7 + ranges = <0x7e000000 0x3f000000 0x1000000>, 8 + <0x40000000 0x40000000 0x00001000>; 9 + dma-ranges = <0xc0000000 0x00000000 0x3f000000>; 10 + 11 + local_intc: local_intc { 12 + compatible = "brcm,bcm2836-l1-intc"; 13 + reg = <0x40000000 0x100>; 14 + interrupt-controller; 15 + #interrupt-cells = <1>; 16 + interrupt-parent = <&local_intc>; 17 + }; 18 + 19 + arm-pmu { 20 + compatible = "arm,cortex-a7-pmu"; 21 + interrupt-parent = <&local_intc>; 22 + interrupts = <9>; 23 + }; 24 + }; 25 + 26 + timer { 27 + compatible = "arm,armv7-timer"; 28 + interrupt-parent = <&local_intc>; 29 + interrupts = <0>, // PHYS_SECURE_PPI 30 + <1>, // PHYS_NONSECURE_PPI 31 + <3>, // VIRT_PPI 32 + <2>; // HYP_PPI 33 + always-on; 34 + }; 35 + 36 + cpus: cpus { 37 + #address-cells = <1>; 38 + #size-cells = <0>; 39 + 40 + v7_cpu0: cpu@0 { 41 + device_type = "cpu"; 42 + compatible = "arm,cortex-a7"; 43 + reg = <0xf00>; 44 + clock-frequency = <800000000>; 45 + }; 46 + 47 + v7_cpu1: cpu@1 { 48 + device_type = "cpu"; 49 + compatible = "arm,cortex-a7"; 50 + reg = <0xf01>; 51 + clock-frequency = <800000000>; 52 + }; 53 + 54 + v7_cpu2: cpu@2 { 55 + device_type = "cpu"; 56 + compatible = "arm,cortex-a7"; 57 + reg = <0xf02>; 58 + clock-frequency = <800000000>; 59 + }; 60 + 61 + v7_cpu3: cpu@3 { 62 + device_type = "cpu"; 63 + compatible = "arm,cortex-a7"; 64 + reg = <0xf03>; 65 + clock-frequency = <800000000>; 66 + }; 67 + }; 68 + }; 69 + 70 + /* Make the BCM2835-style global interrupt controller be a child of the 71 + * CPU-local interrupt controller. 72 + */ 73 + &intc { 74 + compatible = "brcm,bcm2836-armctrl-ic"; 75 + reg = <0x7e00b200 0x200>; 76 + interrupt-parent = <&local_intc>; 77 + interrupts = <8>; 78 + };