From d5ca856aa5e2db0d6461200dc3bf9f2b2dc63b48 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 11 Jul 2016 22:47:23 +0200 Subject: rework kernel patches for rpi/imx6 Instead of trying to recreate patchsets for newer kernels just use upstream non-official kernel trees. Working on the patchsets does take to much time. You can choose between hardware specific github tree and defconfig or upstream kernel and OpenADK miniconfig. --- .../patches/4.1.26/0001-raspberry-pi-github.patch | 337467 ------------------ .../patches/4.4.14/0001-raspberry-pi-github.patch | 309475 ---------------- 2 files changed, 646942 deletions(-) delete mode 100644 target/arm/bcm28xx/patches/4.1.26/0001-raspberry-pi-github.patch delete mode 100644 target/arm/bcm28xx/patches/4.4.14/0001-raspberry-pi-github.patch (limited to 'target/arm/bcm28xx') diff --git a/target/arm/bcm28xx/patches/4.1.26/0001-raspberry-pi-github.patch b/target/arm/bcm28xx/patches/4.1.26/0001-raspberry-pi-github.patch deleted file mode 100644 index 6f9089b88..000000000 --- a/target/arm/bcm28xx/patches/4.1.26/0001-raspberry-pi-github.patch +++ /dev/null @@ -1,337467 +0,0 @@ -diff -Nur linux-4.1.23.orig/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 linux-4.1.23/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 ---- linux-4.1.23.orig/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 2016-05-02 22:53:49.000000000 +0200 -@@ -0,0 +1,6 @@ -+What: /sys/bus/w1/devices/.../w1_seq -+Date: Apr 2015 -+Contact: Matt Campbell -+Description: Support for the DS28EA00 chain sequence function -+ see Documentation/w1/slaves/w1_therm for detailed information -+Users: any user space application which wants to communicate with DS28EA00 -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt linux-4.1.23/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -0,0 +1,45 @@ -+Broadcom BCM2835 CPRMAN clocks -+ -+This binding uses the common clock binding: -+ Documentation/devicetree/bindings/clock/clock-bindings.txt -+ -+The CPRMAN clock controller generates clocks in the audio power domain -+of the BCM2835. There is a level of PLLs deriving from an external -+oscillator, a level of PLL dividers that produce channels off of the -+few PLLs, and a level of mostly-generic clock generators sourcing from -+the PLL channels. Most other hardware components source from the -+clock generators, but a few (like the ARM or HDMI) will source from -+the PLL dividers directly. -+ -+Required properties: -+- compatible: Should be "brcm,bcm2835-cprman" -+- #clock-cells: Should be <1>. The permitted clock-specifier values can be -+ found in include/dt-bindings/clock/bcm2835.h -+- reg: Specifies base physical address and size of the registers -+- clocks: The external oscillator clock phandle -+ -+Example: -+ -+ clk_osc: clock@3 { -+ compatible = "fixed-clock"; -+ reg = <3>; -+ #clock-cells = <0>; -+ clock-output-names = "osc"; -+ clock-frequency = <19200000>; -+ }; -+ -+ clocks: cprman@7e101000 { -+ compatible = "brcm,bcm2835-cprman"; -+ #clock-cells = <1>; -+ reg = <0x7e101000 0x2000>; -+ clocks = <&clk_osc>; -+ }; -+ -+ i2c0: i2c@7e205000 { -+ compatible = "brcm,bcm2835-i2c"; -+ reg = <0x7e205000 0x1000>; -+ interrupts = <2 21>; -+ clocks = <&clocks BCM2835_CLOCK_VPU>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt linux-4.1.23/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -48,8 +48,8 @@ - - bcm2835_i2s: i2s@7e203000 { - compatible = "brcm,bcm2835-i2s"; -- reg = < 0x7e203000 0x20>, -- < 0x7e101098 0x02>; -+ reg = < 0x7e203000 0x24>, -+ < 0x7e101098 0x08>; - - dmas = <&dma 2>, - <&dma 3>; -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt linux-4.1.23/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -0,0 +1,35 @@ -+* FocalTech FT6236 I2C touchscreen controller -+ -+Required properties: -+ - compatible : "focaltech,ft6236" -+ - reg : I2C slave address of the chip (0x38) -+ - interrupt-parent : a phandle pointing to the interrupt controller -+ serving the interrupt for this chip -+ - interrupts : interrupt specification for the touch controller -+ interrupt -+ - reset-gpios : GPIO specification for the RSTN input -+ - touchscreen-size-x : horizontal resolution of touchscreen (in pixels) -+ - touchscreen-size-y : vertical resolution of touchscreen (in pixels) -+ -+Optional properties: -+ - touchscreen-fuzz-x : horizontal noise value of the absolute input -+ device (in pixels) -+ - touchscreen-fuzz-y : vertical noise value of the absolute input -+ device (in pixels) -+ - touchscreen-inverted-x : X axis is inverted (boolean) -+ - touchscreen-inverted-y : Y axis is inverted (boolean) -+ - touchscreen-swapped-x-y: X and Y axis are swapped (boolean) -+ Swapping is done after inverting the axis -+ -+Example: -+ -+ ft6x06@38 { -+ compatible = "focaltech,ft6236"; -+ reg = <0x38>; -+ interrupt-parent = <&gpio>; -+ interrupts = <23 2>; -+ touchscreen-size-x = <320>; -+ touchscreen-size-y = <480>; -+ touchscreen-inverted-x; -+ touchscreen-swapped-x-y; -+ }; -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt linux-4.1.23/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi-dev.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -0,0 +1,17 @@ -+* Broadcom BCM2835 SMI character device driver. -+ -+SMI or secondary memory interface is a peripheral specific to certain Broadcom -+SOCs, and is helpful for talking to things like parallel-interface displays -+and NAND flashes (in fact, most things with a parallel register interface). -+ -+This driver adds a character device which provides a user-space interface to -+an instance of the SMI driver. -+ -+Required properties: -+- compatible: "brcm,bcm2835-smi-dev" -+- smi_handle: a phandle to the smi node. -+ -+Optional properties: -+- None. -+ -+ -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt linux-4.1.23/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/devicetree/bindings/misc/brcm,bcm2835-smi.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -0,0 +1,48 @@ -+* Broadcom BCM2835 SMI driver. -+ -+SMI or secondary memory interface is a peripheral specific to certain Broadcom -+SOCs, and is helpful for talking to things like parallel-interface displays -+and NAND flashes (in fact, most things with a parallel register interface). -+ -+Required properties: -+- compatible: "brcm,bcm2835-smi" -+- reg: Should contain location and length of SMI registers and SMI clkman regs -+- interrupts: *the* SMI interrupt. -+- pinctrl-names: should be "default". -+- pinctrl-0: the phandle of the gpio pin node. -+- brcm,smi-clock-source: the clock source for clkman -+- brcm,smi-clock-divisor: the integer clock divisor for clkman -+- dmas: the dma controller phandle and the DREQ number (4 on a 2835) -+- dma-names: the name used by the driver to request its channel. -+ Should be "rx-tx". -+ -+Optional properties: -+- None. -+ -+Examples: -+ -+8 data pin configuration: -+ -+smi: smi@7e600000 { -+ compatible = "brcm,bcm2835-smi"; -+ reg = <0x7e600000 0x44>, <0x7e1010b0 0x8>; -+ interrupts = <2 16>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&smi_pins>; -+ brcm,smi-clock-source = <6>; -+ brcm,smi-clock-divisor = <4>; -+ dmas = <&dma 4>; -+ dma-names = "rx-tx"; -+ -+ status = "okay"; -+}; -+ -+smi_pins: smi_pins { -+ brcm,pins = <2 3 4 5 6 7 8 9 10 11 12 13 14 15>; -+ /* Alt 1: SMI */ -+ brcm,function = <5 5 5 5 5 5 5 5 5 5 5 5 5 5>; -+ /* /CS, /WE and /OE are pulled high, as they are -+ generally active low signals */ -+ brcm,pull = <2 2 2 2 2 2 0 0 0 0 0 0 0 0>; -+}; -+ -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt linux-4.1.23/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/devicetree/bindings/mtd/brcm,bcm2835-smi-nand.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -0,0 +1,42 @@ -+* BCM2835 SMI NAND flash -+ -+This driver is a shim between the BCM2835 SMI driver (SMI is a peripheral for -+talking to parallel register interfaces) and Linux's MTD layer. -+ -+Required properties: -+- compatible: "brcm,bcm2835-smi-nand" -+- status: "okay" -+ -+Optional properties: -+- partition@n, where n is an integer from a consecutive sequence starting at 0 -+ - Difficult to store partition table on NAND device - normally put it -+ in the source code, kernel bootparams, or device tree (the best way!) -+ - Sub-properties: -+ - label: the partition name, as shown by mtdinfo /dev/mtd* -+ - reg: the size and offset of this partition. -+ - (optional) read-only: an empty property flagging as read only -+ -+Example: -+ -+nand: flash@0 { -+ compatible = "brcm,bcm2835-smi-nand"; -+ status = "okay"; -+ -+ partition@0 { -+ label = "stage2"; -+ // 128k -+ reg = <0 0x20000>; -+ read-only; -+ }; -+ partition@1 { -+ label = "firmware"; -+ // 16M -+ reg = <0x20000 0x1000000>; -+ read-only; -+ }; -+ partition@2 { -+ label = "root"; -+ // 2G -+ reg = <0x1020000 0x80000000>; -+ }; -+}; -\ No newline at end of file -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt linux-4.1.23/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -16,8 +16,8 @@ - - bcm2835_i2s: i2s@7e203000 { - compatible = "brcm,bcm2835-i2s"; -- reg = <0x7e203000 0x20>, -- <0x7e101098 0x02>; -+ reg = <0x7e203000 0x24>, -+ <0x7e101098 0x08>; - - dmas = <&dma 2>, - <&dma 3>; -diff -Nur linux-4.1.23.orig/Documentation/devicetree/bindings/vendor-prefixes.txt linux-4.1.23/Documentation/devicetree/bindings/vendor-prefixes.txt ---- linux-4.1.23.orig/Documentation/devicetree/bindings/vendor-prefixes.txt 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/Documentation/devicetree/bindings/vendor-prefixes.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -76,6 +76,7 @@ - excito Excito - fcs Fairchild Semiconductor - firefly Firefly -+focaltech FocalTech Systems Co.,Ltd - fsl Freescale Semiconductor - GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. - gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. -diff -Nur linux-4.1.23.orig/Documentation/filesystems/efivarfs.txt linux-4.1.23/Documentation/filesystems/efivarfs.txt ---- linux-4.1.23.orig/Documentation/filesystems/efivarfs.txt 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/Documentation/filesystems/efivarfs.txt 2016-05-02 22:53:49.000000000 +0200 -@@ -14,10 +14,3 @@ - efivarfs is typically mounted like this, - - mount -t efivarfs none /sys/firmware/efi/efivars -- --Due to the presence of numerous firmware bugs where removing non-standard --UEFI variables causes the system firmware to fail to POST, efivarfs --files that are not well-known standardized variables are created --as immutable files. This doesn't prevent removal - "chattr -i" will work - --but it does prevent this kind of failure from being accomplished --accidentally. -diff -Nur linux-4.1.23.orig/Documentation/video4linux/bcm2835-v4l2.txt linux-4.1.23/Documentation/video4linux/bcm2835-v4l2.txt ---- linux-4.1.23.orig/Documentation/video4linux/bcm2835-v4l2.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/Documentation/video4linux/bcm2835-v4l2.txt 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,60 @@ -+ -+BCM2835 (aka Raspberry Pi) V4L2 driver -+====================================== -+ -+1. Copyright -+============ -+ -+Copyright © 2013 Raspberry Pi (Trading) Ltd. -+ -+2. License -+========== -+ -+This program is free software; you can redistribute it and/or modify -+it under the terms of the GNU General Public License as published by -+the Free Software Foundation; either version 2 of the License, or -+(at your option) any later version. -+ -+This program is distributed in the hope that it will be useful, -+but WITHOUT ANY WARRANTY; without even the implied warranty of -+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+GNU General Public License for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; if not, write to the Free Software -+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ -+3. Quick Start -+============== -+ -+You need a version 1.0 or later of v4l2-ctl, available from: -+ git://git.linuxtv.org/v4l-utils.git -+ -+$ sudo modprobe bcm2835-v4l2 -+ -+Turn on the overlay: -+ -+$ v4l2-ctl --overlay=1 -+ -+Turn off the overlay: -+ -+$ v4l2-ctl --overlay=0 -+ -+Set the capture format for video: -+ -+$ v4l2-ctl --set-fmt-video=width=1920,height=1088,pixelformat=4 -+ -+(Note: 1088 not 1080). -+ -+Capture: -+ -+$ v4l2-ctl --stream-mmap=3 --stream-count=100 --stream-to=somefile.h264 -+ -+Stills capture: -+ -+$ v4l2-ctl --set-fmt-video=width=2592,height=1944,pixelformat=3 -+$ v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=somefile.jpg -+ -+List of available formats: -+ -+$ v4l2-ctl --list-formats -diff -Nur linux-4.1.23.orig/Documentation/w1/slaves/w1_therm linux-4.1.23/Documentation/w1/slaves/w1_therm ---- linux-4.1.23.orig/Documentation/w1/slaves/w1_therm 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/Documentation/w1/slaves/w1_therm 2016-05-02 22:53:50.000000000 +0200 -@@ -11,12 +11,14 @@ - Description - ----------- - --w1_therm provides basic temperature conversion for ds18*20 devices. -+w1_therm provides basic temperature conversion for ds18*20 devices, and the -+ds28ea00 device. - supported family codes: - W1_THERM_DS18S20 0x10 - W1_THERM_DS1822 0x22 - W1_THERM_DS18B20 0x28 - W1_THERM_DS1825 0x3B -+W1_THERM_DS28EA00 0x42 - - Support is provided through the sysfs w1_slave file. Each open and - read sequence will initiate a temperature conversion then provide two -@@ -48,3 +50,10 @@ - maximum current draw of 1.5mA and that a 5k pullup resistor is not - sufficient. The strong pullup is designed to provide the additional - current required. -+ -+The DS28EA00 provides an additional two pins for implementing a sequence -+detection algorithm. This feature allows you to determine the physical -+location of the chip in the 1-wire bus without needing pre-existing -+knowledge of the bus ordering. Support is provided through the sysfs -+w1_seq file. The file will contain a single line with an integer value -+representing the device index in the bus starting at 0. -diff -Nur linux-4.1.23.orig/MAINTAINERS linux-4.1.23/MAINTAINERS ---- linux-4.1.23.orig/MAINTAINERS 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/MAINTAINERS 2016-05-02 22:53:50.000000000 +0200 -@@ -9533,11 +9533,9 @@ - F: drivers/net/ethernet/dlink/sundance.c - - SUPERH --M: Yoshinori Sato --M: Rich Felker - L: linux-sh@vger.kernel.org - Q: http://patchwork.kernel.org/project/linux-sh/list/ --S: Maintained -+S: Orphan - F: Documentation/sh/ - F: arch/sh/ - F: drivers/sh/ -diff -Nur linux-4.1.23.orig/arch/arm/Kconfig linux-4.1.23/arch/arm/Kconfig ---- linux-4.1.23.orig/arch/arm/Kconfig 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/Kconfig 2016-05-02 22:53:50.000000000 +0200 -@@ -314,6 +314,42 @@ - default ARCH_VERSATILE if !MMU - default ARCH_MULTIPLATFORM if MMU - -+config ARCH_BCM2708 -+ bool "Broadcom BCM2708 family" -+ select CPU_V6 -+ select ARM_AMBA -+ select HAVE_SCHED_CLOCK -+ select NEED_MACH_GPIO_H -+ select NEED_MACH_MEMORY_H -+ select COMMON_CLK -+ select ARCH_HAS_CPUFREQ -+ select GENERIC_CLOCKEVENTS -+ select ARM_ERRATA_411920 -+ select MACH_BCM2708 -+ select VC4 -+ select FIQ -+ help -+ This enables support for Broadcom BCM2708 boards. -+ -+config ARCH_BCM2709 -+ bool "Broadcom BCM2709 family" -+ select ARCH_HAS_BARRIERS if SMP -+ select CPU_V7 -+ select HAVE_SMP -+ select ARM_AMBA -+ select MIGHT_HAVE_CACHE_L2X0 -+ select HAVE_SCHED_CLOCK -+ select NEED_MACH_MEMORY_H -+ select NEED_MACH_IO_H -+ select COMMON_CLK -+ select ARCH_HAS_CPUFREQ -+ select GENERIC_CLOCKEVENTS -+ select MACH_BCM2709 -+ select VC4 -+ select FIQ -+ help -+ This enables support for Broadcom BCM2709 boards. -+ - config ARCH_MULTIPLATFORM - bool "Allow multiple platforms to be selected" - depends on MMU -@@ -824,6 +860,9 @@ - # Kconfigs may be included either alphabetically (according to the - # plat- suffix) or along side the corresponding mach-* source. - # -+source "arch/arm/mach-bcm2708/Kconfig" -+source "arch/arm/mach-bcm2709/Kconfig" -+ - source "arch/arm/mach-mvebu/Kconfig" - - source "arch/arm/mach-alpine/Kconfig" -@@ -1717,7 +1756,7 @@ - - config UACCESS_WITH_MEMCPY - bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()" -- depends on MMU -+ depends on MMU && !CPU_SW_DOMAIN_PAN - default y if CPU_FEROCEON - help - Implement faster copy_to_user and clear_user methods for CPU -diff -Nur linux-4.1.23.orig/arch/arm/Kconfig.debug linux-4.1.23/arch/arm/Kconfig.debug ---- linux-4.1.23.orig/arch/arm/Kconfig.debug 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/Kconfig.debug 2016-05-02 22:53:50.000000000 +0200 -@@ -1196,6 +1196,14 @@ - options; the platform specific options are deprecated - and will be soon removed. - -+ config DEBUG_BCM2708_UART0 -+ bool "Broadcom BCM2708 UART0 (PL011)" -+ depends on MACH_BCM2708 -+ help -+ Say Y here if you want the debug print routines to direct -+ their output to UART 0. The port must have been initialised -+ by the boot-loader before use. -+ - endchoice - - config DEBUG_AT91_UART -diff -Nur linux-4.1.23.orig/arch/arm/Makefile linux-4.1.23/arch/arm/Makefile ---- linux-4.1.23.orig/arch/arm/Makefile 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/Makefile 2016-05-02 22:53:50.000000000 +0200 -@@ -150,6 +150,8 @@ - - # Machine directory name. This list is sorted alphanumerically - # by CONFIG_* macro name. -+machine-$(CONFIG_ARCH_BCM2708) += bcm2708 -+machine-$(CONFIG_ARCH_BCM2709) += bcm2709 - machine-$(CONFIG_ARCH_ALPINE) += alpine - machine-$(CONFIG_ARCH_AT91) += at91 - machine-$(CONFIG_ARCH_AXXIA) += axxia -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/Makefile linux-4.1.23/arch/arm/boot/dts/Makefile ---- linux-4.1.23.orig/arch/arm/boot/dts/Makefile 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/boot/dts/Makefile 2016-05-02 22:53:50.000000000 +0200 -@@ -1,5 +1,25 @@ - ifeq ($(CONFIG_OF),y) - -+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb -+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-plus.dtb -+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-cm.dtb -+dtb-$(CONFIG_BCM2709_DT) += bcm2709-rpi-2-b.dtb -+dtb-$(CONFIG_BCM2709_DT) += bcm2710-rpi-3-b.dtb -+ -+# Raspberry Pi -+ifeq ($(CONFIG_BCM2708_DT),y) -+ RPI_DT_OVERLAYS=y -+endif -+ifeq ($(CONFIG_BCM2709_DT),y) -+ RPI_DT_OVERLAYS=y -+endif -+ifeq ($(CONFIG_ARCH_BCM2835),y) -+ RPI_DT_OVERLAYS=y -+endif -+ifeq ($(RPI_DT_OVERLAYS),y) -+ dts-dirs += overlays -+endif -+ - dtb-$(CONFIG_ARCH_ALPINE) += \ - alpine-db.dtb - dtb-$(CONFIG_MACH_ASM9260) += \ -@@ -660,7 +680,17 @@ - mt6592-evb.dtb \ - mt8127-moose.dtb \ - mt8135-evbp1.dtb -+ -+targets += dtbs dtbs_install -+targets += $(dtb-y) -+ - endif - - always := $(dtb-y) -+subdir-y := $(dts-dirs) - clean-files := *.dtb -+ -+# Enable fixups to support overlays on BCM2708 platforms -+ifeq ($(RPI_DT_OVERLAYS),y) -+ DTC_FLAGS ?= -@ -+endif -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/armada-375.dtsi linux-4.1.23/arch/arm/boot/dts/armada-375.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/armada-375.dtsi 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/boot/dts/armada-375.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -508,7 +508,7 @@ - }; - - sata@a0000 { -- compatible = "marvell,armada-370-sata"; -+ compatible = "marvell,orion-sata"; - reg = <0xa0000 0x5000>; - interrupts = ; - clocks = <&gateclk 14>, <&gateclk 20>; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,144 @@ -+/dts-v1/; -+ -+/include/ "bcm2708.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ model = "Raspberry Pi Model B+"; -+}; -+ -+&gpio { -+ sdhost_pins: sdhost_pins { -+ brcm,pins = <48 49 50 51 52 53>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ spi0_pins: spi0_pins { -+ brcm,pins = <7 8 9 10 11>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ i2c0_pins: i2c0 { -+ brcm,pins = <0 1>; -+ brcm,function = <4>; -+ }; -+ -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; -+ }; -+ -+ i2s_pins: i2s { -+ brcm,pins = <18 19 20 21>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+}; -+ -+&sdhost { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhost_pins>; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&fb { -+ status = "okay"; -+}; -+ -+&uart0 { -+ status = "okay"; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>; -+ -+ spidev@0{ -+ compatible = "spidev"; -+ reg = <0>; /* CE0 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+ -+ spidev@1{ -+ compatible = "spidev"; -+ reg = <1>; /* CE1 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c2 { -+ clock-frequency = <100000>; -+}; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&random { -+ status = "okay"; -+}; -+ -+&leds { -+ act_led: act { -+ label = "led0"; -+ linux,default-trigger = "mmc0"; -+ gpios = <&gpio 47 0>; -+ }; -+ -+ pwr_led: pwr { -+ label = "led1"; -+ linux,default-trigger = "input"; -+ gpios = <&gpio 35 0>; -+ }; -+}; -+ -+/ { -+ __overrides__ { -+ uart0 = <&uart0>,"status"; -+ uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; -+ uart1 = <&uart1>,"status"; -+ i2s = <&i2s>,"status"; -+ spi = <&spi0>,"status"; -+ i2c0 = <&i2c0>,"status"; -+ i2c1 = <&i2c1>,"status"; -+ i2c2_iknowwhatimdoing = <&i2c2>,"status"; -+ i2c0_baudrate = <&i2c0>,"clock-frequency:0"; -+ i2c1_baudrate = <&i2c1>,"clock-frequency:0"; -+ i2c2_baudrate = <&i2c2>,"clock-frequency:0"; -+ core_freq = <&clk_core>,"clock-frequency:0"; -+ -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; -+ act_led_trigger = <&act_led>,"linux,default-trigger"; -+ -+ pwr_led_gpio = <&pwr_led>,"gpios:4"; -+ pwr_led_activelow = <&pwr_led>,"gpios:8"; -+ pwr_led_trigger = <&pwr_led>,"linux,default-trigger"; -+ -+ audio = <&audio>,"status"; -+ watchdog = <&watchdog>,"status"; -+ random = <&random>,"status"; -+ sd_overclock = <&sdhost>,"brcm,overclock-50:0"; -+ sd_force_pio = <&sdhost>,"brcm,force-pio?"; -+ sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; -+ sd_debug = <&sdhost>,"brcm,debug"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-b.dts linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-b.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-b.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-b.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,134 @@ -+/dts-v1/; -+ -+/include/ "bcm2708.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ model = "Raspberry Pi Model B"; -+}; -+ -+&gpio { -+ sdhost_pins: sdhost_pins { -+ brcm,pins = <48 49 50 51 52 53>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ spi0_pins: spi0_pins { -+ brcm,pins = <7 8 9 10 11>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ i2c0_pins: i2c0 { -+ brcm,pins = <0 1>; -+ brcm,function = <4>; -+ }; -+ -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; -+ }; -+ -+ i2s_pins: i2s { -+ brcm,pins = <28 29 30 31>; -+ brcm,function = <6>; /* alt2 */ -+ }; -+}; -+ -+&sdhost { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhost_pins>; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&fb { -+ status = "okay"; -+}; -+ -+&uart0 { -+ status = "okay"; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>; -+ -+ spidev@0{ -+ compatible = "spidev"; -+ reg = <0>; /* CE0 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+ -+ spidev@1{ -+ compatible = "spidev"; -+ reg = <1>; /* CE1 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c2 { -+ clock-frequency = <100000>; -+}; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&random { -+ status = "okay"; -+}; -+ -+&leds { -+ act_led: act { -+ label = "led0"; -+ linux,default-trigger = "mmc0"; -+ gpios = <&gpio 16 1>; -+ }; -+}; -+ -+/ { -+ __overrides__ { -+ uart0 = <&uart0>,"status"; -+ uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; -+ uart1 = <&uart1>,"status"; -+ i2s = <&i2s>,"status"; -+ spi = <&spi0>,"status"; -+ i2c0 = <&i2c0>,"status"; -+ i2c1 = <&i2c1>,"status"; -+ i2c2_iknowwhatimdoing = <&i2c2>,"status"; -+ i2c0_baudrate = <&i2c0>,"clock-frequency:0"; -+ i2c1_baudrate = <&i2c1>,"clock-frequency:0"; -+ i2c2_baudrate = <&i2c2>,"clock-frequency:0"; -+ core_freq = <&clk_core>,"clock-frequency:0"; -+ -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; -+ act_led_trigger = <&act_led>,"linux,default-trigger"; -+ -+ audio = <&audio>,"status"; -+ watchdog = <&watchdog>,"status"; -+ random = <&random>,"status"; -+ sd_overclock = <&sdhost>,"brcm,overclock-50:0"; -+ sd_force_pio = <&sdhost>,"brcm,force-pio?"; -+ sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; -+ sd_debug = <&sdhost>,"brcm,debug"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-cm.dts linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-cm.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-cm.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-cm.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,96 @@ -+/dts-v1/; -+ -+/include/ "bcm2708-rpi-cm.dtsi" -+ -+/ { -+ model = "Raspberry Pi Compute Module"; -+}; -+ -+&uart0 { -+ status = "okay"; -+}; -+ -+&gpio { -+ spi0_pins: spi0_pins { -+ brcm,pins = <7 8 9 10 11>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ i2c0_pins: i2c0 { -+ brcm,pins = <0 1>; -+ brcm,function = <4>; -+ }; -+ -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; -+ }; -+ -+ i2s_pins: i2s { -+ brcm,pins = <18 19 20 21>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>; -+ -+ spidev@0{ -+ compatible = "spidev"; -+ reg = <0>; /* CE0 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+ -+ spidev@1{ -+ compatible = "spidev"; -+ reg = <1>; /* CE1 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c2 { -+ clock-frequency = <100000>; -+}; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&random { -+ status = "okay"; -+}; -+ -+/ { -+ __overrides__ { -+ uart0 = <&uart0>,"status"; -+ uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; -+ uart1 = <&uart1>,"status"; -+ i2s = <&i2s>,"status"; -+ spi = <&spi0>,"status"; -+ i2c0 = <&i2c0>,"status"; -+ i2c1 = <&i2c1>,"status"; -+ i2c2_iknowwhatimdoing = <&i2c2>,"status"; -+ i2c0_baudrate = <&i2c0>,"clock-frequency:0"; -+ i2c1_baudrate = <&i2c1>,"clock-frequency:0"; -+ i2c2_baudrate = <&i2c2>,"clock-frequency:0"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2708-rpi-cm.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,45 @@ -+/include/ "bcm2708.dtsi" -+ -+&gpio { -+ mmc_pins: mmc_pins { -+ brcm,pins = <48 49 50 51 52 53>; -+ brcm,function = <7>; /* alt3 */ -+ }; -+}; -+ -+&leds { -+ act_led: act { -+ label = "led0"; -+ linux,default-trigger = "mmc0"; -+ gpios = <&gpio 47 0>; -+ }; -+}; -+ -+ -+&mmc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc_pins>; -+ non-removable; -+ bus-width = <4>; -+ status = "okay"; -+ brcm,overclock-50 = <0>; -+}; -+ -+&fb { -+ status = "okay"; -+}; -+ -+/ { -+ __overrides__ { -+ core_freq = <&clk_core>,"clock-frequency:0"; -+ -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; -+ act_led_trigger = <&act_led>,"linux,default-trigger"; -+ -+ audio = <&audio>,"status"; -+ watchdog = <&watchdog>,"status"; -+ random = <&random>,"status"; -+ sd_overclock = <&mmc>,"brcm,overclock-50:0"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2708.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2708.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2708.dtsi 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2708.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,25 @@ -+/include/ "bcm2708_common.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2708"; -+ model = "BCM2708"; -+ -+ chosen { -+ /* No padding required - the boot loader can do that. */ -+ bootargs = ""; -+ }; -+ -+ soc { -+ ranges = <0x7e000000 0x20000000 0x01000000>; -+ -+ arm-pmu { -+ compatible = "arm,arm1176-pmu"; -+ }; -+ -+ gpiomem { -+ compatible = "brcm,bcm2835-gpiomem"; -+ reg = <0x7e200000 0x1000>; -+ status = "okay"; -+ }; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2708_common.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2708_common.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2708_common.dtsi 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2708_common.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,347 @@ -+/include/ "skeleton.dtsi" -+ -+/ { -+ interrupt-parent = <&intc>; -+ -+ aliases { -+ audio = &audio; -+ sound = &sound; -+ soc = &soc; -+ dma = &dma; -+ intc = &intc; -+ watchdog = &watchdog; -+ random = &random; -+ mailbox = &mailbox; -+ gpio = &gpio; -+ uart0 = &uart0; -+ sdhost = &sdhost; -+ i2s = &i2s; -+ spi0 = &spi0; -+ i2c0 = &i2c0; -+ uart1 = &uart1; -+ mmc = &mmc; -+ i2c1 = &i2c1; -+ i2c2 = &i2c2; -+ usb = &usb; -+ leds = &leds; -+ fb = &fb; -+ vchiq = &vchiq; -+ thermal = &thermal; -+ clocks = &clocks; -+ }; -+ -+ /* Onboard audio */ -+ audio: audio { -+ compatible = "brcm,bcm2835-audio"; -+ brcm,pwm-channels = <8>; -+ status = "disabled"; -+ }; -+ -+ /* External sound card */ -+ sound: sound { -+ }; -+ -+ soc: soc { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ dma: dma@7e007000 { -+ compatible = "brcm,bcm2835-dma"; -+ reg = <0x7e007000 0xf00>; -+ interrupts = <1 16>, -+ <1 17>, -+ <1 18>, -+ <1 19>, -+ <1 20>, -+ <1 21>, -+ <1 22>, -+ <1 23>, -+ <1 24>, -+ <1 25>, -+ <1 26>, -+ <1 27>; -+ -+ #dma-cells = <1>; -+ brcm,dma-channel-mask = <0x0f35>; -+ }; -+ -+ intc: interrupt-controller@7e00b200 { -+ compatible = "brcm,bcm2708-armctrl-ic"; -+ reg = <0x7e00b200 0x200>; -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ }; -+ -+ mailbox: mailbox@7e00b800 { -+ compatible = "brcm,bcm2835-mbox"; -+ reg = <0x7e00b880 0x40>; -+ interrupts = <0 1>; -+ #mbox-cells = <0>; -+ }; -+ -+ watchdog: watchdog@7e100000 { -+ compatible = "brcm,bcm2835-pm-wdt"; -+ reg = <0x7e100000 0x28>; -+ status = "disabled"; -+ }; -+ -+ cprman: cprman@7e101000 { -+ compatible = "brcm,bcm2835-cprman"; -+ #clock-cells = <1>; -+ reg = <0x7e101000 0x2000>; -+ -+ /* CPRMAN derives everything from the platform's -+ * oscillator. -+ */ -+ clocks = <&clk_osc>; -+ status = "disabled"; -+ }; -+ -+ random: rng@7e104000 { -+ compatible = "brcm,bcm2835-rng"; -+ reg = <0x7e104000 0x10>; -+ status = "disabled"; -+ }; -+ -+ gpio: gpio@7e200000 { -+ compatible = "brcm,bcm2835-gpio"; -+ reg = <0x7e200000 0xb4>; -+ interrupts = <2 17>, <2 18>; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+ -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ }; -+ -+ uart0: uart@7e201000 { -+ compatible = "arm,pl011", "arm,primecell"; -+ reg = <0x7e201000 0x1000>; -+ interrupts = <2 25>; -+ clocks = <&clk_uart0 &clk_apb_p>; -+ clock-names = "uartclk","apb_pclk"; -+ arm,primecell-periphid = <0x00241011>; // For an explanation, see -+ // https://github.com/raspberrypi/linux/commit/13731d862cf5219216533a3b0de052cee4cc5038 -+ status = "disabled"; -+ }; -+ -+ sdhost: sdhost@7e202000 { -+ compatible = "brcm,bcm2835-sdhost"; -+ reg = <0x7e202000 0x100>; -+ interrupts = <2 24>; -+ clocks = <&clk_core>; -+ dmas = <&dma 13>; -+ dma-names = "rx-tx"; -+ brcm,overclock-50 = <0>; -+ brcm,pio-limit = <1>; -+ status = "disabled"; -+ }; -+ -+ i2s: i2s@7e203000 { -+ compatible = "brcm,bcm2708-i2s"; -+ reg = <0x7e203000 0x24>, -+ <0x7e101098 0x08>; -+ -+ //dmas = <&dma 2>, -+ // <&dma 3>; -+ dma-names = "tx", "rx"; -+ status = "disabled"; -+ }; -+ -+ spi0: spi@7e204000 { -+ compatible = "brcm,bcm2835-spi"; -+ reg = <0x7e204000 0x1000>; -+ interrupts = <2 22>; -+ clocks = <&clk_core>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "disabled"; -+ /* the dma channels */ -+ dmas = <&dma 6>, <&dma 7>; -+ dma-names = "tx", "rx"; -+ /* the chipselects used - <0> means native GPIO -+ * add more gpios if necessary as <&gpio 6 1> -+ * (but do not forget to make them output!) -+ */ -+ cs-gpios = <0>, <0>; -+ }; -+ -+ i2c0: i2c@7e205000 { -+ compatible = "brcm,bcm2708-i2c"; -+ reg = <0x7e205000 0x1000>; -+ interrupts = <2 21>; -+ clocks = <&clk_core>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "disabled"; -+ }; -+ -+ pwm: pwm@7e20c000 { -+ compatible = "brcm,bcm2835-pwm"; -+ reg = <0x7e20c000 0x28>; -+ clocks = <&clk_pwm>; -+ #pwm-cells = <2>; -+ status = "disabled"; -+ }; -+ -+ uart1: uart@7e215040 { -+ compatible = "brcm,bcm2835-aux-uart", "ns16550"; -+ reg = <0x7e215040 0x40>; -+ interrupts = <1 29>; -+ clocks = <&clk_uart1>; -+ reg-shift = <2>; -+ no-loopback-test; -+ status = "disabled"; -+ }; -+ -+ mmc: mmc@7e300000 { -+ compatible = "brcm,bcm2835-mmc"; -+ reg = <0x7e300000 0x100>; -+ interrupts = <2 30>; -+ clocks = <&clk_mmc>; -+ dmas = <&dma 11>; -+ dma-names = "rx-tx"; -+ brcm,overclock-50 = <0>; -+ status = "disabled"; -+ }; -+ -+ i2c1: i2c@7e804000 { -+ compatible = "brcm,bcm2708-i2c"; -+ reg = <0x7e804000 0x1000>; -+ interrupts = <2 21>; -+ clocks = <&clk_core>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "disabled"; -+ }; -+ -+ i2c2: i2c@7e805000 { -+ // Beware - this is shared with the HDMI module. -+ // Careless use may break (really) your display. -+ // Caveat emptor. -+ compatible = "brcm,bcm2708-i2c"; -+ reg = <0x7e805000 0x1000>; -+ interrupts = <2 21>; -+ clocks = <&clk_core>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "disabled"; -+ }; -+ -+ smi: smi@7e600000 { -+ compatible = "brcm,bcm2835-smi"; -+ reg = <0x7e600000 0x44>, <0x7e1010b0 0x8>; -+ interrupts = <2 16>; -+ brcm,smi-clock-source = <6>; -+ brcm,smi-clock-divisor = <4>; -+ dmas = <&dma 4>; -+ dma-names = "rx-tx"; -+ status = "disabled"; -+ }; -+ -+ usb: usb@7e980000 { -+ compatible = "brcm,bcm2708-usb"; -+ reg = <0x7e980000 0x10000>, -+ <0x7e006000 0x1000>; -+ interrupts = <2 0>, -+ <1 9>; -+ }; -+ -+ firmware: firmware { -+ compatible = "raspberrypi,bcm2835-firmware"; -+ mboxes = <&mailbox>; -+ }; -+ -+ leds: leds { -+ compatible = "gpio-leds"; -+ }; -+ -+ fb: fb { -+ compatible = "brcm,bcm2708-fb"; -+ firmware = <&firmware>; -+ status = "disabled"; -+ }; -+ -+ vchiq: vchiq { -+ compatible = "brcm,bcm2835-vchiq"; -+ reg = <0x7e00b840 0xf>; -+ interrupts = <0 2>; -+ cache-line-size = <32>; -+ firmware = <&firmware>; -+ }; -+ -+ thermal: thermal { -+ compatible = "brcm,bcm2835-thermal"; -+ firmware = <&firmware>; -+ }; -+ }; -+ -+ clocks: clocks { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ clk_core: clock@0 { -+ compatible = "fixed-clock"; -+ reg = <0>; -+ #clock-cells = <0>; -+ clock-output-names = "core"; -+ clock-frequency = <250000000>; -+ }; -+ -+ clk_mmc: clock@1 { -+ compatible = "fixed-clock"; -+ reg = <1>; -+ #clock-cells = <0>; -+ clock-output-names = "mmc"; -+ clock-frequency = <250000000>; -+ }; -+ -+ clk_uart0: clock@2 { -+ compatible = "fixed-clock"; -+ reg = <2>; -+ #clock-cells = <0>; -+ clock-output-names = "uart0_pclk"; -+ clock-frequency = <3000000>; -+ }; -+ -+ clk_apb_p: clock@3 { -+ compatible = "fixed-clock"; -+ reg = <3>; -+ #clock-cells = <0>; -+ clock-output-names = "apb_pclk"; -+ clock-frequency = <126000000>; -+ }; -+ -+ clk_pwm: clock@4 { -+ compatible = "fixed-clock"; -+ reg = <4>; -+ #clock-cells = <0>; -+ clock-output-names = "pwm"; -+ clock-frequency = <100000000>; -+ }; -+ -+ clk_uart1: clock@5 { -+ compatible = "fixed-factor-clock"; -+ reg = <5>; -+ clocks = <&clk_core>; -+ #clock-cells = <0>; -+ clock-div = <1>; -+ clock-mult = <2>; -+ }; -+ -+ clk_osc: clock@6 { -+ compatible = "fixed-clock"; -+ reg = <6>; -+ #clock-cells = <0>; -+ clock-output-names = "osc"; -+ clock-frequency = <19200000>; -+ }; -+ }; -+ -+ __overrides__ { -+ cache_line_size = <&vchiq>, "cache-line-size:0"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2709-rpi-2-b.dts linux-4.1.23/arch/arm/boot/dts/bcm2709-rpi-2-b.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2709-rpi-2-b.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2709-rpi-2-b.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,144 @@ -+/dts-v1/; -+ -+/include/ "bcm2709.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2709"; -+ model = "Raspberry Pi 2 Model B"; -+}; -+ -+&gpio { -+ sdhost_pins: sdhost_pins { -+ brcm,pins = <48 49 50 51 52 53>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ spi0_pins: spi0_pins { -+ brcm,pins = <7 8 9 10 11>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ i2c0_pins: i2c0 { -+ brcm,pins = <0 1>; -+ brcm,function = <4>; -+ }; -+ -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; -+ }; -+ -+ i2s_pins: i2s { -+ brcm,pins = <18 19 20 21>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+}; -+ -+&sdhost { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhost_pins>; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&fb { -+ status = "okay"; -+}; -+ -+&uart0 { -+ status = "okay"; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>; -+ -+ spidev@0{ -+ compatible = "spidev"; -+ reg = <0>; /* CE0 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+ -+ spidev@1{ -+ compatible = "spidev"; -+ reg = <1>; /* CE1 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c2 { -+ clock-frequency = <100000>; -+}; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&random { -+ status = "okay"; -+}; -+ -+&leds { -+ act_led: act { -+ label = "led0"; -+ linux,default-trigger = "mmc0"; -+ gpios = <&gpio 47 0>; -+ }; -+ -+ pwr_led: pwr { -+ label = "led1"; -+ linux,default-trigger = "input"; -+ gpios = <&gpio 35 0>; -+ }; -+}; -+ -+/ { -+ __overrides__ { -+ uart0 = <&uart0>,"status"; -+ uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; -+ uart1 = <&uart1>,"status"; -+ i2s = <&i2s>,"status"; -+ spi = <&spi0>,"status"; -+ i2c0 = <&i2c0>,"status"; -+ i2c1 = <&i2c1>,"status"; -+ i2c2_iknowwhatimdoing = <&i2c2>,"status"; -+ i2c0_baudrate = <&i2c0>,"clock-frequency:0"; -+ i2c1_baudrate = <&i2c1>,"clock-frequency:0"; -+ i2c2_baudrate = <&i2c2>,"clock-frequency:0"; -+ core_freq = <&clk_core>,"clock-frequency:0"; -+ -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; -+ act_led_trigger = <&act_led>,"linux,default-trigger"; -+ -+ pwr_led_gpio = <&pwr_led>,"gpios:4"; -+ pwr_led_activelow = <&pwr_led>,"gpios:8"; -+ pwr_led_trigger = <&pwr_led>,"linux,default-trigger"; -+ -+ audio = <&audio>,"status"; -+ watchdog = <&watchdog>,"status"; -+ random = <&random>,"status"; -+ sd_overclock = <&sdhost>,"brcm,overclock-50:0"; -+ sd_force_pio = <&sdhost>,"brcm,force-pio?"; -+ sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; -+ sd_debug = <&sdhost>,"brcm,debug"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2709.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2709.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2709.dtsi 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2709.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,76 @@ -+/include/ "bcm2708_common.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2709"; -+ model = "BCM2709"; -+ -+ chosen { -+ /* No padding required - the boot loader can do that. */ -+ bootargs = ""; -+ }; -+ -+ soc { -+ ranges = <0x7e000000 0x3f000000 0x01000000>; -+ -+ arm-pmu { -+ compatible = "arm,cortex-a7-pmu"; -+ interrupts = <3 9>; -+ }; -+ -+ gpiomem { -+ compatible = "brcm,bcm2835-gpiomem"; -+ reg = <0x7e200000 0x1000>; -+ status = "okay"; -+ }; -+ }; -+ -+ timer { -+ compatible = "arm,armv7-timer"; -+ clock-frequency = <19200000>; -+ interrupts = <3 0>, // PHYS_SECURE_PPI -+ <3 1>, // PHYS_NONSECURE_PPI -+ <3 3>, // VIRT_PPI -+ <3 2>; // HYP_PPI -+ always-on; -+ }; -+ -+ cpus: cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ v7_cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0xf00>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0xf01>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu2: cpu@2 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0xf02>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu3: cpu@3 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0xf03>; -+ clock-frequency = <800000000>; -+ }; -+ }; -+ -+ __overrides__ { -+ arm_freq = <&v7_cpu0>, "clock-frequency:0", -+ <&v7_cpu1>, "clock-frequency:0", -+ <&v7_cpu2>, "clock-frequency:0", -+ <&v7_cpu3>, "clock-frequency:0"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2710-rpi-3-b.dts linux-4.1.23/arch/arm/boot/dts/bcm2710-rpi-3-b.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2710-rpi-3-b.dts 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2710-rpi-3-b.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,191 @@ -+/dts-v1/; -+ -+/include/ "bcm2710.dtsi" -+ -+/ { -+ model = "Raspberry Pi 3 Model B"; -+}; -+ -+&gpio { -+ sdhost_pins: sdhost_pins { -+ brcm,pins = <48 49 50 51 52 53>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ spi0_pins: spi0_pins { -+ brcm,pins = <7 8 9 10 11>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ i2c0_pins: i2c0 { -+ brcm,pins = <0 1>; -+ brcm,function = <4>; -+ }; -+ -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; -+ }; -+ -+ i2s_pins: i2s { -+ brcm,pins = <18 19 20 21>; -+ brcm,function = <4>; /* alt0 */ -+ }; -+ -+ sdio_pins: sdio_pins { -+ brcm,pins = <34 35 36 37 38 39>; -+ brcm,function = <7 7 7 7 7 7>; /* alt3 = SD1 */ -+ brcm,pull = <0 2 2 2 2 2>; -+ }; -+ -+ bt_pins: bt_pins { -+ brcm,pins = <43>; -+ brcm,function = <4>; /* alt0:GPCLK2 */ -+ brcm,pull = <0>; -+ }; -+ -+ uart0_pins: uart0_pins { -+ brcm,pins = <32 33>; -+ brcm,function = <7>; /* alt3=UART0 */ -+ brcm,pull = <0 2>; -+ }; -+ -+ uart1_pins: uart1_pins { -+ brcm,pins; -+ brcm,function; -+ brcm,pull; -+ }; -+}; -+ -+&sdhost { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhost_pins>; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&mmc { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdio_pins>; -+ non-removable; -+ bus-width = <4>; -+ status = "okay"; -+ brcm,overclock-50 = <0>; -+}; -+ -+&soc { -+ virtgpio: virtgpio { -+ compatible = "brcm,bcm2835-virtgpio"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ firmware = <&firmware>; -+ status = "okay"; -+ }; -+}; -+ -+&fb { -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins &bt_pins>; -+ status = "okay"; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins>; -+ status = "okay"; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>; -+ cs-gpios = <0 0>; -+ -+ spidev@0{ -+ compatible = "spidev"; -+ reg = <0>; /* CE0 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+ -+ spidev@1{ -+ compatible = "spidev"; -+ reg = <1>; /* CE1 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; -+ }; -+}; -+ -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins>; -+ clock-frequency = <100000>; -+}; -+ -+&i2c2 { -+ clock-frequency = <100000>; -+}; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&random { -+ status = "okay"; -+}; -+ -+&leds { -+ act_led: act { -+ label = "led0"; -+ linux,default-trigger = "mmc0"; -+ gpios = <&virtgpio 0 0>; -+ }; -+}; -+ -+/ { -+ chosen { -+ bootargs = "8250.nr_uarts=1"; -+ }; -+}; -+ -+/ { -+ __overrides__ { -+ uart0 = <&uart0>,"status"; -+ uart0_clkrate = <&clk_uart0>,"clock-frequency:0"; -+ uart1 = <&uart1>,"status"; -+ i2s = <&i2s>,"status"; -+ spi = <&spi0>,"status"; -+ i2c0 = <&i2c0>,"status"; -+ i2c1 = <&i2c1>,"status"; -+ i2c2_iknowwhatimdoing = <&i2c2>,"status"; -+ i2c0_baudrate = <&i2c0>,"clock-frequency:0"; -+ i2c1_baudrate = <&i2c1>,"clock-frequency:0"; -+ i2c2_baudrate = <&i2c2>,"clock-frequency:0"; -+ core_freq = <&clk_core>,"clock-frequency:0"; -+ -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; -+ act_led_trigger = <&act_led>,"linux,default-trigger"; -+ -+ audio = <&audio>,"status"; -+ watchdog = <&watchdog>,"status"; -+ random = <&random>,"status"; -+ sd_overclock = <&sdhost>,"brcm,overclock-50:0"; -+ sd_force_pio = <&sdhost>,"brcm,force-pio?"; -+ sd_pio_limit = <&sdhost>,"brcm,pio-limit:0"; -+ sd_debug = <&sdhost>,"brcm,debug"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2710.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2710.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2710.dtsi 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2710.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,76 @@ -+/include/ "bcm2708_common.dtsi" -+ -+/ { -+ compatible = "brcm,bcm2710","brcm,bcm2709"; -+ model = "BCM2710"; -+ -+ chosen { -+ /* No padding required - the boot loader can do that. */ -+ bootargs = ""; -+ }; -+ -+ soc { -+ ranges = <0x7e000000 0x3f000000 0x01000000>; -+ -+ arm-pmu { -+ compatible = "arm,cortex-a7-pmu"; -+ interrupts = <3 9>; -+ }; -+ -+ gpiomem { -+ compatible = "brcm,bcm2835-gpiomem"; -+ reg = <0x7e200000 0x1000>; -+ status = "okay"; -+ }; -+ }; -+ -+ timer { -+ compatible = "arm,armv7-timer"; -+ clock-frequency = <19200000>; -+ interrupts = <3 0>, // PHYS_SECURE_PPI -+ <3 1>, // PHYS_NONSECURE_PPI -+ <3 3>, // VIRT_PPI -+ <3 2>; // HYP_PPI -+ always-on; -+ }; -+ -+ cpus: cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ v7_cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x000>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x001>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu2: cpu@2 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x002>; -+ clock-frequency = <800000000>; -+ }; -+ -+ v7_cpu3: cpu@3 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a7"; -+ reg = <0x003>; -+ clock-frequency = <800000000>; -+ }; -+ }; -+ -+ __overrides__ { -+ arm_freq = <&v7_cpu0>, "clock-frequency:0", -+ <&v7_cpu1>, "clock-frequency:0", -+ <&v7_cpu2>, "clock-frequency:0", -+ <&v7_cpu3>, "clock-frequency:0"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts linux-4.1.23/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -4,27 +4,40 @@ - / { - compatible = "raspberrypi,model-b-plus", "brcm,bcm2835"; - model = "Raspberry Pi Model B+"; -- -- leds { -- act { -- gpios = <&gpio 47 0>; -- }; -- -- pwr { -- label = "PWR"; -- gpios = <&gpio 35 0>; -- default-state = "keep"; -- linux,default-trigger = "default-on"; -- }; -- }; - }; - - &gpio { -- pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; -- -- /* I2S interface */ -- i2s_alt0: i2s_alt0 { -+ i2s_pins: i2s { - brcm,pins = <18 19 20 21>; - brcm,function = <4>; /* alt0 */ - }; - }; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&act_led { -+ gpios = <&gpio 47 0>; -+}; -+ -+&leds { -+ pwr_led: pwr { -+ label = "led1"; -+ linux,default-trigger = "input"; -+ gpios = <&gpio 35 0>; -+ }; -+}; -+ -+/ { -+ __overrides__ { -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; -+ -+ pwr_led_gpio = <&pwr_led>,"gpios:4"; -+ pwr_led_activelow = <&pwr_led>,"gpios:8"; -+ pwr_led_trigger = <&pwr_led>,"linux,default-trigger"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2835-rpi-b.dts linux-4.1.23/arch/arm/boot/dts/bcm2835-rpi-b.dts ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2835-rpi-b.dts 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2835-rpi-b.dts 2016-05-02 22:53:50.000000000 +0200 -@@ -5,19 +5,28 @@ - compatible = "raspberrypi,model-b", "brcm,bcm2835"; - model = "Raspberry Pi Model B"; - -- leds { -- act { -- gpios = <&gpio 16 1>; -- }; -- }; - }; - - &gpio { -- pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>; -- -- /* I2S interface */ -- i2s_alt2: i2s_alt2 { -+ i2s_pins: i2s { - brcm,pins = <28 29 30 31>; -- brcm,function = <6>; /* alt2 */ -+ brcm,function = <4>; /* alt0 */ -+ }; -+}; -+ -+&i2s { -+ #sound-dai-cells = <0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2s_pins>; -+}; -+ -+&act_led { -+ gpios = <&gpio 16 1>; -+}; -+ -+/ { -+ __overrides__ { -+ act_led_gpio = <&act_led>,"gpios:4"; -+ act_led_activelow = <&act_led>,"gpios:8"; - }; - }; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2835-rpi.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2835-rpi.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2835-rpi.dtsi 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2835-rpi.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -1,51 +1,133 @@ - /include/ "bcm2835.dtsi" - - / { -+ /* This is left here in case u-boot needs it */ - memory { - reg = <0 0x10000000>; - }; - -- leds { -+ aliases { -+ soc = &soc; -+ spi0 = &spi0; -+ i2c0 = &i2c0; -+ i2c1 = &i2c1; -+ i2s = &i2s; -+ gpio = &gpio; -+ intc = &intc; -+ leds = &leds; -+ sound = &sound; -+ }; -+ -+ leds: leds { - compatible = "gpio-leds"; - -- act { -- label = "ACT"; -- default-state = "keep"; -- linux,default-trigger = "heartbeat"; -+ act_led: act { -+ label = "led0"; -+ linux,default-trigger = "mmc0"; -+ }; -+ }; -+ -+ soc { -+ firmware: firmware { -+ compatible = "raspberrypi,bcm2835-firmware"; -+ mboxes = <&mailbox>; -+ }; -+ -+ fb: fb { -+ compatible = "brcm,bcm2708-fb"; -+ firmware = <&firmware>; -+ }; -+ -+ thermal: thermal { -+ compatible = "brcm,bcm2835-thermal"; -+ firmware = <&firmware>; -+ }; -+ -+ vchiq: vchiq { -+ compatible = "brcm,bcm2835-vchiq"; -+ reg = <0x7e00b840 0xf>; -+ interrupts = <0 2>; -+ cache-line-size = <32>; -+ firmware = <&firmware>; - }; - }; -+ -+ /* Onboard audio */ -+ audio: audio { -+ compatible = "brcm,bcm2835-audio"; -+ brcm,pwm-channels = <8>; -+ status = "disabled"; -+ }; -+ -+ /* External sound card */ -+ sound: sound { -+ }; - }; - - &gpio { -- pinctrl-names = "default"; -+ spi0_pins: spi0_pins { -+ brcm,pins = <7 8 9 10 11>; -+ brcm,function = <4>; /* alt0 */ -+ }; - -- gpioout: gpioout { -- brcm,pins = <6>; -- brcm,function = <1>; /* GPIO out */ -+ i2c0_pins: i2c0 { -+ brcm,pins = <0 1>; -+ brcm,function = <4>; - }; - -- alt0: alt0 { -- brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>; -- brcm,function = <4>; /* alt0 */ -+ i2c1_pins: i2c1 { -+ brcm,pins = <2 3>; -+ brcm,function = <4>; -+ }; -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_pins>; -+ -+ spidev@0{ -+ compatible = "spidev"; -+ reg = <0>; /* CE0 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; - }; - -- alt3: alt3 { -- brcm,pins = <48 49 50 51 52 53>; -- brcm,function = <7>; /* alt3 */ -+ spidev@1{ -+ compatible = "spidev"; -+ reg = <1>; /* CE1 */ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ spi-max-frequency = <500000>; - }; - }; - - &i2c0 { -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; - clock-frequency = <100000>; - }; - - &i2c1 { -- status = "okay"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c1_pins>; - clock-frequency = <100000>; - }; - --&sdhci { -+&mmc { - status = "okay"; - bus-width = <4>; - }; -+ -+/ { -+ __overrides__ { -+ i2s = <&i2s>,"status"; -+ spi = <&spi0>,"status"; -+ i2c0 = <&i2c0>,"status"; -+ i2c1 = <&i2c1>,"status"; -+ i2c0_baudrate = <&i2c0>,"clock-frequency:0"; -+ i2c1_baudrate = <&i2c1>,"clock-frequency:0"; -+ act_led_trigger = <&act_led>,"linux,default-trigger"; -+ audio = <&audio>,"status"; -+ }; -+}; -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/bcm2835.dtsi linux-4.1.23/arch/arm/boot/dts/bcm2835.dtsi ---- linux-4.1.23.orig/arch/arm/boot/dts/bcm2835.dtsi 2016-04-25 17:57:36.000000000 +0200 -+++ linux-4.1.23/arch/arm/boot/dts/bcm2835.dtsi 2016-05-02 22:53:50.000000000 +0200 -@@ -6,14 +6,15 @@ - interrupt-parent = <&intc>; - - chosen { -- bootargs = "earlyprintk console=ttyAMA0"; -+ bootargs = ""; - }; - -- soc { -+ soc: soc { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x7e000000 0x20000000 0x02000000>; -+ dma-ranges = <0x40000000 0x00000000 0x20000000>; - - timer@7e003000 { - compatible = "brcm,bcm2835-system-timer"; -@@ -50,16 +51,23 @@ - #interrupt-cells = <2>; - }; - -- watchdog@7e100000 { -+ watchdog: watchdog@7e100000 { - compatible = "brcm,bcm2835-pm-wdt"; - reg = <0x7e100000 0x28>; - }; - -- rng@7e104000 { -+ random: rng@7e104000 { - compatible = "brcm,bcm2835-rng"; - reg = <0x7e104000 0x10>; - }; - -+ mailbox: mailbox@7e00b800 { -+ compatible = "brcm,bcm2835-mbox"; -+ reg = <0x7e00b880 0x40>; -+ interrupts = <0 1>; -+ #mbox-cells = <0>; -+ }; -+ - gpio: gpio@7e200000 { - compatible = "brcm,bcm2835-gpio"; - reg = <0x7e200000 0xb4>; -@@ -83,7 +91,7 @@ - #interrupt-cells = <2>; - }; - -- uart@7e201000 { -+ uart0: uart@7e201000 { - compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; - reg = <0x7e201000 0x1000>; - interrupts = <2 25>; -@@ -93,8 +101,8 @@ - - i2s: i2s@7e203000 { - compatible = "brcm,bcm2835-i2s"; -- reg = <0x7e203000 0x20>, -- <0x7e101098 0x02>; -+ reg = <0x7e203000 0x24>, -+ <0x7e101098 0x08>; - - dmas = <&dma 2>, - <&dma 3>; -@@ -102,7 +110,7 @@ - status = "disabled"; - }; - -- spi: spi@7e204000 { -+ spi0: spi@7e204000 { - compatible = "brcm,bcm2835-spi"; - reg = <0x7e204000 0x1000>; - interrupts = <2 22>; -@@ -122,11 +130,14 @@ - status = "disabled"; - }; - -- sdhci: sdhci@7e300000 { -- compatible = "brcm,bcm2835-sdhci"; -+ mmc: mmc@7e300000 { -+ compatible = "brcm,bcm2835-mmc"; - reg = <0x7e300000 0x100>; - interrupts = <2 30>; - clocks = <&clk_mmc>; -+ dmas = <&dma 11>, -+ <&dma 11>; -+ dma-names = "tx", "rx"; - status = "disabled"; - }; - -@@ -140,10 +151,12 @@ - status = "disabled"; - }; - -- usb@7e980000 { -- compatible = "brcm,bcm2835-usb"; -- reg = <0x7e980000 0x10000>; -- interrupts = <1 9>; -+ usb: usb@7e980000 { -+ compatible = "brcm,bcm2708-usb"; -+ reg = <0x7e980000 0x10000>, -+ <0x7e006000 0x1000>; -+ interrupts = <2 0>, -+ <1 9>; - }; - - arm-pmu { -@@ -161,7 +174,7 @@ - reg = <0>; - #clock-cells = <0>; - clock-output-names = "mmc"; -- clock-frequency = <100000000>; -+ clock-frequency = <250000000>; - }; - - clk_i2c: clock@1 { -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/overlays/Makefile linux-4.1.23/arch/arm/boot/dts/overlays/Makefile ---- linux-4.1.23.orig/arch/arm/boot/dts/overlays/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/overlays/Makefile 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,87 @@ -+ifeq ($(CONFIG_OF),y) -+ -+# Overlays for the Raspberry Pi platform -+ -+ifeq ($(CONFIG_BCM2708_DT),y) -+ RPI_DT_OVERLAYS=y -+endif -+ifeq ($(CONFIG_BCM2709_DT),y) -+ RPI_DT_OVERLAYS=y -+endif -+ifeq ($(CONFIG_ARCH_BCM2835),y) -+ RPI_DT_OVERLAYS=y -+endif -+ -+dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += boomberry-dac-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += boomberry-digi-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += gpio-ir-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += gpio-poweroff-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += i2c-rtc-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += i2c-gpio-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += i2c0-bcm2708-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += i2c1-bcm2708-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += i2s-mmap-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pi3-act-led-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pi3-disable-bt-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pi3-miniuart-bt-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += pwm-2chan-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += qca7000-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += raspidac3-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += rpi-backlight-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += rpi-sense-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += sdio-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += smi-dev-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += smi-nand-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += smi-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += spi-bcm2708-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += spi-bcm2835-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += spi-dma-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += vc4-kms-v3d-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb -+dtb-$(RPI_DT_OVERLAYS) += wittypi-overlay.dtb -+ -+targets += dtbs dtbs_install -+targets += $(dtb-y) -+ -+endif -+ -+always := $(dtb-y) -+clean-files := *.dtb -+ -+# Enable fixups to support overlays on BCM2708 platforms -+ifeq ($(RPI_DT_OVERLAYS),y) -+ DTC_FLAGS ?= -@ -+endif -diff -Nur linux-4.1.23.orig/arch/arm/boot/dts/overlays/README linux-4.1.23/arch/arm/boot/dts/overlays/README ---- linux-4.1.23.orig/arch/arm/boot/dts/overlays/README 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.1.23/arch/arm/boot/dts/overlays/README 2016-05-02 22:53:50.000000000 +0200 -@@ -0,0 +1,914 @@ -+Introduction -+============ -+ -+This directory contains Device Tree overlays. Device Tree makes it possible -+to support many hardware configurations with a single kernel and without the -+need to explicitly load or blacklist kernel modules. Note that this isn't a -+"pure" Device Tree configuration (c.f. MACH_BCM2835) - some on-board devices -+are still configured by the board support code, but the intention is to -+eventually reach that goal. -+ -+On Raspberry Pi, Device Tree usage is controlled from /boot/config.txt. By -+default, the Raspberry Pi kernel boots with device tree enabled. You can -+completely disable DT usage (for now) by adding: -+ -+ device_tree= -+ -+to your config.txt, which should cause your Pi to revert to the old way of -+doing things after a reboot. -+ -+In /boot you will find a .dtb for each base platform. This describes the -+hardware that is part of the Raspberry Pi board. The loader (start.elf and its -+siblings) selects the .dtb file appropriate for the platform by name, and reads -+it into memory. At this point, all of the optional interfaces (i2c, i2s, spi) -+are disabled, but they can be enabled using Device Tree parameters: -+ -+ dtparam=i2c=on,i2s=on,spi=on -+ -+However, this shouldn't be necessary in many use cases b