ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / rt3662_edimax_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,rt3662-soc", "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         keys {
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         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                                 compatible = "edimax,uimage";
92                                 reg = <0x00070000 0x00790000>;
93                                 label = "firmware";
94                         };
95                 };
96         };
97
98         rtl8367 {
99                 compatible = "realtek,rtl8367";
100                 gpio-sda = <&gpio0 5 GPIO_ACTIVE_HIGH>;
101                 gpio-sck = <&gpio0 4 GPIO_ACTIVE_HIGH>;
102                 realtek,extif0 = <1 0 1 1 1 1 1 1 2>;
103         };
104
105         /*
106          * Unclear if this is the correct gpio setup; the USB ports are
107          * unpopulated on a stock BR-6475nD, even though the hardware exists
108          * and the headers are there.
109          */
110         /*
111         gpio_export {
112                 compatible = "gpio-export";
113                 #size-cells = <0>;
114
115                 usb {
116                         gpio-export,name="usb";
117                         gpio-export,output=<0>;
118                         gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
119                 };
120         };
121         */
122 };
123
124 &pinctrl {
125         state_default: pinctrl0 {
126                 gpio {
127                         ralink,group = "spi", "jtag", "uartf";
128                         ralink,function = "gpio";
129                 };
130         };
131 };
132
133 &timer {
134         status = "okay";
135 };
136
137 &gpio1 {
138         status = "okay";
139 };
140
141 &uartlite {
142         status = "okay";
143 };
144
145 &ethernet {
146         status = "okay";
147         mtd-mac-address = <&devdata 0x0d>;
148
149         port@0 {
150                 mediatek,fixed-link = <1000 1 1 1>;
151         };
152 };
153
154 &wmac {
155         status = "okay";
156         ralink,mtd-eeprom = <&factory 0>;
157 };
158
159 &pci {
160         status = "okay";
161 };
162
163 &pci1 {
164         status = "okay";
165
166         wifi@0,0 {
167                 compatible = "pci0,0";
168                 reg = <0x10000 0 0 0 0>;
169                 ralink,5ghz = <0>;
170                 ralink,mtd-eeprom = <&factory 0x8000>;
171         };
172 };
173
174 &ehci {
175         status = "okay";
176 };
177
178 &ohci {
179         status = "okay";
180 };