ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_iodata_wn-gx300gr.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 = "iodata,wn-gx300gr", "mediatek,mt7621-soc";
10 model = "I-O DATA WN-GX300GR";
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,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power: power {
27 label = "wn-gx300gr:green:power";
28 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
29 };
30
31 wps {
32 label = "wn-gx300gr:green:wps";
33 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45
46 wps {
47 label = "wps";
48 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51
52 auto {
53 label = "auto";
54 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
55 linux,code = <BTN_0>;
56 linux,input-type = <EV_SW>;
57 };
58
59 custom {
60 label = "custom";
61 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
62 linux,code = <BTN_0>;
63 linux,input-type = <EV_SW>;
64 };
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70
71 m25p80@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "Bootloader";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "Config";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x10000>;
96 read-only;
97 };
98
99 partition@50000 {
100 label = "iNIC_rf";
101 reg = <0x50000 0x10000>;
102 read-only;
103 };
104
105 partition@60000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x60000 0x770000>;
109 };
110
111 partition@7d0000 {
112 label = "Key";
113 reg = <0x7d0000 0x10000>;
114 read-only;
115 };
116
117 partition@7e0000 {
118 label = "backup";
119 reg = <0x7e0000 0x10000>;
120 read-only;
121 };
122
123 partition@7f0000 {
124 label = "storage";
125 reg = <0x7f0000 0x10000>;
126 read-only;
127 };
128 };
129 };
130 };
131
132 &ethernet {
133 mtd-mac-address = <&factory 0x4>;
134 };
135
136 &state_default {
137 gpio {
138 ralink,group = "uart2", "uart3", "jtag";
139 ralink,function = "gpio";
140 };
141 };
142
143 &pcie {
144 status = "okay";
145 };
146
147 &pcie0 {
148 mt76@0,0 {
149 reg = <0x0000 0 0 0 0>;
150 mediatek,mtd-eeprom = <&factory 0x0>;
151 };
152 };
153
154 &xhci {
155 status = "disabled";
156 };