aboutsummaryrefslogtreecommitdiff
path: root/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts
blob: 88538c8b0a6c4b5dce935a1aa7598317e58f8cf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// SPDX-License-Identifier: (GPL-2.0-only OR MIT)

/dts-v1/;
#include "mt7622-linksys-e8450.dtsi"

/ {
	model = "Linksys E8450 (UBI)";
	compatible = "linksys,e8450-ubi", "mediatek,mt7622";

	aliases {
		label-mac-device = &wan;
	};

	chosen {
		rootdisk = <&ubi_rootfs>;
		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512 ubi.block=0,fit root=/dev/fit0 rootwait";
	};
};

&snand {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "bl2";
			reg = <0x0 0x80000>;
			read-only;
		};

		partition@80000 {
			label = "ubi";
			reg = <0x80000 0x7f80000>;
			compatible = "linux,ubi";

			volumes {
				ubi-volume-ubootenv {
					volname = "ubootenv";
					nvmem-layout {
						compatible = "u-boot,env-redundant-bool-layout";
					};
				};

				ubi-volume-ubootenv2 {
					volname = "ubootenv2";
					nvmem-layout {
						compatible = "u-boot,env-redundant-bool-layout";
					};
				};

				ubi_rootfs: ubi-volume-fit {
					volname = "fit";
				};

				ubi_factory: ubi-volume-factory {
					volname = "factory";
				};
			};
		};
	};
};

&ubi_factory {
	nvmem-layout {
		compatible = "fixed-layout";
		#address-cells = <1>;
		#size-cells = <1>;

		eeprom_factory_0: eeprom@0 {
			reg = <0x0 0x4da8>; /* actual length 0x400 */
		};

		eeprom_factory_5000: eeprom@5000 {
			reg = <0x5000 0xe00>;
		};

		macaddr_factory_7fff4: macaddr@7fff4 {
			reg = <0x7fff4 0x6>;
		};

		macaddr_factory_7fffa: macaddr@7fffa {
			reg = <0x7fffa 0x6>;
		};
	};
};

&wmac {
	nvmem-cells = <&eeprom_factory_0>;
	nvmem-cell-names = "eeprom";
	status = "okay";
};

&wmac1 {
	nvmem-cells = <&eeprom_factory_5000>;
	nvmem-cell-names = "eeprom";
};

&gmac0 {
	nvmem-cells = <&macaddr_factory_7fff4>;
	nvmem-cell-names = "mac-address";
};

&wan {
	nvmem-cells = <&macaddr_factory_7fffa>;
	nvmem-cell-names = "mac-address";
};