ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_lava_lr-25g001.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "lava,lr-25g001", "ralink,mt7620a-soc";
10 model = "LAVA LR-25G001";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 wps {
23 label = "wps";
24 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 reset {
29 label = "reset";
30 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_status: status {
39 label = "lr-25g001:green:status";
40 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
41 };
42
43 wifi2g {
44 label = "lr-25g001:green:wifi2g";
45 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
46 };
47
48 wifi5g {
49 label = "lr-25g001:green:wifi5g";
50 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
51 };
52 };
53
54 gpio_export {
55 compatible = "gpio-export";
56 #size-cells = <0>;
57
58 usbpower {
59 gpio-export,name = "usbpower";
60 gpio-export,output = <1>;
61 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
62 };
63 };
64 };
65
66 &gpio0 {
67 status = "okay";
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "jboot";
85 reg = <0x0 0x10000>;
86 read-only;
87 };
88
89 partition@10000 {
90 compatible = "amit,jimage";
91 label = "firmware";
92 reg = <0x10000 0xfe0000>;
93 };
94
95 config: partition@ff0000 {
96 label = "config";
97 reg = <0xff0000 0x10000>;
98 read-only;
99 };
100 };
101 };
102 };
103
104 &ehci {
105 status = "okay";
106 };
107
108 &ohci {
109 status = "okay";
110 };
111
112 &ethernet {
113 pinctrl-names = "default";
114 pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
115
116 port@5 {
117 status = "okay";
118 phy-mode = "rgmii";
119 mediatek,fixed-link = <1000 1 1 1>;
120 };
121
122 mdio-bus {
123 status = "okay";
124 mediatek,mdio-mode = <1>;
125
126 phy0: ethernet-phy@0 {
127 reg = <0>;
128 phy-mode = "rgmii";
129 qca,ar8327-initvals = <
130 0x04 0x87300000 /* PORT0 PAD MODE CTRL */
131 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
132 0x7c 0x0000007e /* PORT0_STATUS */
133 0x94 0x00000000 /* PORT6_STATUS */
134 >;
135 };
136
137 phy1: ethernet-phy@1 {
138 reg = <1>;
139 phy-mode = "rgmii";
140 };
141
142 phy2: ethernet-phy@2 {
143 reg = <2>;
144 phy-mode = "rgmii";
145 };
146
147 phy3: ethernet-phy@3 {
148 reg = <3>;
149 phy-mode = "rgmii";
150 };
151
152 phy4: ethernet-phy@4 {
153 reg = <4>;
154 phy-mode = "rgmii";
155 };
156 };
157 };
158
159 &pcie {
160 status = "okay";
161 };
162
163 &pcie0 {
164 mt76x0e@0,0 {
165 reg = <0x0000 0 0 0 0>;
166 mtd-mac-address = <&config 0xe07e>;
167 mtd-mac-address-increment = <(2)>;
168 mediatek,mtd-eeprom = <&config 0xe08a>;
169 };
170 };
171
172 &state_default {
173 gpio {
174 groups = "uartf", "i2c";
175 function = "gpio";
176 };
177 };