ddcf68970d32c4e866d1c6beee13b15065fb0a58
[openwrt/staging/jow.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_uboot_3ff80 9>, <&cal_art_1000>;
103 nvmem-cell-names = "mac-address", "calibration";
104 #gpio-cells = <2>;
105 gpio-controller;
106 };
107
108 ath9k1: wifi@0,12 { /* 5 GHz */
109 compatible = "pci168c,0029";
110 reg = <0x9000 0 0 0 0>;
111 ieee80211-freq-limit = <2402000 2482000 4900000 5990000>;
112 nvmem-cells = <&macaddr_uboot_3ff80 2>, <&cal_art_5000>;
113 nvmem-cell-names = "mac-address", "calibration";
114 #gpio-cells = <2>;
115 gpio-controller;
116 };
117 };
118
119 &mdio0 {
120 status = "okay";
121
122 phy0: ethernet-phy@0 {
123 reg = <0x0>;
124 };
125 };
126
127 &eth0 {
128 status = "okay";
129 compatible = "syscon", "simple-mfd";
130 };
131
132 &eth1 {
133 status = "okay";
134 nvmem-cells = <&macaddr_uboot_3ff80 0>;
135 nvmem-cell-names = "mac-address";
136
137 pll-data = <0x00110000 0x00001099 0x00991099>;
138 phy-handle = <&phy0>;
139 phy-mode = "rgmii";
140 };
141
142 &usb1 {
143 status = "okay";
144 };
145
146 &usb_phy {
147 status = "okay";
148 };
149
150 &art {
151 nvmem-layout {
152 compatible = "fixed-layout";
153 #address-cells = <1>;
154 #size-cells = <1>;
155
156 cal_art_1000: calibration@1000 {
157 reg = <0x1000 0xeb8>;
158 };
159
160 cal_art_5000: calibration@5000 {
161 reg = <0x5000 0xeb8>;
162 };
163 };
164 };