ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7242_avm_fritz300e.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar7242.dtsi"
8
9 / {
10         compatible = "avm,fritz300e", "qca,ar7242";
11         model = "AVM FRITZ!WLAN Repeater 300E";
12
13         aliases {
14                 led-boot = &power;
15                 led-failsafe = &power;
16                 led-running = &power;
17                 led-upgrade = &power;
18                 label-mac-device = &ath9k;
19         };
20
21         keys {
22                 compatible = "gpio-keys-polled";
23                 poll-interval = <20>;
24
25                 wps {
26                         label = "wps";
27                         linux,code = <KEY_WPS_BUTTON>;
28                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29                         debounce-interval = <60>;
30                 };
31         };
32
33         leds {
34                 compatible = "gpio-leds";
35
36                 power: power {
37                         label = "fritz300e:green:power";
38                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
39                         default-state = "on";
40                 };
41
42                 lan {
43                         label = "fritz300e:green:lan";
44                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
45                 };
46
47                 wlan {
48                         label = "fritz300e:green:wlan";
49                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
50                         linux,default-trigger = "phy0tpt";
51                 };
52         };
53
54         ath9k-leds {
55                 compatible = "gpio-leds";
56
57                 rssi0 {
58                         label = "fritz300e:green:rssi0";
59                         gpios = <&ath9k 10 GPIO_ACTIVE_LOW>;
60                 };
61
62                 rssi1 {
63                         label = "fritz300e:green:rssi1";
64                         gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
65                 };
66
67                 rssi2 {
68                         label = "fritz300e:green:rssi2";
69                         gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
70                 };
71
72                 rssi3 {
73                         label = "fritz300e:green:rssi3";
74                         gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
75                 };
76
77                 rssi4 {
78                         label = "fritz300e:green:rssi4";
79                         gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
80                 };
81         };
82
83         eth-phy-reset {
84                 compatible = "regulator-fixed";
85
86                 regulator-name = "eth-phy-reset";
87                 regulator-min-microvolt = <3300000>;
88                 regulator-max-microvolt = <3300000>;
89
90                 gpio = <&gpio 11 GPIO_ACTIVE_LOW>;
91                 startup-delay-us = <300000>;
92                 enable-active-high;
93
94                 regulator-always-on;
95         };
96 };
97
98 &spi {
99         status = "okay";
100         num-cs = <1>;
101
102         flash@0 {
103                 compatible = "jedec,spi-nor";
104                 reg = <0>;
105                 spi-max-frequency = <25000000>;
106
107                 partitions {
108                         compatible = "fixed-partitions";
109                         #address-cells = <1>;
110                         #size-cells = <1>;
111
112                         partition@0 {
113                                 reg = <0x0 0x20000>;
114                                 label = "urloader";
115                                 read-only;
116                         };
117
118                         partition@20000 {
119                                 compatible = "avm,eva-firmware";
120                                 reg = <0x20000 0xee0000>;
121                                 label = "firmware";
122                         };
123
124                         partition@f00000 {
125                                 reg = <0xf00000 0x80000>;
126                                 label = "tffs (1)";
127                                 read-only;
128                         };
129
130                         partition@f80000 {
131                                 reg = <0xf80000 0x80000>;
132                                 label = "tffs (2)";
133                                 read-only;
134                         };
135                 };
136         };
137 };
138
139 &uart {
140         status = "okay";
141 };
142
143 &pcie {
144         status = "okay";
145
146         ath9k: wifi@0,0 {
147                 reg = <0x0000 0 0 0 0>;
148                 #gpio-cells = <2>;
149                 gpio-controller;
150                 qca,no-eeprom;
151         };
152 };
153
154 &mdio0 {
155         status = "okay";
156
157         phy0: ethernet-phy@0 {
158                 reg = <0>;
159                 phy-mode = "rgmii";
160         };
161 };
162
163 &eth0 {
164         status = "okay";
165
166         phy-mode = "rgmii";
167         phy-handle = <&phy0>;
168
169         pll-data = <0x16000000 0x00000101 0x00001313>;
170 };