ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_totolink_lr1200.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "totolink,lr1200", "mediatek,mt7628dan";
11 model = "TOTOLINK LR1200";
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 leds {
21 compatible = "gpio-leds";
22
23 led_sys: sys {
24 label = "lr1200:blue:sys";
25 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
26 };
27
28 sms {
29 label = "lr1200:blue:sms";
30 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
31 };
32
33 wifi {
34 label = "lr1200:blue:wifi";
35 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0tpt";
37 };
38
39 3g {
40 label = "lr1200:blue:3g";
41 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
42 };
43
44 4g {
45 label = "lr1200:blue:4g";
46 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
47 };
48
49 rssi1 {
50 label = "lr1200:blue:rssi1";
51 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
52 };
53
54 rssi2 {
55 label = "lr1200:blue:rssi2";
56 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
57 };
58
59 rssi3 {
60 label = "lr1200:blue:rssi3";
61 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
62 };
63
64 rssi4 {
65 label = "lr1200:blue:rssi4";
66 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
67 };
68 };
69
70 keys {
71 compatible = "gpio-keys";
72
73 reset {
74 label = "reset";
75 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
76 linux,code = <KEY_RESTART>;
77 };
78 };
79 };
80
81 &gpio1 {
82 gpio_modem_reset {
83 gpio-hog;
84 gpios = <13 GPIO_ACTIVE_HIGH>;
85 output-high;
86 line-name = "modem-reset";
87 };
88 };
89
90 &pinctrl {
91 state_default: pinctrl0 {
92 gpio {
93 ralink,group = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
94 ralink,function = "gpio";
95 };
96 };
97 };
98
99 &pcie {
100 status = "okay";
101 };
102
103 &pcie0 {
104 mt76@0,0 {
105 reg = <0x0000 0 0 0 0>;
106 mediatek,mtd-eeprom = <&factory 0x8000>;
107 ieee80211-freq-limit = <5000000 6000000>;
108 };
109 };
110
111 &wmac {
112 status = "okay";
113 ralink,mtd-eeprom = <&factory 0x4>;
114 };
115
116 &ethernet {
117 mtd-mac-address = <&factory 0x28>;
118 };
119
120 &spi0 {
121 status = "okay";
122
123 m25p80@0 {
124 compatible = "jedec,spi-nor";
125 reg = <0>;
126 spi-max-frequency = <40000000>;
127
128 partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 partition@0 {
134 label = "u-boot";
135 reg = <0x0 0x30000>;
136 read-only;
137 };
138
139 partition@30000 {
140 label = "u-boot-env";
141 reg = <0x30000 0x10000>;
142 read-only;
143 };
144
145 factory: partition@40000 {
146 label = "factory";
147 reg = <0x40000 0x10000>;
148 read-only;
149 };
150
151 partition@50000 {
152 compatible = "denx,uimage";
153 label = "firmware";
154 reg = <0x50000 0x7b0000>;
155 };
156 };
157 };
158 };