aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-07-18 15:11:02 +0200
committerRafał Miłecki <rafal@milecki.pl>2022-07-18 19:04:24 +0200
commit7eda42a3f3b47ab3608bd19882b7db4a03ea5da2 (patch)
treeda91a3223511803bf3b783f18ebee539d80a7d75 /target
parent187f5147d3ed4af23f6fc546be739bcdb66d781f (diff)
downloadupstream-7eda42a3f3b47ab3608bd19882b7db4a03ea5da2.tar.gz
upstream-7eda42a3f3b47ab3608bd19882b7db4a03ea5da2.tar.bz2
upstream-7eda42a3f3b47ab3608bd19882b7db4a03ea5da2.zip
bcm4908: backport latest DT patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 001856fa51eaa704a254955138f76907eb02c2b4)
Diffstat (limited to 'target')
-rw-r--r--target/linux/bcm4908/patches-5.10/037-v5.20-0001-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patch79
-rw-r--r--target/linux/bcm4908/patches-5.10/037-v5.20-0002-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patch33
-rw-r--r--target/linux/bcm4908/patches-5.10/037-v5.20-0003-arm64-dts-broadcom-bcm4908-Fix-cpu-node-for-smp-boot.patch28
-rw-r--r--target/linux/bcm4908/patches-5.10/130-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch112
-rw-r--r--target/linux/bcm4908/patches-5.10/130-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch32
-rw-r--r--target/linux/bcm4908/patches-5.10/130-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch78
-rw-r--r--target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch2
7 files changed, 363 insertions, 1 deletions
diff --git a/target/linux/bcm4908/patches-5.10/037-v5.20-0001-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patch b/target/linux/bcm4908/patches-5.10/037-v5.20-0001-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patch
new file mode 100644
index 0000000000..d0d6151957
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.10/037-v5.20-0001-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patch
@@ -0,0 +1,79 @@
+From ea559c81b61603d4044df6f826f10a832c42c98c Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Date: Wed, 15 Jun 2022 17:52:59 -0700
+Subject: [PATCH] arm64: dts: broadcom: align gpio-key node names with dtschema
+
+The node names should be generic and DT schema expects certain pattern
+(e.g. with key/button/switch).
+
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Link: https://lore.kernel.org/r/20220616005333.18491-6-krzysztof.kozlowski@linaro.org
+---
+ .../broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 8 ++++----
+ .../boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts
+@@ -83,25 +83,25 @@
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+- brightness {
++ key-brightness {
+ label = "LEDs";
+ linux,code = <KEY_BRIGHTNESS_ZERO>;
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+
+- wps {
++ key-wps {
+ label = "WPS";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+
+- wifi {
++ key-wifi {
+ label = "WiFi";
+ linux,code = <KEY_RFKILL>;
+ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+ };
+
+- restart {
++ key-restart {
+ label = "Reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
+@@ -18,25 +18,25 @@
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+- wifi {
++ key-wifi {
+ label = "WiFi";
+ linux,code = <KEY_RFKILL>;
+ gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
+ };
+
+- wps {
++ key-wps {
+ label = "WPS";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
+ };
+
+- restart {
++ key-restart {
+ label = "Reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
+ };
+
+- brightness {
++ key-brightness {
+ label = "LEDs";
+ linux,code = <KEY_BRIGHTNESS_ZERO>;
+ gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/bcm4908/patches-5.10/037-v5.20-0002-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patch b/target/linux/bcm4908/patches-5.10/037-v5.20-0002-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patch
new file mode 100644
index 0000000000..c2b924a0fd
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.10/037-v5.20-0002-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patch
@@ -0,0 +1,33 @@
+From b4a544e415e9be33b37d9bfa9d9f9f4d13f553d6 Mon Sep 17 00:00:00 2001
+From: William Zhang <william.zhang@broadcom.com>
+Date: Fri, 8 Jul 2022 11:25:06 -0700
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC
+
+The cpu mask value in interrupt property inherits from bcm4908.dtsi
+which sets to four cpus. Correct the value to two cpus for dual core
+BCM4906 SoC.
+
+Fixes: c8b404fb05dc ("arm64: dts: broadcom: bcm4908: add BCM4906 Netgear R8000P DTS files")
+Signed-off-by: William Zhang <william.zhang@broadcom.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi
+@@ -9,6 +9,14 @@
+ /delete-node/ cpu@3;
+ };
+
++ timer {
++ compatible = "arm,armv8-timer";
++ interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
++ <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
++ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
++ <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
++ };
++
+ pmu {
+ compatible = "arm,cortex-a53-pmu";
+ interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/target/linux/bcm4908/patches-5.10/037-v5.20-0003-arm64-dts-broadcom-bcm4908-Fix-cpu-node-for-smp-boot.patch b/target/linux/bcm4908/patches-5.10/037-v5.20-0003-arm64-dts-broadcom-bcm4908-Fix-cpu-node-for-smp-boot.patch
new file mode 100644
index 0000000000..482fd1cc98
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.10/037-v5.20-0003-arm64-dts-broadcom-bcm4908-Fix-cpu-node-for-smp-boot.patch
@@ -0,0 +1,28 @@
+From 8bd582ae9a71d7f14c4e0c735b2eacaf7516d626 Mon Sep 17 00:00:00 2001
+From: William Zhang <william.zhang@broadcom.com>
+Date: Fri, 8 Jul 2022 11:25:07 -0700
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: Fix cpu node for smp boot
+
+Add spin-table enable-method and cpu-release-addr properties for
+cpu0 node. This is required by all ARMv8 SoC. Otherwise some
+bootloader like u-boot can not update cpu-release-addr and linux
+fails to start up secondary cpus.
+
+Fixes: 2961f69f151c ("arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files")
+Signed-off-by: William Zhang <william.zhang@broadcom.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+---
+ arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
+@@ -29,6 +29,8 @@
+ device_type = "cpu";
+ compatible = "brcm,brahma-b53";
+ reg = <0x0>;
++ enable-method = "spin-table";
++ cpu-release-addr = <0x0 0xfff8>;
+ next-level-cache = <&l2>;
+ };
+
diff --git a/target/linux/bcm4908/patches-5.10/130-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch b/target/linux/bcm4908/patches-5.10/130-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch
new file mode 100644
index 0000000000..be1efcde86
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.10/130-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch
@@ -0,0 +1,112 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 18 Jul 2022 13:16:05 +0200
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: add remaining LED pins
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Include all 32 pins.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ .../boot/dts/broadcom/bcm4908/bcm4908.dtsi | 75 +++++++++++++++++++
+ 1 file changed, 75 insertions(+)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
+@@ -352,6 +352,61 @@
+ groups = "led_9_grp_a";
+ };
+
++ pins_led_10_a: led_10-a-pins {
++ function = "led_10";
++ groups = "led_10_grp_a";
++ };
++
++ pins_led_11_a: led_11-a-pins {
++ function = "led_11";
++ groups = "led_11_grp_a";
++ };
++
++ pins_led_12_a: led_12-a-pins {
++ function = "led_12";
++ groups = "led_12_grp_a";
++ };
++
++ pins_led_13_a: led_13-a-pins {
++ function = "led_13";
++ groups = "led_13_grp_a";
++ };
++
++ pins_led_14_a: led_14-a-pins {
++ function = "led_14";
++ groups = "led_14_grp_a";
++ };
++
++ pins_led_15_a: led_15-a-pins {
++ function = "led_15";
++ groups = "led_15_grp_a";
++ };
++
++ pins_led_16_a: led_16-a-pins {
++ function = "led_16";
++ groups = "led_16_grp_a";
++ };
++
++ pins_led_17_a: led_17-a-pins {
++ function = "led_17";
++ groups = "led_17_grp_a";
++ };
++
++ pins_led_18_a: led_18-a-pins {
++ function = "led_18";
++ groups = "led_18_grp_a";
++ };
++
++ pins_led_19_a: led_19-a-pins {
++ function = "led_19";
++ groups = "led_19_grp_a";
++ };
++
++ pins_led_20_a: led_20-a-pins {
++ function = "led_20";
++ groups = "led_20_grp_a";
++ };
++
+ pins_led_21_a: led_21-a-pins {
+ function = "led_21";
+ groups = "led_21_grp_a";
+@@ -362,6 +417,21 @@
+ groups = "led_22_grp_a";
+ };
+
++ pins_led_23_a: led_23-a-pins {
++ function = "led_23";
++ groups = "led_23_grp_a";
++ };
++
++ pins_led_24_a: led_24-a-pins {
++ function = "led_24";
++ groups = "led_24_grp_a";
++ };
++
++ pins_led_25_a: led_25-a-pins {
++ function = "led_25";
++ groups = "led_25_grp_a";
++ };
++
+ pins_led_26_a: led_26-a-pins {
+ function = "led_26";
+ groups = "led_26_grp_a";
+@@ -387,6 +457,11 @@
+ groups = "led_30_grp_a";
+ };
+
++ pins_led_31_a: led_31-a-pins {
++ function = "led_31";
++ groups = "led_31_grp_a";
++ };
++
+ pins_hs_uart: hs_uart-pins {
+ function = "hs_uart";
+ groups = "hs_uart_grp";
diff --git a/target/linux/bcm4908/patches-5.10/130-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch b/target/linux/bcm4908/patches-5.10/130-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch
new file mode 100644
index 0000000000..0ba3745798
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.10/130-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch
@@ -0,0 +1,32 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 18 Jul 2022 13:17:57 +0200
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: add LEDs controller block
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+BCM4908 includes LEDs controller that supports multiple brightness
+levels & hardware blinking.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
+@@ -517,6 +517,14 @@
+ status = "okay";
+ };
+
++ leds: leds@800 {
++ compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
++ reg = <0x800 0xdc>;
++
++ #address-cells = <1>;
++ #size-cells = <0>;
++ };
++
+ nand-controller@1800 {
+ #address-cells = <1>;
+ #size-cells = <0>;
diff --git a/target/linux/bcm4908/patches-5.10/130-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch b/target/linux/bcm4908/patches-5.10/130-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch
new file mode 100644
index 0000000000..796395a017
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.10/130-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch
@@ -0,0 +1,78 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Mon, 18 Jul 2022 13:21:54 +0200
+Subject: [PATCH] arm64: dts: broadcom: bcm4908: add Asus GT-AC5300 LEDs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There are 5 software-controllable LEDs on PCB.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ .../bcm4908/bcm4908-asus-gt-ac5300.dts | 48 +++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts
+@@ -2,6 +2,7 @@
+
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/input/input.h>
++#include <dt-bindings/leds/common.h>
+
+ #include "bcm4908.dtsi"
+
+@@ -118,6 +119,53 @@
+ };
+ };
+
++&leds {
++ led-power@11 {
++ reg = <0x11>;
++ function = LED_FUNCTION_POWER;
++ color = <LED_COLOR_ID_WHITE>;
++ default-state = "on";
++ active-low;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pins_led_17_a>;
++ };
++
++ led-wan-red@12 {
++ reg = <0x12>;
++ function = LED_FUNCTION_WAN;
++ color = <LED_COLOR_ID_RED>;
++ active-low;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pins_led_18_a>;
++ };
++
++ led-wps@14 {
++ reg = <0x14>;
++ function = LED_FUNCTION_WPS;
++ color = <LED_COLOR_ID_WHITE>;
++ active-low;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pins_led_20_a>;
++ };
++
++ led-wan-white@15 {
++ reg = <0x15>;
++ function = LED_FUNCTION_WAN;
++ color = <LED_COLOR_ID_WHITE>;
++ active-low;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pins_led_21_a>;
++ };
++
++ led-lan@19 {
++ reg = <0x19>;
++ function = LED_FUNCTION_LAN;
++ color = <LED_COLOR_ID_WHITE>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pins_led_25_a>;
++ };
++};
++
+ &nandcs {
+ nand-ecc-strength = <4>;
+ nand-ecc-step-size = <512>;
diff --git a/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch b/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch
index 5d924d68c6..93c89ffa30 100644
--- a/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch
+++ b/target/linux/bcm4908/patches-5.10/300-arm64-dts-broadcom-bcm4908-limit-amount-of-GPIOs.patch
@@ -12,7 +12,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
-@@ -290,7 +290,7 @@
+@@ -292,7 +292,7 @@
gpio0: gpio-controller@500 {
compatible = "brcm,bcm6345-gpio";
reg-names = "dirout", "dat";