treewide: convert mtd-mac-address-increment* to generic implementation
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7628an_tplink_re305-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,re305-v1", "mediatek,mt7628an-soc";
10 model = "TP-Link RE305 v1";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &ethernet;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_power: power {
40 label = "blue:power";
41 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan2g {
45 label = "blue:wlan2g";
46 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49
50 wlan5g {
51 label = "blue:wlan5g";
52 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "phy1tpt";
54 };
55
56 rssi1 {
57 label = "red:rssi";
58 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
59 };
60
61 rssi2 {
62 label = "blue:rssi";
63 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
64 };
65 };
66 };
67
68 &spi0 {
69 status = "okay";
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <50000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x20000>;
84 read-only;
85 };
86
87 partition@20000 {
88 compatible = "tplink,firmware";
89 label = "firmware";
90 reg = <0x20000 0x5e0000>;
91 };
92
93 config: partition@600000 {
94 label = "config";
95 reg = <0x600000 0x50000>;
96 read-only;
97 };
98
99 /*
100 The flash space between 0x650000 and 0x7f0000 is blank in the
101 stock firmware so it is left out as well.
102 */
103
104 radio: partition@7f0000 {
105 label = "radio";
106 reg = <0x7f0000 0x10000>;
107 read-only;
108 };
109 };
110 };
111 };
112
113 &state_default {
114 gpio {
115 groups = "refclk", "wdt", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an";
116 function = "gpio";
117 };
118 };
119
120 &pcie {
121 status = "okay";
122 };
123
124 &pcie0 {
125 mt76@0,0 {
126 compatible = "mediatek,mt76";
127 reg = <0x0000 0 0 0 0>;
128 mediatek,mtd-eeprom = <&radio 0x8000>;
129 ieee80211-freq-limit = <5000000 6000000>;
130 mtd-mac-address = <&config 0x10008>;
131 mac-address-increment = <2>;
132 };
133 };
134
135 &wmac {
136 status = "okay";
137
138 mediatek,mtd-eeprom = <&radio 0x0>;
139 mtd-mac-address = <&config 0x10008>;
140 mac-address-increment = <1>;
141 };
142
143 &ethernet {
144 mtd-mac-address = <&config 0x10008>;
145 };