1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2*724ba675SRob Herring/dts-v1/;
3*724ba675SRob Herring
4*724ba675SRob Herring#include "bcm4709.dtsi"
5*724ba675SRob Herring#include "bcm5301x-nand-cs0-bch8.dtsi"
6*724ba675SRob Herring#include <dt-bindings/leds/common.h>
7*724ba675SRob Herring#include <dt-bindings/input/input.h>
8*724ba675SRob Herring
9*724ba675SRob Herring/ {
10*724ba675SRob Herring	model = "D-Link DWL-8610AP";
11*724ba675SRob Herring	compatible = "dlink,dwl-8610ap", "brcm,bcm53016", "brcm,bcm4708";
12*724ba675SRob Herring
13*724ba675SRob Herring	memory@0 {
14*724ba675SRob Herring		device_type = "memory";
15*724ba675SRob Herring		/* 512 MB RAM in 2 x Macronix D9PSH chips */
16*724ba675SRob Herring		reg = <0x00000000 0x08000000>,
17*724ba675SRob Herring		      <0x88000000 0x08000000>;
18*724ba675SRob Herring	};
19*724ba675SRob Herring
20*724ba675SRob Herring	leds {
21*724ba675SRob Herring		compatible = "gpio-leds";
22*724ba675SRob Herring
23*724ba675SRob Herring		led-power {
24*724ba675SRob Herring			function = LED_FUNCTION_POWER;
25*724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
26*724ba675SRob Herring			gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
27*724ba675SRob Herring			default-state = "on";
28*724ba675SRob Herring		};
29*724ba675SRob Herring
30*724ba675SRob Herring		led-diag {
31*724ba675SRob Herring			/* Actually "diag" unclear what this means */
32*724ba675SRob Herring			function = LED_FUNCTION_INDICATOR;
33*724ba675SRob Herring			color = <LED_COLOR_ID_RED>;
34*724ba675SRob Herring			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
35*724ba675SRob Herring			default-state = "on";
36*724ba675SRob Herring			linux,default-trigger = "heartbeat";
37*724ba675SRob Herring		};
38*724ba675SRob Herring
39*724ba675SRob Herring		led-wlan-2g {
40*724ba675SRob Herring			function = LED_FUNCTION_WLAN;
41*724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
42*724ba675SRob Herring			gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
43*724ba675SRob Herring		};
44*724ba675SRob Herring
45*724ba675SRob Herring		led-wlan-5g {
46*724ba675SRob Herring			function = LED_FUNCTION_WLAN;
47*724ba675SRob Herring			color = <LED_COLOR_ID_GREEN>;
48*724ba675SRob Herring			gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
49*724ba675SRob Herring		};
50*724ba675SRob Herring	};
51*724ba675SRob Herring
52*724ba675SRob Herring	gpio_keys {
53*724ba675SRob Herring		compatible = "gpio-keys";
54*724ba675SRob Herring
55*724ba675SRob Herring		button-reset {
56*724ba675SRob Herring			debounce-interval = <100>;
57*724ba675SRob Herring			wakeup-source;
58*724ba675SRob Herring			linux,code = <KEY_RESTART>;
59*724ba675SRob Herring			label = "reset";
60*724ba675SRob Herring			/* This GPIO is actually stored in NVRAM, but it's not gonna change */
61*724ba675SRob Herring			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
62*724ba675SRob Herring		};
63*724ba675SRob Herring	};
64*724ba675SRob Herring
65*724ba675SRob Herring	/*
66*724ba675SRob Herring	 * Flash memory at 0x1e000000-0x1fffffff
67*724ba675SRob Herring	 * Macronix 32 64KB blocks; total size 2MB, same that can be
68*724ba675SRob Herring	 * found attached to the spi_nor SPI controller.
69*724ba675SRob Herring	 */
70*724ba675SRob Herring	nvram@1e080000 {
71*724ba675SRob Herring		compatible = "brcm,nvram";
72*724ba675SRob Herring		reg = <0x1e080000 0x00020000>;
73*724ba675SRob Herring
74*724ba675SRob Herring		et0macaddr: et0macaddr {
75*724ba675SRob Herring		};
76*724ba675SRob Herring
77*724ba675SRob Herring		et1macaddr: et1macaddr {
78*724ba675SRob Herring		};
79*724ba675SRob Herring	};
80*724ba675SRob Herring};
81*724ba675SRob Herring
82*724ba675SRob Herring&gmac0 {
83*724ba675SRob Herring	nvmem-cells = <&et0macaddr>;
84*724ba675SRob Herring	nvmem-cell-names = "mac-address";
85*724ba675SRob Herring};
86*724ba675SRob Herring
87*724ba675SRob Herring&gmac1 {
88*724ba675SRob Herring	nvmem-cells = <&et1macaddr>;
89*724ba675SRob Herring	nvmem-cell-names = "mac-address";
90*724ba675SRob Herring};
91*724ba675SRob Herring
92*724ba675SRob Herring&spi_nor {
93*724ba675SRob Herring	/* Serial SPI NOR Flash MX 25L1606E */
94*724ba675SRob Herring	status = "okay";
95*724ba675SRob Herring};
96*724ba675SRob Herring
97*724ba675SRob Herring&nandcs {
98*724ba675SRob Herring	/*
99*724ba675SRob Herring	 * Spansion S34ML01G100TFI00 128 MB NAND Flash memory
100*724ba675SRob Herring	 *
101*724ba675SRob Herring	 * This ECC is a bit unorthodox but it is what the stock firmware
102*724ba675SRob Herring	 * is using, so to be able to mount the original partitions
103*724ba675SRob Herring	 * this is necessary.
104*724ba675SRob Herring	 */
105*724ba675SRob Herring	nand-ecc-strength = <5>;
106*724ba675SRob Herring	partitions {
107*724ba675SRob Herring		compatible = "fixed-partitions";
108*724ba675SRob Herring		#address-cells = <1>;
109*724ba675SRob Herring		#size-cells = <1>;
110*724ba675SRob Herring
111*724ba675SRob Herring		/* This is named nflash1.trx in CFE */
112*724ba675SRob Herring		trx@0 {
113*724ba675SRob Herring			label = "firmware";
114*724ba675SRob Herring			reg = <0x00000000 0x02800000>;
115*724ba675SRob Herring			compatible = "brcm,trx";
116*724ba675SRob Herring		};
117*724ba675SRob Herring
118*724ba675SRob Herring		/* This is named nflash1.trx2 in CFE */
119*724ba675SRob Herring		trx2@2800000 {
120*724ba675SRob Herring			label = "firmware2";
121*724ba675SRob Herring			reg = <0x02800000 0x02800000>;
122*724ba675SRob Herring			compatible = "brcm,trx";
123*724ba675SRob Herring		};
124*724ba675SRob Herring
125*724ba675SRob Herring		/* This is named nflash1.rwfs in CFE */
126*724ba675SRob Herring		free@5000000 {
127*724ba675SRob Herring			label = "free";
128*724ba675SRob Herring			reg = <0x05000000 0x03000000>;
129*724ba675SRob Herring		};
130*724ba675SRob Herring	};
131*724ba675SRob Herring};
132