ath79: DTS file style update and harmonization
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9344_wd_mynet-wifi-rangeextender.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 "ar9344.dtsi"
8
9 / {
10         model = "Western Digital My Net Wi-Fi Range Extender";
11         compatible = "wd,mynet-wifi-rangeextender", "qca,ar9344";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &led_power;
19                 led-failsafe = &led_power;
20                 led-running = &led_power;
21                 led-upgrade = &led_power;
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "mynet-wifi-rangeextender:blue:power";
29                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
30                         /* LED has no off state. It's either on or it blinks */
31                 };
32
33                 lan {
34                         label = "mynet-wifi-rangeextender:green:lan";
35                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
36                 };
37
38                 wifi {
39                         label = "mynet-wifi-rangeextender:blue:wifi";
40                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
41                         linux,default-trigger = "phy0tpt";
42                 };
43
44                 wifi-rssi-low {
45                         label = "mynet-wifi-rangeextender:blue:rssi-low";
46                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wifi-rssi-med {
50                         label = "mynet-wifi-rangeextender:blue:rssi-med";
51                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
52                 };
53
54                 wifi-rssi-max {
55                         label = "mynet-wifi-rangeextender:blue:rssi-max";
56                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
57                 };
58         };
59
60         keys {
61                 compatible = "gpio-keys";
62
63                 reset {
64                         linux,code = <KEY_RESTART>;
65                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
66                 };
67
68                 band-switch {
69                         linux,code = <BTN_1>;
70                         gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
71                         linux,input-type = <EV_SW>;
72                 };
73
74                 wps {
75                         linux,code = <KEY_WPS_BUTTON>;
76                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
77                 };
78         };
79 };
80
81 &ref {
82         clock-frequency = <25000000>;
83 };
84
85 &uart {
86         status = "okay";
87 };
88
89 &spi {
90         status = "okay";
91
92         num-cs = <1>;
93
94         flash@0 {
95                 compatible = /* "s25fl064k", */ "jedec,spi-nor";
96                 reg = <0>;
97                 spi-max-frequency = <25000000>;
98
99                 partitions {
100                         compatible = "fixed-partitions";
101                         #address-cells = <1>;
102                         #size-cells = <1>;
103
104                         uboot: partition@0 {
105                                 label = "u-boot";
106                                 reg = <0x0 0x040000>;
107                                 read-only;
108                         };
109
110                         partition@40000 {
111                                 label = "firmware";
112                                 reg = <0x40000 0x7a0000>;
113                                 compatible = "cybertan,trx";
114                         };
115
116                         nvram: partition@7e0000 {
117                                 label = "nvram";
118                                 reg = <0x7e0000 0x10000>;
119                         };
120
121                         art: partition@7f0000 {
122                                 label = "art";
123                                 reg = <0x7f0000 0x10000>;
124                                 read-only;
125                         };
126                 };
127         };
128 };
129
130 &pcie {
131         status = "okay";
132
133         ath9k: wifi@0,0 {
134                 compatible = "pci168c,0030";
135                 reg = <0x0000 0 0 0 0>;
136                 qca,no-eeprom;
137                 /* wifi MAC is stored in nvram */
138         };
139 };
140
141 &mdio0 {
142         status = "okay";
143
144         phy-mask = <0x10>;
145
146         phy4: ethernet-phy@4 {
147                 reg = <4>;
148         };
149 };
150
151 &eth0 {
152         status = "okay";
153
154         pll-data = <0x0e000000 0x3c000101 0x3c001313>;
155
156         /* ethernet MAC is stored in nvram */
157         phy-mode = "rgmii";
158         phy-handle = <&phy4>;
159
160         gmac-config {
161                 device = <&gmac>;
162                 rgmii-gmac0 = <1>;
163                 rxd-delay = <3>;
164                 rxdv-delay = <3>;
165         };
166 };
167
168 &mdio1 {
169         status = "disabled";
170 };