ramips: only add spidev node in for WrtNode2R (and not for 2P)
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_tplink_re650-v1.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 = "tplink,re650-v1", "mediatek,mt7621-soc";
11         model = "TP-Link RE650 v1";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_power;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,57600";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "re650-v1:blue:power";
29                         gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wifi2g {
33                         label = "re650-v1:blue:wifi2G";
34                         gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
35                 };
36
37                 wifi5g {
38                         label = "re650-v1:blue:wifi5G";
39                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
40                 };
41
42                 wps_red {
43                         label = "re650-v1:red:wps";
44                         gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
45                 };
46
47                 wps_blue {
48                         label = "re650-v1:blue:wps";
49                         gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
50                 };
51
52                 eth_act {
53                         label = "re650-v1:green:eth_act";
54                         gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
55                 };
56
57                 eth_link {
58                         label = "re650-v1:green:eth_link";
59                         gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
60                 };
61         };
62
63         keys {
64                 compatible = "gpio-keys";
65
66                 wps {
67                         label = "wps";
68                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
69                         debounce-interval = <60>;
70                         linux,code = <KEY_WPS_BUTTON>;
71                 };
72
73                 power {
74                         label = "power";
75                         gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
76                         debounce-interval = <60>;
77                         linux,code = <KEY_POWER>;
78                 };
79
80                 led {
81                         label = "led";
82                         gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
83                         debounce-interval = <60>;
84                         linux,code = <KEY_LIGHTS_TOGGLE>;
85                 };
86
87                 reset {
88                         label = "reset";
89                         gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
90                         debounce-interval = <60>;
91                         linux,code = <KEY_RESTART>;
92                 };
93         };
94 };
95
96 &spi0 {
97         status = "okay";
98
99         w25q64@0 {
100                 compatible = "jedec,spi-nor";
101                 reg = <0>;
102                 spi-max-frequency = <40000000>;
103
104                 partitions {
105                         compatible = "fixed-partitions";
106                         #address-cells = <1>;
107                         #size-cells = <1>;
108
109                         partition@0 {
110                                 label = "u-boot";
111                                 reg = <0x0 0x20000>;
112                                 read-only;
113                         };
114
115                         partition@20000 {
116                                 compatible = "tplink,firmware";
117                                 label = "firmware";
118                                 reg = <0x20000 0xde0000>;
119                         };
120
121                         config: partition@e00000 {
122                                 label = "config";
123                                 reg = <0xe00000 0x50000>;
124                                 read-only;
125                         };
126
127                         /* range 0xe50000 to 0xff0000 is empty in vendor
128                          * firmware, so we do not use it either
129                          */
130
131                         radio: partition@ff0000 {
132                                 label = "radio";
133                                 reg = <0xff0000 0x10000>;
134                                 read-only;
135                         };
136                 };
137         };
138 };
139
140 &pcie {
141         status = "okay";
142 };
143
144 &pcie0 {
145         wifi@0,0 {
146                 compatible = "mediatek,mt76";
147                 reg = <0x0000 0 0 0 0>;
148                 mediatek,mtd-eeprom = <&radio 0>;
149                 mtd-mac-address = <&config 0x10008>;
150                 mtd-mac-address-increment = <1>;
151                 ieee80211-freq-limit = <2400000 2500000>;
152         };
153 };
154
155 &pcie1 {
156         wifi@0,0 {
157                 compatible = "mediatek,mt76";
158                 reg = <0x0000 0 0 0 0>;
159                 mediatek,mtd-eeprom = <&radio 0x8000>;
160                 mtd-mac-address = <&config 0x10008>;
161                 mtd-mac-address-increment = <2>;
162                 ieee80211-freq-limit = <5000000 6000000>;
163         };
164 };
165
166 &ethernet {
167         mtd-mac-address = <&config 0x10008>;
168 };
169
170 &pinctrl {
171         state_default: pinctrl0 {
172                 gpio {
173                         ralink,group = "rgmii2", "wdt";
174                         ralink,function = "gpio";
175                 };
176         };
177 };