From patchwork Tue Mar 7 13:46:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13163616 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 152E4C678D5 for ; Tue, 7 Mar 2023 14:03:11 +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=OLZlJIyfTTLqNLIgHHbdGkiSwOjrGSZYh8R2by7GBEg=; b=ufuxFciyTB+8sx UaTnZPmymaQETSz8pn1JH1Od2L4+y/KgFsbrNP4phdwfnzhtUAL31QMHaQ0dRG3MMnG/2GD1HBNhf fXHn3B+4NcQ3Df50iElX1LsQlFXUd5Z8wOawxUKkmpcan2EE2lBx6aUc/JinCJCPhbDL2mroxlA+a ZnV/CmNKPWfjo6ybYeMjW3mb5NACJMWky/48w2Vo3MIQPGGiRHLh6m8Who+cAiI4bmnnv+D1aaGbo DFNPRR7ZQX2SdTcHVp4gpYmETKf61qx6BAm4Ixzew4ty5tjDlN6AmC1HAxFlvfvK4GTxkBvnV9bcB NCvRuavkMo5r9HdXyzdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXtA-000bOT-30; Tue, 07 Mar 2023 14:02:00 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXeO-000V4o-8F for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 13:46:46 +0000 Received: by mail-wr1-x431.google.com with SMTP id r18so12189158wrx.1 for ; Tue, 07 Mar 2023 05:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678196800; 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=fiD1jGNfmWPjdfgXlaXHwcnvI1OsqFwof1Wcy6nVM2I=; b=sF/Usli7kkaMJg9fqNQR2RN3tExZk4+8j2vwRRHt99Ct3EPd9Cbi12QgJcdkDQqsMV BENMPAuud2wUkK24443HBtEjc48OkthydjGXsUcJJ4v5Oa2B0IXAxgSoJizz5RczacbZ XPCNML3KhL4ODv+VYt0NeGiiuvO41WR1STG3+sRTvNTtTfZ+hR1kNyiPJMroSBQVwsZJ g6tsoPkvecMJDvMCj1pvgsbOSz2xXtSvAxWcM0dwDhePufD3XhFWB/KSsRn/1bbvhLAQ S5Lj2X9mDdve0K9a0O7L0s8peJU4s2cSaFrYS2H2DqXkA8oNwXXBeZjSU+nikLb0abtl TvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678196800; 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=fiD1jGNfmWPjdfgXlaXHwcnvI1OsqFwof1Wcy6nVM2I=; b=yrj0k3oNT7N+rlQORtX4TnSHA11p0lfX9OVYfo7WHBZ/HjA4bQpTTWfbSAt+T8wfi9 PrKkZi7ZSvsA8yBKJYTALHP7OEEIKaFXOUHFAj9Xr81EuZR1sG52s8uY7A1Yg0XgQQf7 XdSqzp22zUg8qVuSvFYFbdSwREuBqboky+AltiSwV8bHE/8JCTUcIbRWNUd4BE1+5jIc 4UEL3e2ol30a0WbcU/E9pvNSrE2CcocbVe93FfBwOTgtcNoE3NIVGMw86vPH2lF6Y+T+ kkVPmjx/mU5a1enaMmEr4q1LM2p5dD/Ky/wOvlNH5pwrFjAmSxsjCXfgvir09nx7NQN0 xDWw== X-Gm-Message-State: AO0yUKXONfdHimhTWRtZNO0WwGXnyN1I3pdIeaDco6s+/P/LCmsORNAO fm6ghFys7imKgT3RMNq0UGKWng== X-Google-Smtp-Source: AK7set+4LLeARHWHlJ21fLaACA85Yg6NVqJ++jzgrq+VvBOyk7RHx/KY6buV77yrNV3twwbOh2HC/g== X-Received: by 2002:adf:f448:0:b0:2ca:e8c2:6d29 with SMTP id f8-20020adff448000000b002cae8c26d29mr9228862wrp.7.1678196800148; Tue, 07 Mar 2023 05:46:40 -0800 (PST) Received: from [127.0.1.1] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id o13-20020a5d670d000000b002c8476dde7asm12657607wru.114.2023.03.07.05.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:46:39 -0800 (PST) From: Alexandre Mergnat Date: Tue, 07 Mar 2023 14:46:29 +0100 Subject: [PATCH 4/6] arm64: dts: mediatek: add smi support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v1-4-4f0c81fd52c1@baylibre.com> References: <20230207-iommu-support-v1-0-4f0c81fd52c1@baylibre.com> In-Reply-To: <20230207-iommu-support-v1-0-4f0c81fd52c1@baylibre.com> To: Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Yong Wu , Krzysztof Kozlowski , AngeloGioacchino Del Regno Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2234; i=amergnat@baylibre.com; h=from:subject:message-id; bh=8Utuzf8vnkkr4HLSj6tVwRat45+MSGUxWim3O+x8mr0=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkB0A7ZT3peawJygVrc7zIOmQK2eu2/NkUJKAXx44O NcT7aE2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZAdAOwAKCRArRkmdfjHUReLVD/ 4lojGGLFnZrYGkcB0rp+6wSSgVkNlIDEaTmRBtCB08m417n1STAtRI3sET3VknYAqzm2C+8BVxWTd+ o6eWt09OTxUMAT/mxZ+29GbNkzqOZKv8EVjbAnFnCWln2+nodvXZDsE1VOUnj/ll0OqNtK2D8wB0TU Z6DSNZy3VvraHoly8gz96u+CW0ZP3ImikyFWWJB9kB5kkGZ1xORMMKeMsC0tQgj2Itu0gbmk6QO+n9 enmIm55j4rdDWIkrRNrjmdrtClXq0W9BoTvPLkeX7anmciBdhBpzG91V20N0fpwIkwEESGZn/apQ0V tnyVVVDXlaFfV87ynZlS5Zvv+0v8f0VwsN1w79IS5zrYvPD0WAg+l8miSCDfrnfOrTCG5FzzhctCjh kC44gf5kRimqk/TK078eJUVjuJAADC94j6A8/ZgzZpXu8NPpWrik6ERWcKaYwPRCRJXEYdITIuKmqB QBS6Nhlt6K+yBEluIqcwJC73Q3un6DfY9FgyQG6VRTTkMUi8wY+m6Ahx4INcEq/5YmJzGBjD3xi/xi A5N93wRyiCGoe9VKJKRrg/qyYi7MELFU/M4N3aprDR8hzqGEZguetV9IasqmOEjGkvYE2j8pgTBVfC y7EINJuyoh4sKZKMXU9SisziJTeRpDxAZSqIoL8jTy956zaGRaZBh+NdhJCg== 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-20230307_054644_307779_DDB68889 X-CRM114-Status: GOOD ( 12.09 ) 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 Smart Multimedia Interface (SMI) local arbiter does the arbitration for memory requests from multi-media engines. Add SMI in the MT8365 DTS will allow to add local ARBiter (LARB), use by IOMMU. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 67b375fe2020..61333800ff4a 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -324,16 +324,19 @@ power-domain@MT8365_POWER_DOMAIN_CAM { "cam-4", "cam-5"; #power-domain-cells = <0>; mediatek,infracfg = <&infracfg>; + mediatek,smi = <&smi_common>; }; power-domain@MT8365_POWER_DOMAIN_VDEC { reg = ; #power-domain-cells = <0>; + mediatek,smi = <&smi_common>; }; power-domain@MT8365_POWER_DOMAIN_VENC { reg = ; #power-domain-cells = <0>; + mediatek,smi = <&smi_common>; }; power-domain@MT8365_POWER_DOMAIN_APU { @@ -351,6 +354,7 @@ power-domain@MT8365_POWER_DOMAIN_APU { "apu-5"; #power-domain-cells = <0>; mediatek,infracfg = <&infracfg>; + mediatek,smi = <&smi_common>; }; }; @@ -709,6 +713,18 @@ mmsys: syscon@14000000 { #clock-cells = <1>; }; + smi_common: smi@14002000 { + compatible = "mediatek,mt8365-smi-common", + "mediatek,mt8186-smi-common"; + reg = <0 0x14002000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_SMI_COMMON>, + <&mmsys CLK_MM_MM_SMI_COMMON>, + <&mmsys CLK_MM_MM_SMI_COMM0>, + <&mmsys CLK_MM_MM_SMI_COMM1>; + clock-names = "apb", "smi", "gals0", "gals1"; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + camsys: syscon@15000000 { compatible = "mediatek,mt8365-imgsys", "syscon"; reg = <0 0x15000000 0 0x1000>; @@ -720,7 +736,6 @@ apu: syscon@19020000 { reg = <0 0x19020000 0 0x1000>; #clock-cells = <1>; }; - }; timer {