ramips: fix MTD EEPROM offset for TL-WR840N v5
[oweals/openwrt.git] / target / linux / ramips / dts / WLR-6000.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 = "sitecom,wlr-6000", "ralink,rt3883-soc";
10         model = "Sitecom WLR-6000";
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         gpio-keys-polled {
20                 compatible = "gpio-keys-polled";
21                 poll-interval = <20>;
22
23                 reset {
24                         label = "reset";
25                         gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
26                         linux,code = <KEY_RESTART>;
27                 };
28         };
29
30         gpio-leds {
31                 compatible = "gpio-leds";
32
33                 led_power: power {
34                         label = "wlr-6000:red:power";
35                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
36                 };
37
38                 ops {
39                         label = "wlr-6000:white:ops";
40                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
41                 };
42         };
43
44         gpio_export {
45                 compatible = "gpio-export";
46                 #size-cells = <0>;
47
48                 usb {
49                         gpio-export,name = "usb";
50                         gpio-export,output = <1>;
51                         gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
52                 };
53         };
54 };
55
56 &gpio1 {
57         status = "okay";
58 };
59
60 &pinctrl {
61         state_default: pinctrl0 {
62                 gpio {
63                         ralink,group = "i2c", "jtag", "uartf";
64                         ralink,function = "gpio";
65                 };
66         };
67 };
68
69 &ethernet {
70         status = "okay";
71         mtd-mac-address = <&factory 0x8004>;
72         mtd-mac-address-increment = <1>;
73
74         port@0 {
75                 phy-handle = <&phy0>;
76                 phy-mode = "rgmii";
77         };
78
79         mdio-bus {
80                 status = "okay";
81
82                 phy0: ethernet-phy@0 {
83                         reg = <0>;
84                         phy-mode = "rgmii";
85
86                         qca,ar8327-initvals = <
87                                 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
88                                 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
89                                 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
90                                 0x50 0xc437c437 /* LED Control Register 0 */
91                                 0x54 0xc337c337 /* LED Control Register 1 */
92                                 0x58 0x00000000 /* LED Control Register 2 */
93                                 0x5c 0x03ffff00 /* LED Control Register 3 */
94                                 0x7c 0x0000007e /* PORT0_STATUS */
95                                 0x94 0x0000007e /* PORT6 STATUS */
96                         >;
97                 };
98         };
99 };
100
101 &spi0 {
102         status = "okay";
103
104         m25p80@0 {
105                 compatible = "jedec,spi-nor";
106                 reg = <0>;
107                 spi-max-frequency = <8600000>;
108                 m25p,fast-read;
109
110                 partitions {
111                         compatible = "fixed-partitions";
112                         #address-cells = <1>;
113                         #size-cells = <1>;
114
115                         partition@0 {
116                                 label = "u-boot";
117                                 reg = <0x0 0x30000>;
118                                 read-only;
119                         };
120
121                         partition@30000 {
122                                 label = "u-boot-env";
123                                 reg = <0x30000 0x10000>;
124                                 read-only;
125                         };
126
127                         factory: partition@40000 {
128                                 label = "factory";
129                                 reg = <0x40000 0x10000>;
130                                 read-only;
131                         };
132
133                         partition@50000 {
134                                 label = "firmware";
135                                 reg = <0x50000 0x713000>;
136                         };
137
138                         partition@763000 {
139                                 label = "manufacture";
140                                 reg = <0x763000 0x7D000>;
141                                 read-only;
142                         };
143
144                         partition@7E0000 {
145                                 label = "backup";
146                                 reg = <0x7E0000 0x10000>;
147                                 read-only;
148                         };
149
150                         partition@7F0000 {
151                                 label = "storage";
152                                 reg = <0x7F0000 0x10000>;
153                                 read-only;
154                         };
155                 };
156         };
157 };
158
159 &pci {
160         status = "okay";
161 };
162
163 &pci1 {
164         status = "okay";
165
166         wifi@0,0 {
167                 compatible = "pci1814,3091";
168                 reg = <0x10000 0 0 0 0>;
169                 ralink,mtd-eeprom = <&factory 0x8000>;
170         };
171 };
172
173 &wmac {
174         status = "okay";
175         ralink,2ghz = <0>;
176         ralink,mtd-eeprom = <&factory 0x0>;
177 };
178
179 &ehci {
180         status = "okay";
181 };
182
183 &ohci {
184         status = "okay";
185 };