Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp409903pxj; Wed, 16 Jun 2021 05:24:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN1DiP8O3bHf35Y4DLGz6FyK9udlX86+NxeO1YNGjlg6jO6rWS0YxlE+cLhxjAF4XBe+DJ X-Received: by 2002:a05:6e02:1523:: with SMTP id i3mr3698045ilu.12.1623846290280; Wed, 16 Jun 2021 05:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623846290; cv=none; d=google.com; s=arc-20160816; b=hTXzaiiPL6ENN+Km70foF9uM9DDH5MsGWrI9apXeaExrWhq0Uzaq4e83xLgROJUp9e /JxXbdnY7hZltS181mGIH0ActKo5zcKW+hsCObqxwI4DeqAokwnYLlzn2iCRFdgOV4Xn Auv18Wfi5LEClH67UEljF4xGnULmX4Nd1aJyFWeGjed266wTlSIzfqwGDc9uiYX8m/cJ /MrFkBfw9jCsT50tQNVf6payeipkPEadksqqjp8a0sTzm9W5H0uRaQOXIqchXWRgS6+A o/dmowx2Q6v7w6RM3zDmQUmC2G8ZfyoHZqiPmGtZu5IsGSAYZiOEDWxVgCO7AAas+2lK H8gg== 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=2BQm2/Ct0PthAD604FCqGLJXuxYtd9g+Ul1yifed31w=; b=JY71xjgObH7g0XQEO336kWllr8pdIQmzpzwi/yhp/RYe6wv/R+cThiWFz8yreqQbWp RgOiz2Zqu8B4/CnGGNQZU0+yIGfv+3sVB42fUzB8GYiLlmn4VBnCK9yQHs8rPdvQ0l0Z MuJPfl+DPKiJq8T+jVsAJyP0rtZsTyMCkvnZUKaCpG3Q19kiF8ELaYyRmMc2EHmg+cpJ ZhqsuvIH8wLmUQFfon9u5VvLlmpGbYq2pQcZAQeupRzISdJTNurJWWemVtqXAUgRv8rJ P61+g2PxY9qGWS3a5eXM3r9Bp3Rz/Y7zoSgJcdAQDYgKtk7PER9VomQKoNAbmcorMhUd Etdg== 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 x1si2712192jas.11.2021.06.16.05.24.37; Wed, 16 Jun 2021 05:24:50 -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 S232614AbhFPLrR (ORCPT + 99 others); Wed, 16 Jun 2021 07:47:17 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:32913 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230330AbhFPLrQ (ORCPT ); Wed, 16 Jun 2021 07:47:16 -0400 X-UUID: 48e1402c2b494d83b79bee0a1d2ead91-20210616 X-UUID: 48e1402c2b494d83b79bee0a1d2ead91-20210616 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1401261913; Wed, 16 Jun 2021 19:45:09 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Jun 2021 19:45:02 +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; Wed, 16 Jun 2021 19:45:01 +0800 From: Yong Wu To: Krzysztof Kozlowski , Rob Herring , Matthias Brugger CC: Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Tomasz Figa , , , , , , , , , , , Subject: [PATCH 7/9] memory: mtk-smi: mt8195: Add smi support Date: Wed, 16 Jun 2021 19:43:44 +0800 Message-ID: <20210616114346.18812-8-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210616114346.18812-1-yong.wu@mediatek.com> References: <20210616114346.18812-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. the IP are the same. only the larbs that connect with the smi-common are different. thus the bus_sel is 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 fa3a14605dc2..8b1bfef47ecd 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -286,6 +286,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}, @@ -294,6 +298,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}, {} }; @@ -408,6 +413,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}, @@ -416,6 +436,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