diff mbox series

[v4,6/7] remoteproc: mtk-apu: Add support of MT8365

Message ID 20220304161514.994128-7-abailon@baylibre.com (mailing list archive)
State New, archived
Headers show
Series Add support of mt8183 APU | expand

Commit Message

Alexandre Bailon March 4, 2022, 4:15 p.m. UTC
From: Julien STEPHAN <jstephan@baylibre.com>

This adds support of APU available in the MT8365.

Signed-off-by: Julien STEPHAN <jstephan@baylibre.com>
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
---
 drivers/remoteproc/mtk_apu.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Bjorn Andersson March 14, 2022, 10:28 p.m. UTC | #1
On Fri 04 Mar 10:15 CST 2022, Alexandre Bailon wrote:

> From: Julien STEPHAN <jstephan@baylibre.com>
> 
> This adds support of APU available in the MT8365.
> 
> Signed-off-by: Julien STEPHAN <jstephan@baylibre.com>
> Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
> ---
>  drivers/remoteproc/mtk_apu.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/remoteproc/mtk_apu.c b/drivers/remoteproc/mtk_apu.c
> index deec51b86ba5..57dd73c63d3f 100644
> --- a/drivers/remoteproc/mtk_apu.c
> +++ b/drivers/remoteproc/mtk_apu.c
> @@ -96,6 +96,24 @@ static const struct mtk_apu_conf mt8183_conf = {
>  	.clk_names = mt8183_clk_names
>  };
>  
> +static const char * const mt8365_clk_names[] = {
> +	"if_ck",
> +	"edma",
> +	"ahb",
> +	"axi",
> +	"ipu",
> +	"jtag",
> +	"smi_cam",
> +	"ifr_apu_axi",
> +};
> +
> +static const struct mtk_apu_conf mt8365_conf = {
> +	.core_default0 = BIT(26) | BIT(20),
> +	.core_default1 = BIT(3) | BIT(7),

Would it be possible to get some defines for these bits as well?

Thanks,
Bjorn

> +	.num_clks = ARRAY_SIZE(mt8365_clk_names),
> +	.clk_names = mt8365_clk_names
> +};
> +
>  static int mtk_apu_iommu_map(struct rproc *rproc, struct rproc_mem_entry *entry)
>  {
>  	struct mtk_apu_rproc *apu_rproc = rproc->priv;
> @@ -633,6 +651,7 @@ static int mtk_apu_rproc_remove(struct platform_device *pdev)
>  
>  static const struct of_device_id mtk_apu_rproc_of_match[] = {
>  	{ .compatible = "mediatek,mt8183-apu", .data = &mt8183_conf },
> +	{ .compatible = "mediatek,mt8365-apu", .data = &mt8365_conf },
>  	{ /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, mtk_apu_rproc_of_match);
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/remoteproc/mtk_apu.c b/drivers/remoteproc/mtk_apu.c
index deec51b86ba5..57dd73c63d3f 100644
--- a/drivers/remoteproc/mtk_apu.c
+++ b/drivers/remoteproc/mtk_apu.c
@@ -96,6 +96,24 @@  static const struct mtk_apu_conf mt8183_conf = {
 	.clk_names = mt8183_clk_names
 };
 
+static const char * const mt8365_clk_names[] = {
+	"if_ck",
+	"edma",
+	"ahb",
+	"axi",
+	"ipu",
+	"jtag",
+	"smi_cam",
+	"ifr_apu_axi",
+};
+
+static const struct mtk_apu_conf mt8365_conf = {
+	.core_default0 = BIT(26) | BIT(20),
+	.core_default1 = BIT(3) | BIT(7),
+	.num_clks = ARRAY_SIZE(mt8365_clk_names),
+	.clk_names = mt8365_clk_names
+};
+
 static int mtk_apu_iommu_map(struct rproc *rproc, struct rproc_mem_entry *entry)
 {
 	struct mtk_apu_rproc *apu_rproc = rproc->priv;
@@ -633,6 +651,7 @@  static int mtk_apu_rproc_remove(struct platform_device *pdev)
 
 static const struct of_device_id mtk_apu_rproc_of_match[] = {
 	{ .compatible = "mediatek,mt8183-apu", .data = &mt8183_conf },
+	{ .compatible = "mediatek,mt8365-apu", .data = &mt8365_conf },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, mtk_apu_rproc_of_match);