ramips: move redundant console setup to mt7621 SoC DTSI
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_rexx0-v1.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &gmac0;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 wps {
17 label = "wps";
18 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
19 debounce-interval = <60>;
20 linux,code = <KEY_WPS_BUTTON>;
21 };
22
23 power {
24 label = "power";
25 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
26 debounce-interval = <60>;
27 linux,code = <KEY_POWER>;
28 };
29
30 led {
31 label = "led";
32 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 linux,code = <KEY_LIGHTS_TOGGLE>;
35 };
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 31 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 0x20000>;
62 read-only;
63 };
64
65 partition@20000 {
66 compatible = "tplink,firmware";
67 label = "firmware";
68 reg = <0x20000 0xde0000>;
69 };
70
71 config: partition@e00000 {
72 label = "config";
73 reg = <0xe00000 0x50000>;
74 read-only;
75 };
76
77 /* range 0xe50000 to 0xff0000 is empty in vendor
78 * firmware, so we do not use it either
79 */
80
81 radio: partition@ff0000 {
82 label = "radio";
83 reg = <0xff0000 0x10000>;
84 read-only;
85 };
86 };
87 };
88 };
89
90 &pcie {
91 status = "okay";
92 };
93
94 &pcie0 {
95 wifi@0,0 {
96 compatible = "mediatek,mt76";
97 reg = <0x0000 0 0 0 0>;
98 mediatek,mtd-eeprom = <&radio 0x0>;
99 mtd-mac-address = <&config 0x10008>;
100 mtd-mac-address-increment = <1>;
101 ieee80211-freq-limit = <2400000 2500000>;
102 };
103 };
104
105 &pcie1 {
106 wifi@0,0 {
107 compatible = "mediatek,mt76";
108 reg = <0x0000 0 0 0 0>;
109 mediatek,mtd-eeprom = <&radio 0x8000>;
110 mtd-mac-address = <&config 0x10008>;
111 mtd-mac-address-increment = <2>;
112 ieee80211-freq-limit = <5000000 6000000>;
113 };
114 };
115
116 &gmac0 {
117 mtd-mac-address = <&config 0x10008>;
118 };
119
120 &switch0 {
121 ports {
122 port@0 {
123 status = "okay";
124 label = "lan";
125 };
126 };
127 };