49cf39062a22a83e5c8d902ce09599daf8c2878d
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9342_ubnt_aircube-ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ubnt,aircube-ac", "qca,ar9342";
10 model = "Ubiquiti airCube AC";
11
12 keys {
13 compatible = "gpio-keys";
14
15 reset {
16 label = "reset";
17 linux,code = <KEY_RESTART>;
18 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
19 debounce-interval = <60>;
20 };
21 };
22 };
23
24 &spi {
25 status = "okay";
26
27 flash@0 {
28 compatible = "jedec,spi-nor";
29 reg = <0>;
30 spi-max-frequency = <25000000>;
31
32 partitions {
33 compatible = "fixed-partitions";
34 #address-cells = <1>;
35 #size-cells = <1>;
36
37 partition@0 {
38 label = "u-boot";
39 reg = <0x000000 0x040000>;
40 read-only;
41 };
42
43 partition@40000 {
44 label = "u-boot-env";
45 reg = <0x040000 0x010000>;
46 read-only;
47 };
48
49 partition@50000 {
50 compatible = "denx,uimage";
51 label = "firmware";
52 reg = <0x050000 0xf60000>;
53 };
54
55 partition@fb0000 {
56 label = "cfg";
57 reg = <0xfb0000 0x040000>;
58 read-only;
59 };
60
61 partition@ff0000 {
62 label = "art";
63 reg = <0xff0000 0x010000>;
64 read-only;
65
66 compatible = "nvmem-cells";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 macaddr_art_0: macaddr@0 {
71 reg = <0x0 0x6>;
72 };
73
74 calibration_art_1000: calibration@1000 {
75 reg = <0x1000 0x440>;
76 };
77
78 calibration_art_5000: calibration@5000 {
79 reg = <0x5000 0x844>;
80 };
81 };
82 };
83 };
84 };
85
86 &ref {
87 clock-frequency = <40000000>;
88 };
89
90 &pcie {
91 status = "okay";
92
93 wifi@0,0 {
94 compatible = "qcom,ath10k";
95 reg = <0x0 0 0 0 0>;
96 nvmem-cells = <&calibration_art_5000>;
97 nvmem-cell-names = "calibration";
98 };
99 };
100
101 &mdio0 {
102 status = "okay";
103
104 phy0: ethernet-phy@0 {
105 phy-mode = "rgmii";
106 reg = <0>;
107
108 qca,ar8327-initvals = <
109 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
110 0x7c 0x0000007e /* PORT0_STATUS */
111 >;
112 };
113 };
114
115 &eth0 {
116 status = "okay";
117
118 /* default for ar934x, except for 1000M and 10M */
119 pll-data = <0x06000000 0x00000101 0x00001313>;
120
121 nvmem-cells = <&macaddr_art_0>;
122 nvmem-cell-names = "mac-address";
123
124 phy-mode = "rgmii";
125 phy-handle = <&phy0>;
126
127 gmac-config {
128 device = <&gmac>;
129 };
130 };
131
132 &wmac {
133 status = "okay";
134
135 nvmem-cells = <&calibration_art_1000>;
136 nvmem-cell-names = "calibration";
137 };