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