ramips: add support for Mercury MAC1200R v2
[librecmc/librecmc.git] / target / linux / ramips / dts / TEW-692GR.dts
1 /dts-v1/;
2
3 #include "rt3883.dtsi"
4
5 / {
6         compatible = "TEW-692GR", "ralink,rt3883-soc";
7         model = "TRENDnet TEW-692GR";
8
9         nor-flash@1c000000 {
10                 compatible = "cfi-flash";
11                 reg = <0x1c000000 0x800000>;
12                 bank-width = <2>;
13                 #address-cells = <1>;
14                 #size-cells = <1>;
15
16                 partition@0 {
17                         reg = <0x0 0x0030000>;
18                         label = "u-boot";
19                         read-only;
20                 };
21
22                 partition@30000 {
23                         reg = <0x00030000 0x00010000>;
24                         label = "u-boot-env";
25                         read-only;
26                 };
27
28                 factory: partition@40000 {
29                         reg = <0x00040000 0x00010000>;
30                         label = "factory";
31                         read-only;
32                 };
33
34                 partition@50000 {
35                         reg = <0x00050000 0x007b0000>;
36                         label = "firmware";
37                 };
38         };
39
40         gpio-keys-polled {
41                 compatible = "gpio-keys-polled";
42                 #address-cells = <1>;
43                 #size-cells = <0>;
44                 poll-interval = <100>;
45
46                 reset {
47                         label = "reset";
48                         gpios = <&gpio0 10 1>;
49                         linux,code = <0x198>;
50                 };
51
52                 wps {
53                         label = "wps";
54                         gpios = <&gpio1 2 1>;
55                         linux,code = <0x211>;
56                 };
57         };
58
59         gpio-leds {
60                 compatible = "gpio-leds";
61
62                 wps {
63                         label = "tew-692gr:orange:wps";
64                         gpios = <&gpio0 9 1>;
65                 };
66
67                 wps2 {
68                         label = "tew-692gr:green:wps";
69                         gpios = <&gpio1 4 1>;
70                 };
71         };
72 };
73
74 &gpio1 {
75         status = "okay";
76 };
77
78 &pinctrl {
79         state_default: pinctrl0 {
80                 gpio {
81                         ralink,group = "spi", "i2c", "jtag", "uartf";
82                         ralink,function = "gpio";
83                 };
84         };
85 };
86
87 &ethernet {
88         status = "okay";
89         mtd-mac-address = <&factory 0x4>;
90
91         port@0 {
92                 phy-handle = <&phy0>;
93                 phy-mode = "rgmii";
94         };
95
96         mdio-bus {
97                 status = "okay";
98
99                 phy0: ethernet-phy@0 {
100                         reg = <0>;
101                         phy-mode = "rgmii";
102
103                         qca,ar8327-initvals = <
104                                 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
105                                 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
106                                 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
107                                 0x50 0xc437c437 /* LED Control Register 0 */
108                                 0x54 0xc337c337 /* LED Control Register 1 */
109                                 0x58 0x00000000 /* LED Control Register 2 */
110                                 0x5c 0x03ffff00 /* LED Control Register 3 */
111                                 0x7c 0x0000007e /* PORT0_STATUS */
112                                 0x94 0x0000007e /* PORT6 STATUS */
113                         >;
114                 };
115         };
116 };
117
118 &pci {
119         status = "okay";
120         pinctrl-names = "default";
121         pinctrl-0 = <&pci_pins>;
122
123         pci_pins: pci {
124                 pci {
125                         ralink,group = "pci";
126                         ralink,function = "pci-fnc";
127                 };
128         };
129
130         host-bridge {
131                 pci-bridge@1 {
132                         status = "okay";
133
134                         wmac@0,0 {
135                                 compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604";
136                                 reg = < 0x10000 0 0 0 0 >;
137                                 ralink,2ghz = <0>;
138                         };
139                 };
140         };
141 };
142
143 &wmac {
144         status = "okay";
145         ralink,mtd-eeprom = <&factory 0x0>;
146         ralink,5ghz = <0>;
147 };