ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / RT-N56U.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 = "asus,rt-n56u", "ralink,rt3883-soc";
10         model = "Asus RT-N56U";
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         nor-flash@1c000000 {
20                 compatible = "cfi-flash";
21                 reg = <0x1c000000 0x800000>;
22                 bank-width = <2>;
23
24                 partitions {
25                         compatible = "fixed-partitions";
26                         #address-cells = <1>;
27                         #size-cells = <1>;
28
29                         partition@0 {
30                                 reg = <0x0 0x0030000>;
31                                 label = "u-boot";
32                                 read-only;
33                         };
34
35                         partition@30000 {
36                                 reg = <0x00030000 0x00010000>;
37                                 label = "u-boot-env";
38                                 read-only;
39                         };
40
41                         factory: partition@40000 {
42                                 reg = <0x00040000 0x00010000>;
43                                 label = "factory";
44                                 read-only;
45                         };
46
47                         partition@50000 {
48                                 reg = <0x00050000 0x007b0000>;
49                                 label = "firmware";
50                         };
51                 };
52         };
53
54         rtl8367 {
55                 compatible = "realtek,rtl8367";
56                 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
57                 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
58                 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
59         };
60
61         gpio-keys-polled {
62                 compatible = "gpio-keys-polled";
63                 poll-interval = <100>;
64
65                 reset {
66                         label = "reset";
67                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68                         linux,code = <KEY_RESTART>;
69                 };
70
71                 wps {
72                         label = "wps";
73                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
74                         linux,code = <KEY_WPS_BUTTON>;
75                 };
76         };
77
78         gpio-leds {
79                 compatible = "gpio-leds";
80
81                 led_power: power {
82                         label = "rt-n56u:blue:power";
83                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
84                 };
85
86                 lan {
87                         label = "rt-n56u:blue:lan";
88                         gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
89                 };
90
91                 wan {
92                         label = "rt-n56u:blue:wan";
93                         gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
94                 };
95
96                 usb {
97                         label = "rt-n56u:blue:usb";
98                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
99                 };
100         };
101 };
102
103 &gpio1 {
104         status = "okay";
105 };
106
107 &pinctrl {
108         state_default: pinctrl0 {
109                 gpio {
110                         ralink,group = "spi", "i2c", "jtag", "uartf";
111                         ralink,function = "gpio";
112                 };
113         };
114 };
115
116 &ethernet {
117         mtd-mac-address = <&factory 0x4>;
118
119         port@0 {
120                 mediatek,fixed-link = <1000 1 1 1>;
121         };
122 };
123
124 &pci {
125         status = "okay";
126 };
127
128 &pci1 {
129         status = "okay";
130
131         wifi@0,0 {
132                 compatible = "pci1814,3091";
133                 reg = <0x10000 0 0 0 0>;
134                 ralink,mtd-eeprom = <&factory 0x8000>;
135         };
136 };
137
138 &wmac {
139         status = "okay";
140         ralink,2ghz = <0>;
141         ralink,mtd-eeprom = <&factory 0>;
142 };
143
144 &ehci {
145         status = "okay";
146 };
147
148 &ohci {
149         status = "okay";
150 };