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