331bc317141ae96b4098837a0d2f490ca694d2d0
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar7161_fortinet_fap-220-b.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4 #include "arxxxx_fortinet_loader.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "fortinet,fap-220-b", "qca,ar7161";
11 model = "Fortinet FAP-220-B";
12
13 chosen {
14 bootargs = "console=ttyS0,9600";
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 label-mac-device = &eth1;
23 };
24
25 keys {
26 compatible = "gpio-keys";
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
31 debounce-interval = <60>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_power: power-green {
39 label = "green:power";
40 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
41 default-state = "on";
42 };
43
44 status-green {
45 label = "green:status";
46 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
47 };
48
49 status-yellow {
50 label = "yellow:status";
51 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
52 panic-indicator;
53 };
54
55 mode-green {
56 label = "green:mode";
57 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
58 };
59
60 mode-yellow {
61 label = "yellow:mode";
62 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
63 };
64
65 wlan2g-green {
66 label = "green:wlan2g";
67 gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy0tpt";
69 };
70
71 wlan2g-yellow {
72 label = "yellow:wlan2g";
73 gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
74 linux,default-trigger = "phy0assoc";
75 };
76
77 wlan5g-green {
78 label = "green:wlan5g";
79 gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>;
80 linux,default-trigger = "phy1tpt";
81 };
82
83 wlan5g-yellow {
84 label = "yellow:wlan5g";
85 gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>;
86 linux,default-trigger = "phy1assoc";
87 };
88 };
89
90 virtual_flash {
91 devices = <&fwconcat0 &fwconcat1 &fwconcat2>;
92 };
93 };
94
95 &pcie0 {
96 status = "okay";
97
98 ath9k0: wifi@0,11 { /* 2.4 GHz */
99 compatible = "pci168c,0029";
100 reg = <0x8800 0 0 0 0>;
101 ieee80211-freq-limit = <2402000 2482000>;
102 nvmem-cells = <&macaddr_art_120c>, <&cal_art_1000>;
103 nvmem-cell-names = "mac-address", "calibration";
104 mac-address-increment = <1>;
105 #gpio-cells = <2>;
106 gpio-controller;
107 };
108
109 ath9k1: wifi@0,12 { /* 5 GHz */
110 compatible = "pci168c,0029";
111 reg = <0x9000 0 0 0 0>;
112 ieee80211-freq-limit = <2402000 2482000 4900000 5990000>;
113 nvmem-cells = <&macaddr_art_520c>, <&cal_art_5000>;
114 nvmem-cell-names = "mac-address", "calibration";
115 mac-address-increment = <9>;
116 #gpio-cells = <2>;
117 gpio-controller;
118 };
119 };
120
121 &mdio0 {
122 status = "okay";
123
124 phy0: ethernet-phy@0 {
125 reg = <0x0>;
126 };
127 };
128
129 &eth0 {
130 status = "okay";
131 compatible = "syscon", "simple-mfd";
132 };
133
134 &eth1 {
135 status = "okay";
136 nvmem-cells = <&macaddr_art_120c>;
137 nvmem-cell-names = "mac-address";
138
139 pll-data = <0x00110000 0x00001099 0x00991099>;
140 phy-handle = <&phy0>;
141 phy-mode = "rgmii";
142 };
143
144 &usb1 {
145 status = "okay";
146 };
147
148 &usb_phy {
149 status = "okay";
150 };
151
152 &uboot {
153 compatible = "nvmem-cells";
154 #address-cells = <1>;
155 #size-cells = <1>;
156
157 /* Currently doesn't work, because this one lacks colons as delimiters */
158 macaddr_uboot_3ff80: mac-address-ascii@3ff80 {
159 reg = <0x3ff80 0xc>;
160 };
161 };
162
163 &art {
164 compatible = "nvmem-cells";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 cal_art_1000: calibration@1000 {
169 reg = <0x1000 0xeb8>;
170 };
171
172 macaddr_art_120c: mac-address@120c {
173 reg = <0x120c 0x6>;
174 };
175
176 cal_art_5000: calibration@5000 {
177 reg = <0x5000 0xeb8>;
178 };
179
180 macaddr_art_520c: mac-address@520c {
181 reg = <0x520c 0x6>;
182 };
183 };