From e5601459ec62a767efe42d897c3ffa3679fd79c4 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 14 Dec 2018 01:59:34 +0000 Subject: [PATCH] Fix Raspberry Pi issues affecting WiFi (rhbz 1652093) --- bcm2837-fix-eth-leds.patch | 45 ++++++++++++++++++++++++ bcm2837-fix-wifi-gpio-polarity.patch | 51 ++++++++++++++++++++++++++++ kernel.spec | 11 +++++- 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 bcm2837-fix-eth-leds.patch create mode 100644 bcm2837-fix-wifi-gpio-polarity.patch diff --git a/bcm2837-fix-eth-leds.patch b/bcm2837-fix-eth-leds.patch new file mode 100644 index 000000000..02679141a --- /dev/null +++ b/bcm2837-fix-eth-leds.patch @@ -0,0 +1,45 @@ +From 6ef5bd6cfd5da9fe67aea031fd0a66ff77d64ad6 Mon Sep 17 00:00:00 2001 +From: Stefan Wahren +Date: Sat, 1 Sep 2018 20:16:22 +0200 +Subject: ARM: dts: bcm283x-rpi-lan7515: Enable Ethernet LEDs + +Since the LAN7515 on Raspberry Pi 3B+ doesn't have an EEPROM and the OTP +is empty, we need to enable the Ethernet LEDs via Device Tree. + +Signed-off-by: Stefan Wahren +--- + arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi +index 9403da0990d0..70bece63f9a7 100644 +--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi ++++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi +@@ -1,4 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0 ++#include ++ + / { + aliases { + ethernet0 = ðernet; +@@ -21,6 +23,18 @@ + ethernet: ethernet@1 { + compatible = "usb424,7800"; + reg = <1>; ++ ++ mdio { ++ #address-cells = <0x1>; ++ #size-cells = <0x0>; ++ eth_phy: ethernet-phy@1 { ++ reg = <1>; ++ microchip,led-modes = < ++ LAN78XX_LINK_1000_ACTIVITY ++ LAN78XX_LINK_10_100_ACTIVITY ++ >; ++ }; ++ }; + }; + }; + }; +-- +cgit 1.2-0.3.lf.el7 diff --git a/bcm2837-fix-wifi-gpio-polarity.patch b/bcm2837-fix-wifi-gpio-polarity.patch new file mode 100644 index 000000000..96055f78a --- /dev/null +++ b/bcm2837-fix-wifi-gpio-polarity.patch @@ -0,0 +1,51 @@ +From e25b6783c7b1bb79103d4617336879423f86b05e Mon Sep 17 00:00:00 2001 +From: Stefan Wahren +Date: Mon, 3 Dec 2018 19:37:08 +0100 +Subject: ARM: dts: bcm2837: Fix polarity of wifi reset GPIOs + +The commit b1b8f45b3130 ("ARM: dts: bcm2837: Add missing GPIOs of Expander") +introduced a wifi power sequence. Unfortunately the polarity of the reset +GPIOs were wrong and broke the wifi support on Raspberry Pi 3 B and +later in 3 B+. This wasn't discovered before since the power sequence +takes only effect in case the relevant MMC driver is compiled as a module. + +Fixes: b1b8f45b3130 ("ARM: dts: bcm2837: Add missing GPIOs of Expander") +Cc: stable@vger.kernel.org +Reported-by: Matthias Lueschner +Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911443 +Signed-off-by: Stefan Wahren +Reviewed-by: Eric Anholt +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 2 +- + arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts +index 4adb85e66be3..93762244be7f 100644 +--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts ++++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts +@@ -31,7 +31,7 @@ + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; +- reset-gpios = <&expgpio 1 GPIO_ACTIVE_HIGH>; ++ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; + }; + }; + +diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +index c318bcbc6ba7..89e6fd547c75 100644 +--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts ++++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +@@ -26,7 +26,7 @@ + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; +- reset-gpios = <&expgpio 1 GPIO_ACTIVE_HIGH>; ++ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; + }; + }; + +-- +cgit 1.2-0.3.lf.el7 diff --git a/kernel.spec b/kernel.spec index 0df8ca429..be79de7d8 100644 --- a/kernel.spec +++ b/kernel.spec @@ -42,7 +42,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 200 +%global baserelease 201 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -599,6 +599,12 @@ Patch332: raspberrypi-Fix-firmware-calls-with-large-buffers.patch # https://patchwork.kernel.org/patch/10677591/ Patch333: hwmon-rpi-Fix-initial-notify.patch +# From 4.20, fix RPi3B+ eth leds +Patch334: bcm2837-fix-eth-leds.patch + +# From 4.20, fix wifi gpio polarity +Patch335: bcm2837-fix-wifi-gpio-polarity.patch + # Patches enabling device specific brcm firmware nvram # https://www.spinics.net/lists/linux-wireless/msg178827.html Patch340: brcmfmac-Remove-firmware-loading-code-duplication.patch @@ -1878,6 +1884,9 @@ fi # # %changelog +* Fri Dec 14 2018 Peter Robinson 4.19.9-201 +- Fix Raspberry Pi issues affecting WiFi (rhbz 1652093) + * Thu Dec 13 2018 Jeremy Cline - 4.19.9-200 - Linux v4.19.9