ramips/mt7621: Name DTS files based on scheme
[openwrt/staging/chunkeey.git] / target / linux / ramips / dts / mt7621_telco-electronics_x1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "mt7621.dtsi"
6
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9
10 / {
11 compatible = "telco-electronics,x1", "mediatek,mt7621-soc";
12 model = "Telco Electronics X1";
13
14 aliases {
15 led-boot = &system_led;
16 led-failsafe = &system_led;
17 led-running = &system_led;
18 led-upgrade = &system_led;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 keys {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 system_led: system {
40 label = "x1:green:system";
41 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
42 };
43
44 modem_offline {
45 label = "x1:red:modem-offline";
46 gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
47 };
48
49 modem_4g {
50 label = "x1:blue:modem-4g";
51 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
52 };
53
54 modem_3g {
55 label = "x1:green:modem-3g";
56 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
57 };
58
59 modem_rssi_lowest {
60 label = "x1:green:modem-rssi-lowest";
61 gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
62 };
63
64 modem_rssi_low {
65 label = "x1:green:modem-rssi-low";
66 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
67 };
68
69 modem_rssi_medium {
70 label = "x1:green:modem-rssi-medium";
71 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
72 };
73
74 modem_rssi_high {
75 label = "x1:green:modem-rssi-high";
76 gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
77 };
78
79 modem_rssi_highest {
80 label = "x1:green:modem-rssi-highest";
81 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
82 };
83 };
84
85 memory@0 {
86 device_type = "memory";
87 reg = <0x0 0x10000000>;
88 };
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <14000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "bootloader";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "config";
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 firmware: partition@50000 {
123 compatible = "denx,uimage";
124 label = "firmware";
125 reg = <0x50000 0xfb0000>;
126 };
127 };
128 };
129 };
130
131 &gpio0 {
132 status = "okay";
133 };
134
135 &ethernet {
136 mtd-mac-address = <&factory 0xe006>;
137 mediatek,portmap = "llllw";
138 };
139
140 &pinctrl {
141 state_default: pinctrl0 {
142 gpio {
143 ralink,group = "jtag", "uart2", "wdt", "rgmii2";
144 ralink,function = "gpio";
145 };
146 };
147 };
148
149 &pcie {
150 status = "okay";
151
152 pcie0 {
153 wifi@0,0 {
154 compatible = "pci14c3,7603";
155 reg = <0x0000 0 0 0 0>;
156 mediatek,mtd-eeprom = <&factory 0x0000>;
157 ieee80211-freq-limit = <2400000 2500000>;
158 };
159 };
160
161 pcie1 {
162 wifi@0,0 {
163 compatible = "pci14c3,7662";
164 reg = <0x0000 0 0 0 0>;
165 mediatek,mtd-eeprom = <&factory 0x8000>;
166 ieee80211-freq-limit = <5000000 6000000>;
167 led {
168 led-sources = <2>;
169 };
170 };
171 };
172 };