ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_xiaomi_nand_128m.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 chosen {
10 bootargs = "console=ttyS0,115200n8";
11 };
12
13 keys: keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21 };
22 };
23
24 &nand {
25 status = "okay";
26
27 partitions {
28 compatible = "fixed-partitions";
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 partition@0 {
33 label = "Bootloader";
34 reg = <0x0 0x80000>;
35 read-only;
36 };
37
38 partition@80000 {
39 label = "Config";
40 reg = <0x80000 0x40000>;
41 };
42
43 partition@c0000 {
44 label = "Bdata";
45 reg = <0xc0000 0x40000>;
46 read-only;
47 };
48
49 partition@100000 {
50 label = "factory";
51 reg = <0x100000 0x40000>;
52 read-only;
53
54 nvmem-layout {
55 compatible = "fixed-layout";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 eeprom_factory_0: eeprom@0 {
60 reg = <0x0 0x400>;
61 };
62
63 eeprom_factory_8000: eeprom@8000 {
64 reg = <0x8000 0x200>;
65 };
66
67 macaddr_factory_e000: macaddr@e000 {
68 reg = <0xe000 0x6>;
69 };
70
71 macaddr_factory_e006: macaddr@e006 {
72 reg = <0xe006 0x6>;
73 };
74 };
75 };
76
77 partition@140000 {
78 label = "crash";
79 reg = <0x140000 0x40000>;
80 };
81
82 partition@180000 {
83 label = "crash_syslog";
84 reg = <0x180000 0x40000>;
85 };
86
87 partition@1c0000 {
88 label = "reserved0";
89 reg = <0x1c0000 0x40000>;
90 read-only;
91 };
92
93 /* uboot expects to find kernels at 0x200000 & 0x600000
94 * referred to as system 1 & system 2 respectively.
95 * a kernel is considered suitable for handing control over
96 * if its linux magic number exists & uImage CRC are correct.
97 * If either of those conditions fail, a matching sys'n'_fail flag
98 * is set in uboot env & a restart performed in the hope that the
99 * alternate kernel is okay.
100 * if neither kernel checksums ok and both are marked failed, system 2
101 * is booted anyway.
102 *
103 * Note uboot's tftp flash install writes the transferred
104 * image to both kernel partitions.
105 */
106
107 /* We keep stock xiaomi firmware (kernel0) here */
108 partition@200000 {
109 label = "kernel_stock";
110 reg = <0x200000 0x400000>;
111 };
112
113 partition@600000 {
114 label = "kernel";
115 reg = <0x600000 0x400000>;
116 };
117
118 /* ubi partition is the result of squashing
119 * next consecutive stock partitions:
120 * - rootfs0 (rootfs partition for stock kernel0),
121 * - rootfs1 (rootfs partition for stock failsafe kernel1),
122 * - overlay (used as ubi overlay in stock fw)
123 * resulting 117,5MiB space for packages.
124 */
125
126 partition@a00000 {
127 label = "ubi";
128 reg = <0xa00000 0x7580000>;
129 };
130 };
131 };