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