Repository navigation
Add support for mtk mt8186 platform - #5239
Conversation
|
Can one of the admins verify this patch?
|
|
Can one of the admins verify this patch? |
|
test this please |
|
approved the github actions, not sure if I can run intel CI though |
|
Looks good to me. Do you also have a gcc based toolchain for this? It would be useful to add it in the CI build scripts so that we can catch early if something breaks. |
Ok, I'll prepare a patch for this. |
You can have a look at https://github.com/thesofproject/crosstool-ng/ for all suppported platforms. I also think we have a repo to upload the toolchain binary? @lgirdwood i don't remember where we store the toochains. |
We need to do
|
|
@lgirdwood One thing needs your advise. May I know if qemu is required for CI? or qemu is for git actions? We are preparing qemu for mt8195 now. wenliangwu/qemu@5f259f1 , which is based on v5. 2.0. I am wondering what thing need to do when the qemu patch are ready. Thanks in advance. |
This can go in the qemu branch and then be added to the CI container. @marc-hb and @greg-intel can help with this. Fwiw, we are moving towards Renode for emulation (timeline TBD) as it has several key advantages over qemu for our needs. @cujomalainey can give you more details. |
|
@kkarask can you comment on the CI, this PR should not fail any Intel specific tests. Good to merge ? |
Please ignore, it's Jenkins CI. |
|
SOFCI TEST |
|
Retry CI |
Unfortunately the timeline has been disrupted a bit due to budget planning schedules being misaligned. Only basic xtensa is working right now with zephyr. Working to get more added. |
Please have a look at the discussions and (small) changes in #5202 that was just merged. |
Add xtensa headers for mtk mt8186 platform. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
marc-hb
left a comment
There was a problem hiding this comment.
Most of this PR looks like copy/paste of mt8195
|
@kkarask https://sof-ci.01.org/sof-pr-viewer/#/build/PR5239/build8393711 has very strange and new failures again... is there some major activity going on? |
kuanhsuncheng
left a comment
There was a problem hiding this comment.
I check the current .github/workflows/pull-request.yml. there is no mt8195 strategy. should we update also ?
There was a problem hiding this comment.
this is in units, half of what was read in line 61 from MTK_OSTIMER_CUR_L because of multiplication in line 65, is this correct?
There was a problem hiding this comment.
This is intended. The underlying HW is a 32-bit count-down timer.
It's used to set the difference between the current tick and next tick triggering reschedule.
If you have the gcc toolchain ready in the Docker image then yes of course. |
|
@tinghan-shen @kuanhsuncheng please someone from MTK approve PR before merge. |
There was a problem hiding this comment.
just curious why this is all inline? if you add another call to your macro below it will duplicate all this code.
There was a problem hiding this comment.
It's because some platforms also use it. I thought that maybe it's the way for IRQ handling at here.
for example,
https://github.com/thesofproject/sof/blob/main/src/drivers/amd/renoir/interrupt.c#L128
https://github.com/thesofproject/sof/blob/main/src/drivers/imx/interrupt-irqsteer.c#L324
There was a problem hiding this comment.
Interesting @lgirdwood this seems rather inflated, what are your thoughts here?
There was a problem hiding this comment.
Yeah, these could be optimized. Lets merge this first and get the build results as we could make the same change to all platforms. @tinghan-shen pls can you try this change and report any size changes to the binary. Thanks.
There was a problem hiding this comment.
I think NXP would see the biggest effect since they have multiple IRQs @dbaluta
There was a problem hiding this comment.
I tried to build mt8186 on both gcc11 and xcc, and compare the size of sof.ri.
No difference on gcc11.
64 bytes larger on xcc after remove "inline".
There was a problem hiding this comment.
why not just disable IDC?
There was a problem hiding this comment.
This file is added to solve build errors. mt8186 doesn't enable the configuration to build src/idc/idc.c.
|
Here are the PRs for mt8186 gcc toolchain. thesofproject/crosstool-ng#12 |
yaochunhung
left a comment
There was a problem hiding this comment.
@tinghan-shen @kuanhsuncheng please see my comments and feel free to discuss with me. thanks.
Add memory layout and register address for mtk mt8186 Cache I-Cache: 64KB, 4-way Associativity D-Cache: 128KB, 4-way Associativity External Memory DRAM: DSP can access DRAM shared with CPU L2TCM: 512KB DSP SRAM POOL Currently, use phy addr:0x60000000, size:0x1000000 dma phy addr: 0x61000000, size: 0x0100000 Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Add interrupt, timer, and ipc drivers for mt8186 mt8186 DSP has 32 interrupts. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
|
@kkarask can you check CI, as this PR is for MTK platform only and should not fail Intel tests. Thanks ! |
lgirdwood
left a comment
There was a problem hiding this comment.
We need to keep the notifier UUID unchanged.
@marc-hb Thanks for providing information. @lgirdwood has already helped to merge mt8195 qemu patch thesofproject/qemu@b85c079. but I am not sure how to add mt8195 to thesofproject/sofqemu (it looks like here https://hub.docker.com/r/thesofproject/sofqemu/tags )and still anything to do except add platform information to pull-request.yml. Besides, may I need to add docker_build like |
mt8186 platform integrates a single-core HIFI5 DSP. The DSP operates at different highest clock frequencies with corresponding voltage, 800MHz(0.8v)/400MHz(0.7v)/300MHz(0.65v)/26MHz(0.6v). The DSP core and DMA in DSP subsys both can access DRAM directly. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Add default config for mt8186 platform. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Add CMakefile for mtk mt8186 platform to build. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Add mt8186 to Kconfig Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Hi,
I'm a chromebook project developer at Mediatek and working on SOF FW on mt8186.
The other co-worker is Allen Cheng (KuanHsun Cheng).
There are some drivers and platform codes we have been verified on mt8186 EVB.
We want to add mt8186 platform support in sof project.
mt8186: Cadence HiFi-5 DSP, single core, 4 dais , 4 dmas and 48k 16 bits.
Similar to mt8195 except changing the DSP core version.
Please let me know if there is any questions.
Thanks.