ramips: add support for TP-Link RE205 v3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_comfast_cf-wr617ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "comfast,cf-wr617ac", "mediatek,mt7628an-soc";
11 model = "Comfast CF-WR617AC";
12
13 keys {
14 compatible = "gpio-keys";
15 reset {
16 label = "reset";
17 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
18 linux,code = <KEY_RESTART>;
19 };
20 };
21
22 leds {
23 compatible = "gpio-leds";
24 led_status_blue: status_blue {
25 function = LED_FUNCTION_STATUS;
26 color = <LED_COLOR_ID_BLUE>;
27 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
28 };
29 led_status_red: status_red {
30 function = LED_FUNCTION_STATUS;
31 color = <LED_COLOR_ID_RED>;
32 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 aliases {
37 led-boot = &led_status_red;
38 led-failsafe = &led_status_red;
39 led-running = &led_status_blue;
40 led-upgrade = &led_status_red;
41 };
42
43
44 chosen {
45 bootargs = "console=ttyS0,115200";
46 };
47
48 };
49
50 &spi0 {
51 status = "okay";
52
53 flash@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <40000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x0 0x30000>;
66 read-only;
67 };
68
69 partition@30000 {
70 label = "u-boot-env";
71 reg = <0x30000 0x10000>;
72 read-only;
73 };
74
75 partition@40000 {
76 label = "factory";
77 reg = <0x40000 0x10000>;
78 read-only;
79
80 nvmem-layout {
81 compatible = "fixed-layout";
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 eeprom_factory_0: eeprom@0 {
86 reg = <0x0 0x400>;
87 };
88
89 eeprom_factory_8000: eeprom@8000 {
90 reg = <0x8000 0x200>;
91 };
92
93 macaddr_factory_8004: macaddr@8004 {
94 compatible = "mac-base";
95 reg = <0x8004 0x6>;
96 #nvmem-cell-cells = <1>;
97 };
98
99 macaddr_factory_e000: macaddr@e000 {
100 reg = <0xe000 0x6>;
101 };
102 };
103 };
104
105 partition@50000 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x50000 0x760000>;
109 };
110 };
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi@0,0 {
120 compatible = "mediatek,mt76";
121 reg = <0x0000 0 0 0 0>;
122 ieee80211-freq-limit = <5000000 6000000>;
123 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004 2>;
124 nvmem-cell-names = "eeprom", "mac-address";
125 };
126 };
127
128 &ethernet {
129 nvmem-cells = <&macaddr_factory_e000>;
130 nvmem-cell-names = "mac-address";
131 };
132
133 &esw {
134 mediatek,portmap = <0x2f>;
135 };
136
137 &wmac {
138 status = "okay";
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };