Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/3] memory: mtk-smi: mt6797 support
@ 2026-12-02 18:11 Roman Vivchar via B4 Relay
  2026-12-02 18:11 ` [PATCH 1/3] dt-bindings: memory-controllers: mediatek,smi-larb: add mt6797 Roman Vivchar via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-12-02 18:11 UTC (permalink / raw)
  To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
	Roman Vivchar

This series adds mt6797 SMI common and SMI LARB support. SMI common
requires both dt-bindings and driver changes, while SMI LARB only needs
a dt-bindings update as it falls back to mt8167.

The support was tested on Xiaomi Redmi Note 4 (MTK) with out-of-tree
DRM support.

Based on Krzysztof's for-next tree.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
Roman Vivchar (3):
      dt-bindings: memory-controllers: mediatek,smi-larb: add mt6797
      dt-bindings: memory-controllers: mediatek,smi-common: add mt6797
      memory: mtk-smi: add mt6797 SMI common support

 .../bindings/memory-controllers/mediatek,smi-common.yaml |  5 ++++-
 .../bindings/memory-controllers/mediatek,smi-larb.yaml   |  4 ++++
 drivers/memory/mtk-smi.c                                 | 16 ++++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
---
base-commit: 053e91673408465255387720172bce7c2ba20404
change-id: 20261202-6797-smi-eb4b559c5772

Best regards,
--  
Roman Vivchar <rva333@protonmail.com>



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

* [PATCH 1/3] dt-bindings: memory-controllers: mediatek,smi-larb: add mt6797
  2026-12-02 18:11 [PATCH 0/3] memory: mtk-smi: mt6797 support Roman Vivchar via B4 Relay
@ 2026-12-02 18:11 ` Roman Vivchar via B4 Relay
  2026-12-02 18:11 ` [PATCH 2/3] dt-bindings: memory-controllers: mediatek,smi-common: " Roman Vivchar via B4 Relay
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-12-02 18:11 UTC (permalink / raw)
  To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
	Roman Vivchar

From: Roman Vivchar <rva333@protonmail.com>

Add compatible string for the mt6797 SMI LARB that is compatible with
the mt8167.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
 .../devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml b/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
index 79ef73e52c5d..fbccb1bea277 100644
--- a/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
@@ -31,6 +31,10 @@ properties:
           - mediatek,mt8192-smi-larb
           - mediatek,mt8195-smi-larb
 
+      - items:
+          - const: mediatek,mt6797-smi-larb
+          - const: mediatek,mt8167-smi-larb
+
       - description: for mt7623
         items:
           - const: mediatek,mt7623-smi-larb

-- 
2.56.1



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

* [PATCH 2/3] dt-bindings: memory-controllers: mediatek,smi-common: add mt6797
  2026-12-02 18:11 [PATCH 0/3] memory: mtk-smi: mt6797 support Roman Vivchar via B4 Relay
  2026-12-02 18:11 ` [PATCH 1/3] dt-bindings: memory-controllers: mediatek,smi-larb: add mt6797 Roman Vivchar via B4 Relay
@ 2026-12-02 18:11 ` Roman Vivchar via B4 Relay
  2026-12-02 18:11 ` [PATCH 3/3] memory: mtk-smi: add mt6797 SMI common support Roman Vivchar via B4 Relay
  2026-12-02 18:29 ` [PATCH 0/3] memory: mtk-smi: mt6797 support Ben Grisdale
  3 siblings, 0 replies; 5+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-12-02 18:11 UTC (permalink / raw)
  To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
	Roman Vivchar

From: Roman Vivchar <rva333@protonmail.com>

Add compatible string for mt6797 SMI common.

While here, also wrap 'generation 2' list to 80 characters.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
 .../devicetree/bindings/memory-controllers/mediatek,smi-common.yaml  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml b/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml
index 65931adcc6fc..a2544f5685fa 100644
--- a/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.yaml
@@ -16,7 +16,8 @@ description: |
   MediaTek SMI have two generations of HW architecture, here is the list
   which generation the SoCs use:
   generation 1: mt2701 and mt7623.
-  generation 2: mt2712, mt6779, mt8167, mt8173, mt8183, mt8186, mt8188, mt8189, mt8192 and mt8195.
+  generation 2: mt2712, mt6779, mt6797, mt8167, mt8173, mt8183, mt8186, mt8188,
+  mt8189, mt8192 and mt8195.
 
   There's slight differences between the two SMI, for generation 2, the
   register which control the iommu port is at each larb's register base. But
@@ -48,6 +49,7 @@ properties:
           - mediatek,mt2712-smi-common
           - mediatek,mt6779-smi-common
           - mediatek,mt6795-smi-common
+          - mediatek,mt6797-smi-common
           - mediatek,mt6893-smi-common
           - mediatek,mt8167-smi-common
           - mediatek,mt8173-smi-common
@@ -175,6 +177,7 @@ allOf:
           enum:
             - mediatek,mt2712-smi-common
             - mediatek,mt6795-smi-common
+            - mediatek,mt6797-smi-common
             - mediatek,mt8167-smi-common
             - mediatek,mt8173-smi-common
             - mediatek,mt8189-smi-common

-- 
2.56.1



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

* [PATCH 3/3] memory: mtk-smi: add mt6797 SMI common support
  2026-12-02 18:11 [PATCH 0/3] memory: mtk-smi: mt6797 support Roman Vivchar via B4 Relay
  2026-12-02 18:11 ` [PATCH 1/3] dt-bindings: memory-controllers: mediatek,smi-larb: add mt6797 Roman Vivchar via B4 Relay
  2026-12-02 18:11 ` [PATCH 2/3] dt-bindings: memory-controllers: mediatek,smi-common: " Roman Vivchar via B4 Relay
@ 2026-12-02 18:11 ` Roman Vivchar via B4 Relay
  2026-12-02 18:29 ` [PATCH 0/3] memory: mtk-smi: mt6797 support Ben Grisdale
  3 siblings, 0 replies; 5+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-12-02 18:11 UTC (permalink / raw)
  To: Yong Wu, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-mediatek, linux-kernel, devicetree, linux-arm-kernel,
	Roman Vivchar

From: Roman Vivchar <rva333@protonmail.com>

Add platform data and initialization settings for the mt6797 SMI common.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
 drivers/memory/mtk-smi.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
index fac6d8c64876..d748c59254fb 100644
--- a/drivers/memory/mtk-smi.c
+++ b/drivers/memory/mtk-smi.c
@@ -915,6 +915,14 @@ static const struct mtk_smi_reg_pair mtk_smi_common_mt6795_init[SMI_COMMON_INIT_
 	{SMI_READ_FIFO_TH, 0x191f},
 };
 
+static const struct mtk_smi_reg_pair mtk_smi_common_mt6797_init[SMI_COMMON_INIT_REGS_NR] = {
+	{SMI_L1LEN, 0xb},
+	{SMI_READ_FIFO_TH, 0x747f},
+	{SMI_M4U_TH, 0xf7e19085},
+	{SMI_FIFO_TH1, 0x43214e8},
+	{SMI_DCM, 0x403},
+};
+
 static const struct mtk_smi_reg_pair mtk_smi_common_mt8195_init[SMI_COMMON_INIT_REGS_NR] = {
 	{SMI_L1LEN, 0xb},
 	{SMI_M4U_TH, 0xe100e10},
@@ -945,6 +953,13 @@ static const struct mtk_smi_common_plat mtk_smi_common_mt6795 = {
 	.init     = mtk_smi_common_mt6795_init,
 };
 
+static const struct mtk_smi_common_plat mtk_smi_common_mt6797 = {
+	.type     = MTK_SMI_GEN2,
+	.bus_sel  = F_MMU1_LARB(1) | F_MMU1_LARB(2) | F_MMU1_LARB(3) |
+		    F_MMU1_LARB(4) | F_MMU1_LARB(5) | F_MMU1_LARB(6),
+	.init     = mtk_smi_common_mt6797_init,
+};
+
 static const struct mtk_smi_common_plat mtk_smi_common_mt6893 = {
 	.type     = MTK_SMI_GEN2,
 	.has_gals = true,
@@ -1030,6 +1045,7 @@ static const struct of_device_id mtk_smi_common_of_ids[] = {
 	{.compatible = "mediatek,mt2712-smi-common", .data = &mtk_smi_common_gen2},
 	{.compatible = "mediatek,mt6779-smi-common", .data = &mtk_smi_common_mt6779},
 	{.compatible = "mediatek,mt6795-smi-common", .data = &mtk_smi_common_mt6795},
+	{.compatible = "mediatek,mt6797-smi-common", .data = &mtk_smi_common_mt6797},
 	{.compatible = "mediatek,mt6893-smi-common", .data = &mtk_smi_common_mt6893},
 	{.compatible = "mediatek,mt8167-smi-common", .data = &mtk_smi_common_gen2},
 	{.compatible = "mediatek,mt8173-smi-common", .data = &mtk_smi_common_gen2},

-- 
2.56.1



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

* Re: [PATCH 0/3] memory: mtk-smi: mt6797 support
  2026-12-02 18:11 [PATCH 0/3] memory: mtk-smi: mt6797 support Roman Vivchar via B4 Relay
                   ` (2 preceding siblings ...)
  2026-12-02 18:11 ` [PATCH 3/3] memory: mtk-smi: add mt6797 SMI common support Roman Vivchar via B4 Relay
@ 2026-12-02 18:29 ` Ben Grisdale
  3 siblings, 0 replies; 5+ messages in thread
From: Ben Grisdale @ 2026-12-02 18:29 UTC (permalink / raw)
  To: Roman Vivchar via B4 Relay
  Cc: rva333, Yong Wu, Krzysztof Kozlowski, Rob Herring, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, linux-mediatek,
	linux-kernel, devicetree, linux-arm-kernel

On Wed, 02 Dec 2026 20:11:45 +0200
"Roman Vivchar via B4 Relay" <devnull+rva333.protonmail.com@kernel.org> wrote:

> This series adds mt6797 SMI common and SMI LARB support. SMI common
> requires both dt-bindings and driver changes, while SMI LARB only needs
> a dt-bindings update as it falls back to mt8167.
> 
> The support was tested on Xiaomi Redmi Note 4 (MTK) with out-of-tree
> DRM support.
> 
> Based on Krzysztof's for-next tree.
> 
> Signed-off-by: Roman Vivchar <rva333@protonmail.com>

Whole series,

Reviewed-by: Ben Grisdale <bengris32@protonmail.ch>

Best regards,
Ben Grisdale


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

end of thread, other threads:[~2026-12-02 18:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 18:11 [PATCH 0/3] memory: mtk-smi: mt6797 support Roman Vivchar via B4 Relay
2026-12-02 18:11 ` [PATCH 1/3] dt-bindings: memory-controllers: mediatek,smi-larb: add mt6797 Roman Vivchar via B4 Relay
2026-12-02 18:11 ` [PATCH 2/3] dt-bindings: memory-controllers: mediatek,smi-common: " Roman Vivchar via B4 Relay
2026-12-02 18:11 ` [PATCH 3/3] memory: mtk-smi: add mt6797 SMI common support Roman Vivchar via B4 Relay
2026-12-02 18:29 ` [PATCH 0/3] memory: mtk-smi: mt6797 support Ben Grisdale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox