-
Notifications
You must be signed in to change notification settings - Fork 322
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
Mediatek: mt8196: add platform/core_config/build_config #9758
Conversation
Add mt8196.toml to support sof-mt8196.ri binary build. Signed-off-by: hailong.fan <[email protected]>
Can one of the admins verify this patch?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this aligns with #9755 , but no showstoppers as far as I can tell. There's a bit of commented out code left here and there, but I'll leave this to @thesofproject/mediatek maintainers to check as this is all in MTK platform code.
src/platform/mt8196/lib/clk.c
Outdated
} | ||
|
||
//todo | ||
//io_reg_update_bits(MTK_ADSPPLL_CON3, MTK_PLL_PWR_ON, MTK_PLL_PWR_ON); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clean this up, I guess these are now copied from platform to another as copies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clean this up, I guess these are now copied from platform to another as copies.
Yes, updated, thanks.
SOFCI TEST |
Parallel efforts. The intent is that this hardware ships with Zephyr at launch, but for now there are two trees for different bits of enablement. |
Okay, how do you want to proceed - obviously xtos related code is being deprecated and removed. |
Add xtensa headers for mediatek mt8196 platform. Signed-off-by: hailong.fan <[email protected]>
Add memory layout and register address for mediatek mt8196 [Cache] I-Cache: 64KB, 4-way Associativity D-Cache: 128KB, 4-way Associativity [Memory] Dram: ADSP can access DRAM shared with CPU L2TCM: 768KB ADSP SRAM POOL Signed-off-by: hailong.fan <[email protected]>
mt8196 plaform integrates a single-core HIFI5 DSP. The DSP does not have DVFS scenario. When the system is in an active state, the DSP clock is 800MHz(0.75v). When the system enters a low power scenario, the DSP is in WFI state, and the clock is 26MHz. The DSP core and DMA in DSP subsys both can access DRAM directly. Signed-off-by: hailong.fan <[email protected]>
src/drivers/mediatek/mt8196/intc.c
Outdated
#ifdef CFG_CORE_OFF_SUPPORT | ||
#endif | ||
#ifdef CFG_TICKLESS_SUPPORT | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seem unneeded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, removed, thanks.
Add interrupt, timer and ipc driver for mt8196. Signed-off-by: hailong.fan <[email protected]>
Add default config for mt8196 platform. Signed-off-by: hailong.fan <[email protected]>
I'm entirely neutral on whether this gets merged separately. I think it's probably useful to have as a reference in the public tree, even if it gets deleted. But the Zephyr work is far enough along now that I really don't think there's much need to maintain two working versions. Ideally we all end up on the same page, and e.g. @hailongfan-mtk would be reviewing the Zephyr platform too. Will come by with some notes here in a bit once I figure out the divergence with the internal tree (which is based on a somewhat older SOF) |
ok, @hailongfan-mtk @andyross we can merge this now as a backup for the Zephyr work, and then deprecate/delete as the Zephyr support stabilzes ? Good for you guys ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks incomplete? I don't see the integration for the AFE driver. Presumably this would boot, but would have no audio capability? (c.f. src/platform/mt81*/afe-platform.c
and related files in the current tree) Is that coming in a separate PR?
XTHAL_MPU_ENTRY(0x4e180000, 1, XTHAL_AR_NONE, XTHAL_MEM_DEVICE), // unused | ||
XTHAL_MPU_ENTRY(0x90000000, 1, XTHAL_AR_RWXrwx, XTHAL_MEM_WRITEBACK_NOALLOC), // dram | ||
XTHAL_MPU_ENTRY(0x90500000, 1, XTHAL_AR_RWXrwx, XTHAL_MEM_NON_CACHEABLE), // dram | ||
XTHAL_MPU_ENTRY(0x91100000, 1, XTHAL_AR_NONE, XTHAL_MEM_DEVICE), // unused |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think this MPU setup is skewed vs. what is being used internally (there have been two recent changes I'm aware of, anyway). Can you be sure to synchronize the trees and validate this vs. the SOF main branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I think this MPU setup is skewed vs. what is being used internally (there have been two recent changes I'm aware of, anyway). Can you be sure to synchronize the trees and validate this vs. the SOF main branch?
The current MPU settings are correct and have been verified. Other changes (cache issues) will be submitted later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But +1 as-is, no reason not to merge as long as the remaining bits are coming.
Yes, this is only the DSP system part, the AFE part will be proposed in another PR. |
ok, thanks a lot |
CI been hanging a long time - restart it. |
SOFCI TEST |
@hailongfan-mtk The build is failing: https://github.com/thesofproject/sof/actions/runs/12648815920/job/35243903764?pr=9758
I think we've accepted platforms that cannot be compile tested with github flows, but these shouldn't be in the default platform list. If we merge this in current form, gcc-build-default-platforms will start failing for every pull request. |
scripts/xtensa-build-all.sh
Outdated
@@ -10,7 +10,7 @@ set -e | |||
DEFAULT_PLATFORMS=( | |||
imx8m | |||
rn rmb vangogh | |||
mt8186 mt8195 mt8188 | |||
mt8186 mt8195 mt8188 mt8196 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hailongfan-mtk please remove mt8196 from DEFAULT_PLATFORMS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks.
Add CMakefile for mediatek mt8196 platform to build. Signed-off-by: hailong.fan <[email protected]>
CI now only has codestyle failures left. Should be good to go |
CI stalled - restart. |
SOFCI TEST |
Add mediatek mt8196 platform/core_config/build_config drivers for auido development.