Skip to content

Conversation

andrew-mtk
Copy link
Contributor

Add Zephyr support for Mediatek MT8365 platform. This MR depends on zephyrproject-rtos/hal_xtensa#36, so west.yml has to be updated accordingly.


/dts-v1/;
/ {

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 81 to 83

chosen { };
aliases { };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
chosen { };
aliases { };

Comment on lines 6 to 7
help
Board with Mediatek MT8365 Audio DSP
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
help
Board with Mediatek MT8365 Audio DSP


config NUM_2ND_LEVEL_AGGREGATORS
default 1
config 2ND_LVL_INTR_00_OFFSET
Copy link
Contributor

Choose a reason for hiding this comment

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

missing newline gap line 8

# SPDX-License-Identifier: Apache-2.0

if SOC_SERIES_MT8365

Copy link
Contributor

Choose a reason for hiding this comment

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

this PR is not properly structured, this commit adds soc files and 1 board file, fix it so there is 1 commit adding the soc files, 1 commit adding the board files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nordicjm , could you review my updated changes?

andyross
andyross previously approved these changes Oct 1, 2025
if ((*irq_inout & 0xff) == 1) {
*irq_inout = (*irq_inout >> 8) - 1;
}
return DEVICE_DT_GET(DT_INST(0, mediatek_adsp_intc));
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a fault of this PR, but the hackery in this file (which really is a wart in Zephyr, we lack a generic IRQ routine generator even though DTS gives us all the information needed to generate it) is getting a little ugly. Probably time to start thinking about a rework.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andyross , could you re-approve this PR after I made a few changes?

soc/mediatek/adsp: Add IRQ support for MT8365

Add IRQ handing support for MT8365 second level interrupt controller

Signed-off-by: Andrew Perepech <[email protected]>

soc/mediatek/adsp: Add IPI driver for MT8365

Add IPI driver for MT8365.

Signed-off-by: Andrew Perepech <[email protected]>

soc/mediatek/adsp: Update MPU config to support MT8365

Update MPU config to support MT8365. On this platform
SRAM0 is mapped to a physical DRAM region that contains
exceptions and vectors. SRAM1 is a physical SRAM that
contains heap.

Signed-off-by: Andrew Perepech <[email protected]>

soc/mediatek/adsp: Add soc.h and linker.ld for MT8365

Add header file and linker script for MT8365 platform

Signed-off-by: Andrew Perepech <[email protected]>

soc/mediatek/adsp: Add Kconfig for MT8365

Add Kconfig for MT8365 platform

Signed-off-by: Andrew Perepech <[email protected]>

soc/mediatek/adsp: Add CMake support for MT8365

Add CMake support for MT8365 platform

Signed-off-by: Andrew Perepech <[email protected]>

soc/mediatek/adsp: Update gen_img.py to support MT8365

Update gen_img.py to support MT8365 platform

Signed-off-by: Andrew Perepech <[email protected]>
Add changes to the timer driver to support MT8365 platform

Signed-off-by: Andrew Perepech <[email protected]>
boards/mediatek: Add MT8365 device tree

Add device tree for MT8365 platform

Signed-off-by: Andrew Perepech <[email protected]>

boards/mediatek: Add Kconfig for MT8365 board

Add Kconfig file for MT8365 board.

Signed-off-by: Andrew Perepech <[email protected]>

boards/mediatek: Add Mediatek MT8365 audio DSP

Add Mediatek MT8365 audio DSP

Signed-off-by: Andrew Perepech <[email protected]>

boards/mediatek: Add board config for MT8365

Add config for MT8365 platform to be build outside of SOF
environment and run by twister

Signed-off-by: Andrew Perepech <[email protected]>
nordicjm
nordicjm previously approved these changes Oct 10, 2025
@andrew-mtk andrew-mtk requested a review from andyross October 10, 2025 16:20
Copy link
Contributor

@kartben kartben left a comment

Choose a reason for hiding this comment

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

This is missing a documentation page

Add documentation for MT8365 platform. Update supported boards list.
Update toolchains list supported in the Zephyr SDK.

Signed-off-by: Andrew Perepech <[email protected]>
@andrew-mtk
Copy link
Contributor Author

@kartben, I have updated documentation and added info about MT8365

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants