linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex
@ 2022-09-13 14:01 AngeloGioacchino Del Regno
  2022-09-13 14:01 ` [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795 AngeloGioacchino Del Regno
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-13 14:01 UTC (permalink / raw)
  To: robh+dt
  Cc: krzysztof.kozlowski+dt, matthias.bgg, angelogioacchino.delregno,
	chunkuang.hu, jason-jh.lin, rex-bc.chen, moudy.ho, allen-kh.cheng,
	p.zabel, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

This series adds display mutex arrays and compatibles for the
MediaTek Helio X10 (MT6795).

Tested on Sony Xperia M5 smartphone.

AngeloGioacchino Del Regno (2):
  dt-bindings: soc: mediatek: Add display mutex support for MT6795
  soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex

 .../bindings/soc/mediatek/mediatek,mutex.yaml    |  1 +
 drivers/soc/mediatek/mtk-mutex.c                 | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

-- 
2.37.2


_______________________________________________
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] 5+ messages in thread

* [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795
  2022-09-13 14:01 [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex AngeloGioacchino Del Regno
@ 2022-09-13 14:01 ` AngeloGioacchino Del Regno
  2022-09-14 14:12   ` Rob Herring
  2022-09-13 14:01 ` [PATCH 2/2] soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex AngeloGioacchino Del Regno
  2022-09-15 16:16 ` [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex Matthias Brugger
  2 siblings, 1 reply; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-13 14:01 UTC (permalink / raw)
  To: robh+dt
  Cc: krzysztof.kozlowski+dt, matthias.bgg, angelogioacchino.delregno,
	chunkuang.hu, jason-jh.lin, rex-bc.chen, moudy.ho, allen-kh.cheng,
	p.zabel, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

Add compatible for MT6795 Helio X10 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
index 234fa5dc07c2..9241e5fc7cff 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
+++ b/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
@@ -26,6 +26,7 @@ properties:
     enum:
       - mediatek,mt2701-disp-mutex
       - mediatek,mt2712-disp-mutex
+      - mediatek,mt6795-disp-mutex
       - mediatek,mt8167-disp-mutex
       - mediatek,mt8173-disp-mutex
       - mediatek,mt8183-disp-mutex
-- 
2.37.2


_______________________________________________
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] 5+ messages in thread

* [PATCH 2/2] soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex
  2022-09-13 14:01 [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex AngeloGioacchino Del Regno
  2022-09-13 14:01 ` [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795 AngeloGioacchino Del Regno
@ 2022-09-13 14:01 ` AngeloGioacchino Del Regno
  2022-09-15 16:16 ` [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex Matthias Brugger
  2 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-13 14:01 UTC (permalink / raw)
  To: robh+dt
  Cc: krzysztof.kozlowski+dt, matthias.bgg, angelogioacchino.delregno,
	chunkuang.hu, jason-jh.lin, rex-bc.chen, moudy.ho, allen-kh.cheng,
	p.zabel, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek

MT6795 has the same mutex mod/sof register layout as MT2712 and MT8173,
but supports only four SOF, as it has two DSI and one DPI.
Support is added by reusing most of the MT8173 data, with the addition
of a mt6795-specific SOF array (and devicetree compatible, of course).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 drivers/soc/mediatek/mtk-mutex.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c
index e82421386335..eb021e347753 100644
--- a/drivers/soc/mediatek/mtk-mutex.c
+++ b/drivers/soc/mediatek/mtk-mutex.c
@@ -433,6 +433,13 @@ static const unsigned int mt2712_mutex_sof[DDP_MUTEX_SOF_MAX] = {
 	[MUTEX_SOF_DSI3] = MUTEX_SOF_DSI3,
 };
 
+static const unsigned int mt6795_mutex_sof[DDP_MUTEX_SOF_MAX] = {
+	[MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE,
+	[MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0,
+	[MUTEX_SOF_DSI1] = MUTEX_SOF_DSI1,
+	[MUTEX_SOF_DPI0] = MUTEX_SOF_DPI0,
+};
+
 static const unsigned int mt8167_mutex_sof[DDP_MUTEX_SOF_MAX] = {
 	[MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE,
 	[MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0,
@@ -487,6 +494,13 @@ static const struct mtk_mutex_data mt2712_mutex_driver_data = {
 	.mutex_sof_reg = MT2701_MUTEX0_SOF0,
 };
 
+static const struct mtk_mutex_data mt6795_mutex_driver_data = {
+	.mutex_mod = mt8173_mutex_mod,
+	.mutex_sof = mt6795_mutex_sof,
+	.mutex_mod_reg = MT2701_MUTEX0_MOD0,
+	.mutex_sof_reg = MT2701_MUTEX0_SOF0,
+};
+
 static const struct mtk_mutex_data mt8167_mutex_driver_data = {
 	.mutex_mod = mt8167_mutex_mod,
 	.mutex_sof = mt8167_mutex_sof,
@@ -865,6 +879,8 @@ static const struct of_device_id mutex_driver_dt_match[] = {
 	  .data = &mt2701_mutex_driver_data},
 	{ .compatible = "mediatek,mt2712-disp-mutex",
 	  .data = &mt2712_mutex_driver_data},
+	{ .compatible = "mediatek,mt6795-disp-mutex",
+	  .data = &mt6795_mutex_driver_data},
 	{ .compatible = "mediatek,mt8167-disp-mutex",
 	  .data = &mt8167_mutex_driver_data},
 	{ .compatible = "mediatek,mt8173-disp-mutex",
-- 
2.37.2


_______________________________________________
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] 5+ messages in thread

* Re: [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795
  2022-09-13 14:01 ` [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795 AngeloGioacchino Del Regno
@ 2022-09-14 14:12   ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2022-09-14 14:12 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: allen-kh.cheng, devicetree, chunkuang.hu, rex-bc.chen, moudy.ho,
	matthias.bgg, jason-jh.lin, linux-mediatek,
	krzysztof.kozlowski+dt, p.zabel, linux-kernel, linux-arm-kernel,
	robh+dt

On Tue, 13 Sep 2022 16:01:20 +0200, AngeloGioacchino Del Regno wrote:
> Add compatible for MT6795 Helio X10 SoC.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
>  .../devicetree/bindings/soc/mediatek/mediatek,mutex.yaml         | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
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] 5+ messages in thread

* Re: [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex
  2022-09-13 14:01 [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex AngeloGioacchino Del Regno
  2022-09-13 14:01 ` [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795 AngeloGioacchino Del Regno
  2022-09-13 14:01 ` [PATCH 2/2] soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex AngeloGioacchino Del Regno
@ 2022-09-15 16:16 ` Matthias Brugger
  2 siblings, 0 replies; 5+ messages in thread
From: Matthias Brugger @ 2022-09-15 16:16 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, robh+dt
  Cc: krzysztof.kozlowski+dt, chunkuang.hu, jason-jh.lin, rex-bc.chen,
	moudy.ho, allen-kh.cheng, p.zabel, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek



On 13/09/2022 16:01, AngeloGioacchino Del Regno wrote:
> This series adds display mutex arrays and compatibles for the
> MediaTek Helio X10 (MT6795).
> 
> Tested on Sony Xperia M5 smartphone.
> 
> AngeloGioacchino Del Regno (2):
>    dt-bindings: soc: mediatek: Add display mutex support for MT6795
>    soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex
> 
>   .../bindings/soc/mediatek/mediatek,mutex.yaml    |  1 +
>   drivers/soc/mediatek/mtk-mutex.c                 | 16 ++++++++++++++++
>   2 files changed, 17 insertions(+)
> 

Whole series applied, thanks!

_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2022-09-15 16:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13 14:01 [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex AngeloGioacchino Del Regno
2022-09-13 14:01 ` [PATCH 1/2] dt-bindings: soc: mediatek: Add display mutex support for MT6795 AngeloGioacchino Del Regno
2022-09-14 14:12   ` Rob Herring
2022-09-13 14:01 ` [PATCH 2/2] soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex AngeloGioacchino Del Regno
2022-09-15 16:16 ` [PATCH 0/2] MediaTek Helio X10 MT6795 - Display Mutex Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).