ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / BR-6475ND.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "edimax,br-6475nd", "ralink,rt3883-soc";
10         model = "Edimax BR-6475nD";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         gpio-keys-polled {
20                 compatible = "gpio-keys-polled";
21                 poll-interval = <100>;
22
23                 reset {
24                         label = "reset";
25                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
26                         linux,code = <KEY_RESTART>;
27                 };
28
29                 rfkill {
30                         label = "rfkill";
31                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
32                         linux,input-type = <EV_SW>;
33                         linux,code = <KEY_RFKILL>;
34                 };
35         };
36
37         gpio-leds {
38                 compatible = "gpio-leds";
39
40                 led_power: power {
41                         label = "br-6475nd:green:power";
42                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
43                 };
44
45                 wlan {
46                         label = "br-6475nd:amber:wlan";
47                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
48                 };
49
50                 wlan_5ghz {
51                         label = "br-6475nd:amber:wlan_5ghz";
52                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
53                 };
54         };
55
56         nor-flash@1c000000 {
57                 compatible = "cfi-flash";
58                 reg = <0x1c000000 0x800000>;
59                 bank-width = <2>;
60
61                 partitions {
62                         compatible = "fixed-partitions";
63                         #address-cells = <1>;
64                         #size-cells = <1>;
65
66                         partition@0 {
67                                 reg = <0x00000000 0x00030000>;
68                                 label = "u-boot";
69                                 read-only;
70                         };
71
72                         partition@30000 {
73                                 reg = <0x00030000 0x00010000>;
74                                 label = "nvram";
75                                 read-only;
76                         };
77
78                         factory: partition@40000 {
79                                 reg = <0x00040000 0x00010000>;
80                                 label = "factory";
81                                 read-only;
82                         };
83
84                         devdata: partition@50000 {
85                                 reg = <0x00050000 0x00020000>;
86                                 label = "devdata";
87                                 read-only;
88                         };
89
90                         partition@70000 {
91                                 reg = <0x00070000 0x00790000>;
92                                 label = "firmware";
93                         };
94                 };
95         };
96
97         rtl8367 {
98                 compatible = "realtek,rtl8367";
99                 gpio-sda = <&gpio0 5 GPIO_ACTIVE_HIGH>;
100                 gpio-sck = <&gpio0 4 GPIO_ACTIVE_HIGH>;
101                 realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
102         };
103
104         /*
105          * Unclear if this is the correct gpio setup; the USB ports are
106          * unpopulated on a stock BR-6475nD, even though the hardware exists
107          * and the headers are there.
108          */
109         /*
110         gpio_export {
111                 compatible = "gpio-export";
112                 #size-cells = <0>;
113
114                 usb {
115                         gpio-export,name="usb";
116                         gpio-export,output=<0>;
117                         gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
118                 };
119         };
120         */
121 };
122
123 &pinctrl {
124         state_default: pinctrl0 {
125                 gpio {
126                         ralink,group = "spi", "jtag", "uartf";
127                         ralink,function = "gpio";
128                 };
129         };
130 };
131
132 &timer {
133         status = "okay";
134 };
135
136 &gpio1 {
137         status = "okay";
138 };
139
140 &uartlite {
141         status = "okay";
142 };
143
144 &ethernet {
145         status = "okay";
146         mtd-mac-address = <&devdata 0x0d>;
147
148         port@0 {
149                 mediatek,fixed-link = <1000 1 1 1>;
150         };
151 };
152
153 &wmac {
154         status = "okay";
155         ralink,mtd-eeprom = <&factory 0>;
156 };
157
158 &pci {
159         status = "okay";
160 };
161
162 &pci1 {
163         status = "okay";
164
165         wifi@0,0 {
166                 compatible = "pci0,0";
167                 reg = <0x10000 0 0 0 0>;
168                 ralink,5ghz = <0>;
169                 ralink,mtd-eeprom = <&factory 0x8000>;
170         };
171 };
172
173 &ehci {
174         status = "okay";
175 };
176
177 &ohci {
178         status = "okay";
179 };