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