rimage: Add support for mt8195

Add mt8195.toml to support sof-mt8195.ri binary build.
Add mt8195 memory layout
Add mt8195 machine_id

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
This commit is contained in:
Allen-kh Cheng 2021-08-26 19:28:16 +08:00 committed by Liam Girdwood
parent aea1969225
commit 9bf46d3fe2
3 changed files with 43 additions and 0 deletions

16
config/mt8195.toml Normal file
View File

@ -0,0 +1,16 @@
version = [1, 0] # use simple file write
[adsp]
name = "mt8195"
machine_id = 15
[[adsp.mem_zone]]
type = "IRAM"
base = "0x40000000"
size = "0x00040000"
host_offset = "0x0"
[[adsp.mem_zone]]
type = "SRAM"
base = "0x60000000"
size = "0x00600000"
host_offset = "0x0"

View File

@ -48,6 +48,13 @@
#define IMX8M_SRAM_BASE 0x92400000
#define IMX8M_SRAM_SIZE 0x800000
#define MT8195_IRAM_BASE 0x40000000
#define MT8195_IRAM_HOST_OFFSET 0x00000
#define MT8195_IRAM_SIZE 0x4000
#define MT8195_SRAM_BASE 0x60000000
#define MT8195_SRAM_SIZE 0x600000
#define MT8195_SRAM_HOST_OFFSET 0x00000
static int get_mem_zone_type(struct image *image, Elf32_Shdr *section)
{
const struct adsp *adsp = image->adsp;
@ -532,3 +539,22 @@ const struct adsp machine_imx8m = {
.machine_id = MACHINE_IMX8M,
.write_firmware = simple_write_firmware,
};
const struct adsp machine_mt8195= {
.name = "mt8195",
.mem_zones = {
[SOF_FW_BLK_TYPE_IRAM] = {
.base = MT8195_IRAM_BASE,
.size = MT8195_IRAM_SIZE,
.host_offset = MT8195_IRAM_HOST_OFFSET,
},
[SOF_FW_BLK_TYPE_SRAM] = {
.base = MT8195_SRAM_BASE,
.size = MT8195_SRAM_SIZE,
.host_offset = MT8195_SRAM_HOST_OFFSET,
},
},
.machine_id = MACHINE_MT8195,
.write_firmware = simple_write_firmware,
};

View File

@ -41,6 +41,7 @@ enum machine_id {
MACHINE_IMX8,
MACHINE_IMX8X,
MACHINE_IMX8M,
MACHINE_MT8195,
MACHINE_MAX
};