ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / RP-N53.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "asus,rp-n53", "ralink,mt7620a-soc";
10         model = "Asus RP-N53";
11
12         gpio-keys-polled {
13                 compatible = "gpio-keys-polled";
14                 poll-interval = <20>;
15
16                 touch {
17                         label = "touch";
18                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
19                         linux,code = <BTN_0>;
20                 };
21
22                 wps {
23                         label = "wps";
24                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
25                         linux,code = <BTN_0>;
26                 };
27
28                 reset {
29                         label = "reset";
30                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
31                         linux,code = <BTN_0>;
32                 };
33
34                 audio {
35                         label = "audio";
36                         gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
37                         linux,code = <BTN_1>;
38                 };
39         };
40
41         gpio-leds {
42                 compatible = "gpio-leds";
43
44                 backlight {
45                         label = "rp-n53:white:back";
46                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wifi0 {
50                         label = "rp-n53:blue:5g3";
51                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
52                 };
53
54                 wifi1 {
55                         label = "rp-n53:blue:5g2";
56                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
57                 };
58
59                 wifi2 {
60                         label = "rp-n53:blue:5g1";
61                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
62                 };
63
64                 wifi3 {
65                         label = "rp-n53:blue:wifi";
66                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
67                 };
68
69                 wifi4 {
70                         label = "rp-n53:blue:2g1";
71                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
72                 };
73
74                 wifi5 {
75                         label = "rp-n53:blue:2g2";
76                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
77                 };
78
79                 wifi6 {
80                         label = "rp-n53:blue:2g3";
81                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
82                 };
83         };
84 };
85
86 &gpio1 {
87         status = "okay";
88 };
89
90 &i2c {
91         status = "okay";
92 };
93
94 &i2s {
95         status = "okay";
96         pinctrl-names = "default";
97         pinctrl-0 = <&pcm_i2s_pins>;
98 };
99
100 &spi0 {
101         status = "okay";
102
103         m25p80@0 {
104                 compatible = "jedec,spi-nor";
105                 reg = <0>;
106                 spi-max-frequency = <10000000>;
107
108                 partitions {
109                         compatible = "fixed-partitions";
110                         #address-cells = <1>;
111                         #size-cells = <1>;
112
113                         partition@0 {
114                                 label = "u-boot";
115                                 reg = <0x0 0x30000>;
116                                 read-only;
117                         };
118
119                         partition@30000 {
120                                 label = "u-boot-env";
121                                 reg = <0x30000 0x10000>;
122                                 read-only;
123                         };
124
125                         factory: partition@40000 {
126                                 label = "factory";
127                                 reg = <0x40000 0x10000>;
128                                 read-only;
129                         };
130
131                         partition@50000 {
132                                 label = "firmware";
133                                 reg = <0x50000 0x7b0000>;
134                         };
135                 };
136         };
137 };
138
139 &pcm {
140         status = "okay";
141 };
142
143 &gdma {
144         status = "okay";
145 };
146
147 &wmac {
148         ralink,mtd-eeprom = <&factory 0>;
149 };
150
151 &pinctrl {
152         state_default: pinctrl0 {
153                 gpio {
154                         ralink,group = "mdio", "rgmii1";
155                         ralink,function = "gpio";
156                 };
157         };
158 };
159
160 &gsw {
161         mediatek,port4 = "ephy";
162         pinctrl-names = "default";
163         pinctrl-0 = <&ephy_pins>;
164 };
165
166 &pcie {
167         status = "okay";
168 };
169
170 &pcie0 {
171         wifi@0,0 {
172                 compatible = "pci1814,5592";
173                 reg = <0x0000 0 0 0 0>;
174                 ralink,2ghz = <0>;
175                 ralink,mtd-eeprom = <&factory 0x8000>;
176         };
177 };