ramips: add missing SPDX identifier for EX6150
[oweals/openwrt.git] / target / linux / ramips / dts / 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         memory@0 {
21                 device_type = "memory";
22                 reg = <0x0 0x1C000000>,
23                       <0x20000000 0x4000000>;
24         };
25
26         chosen {
27                 bootargs = "console=ttyS0,115200";
28         };
29
30         leds {
31                 compatible = "gpio-leds";
32
33                 power {
34                         label = "creativebox-v1:blue:power";
35                         gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
36                         default-state = "on";
37                 };
38
39                 led_sys: sys {
40                         label = "creativebox-v1:blue:sys";
41                         gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
42                 };
43
44                 internet {
45                         label = "creativebox-v1:blue:internet";
46                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wlan2g {
50                         label = "creativebox-v1:blue:wlan2g";
51                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
52                         linux,default-trigger = "phy0tpt";
53                 };
54
55                 wlan5g {
56                         label = "creativebox-v1:blue:wlan5g";
57                         gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
58                         linux,default-trigger = "phy1tpt";
59                 };
60         };
61
62         keys {
63                 compatible = "gpio-keys-polled";
64                 poll-interval = <20>;
65
66                 reset {
67                         label = "reset";
68                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
69                         linux,code = <KEY_RESTART>;
70                 };
71         };
72
73         gpio_export {
74                 compatible = "gpio-export";
75                 #size-cells = <0>;
76
77                 power_usb2 {
78                         gpio-export,name = "power_usb2";
79                         gpio-export,output = <1>;
80                         gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
81                 };
82
83                 power_usb3 {
84                         gpio-export,name = "power_usb3";
85                         gpio-export,output = <1>;
86                         gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
87                 };
88
89                 power_sata {
90                         gpio-export,name = "power_sata";
91                         gpio-export,output = <1>;
92                         gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
93                 };
94         };
95 };
96
97 &spi0 {
98         status = "okay";
99
100         flash@0 {
101                 compatible = "jedec,spi-nor";
102                 reg = <0>;
103                 spi-max-frequency = <40000000>;
104
105                 partitions {
106                         compatible = "fixed-partitions";
107                         #address-cells = <1>;
108                         #size-cells = <1>;
109
110                         partition@0 {
111                                 label = "u-boot";
112                                 reg = <0x0 0x30000>;
113                                 read-only;
114                         };
115
116                         partition@30000 {
117                                 label = "u-boot-env";
118                                 reg = <0x30000 0x10000>;
119                                 read-only;
120                         };
121
122                         factory: partition@40000 {
123                                 label = "factory";
124                                 reg = <0x40000 0x10000>;
125                                 read-only;
126                         };
127
128                         partition@50000 {
129                                 compatible = "denx,uimage";
130                                 label = "firmware";
131                                 reg = <0x50000 0x1fb0000>;
132                         };
133                 };
134         };
135 };
136
137 &sdhci {
138         status = "okay";
139 };
140
141 &pcie {
142         status = "okay";
143 };
144
145 &pcie0 {
146         wifi@0,0 {
147                 compatible = "pci1400,7603";
148                 reg = <0x0000 0 0 0 0>;
149                 mediatek,mtd-eeprom = <&factory 0x0000>;
150         };
151 };
152
153 &pcie1 {
154         wifi@0,0 {
155                 compatible = "pci14c3,7662";
156                 reg = <0x0000 0 0 0 0>;
157                 mediatek,mtd-eeprom = <&factory 0x8000>;
158                 ieee80211-freq-limit = <5000000 6000000>;
159         };
160 };
161
162 &ethernet {
163         mtd-mac-address = <&factory 0xe000>;
164 };
165
166 &pinctrl {
167         state_default: pinctrl0 {
168                 gpio {
169                         ralink,group = "wdt", "rgmii2";
170                         ralink,function = "gpio";
171                 };
172         };
173 };