9b9c84a048762f5ce9d92ef88a212a06ec32f6d9
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_re7000.dts
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 compatible = "linksys,re7000", "mediatek,mt7621-soc";
10 model = "Linksys RE7000";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 wifi {
23 label = "orange:wifi";
24 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
25 linux,default-trigger = "phy0tpt";
26 };
27
28 wps {
29 label = "orange:wps";
30 gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
31 };
32
33 led_power: power {
34 label = "green:power";
35 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 wps {
43 label = "wps";
44 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_WPS_BUTTON>;
46 };
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &spi0 {
57 status = "okay";
58
59 flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <10000000>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x30000>;
72 read-only;
73 };
74
75 partition@30000 {
76 label = "u-boot-env";
77 reg = <0x30000 0x1000>;
78 };
79
80 partition@32000 {
81 label = "config";
82 reg = <0x32000 0xe000>;
83 read-only;
84 };
85
86 factory: partition@40000 {
87 label = "factory";
88 reg = <0x40000 0x10000>;
89 read-only;
90
91 nvmem-layout {
92 compatible = "fixed-layout";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 eeprom_factory_0: eeprom@0 {
97 reg = <0x0 0x400>;
98 };
99
100 eeprom_factory_8000: eeprom@8000 {
101 reg = <0x8000 0x4da8>;
102 };
103
104 macaddr_factory_2e: macaddr@2e {
105 reg = <0x2e 0x6>;
106 };
107 };
108 };
109
110 partition@50000 {
111 compatible = "denx,uimage";
112 label = "firmware";
113 reg = <0x50000 0xfb0000>;
114 };
115 };
116 };
117 };
118
119 &state_default {
120 gpio {
121 groups = "i2c", "uart2", "rgmii2";
122 function = "gpio";
123 };
124 };
125
126 &pcie {
127 status = "okay";
128 };
129
130 &pcie0 {
131 mt76@0,0 {
132 reg = <0x0000 0 0 0 0>;
133 nvmem-cells = <&eeprom_factory_0>;
134 nvmem-cell-names = "eeprom";
135 ieee80211-freq-limit = <2400000 2500000>;
136 };
137 };
138
139 &pcie1 {
140 mt76@0,0 {
141 reg = <0x0000 0 0 0 0>;
142 nvmem-cells = <&eeprom_factory_8000>;
143 nvmem-cell-names = "eeprom";
144 ieee80211-freq-limit = <5000000 6000000>;
145 };
146 };
147
148 &gmac0 {
149 nvmem-cells = <&macaddr_factory_2e>;
150 nvmem-cell-names = "mac-address";
151 };
152
153 &ethernet {
154 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
155 };
156
157 &switch0 {
158 ports {
159 port@0 {
160 status = "okay";
161 label = "lan";
162 };
163 };
164 };