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