ath79: ar: convert to mac-base
[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 nvmem-layout {
106 compatible = "fixed-layout";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 macaddr_uboot_1fc00: macaddr@1fc00 {
111 compatible = "mac-base";
112 reg = <0x1fc00 0x6>;
113 #nvmem-cell-cells = <1>;
114 };
115 };
116 };
117
118 firmware: partition@20000 {
119 compatible = "tplink,firmware";
120 reg = <0x20000 0x3d0000>;
121 label = "firmware";
122 };
123
124 art: partition@3f0000 {
125 reg = <0x3f0000 0x10000>;
126 label = "art";
127 read-only;
128 };
129 };
130 };
131 };
132
133 &eth0 { /* WAN interface, initialized last as eth1 */
134 status = "okay";
135
136 nvmem-cells = <&macaddr_uboot_1fc00 1>;
137 nvmem-cell-names = "mac-address";
138
139 gmac-config {
140 device = <&gmac>;
141
142 switch-phy-addr-swap = <1>;
143 switch-phy-swap = <1>;
144 };
145 };
146
147 &eth1 { /* LAN interface, initialized first as eth0 */
148 status = "okay";
149
150 nvmem-cells = <&macaddr_uboot_1fc00 0>;
151 nvmem-cell-names = "mac-address";
152 };
153
154 &wmac {
155 status = "okay";
156
157 mtd-cal-data = <&art 0x1000>;
158 nvmem-cells = <&macaddr_uboot_1fc00 0>;
159 nvmem-cell-names = "mac-address";
160 };