2020-03-26 01:31:21 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 MediaTek Inc.
|
|
|
|
* Author: James Liao <jamesjj.liao@mediatek.com>
|
|
|
|
*/
|
|
|
|
|
2021-09-30 16:31:49 +08:00
|
|
|
#include <linux/delay.h>
|
2020-03-26 01:31:22 +08:00
|
|
|
#include <linux/device.h>
|
2020-10-07 03:33:17 +08:00
|
|
|
#include <linux/io.h>
|
2020-03-26 01:31:21 +08:00
|
|
|
#include <linux/of_device.h>
|
|
|
|
#include <linux/platform_device.h>
|
2021-09-30 16:31:49 +08:00
|
|
|
#include <linux/reset-controller.h>
|
2020-03-26 01:31:22 +08:00
|
|
|
#include <linux/soc/mediatek/mtk-mmsys.h>
|
|
|
|
|
2021-03-18 02:17:10 +08:00
|
|
|
#include "mtk-mmsys.h"
|
2021-04-06 04:03:53 +08:00
|
|
|
#include "mt8167-mmsys.h"
|
2021-03-30 19:04:23 +08:00
|
|
|
#include "mt8183-mmsys.h"
|
2022-02-22 13:28:01 +08:00
|
|
|
#include "mt8186-mmsys.h"
|
2021-08-02 16:59:33 +08:00
|
|
|
#include "mt8192-mmsys.h"
|
2022-04-19 17:41:36 +08:00
|
|
|
#include "mt8195-mmsys.h"
|
2021-05-20 00:18:46 +08:00
|
|
|
#include "mt8365-mmsys.h"
|
2020-03-26 01:31:21 +08:00
|
|
|
|
2020-04-02 04:17:35 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt2701-mm",
|
2021-03-18 02:17:10 +08:00
|
|
|
.routes = mmsys_default_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
|
2020-04-02 04:17:35 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt2701_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt2701_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-04-02 04:17:34 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt2712-mm",
|
2021-03-18 02:17:10 +08:00
|
|
|
.routes = mmsys_default_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
|
2020-04-02 04:17:34 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt2712_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt2712_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-05-18 19:31:55 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt6779_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt6779-mm",
|
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt6779_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt6779_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-05-18 19:31:54 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt6797-mm",
|
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt6797_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt6797_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-04-06 04:03:53 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt8167_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt8167-mm",
|
|
|
|
.routes = mt8167_mmsys_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mt8167_mmsys_routing_table),
|
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt8167_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8167_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-03-26 01:31:21 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt8173-mm",
|
2021-03-18 02:17:10 +08:00
|
|
|
.routes = mmsys_default_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
|
2022-02-17 16:26:25 +08:00
|
|
|
.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
|
2020-03-26 01:31:21 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt8173_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8173_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-05-18 19:31:53 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt8183-mm",
|
2021-03-30 19:04:23 +08:00
|
|
|
.routes = mmsys_mt8183_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_mt8183_routing_table),
|
2022-02-17 16:26:25 +08:00
|
|
|
.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
|
2020-05-18 19:31:53 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt8183_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8183_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2022-02-22 13:28:01 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt8186_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt8186-mm",
|
|
|
|
.routes = mmsys_mt8186_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_mt8186_routing_table),
|
2022-02-17 16:26:26 +08:00
|
|
|
.sw0_rst_offset = MT8186_MMSYS_SW0_RST_B,
|
2022-02-22 13:28:01 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt8186_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8186_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-08-02 16:59:33 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt8192-mm",
|
|
|
|
.routes = mmsys_mt8192_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_mt8192_routing_table),
|
2022-03-23 17:19:32 +08:00
|
|
|
.sw0_rst_offset = MT8186_MMSYS_SW0_RST_B,
|
2021-08-02 16:59:33 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt8192_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8192_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct mtk_mmsys_driver_data mt8195_vdosys0_driver_data = {
|
|
|
|
.io_start = 0x1c01a000,
|
|
|
|
.clk_driver = "clk-mt8195-vdo0",
|
|
|
|
.routes = mmsys_mt8195_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mmsys_mt8195_routing_table),
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct mtk_mmsys_driver_data mt8195_vdosys1_driver_data = {
|
|
|
|
.io_start = 0x1c100000,
|
|
|
|
.clk_driver = "clk-mt8195-vdo1",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct mtk_mmsys_match_data mt8195_mmsys_match_data = {
|
|
|
|
.num_drv_data = 2,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8195_vdosys0_driver_data,
|
|
|
|
&mt8195_vdosys1_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-05-20 00:18:46 +08:00
|
|
|
static const struct mtk_mmsys_driver_data mt8365_mmsys_driver_data = {
|
|
|
|
.clk_driver = "clk-mt8365-mm",
|
|
|
|
.routes = mt8365_mmsys_routing_table,
|
|
|
|
.num_routes = ARRAY_SIZE(mt8365_mmsys_routing_table),
|
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static const struct mtk_mmsys_match_data mt8365_mmsys_match_data = {
|
|
|
|
.num_drv_data = 1,
|
|
|
|
.drv_data = {
|
|
|
|
&mt8365_mmsys_driver_data,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2021-03-18 02:17:09 +08:00
|
|
|
struct mtk_mmsys {
|
|
|
|
void __iomem *regs;
|
|
|
|
const struct mtk_mmsys_driver_data *data;
|
2021-09-30 16:31:49 +08:00
|
|
|
spinlock_t lock; /* protects mmsys_sw_rst_b reg */
|
|
|
|
struct reset_controller_dev rcdev;
|
2022-04-19 17:41:36 +08:00
|
|
|
phys_addr_t io_start;
|
2021-03-18 02:17:09 +08:00
|
|
|
};
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
static int mtk_mmsys_find_match_drvdata(struct mtk_mmsys *mmsys,
|
|
|
|
const struct mtk_mmsys_match_data *match)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < match->num_drv_data; i++)
|
|
|
|
if (mmsys->io_start == match->drv_data[i]->io_start)
|
|
|
|
return i;
|
|
|
|
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
2020-03-26 01:31:22 +08:00
|
|
|
void mtk_mmsys_ddp_connect(struct device *dev,
|
|
|
|
enum mtk_ddp_comp_id cur,
|
|
|
|
enum mtk_ddp_comp_id next)
|
|
|
|
{
|
2021-03-18 02:17:09 +08:00
|
|
|
struct mtk_mmsys *mmsys = dev_get_drvdata(dev);
|
2021-03-18 02:17:10 +08:00
|
|
|
const struct mtk_mmsys_routes *routes = mmsys->data->routes;
|
|
|
|
u32 reg;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < mmsys->data->num_routes; i++)
|
|
|
|
if (cur == routes[i].from_comp && next == routes[i].to_comp) {
|
2021-07-29 15:05:49 +08:00
|
|
|
reg = readl_relaxed(mmsys->regs + routes[i].addr);
|
|
|
|
reg &= ~routes[i].mask;
|
|
|
|
reg |= routes[i].val;
|
2021-03-18 02:17:10 +08:00
|
|
|
writel_relaxed(reg, mmsys->regs + routes[i].addr);
|
|
|
|
}
|
2020-03-26 01:31:22 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_connect);
|
|
|
|
|
|
|
|
void mtk_mmsys_ddp_disconnect(struct device *dev,
|
|
|
|
enum mtk_ddp_comp_id cur,
|
|
|
|
enum mtk_ddp_comp_id next)
|
|
|
|
{
|
2021-03-18 02:17:09 +08:00
|
|
|
struct mtk_mmsys *mmsys = dev_get_drvdata(dev);
|
2021-03-18 02:17:10 +08:00
|
|
|
const struct mtk_mmsys_routes *routes = mmsys->data->routes;
|
|
|
|
u32 reg;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < mmsys->data->num_routes; i++)
|
|
|
|
if (cur == routes[i].from_comp && next == routes[i].to_comp) {
|
2021-07-29 15:05:49 +08:00
|
|
|
reg = readl_relaxed(mmsys->regs + routes[i].addr);
|
|
|
|
reg &= ~routes[i].mask;
|
2021-03-18 02:17:10 +08:00
|
|
|
writel_relaxed(reg, mmsys->regs + routes[i].addr);
|
|
|
|
}
|
2020-03-26 01:31:22 +08:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_disconnect);
|
|
|
|
|
2022-09-14 21:21:00 +08:00
|
|
|
static void mtk_mmsys_update_bits(struct mtk_mmsys *mmsys, u32 offset, u32 mask, u32 val)
|
|
|
|
{
|
|
|
|
u32 tmp;
|
|
|
|
|
|
|
|
tmp = readl_relaxed(mmsys->regs + offset);
|
|
|
|
tmp = (tmp & ~mask) | val;
|
|
|
|
writel_relaxed(tmp, mmsys->regs + offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void mtk_mmsys_ddp_dpi_fmt_config(struct device *dev, u32 val)
|
|
|
|
{
|
|
|
|
if (val)
|
|
|
|
mtk_mmsys_update_bits(dev_get_drvdata(dev), MT8186_MMSYS_DPI_OUTPUT_FORMAT,
|
|
|
|
DPI_RGB888_DDR_CON, DPI_FORMAT_MASK);
|
|
|
|
else
|
|
|
|
mtk_mmsys_update_bits(dev_get_drvdata(dev), MT8186_MMSYS_DPI_OUTPUT_FORMAT,
|
|
|
|
DPI_RGB565_SDR_CON, DPI_FORMAT_MASK);
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_dpi_fmt_config);
|
|
|
|
|
2021-09-30 16:31:49 +08:00
|
|
|
static int mtk_mmsys_reset_update(struct reset_controller_dev *rcdev, unsigned long id,
|
|
|
|
bool assert)
|
|
|
|
{
|
|
|
|
struct mtk_mmsys *mmsys = container_of(rcdev, struct mtk_mmsys, rcdev);
|
|
|
|
unsigned long flags;
|
|
|
|
u32 reg;
|
|
|
|
|
|
|
|
spin_lock_irqsave(&mmsys->lock, flags);
|
|
|
|
|
2022-02-17 16:26:25 +08:00
|
|
|
reg = readl_relaxed(mmsys->regs + mmsys->data->sw0_rst_offset);
|
2021-09-30 16:31:49 +08:00
|
|
|
|
|
|
|
if (assert)
|
|
|
|
reg &= ~BIT(id);
|
|
|
|
else
|
|
|
|
reg |= BIT(id);
|
|
|
|
|
2022-02-17 16:26:25 +08:00
|
|
|
writel_relaxed(reg, mmsys->regs + mmsys->data->sw0_rst_offset);
|
2021-09-30 16:31:49 +08:00
|
|
|
|
|
|
|
spin_unlock_irqrestore(&mmsys->lock, flags);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mtk_mmsys_reset_assert(struct reset_controller_dev *rcdev, unsigned long id)
|
|
|
|
{
|
|
|
|
return mtk_mmsys_reset_update(rcdev, id, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mtk_mmsys_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
|
|
|
|
{
|
|
|
|
return mtk_mmsys_reset_update(rcdev, id, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mtk_mmsys_reset(struct reset_controller_dev *rcdev, unsigned long id)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = mtk_mmsys_reset_assert(rcdev, id);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
usleep_range(1000, 1100);
|
|
|
|
|
|
|
|
return mtk_mmsys_reset_deassert(rcdev, id);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct reset_control_ops mtk_mmsys_reset_ops = {
|
|
|
|
.assert = mtk_mmsys_reset_assert,
|
|
|
|
.deassert = mtk_mmsys_reset_deassert,
|
|
|
|
.reset = mtk_mmsys_reset,
|
|
|
|
};
|
|
|
|
|
2020-03-26 01:31:21 +08:00
|
|
|
static int mtk_mmsys_probe(struct platform_device *pdev)
|
|
|
|
{
|
2020-03-26 01:31:22 +08:00
|
|
|
struct device *dev = &pdev->dev;
|
2020-03-26 01:31:21 +08:00
|
|
|
struct platform_device *clks;
|
2020-03-26 01:31:23 +08:00
|
|
|
struct platform_device *drm;
|
2022-04-19 17:41:36 +08:00
|
|
|
const struct mtk_mmsys_match_data *match_data;
|
2021-03-18 02:17:09 +08:00
|
|
|
struct mtk_mmsys *mmsys;
|
2022-04-19 17:41:36 +08:00
|
|
|
struct resource *res;
|
2020-03-26 01:31:22 +08:00
|
|
|
int ret;
|
|
|
|
|
2021-03-18 02:17:09 +08:00
|
|
|
mmsys = devm_kzalloc(dev, sizeof(*mmsys), GFP_KERNEL);
|
|
|
|
if (!mmsys)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
mmsys->regs = devm_platform_ioremap_resource(pdev, 0);
|
|
|
|
if (IS_ERR(mmsys->regs)) {
|
|
|
|
ret = PTR_ERR(mmsys->regs);
|
2020-10-07 03:33:18 +08:00
|
|
|
dev_err(dev, "Failed to ioremap mmsys registers: %d\n", ret);
|
2020-03-26 01:31:22 +08:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-09-30 16:31:49 +08:00
|
|
|
spin_lock_init(&mmsys->lock);
|
|
|
|
|
|
|
|
mmsys->rcdev.owner = THIS_MODULE;
|
|
|
|
mmsys->rcdev.nr_resets = 32;
|
|
|
|
mmsys->rcdev.ops = &mtk_mmsys_reset_ops;
|
|
|
|
mmsys->rcdev.of_node = pdev->dev.of_node;
|
|
|
|
ret = devm_reset_controller_register(&pdev->dev, &mmsys->rcdev);
|
|
|
|
if (ret) {
|
|
|
|
dev_err(&pdev->dev, "Couldn't register mmsys reset controller: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2022-04-19 17:41:36 +08:00
|
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
|
if (!res) {
|
|
|
|
dev_err(dev, "Couldn't get mmsys resource\n");
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
mmsys->io_start = res->start;
|
|
|
|
|
|
|
|
match_data = of_device_get_match_data(dev);
|
|
|
|
if (match_data->num_drv_data > 1) {
|
|
|
|
/* This SoC has multiple mmsys channels */
|
|
|
|
ret = mtk_mmsys_find_match_drvdata(mmsys, match_data);
|
|
|
|
if (ret < 0) {
|
|
|
|
dev_err(dev, "Couldn't get match driver data\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
mmsys->data = match_data->drv_data[ret];
|
|
|
|
} else {
|
|
|
|
dev_dbg(dev, "Using single mmsys channel\n");
|
|
|
|
mmsys->data = match_data->drv_data[0];
|
|
|
|
}
|
|
|
|
|
2021-03-18 02:17:09 +08:00
|
|
|
platform_set_drvdata(pdev, mmsys);
|
2020-03-26 01:31:21 +08:00
|
|
|
|
2021-03-18 02:17:09 +08:00
|
|
|
clks = platform_device_register_data(&pdev->dev, mmsys->data->clk_driver,
|
2020-03-26 01:31:21 +08:00
|
|
|
PLATFORM_DEVID_AUTO, NULL, 0);
|
|
|
|
if (IS_ERR(clks))
|
|
|
|
return PTR_ERR(clks);
|
|
|
|
|
2020-03-26 01:31:23 +08:00
|
|
|
drm = platform_device_register_data(&pdev->dev, "mediatek-drm",
|
|
|
|
PLATFORM_DEVID_AUTO, NULL, 0);
|
2020-05-06 22:13:17 +08:00
|
|
|
if (IS_ERR(drm)) {
|
|
|
|
platform_device_unregister(clks);
|
2020-03-26 01:31:23 +08:00
|
|
|
return PTR_ERR(drm);
|
2020-05-06 22:13:17 +08:00
|
|
|
}
|
2020-03-26 01:31:23 +08:00
|
|
|
|
2020-03-26 01:31:21 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct of_device_id of_match_mtk_mmsys[] = {
|
2020-04-02 04:17:35 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt2701-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt2701_mmsys_match_data,
|
2020-04-02 04:17:35 +08:00
|
|
|
},
|
2020-04-02 04:17:34 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt2712-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt2712_mmsys_match_data,
|
2020-04-02 04:17:34 +08:00
|
|
|
},
|
2020-05-18 19:31:55 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt6779-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt6779_mmsys_match_data,
|
2020-05-18 19:31:55 +08:00
|
|
|
},
|
2020-05-18 19:31:54 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt6797-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt6797_mmsys_match_data,
|
2020-05-18 19:31:54 +08:00
|
|
|
},
|
2021-04-06 04:03:53 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8167-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt8167_mmsys_match_data,
|
2021-04-06 04:03:53 +08:00
|
|
|
},
|
2020-03-26 01:31:21 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8173-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt8173_mmsys_match_data,
|
2020-03-26 01:31:21 +08:00
|
|
|
},
|
2020-05-18 19:31:53 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8183-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt8183_mmsys_match_data,
|
2020-05-18 19:31:53 +08:00
|
|
|
},
|
2022-02-22 13:28:01 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8186-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt8186_mmsys_match_data,
|
2022-02-22 13:28:01 +08:00
|
|
|
},
|
2021-08-02 16:59:33 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8192-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt8192_mmsys_match_data,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8195-mmsys",
|
|
|
|
.data = &mt8195_mmsys_match_data,
|
2021-08-02 16:59:33 +08:00
|
|
|
},
|
2021-05-20 00:18:46 +08:00
|
|
|
{
|
|
|
|
.compatible = "mediatek,mt8365-mmsys",
|
2022-04-19 17:41:36 +08:00
|
|
|
.data = &mt8365_mmsys_match_data,
|
2021-05-20 00:18:46 +08:00
|
|
|
},
|
2020-03-26 01:31:21 +08:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_driver mtk_mmsys_drv = {
|
|
|
|
.driver = {
|
|
|
|
.name = "mtk-mmsys",
|
|
|
|
.of_match_table = of_match_mtk_mmsys,
|
|
|
|
},
|
|
|
|
.probe = mtk_mmsys_probe,
|
|
|
|
};
|
|
|
|
|
|
|
|
builtin_platform_driver(mtk_mmsys_drv);
|