ath79: Convert calibration data to nvmem
[openwrt/staging/ldir.git] / target / linux / ath79 / dts / qca9563_dlink_dir-8x9-a1.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9
10 keys {
11 compatible = "gpio-keys";
12
13 wps {
14 linux,code = <KEY_WPS_BUTTON>;
15 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
16 debounce-interval = <60>;
17 };
18
19 reset {
20 linux,code = <KEY_RESTART>;
21 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
22 debounce-interval = <60>;
23 };
24 };
25 };
26
27 &pcie {
28 status = "okay";
29
30 wifi@0,0 {
31 compatible = "qcom,ath10k";
32 reg = <0x0000 0 0 0 0>;
33
34 nvmem-cells = <&calibration_ath10k>, <&macaddr_devdata_94>;
35 nvmem-cell-names = "calibration", "mac-address-ascii";
36 };
37 };
38
39 &spi {
40 status = "okay";
41
42 flash@0 {
43 compatible = "jedec,spi-nor";
44 reg = <0>;
45 spi-max-frequency = <50000000>;
46
47 partitions {
48 compatible = "fixed-partitions";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 partition@0 {
53 label = "bootloader";
54 reg = <0x000000 0x40000>;
55 read-only;
56 };
57
58 partition@40000 {
59 label = "bdcfg";
60 reg = <0x040000 0x10000>;
61 read-only;
62 };
63
64 partition@50000 {
65 label = "devdata";
66 reg = <0x050000 0x10000>;
67 read-only;
68
69 compatible = "nvmem-cells";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 macaddr_devdata_94: macaddr@94 {
74 reg = <0x94 0x11>;
75 };
76
77 macaddr_devdata_b0: macaddr@b0 {
78 reg = <0xb0 0x11>;
79 };
80 };
81
82 partition@60000 {
83 label = "devconf";
84 reg = <0x060000 0x10000>;
85 read-only;
86 };
87
88 partition@70000 {
89 compatible = "seama";
90 label = "firmware";
91 reg = <0x070000 0xf80000>;
92 };
93
94 partition@ff0000 {
95 label = "art";
96 reg = <0xff0000 0x010000>;
97 read-only;
98
99 compatible = "nvmem-cells";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 calibration_ath9k: calibration@1000 {
104 reg = <0x1000 0x440>;
105 };
106
107 calibration_ath10k: calibration@5000 {
108 reg = <0x5000 0x844>;
109 };
110 };
111 };
112 };
113 };
114
115 &mdio0 {
116 status = "okay";
117
118 phy0: ethernet-phy@0 {
119 reg = <0>;
120 phy-mode = "sgmii";
121 qca,mib-poll-interval = <500>;
122
123 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
124
125 qca,ar8327-initvals = <
126 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
127 0x10 0x81000080 /* POWER_ON_STRAP */
128 0x50 0xcc35cc35 /* LED_CTRL0 */
129 0x54 0xcb37cb37 /* LED_CTRL1 */
130 0x58 0x00000000 /* LED_CTRL2 */
131 0x5c 0x00f3cf00 /* LED_CTRL3 */
132 0x7c 0x0000007e /* PORT0_STATUS */
133 >;
134 };
135 };
136
137 &eth0 {
138 status = "okay";
139
140 pll-data = <0x03000101 0x00000101 0x00001919>;
141
142 phy-mode = "sgmii";
143 phy-handle = <&phy0>;
144 };
145
146 &wmac {
147 status = "okay";
148
149 nvmem-cells = <&calibration_ath9k>, <&macaddr_devdata_b0>;
150 nvmem-cell-names = "calibration", "mac-address-ascii";
151 };