diff --git a/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline-4.19/0001-add-wifi-support.patch b/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline-4.19/0001-add-wifi-support.patch new file mode 100644 index 0000000..5dbd352 --- /dev/null +++ b/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline-4.19/0001-add-wifi-support.patch @@ -0,0 +1,104 @@ +From 16a862230369f3de334fed558497aa6ff0ced4f3 Mon Sep 17 00:00:00 2001 +From: Vicentiu Galanopulo +Date: Fri, 27 Sep 2019 18:40:09 +0200 +Subject: [PATCH] Rework 0001-add-wifi-support.patch + +This patch is a rework of the meta-sunxi patch with the same function because +the meta-sunxi patch fails to apply due to different source context in +this kernel version. + +Upstream-Status: Inappropriate [backporting] +Signed-off-by: Vicentiu Galanopulo + +--- + .../boot/dts/sun8i-h2-plus-orangepi-zero.dts | 45 +++++++++++++++---- + 1 file changed, 36 insertions(+), 9 deletions(-) + +diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +index 84cd9c061..fca0bdc59 100644 +--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts ++++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +@@ -80,13 +80,14 @@ + }; + }; + +- reg_vcc_wifi: reg_vcc_wifi { ++ vdd_wifi: vdd_wifi { + compatible = "regulator-fixed"; +- regulator-min-microvolt = <3300000>; +- regulator-max-microvolt = <3300000>; +- regulator-name = "vcc-wifi"; +- enable-active-high; ++ regulator-name = "wifi"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; + gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>; ++ startup-delay-us = <70000>; ++ enable-active-high; + }; + + reg_vdd_cpux: vdd-cpux-regulator { +@@ -106,10 +107,12 @@ + 1300000 1>; + }; + +- wifi_pwrseq: wifi_pwrseq { ++ pwrseq_wifi: pwrseq_wifi@0 { + compatible = "mmc-pwrseq-simple"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_rst>; + reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; +- post-power-on-delay-ms = <200>; ++ post-power-on-delay-ms = <50>; + }; + }; + +@@ -140,9 +143,12 @@ + }; + + &mmc1 { +- vmmc-supply = <®_vcc_wifi>; +- mmc-pwrseq = <&wifi_pwrseq>; ++ pinctrl-names = "default"; ++ vmmc-supply = <®_vcc3v3>; ++ vqmmc-supply = <&vdd_wifi>; ++ mmc-pwrseq = <&pwrseq_wifi>; + bus-width = <4>; ++ max-frequency = <16000000>; + non-removable; + status = "okay"; + +@@ -152,9 +158,30 @@ + */ + xr819: sdio_wifi@1 { + reg = <1>; ++ compatible = "xradio,xr819"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_wake>; ++ interrupt-parent = <&pio>; ++ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>; ++ interrupt-names = "host-wake"; ++ local-mac-address = [dc 44 6d c0 ff ee]; + }; + }; + ++&pio { ++ wifi_wake: wifi_wake { ++ pins = "PG10"; ++ function = "gpio_in"; ++ }; ++}; ++ ++&r_pio { ++ wifi_rst: wifi_rst { ++ pins = "PL7"; ++ function = "gpio_out"; ++ }; ++}; ++ + &ohci0 { + status = "okay"; + }; +-- +2.17.1 + diff --git a/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_4.19%.bbappend b/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_4.19%.bbappend new file mode 100644 index 0000000..ebdcd78 --- /dev/null +++ b/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_4.19%.bbappend @@ -0,0 +1,9 @@ +inherit kernel-resin +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-mainline-4.19:" + +SRC_URI_remove_orange-pi-zero = "\ + file://0001-add-wifi-support.patch \ + " +SRC_URI_append_orange-pi-zero = "\ + file://0001-add-wifi-support.patch \ + "