ramips: fix flash layout for TP-Link TL-WR841N v14
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-860l-b1.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-860l-b1", "mediatek,mt7621-soc";
10 model = "D-Link DIR-860L B1";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_green;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_green;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power {
24 label = "dir-860l-b1:orange:power";
25 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
26 };
27
28 led_power_green: power2 {
29 label = "dir-860l-b1:green:power";
30 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
31 };
32
33 net {
34 label = "dir-860l-b1:orange:net";
35 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
36 };
37
38 net2 {
39 label = "dir-860l-b1:green:net";
40 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <10000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "u-boot-env";
82 reg = <0x30000 0x4000>;
83 read-only;
84 };
85
86 radio: partition@34000 {
87 label = "radio";
88 reg = <0x34000 0x4000>;
89 read-only;
90 };
91
92 factory: partition@38000 {
93 label = "factory";
94 reg = <0x38000 0x8000>;
95 read-only;
96 };
97
98 partition@40000 {
99 label = "defaults";
100 reg = <0x40000 0x10000>;
101 read-only;
102 };
103
104 partition@50000 {
105 compatible = "seama";
106 label = "firmware";
107 reg = <0x50000 0xfb0000>;
108 };
109 };
110 };
111 };
112
113 &gmac0 {
114 mtd-mac-address = <&radio 0x4>;
115 };
116
117 &switch0 {
118 ports {
119 port@0 {
120 status = "okay";
121 label = "wan";
122 };
123
124 port@1 {
125 status = "okay";
126 label = "lan4";
127 };
128
129 port@2 {
130 status = "okay";
131 label = "lan3";
132 };
133
134 port@3 {
135 status = "okay";
136 label = "lan2";
137 };
138
139 port@4 {
140 status = "okay";
141 label = "lan1";
142 };
143 };
144 };
145
146 &pcie {
147 status = "okay";
148 };
149
150 &pcie0 {
151 wifi0: mt76@0,0 {
152 reg = <0x0000 0 0 0 0>;
153 mediatek,mtd-eeprom = <&radio 0x2000>;
154 ieee80211-freq-limit = <5000000 6000000>;
155 };
156 };
157
158 &pcie1 {
159 wifi1: mt76@0,0 {
160 reg = <0x0000 0 0 0 0>;
161 mediatek,mtd-eeprom = <&radio 0x0>;
162 ieee80211-freq-limit = <2400000 2500000>;
163 };
164 };
165
166 &state_default {
167 gpio {
168 groups = "uart3", "jtag", "wdt";
169 function = "gpio";
170 };
171 };