ath79: qca: convert to nvmem-layout
[openwrt/staging/blocktrron.git] / target / linux / ath79 / dts / qca9563_zte_mf286.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 // Copyright (c) 2021 Cezary Jackiewicz
3 // Copyright (c) 2021, 2022 Lech Perczak
4 #include "qca9563_zte_mf286.dtsi"
5
6 / {
7 model = "ZTE MF286";
8 compatible = "zte,mf286", "qca,qca9563";
9
10 ubi-concat {
11 compatible = "mtd-concat";
12 devices = <&ubiconcat0 &ubiconcat1>;
13
14 partitions {
15 compatible = "fixed-partitions";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 partition@0 {
20 reg = <0x0 0x7840000>;
21 label = "ubi";
22 };
23 };
24 };
25 };
26
27 &led_debug {
28 /* Hidden green SMD LED below signal strength LEDs
29 * Visible through slits underside of the case,
30 * and slightly through the case below signal state LEDs
31 */
32 color = <LED_COLOR_ID_GREEN>;
33 label = "green:debug";
34 };
35
36 &boot_flash {
37 partitions {
38 partition@0 {
39 label = "u-boot";
40 reg = <0x000000 0x080000>;
41 read-only;
42 };
43
44 partition@80000 {
45 label = "u-boot-env";
46 reg = <0x080000 0x020000>;
47 read-only;
48 };
49 };
50 };
51
52 &system_flash {
53 partitions {
54 partition@0 {
55 label = "fota-flag";
56 reg = <0x000000 0x140000>;
57 read-only;
58 };
59
60 partition@140000 {
61 label = "caldata";
62 reg = <0x140000 0x140000>;
63 read-only;
64
65 nvmem-layout {
66 compatible = "fixed-layout";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 cal_caldata_1000: cal@1000 {
71 reg = <0x1000 0x440>;
72 };
73
74 cal_caldata_5000: cal@5000 {
75 reg = <0x5000 0x844>;
76 };
77 };
78 };
79
80 partition@280000 {
81 label = "mac";
82 reg = <0x280000 0x140000>;
83 read-only;
84
85 nvmem-layout {
86 compatible = "fixed-layout";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 macaddr_mac_0: macaddr@0 {
91 reg = <0x0 0x6>;
92 };
93 };
94 };
95
96 /* This encompasses stock cfg-param, oops, web partitions,
97 * which can be overwritten safely
98 */
99 ubiconcat0: partition@3c0000 {
100 label = "ubiconcat0";
101 reg = <0x3c0000 0xf40000>;
102 };
103
104 /* Kernel MTD size is increased to 4MB from stock 3MB */
105 partition@1300000 {
106 label = "kernel";
107 reg = <0x1300000 0x400000>;
108 };
109
110 /* This encompasses stock rootfs, data, fota partitions,
111 * which can be overwritten safely
112 */
113 ubiconcat1: partition@1600000 {
114 label = "ubiconcat1";
115 reg = <0x1700000 0x6900000>;
116 };
117 };
118 };
119
120 &eth0 {
121 nvmem-cells = <&macaddr_mac_0>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &wifi_ath10k {
126 nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>, <&cal_caldata_5000>;
127 nvmem-cell-names = "mac-address", "calibration", "pre-calibration";
128 mac-address-increment = <1>;
129 };
130
131 &wmac {
132 nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_1000>;
133 nvmem-cell-names = "mac-address", "calibration";
134 };