ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / R6120.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "netgear,r6120", "mediatek,mt7628an-soc";
10         model = "Netgear AC1200 R6120";
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         memory@0 {
20                 device_type = "memory";
21                 reg = <0x0 0x4000000>;
22         };
23
24         gpio-keys-polled {
25                 compatible = "gpio-keys-polled";
26                 poll-interval = <20>;
27
28                 reset {
29                         label = "reset";
30                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
31                         linux,code = <KEY_RESTART>;
32                 };
33         };
34
35         gpio-leds {
36                 compatible = "gpio-leds";
37
38                 lan {
39                         label = "r6120:green:lan";
40                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
41                 };
42
43                 led_power: power {
44                         label = "r6120:green:power";
45                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
46                 };
47
48                 wlan {
49                         label = "r6120:green:wlan2g";
50                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wlan_orange {
54                         label = "r6120:orange:wlan2g";
55                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
56                 };
57
58                 wlan5 {
59                         label = "r6120:green:wlan5g";
60                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
61                 };
62
63                 wlan5_orange {
64                         label = "r6120:orange:wlan5g";
65                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
66                 };
67         };
68 };
69
70 &pinctrl {
71         state_default: pinctrl0 {
72                 gpio {
73                         ralink,group = "p0led_an", "p1led_an", "p2led_an",
74                                        "p3led_an", "p4led_an", "wdt", "wled_an";
75                         ralink,function = "gpio";
76                 };
77         };
78 };
79
80 &spi0 {
81         status = "okay";
82
83         flash@0 {
84                 compatible = "jedec,spi-nor";
85                 reg = <0>;
86                 spi-max-frequency = <10000000>;
87                 m25p,chunked-io = <32>;
88
89                 partitions {
90                         compatible = "fixed-partitions";
91                         #address-cells = <1>;
92                         #size-cells = <1>;
93
94                         partition@0 {
95                                 label = "u-boot";
96                                 reg = <0x0 0x40000>;
97                                 read-only;
98                         };
99
100                         factory: partition@40000 {
101                                 label = "factory";
102                                 reg = <0x40000 0x20000>;
103                                 read-only;
104                         };
105
106                         nvram: partition@60000 {
107                                 label = "nvram";
108                                 reg = <0x60000 0x30000>;
109                                 read-only;
110                         };
111
112                         partition@90000 {
113                                 label = "firmware";
114                                 reg = <0x90000 0xf60000>;
115                         };
116
117                         partition@ff0000 {
118                                 label = "reserved";
119                                 reg = <0xff0000 0x10000>;
120                                 read-only;
121                         };
122                 };
123         };
124 };
125
126 &wmac {
127         status = "okay";
128         mtd-mac-address = <&nvram 0x100b0>;
129         mediatek,mtd-eeprom = <&factory 0x20000>;
130 };
131
132 &ethernet {
133         mtd-mac-address = <&nvram 0x100b0>;
134 };
135
136 &pcie {
137         status = "okay";
138 };
139
140 &pcie0 {
141         wifi@0,0 {
142                 reg = <0x0000 0 0 0 0>;
143                 mediatek,mtd-eeprom = <&factory 0x28000>;
144                 ieee80211-freq-limit = <5000000 6000000>;
145                 mtd-mac-address = <&nvram 0x100b0>;
146                 mtd-mac-address-increment = <(2)>;
147         };
148 };