Skip to content

Commit 5364783

Browse files
andyrosskartben
authored andcommitted
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 <[email protected]>
1 parent cdd4cbc commit 5364783

39 files changed

+709
-322
lines changed

boards/mediatek/mt8186/Kconfig.mt8186

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2024 The ChromiumOS Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MT8186
5+
select SOC_MT8186

boards/mediatek/mt8186/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
boards:
2+
- name: mt8186
3+
vendor: mediatek
4+
socs:
5+
- name: mt8186
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/* Copyright 2024 The ChromiumOS Authors
2+
* SPDX-License-Identifier: Apache-2.0
3+
*/
4+
#include <mem.h>
5+
6+
/dts-v1/;
7+
/ {
8+
#address-cells = <1>;
9+
#size-cells = <1>;
10+
11+
sram0: memory@4e100000 {
12+
device_type = "memory";
13+
compatible = "mmio-sram";
14+
reg = <0x4e100000 DT_SIZE_K(1024)>;
15+
};
16+
17+
dram0: memory@60000000 {
18+
device_type = "memory";
19+
compatible = "mmio-sram";
20+
reg = <0x60000000 DT_SIZE_M(16)>;
21+
};
22+
23+
dram1: memory@61000000 {
24+
device_type = "memory";
25+
compatible = "mmio-sram";
26+
reg = <0x61000000 DT_SIZE_K(1024)>;
27+
};
28+
29+
soc {
30+
#address-cells = <1>;
31+
#size-cells = <1>;
32+
33+
core_intc: core_intc@0 {
34+
compatible = "cdns,xtensa-core-intc";
35+
reg = <0 4>;
36+
interrupt-controller;
37+
#interrupt-cells = <3>;
38+
};
39+
40+
intc2: intc@10680010 {
41+
compatible = "mediatek,adsp_intc";
42+
interrupt-controller;
43+
#interrupt-cells = <3>;
44+
reg = <0x10680010 4>;
45+
status-reg = <0x10680050>;
46+
interrupts = <2 0 0>;
47+
mask = <0x3f>;
48+
interrupt-parent = <&core_intc>;
49+
};
50+
51+
ostimer64: ostimer64@10683080 {
52+
compatible = "mediatek,ostimer64";
53+
reg = <0x10683080 28>;
54+
};
55+
56+
ostimer0: ostimer@10683000 {
57+
compatible = "mediatek,ostimer";
58+
reg = <0x10683000 16>;
59+
interrupt-parent = <&core_intc>;
60+
interrupts = <18 0 0>;
61+
};
62+
63+
mbox0: mbox@10686100 {
64+
compatible = "mediatek,mbox";
65+
reg = <0x10686100 16>;
66+
interrupt-parent = <&intc2>;
67+
interrupts = <1 0 0>;
68+
};
69+
70+
mbox1: mbox@10687100 {
71+
compatible = "mediatek,mbox";
72+
reg = <0x10687100 16>;
73+
interrupt-parent = <&intc2>;
74+
interrupts = <2 0 0>;
75+
};
76+
}; /* soc */
77+
78+
chosen { };
79+
aliases { };
80+
};

boards/mediatek/mt8188/Kconfig.mt8188

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2024 The ChromiumOS Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MT8188
5+
select SOC_MT8188

boards/mediatek/mt8188/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
boards:
2+
- name: mt8188
3+
vendor: mediatek
4+
socs:
5+
- name: mt8188
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/* Copyright 2024 The ChromiumOS Authors
2+
* SPDX-License-Identifier: Apache-2.0
3+
*/
4+
#include <mem.h>
5+
6+
/dts-v1/;
7+
/ {
8+
9+
#address-cells = <1>;
10+
#size-cells = <1>;
11+
12+
sram0: memory@4e100000 {
13+
device_type = "memory";
14+
compatible = "mmio-sram";
15+
reg = <0x4e100000 DT_SIZE_K(512)>;
16+
};
17+
18+
dram0: memory@60000000 {
19+
device_type = "memory";
20+
compatible = "mmio-sram";
21+
reg = <0x60000000 DT_SIZE_M(15)>;
22+
};
23+
24+
dram1: memory@61000000 {
25+
device_type = "memory";
26+
compatible = "mmio-sram";
27+
reg = <0x61000000 DT_SIZE_K(1024)>;
28+
};
29+
30+
soc {
31+
#address-cells = <1>;
32+
#size-cells = <1>;
33+
34+
core_intc: core_intc@0 {
35+
compatible = "cdns,xtensa-core-intc";
36+
reg = <0 4>;
37+
interrupt-controller;
38+
#interrupt-cells = <3>;
39+
};
40+
41+
intc2: intc@10b80010 {
42+
compatible = "mediatek,adsp_intc";
43+
interrupt-controller;
44+
#interrupt-cells = <3>;
45+
reg = <0x10b80010 4>;
46+
status-reg = <0x10b80050>;
47+
interrupts = <2 0 0>;
48+
mask = <0x3f>;
49+
interrupt-parent = <&core_intc>;
50+
};
51+
52+
ostimer64: ostimer64@10b83080 {
53+
compatible = "mediatek,ostimer64";
54+
reg = <0x10b83080 28>;
55+
};
56+
57+
ostimer0: ostimer@10b83000 {
58+
compatible = "mediatek,ostimer";
59+
reg = <0x10b83000 16>;
60+
interrupt-parent = <&core_intc>;
61+
interrupts = <18 0 0>;
62+
};
63+
64+
mbox0: mbox@10b86100 {
65+
compatible = "mediatek,mbox";
66+
reg = <0x10b86100 16>;
67+
interrupt-parent = <&intc2>;
68+
interrupts = <1 0 0>;
69+
};
70+
71+
mbox1: mbox@10b87100 {
72+
compatible = "mediatek,mbox";
73+
reg = <0x10b87100 16>;
74+
interrupt-parent = <&intc2>;
75+
interrupts = <2 0 0>;
76+
};
77+
}; /* soc */
78+
79+
chosen { };
80+
aliases { };
81+
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2023 The ChromiumOS Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
config BOARD_MT8195_ADSP
5-
select SOC_MT8195_ADSP
4+
config BOARD_MT8195
5+
select SOC_MT8195
66
help
77
Board with Mediatek MT8195 Audio DSP
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
boards:
2-
- name: mt8195_adsp
2+
- name: mt8195
33
full_name: MT8195 ADSP
44
vendor: mediatek
55
socs:
6-
- name: mt8195_adsp
6+
- name: mt8195
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* Copyright 2023 The ChromiumOS Authors
2+
* SPDX-License-Identifier: Apache-2.0
3+
*/
4+
#include <mem.h>
5+
6+
/dts-v1/;
7+
/ {
8+
9+
#address-cells = <1>;
10+
#size-cells = <1>;
11+
12+
sram0: memory@40000000 {
13+
device_type = "memory";
14+
compatible = "mmio-sram";
15+
reg = <0x40000000 DT_SIZE_K(256)>;
16+
};
17+
18+
dram0: memory@60000000 {
19+
device_type = "memory";
20+
compatible = "mmio-sram";
21+
reg = <0x60000000 DT_SIZE_M(17)>;
22+
};
23+
24+
soc {
25+
#address-cells = <1>;
26+
#size-cells = <1>;
27+
28+
cpuclk: cpuclk@10000000 {
29+
compatible = "mediatek,mt8195_cpuclk";
30+
reg = <0x10000000 380>;
31+
cg_reg = <0x10720180>;
32+
pll_ctrl_reg = <0x1000c7e0>;
33+
freqs_mhz = <26 370 540 720>;
34+
};
35+
36+
core_intc: core_intc@0 {
37+
compatible = "cdns,xtensa-core-intc";
38+
reg = <0 4>;
39+
interrupt-controller;
40+
#interrupt-cells = <3>;
41+
};
42+
43+
intc1: intc@10680130 {
44+
compatible = "mediatek,adsp_intc";
45+
interrupt-controller;
46+
#interrupt-cells = <3>;
47+
reg = <0x10680130 4>;
48+
status-reg = <0x10680150>;
49+
interrupts = <1 0 0>;
50+
mask = <0x3ffffff0>;
51+
interrupt-parent = <&core_intc>;
52+
};
53+
54+
intc23: intc@108030f4 {
55+
compatible = "mediatek,adsp_intc";
56+
interrupt-controller;
57+
#interrupt-cells = <3>;
58+
reg = <0x108030f4 4>;
59+
status-reg = <0x108030fc>;
60+
interrupts = <23 0 0>;
61+
mask = <0xffff>;
62+
interrupt-parent = <&core_intc>;
63+
};
64+
65+
ostimer64: ostimer64@1080d080 {
66+
compatible = "mediatek,ostimer64";
67+
reg = <0x1080d080 28>;
68+
};
69+
70+
ostimer0: ostimer@1080d000 {
71+
compatible = "mediatek,ostimer";
72+
reg = <0x1080d000 16>;
73+
interrupt-parent = <&intc23>;
74+
interrupts = <11 0 0>;
75+
};
76+
77+
mbox0: mbox@10816000 {
78+
compatible = "mediatek,mbox";
79+
reg = <0x10816000 56>;
80+
interrupt-parent = <&intc23>;
81+
interrupts = <0 0 0>;
82+
};
83+
84+
mbox1: mbox@10817000 {
85+
compatible = "mediatek,mbox";
86+
reg = <0x10817000 56>;
87+
interrupt-parent = <&intc23>;
88+
interrupts = <1 0 0>;
89+
};
90+
}; /* soc */
91+
92+
chosen { };
93+
aliases { };
94+
};

boards/mediatek/mt8195_adsp/Kconfig.defconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)