Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3451235pxt; Tue, 10 Aug 2021 04:05:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXjHPQg2wTuUZVe35ymTgqyJdq9Q19wpBdtgbOQCxEdaUVfaIhbaXXehZvStDI1wMPzFt/ X-Received: by 2002:a5d:9f11:: with SMTP id q17mr1344516iot.62.1628593507166; Tue, 10 Aug 2021 04:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628593507; cv=none; d=google.com; s=arc-20160816; b=ufF0Ka/cAS612Hivv7I6r8a09UmrNrAzS63mj3Jn3lj9EKLfFi1ZbHlzbDbqPZDgFa 8PlxDwEDalCZeL8HV5CjEzlzOTb0yGx2EcN/61n2YHtmjBG+lgkuwP4MNEHBKxTF/Iab buqNuiTNaO8tY0ef03wUiu504JRa5Jk1NAbqxSqDGYsQAa9I9AEg6mdP4/mYItO1AlIx r5LeIll7S/dIDa8f7IcVio56wiCw2+jJ+b22evSaxLbtYWnwe2bZSqslpmTteVm2/8mq i+OVJlnHmi02GllZJBec7Xl2Yci8ijDXQCqRes1gONszAITc7r2RQVjLlvtW8owXPzXn m0DQ== 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=iDSrCsfOd2+qp8a8Al1pnyCuXI+DdAWw6T0hDhR5631csGUf4wUsNNOkiE9SG9+LYl DRPWNMvDgG/2pIkug+cpS2PlyNoX0FVq6VuwUEF9yIoez04/+/iqIID0CKHbjn0qIGzm 0v9iHPR8Kc2EEqmrFLKAtU07dR5njWiZBbBuT+NL7gMjkIU3QRPhPJL1E6GnxffiF5PG 2n1vkceUH0YQofsPnePCuBmri7Q/yybA6Vc9dw7+S4S58OQNDKEyR5m2dJdMbQUcxiV8 SkVlnVkxVN3suV21sA9YnHo9CgjqzaRybMv97BsIjDnhlVgWpSD5ZMXZCSTQTXPiy15T Up5A== 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 g17si21750358jao.103.2021.08.10.04.04.33; Tue, 10 Aug 2021 04:05:07 -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 S238022AbhHJIMJ (ORCPT + 99 others); Tue, 10 Aug 2021 04:12:09 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:51958 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S238025AbhHJILJ (ORCPT ); Tue, 10 Aug 2021 04:11:09 -0400 X-UUID: 5b38a538ee4948d3a8ca09b184146a47-20210810 X-UUID: 5b38a538ee4948d3a8ca09b184146a47-20210810 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1917217334; Tue, 10 Aug 2021 16:10:35 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 10 Aug 2021 16:10:33 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 10 Aug 2021 16:10:32 +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 v3 10/13] memory: mtk-smi: mt8195: Add smi support Date: Tue, 10 Aug 2021 16:08:56 +0800 Message-ID: <20210810080859.29511-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210810080859.29511-1-yong.wu@mediatek.com> References: <20210810080859.29511-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