ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7621_adslr_g7.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "adslr,g7", "mediatek,mt7621-soc";
11 model = "ADSLR G7";
12
13 aliases {
14 led-boot = &led_sys;
15 led-failsafe = &led_sys;
16 led-running = &led_sys;
17 led-upgrade = &led_sys;
18 label-mac-device = &ethernet;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_sys: sys {
29 label = "g7:blue:sys";
30 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
40 debounce-interval = <60>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44 };
45
46 &spi0 {
47 status = "okay";
48
49 flash@0 {
50 compatible = "jedec,spi-nor";
51 reg = <0>;
52 spi-max-frequency = <40000000>;
53
54 partitions {
55 compatible = "fixed-partitions";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x0 0x30000>;
62 read-only;
63 };
64
65 partition@30000 {
66 label = "u-boot-env";
67 reg = <0x30000 0x10000>;
68 read-only;
69 };
70
71 factory: partition@40000 {
72 label = "factory";
73 reg = <0x40000 0x10000>;
74 read-only;
75 };
76
77 partition@50000 {
78 compatible = "denx,uimage";
79 label = "firmware";
80 reg = <0x50000 0xfb0000>;
81 };
82 };
83 };
84 };
85
86 &pcie {
87 status = "okay";
88 };
89
90 &pcie0 {
91 wifi@0,0 {
92 compatible = "mediatek,mt76";
93 reg = <0x0000 0 0 0 0>;
94 mediatek,mtd-eeprom = <&factory 0x0000>;
95 ieee80211-freq-limit = <2400000 2500000>;
96 };
97 };
98
99 &pcie1 {
100 wifi@0,0 {
101 compatible = "mediatek,mt76";
102 reg = <0x0000 0 0 0 0>;
103 mediatek,mtd-eeprom = <&factory 0x8000>;
104 ieee80211-freq-limit = <5000000 6000000>;
105 };
106 };
107
108 &ethernet {
109 mtd-mac-address = <&factory 0xe00c>;
110 };
111
112 &state_default {
113 gpio {
114 ralink,group = "i2c", "wdt";
115 ralink,function = "gpio";
116 };
117 };