1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
10 bootargs = "console=ttyS0,115200n8";
14 compatible = "gpio-keys";
18 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
28 compatible = "fixed-partitions";
40 reg = <0x80000 0x40000>;
45 reg = <0xc0000 0x40000>;
51 reg = <0x100000 0x40000>;
55 compatible = "fixed-layout";
59 eeprom_factory_0: eeprom@0 {
63 eeprom_factory_8000: eeprom@8000 {
67 macaddr_factory_e000: macaddr@e000 {
71 macaddr_factory_e006: macaddr@e006 {
79 reg = <0x140000 0x40000>;
83 label = "crash_syslog";
84 reg = <0x180000 0x40000>;
89 reg = <0x1c0000 0x40000>;
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
103 * Note uboot's tftp flash install writes the transferred
104 * image to both kernel partitions.
107 /* We keep stock xiaomi firmware (kernel0) here */
109 label = "kernel_stock";
110 reg = <0x200000 0x400000>;
115 reg = <0x600000 0x400000>;
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.
128 reg = <0xa00000 0x7580000>;