mediatek: Add support for Xiaomi Redmi Router AX6S
[openwrt/staging/wigyori.git] / target / linux / bcm4908 / patches-5.4 / 031-v5.12-0002-arm64-dts-broadcom-bcm4908-add-BCM4906-Netgear-R8000.patch
1 From c8b404fb05dcfadff477e49b7ea6b500e015f101 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Tue, 8 Dec 2020 08:03:04 +0100
4 Subject: [PATCH 2/4] arm64: dts: broadcom: bcm4908: add BCM4906 Netgear R8000P
5 DTS files
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Netgear R8000P is home router based on BCM4906 that is a cheaper variant
11 of BCM4908 (e.g. 2 cores instead of 4).
12
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
15 ---
16 arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 1 +
17 .../bcm4908/bcm4906-netgear-r8000p.dts | 52 +++++++++++++++++++
18 .../boot/dts/broadcom/bcm4908/bcm4906.dtsi | 18 +++++++
19 3 files changed, 71 insertions(+)
20 create mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
21 create mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi
22
23 --- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile
24 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/Makefile
25 @@ -1,2 +1,3 @@
26 # SPDX-License-Identifier: GPL-2.0
27 +dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb
28 dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb
29 --- /dev/null
30 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-netgear-r8000p.dts
31 @@ -0,0 +1,52 @@
32 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
33 +
34 +#include <dt-bindings/gpio/gpio.h>
35 +#include <dt-bindings/input/input.h>
36 +#include <dt-bindings/leds/common.h>
37 +
38 +#include "bcm4906.dtsi"
39 +
40 +/ {
41 + compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908";
42 + model = "Netgear R8000P";
43 +
44 + memory@0 {
45 + device_type = "memory";
46 + reg = <0x00 0x00 0x00 0x20000000>;
47 + };
48 +
49 + leds {
50 + compatible = "gpio-leds";
51 +
52 + wps {
53 + function = LED_FUNCTION_WPS;
54 + color = <LED_COLOR_ID_WHITE>;
55 + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
56 + };
57 + };
58 +};
59 +
60 +&nandcs {
61 + nand-ecc-strength = <4>;
62 + nand-ecc-step-size = <512>;
63 + nand-on-flash-bbt;
64 +
65 + #address-cells = <1>;
66 + #size-cells = <0>;
67 +
68 + partitions {
69 + compatible = "fixed-partitions";
70 + #address-cells = <1>;
71 + #size-cells = <1>;
72 +
73 + partition@0 {
74 + label = "cferom";
75 + reg = <0x0 0x100000>;
76 + };
77 +
78 + partition@100000 {
79 + label = "firmware";
80 + reg = <0x100000 0x4400000>;
81 + };
82 + };
83 +};
84 --- /dev/null
85 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906.dtsi
86 @@ -0,0 +1,18 @@
87 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
88 +
89 +#include "bcm4908.dtsi"
90 +
91 +/ {
92 + cpus {
93 + /delete-node/ cpu@2;
94 +
95 + /delete-node/ cpu@3;
96 + };
97 +
98 + pmu {
99 + compatible = "arm,cortex-a53-pmu";
100 + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
101 + <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
102 + interrupt-affinity = <&cpu0>, <&cpu1>;
103 + };
104 +};