ath79: ar: convert to mac-base
[openwrt/staging/hauke.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 leds {
20 compatible = "gpio-leds";
21
22 led_power_orange: power_orange {
23 label = "orange:power";
24 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
25 };
26 };
27
28 ath9k-leds {
29 compatible = "gpio-leds";
30
31 wifi_2g_green {
32 label = "green:wlan2g";
33 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy0tpt";
35 };
36
37 wifi_5g_green {
38 label = "green:wlan5g";
39 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
40 linux,default-trigger = "phy1tpt";
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 linux,code = <KEY_RESTART>;
50 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
51 };
52 };
53 };
54
55 &mdio0 {
56 status = "okay";
57
58 phy1: ethernet-phy@1 {
59 reg = <0x1>;
60 };
61 };
62
63 &eth0 {
64 status = "okay";
65
66 phy-mode = "rgmii";
67 phy-handle = <&phy1>;
68
69 nvmem-cells = <&macaddr_art_0>;
70 nvmem-cell-names = "mac-address";
71 };
72
73 &spi {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <50000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x040000>;
89 read-only;
90 };
91
92 partition@40000 {
93 label = "u-boot-env";
94 reg = <0x40000 0x010000>;
95 read-only;
96 };
97
98 partition@50000 {
99 compatible = "denx,uimage";
100 label = "firmware";
101 reg = <0x50000 0x790000>;
102 };
103
104 partition@7e0000 {
105 label = "nvram";
106 reg = <0x7e0000 0x010000>;
107 read-only;
108 };
109
110 partition@7f0000 {
111 label = "art";
112 reg = <0x7f0000 0x010000>;
113 read-only;
114
115 nvmem-layout {
116 compatible = "fixed-layout";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 macaddr_art_0: macaddr@0 {
121 reg = <0x0 0x6>;
122 };
123
124 macaddr_art_120c: macaddr@120c {
125 reg = <0x120c 0x6>;
126 };
127
128 macaddr_art_520c: macaddr@520c {
129 compatible = "mac-base";
130 reg = <0x520c 0x6>;
131 #nvmem-cell-cells = <1>;
132 };
133
134 calibration_art_1000: calibration@1000 {
135 reg = <0x1000 0xeb8>;
136 };
137
138 calibration_art_5000: calibration@5000 {
139 reg = <0x5000 0xeb8>;
140 };
141 };
142 };
143 };
144 };
145 };
146
147 &pcie0 {
148 status = "okay";
149
150 ath9k0: wifi@0,11 {
151 compatible = "pci168c,0029";
152 reg = <0x8800 0 0 0 0>;
153 nvmem-cells = <&macaddr_art_120c>, <&calibration_art_1000>;
154 nvmem-cell-names = "mac-address", "calibration";
155 #gpio-cells = <2>;
156 gpio-controller;
157 };
158
159 ath9k1: wifi@0,12 {
160 compatible = "pci168c,0029";
161 reg = <0x9000 0 0 0 0>;
162 nvmem-cells = <&macaddr_art_520c 1>, <&calibration_art_5000>;
163 nvmem-cell-names = "mac-address", "calibration";
164 #gpio-cells = <2>;
165 gpio-controller;
166 };
167 };