Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp591769pxb; Tue, 14 Sep 2021 04:41:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm44oSMBVvoIHdExWjPUS5kMhwcQ/osDjlB3RYRzgHI9V9La0Ici/UcoXVEhLjI7P0LNve X-Received: by 2002:a17:906:2345:: with SMTP id m5mr6458133eja.557.1631619682070; Tue, 14 Sep 2021 04:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631619682; cv=none; d=google.com; s=arc-20160816; b=rQlP33Z01cObsi5JBpA/A6Fy1jeHwcv2NeILxyq7y1MXB3ouNEU6nB7l02XIpm5T7I iGxOZD5wb2bPdXi2wNEB+Fv0zHla8H38alxuTXs3M6m2Dlub0a6fi1fCIPtAo582U3Yo wOWLqpY/krd91LNGpWLZ8tMa/3UeORBeOsjhRue3GCATcaGkXgbvlEERXbn1txZOnuE7 FY1t9cnINNkyV9XbRH30v4tNFl+rcqZtTtajUbY52easdMbluCuisc9W4GBoOsUSQkEN yrkap8ZEWBT+dHtnqBex8ApRRSaXQPVsj2gwrNFTST93782PcYocnxYZLkYATwd/XAO0 zUHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=WSCLav2+me62jr0KfprzIN8DRuwVz92fo0TLHNO7BOc=; b=0TgrToorMr+tg3UtyzwRZEygr8fZAfFvBOX3ztvpxnYem+7JTYxQ/KctLtaEDgQfRN 6spoiJo9EL2D0DU4ZkTblCDjAOAqlkB/cNurTs65RJEttOHp/uNebdkaTxNO07I0FLyv qlGBHwK21JJclQkBk37KRNgFeuv9D+9Qg5ruv1gLhoKW46L2j3a+yyjjc304bcIgdqv/ htRzqv5WI6aC+4xnrdxBWchFy7Og+700BPJPm1RuoiFZE1PsCee45JTCdR+cPnXUfQyp JL9u1Hwp8LdirZamzkvToqvnHFyjwjllP2FdcQirMMUYPnRaIb8Qutsww03Kp6lafhIT 7u9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si9627218ejv.493.2021.09.14.04.40.56; Tue, 14 Sep 2021 04:41:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232296AbhINLkY (ORCPT + 99 others); Tue, 14 Sep 2021 07:40:24 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:55044 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232253AbhINLkX (ORCPT ); Tue, 14 Sep 2021 07:40:23 -0400 X-UUID: 8c3b3e21eeb9467c822aef4504a3f2a5-20210914 X-UUID: 8c3b3e21eeb9467c822aef4504a3f2a5-20210914 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 614894277; Tue, 14 Sep 2021 19:39:01 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 14 Sep 2021 19:38:59 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 14 Sep 2021 19:38:58 +0800 From: Yong Wu To: Krzysztof Kozlowski , Rob Herring , Matthias Brugger CC: Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Tomasz Figa , , , , , , , , , , , , , Ikjoon Jang Subject: [PATCH v4 10/13] memory: mtk-smi: mt8195: Add smi support Date: Tue, 14 Sep 2021 19:37:00 +0800 Message-ID: <20210914113703.31466-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210914113703.31466-1-yong.wu@mediatek.com> References: <20210914113703.31466-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MT8195 has two smi-common, their IP are the same. Only the larbs that connect with the smi-common are different. thus the bus_sel are different for the two smi-common. Signed-off-by: Yong Wu Reviewed-by: Ikjoon Jang --- drivers/memory/mtk-smi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index a001e41f5074..35853ba980c9 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -261,6 +261,10 @@ static const struct mtk_smi_larb_gen mtk_smi_larb_mt8192 = { .config_port = mtk_smi_larb_config_port_gen2_general, }; +static const struct mtk_smi_larb_gen mtk_smi_larb_mt8195 = { + .config_port = mtk_smi_larb_config_port_gen2_general, +}; + static const struct of_device_id mtk_smi_larb_of_ids[] = { {.compatible = "mediatek,mt2701-smi-larb", .data = &mtk_smi_larb_mt2701}, {.compatible = "mediatek,mt2712-smi-larb", .data = &mtk_smi_larb_mt2712}, @@ -269,6 +273,7 @@ static const struct of_device_id mtk_smi_larb_of_ids[] = { {.compatible = "mediatek,mt8173-smi-larb", .data = &mtk_smi_larb_mt8173}, {.compatible = "mediatek,mt8183-smi-larb", .data = &mtk_smi_larb_mt8183}, {.compatible = "mediatek,mt8192-smi-larb", .data = &mtk_smi_larb_mt8192}, + {.compatible = "mediatek,mt8195-smi-larb", .data = &mtk_smi_larb_mt8195}, {} }; @@ -443,6 +448,24 @@ static const struct mtk_smi_common_plat mtk_smi_common_mt8192 = { F_MMU1_LARB(6), }; +static const struct mtk_smi_common_plat mtk_smi_common_mt8195_vdo = { + .type = MTK_SMI_GEN2, + .has_gals = true, + .bus_sel = 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_common_mt8195_vpp = { + .type = MTK_SMI_GEN2, + .has_gals = true, + .bus_sel = F_MMU1_LARB(1) | F_MMU1_LARB(2) | F_MMU1_LARB(7), +}; + +static const struct mtk_smi_common_plat mtk_smi_sub_common_mt8195 = { + .type = MTK_SMI_GEN2_SUB_COMM, + .has_gals = true, +}; + static const struct of_device_id mtk_smi_common_of_ids[] = { {.compatible = "mediatek,mt2701-smi-common", .data = &mtk_smi_common_gen1}, {.compatible = "mediatek,mt2712-smi-common", .data = &mtk_smi_common_gen2}, @@ -451,6 +474,9 @@ static const struct of_device_id mtk_smi_common_of_ids[] = { {.compatible = "mediatek,mt8173-smi-common", .data = &mtk_smi_common_gen2}, {.compatible = "mediatek,mt8183-smi-common", .data = &mtk_smi_common_mt8183}, {.compatible = "mediatek,mt8192-smi-common", .data = &mtk_smi_common_mt8192}, + {.compatible = "mediatek,mt8195-smi-common-vdo", .data = &mtk_smi_common_mt8195_vdo}, + {.compatible = "mediatek,mt8195-smi-common-vpp", .data = &mtk_smi_common_mt8195_vpp}, + {.compatible = "mediatek,mt8195-smi-sub-common", .data = &mtk_smi_sub_common_mt8195}, {} }; -- 2.18.0