| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From b1ba87897ceda8e49a47aa92832dd7bff8583e21 Mon Sep 17 00:00:00 2001 |
| 2 | From: Linus Walleij <linus.walleij@linaro.org> |
| 3 | Date: Mon, 7 Nov 2022 14:41:04 +0100 |
| 4 | Subject: [PATCH] ARM: dts: bcm47094: Add devicetree for D-Link DIR-890L |
| 5 | |
| 6 | This adds a device tree for the D-Link DIR-890L. This device |
| 7 | is very similar to D-Link DIR-885L, the differences are detailed |
| 8 | as a comment in the DTS file. |
| 9 | |
| 10 | Signed-off-by: Linus Walleij <linus.walleij@linaro.org> |
| 11 | Link: https://lore.kernel.org/r/20221107134104.1422169-2-linus.walleij@linaro.org |
| 12 | Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> |
| 13 | --- |
| 14 | arch/arm/boot/dts/Makefile | 1 + |
| 15 | arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 211 ++++++++++++++++++ |
| 16 | 2 files changed, 212 insertions(+) |
| 17 | create mode 100644 arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts |
| 18 | |
| 19 | --- a/arch/arm/boot/dts/Makefile |
| 20 | +++ b/arch/arm/boot/dts/Makefile |
| 21 | @@ -112,6 +112,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ |
| 22 | bcm4709-tplink-archer-c9-v1.dtb \ |
| 23 | bcm47094-asus-rt-ac88u.dtb \ |
| 24 | bcm47094-dlink-dir-885l.dtb \ |
| 25 | + bcm47094-dlink-dir-890l.dtb \ |
| 26 | bcm47094-linksys-panamera.dtb \ |
| 27 | bcm47094-luxul-abr-4500.dtb \ |
| 28 | bcm47094-luxul-xap-1610.dtb \ |
| 29 | --- /dev/null |
| 30 | +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts |
| 31 | @@ -0,0 +1,211 @@ |
| 32 | +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 33 | +/* |
| 34 | + * Device tree for D-Link DIR-890L |
| 35 | + * D-Link calls this board "WRGAC36" |
| 36 | + * this router has the same looks and form factor as D-Link DIR-885L. |
| 37 | + * |
| 38 | + * Some differences from DIR-885L include a separate USB2 port, separate LEDs |
| 39 | + * for USB2 and USB3, a separate VCC supply for the USB2 slot and no |
| 40 | + * router/extender switch is mounted (there is an empty mount point on the |
| 41 | + * PCB) so this device is a pure router. Also the LAN ports are in the right |
| 42 | + * order. |
| 43 | + * |
| 44 | + * Based on the device tree for DIR-885L |
| 45 | + * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com> |
| 46 | + * Copyright (C) 2022 Linus Walleij |
| 47 | + */ |
| 48 | + |
| 49 | +/dts-v1/; |
| 50 | + |
| 51 | +#include "bcm47094.dtsi" |
| 52 | +#include "bcm5301x-nand-cs0-bch1.dtsi" |
| 53 | + |
| 54 | +/ { |
| 55 | + compatible = "dlink,dir-890l", "brcm,bcm47094", "brcm,bcm4708"; |
| 56 | + model = "D-Link DIR-890L"; |
| 57 | + |
| 58 | + chosen { |
| 59 | + bootargs = "console=ttyS0,115200 earlycon"; |
| 60 | + }; |
| 61 | + |
| 62 | + memory@0 { |
| 63 | + device_type = "memory"; |
| 64 | + reg = <0x00000000 0x08000000>, |
| 65 | + <0x88000000 0x08000000>; |
| 66 | + }; |
| 67 | + |
| 68 | + leds { |
| 69 | + /* |
| 70 | + * LED information is derived from the boot log which |
| 71 | + * conveniently lists all the LEDs. |
| 72 | + */ |
| 73 | + compatible = "gpio-leds"; |
| 74 | + |
| 75 | + power-white { |
| 76 | + label = "bcm53xx:white:power"; |
| 77 | + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>; |
| 78 | + linux,default-trigger = "default-on"; |
| 79 | + }; |
| 80 | + |
| 81 | + wan-white { |
| 82 | + label = "bcm53xx:white:wan"; |
| 83 | + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>; |
| 84 | + }; |
| 85 | + |
| 86 | + power-amber { |
| 87 | + label = "bcm53xx:amber:power"; |
| 88 | + gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; |
| 89 | + }; |
| 90 | + |
| 91 | + wan-amber { |
| 92 | + label = "bcm53xx:amber:wan"; |
| 93 | + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; |
| 94 | + }; |
| 95 | + |
| 96 | + usb3-white { |
| 97 | + label = "bcm53xx:white:usb3"; |
| 98 | + gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>; |
| 99 | + trigger-sources = <&xhci_port1>; |
| 100 | + linux,default-trigger = "usbport"; |
| 101 | + }; |
| 102 | + |
| 103 | + usb2-white { |
| 104 | + label = "bcm53xx:white:usb2"; |
| 105 | + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>; |
| 106 | + trigger-sources = <&ohci_port1>, <&ehci_port1>; |
| 107 | + linux,default-trigger = "usbport"; |
| 108 | + }; |
| 109 | + |
| 110 | + 2ghz { |
| 111 | + label = "bcm53xx:white:2ghz"; |
| 112 | + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>; |
| 113 | + }; |
| 114 | + |
| 115 | + 5ghz { |
| 116 | + label = "bcm53xx:white:5ghz"; |
| 117 | + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>; |
| 118 | + }; |
| 119 | + }; |
| 120 | + |
| 121 | + gpio-keys { |
| 122 | + compatible = "gpio-keys"; |
| 123 | + |
| 124 | + button-wps { |
| 125 | + label = "WPS"; |
| 126 | + linux,code = <KEY_WPS_BUTTON>; |
| 127 | + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; |
| 128 | + }; |
| 129 | + |
| 130 | + /* Called "factory reset" in the vendor dmesg */ |
| 131 | + button-restart { |
| 132 | + label = "Reset"; |
| 133 | + linux,code = <KEY_RESTART>; |
| 134 | + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>; |
| 135 | + }; |
| 136 | + }; |
| 137 | + |
| 138 | + /* |
| 139 | + * The flash memory is memory mapped at 0x1e000000-0x1fffffff |
| 140 | + * 64KB blocks; total size 2MB, same that can be |
| 141 | + * found attached to the spi_nor SPI controller. |
| 142 | + */ |
| 143 | + nvram@1e1f0000 { |
| 144 | + compatible = "brcm,nvram"; |
| 145 | + reg = <0x1e1f0000 0x00010000>; |
| 146 | + |
| 147 | + et0macaddr: et0macaddr { |
| 148 | + }; |
| 149 | + }; |
| 150 | +}; |
| 151 | + |
| 152 | +&gmac2 { |
| 153 | + /* |
| 154 | + * The NVRAM curiously does not contain a MAC address |
| 155 | + * for et2 so since that is the only ethernet interface |
| 156 | + * actually in use on the platform, we use this et0 MAC |
| 157 | + * address for et2. |
| 158 | + */ |
| 159 | + nvmem-cells = <&et0macaddr>; |
| 160 | + nvmem-cell-names = "mac-address"; |
| 161 | +}; |
| 162 | + |
| 163 | +&spi_nor { |
| 164 | + status = "okay"; |
| 165 | +}; |
| 166 | + |
| 167 | +&nandcs { |
| 168 | + /* Spansion S34ML01G2, 128MB with 128KB erase blocks */ |
| 169 | + partitions { |
| 170 | + compatible = "fixed-partitions"; |
| 171 | + #address-cells = <1>; |
| 172 | + #size-cells = <1>; |
| 173 | + |
| 174 | + /* |
| 175 | + * This is called "nflash" in the vendor kernel with |
| 176 | + * "upgrade" and "rootfs" (probably using OpenWrt |
| 177 | + * splitpart). We call it "firmware" like standard tools |
| 178 | + * assume. The CFE loader contains incorrect information |
| 179 | + * about TRX partitions, ignore this, there are no TRX |
| 180 | + * partitions: this device uses SEAMA. |
| 181 | + */ |
| 182 | + firmware@0 { |
| 183 | + label = "firmware"; |
| 184 | + reg = <0x00000000 0x08000000>; |
| 185 | + }; |
| 186 | + }; |
| 187 | +}; |
| 188 | + |
| 189 | +&usb2 { |
| 190 | + vcc-gpios = <&chipcommon 21 GPIO_ACTIVE_HIGH>; |
| 191 | +}; |
| 192 | + |
| 193 | +&usb3 { |
| 194 | + vcc-gpios = <&chipcommon 18 GPIO_ACTIVE_HIGH>; |
| 195 | +}; |
| 196 | + |
| 197 | +&usb3_phy { |
| 198 | + status = "okay"; |
| 199 | +}; |
| 200 | + |
| 201 | +&srab { |
| 202 | + status = "okay"; |
| 203 | + |
| 204 | + ports { |
| 205 | + port@0 { |
| 206 | + reg = <0>; |
| 207 | + label = "lan1"; |
| 208 | + }; |
| 209 | + |
| 210 | + port@1 { |
| 211 | + reg = <1>; |
| 212 | + label = "lan2"; |
| 213 | + }; |
| 214 | + |
| 215 | + port@2 { |
| 216 | + reg = <2>; |
| 217 | + label = "lan3"; |
| 218 | + }; |
| 219 | + |
| 220 | + port@3 { |
| 221 | + reg = <3>; |
| 222 | + label = "lan4"; |
| 223 | + }; |
| 224 | + |
| 225 | + port@4 { |
| 226 | + reg = <4>; |
| 227 | + label = "wan"; |
| 228 | + }; |
| 229 | + |
| 230 | + port@8 { |
| 231 | + reg = <8>; |
| 232 | + label = "cpu"; |
| 233 | + ethernet = <&gmac2>; |
| 234 | + phy-mode = "rgmii"; |
| 235 | + |
| 236 | + fixed-link { |
| 237 | + speed = <1000>; |
| 238 | + full-duplex; |
| 239 | + }; |
| 240 | + }; |
| 241 | + }; |
| 242 | +}; |