939beed529d5f93c488f0f7829144279e47913d8
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / EX3700.dts
1 /* This file is released into the public domain */
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 #include "mt7620a.dtsi"
9
10 / {
11 compatible = "netgear,ex3700", "ralink,mt7620a-soc";
12 model = "Netgear EX3700/EX3800";
13
14 aliases {
15 led-boot = &led_power_green;
16 led-failsafe = &led_power_green;
17 led-running = &led_power_green;
18 led-upgrade = &led_power_green;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 led_power_green: power_g {
29 label = "ex3700:green:power";
30 gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 power_a {
35 label = "ex3700:amber:power";
36 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
37 default-state = "off";
38 };
39
40 router_g {
41 label = "ex3700:green:router";
42 gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
43 };
44
45 router_r {
46 label = "ex3700:red:router";
47 gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
48 };
49
50 device_g {
51 label = "ex3700:green:device";
52 gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
53 };
54
55 device_r {
56 label = "ex3700:red:device";
57 gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
58 };
59
60 wps {
61 label = "ex3700:green:wps";
62 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
63 };
64 };
65
66 gpio-keys-polled {
67 compatible = "gpio-keys-polled";
68 poll-interval = <20>;
69
70 reset {
71 label = "reset";
72 gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 wps {
77 label = "wps";
78 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_WPS_BUTTON>;
80 };
81 };
82 };
83
84 &gpio0 {
85 status = "okay";
86 };
87
88 &gpio2 {
89 status = "okay";
90 };
91
92 &spi0 {
93 status = "okay";
94
95 m25p80@0 {
96 compatible = "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <10000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x0 0x30000>;
108 read-only;
109 };
110
111 partition@30000 {
112 label = "config";
113 reg = <0x30000 0x10000>;
114 read-only;
115 };
116
117 factory: partition@40000 {
118 label = "factory";
119 reg = <0x40000 0x10000>;
120 read-only;
121 };
122
123 partition@50000 {
124 compatible = "denx,uimage";
125 label = "firmware";
126 reg = <0x50000 0x790000>;
127 };
128
129 partition@7e0000 {
130 label = "board_data";
131 reg = <0x7e0000 0x10000>;
132 read-only;
133 };
134
135 partition@7f0000 {
136 label = "nvram";
137 reg = <0x7f0000 0x10000>;
138 read-only;
139 };
140 };
141 };
142 };
143
144 &pcie {
145 status = "okay";
146 };
147
148 &pcie0 {
149 mt76@0,0 {
150 reg = <0x0000 0 0 0 0 >;
151 mediatek,mtd-eeprom = <&factory 0x8000>;
152 ieee80211-freq-limit = <5000000 6000000>;
153 };
154 };
155
156 &ethernet {
157 mtd-mac-address = <&factory 0x28>;
158 };
159
160 &wmac {
161 ralink,mtd-eeprom = <&factory 0x0>;
162 };
163
164 &pinctrl {
165 state_default: pinctrl0 {
166 default {
167 ralink,group = "i2c", "rgmii2", "spi refclk";
168 ralink,function = "gpio";
169 };
170 };
171 };