mediatek: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / mediatek / dts / mt7986a-zyxel-ex5601-t0-ubootmod.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 ubootmod";
15 compatible = "zyxel,ex5601-t0-ubootmod", "mediatek,mt7986a";
16 memory@40000000 {
17 device_type = "memory";
18 reg = <0x40000000 0x20000000>;
19 };
20 };
21
22 &nand_partitions {
23 partition@0 {
24 label = "bl2";
25 reg = <0x0 0x100000>;
26 read-only;
27 };
28
29 partition@100000 {
30 label = "u-boot-env";
31 reg = <0x0100000 0x0080000>;
32 read-only;
33 };
34
35 factory: partition@180000 {
36 label = "Factory";
37 reg = <0x180000 0x0200000>;
38 read-only;
39
40 nvmem-layout {
41 compatible = "fixed-layout";
42 #address-cells = <1>;
43 #size-cells = <1>;
44
45 eeprom_factory: eeprom@0 {
46 #size-cells = <1>;
47 reg = <0x0 0x1000>;
48 };
49
50 macaddr_factory_0004: macaddr@0004 {
51 compatible = "mac-base";
52 reg = <0x0004 0x6>;
53 #nvmem-cell-cells = <1>;
54 };
55
56 macaddr_factory_0024: macaddr@0024 {
57 compatible = "mac-base";
58 reg = <0x0024 0x6>;
59 #nvmem-cell-cells = <1>;
60 };
61
62 macaddr_factory_002a: macaddr@002a {
63 compatible = "mac-base";
64 reg = <0x002a 0x6>;
65 #nvmem-cell-cells = <1>;
66 };
67 };
68 };
69
70 partition@380000 {
71 label = "fip";
72 reg = <0x380000 0x0200000>;
73 read-only;
74 };
75
76 partition@540000 {
77 label = "zloader";
78 reg = <0x540000 0x0040000>;
79 read-only;
80 };
81
82 partition@580000 {
83 label = "ubi";
84 reg = <0x580000 0x1da80000>;
85 };
86 };
87
88 &gmac0 {
89 nvmem-cells = <&macaddr_factory_002a 0>;
90 nvmem-cell-names = "mac-address";
91 };
92
93 &gmac1 {
94 nvmem-cells = <&macaddr_factory_0024 0>;
95 nvmem-cell-names = "mac-address";
96 };
97
98 &wifi {
99 nvmem-cells = <&eeprom_factory>;
100 nvmem-cell-names = "eeprom";
101 };