ramips: rtxxxx: convert to nvmem-layout
[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 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 rfkill {
84 label = "rfkill";
85 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_RFKILL>;
87 };
88 };
89
90 leds {
91 compatible = "gpio-leds";
92
93 led_wps: wps {
94 label = "green:wps";
95 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
96 };
97 };
98 };
99
100 &gpio1 {
101 status = "okay";
102 };
103
104 &state_default {
105 gpio {
106 groups = "spi", "i2c", "jtag", "uartf";
107 function = "gpio";
108 };
109 };
110
111 &ethernet {
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 };
128 };
129
130 &wmac {
131 ralink,5ghz = <0>;
132 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>;
133 nvmem-cell-names = "eeprom", "mac-address";
134 mac-address-increment = <1>;
135 };