ramips: Use dts alias based status led
[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 #address-cells = <1>;
66 #size-cells = <0>;
67 poll-interval = <20>;
68
69 reset {
70 label = "reset";
71 gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
72 linux,code = <KEY_RESTART>;
73 };
74
75 wps {
76 label = "wps";
77 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_WPS_BUTTON>;
79 };
80 };
81 };
82
83 &gpio0 {
84 status = "okay";
85 };
86
87 &gpio2 {
88 status = "okay";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 m25p80@0 {
95 #address-cells = <1>;
96 #size-cells = <1>;
97 compatible = "jedec,spi-nor";
98 reg = <0>;
99 spi-max-frequency = <10000000>;
100
101 partition@0 {
102 label = "u-boot";
103 reg = <0x0 0x30000>;
104 read-only;
105 };
106
107 partition@30000 {
108 label = "config";
109 reg = <0x30000 0x10000>;
110 read-only;
111 };
112
113 factory: partition@40000 {
114 label = "factory";
115 reg = <0x40000 0x10000>;
116 read-only;
117 };
118
119 partition@50000 {
120 label = "firmware";
121 reg = <0x50000 0x790000>;
122 };
123
124 partition@7e0000 {
125 label = "board_data";
126 reg = <0x7e0000 0x10000>;
127 read-only;
128 };
129
130 partition@7f0000 {
131 label = "nvram";
132 reg = <0x7f0000 0x10000>;
133 read-only;
134 };
135 };
136 };
137
138 &pcie {
139 status = "okay";
140
141 pcie-bridge {
142 mt76@0,0 {
143 reg = <0x0000 0 0 0 0 >;
144 device_type = "pci";
145 mediatek,mtd-eeprom = <&factory 0x8000>;
146 ieee80211-freq-limit = <5000000 6000000>;
147 };
148 };
149 };
150
151 &ethernet {
152 mtd-mac-address = <&factory 0x28>;
153 };
154
155 &wmac {
156 ralink,mtd-eeprom = <&factory 0x0>;
157 };
158
159 &pinctrl {
160 state_default: pinctrl0 {
161 default {
162 ralink,group = "i2c", "rgmii2", "spi refclk";
163 ralink,function = "gpio";
164 };
165 };
166 };