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