From d5b51f6a4f09ce46cfe19bd30a3449817c6b313a Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Wed, 28 Dec 2016 22:07:56 +0300 Subject: [PATCH] Update Neo and Air patches for sun8i-dev --- .../nanopi-neo-air-wireless-and-dvfs.patch | 174 ++++++++++++++++++ patch/kernel/sun8i-dev/neo-air-wireless.patch | 69 ------- .../u-boot/u-boot-sunxi/add-nanopi-neo.patch | 9 +- 3 files changed, 177 insertions(+), 75 deletions(-) create mode 100644 patch/kernel/sun8i-dev/nanopi-neo-air-wireless-and-dvfs.patch delete mode 100644 patch/kernel/sun8i-dev/neo-air-wireless.patch diff --git a/patch/kernel/sun8i-dev/nanopi-neo-air-wireless-and-dvfs.patch b/patch/kernel/sun8i-dev/nanopi-neo-air-wireless-and-dvfs.patch new file mode 100644 index 0000000000..4d72d4812c --- /dev/null +++ b/patch/kernel/sun8i-dev/nanopi-neo-air-wireless-and-dvfs.patch @@ -0,0 +1,174 @@ +diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +index 3d64cafc..dab0bfe0 100644 +--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts ++++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts +@@ -45,7 +45,9 @@ + #include "sunxi-common-regulators.dtsi" + + #include ++#include + #include ++#include + + / { + model = "FriendlyARM NanoPi NEO"; +@@ -75,6 +77,89 @@ + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ + }; + }; ++ ++ wifi_pwrseq: wifi_pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_en_neoair>; ++ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ ++ }; ++ ++ vdd_cpux: gpio-regulator { ++ compatible = "regulator-gpio"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&vdd_cpux_r_opc>; ++ ++ regulator-name = "vdd-cpux"; ++ regulator-type = "voltage"; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1300000>; ++ regulator-ramp-delay = <50>; /* 4ms */ ++ ++ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; ++ gpios-states = <0x1>; ++ states = <1100000 0x0 ++ 1300000 0x1>; ++ }; ++}; ++ ++&cpu0 { ++ operating-points = < ++ 1008000 1300000 ++ 816000 1100000 ++ 624000 1100000 ++ 480000 1100000 ++ 312000 1100000 ++ 240000 1100000 ++ 120000 1100000 ++ >; ++ #cooling-cells = <2>; ++ cooling-min-level = <0>; ++ cooling-max-level = <6>; ++ cpu0-supply = <&vdd_cpux>; ++}; ++ ++&cpu_thermal { ++ trips { ++ cpu_warm: cpu_warm { ++ temperature = <65000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ cpu_hot: cpu_hot { ++ temperature = <75000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ cpu_very_hot: cpu_very_hot { ++ temperature = <90000>; ++ hysteresis = <2000>; ++ type = "passive"; ++ }; ++ cpu_crit: cpu_crit { ++ temperature = <105000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ cpu_warm_limit_cpu { ++ trip = <&cpu_warm>; ++ cooling-device = <&cpu0 THERMAL_NO_LIMIT 1>; ++ }; ++ cpu_hot_limit_cpu { ++ trip = <&cpu_hot>; ++ cooling-device = <&cpu0 2 3>; ++ }; ++ cpu_very_hot_limit_cpu { ++ trip = <&cpu_very_hot>; ++ cooling-device = <&cpu0 5 THERMAL_NO_LIMIT>; ++ }; ++ }; + }; + + &ehci3 { +@@ -91,12 +176,41 @@ + status = "okay"; + }; + ++&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins_a>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ bus-width = <4>; ++ non-removable; ++ status = "okay"; ++ ++ brcmf: bcrmf@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ ++ interrupt-names = "host-wake"; ++ }; ++}; ++ ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_8bit_pins>; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <®_vcc3v3>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ + &ohci3 { + status = "okay"; + }; + + &pio { +- leds_opc: led-pins { ++ leds_opc: led-pins@0 { + allwinner,pins = "PA10"; + allwinner,function = "gpio_out"; + allwinner,drive = ; +@@ -105,12 +219,25 @@ + }; + + &r_pio { +- leds_r_opc: led-pins { ++ leds_r_opc: led-pins@0 { + allwinner,pins = "PL10"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; ++ wifi_en_neoair: wifi_en_pin@0 { ++ allwinner,pins = "PL7"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; ++ ++ vdd_cpux_r_opc: regulator_pins@0 { ++ allwinner,pins = "PL6"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + &uart0 { diff --git a/patch/kernel/sun8i-dev/neo-air-wireless.patch b/patch/kernel/sun8i-dev/neo-air-wireless.patch deleted file mode 100644 index 608a687055..0000000000 --- a/patch/kernel/sun8i-dev/neo-air-wireless.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts -old mode 100644 -new mode 100755 -index 3d64caf..09eed25 ---- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts -+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts -@@ -75,6 +75,13 @@ - gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ - }; - }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&wifi_en_neoair>; -+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ -+ }; - }; - - &ehci3 { -@@ -91,6 +98,35 @@ - status = "okay"; - }; - -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins_a>; -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ brcmf: bcrmf@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ interrupt-parent = <&pio>; -+ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ -+ interrupt-names = "host-wake"; -+ }; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_8bit_pins>; -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ bus-width = <8>; -+ non-removable; -+ status = "okay"; -+}; -+ - &ohci3 { - status = "okay"; - }; -@@ -111,6 +147,12 @@ - allwinner,drive = ; - allwinner,pull = ; - }; -+ wifi_en_neoair: wifi_en_pin { -+ allwinner,pins = "PL7"; -+ allwinner,function = "gpio_out"; -+ allwinner,drive = ; -+ allwinner,pull = ; -+ }; - }; - - &uart0 { diff --git a/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch b/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch index 49c72fe970..1c67fd5f3a 100644 --- a/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch +++ b/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch @@ -1,13 +1,10 @@ diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig -index 5164245..4e7f0e4 100644 +index 51642457..4c52fa24 100644 --- a/configs/nanopi_neo_defconfig +++ b/configs/nanopi_neo_defconfig -@@ -4,12 +4,12 @@ CONFIG_MACH_SUN8I_H3=y - CONFIG_DRAM_CLK=408 - CONFIG_DRAM_ZQ=3881979 +@@ -6,10 +6,10 @@ CONFIG_DRAM_ZQ=3881979 CONFIG_DRAM_ODT_EN=y --CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo" -+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one" + CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set -CONFIG_CONSOLE_MUX=y CONFIG_SPL=y