Skip to content

Commit 4bc0104

Browse files
hackpascaldanielschwierzeck
authored andcommitted
mips: mtmips: add support for MediaTek MT7621 SoC
This patch adds support for MediaTek MT7621 SoC. All files are dedicated for u-boot. The default build target is u-boot-mt7621.bin. The specification of this chip: https://www.mediatek.com/products/homenetworking/mt7621 Reviewed-by: Daniel Schwierzeck <[email protected]> Signed-off-by: Weijie Gao <[email protected]>
1 parent 2948d9c commit 4bc0104

26 files changed

+2686
-6
lines changed

arch/mips/Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ head-y := arch/mips/cpu/start.o
44

55
ifeq ($(CONFIG_SPL_BUILD),y)
66
head-$(CONFIG_ARCH_JZ47XX) := arch/mips/mach-jz47xx/start.o
7+
head-$(CONFIG_SOC_MT7621) := arch/mips/mach-mtmips/mt7621/spl/start.o
8+
endif
9+
10+
ifeq ($(CONFIG_TPL_BUILD),y)
11+
head-$(CONFIG_SOC_MT7621) := arch/mips/mach-mtmips/mt7621/tpl/start.o
712
endif
813

914
libs-y += arch/mips/cpu/

arch/mips/dts/mt7621-u-boot.dtsi

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (C) 2022 MediaTek Inc. All rights reserved.
4+
*
5+
* Author: Weijie Gao <[email protected]>
6+
*/
7+
8+
#include <linux/stringify.h>
9+
10+
/ {
11+
binman: binman {
12+
multiple-images;
13+
};
14+
};
15+
16+
&sysc {
17+
u-boot,dm-pre-reloc;
18+
};
19+
20+
&reboot {
21+
u-boot,dm-pre-reloc;
22+
};
23+
24+
&clkctrl {
25+
u-boot,dm-pre-reloc;
26+
};
27+
28+
&rstctrl {
29+
u-boot,dm-pre-reloc;
30+
};
31+
32+
&pinctrl {
33+
u-boot,dm-pre-reloc;
34+
};
35+
36+
&uart0 {
37+
u-boot,dm-pre-reloc;
38+
};
39+
40+
&uart1 {
41+
u-boot,dm-pre-reloc;
42+
};
43+
44+
&uart2 {
45+
u-boot,dm-pre-reloc;
46+
};
47+
48+
&binman {
49+
u-boot-spl-ddr {
50+
align = <4>;
51+
align-size = <4>;
52+
filename = "u-boot-spl-ddr.bin";
53+
pad-byte = <0xff>;
54+
55+
u-boot-spl {
56+
align-end = <4>;
57+
filename = "u-boot-spl.bin";
58+
};
59+
60+
stage_bin {
61+
filename = "mt7621_stage_sram.bin";
62+
type = "blob-ext";
63+
};
64+
};
65+
66+
spl-img {
67+
filename = "u-boot-spl-ddr.img";
68+
69+
mkimage {
70+
#ifdef CONFIG_MT7621_BOOT_FROM_NAND
71+
args = "-T", "mtk_image", "-n", "mt7621=1",
72+
"-a", __stringify(CONFIG_SPL_TEXT_BASE),
73+
"-e", __stringify(CONFIG_SPL_TEXT_BASE);
74+
#else
75+
args = "-A", "mips", "-T", "standalone", "-O", "u-boot",
76+
"-C", "none", "-n", "MT7621 U-Boot SPL",
77+
"-a", __stringify(CONFIG_SPL_TEXT_BASE),
78+
"-e", __stringify(CONFIG_SPL_TEXT_BASE);
79+
#endif
80+
81+
blob {
82+
filename = "u-boot-spl-ddr.bin";
83+
};
84+
};
85+
};
86+
87+
mt7621-uboot {
88+
filename = "u-boot-mt7621.bin";
89+
pad-byte = <0xff>;
90+
91+
#ifndef CONFIG_MT7621_BOOT_FROM_NAND
92+
u-boot-tpl {
93+
align-end = <4>;
94+
filename = "u-boot-tpl.bin";
95+
};
96+
#endif
97+
98+
spl {
99+
#ifdef CONFIG_MT7621_BOOT_FROM_NAND
100+
align-end = <0x1000>;
101+
#endif
102+
filename = "u-boot-spl-ddr.img";
103+
type = "blob";
104+
};
105+
106+
u-boot {
107+
filename = "u-boot-lzma.img";
108+
type = "blob";
109+
};
110+
};
111+
};

0 commit comments

Comments
 (0)