zephyr/soc/mediatek/mt8xxx/soc.h
Andy Ross 5364783ba1 soc: boards: Add Mediatek MT8186 and MT8188 audio DSPs
These are very similar devices to mt8195, minimal changes needed
beyond boilerplate configuration.

In the process, this reworks the board/soc layout to be HWMv2
compliant, with "adsp" becoming a CPU cluster beneath the SOC.  So the
name of the boards to west become e.g. "mt8195/mt8195/adsp" (which can
be shortened to "mt8195//adsp" if desired).

Note that the cpuclk driver is not yet ported, it works only with 8195
(the clocking/power architecture seems similar between the parts, but
the graph of wells and clocks is different and historically these have
been three separate drivers in SOF).  The biggest changes are in the
image/loader scripts, which needed some rework for cross-device
portability.

Signed-off-by: Andy Ross <andyross@google.com>
2024-11-28 20:51:50 +01:00

29 lines
833 B
C

/* Copyright 2023 The ChromiumOS Authors
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_SOC_MTK_SOC_H
#define ZEPHYR_SOC_MTK_SOC_H
#include <zephyr/device.h>
void mtk_adsp_cpu_freq_init(void);
void mtk_adsp_set_cpu_freq(int mhz);
/* Mailbox Driver: */
/* Hardware defines multiple "channel" bits that can be independently
* signaled and cleared. An interrupt is latched if any bits are
* set.
*/
#define MTK_ADSP_MBOX_CHANNELS 5
typedef void (*mtk_adsp_mbox_handler_t)(const struct device *mbox, void *arg);
void mtk_adsp_mbox_set_handler(const struct device *mbox, uint32_t chan,
mtk_adsp_mbox_handler_t handler, void *arg);
/* Signal an interrupt on the specified channel for the other side */
void mtk_adsp_mbox_signal(const struct device *mbox, uint32_t chan);
#endif /* ZEPHYR_SOC_MTK_SOC_H */