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