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