ath79: convert mtd-mac-address to nvmem implementation
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9344_tplink_tl-wdr3500-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344_tplink_tl-wdrxxxx.dtsi"
4
5 / {
6 model = "TP-Link TL-WDR3500 v1";
7 compatible = "tplink,tl-wdr3500-v1", "qca,ar9344";
8
9 aliases {
10 label-mac-device = &wmac;
11 };
12 };
13
14 &leds {
15 usb {
16 label = "green:usb";
17 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
18 linux,default-trigger = "usbport";
19 trigger-sources = <&hub_port>;
20 };
21 };
22
23 &gpio {
24 usb_power {
25 gpio-hog;
26 gpios = <12 GPIO_ACTIVE_HIGH>;
27 output-high;
28 line-name = "tp-link:power:usb";
29 };
30 };
31
32 &pinmux {
33 pmx_led_wan_lan: pinmux_led_wan_lan {
34 pinctrl-single,bits = <0x10 0x2c2d0000 0xffff0000>,
35 <0x14 0x292a2b 0xffffff>;
36 };
37 };
38
39 &builtin_switch {
40 pinctrl-names = "default";
41 pinctrl-0 = <&pmx_led_wan_lan>;
42 };
43
44 &usb {
45 #address-cells = <1>;
46 #size-cells = <0>;
47 status = "okay";
48
49 hub_port: port@1 {
50 reg = <1>;
51 #trigger-source-cells = <0>;
52 };
53 };
54
55 &usb_phy {
56 status = "okay";
57 };
58
59 &ath9k {
60 nvmem-cells = <&macaddr_uboot_1fc00>;
61 nvmem-cell-names = "mac-address";
62 mac-address-increment = <1>;
63 };
64
65 &wmac {
66 nvmem-cells = <&macaddr_uboot_1fc00>;
67 nvmem-cell-names = "mac-address";
68 };
69
70 &eth1 {
71 status = "okay";
72
73 nvmem-cells = <&macaddr_uboot_1fc00>;
74 nvmem-cell-names = "mac-address";
75 mac-address-increment = <(-1)>;
76
77 gmac-config {
78 device = <&gmac>;
79 switch-phy-swap = <0>;
80 switch-only-mode = <1>;
81 };
82 };
83
84 &eth0 {
85 status = "okay";
86
87 phy-handle = <&swphy4>;
88
89 nvmem-cells = <&macaddr_uboot_1fc00>;
90 nvmem-cell-names = "mac-address";
91 mac-address-increment = <2>;
92 };
93
94 &uboot {
95 compatible = "nvmem-cells";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 macaddr_uboot_1fc00: macaddr@1fc00 {
100 reg = <0x1fc00 0x6>;
101 };
102 };