Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp410560pxv; Thu, 15 Jul 2021 07:08:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxs/SeNOaWdwh4QS5GH0Ed8weWRl5rAo3wq4xQ2xzfJfPMNYt3S1A0I29zFy4BixtW2ify8 X-Received: by 2002:a5e:c90c:: with SMTP id z12mr3411638iol.192.1626358100732; Thu, 15 Jul 2021 07:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626358100; cv=none; d=google.com; s=arc-20160816; b=PlKJaKzBiVtbtBeEs3ESzuG1pCpmphuP5614hHJRV3bGiPL3zQQElJCzCKgnx7fkj5 lXFEk31icIWaFjQzX0cbgttq+Lzl5CXDYmLeeeOkNPA/tUeRaiJCs/M2FDe4OR+DZqHd KErsGwigKlXSM/0e5XxLBMRMST9tc4YmR1SXxM4V8q/9sNYLRcw0xUzzE/CiL34rLCpY pqaF9hDLqdUh/MqxJVM6MLhL9kRbEcX0jZYI8jG9H4LFRrc9z2fPPT8wHbfW7eaMBt1B CsF89rIFuYvQZeregvHl+qcpdRmwehfspf9NnhlLk3SJBpdA4B7k9b9HUU3l2xHg1enk Icqw== 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=EBf03Ima9FZaoltmK4CKrKYvt2oFLPThkm3vI3O6vdI=; b=IlLCuIMohxYUnDyaHYfa/NTjfmPvuex0cTWc7lQabhLS4EVgrgU8gr0c1uCVje5bj+ NFkjHw88eD7YbpTN4c22vrPqq2vw/d5QKNz4i0lRKigDwnR++nt1qmQzyXMxowbMeY5/ eFkgn7WyT9DCtbrilrw8ALf3F1orQzHg936il/heKsyMLINty3GHBR2BufaFNxZYGD1d /Q/D0DYX9xCAdC++M4G7qAhgNRrFAPRlq/W0UrSnU6Bv0pzh4TNex4WsjbmI9/Gkgx9+ p75ktFyqJXqBY17EJWsyL+J7ecSyYJ7kW/0J53u14XbaGBA9Pryr3m+CJORd0Mw3vxIt zoaQ== 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 w21si7438327jah.86.2021.07.15.07.08.02; Thu, 15 Jul 2021 07:08:20 -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 S235771AbhGOMQh (ORCPT + 99 others); Thu, 15 Jul 2021 08:16:37 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:48398 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235534AbhGOMQg (ORCPT ); Thu, 15 Jul 2021 08:16:36 -0400 X-UUID: 5ea5a78fce34403eb2e2d312fdf8a6d4-20210715 X-UUID: 5ea5a78fce34403eb2e2d312fdf8a6d4-20210715 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1740297775; Thu, 15 Jul 2021 20:13:39 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 15 Jul 2021 20:13:38 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 15 Jul 2021 20:13:37 +0800 From: Yong Wu To: Krzysztof Kozlowski , Rob Herring , Matthias Brugger CC: Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Tomasz Figa , , , , , , , , , , , , Subject: [PATCH v2 09/11] memory: mtk-smi: mt8195: Add smi support Date: Thu, 15 Jul 2021 20:12:07 +0800 Message-ID: <20210715121209.31024-10-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210715121209.31024-1-yong.wu@mediatek.com> References: <20210715121209.31024-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 --- drivers/memory/mtk-smi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index e5a34b3952a0..3c288716a378 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -250,6 +250,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}, @@ -258,6 +262,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}, {} }; @@ -430,6 +435,21 @@ 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, + .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, + .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, +}; + 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}, @@ -438,6 +458,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