ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_xzwifi_creativebox-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "xzwifi,creativebox-v1", "mediatek,mt7621-soc";
11 model = "CreativeBox v1";
12
13 aliases {
14 led-boot = &led_sys;
15 led-failsafe = &led_sys;
16 led-running = &led_sys;
17 led-upgrade = &led_sys;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power {
28 label = "creativebox-v1:blue:power";
29 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 led_sys: sys {
34 label = "creativebox-v1:blue:sys";
35 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
36 };
37
38 internet {
39 label = "creativebox-v1:blue:internet";
40 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
41 };
42
43 wlan2g {
44 label = "creativebox-v1:blue:wlan2g";
45 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
46 linux,default-trigger = "phy0tpt";
47 };
48
49 wlan5g {
50 label = "creativebox-v1:blue:wlan5g";
51 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
52 linux,default-trigger = "phy1tpt";
53 };
54 };
55
56 keys {
57 compatible = "gpio-keys";
58
59 reset {
60 label = "reset";
61 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_RESTART>;
63 };
64 };
65
66 gpio_export {
67 compatible = "gpio-export";
68 #size-cells = <0>;
69
70 power_usb2 {
71 gpio-export,name = "power_usb2";
72 gpio-export,output = <1>;
73 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
74 };
75
76 power_usb3 {
77 gpio-export,name = "power_usb3";
78 gpio-export,output = <1>;
79 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
80 };
81
82 power_sata {
83 gpio-export,name = "power_sata";
84 gpio-export,output = <1>;
85 gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
86 };
87 };
88 };
89
90 &spi0 {
91 status = "okay";
92
93 flash@0 {
94 compatible = "jedec,spi-nor";
95 reg = <0>;
96 spi-max-frequency = <40000000>;
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 partition@0 {
104 label = "u-boot";
105 reg = <0x0 0x30000>;
106 read-only;
107 };
108
109 partition@30000 {
110 label = "u-boot-env";
111 reg = <0x30000 0x10000>;
112 read-only;
113 };
114
115 factory: partition@40000 {
116 label = "factory";
117 reg = <0x40000 0x10000>;
118 read-only;
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x50000 0x1fb0000>;
125 };
126 };
127 };
128 };
129
130 &sdhci {
131 status = "okay";
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 wifi@0,0 {
140 compatible = "pci1400,7603";
141 reg = <0x0000 0 0 0 0>;
142 mediatek,mtd-eeprom = <&factory 0x0000>;
143 };
144 };
145
146 &pcie1 {
147 wifi@0,0 {
148 compatible = "pci14c3,7662";
149 reg = <0x0000 0 0 0 0>;
150 mediatek,mtd-eeprom = <&factory 0x8000>;
151 ieee80211-freq-limit = <5000000 6000000>;
152 };
153 };
154
155 &ethernet {
156 mtd-mac-address = <&factory 0xe000>;
157 };
158
159 &state_default {
160 gpio {
161 ralink,group = "wdt", "rgmii2";
162 ralink,function = "gpio";
163 };
164 };