All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-13 17:03 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-13 17:03 UTC (permalink / raw)
  To: matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel, AngeloGioacchino Del Regno

Add MM support for the MT6795 SoC, using the mmsys default routing
table.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---

In order for this patch to have any meaning and functionality, it is
required to also have in-tree the [1] MT6795 clocks series, even
though that's not required to actually compile this code.

[1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493

 drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index 06d8e83a2cb5..38b36b881a3b 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data mt6779_mmsys_match_data = {
 	},
 };
 
+static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data = {
+	.clk_driver = "clk-mt6795-mm",
+	.routes = mmsys_default_routing_table,
+	.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
+	.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
+};
+
 static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = {
 	.clk_driver = "clk-mt6797-mm",
 };
@@ -363,6 +370,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
 		.compatible = "mediatek,mt6779-mmsys",
 		.data = &mt6779_mmsys_match_data,
 	},
+	{
+		.compatible = "mediatek,mt6795-mmsys",
+		.data = &mt6795_mmsys_driver_data,
+	},
 	{
 		.compatible = "mediatek,mt6797-mmsys",
 		.data = &mt6797_mmsys_match_data,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-13 17:03 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-13 17:03 UTC (permalink / raw)
  To: matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel, AngeloGioacchino Del Regno

Add MM support for the MT6795 SoC, using the mmsys default routing
table.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---

In order for this patch to have any meaning and functionality, it is
required to also have in-tree the [1] MT6795 clocks series, even
though that's not required to actually compile this code.

[1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493

 drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index 06d8e83a2cb5..38b36b881a3b 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data mt6779_mmsys_match_data = {
 	},
 };
 
+static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data = {
+	.clk_driver = "clk-mt6795-mm",
+	.routes = mmsys_default_routing_table,
+	.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
+	.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
+};
+
 static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = {
 	.clk_driver = "clk-mt6797-mm",
 };
@@ -363,6 +370,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
 		.compatible = "mediatek,mt6779-mmsys",
 		.data = &mt6779_mmsys_match_data,
 	},
+	{
+		.compatible = "mediatek,mt6795-mmsys",
+		.data = &mt6795_mmsys_driver_data,
+	},
 	{
 		.compatible = "mediatek,mt6797-mmsys",
 		.data = &mt6797_mmsys_match_data,
-- 
2.35.1


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-13 17:03 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-13 17:03 UTC (permalink / raw)
  To: matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel, AngeloGioacchino Del Regno

Add MM support for the MT6795 SoC, using the mmsys default routing
table.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---

In order for this patch to have any meaning and functionality, it is
required to also have in-tree the [1] MT6795 clocks series, even
though that's not required to actually compile this code.

[1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493

 drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index 06d8e83a2cb5..38b36b881a3b 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data mt6779_mmsys_match_data = {
 	},
 };
 
+static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data = {
+	.clk_driver = "clk-mt6795-mm",
+	.routes = mmsys_default_routing_table,
+	.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
+	.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
+};
+
 static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = {
 	.clk_driver = "clk-mt6797-mm",
 };
@@ -363,6 +370,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
 		.compatible = "mediatek,mt6779-mmsys",
 		.data = &mt6779_mmsys_match_data,
 	},
+	{
+		.compatible = "mediatek,mt6795-mmsys",
+		.data = &mt6795_mmsys_driver_data,
+	},
 	{
 		.compatible = "mediatek,mt6797-mmsys",
 		.data = &mt6797_mmsys_match_data,
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
  2022-05-13 17:03 ` AngeloGioacchino Del Regno
  (?)
@ 2022-05-16  5:43   ` CK Hu
  -1 siblings, 0 replies; 15+ messages in thread
From: CK Hu @ 2022-05-16  5:43 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Hi, Angelo:

On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno wrote:
> Add MM support for the MT6795 SoC, using the mmsys default routing
> table.
> 
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> ---
> 
> In order for this patch to have any meaning and functionality, it is
> required to also have in-tree the [1] MT6795 clocks series, even
> though that's not required to actually compile this code.
> 
> [1] 
> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>  
> 
>  drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
> b/drivers/soc/mediatek/mtk-mmsys.c
> index 06d8e83a2cb5..38b36b881a3b 100644
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
> mt6779_mmsys_match_data = {
>  	},
>  };
>  
> +static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data =
> {
> +	.clk_driver = "clk-mt6795-mm",
> +	.routes = mmsys_default_routing_table,

mt6795 should have its own routing table instead of default one. The
default one is used for mt8173, mt2701, mt2712 which no one knows how
to separate them. If you don't know the routing table of mt6795, just
left this as NULL.

Regards,
CK

> +	.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
> +	.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
> +};
> +
>  static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data =
> {
>  	.clk_driver = "clk-mt6797-mm",
>  };
> @@ -363,6 +370,10 @@ static const struct of_device_id
> of_match_mtk_mmsys[] = {
>  		.compatible = "mediatek,mt6779-mmsys",
>  		.data = &mt6779_mmsys_match_data,
>  	},
> +	{
> +		.compatible = "mediatek,mt6795-mmsys",
> +		.data = &mt6795_mmsys_driver_data,
> +	},
>  	{
>  		.compatible = "mediatek,mt6797-mmsys",
>  		.data = &mt6797_mmsys_match_data,


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16  5:43   ` CK Hu
  0 siblings, 0 replies; 15+ messages in thread
From: CK Hu @ 2022-05-16  5:43 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Hi, Angelo:

On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno wrote:
> Add MM support for the MT6795 SoC, using the mmsys default routing
> table.
> 
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> ---
> 
> In order for this patch to have any meaning and functionality, it is
> required to also have in-tree the [1] MT6795 clocks series, even
> though that's not required to actually compile this code.
> 
> [1] 
> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>  
> 
>  drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
> b/drivers/soc/mediatek/mtk-mmsys.c
> index 06d8e83a2cb5..38b36b881a3b 100644
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
> mt6779_mmsys_match_data = {
>  	},
>  };
>  
> +static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data =
> {
> +	.clk_driver = "clk-mt6795-mm",
> +	.routes = mmsys_default_routing_table,

mt6795 should have its own routing table instead of default one. The
default one is used for mt8173, mt2701, mt2712 which no one knows how
to separate them. If you don't know the routing table of mt6795, just
left this as NULL.

Regards,
CK

> +	.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
> +	.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
> +};
> +
>  static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data =
> {
>  	.clk_driver = "clk-mt6797-mm",
>  };
> @@ -363,6 +370,10 @@ static const struct of_device_id
> of_match_mtk_mmsys[] = {
>  		.compatible = "mediatek,mt6779-mmsys",
>  		.data = &mt6779_mmsys_match_data,
>  	},
> +	{
> +		.compatible = "mediatek,mt6795-mmsys",
> +		.data = &mt6795_mmsys_driver_data,
> +	},
>  	{
>  		.compatible = "mediatek,mt6797-mmsys",
>  		.data = &mt6797_mmsys_match_data,


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16  5:43   ` CK Hu
  0 siblings, 0 replies; 15+ messages in thread
From: CK Hu @ 2022-05-16  5:43 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Hi, Angelo:

On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno wrote:
> Add MM support for the MT6795 SoC, using the mmsys default routing
> table.
> 
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
> ---
> 
> In order for this patch to have any meaning and functionality, it is
> required to also have in-tree the [1] MT6795 clocks series, even
> though that's not required to actually compile this code.
> 
> [1] 
> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>  
> 
>  drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
> b/drivers/soc/mediatek/mtk-mmsys.c
> index 06d8e83a2cb5..38b36b881a3b 100644
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
> mt6779_mmsys_match_data = {
>  	},
>  };
>  
> +static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data =
> {
> +	.clk_driver = "clk-mt6795-mm",
> +	.routes = mmsys_default_routing_table,

mt6795 should have its own routing table instead of default one. The
default one is used for mt8173, mt2701, mt2712 which no one knows how
to separate them. If you don't know the routing table of mt6795, just
left this as NULL.

Regards,
CK

> +	.num_routes = ARRAY_SIZE(mmsys_default_routing_table),
> +	.sw0_rst_offset = MT8183_MMSYS_SW0_RST_B,
> +};
> +
>  static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data =
> {
>  	.clk_driver = "clk-mt6797-mm",
>  };
> @@ -363,6 +370,10 @@ static const struct of_device_id
> of_match_mtk_mmsys[] = {
>  		.compatible = "mediatek,mt6779-mmsys",
>  		.data = &mt6779_mmsys_match_data,
>  	},
> +	{
> +		.compatible = "mediatek,mt6795-mmsys",
> +		.data = &mt6795_mmsys_driver_data,
> +	},
>  	{
>  		.compatible = "mediatek,mt6797-mmsys",
>  		.data = &mt6797_mmsys_match_data,


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
  2022-05-16  5:43   ` CK Hu
  (?)
@ 2022-05-16  8:44     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-16  8:44 UTC (permalink / raw)
  To: CK Hu, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Il 16/05/22 07:43, CK Hu ha scritto:
> Hi, Angelo:
> 
> On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno wrote:
>> Add MM support for the MT6795 SoC, using the mmsys default routing
>> table.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <
>> angelogioacchino.delregno@collabora.com>
>> ---
>>
>> In order for this patch to have any meaning and functionality, it is
>> required to also have in-tree the [1] MT6795 clocks series, even
>> though that's not required to actually compile this code.
>>
>> [1]
>> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>>   
>>
>>   drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
>> b/drivers/soc/mediatek/mtk-mmsys.c
>> index 06d8e83a2cb5..38b36b881a3b 100644
>> --- a/drivers/soc/mediatek/mtk-mmsys.c
>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
>> mt6779_mmsys_match_data = {
>>   	},
>>   };
>>   
>> +static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data =
>> {
>> +	.clk_driver = "clk-mt6795-mm",
>> +	.routes = mmsys_default_routing_table,
> 
> mt6795 should have its own routing table instead of default one. The
> default one is used for mt8173, mt2701, mt2712 which no one knows how
> to separate them. If you don't know the routing table of mt6795, just
> left this as NULL.
> 

Hello CK,

I agree with you, in fact the first test that I've done was with leaving
routes to NULL, but that did not work (I couldn't get the display to work),
while assigning the default routing table resulted in having a working
internal (DSI) display et al, which is why I have done that.

I am sure that this may be a quirk that is required due to my platform's
bootloader, but still, it won't work otherwise.

If anyone from MediaTek wants to help with providing a better solution for
that, you're welcome to - but otherwise, my proposal is to configure MT6795
with that default routing table and eventually come back to this later if
any issue with this gets discovered... I couldn't find any, though.

Cheers,
Angelo


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16  8:44     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-16  8:44 UTC (permalink / raw)
  To: CK Hu, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Il 16/05/22 07:43, CK Hu ha scritto:
> Hi, Angelo:
> 
> On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno wrote:
>> Add MM support for the MT6795 SoC, using the mmsys default routing
>> table.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <
>> angelogioacchino.delregno@collabora.com>
>> ---
>>
>> In order for this patch to have any meaning and functionality, it is
>> required to also have in-tree the [1] MT6795 clocks series, even
>> though that's not required to actually compile this code.
>>
>> [1]
>> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>>   
>>
>>   drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
>> b/drivers/soc/mediatek/mtk-mmsys.c
>> index 06d8e83a2cb5..38b36b881a3b 100644
>> --- a/drivers/soc/mediatek/mtk-mmsys.c
>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
>> mt6779_mmsys_match_data = {
>>   	},
>>   };
>>   
>> +static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data =
>> {
>> +	.clk_driver = "clk-mt6795-mm",
>> +	.routes = mmsys_default_routing_table,
> 
> mt6795 should have its own routing table instead of default one. The
> default one is used for mt8173, mt2701, mt2712 which no one knows how
> to separate them. If you don't know the routing table of mt6795, just
> left this as NULL.
> 

Hello CK,

I agree with you, in fact the first test that I've done was with leaving
routes to NULL, but that did not work (I couldn't get the display to work),
while assigning the default routing table resulted in having a working
internal (DSI) display et al, which is why I have done that.

I am sure that this may be a quirk that is required due to my platform's
bootloader, but still, it won't work otherwise.

If anyone from MediaTek wants to help with providing a better solution for
that, you're welcome to - but otherwise, my proposal is to configure MT6795
with that default routing table and eventually come back to this later if
any issue with this gets discovered... I couldn't find any, though.

Cheers,
Angelo


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16  8:44     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-16  8:44 UTC (permalink / raw)
  To: CK Hu, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Il 16/05/22 07:43, CK Hu ha scritto:
> Hi, Angelo:
> 
> On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno wrote:
>> Add MM support for the MT6795 SoC, using the mmsys default routing
>> table.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <
>> angelogioacchino.delregno@collabora.com>
>> ---
>>
>> In order for this patch to have any meaning and functionality, it is
>> required to also have in-tree the [1] MT6795 clocks series, even
>> though that's not required to actually compile this code.
>>
>> [1]
>> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>>   
>>
>>   drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
>> b/drivers/soc/mediatek/mtk-mmsys.c
>> index 06d8e83a2cb5..38b36b881a3b 100644
>> --- a/drivers/soc/mediatek/mtk-mmsys.c
>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
>> mt6779_mmsys_match_data = {
>>   	},
>>   };
>>   
>> +static const struct mtk_mmsys_driver_data mt6795_mmsys_driver_data =
>> {
>> +	.clk_driver = "clk-mt6795-mm",
>> +	.routes = mmsys_default_routing_table,
> 
> mt6795 should have its own routing table instead of default one. The
> default one is used for mt8173, mt2701, mt2712 which no one knows how
> to separate them. If you don't know the routing table of mt6795, just
> left this as NULL.
> 

Hello CK,

I agree with you, in fact the first test that I've done was with leaving
routes to NULL, but that did not work (I couldn't get the display to work),
while assigning the default routing table resulted in having a working
internal (DSI) display et al, which is why I have done that.

I am sure that this may be a quirk that is required due to my platform's
bootloader, but still, it won't work otherwise.

If anyone from MediaTek wants to help with providing a better solution for
that, you're welcome to - but otherwise, my proposal is to configure MT6795
with that default routing table and eventually come back to this later if
any issue with this gets discovered... I couldn't find any, though.

Cheers,
Angelo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
  2022-05-16  8:44     ` AngeloGioacchino Del Regno
  (?)
@ 2022-05-16  9:50       ` CK Hu
  -1 siblings, 0 replies; 15+ messages in thread
From: CK Hu @ 2022-05-16  9:50 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

On Mon, 2022-05-16 at 10:44 +0200, AngeloGioacchino Del Regno wrote:
> Il 16/05/22 07:43, CK Hu ha scritto:
> > Hi, Angelo:
> > 
> > On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno
> > wrote:
> > > Add MM support for the MT6795 SoC, using the mmsys default
> > > routing
> > > table.
> > > 
> > > Signed-off-by: AngeloGioacchino Del Regno <
> > > angelogioacchino.delregno@collabora.com>
> > > ---
> > > 
> > > In order for this patch to have any meaning and functionality, it
> > > is
> > > required to also have in-tree the [1] MT6795 clocks series, even
> > > though that's not required to actually compile this code.
> > > 
> > > [1]
> > > 
https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
> > >   
> > > 
> > >   drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
> > >   1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/drivers/soc/mediatek/mtk-mmsys.c
> > > b/drivers/soc/mediatek/mtk-mmsys.c
> > > index 06d8e83a2cb5..38b36b881a3b 100644
> > > --- a/drivers/soc/mediatek/mtk-mmsys.c
> > > +++ b/drivers/soc/mediatek/mtk-mmsys.c
> > > @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
> > > mt6779_mmsys_match_data = {
> > >   	},
> > >   };
> > >   
> > > +static const struct mtk_mmsys_driver_data
> > > mt6795_mmsys_driver_data =
> > > {
> > > +	.clk_driver = "clk-mt6795-mm",
> > > +	.routes = mmsys_default_routing_table,
> > 
> > mt6795 should have its own routing table instead of default one.
> > The
> > default one is used for mt8173, mt2701, mt2712 which no one knows
> > how
> > to separate them. If you don't know the routing table of mt6795,
> > just
> > left this as NULL.
> > 
> 
> Hello CK,
> 
> I agree with you, in fact the first test that I've done was with
> leaving
> routes to NULL, but that did not work (I couldn't get the display to
> work),
> while assigning the default routing table resulted in having a
> working
> internal (DSI) display et al, which is why I have done that.
> 
> I am sure that this may be a quirk that is required due to my
> platform's
> bootloader, but still, it won't work otherwise.
> 
> If anyone from MediaTek wants to help with providing a better
> solution for
> that, you're welcome to - but otherwise, my proposal is to configure
> MT6795
> with that default routing table and eventually come back to this
> later if
> any issue with this gets discovered... I couldn't find any, though.

So you have a drm driver which support mt6795 and it would call
mtk_mmsys_ddp_connect() to setup routing routing register. You could
generate mt6795 routing table from default one by partial element that
you use in mt6795. I think this table would be smaller than the default
one.

Regards,
CK

> 
> Cheers,
> Angelo
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16  9:50       ` CK Hu
  0 siblings, 0 replies; 15+ messages in thread
From: CK Hu @ 2022-05-16  9:50 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

On Mon, 2022-05-16 at 10:44 +0200, AngeloGioacchino Del Regno wrote:
> Il 16/05/22 07:43, CK Hu ha scritto:
> > Hi, Angelo:
> > 
> > On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno
> > wrote:
> > > Add MM support for the MT6795 SoC, using the mmsys default
> > > routing
> > > table.
> > > 
> > > Signed-off-by: AngeloGioacchino Del Regno <
> > > angelogioacchino.delregno@collabora.com>
> > > ---
> > > 
> > > In order for this patch to have any meaning and functionality, it
> > > is
> > > required to also have in-tree the [1] MT6795 clocks series, even
> > > though that's not required to actually compile this code.
> > > 
> > > [1]
> > > 
https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
> > >   
> > > 
> > >   drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
> > >   1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/drivers/soc/mediatek/mtk-mmsys.c
> > > b/drivers/soc/mediatek/mtk-mmsys.c
> > > index 06d8e83a2cb5..38b36b881a3b 100644
> > > --- a/drivers/soc/mediatek/mtk-mmsys.c
> > > +++ b/drivers/soc/mediatek/mtk-mmsys.c
> > > @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
> > > mt6779_mmsys_match_data = {
> > >   	},
> > >   };
> > >   
> > > +static const struct mtk_mmsys_driver_data
> > > mt6795_mmsys_driver_data =
> > > {
> > > +	.clk_driver = "clk-mt6795-mm",
> > > +	.routes = mmsys_default_routing_table,
> > 
> > mt6795 should have its own routing table instead of default one.
> > The
> > default one is used for mt8173, mt2701, mt2712 which no one knows
> > how
> > to separate them. If you don't know the routing table of mt6795,
> > just
> > left this as NULL.
> > 
> 
> Hello CK,
> 
> I agree with you, in fact the first test that I've done was with
> leaving
> routes to NULL, but that did not work (I couldn't get the display to
> work),
> while assigning the default routing table resulted in having a
> working
> internal (DSI) display et al, which is why I have done that.
> 
> I am sure that this may be a quirk that is required due to my
> platform's
> bootloader, but still, it won't work otherwise.
> 
> If anyone from MediaTek wants to help with providing a better
> solution for
> that, you're welcome to - but otherwise, my proposal is to configure
> MT6795
> with that default routing table and eventually come back to this
> later if
> any issue with this gets discovered... I couldn't find any, though.

So you have a drm driver which support mt6795 and it would call
mtk_mmsys_ddp_connect() to setup routing routing register. You could
generate mt6795 routing table from default one by partial element that
you use in mt6795. I think this table would be smaller than the default
one.

Regards,
CK

> 
> Cheers,
> Angelo
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16  9:50       ` CK Hu
  0 siblings, 0 replies; 15+ messages in thread
From: CK Hu @ 2022-05-16  9:50 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

On Mon, 2022-05-16 at 10:44 +0200, AngeloGioacchino Del Regno wrote:
> Il 16/05/22 07:43, CK Hu ha scritto:
> > Hi, Angelo:
> > 
> > On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno
> > wrote:
> > > Add MM support for the MT6795 SoC, using the mmsys default
> > > routing
> > > table.
> > > 
> > > Signed-off-by: AngeloGioacchino Del Regno <
> > > angelogioacchino.delregno@collabora.com>
> > > ---
> > > 
> > > In order for this patch to have any meaning and functionality, it
> > > is
> > > required to also have in-tree the [1] MT6795 clocks series, even
> > > though that's not required to actually compile this code.
> > > 
> > > [1]
> > > 
https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
> > >   
> > > 
> > >   drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
> > >   1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/drivers/soc/mediatek/mtk-mmsys.c
> > > b/drivers/soc/mediatek/mtk-mmsys.c
> > > index 06d8e83a2cb5..38b36b881a3b 100644
> > > --- a/drivers/soc/mediatek/mtk-mmsys.c
> > > +++ b/drivers/soc/mediatek/mtk-mmsys.c
> > > @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
> > > mt6779_mmsys_match_data = {
> > >   	},
> > >   };
> > >   
> > > +static const struct mtk_mmsys_driver_data
> > > mt6795_mmsys_driver_data =
> > > {
> > > +	.clk_driver = "clk-mt6795-mm",
> > > +	.routes = mmsys_default_routing_table,
> > 
> > mt6795 should have its own routing table instead of default one.
> > The
> > default one is used for mt8173, mt2701, mt2712 which no one knows
> > how
> > to separate them. If you don't know the routing table of mt6795,
> > just
> > left this as NULL.
> > 
> 
> Hello CK,
> 
> I agree with you, in fact the first test that I've done was with
> leaving
> routes to NULL, but that did not work (I couldn't get the display to
> work),
> while assigning the default routing table resulted in having a
> working
> internal (DSI) display et al, which is why I have done that.
> 
> I am sure that this may be a quirk that is required due to my
> platform's
> bootloader, but still, it won't work otherwise.
> 
> If anyone from MediaTek wants to help with providing a better
> solution for
> that, you're welcome to - but otherwise, my proposal is to configure
> MT6795
> with that default routing table and eventually come back to this
> later if
> any issue with this gets discovered... I couldn't find any, though.

So you have a drm driver which support mt6795 and it would call
mtk_mmsys_ddp_connect() to setup routing routing register. You could
generate mt6795 routing table from default one by partial element that
you use in mt6795. I think this table would be smaller than the default
one.

Regards,
CK

> 
> Cheers,
> Angelo
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
  2022-05-16  9:50       ` CK Hu
  (?)
@ 2022-05-16 10:06         ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-16 10:06 UTC (permalink / raw)
  To: CK Hu, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Il 16/05/22 11:50, CK Hu ha scritto:
> On Mon, 2022-05-16 at 10:44 +0200, AngeloGioacchino Del Regno wrote:
>> Il 16/05/22 07:43, CK Hu ha scritto:
>>> Hi, Angelo:
>>>
>>> On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno
>>> wrote:
>>>> Add MM support for the MT6795 SoC, using the mmsys default
>>>> routing
>>>> table.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno <
>>>> angelogioacchino.delregno@collabora.com>
>>>> ---
>>>>
>>>> In order for this patch to have any meaning and functionality, it
>>>> is
>>>> required to also have in-tree the [1] MT6795 clocks series, even
>>>> though that's not required to actually compile this code.
>>>>
>>>> [1]
>>>>
> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>>>>    
>>>>
>>>>    drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>>>>    1 file changed, 11 insertions(+)
>>>>
>>>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
>>>> b/drivers/soc/mediatek/mtk-mmsys.c
>>>> index 06d8e83a2cb5..38b36b881a3b 100644
>>>> --- a/drivers/soc/mediatek/mtk-mmsys.c
>>>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>>>> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
>>>> mt6779_mmsys_match_data = {
>>>>    	},
>>>>    };
>>>>    
>>>> +static const struct mtk_mmsys_driver_data
>>>> mt6795_mmsys_driver_data =
>>>> {
>>>> +	.clk_driver = "clk-mt6795-mm",
>>>> +	.routes = mmsys_default_routing_table,
>>>
>>> mt6795 should have its own routing table instead of default one.
>>> The
>>> default one is used for mt8173, mt2701, mt2712 which no one knows
>>> how
>>> to separate them. If you don't know the routing table of mt6795,
>>> just
>>> left this as NULL.
>>>
>>
>> Hello CK,
>>
>> I agree with you, in fact the first test that I've done was with
>> leaving
>> routes to NULL, but that did not work (I couldn't get the display to
>> work),
>> while assigning the default routing table resulted in having a
>> working
>> internal (DSI) display et al, which is why I have done that.
>>
>> I am sure that this may be a quirk that is required due to my
>> platform's
>> bootloader, but still, it won't work otherwise.
>>
>> If anyone from MediaTek wants to help with providing a better
>> solution for
>> that, you're welcome to - but otherwise, my proposal is to configure
>> MT6795
>> with that default routing table and eventually come back to this
>> later if
>> any issue with this gets discovered... I couldn't find any, though.
> 
> So you have a drm driver which support mt6795 and it would call
> mtk_mmsys_ddp_connect() to setup routing routing register. You could
> generate mt6795 routing table from default one by partial element that
> you use in mt6795. I think this table would be smaller than the default
> one.
> 

Okay, that makes a lot of sense: I'll try following this advice.

Regards,
Angelo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16 10:06         ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-16 10:06 UTC (permalink / raw)
  To: CK Hu, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Il 16/05/22 11:50, CK Hu ha scritto:
> On Mon, 2022-05-16 at 10:44 +0200, AngeloGioacchino Del Regno wrote:
>> Il 16/05/22 07:43, CK Hu ha scritto:
>>> Hi, Angelo:
>>>
>>> On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno
>>> wrote:
>>>> Add MM support for the MT6795 SoC, using the mmsys default
>>>> routing
>>>> table.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno <
>>>> angelogioacchino.delregno@collabora.com>
>>>> ---
>>>>
>>>> In order for this patch to have any meaning and functionality, it
>>>> is
>>>> required to also have in-tree the [1] MT6795 clocks series, even
>>>> though that's not required to actually compile this code.
>>>>
>>>> [1]
>>>>
> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>>>>    
>>>>
>>>>    drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>>>>    1 file changed, 11 insertions(+)
>>>>
>>>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
>>>> b/drivers/soc/mediatek/mtk-mmsys.c
>>>> index 06d8e83a2cb5..38b36b881a3b 100644
>>>> --- a/drivers/soc/mediatek/mtk-mmsys.c
>>>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>>>> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
>>>> mt6779_mmsys_match_data = {
>>>>    	},
>>>>    };
>>>>    
>>>> +static const struct mtk_mmsys_driver_data
>>>> mt6795_mmsys_driver_data =
>>>> {
>>>> +	.clk_driver = "clk-mt6795-mm",
>>>> +	.routes = mmsys_default_routing_table,
>>>
>>> mt6795 should have its own routing table instead of default one.
>>> The
>>> default one is used for mt8173, mt2701, mt2712 which no one knows
>>> how
>>> to separate them. If you don't know the routing table of mt6795,
>>> just
>>> left this as NULL.
>>>
>>
>> Hello CK,
>>
>> I agree with you, in fact the first test that I've done was with
>> leaving
>> routes to NULL, but that did not work (I couldn't get the display to
>> work),
>> while assigning the default routing table resulted in having a
>> working
>> internal (DSI) display et al, which is why I have done that.
>>
>> I am sure that this may be a quirk that is required due to my
>> platform's
>> bootloader, but still, it won't work otherwise.
>>
>> If anyone from MediaTek wants to help with providing a better
>> solution for
>> that, you're welcome to - but otherwise, my proposal is to configure
>> MT6795
>> with that default routing table and eventually come back to this
>> later if
>> any issue with this gets discovered... I couldn't find any, though.
> 
> So you have a drm driver which support mt6795 and it would call
> mtk_mmsys_ddp_connect() to setup routing routing register. You could
> generate mt6795 routing table from default one by partial element that
> you use in mt6795. I think this table would be smaller than the default
> one.
> 

Okay, that makes a lot of sense: I'll try following this advice.

Regards,
Angelo

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10
@ 2022-05-16 10:06         ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 15+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-16 10:06 UTC (permalink / raw)
  To: CK Hu, matthias.bgg
  Cc: linux-arm-kernel, linux-mediatek, linux-kernel, konrad.dybcio,
	marijn.suijten, martin.botka, ~postmarketos/upstreaming,
	phone-devel, paul.bouchara, kernel

Il 16/05/22 11:50, CK Hu ha scritto:
> On Mon, 2022-05-16 at 10:44 +0200, AngeloGioacchino Del Regno wrote:
>> Il 16/05/22 07:43, CK Hu ha scritto:
>>> Hi, Angelo:
>>>
>>> On Fri, 2022-05-13 at 19:03 +0200, AngeloGioacchino Del Regno
>>> wrote:
>>>> Add MM support for the MT6795 SoC, using the mmsys default
>>>> routing
>>>> table.
>>>>
>>>> Signed-off-by: AngeloGioacchino Del Regno <
>>>> angelogioacchino.delregno@collabora.com>
>>>> ---
>>>>
>>>> In order for this patch to have any meaning and functionality, it
>>>> is
>>>> required to also have in-tree the [1] MT6795 clocks series, even
>>>> though that's not required to actually compile this code.
>>>>
>>>> [1]
>>>>
> https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=641493__;!!CTRNKA9wMg0ARbw!ywDb_Gj4oV0iYHK_PbtJSNejzsJGlFVjX-1O0G1mR0vZX_5VeMtlZJ_AS6K_Mg$
>>>>    
>>>>
>>>>    drivers/soc/mediatek/mtk-mmsys.c | 11 +++++++++++
>>>>    1 file changed, 11 insertions(+)
>>>>
>>>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c
>>>> b/drivers/soc/mediatek/mtk-mmsys.c
>>>> index 06d8e83a2cb5..38b36b881a3b 100644
>>>> --- a/drivers/soc/mediatek/mtk-mmsys.c
>>>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>>>> @@ -57,6 +57,13 @@ static const struct mtk_mmsys_match_data
>>>> mt6779_mmsys_match_data = {
>>>>    	},
>>>>    };
>>>>    
>>>> +static const struct mtk_mmsys_driver_data
>>>> mt6795_mmsys_driver_data =
>>>> {
>>>> +	.clk_driver = "clk-mt6795-mm",
>>>> +	.routes = mmsys_default_routing_table,
>>>
>>> mt6795 should have its own routing table instead of default one.
>>> The
>>> default one is used for mt8173, mt2701, mt2712 which no one knows
>>> how
>>> to separate them. If you don't know the routing table of mt6795,
>>> just
>>> left this as NULL.
>>>
>>
>> Hello CK,
>>
>> I agree with you, in fact the first test that I've done was with
>> leaving
>> routes to NULL, but that did not work (I couldn't get the display to
>> work),
>> while assigning the default routing table resulted in having a
>> working
>> internal (DSI) display et al, which is why I have done that.
>>
>> I am sure that this may be a quirk that is required due to my
>> platform's
>> bootloader, but still, it won't work otherwise.
>>
>> If anyone from MediaTek wants to help with providing a better
>> solution for
>> that, you're welcome to - but otherwise, my proposal is to configure
>> MT6795
>> with that default routing table and eventually come back to this
>> later if
>> any issue with this gets discovered... I couldn't find any, though.
> 
> So you have a drm driver which support mt6795 and it would call
> mtk_mmsys_ddp_connect() to setup routing routing register. You could
> generate mt6795 routing table from default one by partial element that
> you use in mt6795. I think this table would be smaller than the default
> one.
> 

Okay, that makes a lot of sense: I'll try following this advice.

Regards,
Angelo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-05-16 10:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 17:03 [PATCH] soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10 AngeloGioacchino Del Regno
2022-05-13 17:03 ` AngeloGioacchino Del Regno
2022-05-13 17:03 ` AngeloGioacchino Del Regno
2022-05-16  5:43 ` CK Hu
2022-05-16  5:43   ` CK Hu
2022-05-16  5:43   ` CK Hu
2022-05-16  8:44   ` AngeloGioacchino Del Regno
2022-05-16  8:44     ` AngeloGioacchino Del Regno
2022-05-16  8:44     ` AngeloGioacchino Del Regno
2022-05-16  9:50     ` CK Hu
2022-05-16  9:50       ` CK Hu
2022-05-16  9:50       ` CK Hu
2022-05-16 10:06       ` AngeloGioacchino Del Regno
2022-05-16 10:06         ` AngeloGioacchino Del Regno
2022-05-16 10:06         ` AngeloGioacchino Del Regno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.