Skip to content

Commit 5ea617e

Browse files
Jason-JH LinAngeloGioacchino Del Regno
authored andcommitted
mailbox: mtk-cmdq: Add driver data to support for MT8196
MT8196 has 2 new hardware configuration compared with the previous SoC, which correspond to the 2 new driver data: 1. mminfra_offset: For GCE data path control Since GCE has been moved into mminfra, GCE needs to append the mminfra offset to the DRAM address when accessing the DRAM. 2. gce_vm: For GCE hardware virtualization control Currently, the first version of the mt8196 mailbox controller only requires setting the VM-related registers to enable the permissions of a host VM. Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
1 parent 1c18748 commit 5ea617e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/mailbox/mtk-cmdq-mailbox.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/module.h>
1515
#include <linux/platform_device.h>
1616
#include <linux/pm_runtime.h>
17+
#include <linux/sizes.h>
1718
#include <linux/mailbox_controller.h>
1819
#include <linux/mailbox/mtk-cmdq-mailbox.h>
1920
#include <linux/of.h>
@@ -840,6 +841,16 @@ static const struct gce_plat gce_plat_mt8195 = {
840841
.gce_num = 2
841842
};
842843

844+
static const struct gce_plat gce_plat_mt8196 = {
845+
.thread_nr = 32,
846+
.shift = 3,
847+
.mminfra_offset = SZ_2G,
848+
.control_by_sw = true,
849+
.sw_ddr_en = true,
850+
.gce_vm = true,
851+
.gce_num = 2
852+
};
853+
843854
static const struct of_device_id cmdq_of_ids[] = {
844855
{.compatible = "mediatek,mt6779-gce", .data = (void *)&gce_plat_mt6779},
845856
{.compatible = "mediatek,mt8173-gce", .data = (void *)&gce_plat_mt8173},
@@ -848,6 +859,7 @@ static const struct of_device_id cmdq_of_ids[] = {
848859
{.compatible = "mediatek,mt8188-gce", .data = (void *)&gce_plat_mt8188},
849860
{.compatible = "mediatek,mt8192-gce", .data = (void *)&gce_plat_mt8192},
850861
{.compatible = "mediatek,mt8195-gce", .data = (void *)&gce_plat_mt8195},
862+
{.compatible = "mediatek,mt8196-gce", .data = (void *)&gce_plat_mt8196},
851863
{}
852864
};
853865
MODULE_DEVICE_TABLE(of, cmdq_of_ids);

0 commit comments

Comments
 (0)