ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/staging/dangole.git] / target / linux / ath79 / dts / qca9558_ocedo_koala.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ocedo,koala", "qca,qca9558";
10 model = "OCEDO Koala";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &eth0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 power {
24 label = "green:power";
25 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
26 default-state = "on";
27 };
28
29 wifi2 {
30 label = "yellow:wlan2";
31 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1tpt";
33 };
34
35 wifi5 {
36 label = "red:wlan58";
37 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy0tpt";
39 };
40
41 led_system: system {
42 label = "blue:sys";
43 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "reset";
52 linux,code = <KEY_RESTART>;
53 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
54 };
55 };
56 };
57
58 &pcie0 {
59 status = "okay";
60
61 wifi@0,0 {
62 compatible = "qcom,ath10k";
63 reg = <0x0000 0 0 0 0>;
64 nvmem-cells = <&cal_art_5000>, <&macaddr_art_c>;
65 nvmem-cell-names = "calibration", "mac-address";
66 };
67 };
68
69 &spi {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <50000000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 uboot: partition@0 {
83 label = "u-boot";
84 reg = <0x000000 0x040000>;
85 read-only;
86 };
87
88 partition@40000 {
89 label = "u-boot-env";
90 reg = <0x040000 0x010000>;
91 };
92
93 partition@50000 {
94 /* Dual-Flash layout combined */
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x050000 0xe80000>;
98 };
99
100 partition@ed0000 {
101 label = "data";
102 reg = <0xed0000 0x110000>;
103 read-only;
104 };
105
106 partition@fe0000 {
107 label = "id";
108 reg = <0xfe0000 0x010000>;
109 read-only;
110 };
111
112 art: partition@ff0000 {
113 label = "art";
114 reg = <0xff0000 0x010000>;
115 read-only;
116
117 nvmem-layout {
118 compatible = "fixed-layout";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 macaddr_art_0: macaddr@0 {
123 reg = <0x0 0x6>;
124 };
125
126 macaddr_art_6: macaddr@6 {
127 reg = <0x6 0x6>;
128 };
129
130 macaddr_art_c: macaddr@c {
131 reg = <0xc 0x6>;
132 };
133
134 cal_art_5000: calibration@5000 {
135 reg = <0x5000 0x844>;
136 };
137 };
138 };
139 };
140 };
141 };
142
143 &wmac {
144 status = "okay";
145
146 mtd-cal-data = <&art 0x1000>;
147 nvmem-cells = <&macaddr_art_6>;
148 nvmem-cell-names = "mac-address";
149 };
150
151 &mdio0 {
152 status = "okay";
153
154 phy5: ethernet-phy@5 {
155 reg = <5>;
156 eee-broken-100tx;
157 eee-broken-1000t;
158 };
159 };
160
161 &eth0 {
162 status = "okay";
163
164 nvmem-cells = <&macaddr_art_0>;
165 nvmem-cell-names = "mac-address";
166
167 phy-handle = <&phy5>;
168 phy-mode = "rgmii-rxid";
169
170 pll-data = <0x8e000000 0x80000101 0x80001313>;
171 };