e982741435913d9cdc3fbeb0f40303b71c59e76f
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt3883_trendnet_tew-691gr.dts
1 #include "rt3883.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "trendnet,tew-691gr", "ralink,rt3883-soc";
9 model = "TRENDnet TEW-691GR";
10
11 aliases {
12 led-boot = &led_wps;
13 led-failsafe = &led_wps;
14 led-running = &led_wps;
15 led-upgrade = &led_wps;
16 };
17
18 flash@1c000000 {
19 compatible = "cfi-flash";
20 reg = <0x1c000000 0x800000>;
21 bank-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 reg = <0x0 0x0030000>;
30 label = "u-boot";
31 read-only;
32 };
33
34 partition@30000 {
35 reg = <0x00030000 0x00010000>;
36 label = "u-boot-env";
37 read-only;
38 };
39
40 factory: partition@40000 {
41 reg = <0x00040000 0x00010000>;
42 label = "factory";
43 read-only;
44
45 nvmem-layout {
46 compatible = "fixed-layout";
47 #address-cells = <1>;
48 #size-cells = <1>;
49
50 eeprom_factory_0: eeprom@0 {
51 reg = <0x0 0x200>;
52 };
53
54 macaddr_factory_4: macaddr@4 {
55 compatible = "mac-base";
56 reg = <0x4 0x6>;
57 #nvmem-cell-cells = <1>;
58 };
59 };
60 };
61
62 partition@50000 {
63 compatible = "denx,uimage";
64 reg = <0x00050000 0x007b0000>;
65 label = "firmware";
66 };
67 };
68 };
69
70 keys {
71 compatible = "gpio-keys-polled";
72 poll-interval = <100>;
73
74 reset {
75 label = "reset";
76 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
77 linux,code = <KEY_RESTART>;
78 };
79
80 wps {
81 label = "wps";
82 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_WPS_BUTTON>;
84 };
85
86 rfkill {
87 label = "rfkill";
88 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_RFKILL>;
90 };
91 };
92
93 leds {
94 compatible = "gpio-leds";
95
96 led_wps: wps {
97 function = LED_FUNCTION_WPS;
98 color = <LED_COLOR_ID_GREEN>;
99 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
100 };
101 };
102 };
103
104 &gpio1 {
105 status = "okay";
106 };
107
108 &state_default {
109 gpio {
110 groups = "spi", "i2c", "jtag", "uartf";
111 function = "gpio";
112 };
113 };
114
115 &ethernet {
116 nvmem-cells = <&macaddr_factory_4 0>;
117 nvmem-cell-names = "mac-address";
118
119 port@0 {
120 phy-handle = <&phy0>;
121 phy-mode = "rgmii";
122 };
123
124 mdio-bus {
125 status = "okay";
126
127 phy0: ethernet-phy@0 {
128 reg = <0>;
129 phy-mode = "rgmii";
130 };
131 };
132 };
133
134 &wmac {
135 ralink,5ghz = <0>;
136 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 1>;
137 nvmem-cell-names = "eeprom", "mac-address";
138 };