mediatek: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / mediatek / dts / mt7986a-zyxel-ex5601-t0-stock.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
2 /*
3 * Copyright (C) 2021 MediaTek Inc.
4 * Author: Sam.Shih <sam.shih@mediatek.com>
5 */
6
7 /dts-v1/;
8 #include "mt7986a.dtsi"
9 #include "mt7986a-zyxel-ex5601-t0-common.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/input/input.h>
12
13 / {
14 model = "Zyxel EX5601-T0";
15 compatible = "zyxel,ex5601-t0", "mediatek,mt7986a-rfb-snand";
16
17 memory@40000000 {
18 device_type = "memory";
19 reg = <0x40000000 0x20000000>;
20 };
21 };
22
23 &spi_nand {
24 mediatek,nmbm;
25 mediatek,bmt-max-ratio = <1>;
26 mediatek,bmt-max-reserved-blocks = <64>;
27 };
28
29 &nand_partitions {
30
31 partition@0 {
32 label = "BL2";
33 reg = <0x00000 0x0100000>;
34 read-only;
35 };
36
37 partition@100000 {
38 label = "u-boot-env";
39 reg = <0x0100000 0x0080000>;
40 };
41
42 factory: partition@180000 {
43 label = "Factory";
44 reg = <0x180000 0x0200000>;
45 read-only;
46
47 nvmem-layout {
48 compatible = "fixed-layout";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 eeprom_factory: eeprom@0 {
53 #size-cells = <1>;
54 reg = <0x0 0x1000>;
55 };
56
57 macaddr_factory_0004: macaddr@0004 {
58 compatible = "mac-base";
59 reg = <0x0004 0x6>;
60 #nvmem-cell-cells = <1>;
61 };
62
63 macaddr_factory_0024: macaddr@0024 {
64 compatible = "mac-base";
65 reg = <0x0024 0x6>;
66 #nvmem-cell-cells = <1>;
67 };
68
69 macaddr_factory_002a: macaddr@002a {
70 compatible = "mac-base";
71 reg = <0x002a 0x6>;
72 #nvmem-cell-cells = <1>;
73 };
74 };
75 };
76
77 partition@380000 {
78 label = "FIP";
79 reg = <0x380000 0x01C0000>;
80 read-only;
81 };
82
83 partition@540000 {
84 label = "zloader";
85 reg = <0x540000 0x0040000>;
86 read-only;
87 };
88
89 partition@580000 {
90 label = "ubi";
91 reg = <0x580000 0x4000000>;
92 };
93
94 partition@4580000 {
95 label = "ubi2";
96 reg = <0x4580000 0x4000000>;
97 read-only;
98 };
99
100 partition@8580000 {
101 label = "zyubi";
102 reg = <0x8580000 0x15A80000>;
103 };
104 };
105
106 &gmac0 {
107 nvmem-cells = <&macaddr_factory_002a 0>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &gmac1 {
112 nvmem-cells = <&macaddr_factory_0024 0>;
113 nvmem-cell-names = "mac-address";
114 };
115
116 &wifi {
117 nvmem-cells = <&eeprom_factory>;
118 nvmem-cell-names = "eeprom";
119 };