From nobody Fri Jul 24 23:31:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADA5340D565; Wed, 22 Jul 2026 09:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784712204; cv=none; b=npZNrSrA72HD5hdUvJK0ypCMHxiUFGmTw0AwutB/jdnn/BaeswGgp6N32yvEIu/Xb9z22cpSYUm651lm/XQNUbz396aF4ksyKlKybn3RGCFQfa0o55rZqxRQDY7Ajy9/3s69Ah3Noun9bzclHIBnjrTURcLrZNlzf7uyxfr/Imo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784712204; c=relaxed/simple; bh=EV7iUo1NsjFqcITJtzVqmOKRWQ1ecKxaV381yInG0ho=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UIkkK8NwxsvVenv0CcHJya1soO+jknycDQQ/i1Eyfv7QZ/4nb6F/J0wm8mYcuk4YxyaOw0uDxAuyFKlUqMYnmWmAcz6X0StEXrFm6YtmezVLh7++vxs43E7EBgHNGq76wmhLiHhIF/TgSOU6SwOB1zT/Y7I95JzkltDYik/UFAw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Iw8u0HnX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Iw8u0HnX" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4BFF6C2BCF7; Wed, 22 Jul 2026 09:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784712204; bh=EV7iUo1NsjFqcITJtzVqmOKRWQ1ecKxaV381yInG0ho=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Iw8u0HnX5Gf/mwUmnYHLH8TLpVK0B4khS4FKzf/ovgkGeM+ghGYlLKUlNywirhyM3 dURNxP9D5SqNuWnRKXiNllru6RCaVMuQJBkmYHpQN/BwQWONkk4y3cADUcElvCpWID cgcA4oni9X2wHgzd+A2jV0N5ZC2muPYM/O8uGS2EjPd5FGVVG4OS7FQZf8PkvpPJwK dhfJaL9XWlBXK753GvZKYqxPZML+tNC3yD3hXf2TUxRHB2z+6NEvc2h6G7cuD/HWTI ggvTguf+/10o1HHyZEK+6F6WXyDiDDh8m8k6AFNgYooCMzsv9mfXJ6+uQFEVF+GbnV fV3CMfQRNG9Sw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0341AC4453A; Wed, 22 Jul 2026 09:23:24 +0000 (UTC) From: Congcong Yao via B4 Relay Date: Wed, 22 Jul 2026 17:21:57 +0800 Subject: [PATCH RESEND 1/2] memory: mtk-smi: Add mt8189 support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260722-8189-smi-support-v1-1-b528a4fd878c@mediatek.com> References: <20260722-8189-smi-support-v1-0-b528a4fd878c@mediatek.com> In-Reply-To: <20260722-8189-smi-support-v1-0-b528a4fd878c@mediatek.com> To: Yong Wu , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Conor Dooley Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Congcong Yao X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784712202; l=4625; i=congcong.yao@mediatek.com; s=20260722; h=from:subject:message-id; bh=wS9TOb8YOqNWavcXHnJhOL4NUnuoZhgp5xywhpZ31s8=; b=j9Byvd1wUksLvcO9bocy+R/VXlkiWPdsepniqnCsMAV3g11lCTvRYsTAXyhNKDgJ7CGl6kOWC CE+9KbgbgtsC/f0DZKln/9i36EPzqyH2lmDndwTLaGDbOCnay/7ir3D X-Developer-Key: i=congcong.yao@mediatek.com; a=ed25519; pk=tIrmGxKQQxnfyb48iCCd19063tppPj89U3nupGYAIxg= X-Endpoint-Received: by B4 Relay for congcong.yao@mediatek.com/20260722 with auth_id=889 X-Original-From: Congcong Yao Reply-To: congcong.yao@mediatek.com From: Congcong Yao Add the necessary platform data and ostdl setting to enable support for mt8189 smi. Signed-off-by: Congcong Yao Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Yong Wu --- drivers/memory/mtk-smi.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index aaeba8ab211e..f2d5462af681 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -401,6 +401,30 @@ static const u8 mtk_smi_larb_mt8188_ostd[][SMI_LARB_PO= RT_NR_MAX] =3D { [25] =3D {0x01}, }; =20 +static const u8 mtk_smi_larb_mt8189_ostd[][SMI_LARB_PORT_NR_MAX] =3D { + [0] =3D {0x8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x0,}, + [1] =3D {0x8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x0,}, + [2] =3D {0x7, 0x7, 0x4, 0x4, 0x0, 0x0, 0x2, 0x2, 0x7, 0x7, 0x0,}, + [4] =3D {0x2F, 0x1E, 0x9, 0x1, 0x1, 0x1, 0x1, 0x2, 0x2, 0x5, 0x1, 0x17,}, + [7] =3D {0x20, 0x2, 0x1, 0x1, 0x1, 0x4, 0x2, 0x1, 0x1, 0x2, 0x3, 0x2, + 0xA, 0xF, 0x4, 0x6, 0x5, 0x1,}, + [9] =3D {0x6, 0x3, 0xC, 0x6, 0x1, 0x4, 0x3, 0x1, 0x2, 0x4, 0x5, 0x2, + 0x4, 0x2, 0x3, 0xB, 0x1, 0x4, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, + 0x1, 0x1,}, + [11] =3D {0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, + 0x1, 0x1, 0x1, 0xB, 0x1, 0x4, 0x6, 0x5, 0x6, 0x1, 0x5, 0x2, + 0x9, 0x5,}, + [13] =3D {0x2, 0x8, 0x8, 0x8, 0x4, 0x4, 0x4, 0x4, 0x4, 0xE, 0x4, 0x1, + 0x6, 0x6, 0x2,}, + [14] =3D {0x1, 0x1, 0x1, 0x20, 0xE, 0x4, 0x8, 0x8, 0x6, 0x4,}, + [16] =3D {0x1E, 0xC, 0x2, 0x8, 0xE, 0x2, 0x1E, 0x10, 0x4, 0x2, 0x2, 0x2, + 0x2, 0x2, 0x4, 0x2, 0x4,}, + [17] =3D {0x1E, 0xC, 0x2, 0x8, 0xE, 0x2, 0x1E, 0x10, 0x4, 0x2, 0x2, 0x2, + 0x2, 0x2, 0x4, 0x2, 0x4,}, + [19] =3D {0x2, 0x1, 0x3, 0x1,}, + [20] =3D {0x7, 0x7, 0x3, 0x3, 0x1, 0x1,}, +}; + static const u8 mtk_smi_larb_mt8192_ostd[][SMI_LARB_PORT_NR_MAX] =3D { [0] =3D {0x2, 0x2, 0x28, 0xa, 0xc, 0x28,}, [1] =3D {0x2, 0x2, 0x18, 0x18, 0x18, 0xa, 0xc, 0x28,}, @@ -533,6 +557,13 @@ static const struct mtk_smi_larb_gen mtk_smi_larb_mt81= 88 =3D { .ostd =3D mtk_smi_larb_mt8188_ostd, }; =20 +static const struct mtk_smi_larb_gen mtk_smi_larb_mt8189 =3D { + .config_port =3D mtk_smi_larb_config_port_gen2_general, + .flags_general =3D MTK_SMI_FLAG_THRT_UPDATE | MTK_SMI_FLAG_SW= _FLAG | + MTK_SMI_FLAG_SLEEP_CTL | MTK_SMI_FLAG_CFG_PORT_SEC_CTL, + .ostd =3D mtk_smi_larb_mt8189_ostd, +}; + static const struct mtk_smi_larb_gen mtk_smi_larb_mt8192 =3D { .config_port =3D mtk_smi_larb_config_port_gen2_general, .ostd =3D mtk_smi_larb_mt8192_ostd, @@ -556,6 +587,7 @@ static const struct of_device_id mtk_smi_larb_of_ids[] = =3D { {.compatible =3D "mediatek,mt8183-smi-larb", .data =3D &mtk_smi_larb_mt81= 83}, {.compatible =3D "mediatek,mt8186-smi-larb", .data =3D &mtk_smi_larb_mt81= 86}, {.compatible =3D "mediatek,mt8188-smi-larb", .data =3D &mtk_smi_larb_mt81= 88}, + {.compatible =3D "mediatek,mt8189-smi-larb", .data =3D &mtk_smi_larb_mt81= 89}, {.compatible =3D "mediatek,mt8192-smi-larb", .data =3D &mtk_smi_larb_mt81= 92}, {.compatible =3D "mediatek,mt8195-smi-larb", .data =3D &mtk_smi_larb_mt81= 95}, {} @@ -808,6 +840,16 @@ static const struct mtk_smi_common_plat mtk_smi_common= _mt8188_vpp =3D { .init =3D mtk_smi_common_mt8195_init, }; =20 +static const struct mtk_smi_common_plat mtk_smi_common_mt8189 =3D { + .type =3D MTK_SMI_GEN2, + .bus_sel =3D F_MMU1_LARB(1) | F_MMU1_LARB(3) | F_MMU1_LARB(5) | + F_MMU1_LARB(7), +}; + +static const struct mtk_smi_common_plat mtk_smi_sub_common_mt8189 =3D { + .type =3D MTK_SMI_GEN2_SUB_COMM, +}; + static const struct mtk_smi_common_plat mtk_smi_common_mt8192 =3D { .type =3D MTK_SMI_GEN2, .has_gals =3D true, @@ -852,6 +894,8 @@ static const struct of_device_id mtk_smi_common_of_ids[= ] =3D { {.compatible =3D "mediatek,mt8186-smi-common", .data =3D &mtk_smi_common_= mt8186}, {.compatible =3D "mediatek,mt8188-smi-common-vdo", .data =3D &mtk_smi_com= mon_mt8188_vdo}, {.compatible =3D "mediatek,mt8188-smi-common-vpp", .data =3D &mtk_smi_com= mon_mt8188_vpp}, + {.compatible =3D "mediatek,mt8189-smi-common", .data =3D &mtk_smi_common_= mt8189}, + {.compatible =3D "mediatek,mt8189-smi-sub-common", .data =3D &mtk_smi_sub= _common_mt8189}, {.compatible =3D "mediatek,mt8192-smi-common", .data =3D &mtk_smi_common_= mt8192}, {.compatible =3D "mediatek,mt8195-smi-common-vdo", .data =3D &mtk_smi_com= mon_mt8195_vdo}, {.compatible =3D "mediatek,mt8195-smi-common-vpp", .data =3D &mtk_smi_com= mon_mt8195_vpp}, --=20 2.43.0 From nobody Fri Jul 24 23:31:02 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A518E4028FA; Wed, 22 Jul 2026 09:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784712204; cv=none; b=Mh9P5YVZq9DUp7PrTd1K1J9ojaOOKgQGLprzeav8j2zsWfApr249lXjHG7vxrhL/L9B4MMjOIuYdipKGutTsFg5a9JZlE6XUwSJAItlQ4+zQ/bcMD9eX/5rvjwfdxe/mTyNrEocHJy/zqQWblt13hnza7QtbMa1e9ItcKK9sY8E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784712204; c=relaxed/simple; bh=5XWm0CYXpmO4KIt62r5OvlwOr5GLzpGa2LTrVyhC370=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bQdF6IxDaGwd4sIxoixcz8HDE6pg6Z6RTNNXZmOAUM181gx0FFyrAafWwfFYcB04s710wFqswkg9dxUnTeiaQnvWK8tsCjr/u2RIv2pP9Mn8i3VUtbM+wLizJa3J4oOPmXTQHNc5YfXVpcW75P0WbfBCgh5q01lzNISAAjdm7Z0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a1oMk8mB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a1oMk8mB" Received: by smtp.kernel.org (Postfix) with ESMTPS id 7AD93C2BCFB; Wed, 22 Jul 2026 09:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784712204; bh=5XWm0CYXpmO4KIt62r5OvlwOr5GLzpGa2LTrVyhC370=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=a1oMk8mBV1pe8CO+cbg1KeNfES+9R3ABYkG7aeStkIx1WNCJHq/pnJeq7wAs3OVOv 5pzTYKaIddy5aQWnWWVtOBPJferqLAh+gcN/GgzF47NCYCwSkGdm7m7wY0jiiGaZNK votXyRUdfEhlxmq9plyn41wV6kJdYaxGeeAYMY/bV00nyVtf/ASqrinYKnOfFe0Xq6 KCDo/mWzj/Y1Nw7aLcBRXjN1FOAa+7rQmkxnMuMDzblxtdrDZLfMlgtAWkS1eMAy// O8PtjcWMc81EgR+QRrOsUh+I7K958A0iR7NrDLnAe7mcAad9uq6us2IsyayVumoKtG L0N4DPon03/YQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BE58C4453D; Wed, 22 Jul 2026 09:23:24 +0000 (UTC) From: Congcong Yao via B4 Relay Date: Wed, 22 Jul 2026 17:21:58 +0800 Subject: [PATCH RESEND 2/2] dt-bindings: memory-controllers: mtk-smi: Add support for mt8189 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260722-8189-smi-support-v1-2-b528a4fd878c@mediatek.com> References: <20260722-8189-smi-support-v1-0-b528a4fd878c@mediatek.com> In-Reply-To: <20260722-8189-smi-support-v1-0-b528a4fd878c@mediatek.com> To: Yong Wu , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Rob Herring , Conor Dooley Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Congcong Yao X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784712202; l=3542; i=congcong.yao@mediatek.com; s=20260722; h=from:subject:message-id; bh=RfjGr9dS2BPv3kvuxEnkhOj9VPQPmNK7ihihb5BjbNg=; b=QoC+KkVN5+iRz4rt2bxJ1m7Pl3A3tv/2W5yWv/URnqQVugSSJtwLKVq8sawCC2pKt8h96YxWx 33XTHSbhj27CBA2PODFg9psJenWw91IxALzWlHRFKuAv1RoyfM+GyDV X-Developer-Key: i=congcong.yao@mediatek.com; a=ed25519; pk=tIrmGxKQQxnfyb48iCCd19063tppPj89U3nupGYAIxg= X-Endpoint-Received: by B4 Relay for congcong.yao@mediatek.com/20260722 with auth_id=889 X-Original-From: Congcong Yao Reply-To: congcong.yao@mediatek.com From: Congcong Yao Add smi larb, common and sub-commom binding description for mt8189. About what smi-sub-common is, please check the below diagram, we add it in mediatek,smi-common.yaml file. Signed-off-by: Congcong Yao Reviewed-by: AngeloGioacchino Del Regno --- .../memory-controllers/mediatek,smi-common.yaml | 18 ++++++++++++++= ++++ .../bindings/memory-controllers/mediatek,smi-larb.yaml | 3 +++ 2 files changed, 21 insertions(+) diff --git a/Documentation/devicetree/bindings/memory-controllers/mediatek,= smi-common.yaml b/Documentation/devicetree/bindings/memory-controllers/medi= atek,smi-common.yaml index 0762e0ff66ef..4e1deeff92b1 100644 --- a/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-com= mon.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-com= mon.yaml @@ -25,6 +25,21 @@ description: | SMI generation 1 to transform the smi clock into emi clock domain, but t= hat is not needed for SMI generation 2. =20 + The smi-common connects with smi-larb and IOMMU. The maximum inputs numb= er of + a smi-common is 8. In SMI generation 2, the engines number may be over 8. + In this case, we use a smi-sub-common to merge some larbs. + The block diagram something is like: + + IOMMU + | | + smi-common + --------------------------- + | | ... + larb0 sub-common ... <-max number is 8 + ---------------- + | | ... + larb1 larbX ... <-max number is 8 + properties: compatible: oneOf: @@ -40,6 +55,8 @@ properties: - mediatek,mt8186-smi-common - mediatek,mt8188-smi-common-vdo - mediatek,mt8188-smi-common-vpp + - mediatek,mt8189-smi-common + - mediatek,mt8189-smi-sub-common - mediatek,mt8192-smi-common - mediatek,mt8195-smi-common-vdo - mediatek,mt8195-smi-common-vpp @@ -108,6 +125,7 @@ allOf: compatible: contains: enum: + - mediatek,mt8189-smi-sub-common - mediatek,mt8195-smi-sub-common then: required: diff --git a/Documentation/devicetree/bindings/memory-controllers/mediatek,= smi-larb.yaml b/Documentation/devicetree/bindings/memory-controllers/mediat= ek,smi-larb.yaml index 2e7fac4b5094..9a5dafd7c07e 100644 --- a/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-lar= b.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/mediatek,smi-lar= b.yaml @@ -27,6 +27,7 @@ properties: - mediatek,mt8183-smi-larb - mediatek,mt8186-smi-larb - mediatek,mt8188-smi-larb + - mediatek,mt8189-smi-larb - mediatek,mt8192-smi-larb - mediatek,mt8195-smi-larb =20 @@ -85,6 +86,7 @@ allOf: - mediatek,mt8183-smi-larb - mediatek,mt8186-smi-larb - mediatek,mt8188-smi-larb + - mediatek,mt8189-smi-larb - mediatek,mt8195-smi-larb =20 then: @@ -119,6 +121,7 @@ allOf: - mediatek,mt6779-smi-larb - mediatek,mt8186-smi-larb - mediatek,mt8188-smi-larb + - mediatek,mt8189-smi-larb - mediatek,mt8192-smi-larb - mediatek,mt8195-smi-larb =20 --=20 2.43.0