ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mikrotik_routerboard-m11g.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "mikrotik,routerboard-m11g", "mediatek,mt7621-soc";
10 model = "MikroTik RouterBOARD M11G";
11
12 aliases {
13 led-boot = &led_usr;
14 led-failsafe = &led_usr;
15 led-running = &led_usr;
16 led-upgrade = &led_usr;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_usr: usr {
27 label = "routerboard-m11g:green:usr";
28 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
29 };
30
31 rssi0 {
32 label = "routerboard-m11g:green:rssi0";
33 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
34 };
35
36 rssi1 {
37 label = "routerboard-m11g:green:rssi1";
38 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
39 };
40
41 rssi2 {
42 label = "routerboard-m11g:green:rssi2";
43 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
44 };
45
46 rssi3 {
47 label = "routerboard-m11g:green:rssi3";
48 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
49 };
50
51 rssi4 {
52 label = "routerboard-m11g:green:rssi4";
53 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys";
59
60 res {
61 label = "reset";
62 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_RESTART>;
64 };
65 };
66
67 pcie0_vcc_reg {
68 compatible = "regulator-fixed";
69 regulator-name = "pcie0_vcc";
70
71 regulator-min-microvolt = <3300000>;
72 regulator-max-microvolt = <3300000>;
73 gpio = <&gpio 9 GPIO_ACTIVE_HIGH>;
74 enable-active-high;
75 regulator-boot-on;
76 regulator-always-on;
77 };
78 };
79
80 &spi0 {
81 status = "okay";
82
83 flash@0 {
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 // XXX empiric value to obtain actual 10MHz SCK at the chip
87 spi-max-frequency = <3125000>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "RouterBoot";
96 reg = <0x0 0x40000>;
97 read-only;
98 compatible = "mikrotik,routerboot-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "bootloader1";
104 reg = <0x0 0x0>;
105 read-only;
106 };
107
108 hard_config: hard_config {
109 read-only;
110 };
111
112 partition@10000 {
113 label = "bootloader2";
114 reg = <0x10000 0xf000>;
115 read-only;
116 };
117
118 soft_config {
119 };
120
121 partition@30000 {
122 label = "bios";
123 reg = <0x30000 0x1000>;
124 read-only;
125 };
126 };
127
128 partition@40000 {
129 compatible = "mikrotik,minor";
130 label = "firmware";
131 reg = <0x040000 0xFC0000>;
132 };
133 };
134 };
135 };
136
137 &switch0 {
138 ports {
139 port@0 {
140 status = "okay";
141 label = "lan";
142 };
143 };
144 };
145
146 &state_default {
147 gpio {
148 groups = "uart2", "wdt", "rgmii2";
149 function = "gpio";
150 };
151 };
152
153 &i2c {
154 status = "okay";
155 };
156
157 &pcie {
158 status = "okay";
159 };