aeb7c5677332d63e28e28eec239c709acc329b7d
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_netgear_wndap360.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "netgear,wndap360", "qca,ar7161";
10 model = "Netgear WNDAP360";
11
12 aliases {
13 led-boot = &led_power_orange;
14 led-failsafe = &led_power_orange;
15 led-running = &led_power_orange;
16 led-upgrade = &led_power_orange;
17 };
18
19 extosc: ref {
20 compatible = "fixed-clock";
21 #clock-cells = <0>;
22 clock-output-names = "ref";
23 clock-frequency = <40000000>;
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_power_orange: power_orange {
30 label = "orange:power";
31 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 ath9k-leds {
36 compatible = "gpio-leds";
37
38 wifi_2g_green {
39 label = "green:wlan2g";
40 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "phy0tpt";
42 };
43
44 wifi_5g_green {
45 label = "green:wlan5g";
46 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy1tpt";
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 linux,code = <KEY_RESTART>;
57 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
58 };
59 };
60 };
61
62 &mdio0 {
63 status = "okay";
64
65 phy-mask = <0x0f>;
66 phy1: ethernet-phy@1 {
67 reg = <0x1>;
68 };
69 };
70
71 &eth0 {
72 status = "okay";
73
74 phy-mode = "rgmii";
75 phy-handle = <&phy1>;
76
77 nvmem-cells = <&macaddr_art_0>;
78 nvmem-cell-names = "mac-address";
79 };
80
81 &spi {
82 status = "okay";
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 reg = <0>;
87 spi-max-frequency = <50000000>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x0 0x040000>;
97 read-only;
98 };
99
100 partition@40000 {
101 label = "u-boot-env";
102 reg = <0x40000 0x010000>;
103 read-only;
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x50000 0x790000>;
110 };
111
112 partition@7e0000 {
113 label = "nvram";
114 reg = <0x7e0000 0x010000>;
115 read-only;
116 };
117
118 art: partition@7f0000 {
119 label = "art";
120 reg = <0x7f0000 0x010000>;
121 read-only;
122 };
123 };
124 };
125 };
126
127 &pcie0 {
128 status = "okay";
129
130 ath9k0: wifi@0,11 {
131 compatible = "pci168c,0029";
132 reg = <0x8800 0 0 0 0>;
133 qca,no-eeprom;
134 nvmem-cells = <&macaddr_art_120c>;
135 nvmem-cell-names = "mac-address";
136 #gpio-cells = <2>;
137 gpio-controller;
138 };
139
140 ath9k1: wifi@0,12 {
141 compatible = "pci168c,0029";
142 reg = <0x9000 0 0 0 0>;
143 qca,no-eeprom;
144 nvmem-cells = <&macaddr_art_520c>;
145 nvmem-cell-names = "mac-address";
146 mac-address-increment = <1>;
147 #gpio-cells = <2>;
148 gpio-controller;
149 };
150 };
151
152
153 &art {
154 compatible = "nvmem-cells";
155 #address-cells = <1>;
156 #size-cells = <1>;
157
158 macaddr_art_0: macaddr@0 {
159 reg = <0x0 0x6>;
160 };
161
162 macaddr_art_120c: macaddr@120c {
163 reg = <0x120c 0x6>;
164 };
165
166 macaddr_art_520c: macaddr@520c {
167 reg = <0x520c 0x6>;
168 };
169 };