ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_firefly_firewrt.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "firefly,firewrt", "mediatek,mt7621-soc";
10 model = "Firefly FireWRT";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 label = "firewrt:green:power";
28 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 keys {
33 compatible = "gpio-keys";
34
35 wps {
36 label = "wps";
37 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40
41 power {
42 label = "power";
43 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_POWER>;
45 };
46 };
47 };
48
49 &sdhci {
50 status = "okay";
51 };
52
53 &spi0 {
54 status = "okay";
55
56 flash@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <10000000>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x30000>;
69 read-only;
70 };
71
72 partition@30000 {
73 label = "u-boot-env";
74 reg = <0x30000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@40000 {
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 read-only;
82 };
83
84 partition@50000 {
85 compatible = "denx,uimage";
86 label = "firmware";
87 reg = <0x50000 0xfb0000>;
88 };
89 };
90 };
91 };
92
93 &pcie {
94 status = "okay";
95 };
96
97 &pcie0 {
98 mt76@0,0 {
99 reg = <0x0000 0 0 0 0>;
100 mediatek,mtd-eeprom = <&factory 0x8000>;
101 ieee80211-freq-limit = <5000000 6000000>;
102 };
103 };
104
105 &pcie1 {
106 mt76@0,0 {
107 reg = <0x0000 0 0 0 0>;
108 mediatek,mtd-eeprom = <&factory 0x0000>;
109 ieee80211-freq-limit = <2400000 2500000>;
110 };
111 };
112
113 &gmac0 {
114 mtd-mac-address = <&factory 0xe000>;
115 };
116
117 &switch0 {
118 ports {
119 port@0 {
120 status = "okay";
121 label = "lan1";
122 };
123
124 port@1 {
125 status = "okay";
126 label = "lan2";
127 };
128
129 port@2 {
130 status = "okay";
131 label = "lan3";
132 };
133
134 port@3 {
135 status = "okay";
136 label = "lan4";
137 };
138
139 port@4 {
140 status = "okay";
141 label = "wan";
142 mtd-mac-address = <&factory 0xe000>;
143 mtd-mac-address-increment = <1>;
144 };
145 };
146 };
147
148 &state_default {
149 gpio {
150 groups = "wdt", "rgmii2";
151 function = "gpio";
152 };
153 };