Skip to content

Commit 4e8e4fb

Browse files
committed
platform: Add build support for mediatek mt8196 platform
Add CMakefile for mediatek mt8196 platform to build. Signed-off-by: hailong.fan <hailong.fan@mediatek.com>
1 parent f96603f commit 4e8e4fb

File tree

8 files changed

+43
-4
lines changed

8 files changed

+43
-4
lines changed

scripts/docker_build/sof_builder/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ ENV PATH="/home/sof/work/xtensa-imx8ulp-elf/bin:${PATH}"
117117
ENV PATH="/home/sof/work/xtensa-mt8186-elf/bin:${PATH}"
118118
ENV PATH="/home/sof/work/xtensa-mt8195-elf/bin:${PATH}"
119119
ENV PATH="/home/sof/work/xtensa-mt8188-elf/bin:${PATH}"
120+
ENV PATH="/home/sof/work/xtensa-mt8196-elf/bin:${PATH}"
120121

121122
ARG NEWLIB_REPO=https://github.com/jcmvbkbc/newlib-xtensa.git
122123
RUN cd "$HOME" && \

scripts/set_xtensa_params.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ case "$platform" in
135135
HOST="xtensa-mt8195-elf"
136136
TOOLCHAIN_VER="RI-2019.1-linux"
137137
;;
138-
138+
mt8196)
139+
XTENSA_CORE="HiFi5_MPU_lock_2023_11"
140+
HOST="xtensa-mt8196-elf"
141+
TOOLCHAIN_VER="RI-2023.11-linux"
142+
;;
139143
*)
140144
>&2 printf 'Unknown xtensa platform=%s\n' "$platform"
141145
return 1
@@ -144,7 +148,7 @@ esac
144148

145149
# Pre-zephyr "XTOS" build, testbench,...
146150
case "$platform" in
147-
mtl|lnl|ptl|acp_7_0)
151+
mtl|lnl|ptl|acp_7_0|mt8196)
148152
SOF_CC_BASE='clang';;
149153
*)
150154
SOF_CC_BASE='xcc';;

scripts/xtensa-build-all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set -e
1010
DEFAULT_PLATFORMS=(
1111
imx8m
1212
rn rmb vangogh
13-
mt8186 mt8195 mt8188
13+
mt8186 mt8195 mt8188 mt8196
1414
)
1515

1616
# Work in progress can be added to this "staging area" without breaking

src/arch/xtensa/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ elseif(CONFIG_MT8188)
2626
set(platform_folder mt8188)
2727
elseif(CONFIG_MT8195)
2828
set(platform_folder mt8195)
29+
elseif(CONFIG_MT8196)
30+
set(platform_folder mt8196)
2931
else()
3032
message(FATAL_ERROR "Platform not defined, check your Kconfiguration?")
3133
endif()
@@ -477,7 +479,7 @@ set(UNSIGNED_RI imx8 imx8x imx8m imx8ulp)
477479
# AMD
478480
list(APPEND UNSIGNED_RI rn rmb vangogh acp_6_3 acp_7_0)
479481
# MediaTek
480-
list(APPEND UNSIGNED_RI mt8186 mt8188 mt8195)
482+
list(APPEND UNSIGNED_RI mt8186 mt8188 mt8195 mt8196)
481483

482484
if(${fw_name} IN_LIST UNSIGNED_RI) # mere copy
483485
add_custom_command(OUTPUT reproducible.ri

src/drivers/mediatek/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ endif()
77
if(CONFIG_MT8186 OR CONFIG_MT8188)
88
add_subdirectory(mt818x)
99
endif()
10+
if(CONFIG_MT8196)
11+
add_subdirectory(mt8196)
12+
endif()

src/platform/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ elseif(CONFIG_MT8188)
2121
add_subdirectory(mt8188)
2222
elseif(CONFIG_MT8195)
2323
add_subdirectory(mt8195)
24+
elseif(CONFIG_MT8196)
25+
add_subdirectory(mt8196)
2426
endif()

src/platform/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,27 @@ config MT8195
273273
help
274274
Select if your target platform is mt8195-compatible
275275

276+
config MT8196
277+
bool "Build for MTK MT8196"
278+
select XT_INTERRUPT_LEVEL_1
279+
select XT_INTERRUPT_LEVEL_2
280+
select XT_INTERRUPT_LEVEL_3
281+
select XT_INTERRUPT_LEVEL_4
282+
select DUMMY_DMA
283+
select HOST_PTABLE
284+
select XT_WAITI_DELAY
285+
select MEDIATEK
286+
select XTENSA_EXCLUSIVE
287+
select SCHEDULE_DMA_MULTI_CHANNEL
288+
help
289+
This configuration enables support for the MediaTek MT8196 platform.
290+
It includes necessary interrupt levels, DMA support, and other
291+
platform-specific features required for the proper functioning of
292+
the MT8196 SoC. Enabling this option will ensure that the build
293+
system includes all relevant drivers and configurations for MT8196.
294+
295+
Select this option if your target platform is MT8196-compatible.
296+
276297
endchoice
277298

278299
config MAX_CORE_COUNT
@@ -476,6 +497,7 @@ config RIMAGE_SIGNING_SCHEMA
476497
default "mt8186" if MT8186
477498
default "mt8188" if MT8188
478499
default "mt8195" if MT8195
500+
default "mt8196" if MT8196
479501
default ""
480502
help
481503
Signing schema name used by rimage to decide how to build final binary

uuid-registry.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ ec290e95-4a20-47eb-bbffd9c888431831 chmap
4646
53863428-9a72-44df-af0ffe45ea2348ba clkdrv_mt8186
4747
19d4e680-4479-48cc-af869f63d8b0098b clkdrv_mt8188
4848
23b12fd5-c2a9-41a8-a2b3231ab7dcdc70 clkdrv_mt8195
49+
e87bf747-e574-4362-bf2cc015d2859dd9 clkdrv_mt8196
4950
8890ea76-0df9-44ae-87e6994f4c15e9fa clock
5051
7c42ce8b-0108-43d0-913756d660478c5f component
5152
9ba00c83-ca12-4a83-943c1fa2e82f9dda copier
@@ -82,15 +83,18 @@ a5dacb0e-88dc-415c-a1b53e8df77f1976 idc_cmd_task
8283
b90f5a4e-5537-4375-a1df95485472ff9e idc_task
8384
696ae2bc-2877-11eb-adc10242ac120002 igo_nr
8485
fa00558c-d653-4851-a03ab21f125a9524 interrupt
86+
2f520e85-49ba-4284-90d83def24af313b intc_mt8196
8587
be60f97d-78df-4796-a0ee435cb56b720a ipc
8688
a814a1ca-0b83-466c-95872f35ff8d12e8 ipcgw
8789
389c9186-5a7d-4ad1-a02ca02ecdadfb33 ipc_task
8890
49be8ff3-71a3-4456-bb7e4723f2e5730c ipc_task_amd
8991
a3fe3bf2-39a4-4fc3-b3418a96e0a26759 ipc_task_mt818x
92+
caef4bd7-7a2e-4039-9b061f5ff9ec3899 ipc_task_mt8196
9093
6c8f0d53-ff77-4ca1-b825c0c4e1b0d322 ipc_task_posix
9194
1862d39a-3a84-4d64-8c91dce1dfc122db irq
9295
6533d0eb-b785-4709-84f5347c81720189 irq_acp
9396
d2e3f730-df39-42ee-81a839bfb4d024c2 irq_mt818x
97+
7eb28333-f08f-436f-bbbd764ac21fc2f1 irq_mt8196
9498
eba8d51f-7827-47b5-82eede6e7743af67 keyword
9599
d8218443-5ff3-4a4c-b3886cfe07b9562e kpb
96100
a8a0cb32-4a77-4db1-85c753d7ee07bce6 kpb4
@@ -135,6 +139,7 @@ d7f6712d-131c-45a7-82ed6aa9dc2291ea pm_runtime
135139
cf90d851-68a2-4987-a2de85aed0c8531c sgen_mt8186
136140
99316bd9-07b9-4665-81796e048d67cb45 sgen_mt8188
137141
9eb1a55b-fc20-4442-96131ff1023be493 sgen_mt8195
142+
bcf54c06-5702-4a60-ac4abb509123c649 sgen_mt8196
138143
dabe8814-47e8-11ed-a58bb309974fecce shmread
139144
e2b6031c-47e8-11ed-07a97f801b6efa6c shmwrite
140145
167a961e-8ae4-11ea-89f1000c29ce1635 smart_amp_test

0 commit comments

Comments
 (0)