ath79: convert ath10k calibration data to NVMEM (built-in MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_sophos_ap.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /*
4 * The hardware of this board family is most likely shared with other devices
5 * from other manufacturers. Edimax appear to be the actual OEM.
6 *
7 * Sophos use the same exact board for the AP55C/AP100C, and AP55/AP100.
8 * Yes, this means your AP55C is a 3x3 AP with a software lock, and your
9 * AP55 is an AP100 with one missing antenna pigtail.
10 *
11 * AP55 and AP55C boards have different physical layouts, but are logically
12 * almost identical. AP55/100 have an empty micro-USB OTG port footprint,
13 * which may be possible to retrofit with some work.
14 */
15
16 #include "qca955x.dtsi"
17
18 #include <dt-bindings/gpio/gpio.h>
19 #include <dt-bindings/input/input.h>
20
21 / {
22 aliases {
23 led-boot = &led_status_green;
24 led-failsafe = &led_status_red;
25 led-running = &led_status_green;
26 led-upgrade = &led_status_red;
27 label-mac-device = &eth0;
28 };
29
30 chosen {
31 bootargs = "console=ttyS0,115200n8";
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 linux,code = <KEY_RESTART>;
40 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_status_green: status_green {
49 label = "green:status";
50 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
51 default-state = "on";
52 };
53
54 led_status_red: status_red {
55 label = "red:status";
56 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
57 };
58 };
59
60 reg_usb_vbus: reg_usb_vbus {
61 compatible = "regulator-fixed";
62 regulator-name = "usb_vbus";
63 regulator-min-microvolt = <5000000>;
64 regulator-max-microvolt = <5000000>;
65 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
66 enable-active-high;
67 regulator-boot-on;
68 status = "disabled";
69 };
70 };
71
72 &pcie0 {
73 status = "okay";
74
75 wifi@0,0 {
76 compatible = "qcom,ath10k";
77 reg = <0x0000 0 0 0 0>;
78 nvmem-cells = <&cal_art_5000>;
79 nvmem-cell-names = "calibration";
80 };
81 };
82
83 &spi {
84 status = "okay";
85
86 flash@0 {
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <25000000>;
90
91 partitions {
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 label = "u-boot";
98 reg = <0x000000 0x040000>;
99 read-only;
100 };
101
102 partition@40000 {
103 label = "u-boot-env";
104 reg = <0x040000 0x010000>;
105 };
106
107 art: partition@50000 {
108 label = "art";
109 reg = <0x050000 0x010000>;
110 read-only;
111
112 nvmem-layout {
113 compatible = "fixed-layout";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 cal_art_5000: calibration@5000 {
118 reg = <0x5000 0x844>;
119 };
120 };
121 };
122
123 config: partition@60000 {
124 label = "config";
125 reg = <0x060000 0x010000>;
126 read-only;
127
128 nvmem-layout {
129 compatible = "fixed-layout";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 macaddr_config_201a: macaddr@201a {
134 reg = <0x201a 0x6>;
135 };
136 };
137 };
138
139 partition@70000 {
140 compatible = "denx,uimage";
141 label = "firmware";
142 reg = <0x070000 0xf90000>;
143 };
144 };
145 };
146 };
147
148 &mdio0 {
149 status = "okay";
150
151 phy4: ethernet-phy@4 {
152 reg = <4>;
153 eee-broken-100tx;
154 eee-broken-1000t;
155 };
156 };
157
158 &eth0 {
159 status = "okay";
160
161 pll-data = <0xa6000000 0xa0000101 0xa0001313>;
162
163 nvmem-cells = <&macaddr_config_201a>;
164 nvmem-cell-names = "mac-address";
165
166 phy-mode = "rgmii-id";
167 phy-handle = <&phy4>;
168
169 gmac_config: gmac-config {
170 device = <&gmac>;
171
172 rgmii-enabled = <1>;
173
174 rxdv-delay = <3>;
175 rxd-delay = <3>;
176 txen-delay = <3>;
177 txd-delay = <3>;
178 };
179 };
180
181 &wmac {
182 status = "okay";
183
184 mtd-cal-data = <&art 0x1000>;
185 };
186
187 &usb0 {
188 vbus-supply = <&reg_usb_vbus>;
189 };