ramips: add preliminary support for WIO ONE
[openwrt/openwrt.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-polled";
58 poll-interval = <20>;
59
60 reset {
61 label = "reset";
62 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_RESTART>;
64 };
65 };
66
67 gpio_export {
68 compatible = "gpio-export";
69 #size-cells = <0>;
70
71 power_usb2 {
72 gpio-export,name = "power_usb2";
73 gpio-export,output = <1>;
74 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
75 };
76
77 power_usb3 {
78 gpio-export,name = "power_usb3";
79 gpio-export,output = <1>;
80 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
81 };
82
83 power_sata {
84 gpio-export,name = "power_sata";
85 gpio-export,output = <1>;
86 gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
87 };
88 };
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <40000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120 };
121
122 partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0x1fb0000>;
126 };
127 };
128 };
129 };
130
131 &sdhci {
132 status = "okay";
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie0 {
140 wifi@0,0 {
141 compatible = "pci1400,7603";
142 reg = <0x0000 0 0 0 0>;
143 mediatek,mtd-eeprom = <&factory 0x0000>;
144 };
145 };
146
147 &pcie1 {
148 wifi@0,0 {
149 compatible = "pci14c3,7662";
150 reg = <0x0000 0 0 0 0>;
151 mediatek,mtd-eeprom = <&factory 0x8000>;
152 ieee80211-freq-limit = <5000000 6000000>;
153 };
154 };
155
156 &ethernet {
157 mtd-mac-address = <&factory 0xe000>;
158 };
159
160 &pinctrl {
161 state_default: pinctrl0 {
162 gpio {
163 ralink,group = "wdt", "rgmii2";
164 ralink,function = "gpio";
165 };
166 };
167 };