treewide: convert mtd-mac-address-increment* to generic implementation
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9331_tplink_tl-wr741nd-v4.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wr741n-v4", "qca,ar9331";
10 model = "TP-Link TL-WR741N/ND v4";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &wmac;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
27 debounce-interval = <60>;
28 };
29
30 wps {
31 label = "wps";
32 linux,code = <KEY_WPS_BUTTON>;
33 gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
34 debounce-interval = <60>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 pinctrl-names = "default";
42 pinctrl-0 = <&switch_led_disable_pins>;
43
44 lan1 {
45 label = "green:lan1";
46 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
47 };
48
49 lan2 {
50 label = "green:lan2";
51 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
52 };
53
54 lan3 {
55 label = "green:lan3";
56 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
57 };
58
59 lan4 {
60 label = "green:lan4";
61 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
62 };
63
64 qss {
65 label = "green:qss";
66 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
67 };
68
69 led_system: system {
70 label = "green:system";
71 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
72 };
73
74 wan {
75 label = "green:wan";
76 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
77 };
78
79 wlan {
80 label = "green:wlan";
81 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
82 linux,default-trigger = "phy0tpt";
83 };
84 };
85 };
86
87 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <25000000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 uboot: partition@0 {
101 reg = <0x0 0x20000>;
102 label = "u-boot";
103 read-only;
104 };
105
106 firmware: partition@20000 {
107 compatible = "tplink,firmware";
108 reg = <0x20000 0x3d0000>;
109 label = "firmware";
110 };
111
112 art: partition@3f0000 {
113 reg = <0x3f0000 0x10000>;
114 label = "art";
115 read-only;
116 };
117 };
118 };
119 };
120
121 &eth0 {
122 status = "okay";
123
124 mtd-mac-address = <&uboot 0x1fc00>;
125 mac-address-increment = <1>;
126
127 gmac-config {
128 device = <&gmac>;
129
130 switch-phy-addr-swap = <1>;
131 switch-phy-swap = <1>;
132 };
133 };
134
135 &eth1 {
136 status = "okay";
137
138 mtd-mac-address = <&uboot 0x1fc00>;
139 mac-address-increment = <(-1)>;
140 };
141
142 &wmac {
143 status = "okay";
144
145 mtd-cal-data = <&art 0x1000>;
146 mtd-mac-address = <&uboot 0x1fc00>;
147 };