f23dc1cb03909898284d9a4c9040b020e5a00de2
[openwrt/openwrt.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
6 / {
7 compatible = "trendnet,tew-691gr", "ralink,rt3883-soc";
8 model = "TRENDnet TEW-691GR";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
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 compatible = "mac-base";
55 reg = <0x4 0x6>;
56 #nvmem-cell-cells = <1>;
57 };
58 };
59 };
60
61 partition@50000 {
62 compatible = "denx,uimage";
63 reg = <0x00050000 0x007b0000>;
64 label = "firmware";
65 };
66 };
67 };
68
69 keys {
70 compatible = "gpio-keys-polled";
71 poll-interval = <100>;
72
73 reset {
74 label = "reset";
75 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_RESTART>;
77 };
78
79 wps {
80 label = "wps";
81 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
82 linux,code = <KEY_WPS_BUTTON>;
83 };
84
85 rfkill {
86 label = "rfkill";
87 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
88 linux,code = <KEY_RFKILL>;
89 };
90 };
91
92 leds {
93 compatible = "gpio-leds";
94
95 led_wps: wps {
96 label = "green:wps";
97 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
98 };
99 };
100 };
101
102 &gpio1 {
103 status = "okay";
104 };
105
106 &state_default {
107 gpio {
108 groups = "spi", "i2c", "jtag", "uartf";
109 function = "gpio";
110 };
111 };
112
113 &ethernet {
114 nvmem-cells = <&macaddr_factory_4 0>;
115 nvmem-cell-names = "mac-address";
116
117 port@0 {
118 phy-handle = <&phy0>;
119 phy-mode = "rgmii";
120 };
121
122 mdio-bus {
123 status = "okay";
124
125 phy0: ethernet-phy@0 {
126 reg = <0>;
127 phy-mode = "rgmii";
128 };
129 };
130 };
131
132 &wmac {
133 ralink,5ghz = <0>;
134 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 1>;
135 nvmem-cell-names = "eeprom", "mac-address";
136 };