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>;
49 factory: partition@100000 {
51 reg = <0x100000 0x40000>;
57 reg = <0x140000 0x40000>;
61 label = "crash_syslog";
62 reg = <0x180000 0x40000>;
67 reg = <0x1c0000 0x40000>;
71 /* uboot expects to find kernels at 0x200000 & 0x600000
72 * referred to as system 1 & system 2 respectively.
73 * a kernel is considered suitable for handing control over
74 * if its linux magic number exists & uImage CRC are correct.
75 * If either of those conditions fail, a matching sys'n'_fail flag
76 * is set in uboot env & a restart performed in the hope that the
77 * alternate kernel is okay.
78 * if neither kernel checksums ok and both are marked failed, system 2
81 * Note uboot's tftp flash install writes the transferred
82 * image to both kernel partitions.
85 /* We keep stock xiaomi firmware (kernel0) here */
87 label = "kernel_stock";
88 reg = <0x200000 0x400000>;
93 reg = <0x600000 0x400000>;
96 /* ubi partition is the result of squashing
97 * next consecutive stock partitions:
98 * - rootfs0 (rootfs partition for stock kernel0),
99 * - rootfs1 (rootfs partition for stock failsafe kernel1),
100 * - overlay (used as ubi overlay in stock fw)
101 * resulting 117,5MiB space for packages.
106 reg = <0xa00000 0x7580000>;