ramips: mt7621: convert GPIO dts refs
[openwrt/openwrt.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";
27
28 reset {
29 label = "reset";
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 system_led: system {
39 label = "x1:green:system";
40 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
41 };
42
43 modem_offline {
44 label = "x1:red:modem-offline";
45 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
46 };
47
48 modem_4g {
49 label = "x1:blue:modem-4g";
50 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
51 };
52
53 modem_3g {
54 label = "x1:green:modem-3g";
55 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
56 };
57
58 modem_rssi_lowest {
59 label = "x1:green:modem-rssi-lowest";
60 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
61 };
62
63 modem_rssi_low {
64 label = "x1:green:modem-rssi-low";
65 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
66 };
67
68 modem_rssi_medium {
69 label = "x1:green:modem-rssi-medium";
70 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
71 };
72
73 modem_rssi_high {
74 label = "x1:green:modem-rssi-high";
75 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
76 };
77
78 modem_rssi_highest {
79 label = "x1:green:modem-rssi-highest";
80 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
81 };
82 };
83 };
84
85 &spi0 {
86 status = "okay";
87
88 flash@0 {
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <14000000>;
92
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "bootloader";
100 reg = <0x0 0x30000>;
101 read-only;
102 };
103
104 partition@30000 {
105 label = "config";
106 reg = <0x30000 0x10000>;
107 read-only;
108 };
109
110 factory: partition@40000 {
111 label = "factory";
112 reg = <0x40000 0x10000>;
113 read-only;
114 };
115
116 firmware: partition@50000 {
117 compatible = "denx,uimage";
118 label = "firmware";
119 reg = <0x50000 0xfb0000>;
120 };
121 };
122 };
123 };
124
125 &gpio {
126 status = "okay";
127 };
128
129 &ethernet {
130 mtd-mac-address = <&factory 0xe006>;
131 mediatek,portmap = "llllw";
132 };
133
134 &state_default {
135 gpio {
136 ralink,group = "jtag", "uart2", "wdt", "rgmii2";
137 ralink,function = "gpio";
138 };
139 };
140
141 &pcie {
142 status = "okay";
143
144 pcie0 {
145 wifi@0,0 {
146 compatible = "pci14c3,7603";
147 reg = <0x0000 0 0 0 0>;
148 mediatek,mtd-eeprom = <&factory 0x0000>;
149 ieee80211-freq-limit = <2400000 2500000>;
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 led {
160 led-sources = <2>;
161 };
162 };
163 };
164 };