ramips: use DT trigger for 2G WiFi on ASUS RT-AC51U
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_phicomm_k2p.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 = "phicomm,k2p", "mediatek,mt7621-soc";
10 model = "Phicomm K2P";
11
12 aliases {
13 led-boot = &led_blue;
14 led-failsafe = &led_blue;
15 led-running = &led_blue;
16 led-upgrade = &led_blue;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 stat_r {
27 label = "k2p:red:status";
28 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
29 };
30
31 stat_y {
32 label = "k2p:yellow:status";
33 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
34 };
35
36 led_blue: stat_b {
37 label = "k2p:blue:status";
38 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
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 label = "permanent_config";
86 reg = <0x50000 0x50000>;
87 read-only;
88 };
89
90 partition@a0000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0xa0000 0xf60000>;
94 };
95 };
96 };
97 };
98
99 &pcie {
100 status = "okay";
101 };
102
103 &pcie0 {
104 mt76@0,0 {
105 reg = <0x0000 0 0 0 0>;
106 mediatek,mtd-eeprom = <&factory 0x0>;
107 };
108 };
109
110 &gmac0 {
111 mtd-mac-address = <&factory 0xe000>;
112 };
113
114 &switch0 {
115 ports {
116 port@0 {
117 status = "okay";
118 label = "lan1";
119 };
120
121 port@1 {
122 status = "okay";
123 label = "lan2";
124 };
125
126 port@2 {
127 status = "okay";
128 label = "lan3";
129 };
130
131 port@3 {
132 status = "okay";
133 label = "lan4";
134 };
135
136 port@4 {
137 status = "okay";
138 label = "wan";
139 mtd-mac-address = <&factory 0xe006>;
140 };
141 };
142 };
143
144 &state_default {
145 gpio {
146 groups = "i2c", "jtag";
147 function = "gpio";
148 };
149 };