ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_samknows_whitebox-v8.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "samknows,whitebox-v8", "mediatek,mt7621-soc";
9 model = "SamKnows Whitebox 8";
10
11 aliases {
12 led-boot = &led_wps;
13 led-failsafe = &led_wps;
14 led-running = &led_wps;
15 led-upgrade = &led_wps;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,57600";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_wps: wps {
26 label = "sk-wb8:green:wps";
27 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
28 };
29
30 usb {
31 label = "sk-wb8:green:usb";
32 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
33 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
34 linux,default-trigger = "usbport";
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 wps {
42 label = "wps";
43 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_WPS_BUTTON>;
45 };
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x0 0x30000>;
71 read-only;
72 };
73
74 partition@30000 {
75 label = "u-boot-env";
76 reg = <0x30000 0x10000>;
77 };
78
79 factory: partition@40000 {
80 label = "factory";
81 reg = <0x40000 0x10000>;
82 read-only;
83 };
84
85 partition@50000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x50000 0xfb0000>;
89 };
90 };
91 };
92 };
93
94 &pcie {
95 status = "okay";
96 };
97
98 &pcie0 {
99 mt76@0,0 {
100 reg = <0x0000 0 0 0 0>;
101 mediatek,mtd-eeprom = <&factory 0x8000>;
102 ieee80211-freq-limit = <5000000 6000000>;
103 };
104 };
105
106 &pcie1 {
107 mt76@0,0 {
108 reg = <0x0000 0 0 0 0>;
109 mediatek,mtd-eeprom = <&factory 0x0000>;
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 0xe006>;
143 };
144 };
145 };
146
147 &state_default {
148 gpio {
149 groups = "sdhci";
150 function = "gpio";
151 };
152 };