ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9344_tplink_tl-wdr4300.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344_tplink_tl-wdrxxxx.dtsi"
4
5 / {
6         aliases {
7                 label-mac-device = &ath9k;
8         };
9 };
10
11 &leds {
12         usb1 {
13                 label = "tp-link:green:usb1";
14                 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
15                 trigger-sources = <&hub_port1>;
16                 linux,default-trigger = "usbport";
17         };
18
19         usb2 {
20                 label = "tp-link:green:usb2";
21                 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
22                 trigger-sources = <&hub_port2>;
23                 linux,default-trigger = "usbport";
24         };
25 };
26
27 &gpio {
28         lna0 {
29                 gpio-hog;
30                 gpios = <18 GPIO_ACTIVE_HIGH>;
31                 output-high;
32                 line-name = "tp-link:ext:lna0";
33         };
34
35         lna1 {
36                 gpio-hog;
37                 gpios = <19 GPIO_ACTIVE_HIGH>;
38                 output-high;
39                 line-name = "tp-link:ext:lna1";
40         };
41
42         usb1_power {
43                 gpio-hog;
44                 gpios = <22 GPIO_ACTIVE_HIGH>;
45                 output-high;
46                 line-name = "tp-link:power:usb1";
47         };
48
49         usb2_power {
50                 gpio-hog;
51                 gpios = <21 GPIO_ACTIVE_HIGH>;
52                 output-high;
53                 line-name = "tp-link:power:usb2";
54         };
55 };
56
57 &usb {
58         #address-cells = <1>;
59         #size-cells = <0>;
60         status = "okay";
61
62         port@1 {
63                 #address-cells = <1>;
64                 #size-cells = <0>;
65                 reg = <1>;
66                 #trigger-source-cells = <0>;
67
68                 hub_port1: port@1 {
69                         reg = <1>;
70                         #trigger-source-cells = <0>;
71                 };
72
73                 hub_port2: port@2 {
74                         reg = <2>;
75                         #trigger-source-cells = <0>;
76                 };
77         };
78 };
79
80 &usb_phy {
81         status = "okay";
82 };
83
84 &ath9k {
85         mtd-mac-address = <&uboot 0x1fc00>;
86 };
87
88 &wmac {
89         mtd-mac-address = <&uboot 0x1fc00>;
90         mtd-mac-address-increment = <(-1)>;
91 };
92
93 &mdio0 {
94         status = "okay";
95
96         phy-mask = <0>;
97
98         phy0: ethernet-phy@0 {
99                 reg = <0>;
100                 phy-mode = "rgmii";
101
102                 qca,ar8327-initvals = <
103                         0x04 0x07600000 /* PORT0 PAD MODE CTRL */
104                         0x10 0x80000080 /* POWER_ON_STRIP */
105                         0x50 0xc737c737 /* LED_CTRL0 */
106                         0x54 0x00000000 /* LED_CTRL1 */
107                         0x58 0x00000000 /* LED_CTRL2 */
108                         0x5c 0x0030c300 /* LED_CTRL3 */
109                         0x7c 0x0000007e /* PORT0_STATUS */
110                         >;
111         };
112 };
113
114 &eth0 {
115         status = "okay";
116
117         /* default for ar934x, except for 1000M */
118         pll-data = <0x06000000 0x00000101 0x00001616>;
119
120         mtd-mac-address = <&uboot 0x1fc00>;
121         mtd-mac-address-increment = <(-2)>;
122
123         phy-mode = "rgmii";
124         phy-handle = <&phy0>;
125 };