From patchwork Wed Apr 5 08:06:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13201389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 89013C7619A for ; Wed, 5 Apr 2023 08:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9iwv2bSP6YSuB9Lr7t1uKpV7xiWxPd6L1K5AtKtcmTo=; b=auK5gXbR/UQ63W aaHPR0OF1Zv7cynut981FHgmhrAmq9M60rsq2FI56pdogNG6LNZDvfCKuHEmirfYLsFm6ltO/eLMK gFLwcqvd/iCuEZSrd+BAP4DypnAmjvEbRq3wEib+njzqiL9w+t5IQ8PxPOylA0vMrkUUJd+IpLPqa epQ+MP99qR+dIZiABclNLvsUvAGV2R5w4cj/1KdwnqxjYrYI8u0qnwr3MrfEOkA47xn/wG2ajnpu1 uQnfVDja0KSRntbulnppKgKyfwO1BNP3k5b1vrGdhz65JnqhOLjsCkmGp4rd8Q9QRjFa0y+uJm4uC kCGhEwrlqF8+09loW6Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjylw-003pnH-2R; Wed, 05 Apr 2023 08:45:40 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjylv-003plo-0e for linux-arm-kernel@bombadil.infradead.org; Wed, 05 Apr 2023 08:45:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=33253isHt4S+J+nSLFy8mmWQtMLkRh8HjGdIrP7lEuQ=; b=EdzJrOHp8iwUVIzfzNQIL8QfHV A6qaBfUs2YFpFM0NJ06obT8HCGjSffDDcuEfOToOWKkgabymaKV2h2aoq2nuWCKiJIW68uanLFuJ+ OyzczeGrxVdqUlQA3YHZqD9E7/N5JNZcC6FSzoI+8n0rZTLA/CL6gKm7A/Qf9CDjI9K0X4wCOVuOT NusursPraI+dTGreU7G5YNBMLco1dZvLwCs5t3tTYFnbohstfdDwiJ+EGlz/SyFH3cfLdu4F0hlnb Y2GBnB98mtY4enJfL3brZiA5QTDTtaBvg1nuB4Ke3RfsW7ZN2ICR84fyQNlsgqCOMuWQNKiR1Xq2I xgqGd2ZQ==; Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjyBV-009pUa-1M for linux-arm-kernel@lists.infradead.org; Wed, 05 Apr 2023 08:08:08 +0000 Received: by mail-wm1-x329.google.com with SMTP id v6-20020a05600c470600b003f034269c96so11208706wmo.4 for ; Wed, 05 Apr 2023 01:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680682078; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=33253isHt4S+J+nSLFy8mmWQtMLkRh8HjGdIrP7lEuQ=; b=Yc0/OBGpl7E8efDzxB5jgr2ofIfukmILIBfP2QyerHUtDy5nkPLJ3RoLd5pgQS9eZP eXgMfqiWxFlb3SGYMfy7+KO33PVHgc5o+iTysoWqWRKVqLAHoUZYn56XnIsnIDxwQspD VPZUEktSxHQVUb5SvQnC82cCQue8ELO5rxTkBGzTqhjeleM6aqQFk3q0jtggEjqYGNog s2exPDJI4a7khjCU3mqDzSM1BWyOYA2LXjlUFbZFbuLsDRvC3VcNywbTmoxBqSAXwlR8 uCD7I5dAJNY4TcHBU+MwdrAycwdtxDIypzdNqmiQ8FQaP/ZE5C2/GLT+lc0qVy1rZYHh zMcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680682078; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=33253isHt4S+J+nSLFy8mmWQtMLkRh8HjGdIrP7lEuQ=; b=X8pMTqlfVAh9EBK/5j6V2oFmFdI21RwF+uGZZgSshAmKRh7L5w3INjRuHrVYFbeaJh 9z2juSZ1WV+TvEMMyhE/nQa+9U5JqjHGspJpz5bHMzB55d7FXLjWdfEnXTiL0gGy7bf7 Cxhr90qFL28rHlY0eM6enbfZQSVY8UEG3DSEq0Dd9dIT5y/i1iCsEdkW0UHSAgqbQJgq EMgKQz0HSz5Xold9Fmy+DaIU4kRIzLSxc2uriJCTbTPjZp0kb+Y6cO8P0YKtW7zD90ko emcoIEScLlN2tYPPi9YSCjXO3inSdosEgU9+n0OZDb4B4H0xD4P/vhfQrA0+OQ+OQNg7 G4OA== X-Gm-Message-State: AAQBX9d9ET3IPcTu7j4nQrEC6HPVlBe8DNSVLVRD9KdcLK0/94Dfboe1 4Sc+AJ82tNLqObk414Qtavfid1cY2r5eaCwkcgQ= X-Google-Smtp-Source: AKy350a6vYxum9a+B7CUUnBSWwVcA/VkgqgawFsnIiacY7QtYMO9m0nHPcUziXUysydrFPVUfZdi4Q== X-Received: by 2002:a7b:c5c1:0:b0:3ef:67fc:ff02 with SMTP id n1-20020a7bc5c1000000b003ef67fcff02mr4088941wmk.7.1680682078427; Wed, 05 Apr 2023 01:07:58 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id d4-20020a05600c3ac400b003ee8a1bc220sm1378395wms.1.2023.04.05.01.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 01:07:58 -0700 (PDT) From: Alexandre Mergnat Date: Wed, 05 Apr 2023 10:06:52 +0200 Subject: [PATCH v2 10/10] memory: mtk-smi: mt8365: Add SMI Support MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v2-10-60d5fa00e4e5@baylibre.com> References: <20230207-iommu-support-v2-0-60d5fa00e4e5@baylibre.com> In-Reply-To: <20230207-iommu-support-v2-0-60d5fa00e4e5@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1318; i=amergnat@baylibre.com; h=from:subject:message-id; bh=z26cWVr1UM3WDlPLOHdYFNM2IHS6opWfJrlRsd4fTCY=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkLSxTsz6MktT8KmhJmOCte7lvIAMRb5YfYP6mGtBz Tuody/mJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC0sUwAKCRArRkmdfjHURW48EA CY1vLd79NTra4MIV+COGshV23I/tjs0l86iK561zWyv6IFf6I6eV4l5XJo9t0pM+H35/79rGeCNZw9 Ru96C6/1sPUSEK7MccPSyavM/1pMv0VY9DbyFYsoKmcPcNjrAWpiCMTNYhkN/NpMNOPPTRHcBn5Ts9 lB2jkZkcwEX+aVYIoJY9Nn3lAUyLFs2G4EX5ut430Q52qgF/6tLgXNg9htaYK3BsL4hJkD/jQ0BJaJ ezvB8rnPno5pS5W90Bi/MM8R/bCKZn5JQsjw2CGPPEmHFBksYCMrg+1eaQSEvqJlgNYSA8LeDQ87V1 tKmPavZBUH+5zTRA0boN4bNO6d5e4+CQk8xEoPPQZwFmdtuxyJHhLzad+okWzOyfk7vVd8Rh+oIXQO MC1Dz2eRp/sV1QlHsZqJoPLP3wHgTeQG2w5iY6EIGQE50CXQXQ0JAbk0PaZq7FgTXK+bGwVk6Wk8cc HVxN57HMFJxvd3gZJaFKPak98NrK0jEA4XAZVF9SftZmO/7dCn7t85UsVSBqck4IkVr0ZW8BFm81vB qcgUoLW4uo+NI+9Zfzp059IUV+jdZieNKI1rryphymiuGNSTPH6u9F32VoIjcDVfY8CAX5HvSIrIvH CDxM9Aw0ddm8mRxjyK8nevYIlQcbu9RvAlkTtiwjR23FqNevGEdAtFNb2rGg== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230405_090801_773152_7C34E452 X-CRM114-Status: GOOD ( 10.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add MT8365 SMI common support. Signed-off-by: Alexandre Mergnat Reviewed-by: Yong Wu --- drivers/memory/mtk-smi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index 5a9754442bc7..477b5d1ffd46 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -713,6 +713,12 @@ static const struct mtk_smi_common_plat mtk_smi_sub_common_mt8195 = { .has_gals = true, }; +static const struct mtk_smi_common_plat mtk_smi_common_mt8365 = { + .type = MTK_SMI_GEN2, + .has_gals = true, + .bus_sel = F_MMU1_LARB(2) | F_MMU1_LARB(4), +}; + 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}, @@ -728,6 +734,7 @@ static const struct of_device_id mtk_smi_common_of_ids[] = { {.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}, + {.compatible = "mediatek,mt8365-smi-common", .data = &mtk_smi_common_mt8365}, {} };