ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7240_tplink_tl-wr74xn-v1.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar7240.dtsi"
7
8 / {
9         aliases {
10                 led-boot = &led_system;
11                 led-failsafe = &led_system;
12                 led-running = &led_system;
13                 led-upgrade = &led_system;
14                 label-mac-device = &ath9k;
15         };
16
17         keys {
18                 compatible = "gpio-keys-polled";
19                 poll-interval = <20>;
20
21                 reset {
22                         label = "reset";
23                         linux,code = <KEY_RESTART>;
24                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
25                         debounce-interval = <60>;
26                 };
27
28                 wps {
29                         label = "wps";
30                         linux,code = <KEY_WPS_BUTTON>;
31                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32                         debounce-interval = <60>;
33                 };
34         };
35
36         gpio-leds {
37                 compatible = "gpio-leds";
38                 pinctrl-names = "default";
39                 pinctrl-0 = <&switch_led_pins>;
40
41                 led_system: system {
42                         label = "tp-link:green:system";
43                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
44                 };
45
46                 qss {
47                         label = "tp-link:green:qss";
48                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
49                 };
50
51                 lan1 {
52                         label = "tp-link:green:lan1";
53                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
54                 };
55
56                 lan2 {
57                         label = "tp-link:green:lan2";
58                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
59                 };
60
61                 lan3 {
62                         label = "tp-link:green:lan3";
63                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
64                 };
65
66                 lan4 {
67                         label = "tp-link:green:lan4";
68                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
69                 };
70
71                 wan {
72                         label = "tp-link:green:wan";
73                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
74                 };
75         };
76
77         ath9k-leds {
78                 compatible = "gpio-leds";
79
80                 wlan {
81                         label = "tp-link:green:wlan";
82                         gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
83                         linux,default-trigger = "phy0tpt";
84                 };
85         };
86 };
87
88 &spi {
89         status = "okay";
90         num-cs = <1>;
91
92         flash@0 {
93                 compatible = "jedec,spi-nor";
94                 reg = <0>;
95                 spi-max-frequency = <25000000>;
96
97                 partitions {
98                         compatible = "fixed-partitions";
99                         #address-cells = <1>;
100                         #size-cells = <1>;
101
102                         uboot: partition@0 {
103                                 reg = <0x0 0x20000>;
104                                 label = "u-boot";
105                                 read-only;
106                         };
107
108                         firmware: partition@20000 {
109                                 compatible = "tplink,firmware";
110                                 reg = <0x20000 0x3d0000>;
111                                 label = "firmware";
112                         };
113
114                         art: partition@3f0000 {
115                                 reg = <0x3f0000 0x10000>;
116                                 label = "art";
117                                 read-only;
118                         };
119                 };
120         };
121 };
122
123 &eth0 {
124         status = "okay";
125
126         mtd-mac-address = <&uboot 0x1fc00>;
127         mtd-mac-address-increment = <(-1)>;
128 };
129
130 &eth1 {
131         status = "okay";
132
133         mtd-mac-address = <&uboot 0x1fc00>;
134         mtd-mac-address-increment = <1>;
135 };
136
137 &pcie {
138         status = "okay";
139
140         ath9k: wifi@0,0 {
141                 compatible = "pci168c,002b";
142                 reg = <0x0000 0 0 0 0>;
143                 qca,no-eeprom;
144                 mtd-mac-address = <&uboot 0x1fc00>;
145                 #gpio-cells = <2>;
146                 gpio-controller;
147         };
148 };
149
150 &pinmux {
151         switch_led_pins: pinmux_switch_led_pins {
152                 pinctrl-single,bits = <0x0 0x0 0xf8>;
153         };
154 };
155
156 &uart {
157         status = "okay";
158 };