abba2ea8b1cd4ae06089af8f58ea086e0b4acce6
[openwrt/staging/mkresin.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
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <14000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "bootloader";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "config";
107 reg = <0x30000 0x10000>;
108 read-only;
109 };
110
111 factory: partition@40000 {
112 label = "factory";
113 reg = <0x40000 0x10000>;
114 read-only;
115 };
116
117 firmware: partition@50000 {
118 compatible = "denx,uimage";
119 label = "firmware";
120 reg = <0x50000 0xfb0000>;
121 };
122 };
123 };
124 };
125
126 &gpio0 {
127 status = "okay";
128 };
129
130 &ethernet {
131 mtd-mac-address = <&factory 0xe006>;
132 mediatek,portmap = "llllw";
133 };
134
135 &pinctrl {
136 state_default: pinctrl0 {
137 gpio {
138 ralink,group = "jtag", "uart2", "wdt", "rgmii2";
139 ralink,function = "gpio";
140 };
141 };
142 };
143
144 &pcie {
145 status = "okay";
146
147 pcie0 {
148 wifi@0,0 {
149 compatible = "pci14c3,7603";
150 reg = <0x0000 0 0 0 0>;
151 mediatek,mtd-eeprom = <&factory 0x0000>;
152 ieee80211-freq-limit = <2400000 2500000>;
153 };
154 };
155
156 pcie1 {
157 wifi@0,0 {
158 compatible = "pci14c3,7662";
159 reg = <0x0000 0 0 0 0>;
160 mediatek,mtd-eeprom = <&factory 0x8000>;
161 ieee80211-freq-limit = <5000000 6000000>;
162 led {
163 led-sources = <2>;
164 };
165 };
166 };
167 };