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