Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MediaTek mt8188 platform #6796

Merged
merged 8 commits into from
Dec 15, 2022

Conversation

tinghan-shen
Copy link
Contributor

@tinghan-shen tinghan-shen commented Dec 14, 2022

Add mt8188 platform support in SOF project.

mt8188: Cadence HiFi-5 DSP, single core, 4 dais , 4 dmas and 48k 16 bits.

Please let me know if there is any questions.

Related PRs for mt8188,
rimage: thesofproject/rimage#122
xtensa-overlay: thesofproject/xtensa-overlay#16
crosstool-ng gcc-10x: thesofproject/crosstool-ng#17
crosstool-ng gcc-11x: thesofproject/crosstool-ng#18

Thank you!

Add xtensa headers for mtk mt8188 platform.

Signed-off-by: Tinghan Shen <[email protected]>
@tinghan-shen tinghan-shen force-pushed the mt8188-to-sof branch 2 times, most recently from d4a9fca to 44087f2 Compare December 14, 2022 06:12
@marc-hb
Copy link
Collaborator

marc-hb commented Dec 14, 2022

Getting rid of the SPDX / C99 warnings is tricky. Last time I tried I think I found a way:
#6284 (comment)

@@ -11,7 +11,7 @@ DEFAULT_PLATFORMS=(
tgl tgl-h
imx8 imx8x imx8m imx8ulp
rn rmb
mt8186 mt8195
mt8186 mt8188 mt8195
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container is not updated automatically (more container info in #5073). In the mean time try this instead to avoid CI failure like the one below

--- a/scripts/xtensa-build-all.sh
+++ b/scripts/xtensa-build-all.sh
@@ -18,11 +18,17 @@ DEFAULT_PLATFORMS=(
 # the -a option for everyone.
 SUPPORTED_PLATFORMS=( "${DEFAULT_PLATFORMS[@]}" )
 
+# Waiting for container work in progress
+SUPPORTED_PLATFORMS=( mt8188  )
+
+
 # Not actually "supported" in the main branch anymore (go to stable-v2.3

https://github.com/thesofproject/sof/actions/runs/3692264763/jobs/6250986683

    xtensa-mt8188-elf-gcc

  is not a full path and was not found in the PATH.

@@ -0,0 +1,16 @@
CONFIG_MT8188=y
CONFIG_CORE_COUNT=1
CONFIG_XT_VIRTUAL_OPS=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this configuration "CONFIG_XT_VIRTUAL_OPS" because new code support virtual ops by default.
94db5c7#diff-1ee8aded2f65c24944261dcab296c3ff94e0d3bacd5909895db9c63f029113c5R1085


DECLARE_TR_CTX(clkdrv_tr, SOF_UUID(clkdrv_uuid), LOG_LEVEL_INFO);

/* default voltage is 0.8V */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed 0.75V for mt8188.

* for more details.
*/
const struct xthal_MPU_entry __xt_mpu_init_table[] __section(".ResetVector.text") = {
XTHAL_MPU_ENTRY(0x00000000, 1, XTHAL_AR_RWXrwx, XTHAL_MEM_DEVICE), // unused
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really unused because memory attribute is not XTHAL_AR_NONE?

Add memory layout and register address for mtk mt8188.

[Cache]
I-Cache: 64KB, 4-way Associativity
D-Cache: 128KB, 4-way Associativity

[Memory]
DRAM: DSP can access DRAM shared with CPU
L2TCM: 512KB DSP SRAM POOL

Signed-off-by: Tinghan Shen <[email protected]>
Reuse mt8186 interrupt, timer, and ipc drivers for mt8188.
mt8188 DSP has 32 interrupts, 4 internal timers, and 5 mailbox for IPC.

Signed-off-by: Tinghan Shen <[email protected]>
mt8188 platform integrates a single-core HIFI5 DSP.

The highest DSP operation frequency is 800MHz which requires
0.75v working voltage. otherwise, it should switch to 26M which
can operate at the lowest working voltage 0.55v.

Signed-off-by: Tinghan Shen <[email protected]>
Add default config for mt8188 platform.

Signed-off-by: Tinghan Shen <[email protected]>
Add CMakefile for MediaTek mt8188 platform to build it.

Signed-off-by: Tinghan Shen <[email protected]>
Add mt8188 to Kconfig.

Signed-off-by: Tinghan Shen <[email protected]>
The company name should be MediaTek instead of Mediatek.
                                ^                   ^

Signed-off-by: Tinghan Shen <[email protected]>
@lgirdwood
Copy link
Member

@wszypelt can you check CI, not expecting this PR to fail. Thanks!

@wszypelt
Copy link

wszypelt commented Dec 15, 2022

@lgirdwood
image
Internal Intel CI passed, I don't know why here is not updated results

@lgirdwood
Copy link
Member

@greg-intel @marc-hb CI sync appears sluggish, seeing blob not found with Jenkins.

@wszypelt
Copy link

@lgirdwood The problem was on the side of the internal service, it has already been fixed

@lgirdwood lgirdwood merged commit c916f3f into thesofproject:main Dec 15, 2022
@marc-hb
Copy link
Collaborator

marc-hb commented Dec 15, 2022

checkpatch looks at each commit individually. So fixing checkpatch warnings in a separate commit is pointless.

@tinghan-shen
Copy link
Contributor Author

Hi marc,

The SPDX checkpatch warnings is fixed in each commit. The commit (9535aa7) only includes files fixed the company name.

@marc-hb
Copy link
Collaborator

marc-hb commented Dec 16, 2022

Oh I see now that commit c916f3f (= 9535aa7 after rebase and merge) cleaned up old existing files not added by this PR, sorry I got confused.

So it looks like no commit in this PR has SPDX or comment style warning, my bad.

That cleanup is good for consistency but it wasn't really necessary, at least not in this PR. I wasn't asking for it! As I wrote checkpatch is focused on incoming changes, checkpatch does not care about existing code.

marc-hb added a commit to marc-hb/sof that referenced this pull request Jan 10, 2023
Pleasing checkpatch is hard when adding new files.

This is tricky and comes up every time someone adds new files, examples
in thesofproject#6284, thesofproject#6796, thesofproject#6931 , etc.

Signed-off-by: Marc Herbert <[email protected]>
lgirdwood pushed a commit that referenced this pull request Jan 11, 2023
Pleasing checkpatch is hard when adding new files.

This is tricky and comes up every time someone adds new files, examples
in #6284, #6796, #6931 , etc.

Signed-off-by: Marc Herbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants