From e21cef27840dbca07a4fea3e677ab422c4a90b45 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 30 Jan 2015 00:09:00 +0100 Subject: [PATCH] kernel: update banana pi, lamobo-r1 and add banana pro dtb. --- config/rootfiles/common/armv5tel/linux-multi | 1 + lfs/linux | 3 + .../linux-3.14.x-update_banana_dts.patch | 301 ++++++++++++++++++ 3 files changed, 305 insertions(+) create mode 100644 src/patches/linux-3.14.x-update_banana_dts.patch diff --git a/config/rootfiles/common/armv5tel/linux-multi b/config/rootfiles/common/armv5tel/linux-multi index 3ef35e05d..63881cd2c 100644 --- a/config/rootfiles/common/armv5tel/linux-multi +++ b/config/rootfiles/common/armv5tel/linux-multi @@ -110,6 +110,7 @@ boot/dtb-KVER-ipfire-multi #boot/dtb-KVER-ipfire-multi/sun5i-a13-olinuxino.dtb #boot/dtb-KVER-ipfire-multi/sun6i-a31-colombus.dtb #boot/dtb-KVER-ipfire-multi/sun7i-a20-bananapi.dtb +#boot/dtb-KVER-ipfire-multi/sun7i-a20-bananapro.dtb #boot/dtb-KVER-ipfire-multi/sun7i-a20-cubieboard2.dtb #boot/dtb-KVER-ipfire-multi/sun7i-a20-cubietruck.dtb #boot/dtb-KVER-ipfire-multi/sun7i-a20-lamobo-r1.dtb diff --git a/lfs/linux b/lfs/linux index 8295c4b83..f961340ea 100644 --- a/lfs/linux +++ b/lfs/linux @@ -172,6 +172,9 @@ ifeq "$(KCFG)" "-multi" # Apply Arm7-multiarch kernel patches. cd $(DIR_APP) && xzcat $(DIR_DL)/arm7-multi-patches-$(A7M_PATCHES).patch.xz | patch -Np1 + # Update Banana Pi, Lamobo-R1 and add Banana Pro dtb + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-3.14.x-update_banana_dts.patch + # Install switch api userspace header cd $(DIR_APP) && install -v -m644 include/uapi/linux/switch.h /usr/include/linux/ endif diff --git a/src/patches/linux-3.14.x-update_banana_dts.patch b/src/patches/linux-3.14.x-update_banana_dts.patch new file mode 100644 index 000000000..309416b4d --- /dev/null +++ b/src/patches/linux-3.14.x-update_banana_dts.patch @@ -0,0 +1,301 @@ +diff -Naur linux-3.14.30.org/arch/arm/boot/dts/Makefile linux-3.14.30/arch/arm/boot/dts/Makefile +--- linux-3.14.30.org/arch/arm/boot/dts/Makefile 2015-01-29 19:56:17.000000000 +0100 ++++ linux-3.14.30/arch/arm/boot/dts/Makefile 2015-01-29 20:41:06.598335182 +0100 +@@ -304,6 +304,7 @@ + sun5i-a13-olinuxino-micro.dtb \ + sun6i-a31-colombus.dtb \ + sun7i-a20-bananapi.dtb \ ++ sun7i-a20-bananapro.dtb \ + sun7i-a20-cubieboard2.dtb \ + sun7i-a20-cubietruck.dtb \ + sun7i-a20-lamobo-r1.dtb \ +diff -Naur linux-3.14.30.org/arch/arm/boot/dts/sun7i-a20-bananapi.dts linux-3.14.30/arch/arm/boot/dts/sun7i-a20-bananapi.dts +--- linux-3.14.30.org/arch/arm/boot/dts/sun7i-a20-bananapi.dts 2015-01-29 19:56:17.000000000 +0100 ++++ linux-3.14.30/arch/arm/boot/dts/sun7i-a20-bananapi.dts 2015-01-29 20:33:18.143334959 +0100 +@@ -199,7 +199,7 @@ + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; +- startup-delay-us = <50000>; ++ startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 7 23 0>; + status = "okay"; +diff -Naur linux-3.14.30.org/arch/arm/boot/dts/sun7i-a20-bananapro.dts linux-3.14.30/arch/arm/boot/dts/sun7i-a20-bananapro.dts +--- linux-3.14.30.org/arch/arm/boot/dts/sun7i-a20-bananapro.dts 1970-01-01 01:00:00.000000000 +0100 ++++ linux-3.14.30/arch/arm/boot/dts/sun7i-a20-bananapro.dts 2015-01-29 20:40:45.153335172 +0100 +@@ -0,0 +1,262 @@ ++/* ++ * Copyright 2015 Arne Fitzenreiter ++ * Arne Fitzenreiter ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/dts-v1/; ++/include/ "sun7i-a20.dtsi" ++/include/ "sunxi-common-regulators.dtsi" ++#include ++ ++/ { ++ model = "LeMaker Banana Pro"; ++ compatible = "lemaker,bananapro", "allwinner,sun7i-a20"; ++ ++ aliases { ++ spi0 = &spi1; ++ spi1 = &spi2; ++ }; ++ ++ soc@01c00000 { ++ spi1: spi@01c06000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi1_pins_a>; ++ status = "okay"; ++ }; ++ ++ spi2: spi@01c17000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi2_pins_a>; ++ status = "okay"; ++ }; ++ ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default", "default"; ++ pinctrl-0 = <&mmc0_pins_a>; ++ pinctrl-1 = <&mmc0_cd_pin_bananapi>; ++ cd-gpios = <&pio 7 10 0>; /* PH10 */ ++ status = "okay"; ++ }; ++ ++ mmc3: mmc@01c12000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins_a>; ++ vmmc-supply = <®_vmmc3>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ }; ++ ++ usbphy: phy@01c13400 { ++ usb1_vbus-supply = <®_usb1_vbus>; ++ usb2_vbus-supply = <®_usb2_vbus>; ++ status = "okay"; ++ }; ++ ++ ehci0: usb@01c14000 { ++ status = "okay"; ++ }; ++ ++ ohci0: usb@01c14400 { ++ status = "okay"; ++ }; ++ ++ ahci: sata@01c18000 { ++ target-supply = <®_ahci_5v>; ++ status = "okay"; ++ }; ++ ++ ehci1: usb@01c1c000 { ++ status = "okay"; ++ }; ++ ++ ohci1: usb@01c1c400 { ++ status = "okay"; ++ }; ++ ++ pinctrl@01c20800 { ++ usb1_vbus_pin_bananapro: usb1_vbus_pin@0 { ++ allwinner,pins = "PH0"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ ++ usb2_vbus_pin_bananapro: usb2_vbus_pin@0 { ++ allwinner,pins = "PH1"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ ++ led_pins_bananapi: led_pins@0 { ++ allwinner,pins = "PH24", "PG2"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ ++ mmc0_cd_pin_bananapi: mmc0_cd_pin@0 { ++ allwinner,pins = "PH10"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ ++ vmmc3_pin_bananapro: vmmc3_pin@0 { ++ allwinner,pins = "PH22"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ ++ gmac_power_pin_bananapi: gmac_power_pin@0 { ++ allwinner,pins = "PH23"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ }; ++ ++ lradc: lradc@01c22800 { ++ allwinner,chan0-step = <200>; ++ linux,chan0-keycodes = ; ++ status = "okay"; ++ }; ++ ++ ir0: ir@01c21800 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ir0_pins_a>; ++ status = "okay"; ++ }; ++ ++ uart0: serial@01c28000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++ }; ++ ++ uart2: serial@01c28800 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart2_pins_a>; ++ status = "okay"; ++ }; ++ ++ uart6: serial@01c29800 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart6_pins_a>; ++ status = "okay"; ++ }; ++ ++ uart7: serial@01c29c00 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart7_pins_a>; ++ status = "okay"; ++ }; ++ ++ i2c0: i2c@01c2ac00 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins_a>; ++ status = "okay"; ++ ++ axp: axp20x@34 { ++ reg = <0x34>; ++ interrupt-parent = <&nmi_intc>; ++ interrupts = <0 8>; ++ axp,system-power-controller; ++ /include/ "x-powers-axp209.dtsi" ++ }; ++ }; ++ ++ i2c1: i2c@01c2b000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins_a>; ++ status = "okay"; ++ }; ++ ++ i2c2: i2c@01c2b400 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins_a>; ++ status = "okay"; ++ }; ++ ++ gmac: ethernet@01c50000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_pins_rgmii_a>; ++ phy = <&phy1>; ++ phy-mode = "rgmii"; ++ phy-supply = <®_gmac_3v3>; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&led_pins_bananapi>; ++ ++ green { ++ label = "bananapi:green:usr"; ++ gpios = <&pio 7 24 0>; ++ linux,default-trigger = "heartbeat"; ++ }; ++ blue { ++ label = "bananapi:blue:usr"; ++ gpios = <&pio 6 2 0>; ++ linux,default-trigger = "mmc0"; ++ }; ++ }; ++ ++ reg_ahci_5v: ahci-5v { ++ status = "okay"; ++ }; ++ ++ reg_usb1_vbus: usb1-vbus { ++ pinctrl-0 = <&usb1_vbus_pin_bananapro>; ++ gpio = <&pio 7 0 0>; /* PH0 */ ++ status = "okay"; ++ }; ++ ++ reg_usb2_vbus: usb2-vbus { ++ pinctrl-0 = <&usb2_vbus_pin_bananapro>; ++ gpio = <&pio 7 1 0>; /* PH1 */ ++ status = "okay"; ++ }; ++ ++ reg_gmac_3v3: gmac-3v3 { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gmac_power_pin_bananapi>; ++ regulator-name = "gmac-3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ startup-delay-us = <100000>; ++ enable-active-high; ++ gpio = <&pio 7 23 0>; ++ status = "okay"; ++ }; ++ ++ reg_vmmc3: vmmc3 { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&vmmc3_pin_bananapro>; ++ regulator-name = "vmmc3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ enable-active-high; ++ gpio = <&pio 7 22 0>; ++ }; ++}; +diff -Naur linux-3.14.30.org/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts linux-3.14.30/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts +--- linux-3.14.30.org/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts 2015-01-29 19:56:17.000000000 +0100 ++++ linux-3.14.30/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts 2015-01-30 00:00:01.678340873 +0100 +@@ -199,7 +199,7 @@ + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; +- startup-delay-us = <50000>; ++ startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 7 23 0>; + status = "okay"; -- 2.39.5