From patchwork Thu Aug 3 09:40:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339601 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 BE917C04FDF for ; Thu, 3 Aug 2023 09:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=wErjPQt6qENv87TZs9KiIyjig4b2yslS27coAwsNZVw=; b=o7ukGe491S5/QZNaS1FsVYvEV7 D8971jH+XxsDUUJo51ovMq7tkoMB9U6oAkoy5EkC9oZZKF2/EAi3hL3Cykl2HExDHOxkd3pZA3OVH ENROdfWqhXraXu+fQzfZn6kRvQ2joiKt2NczLOggHI76gF5eaVewmKe+gbiHoJ1mOQ9f5AsQLbxJi Q2l8nqhPRs2CBkjwrDv/zS92t1Wbb7sS100HnScCEsLtm9aF73Qmt4v/JXK3hXjXP9XX+2xV2x5cB oPsImCOKzASVsF/g8ez0/E+e1JvzQUqMjM+1tBfJDpaYnNer2LTbktsoTVsYZ+I2L6EsMO+iwplV6 ejV9No0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpT-007ENn-13; Thu, 03 Aug 2023 09:41:11 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpP-007ELI-1b for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:09 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b9db1de50cso10471471fa.3 for ; Thu, 03 Aug 2023 02:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055665; x=1691660465; 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=wErjPQt6qENv87TZs9KiIyjig4b2yslS27coAwsNZVw=; b=QGFti+HY+QQe5LC3G/0lDrQ2VYSb5KoZKX8ZnH/pO4R1TpWJktXHTYQlaakPyF95cr PUhlo33Ig0P1ifERPRzNLBs57wEdxYiT8cuUrdOHuVGteASQ3hXq64p5cAiJiMd6ZP5Y JIGa5Fpo8tjngO6Up/6RJuwUe5/M1b+vDNMHODiq9q8tnL+3HbulfRxuHKc4h6Csw46r oVajZqpexvPC6TPZhoudyEdHDa+5AyCqf3XP9e3/raAI0hrS7sCxNm5SRSryT4bg8zwz dasrGyr5La7/7UimXTsxmRmQbnAEPmH3LjYiv5LX0hdZTXe7oORH+rbZRGUwxMfBB3Ue yK0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055665; x=1691660465; 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=wErjPQt6qENv87TZs9KiIyjig4b2yslS27coAwsNZVw=; b=Ar32zlLWpNkS53SAQMywdCxFEKJzgcPGJzxtCqRro5CelHcoEirUORLSv0Om6KONBT ULr9CnihOdrcg00Men8R7IlbWMP7/mKmJn+QzUYwvyX3T0GiKQp8vPR9N+0hibvfmpum lyYHBG9YIrtJQ6C1jJsKtlg6P60ChS1c63Vfe3+RHMTs0MoLsfi5f8IbFeAkRxgMS5Ea lM2Rn6/jRtcbtbQStlJmJcuMEApiISZ24gm4U9LL/NV49GqGPPKwXEIqWBDoR96K/Wb5 LKIaezTg61OlwzUK7S8LdmSfx4eRK49SlJtERwSGkDyy+s+3OknESCEfUkXLO90eIG9t sA/w== X-Gm-Message-State: ABy/qLbGsClS4wuETGnXJnHPkuHdcH61KEtTNXl4bFAcwcnw/RDBGoJZ I7V0+6fleeLOWkYsjG1URWfP5g== X-Google-Smtp-Source: APBJJlF8OCA1c+0+v9Bwna0TzEzHiArRZ7AzDrwGj/4GdA5Tv2uF3b+DFyV6p/26okEKWfxm90Wm9g== X-Received: by 2002:a2e:9054:0:b0:2b6:e625:ba55 with SMTP id n20-20020a2e9054000000b002b6e625ba55mr7589092ljg.41.1691055665493; Thu, 03 Aug 2023 02:41:05 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:04 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:53 +0200 Subject: [PATCH v4 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-1-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=1264; i=amergnat@baylibre.com; h=from:subject:message-id; bh=5Tm918SwyWroVCRT9x2Od4dOEXsJxNFB5Eps83AeIaY=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBky3Yua0NFqC8gbsqFLWmjdFOfQJ8aPh736LBg8KCn Hd4Rrp2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURaL8EA CDPSg8MJKZTsa/itx2lqm1PK1xL5MVZHgNNlU21RwE4o3/AwbNc7TY2RWknCcEgVL4REl8/AoWklXw BoSLVnVri56WO3ifPTIi4aP4DUZIskdoavlozIRn1cHz3ifXckHty4PZdKDHKIR5znobuVLPwsh/Nc wwYzrhggRlxvOlDgFQdosiPuKixHW+aNiFSoP0UcXyJ++/KNRsnDqqXt5U7be18ZAnOANk86xnLeB9 pg7YzM6FabLesI3x0tDSGT4yihICpbDIVTeq5ZuDGEpjx4N6HWnIpApnifGZSFY+v5rGwwLI7KkfuT bbWzwm5ri3nmwE9gGfbB2Ksjw04rjHATbKHObKYc1+y3qrPeDcn4UB7xAkEkeQS7LK5BHxmitd6vRG ZV9frVipNJtLFZfh7hhA9CC3jD2a6KkwPF+6ypAbnOSZi3al6sW4WmUCXDHoV5rjRKnWRxgu7ZmA98 W6XAnu2SNlHocF038Q8lUVXAeVSzXumId9M/02MrQE3wYG+4YKXCqQt01EzbZycI378yyFnqynua/u mvJsSVvccfZ9NgMnuaAyeXbAvXmWpp9BHQsC1cH2rI+lTSCbAcAALIqKFOjfGy9HlbJl9dBqgT7wcU 5eeMoAa24/BWbIp7I3gp2bgCRdY8nOWWP6vsW0pJx0RW7yvQrY5QC8eqZvkA== 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-20230803_024107_537542_3659E318 X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Multimedia subsystem (MMsys) contains multimedia controller, Multimedia Data Path v2.0 (MDP 2.0) and Display (DISP). The multimedia controller includes bus fabric control, Smart Memory Interface (SMI) control, memory access second-level arbiter, and multimedia configuration. It plays the key role in handling different handshakings between infra subsystem, video subsystem, image subsystem and G3D subsystem. For more detail, ask Mediatek for the MT8365 AIoT application processor functional specification. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 413496c92069..bcabc2b89a94 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -603,6 +603,12 @@ u2port1: usb-phy@1000 { #phy-cells = <1>; }; }; + + mmsys: syscon@14000000 { + compatible = "mediatek,mt8365-mmsys", "syscon"; + reg = <0 0x14000000 0 0x1000>; + #clock-cells = <1>; + }; }; timer { From patchwork Thu Aug 3 09:40:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339602 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 366D1C00528 for ; Thu, 3 Aug 2023 09:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=RatweBkvtrU6P41JPdWUfgV+9gxtDS8Z15ua81Y0Obw=; b=A8kh/Cz55QDGJnmVfC8lLtLc/a zazK+RrqbsXeFQYpQ4qcdOlLoTsTOQrEvMoW3O6uNHu8Db6qn9i1LnFbp4mRJtOnc2rsscizQjjj/ YLD6U3To0K7At2ZFrd7OtSOEwsVQYHJr87KUe8iIbZFyPfam64esOACcoWQ/WTSMH1u9T/2PBYJYc Ywo+a/q08D01riMii2Baf2/NSBfXrjQytnrpmZCCaa+2ia2BXZ9pXykjvmgc9uk/b5PYyLnWYRWVX 9bunV6sNOX4wtMLxxoYXHnmtBTI7Lvf+qe1v/FTTaG2Oa9tYJfjgXK43sstpsSkdXdMfb93Bs6aIJ 8PUJE4DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpX-007ERW-09; Thu, 03 Aug 2023 09:41:15 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpR-007ELn-0w for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:11 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3fe2d218eedso7726855e9.0 for ; Thu, 03 Aug 2023 02:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055667; x=1691660467; 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=RatweBkvtrU6P41JPdWUfgV+9gxtDS8Z15ua81Y0Obw=; b=APeHPOyXf91yHIRI6YBNzlWPRQbO1IR+eQsGr21Ao+xfB9anfLQGbZNT/J1aHg9Byp v6LAOPFOZlNliD/AKDOIs050mgezdwlUWdqwUDf+jO+hD4pBMcLSgg9SLwNPDFgZyWq9 SHLCTzxtL5hUt4jXWRzaONUoMufxm2+XYb4TGVsQ1WddU9CP8s5pH7MHmyOIZUo/JBMy 8zOQZSL12lSc78hThPvHYS0X6NOvVDF64BaNQU7abAJZIkSCyUt14YVIzhovOlyZQfr1 jSI/rMRDAj9KvyayyPCmYpuw/xpC3Uu13AvXaooleAhrag0RetHNtRAnyTOh3prDBxRV pGmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055667; x=1691660467; 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=RatweBkvtrU6P41JPdWUfgV+9gxtDS8Z15ua81Y0Obw=; b=e6Cr/cRxJTEs9r9+nV+/3fwsSPK9evxpdRjUeFFgYvXLHDPVBCo74GPNMHIB1CLvV2 qkzsEMohrnQqpfJk5weQ3T+84axocUfOHwweEdKYjXno7D/rEfv+bjI2yh1vdlUaSfmT yw2aCgSDqLGmOSJ2o6bMXDapXVd0BBO1NbrVMEyvMIxMBToJ7NV6PL6K33mcoV4Mvb7H rftXAoL+gTQ6/EcjQc7Ik1AClOYdNjIN0C38PGZ5kVYtqIHFtcWWMmAPGEcHAzKR68DK FM3pj1pUzYbHN3otkkLRroMwQGqGPON5zBtHacs93hIAYQE5EWj6cVRWk5QoCVto8gt/ OwJg== X-Gm-Message-State: ABy/qLaRAkhV6LJsjRhbrAi2YMtELstsFETeMjX+uPKv5aDMbVjbefnu v47Ok4qOKos2/y7LWkyKiGYg7g== X-Google-Smtp-Source: APBJJlFdQc7Hmxq2dsKHT6YWTWdGlvcTVi/JAbNG1Bne3H9oL8moyeKPEPygjcJT8ejEkDONpsbtRw== X-Received: by 2002:a05:600c:20f:b0:3fe:1820:2434 with SMTP id 15-20020a05600c020f00b003fe18202434mr6613795wmi.1.1691055666846; Thu, 03 Aug 2023 02:41:06 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:06 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:54 +0200 Subject: [PATCH v4 2/7] arm64: dts: mediatek: add camsys support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-2-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=1127; i=amergnat@baylibre.com; h=from:subject:message-id; bh=gpd1qVgLFNytHp6mp3Oxt2b2oXUpJ1x+ZZ2jt7uMt0E=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBky3YuE+488b4g/54Hcf31FvCM1sQ21gc7YrC0+OFX n8nhfbWJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURS0IEA CmumZJyt4Gu96SS7OfBEGId/hR7PZyr8cF6qcQFLnoSJICFp7JNYXWDe6r4lw5aiZimmG6LbXpTgB1 z5yrnL2/ULnRZA5KFBll3L6dGjnte98QKZwMNLquQfZO6YDz6r8mEUH4fsT8Z2MvHZaf32HffKShq6 IhhSQC7KUNSWqn+el8qR6pXY6fE+o6UdHxod/lyOU81kjuuqf42DafKBfdCQ+HbFluUYMYuZxvCjpL o31BbfKGE+YGxXVpXwHtz8cFBwxlKRHZXe3U4oIxPUMrTHIG3mivQhp8a5nOXPoM00aLBdvNLEuN/t GVFPGgUORS8IIR2SkPZiU73V4mgMQmbNsH0CVcF1+uIAJ4V5ue3mLihG87shhzHiDNAy4JIBV3LnCm ZG7xbGHh6K4hZ5Npu57AbawgTP0OCZi0k+PKijLDN6dBJfEPRvFCRZaKQpGdSzUvcLsUm1q5JGKh43 VUU3qFGt11wJR8B/WdaKrdnk//Mu0O0GVH03dtc72QLFxe91GsmrV1Wlh9PfOqxF3tPgFkiP4PNsR7 RDaEPAVjr2YIpnmKO+3gpxvdPHz0pEsDaxz2Kg1yC8RdN++1HSjCEEURWY9MaX6/lK7sfGR5dWyBXB jKs5ME+8RFC5Ru+NaiTLto5KhmCAbGoFdm39Le7KO9Ebr4Gvo5t8gi8AZHkA== 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-20230803_024109_327337_1F0F4A81 X-CRM114-Status: GOOD ( 10.08 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Camera System (CamSys) incorporates an enhanced feature based image signal processor to connect a variety of image sensor components. This processor consists of timing generated unit (TG), lens/sensor compensation unit and image process unit. For more detail, ask Mediatek for the MT8365 AIoT application processor functional specification. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index bcabc2b89a94..f9cddce5bd9d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -609,6 +609,12 @@ mmsys: syscon@14000000 { reg = <0 0x14000000 0 0x1000>; #clock-cells = <1>; }; + + camsys: syscon@15000000 { + compatible = "mediatek,mt8365-imgsys", "syscon"; + reg = <0 0x15000000 0 0x1000>; + #clock-cells = <1>; + }; }; timer { From patchwork Thu Aug 3 09:40:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339604 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 3816EC0015E for ; Thu, 3 Aug 2023 09:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=ABe5lag05JGrRRfK6Q7TQU2Nmk4xnwbIxqigvQsoK2A=; b=hKoKcrwQ93oyuaJIGNEDTxgl1+ +jBlf0sfITRqZETrVR6GVByDfftpihhItWs6vXtQ722ls2R7oUu3AEdP9qWbNrlz6PJ0l8+I1LFMX GkKLHH+8iImcckiNxiJJfz0BkNsj+0sXHNtbF/l0fp7WnpCUcHBbmT6QbLrzY4gCK8kwNLo5gkvZT Kr9QlpVJi6bGSVL0roIDAizr9GbMJYW6Q7XbKeoc/0vFV6cLA7BkGRPOs+vMRt3h9loRHPFuyzMTb pVNm5614MNPto2K7kDwG9Pi1GQ3Qun65tw8f4lWSRvhIjSj8pdp2fxoPC+pw3+T96U3tQOgsh9LCE Cw8Hpb3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpa-007EUJ-2g; Thu, 03 Aug 2023 09:41:18 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpS-007EMK-2A for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:11 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3fe426b86a8so620505e9.3 for ; Thu, 03 Aug 2023 02:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055668; x=1691660468; 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=ABe5lag05JGrRRfK6Q7TQU2Nmk4xnwbIxqigvQsoK2A=; b=IGrwuEB8yps4AozN1gYGAsDqpyxiycbKZlWnc7BJbdL2FV/M5AfbfWecJUiixOzzvA 1nr/sH7OhPjjVm9cQaaGjDugwm1dN6/HeoAlWcTnoG2w6gobunCEv5YM77NdYymr+GHC 71210i+2bT6yawzBE3ndNeRPIVFRRBa0IveeWvZgE4avSRHqDQhzvFnUWIoDTGOa2nNO d5zFcS4D3vQMSHIAmNFtl+34BWdCfklngHnWVEKkYGKwH7tNo++OmMgrvSg7mnNtepHz KSdufwBIvpwgnJkxmhWW9G5EWTkzvI9UOmYRXxNPnVMfheH6FnglZmVRPO8kbHYgwl8m Gbzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055668; x=1691660468; 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=ABe5lag05JGrRRfK6Q7TQU2Nmk4xnwbIxqigvQsoK2A=; b=RGh2k7OvAoLPhBQy+jfJ4AbydO9+kd7xkEQ9D3Ci13obIkFYk/az7A2dPyqaM3MmUe 2hyZlOhlw81aC1ck0BBB/DYzRpZ1FcUfKHGq1MmoQYwxGpHpRHe5XeoYkZj5+EC6sG4q CISTTQI7X5cogA/ZZ3Rqa1OEttD8O+vMUAo1LKBTUBqW4W2fCnrEhOvkZwZyRSQxFZcU oPUJnwkKeH3huH1HDo8f4o9psgoqnJNQWNFKk4RZ52JObYKa6sFka4Cx8IwWtAc2fYMp mgZW7gnjWJ7aP7k9y/yQ+PJoYoePJnyr89+Xanhni2Knzk52dSzWHQDKZGKv/Yac1Gmw T4zg== X-Gm-Message-State: ABy/qLZcpKNNgt/RjsH7N1rYo06qoHI24t3uIMlwSTeB/cULM8EOK4BO QV6Lw8igX8XWEHiRdVYWZvVSVg== X-Google-Smtp-Source: APBJJlGxUIGgf8Ra/YV2+Q5e/JdY+71Jq25KOf5qdrpaJIgzJwQ15REV9oJzcQ0aIT8xzZSV1SuCzQ== X-Received: by 2002:a05:600c:44a:b0:3fb:e206:ca5f with SMTP id s10-20020a05600c044a00b003fbe206ca5fmr6521392wmb.31.1691055668078; Thu, 03 Aug 2023 02:41:08 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:07 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:55 +0200 Subject: [PATCH v4 3/7] arm64: dts: mediatek: add apu support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-3-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=1174; i=amergnat@baylibre.com; h=from:subject:message-id; bh=LNi5XTwnw6k3l6Q87CyTgWzrlVLjaNEqurZKDlk2veo=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBky3Yu5YDQrxts7CW7gmlgK5Q2+8w9EgP2JlLA0zQE YMo0zVGJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURe2kD/ 9mn2GOOQMXI+Yej0LdjG8rsBXc7kMiB1Kb+M0FIP9a5L8mRSaG0tyKoF7SkL7qV25dBusbzd4nGX8A aaaONk7dlsbCGrL+AahWousddNVY7JA+SuSd0+Cmrf2ASnhZd+oVp9yy2tQh9ClsOVXg9N6hhEFk8H jaQNBv+ndjb9b6M7b6nY+YI/0XTBMQoGA87n+DOKyrw74e/NcyIg4XlwybiCE+93uQl/KEw4qA0HeJ n5CUe8U1ok/jYqxhR3WLhvhkgbaOERBJNcYhSvWw5XCylpHhdIqLcTn4MwIJ8m/Md3XNtLY56rx0C2 WGbSVNsHInK+LPEcd7KgstTB76EeuiaxMD+izIeDycCfenGXwAIxRiJoYOpuo11nPfe+u9NN8ibPSt N0Q+luAzxzph0SnW10DBT1KBulvvyeEHGERAk94HcVJKduDjNxImfSnkt1yf4jSiKBUib9QQteJVsg Dbt2P2KC0WoE5JFkvbV8S/X13Kxw7miZqby/AyMl2ZABQf95zIA0ccmcZtz9GwW+iNX8W1tmrtqOZe Vwh20iOzzcN+vmz1SdYYe/A79Q+lT5WL6t4OUnqlvikYm+BmLg6GnJO/6uM92VnuqLe9Od359GslEo RjNAwmOQrDMbpQNDuOPkC9id93SIgEZLwDjOxU7PgemvOI4+rqLAKeDPOtQA== 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-20230803_024110_710279_22CD3385 X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org AI Processor Unit System (APUSYS) is a highly efficient computing unit system which is most suitable for AI/CV algorithms. It includes one programmable AI processor (Cadence VP6) for both AI and CV algorithms, and an eDMA engine for data movement between external DRAM and VP6 internal memory. For more detail, ask Mediatek for the MT8365 AIoT application processor functional specification. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index f9cddce5bd9d..c3ad7cbc89ab 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -615,6 +615,12 @@ camsys: syscon@15000000 { reg = <0 0x15000000 0 0x1000>; #clock-cells = <1>; }; + + apu: syscon@19020000 { + compatible = "mediatek,mt8365-apu", "syscon"; + reg = <0 0x19020000 0 0x1000>; + #clock-cells = <1>; + }; }; timer { From patchwork Thu Aug 3 09:40:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339606 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 22B9AC41513 for ; Thu, 3 Aug 2023 09:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=clF9IqfWOEF59ajJbesUMGqxvJHi1IjyVraJZokbP8Y=; b=WYSYLHtNZDtroUMlgwRKgn0qF4 3R5BXQCq3U2gPZFm4zGRxXGzIHGZzKlZ4YgZb+9spKjnix4BKTtF5+q/NpkZ5ZFnZeW9/dOj1iFZl MHtGV84pQnUywlA0uI5LHRkFWfbMGooMQaAaLVHuHZcKF5wsKdCk4mJjTAenT04qV+uoKGPFjfB3Y 3DOC0Wncb2nAUEqYFqGotDNscv3/uQF9afyi3DxyxvWMv/+lNPEHSMyA6Lr2pGZVoBq1Ehw0vaWU/ RpgcJotwmcR5I0OcCNY32xvBdOWydr9NSCMYM9C45XducghLkER6oHyCWQMlTNxzGmPY6Wns6m4Fq n7Y5UrJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpc-007EVa-2F; Thu, 03 Aug 2023 09:41:20 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpT-007EMv-25 for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:13 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fe24dd8898so7543415e9.2 for ; Thu, 03 Aug 2023 02:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055669; x=1691660469; 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=clF9IqfWOEF59ajJbesUMGqxvJHi1IjyVraJZokbP8Y=; b=0ISQ8Lo/ASgOw6BMl4soyuuhNLzsU8HS7uncz+RCCeIc73Rrw1pWWr7bEFo2wkMQ0M wuFRWAg80MNJZiQrj5p7B9NkH1L6oAQbWuYAZtTnFHwk3BeH5sddKOa5/U69jQJ/p0+9 n2c4u0Su+q56+qVldmm2Jk8xkjV2FKGr8cyXAi8mTCGZ4cvb2KjUDgCg1MFJ4N8JYUrO NTUMVHuKfLWpnebC1Fen1TttoXT9N9Us73gzkoBbQIP9BR/jnUSODhsHAaF/2oqQlbnH T5mu/77TYy/82Ugpy27fmZDodT469bg3aPQmaod8k1xS8AeQ+axwJ+R1Aalw053oATJN Q0rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055669; x=1691660469; 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=clF9IqfWOEF59ajJbesUMGqxvJHi1IjyVraJZokbP8Y=; b=hLUDfm42X1kFtnqGL737rMScZp640d3/p9PpCrPYV2x4XhUKvmpGEvKC2nNKWjuH3x eUjzgvkZUTebSSXtwELCHimjG1WC9dVUZAuAR1oktu9RfNML/i0k9J0SbSkfM70NuJ/v rcNZJXA9siS/+EngtXUySY39GXne1WM0xaovjDX7nLDDMPJMpnuAwkfN/vdVjX+ol2Je BAP2v35aCs4yUlQ5SuPoarCnArruV2/UzaIBazyk6nGYwzbPdD3zIW4+cpBhQskSk8kF jIrD+5F4oPYwPkG8STQ4u6ERgkrGs4iqii+0ZsQUkc2YqpgEo0ynhu3SEW6/jbtx2Gfo nHpQ== X-Gm-Message-State: ABy/qLZTmY+DyhRQz5+fovj4e7FB+vrxRrZ0t9y34woj7LDH6FvRCudb JnTsR2rNrAjR3KFjGNRgWaOvGw== X-Google-Smtp-Source: APBJJlE3by0F6c1qaNJJE0oCQERl3BjHvR2sER5coiEYQssCjchkL8Vd91jlP/q+gyny/RmSIIP3Xw== X-Received: by 2002:a7b:c40a:0:b0:3fe:2102:8085 with SMTP id k10-20020a7bc40a000000b003fe21028085mr6843537wmi.8.1691055669279; Thu, 03 Aug 2023 02:41:09 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:08 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:56 +0200 Subject: [PATCH v4 4/7] arm64: dts: mediatek: add power domain support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-4-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=4724; i=amergnat@baylibre.com; h=from:subject:message-id; bh=gs34qYbpVZeuz1fNLXc7xbInSDTbehayNY8q/g3uDQE=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBky3Yuxk3ppHTVskoqexjTkK+EC1B0pEDG+RJOQWCy OHthgxuJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURURaD/ 9110SUqOn4t8I75q0ja4UGGQhOX629Wt2AihGU2K8qbKmMcg/3VfzQ0PTat3HhrGR5TTAJHwGfI723 N1PvAFMQ3bRf7OV/+aNDdW2YqQBOz6NKklqpKuK1bib/OQk1rCt6lkp+OwsticsF/7Hs9R3CmFHR+l obV5678xnmbqwQkxwYTgQHWxEePhwWBxn9NSeMm6TswlsBSIaA0KTWf1cTKeKlKk6SSljRIcFuQBnD Cof/ng7LtBUJZ0aMsJbAECj6NWVdgTKVBHAqIBEeX2qWNMW+1dR9ZYcGwvUVaTgBnYAMS1+p/V0Po1 Et6pBbquLm2UFxJACNJKG0nkCAIgYHWypxG+EPkExG9N0yxsSXWUGVVPERU25p7jNokVp3B04mV1VO mDaykMnG7HVFtE+u6XdEhXgnzFoH1zElFh4RQeWScuemSs/fv1NZaqwfYD1QwrBtgj2OJACIu5nuJl V3+sxPYTMUU2xff7FbAKrYDEBB/SYxCtHybKlRg61wq4RKlO583LOJJNQIS1V84KkU0zMxJAm5r4gR OWdnN5+9actrzJIm6p46Qnier709S9J7m87eq6c8mDdbnNRFYV1K92QOrImUgYHWymOZrZNVhUKnsM HzKV5RaiZOe2V5UegYa0RBt7kQuQ5h7JreyFEFpcyXyDKjCZK4IpfS+o6J2Q== 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-20230803_024111_776383_877B3C02 X-CRM114-Status: GOOD ( 12.24 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The following power domain are added to the SoC dts: - MM (MultiMedia) - CONN (Connectivity) - MFG (MFlexGraphics) - Audio - Cam (Camera) - DSP (Digital Signal Processor) - Vdec (Video decoder) - Venc (Video encoder) - APU (AI Processor Unit) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 110 +++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index c3ad7cbc89ab..c2f88d153dee 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -9,6 +9,7 @@ #include #include #include +#include / { compatible = "mediatek,mt8365"; @@ -298,6 +299,115 @@ syscfg_pctl: syscfg-pctl@10005000 { reg = <0 0x10005000 0 0x1000>; }; + scpsys: syscon@10006000 { + compatible = "mediatek,mt8365-syscfg", "syscon", "simple-mfd"; + reg = <0 0x10006000 0 0x1000>; + #power-domain-cells = <1>; + + /* System Power Manager */ + spm: power-controller { + compatible = "mediatek,mt8365-power-controller"; + #address-cells = <1>; + #size-cells = <0>; + #power-domain-cells = <1>; + + /* power domains of the SoC */ + power-domain@MT8365_POWER_DOMAIN_MM { + reg = ; + clocks = <&topckgen CLK_TOP_MM_SEL>, + <&mmsys CLK_MM_MM_SMI_COMMON>, + <&mmsys CLK_MM_MM_SMI_COMM0>, + <&mmsys CLK_MM_MM_SMI_COMM1>, + <&mmsys CLK_MM_MM_SMI_LARB0>; + clock-names = "mm", "mm-0", "mm-1", + "mm-2", "mm-3"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + mediatek,infracfg-nao = <&infracfg_nao>; + #address-cells = <1>; + #size-cells = <0>; + + power-domain@MT8365_POWER_DOMAIN_CAM { + reg = ; + clocks = <&camsys CLK_CAM_LARB2>, + <&camsys CLK_CAM_SENIF>, + <&camsys CLK_CAMSV0>, + <&camsys CLK_CAMSV1>, + <&camsys CLK_CAM_FDVT>, + <&camsys CLK_CAM_WPE>; + clock-names = "cam-0", "cam-1", + "cam-2", "cam-3", + "cam-4", "cam-5"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + + power-domain@MT8365_POWER_DOMAIN_VDEC { + reg = ; + #power-domain-cells = <0>; + }; + + power-domain@MT8365_POWER_DOMAIN_VENC { + reg = ; + #power-domain-cells = <0>; + }; + + power-domain@MT8365_POWER_DOMAIN_APU { + reg = ; + clocks = <&infracfg CLK_IFR_APU_AXI>, + <&apu CLK_APU_IPU_CK>, + <&apu CLK_APU_AXI>, + <&apu CLK_APU_JTAG>, + <&apu CLK_APU_IF_CK>, + <&apu CLK_APU_EDMA>, + <&apu CLK_APU_AHB>; + clock-names = "apu", "apu-0", + "apu-1", "apu-2", + "apu-3", "apu-4", + "apu-5"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + }; + + power-domain@MT8365_POWER_DOMAIN_CONN { + reg = ; + clocks = <&topckgen CLK_TOP_CONN_32K>, + <&topckgen CLK_TOP_CONN_26M>; + clock-names = "conn", "conn1"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + + power-domain@MT8365_POWER_DOMAIN_MFG { + reg = ; + clocks = <&topckgen CLK_TOP_MFG_SEL>; + clock-names = "mfg"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + + power-domain@MT8365_POWER_DOMAIN_AUDIO { + reg = ; + clocks = <&topckgen CLK_TOP_AUD_INTBUS_SEL>, + <&infracfg CLK_IFR_AUDIO>, + <&infracfg CLK_IFR_AUD_26M_BK>; + clock-names = "audio", "audio1", "audio2"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + + power-domain@MT8365_POWER_DOMAIN_DSP { + reg = ; + clocks = <&topckgen CLK_TOP_DSP_SEL>, + <&topckgen CLK_TOP_DSP_26M>; + clock-names = "dsp", "dsp1"; + #power-domain-cells = <0>; + mediatek,infracfg = <&infracfg>; + }; + }; + }; + watchdog: watchdog@10007000 { compatible = "mediatek,mt8365-wdt", "mediatek,mt6589-wdt"; reg = <0 0x10007000 0 0x100>; From patchwork Thu Aug 3 09:40:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339605 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 ED02AC00528 for ; Thu, 3 Aug 2023 09:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=Qqq71BmglqPdWoPEtToCLWEFpVEun8ESIoG7WuZgwYc=; b=DZiR+3addnQoMN2kz9irZtoLVF KOE0uH1sA2UwP+Sn/UkxOlWhZ78+Bl8PeKkZvrdTnx7g7X+b1s+azU5/wmPAfgw2z/nK8yWuX7VRJ cKoj1rDHq+HKxKFUIs4oKdUVpU7u/chCl2+KVC4BDvxXEvMjxQjhCRe87zUHqfdjiQ6Ccr9jO03us djHQT/Vzx5oBB8YaM9zQjepegqv+6hUg/J2kdYV4xUZQrYeq1a0dpe6zaATKxi4jtXFnQ4xdiq1jH naJ9665Af9OFmlp94HFzB8OKmM1bam5HLaQXXiJ9OGCluw4nQ8J13YOO3NacYLIXpsiSp2DaKZSXY t6aAHvXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpc-007EVB-0F; Thu, 03 Aug 2023 09:41:20 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpT-007ENc-2B for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:13 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fbef8ad9bbso7903575e9.0 for ; Thu, 03 Aug 2023 02:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055670; x=1691660470; 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=Qqq71BmglqPdWoPEtToCLWEFpVEun8ESIoG7WuZgwYc=; b=WnhUHoeTUptr5l4v/vwdEeIp0W2YCBwoMwYLNFhtvsJrji73kXfUshz8FQDgZihQoo Kp/wuue2SecUj17IQHm3gjVjn2ALZalxmLldUxJLX0dbc/ObcWTMsEInHC4Eg8+xffAG EDjl3LHCZPES5+Fpnpt7aq80jNlxfeh8hHFB9+4Cf2epIbOugmCsTfllqtRrGuTfoHfO G5jctLGJRzJNuYy/3wz5wR0B0gNubQUfGHtMfBCaelVfuyFiP+OUBAyrSqgDtVGkX8SS qvjCZznWazW6b5p0uKGeuGOXg71VZEwsZmmMDMJ21AVRiLfuaC9NHvpV7YrJs7ZBK7gy 52wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055670; x=1691660470; 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=Qqq71BmglqPdWoPEtToCLWEFpVEun8ESIoG7WuZgwYc=; b=KH7gMkpS9vVJtpyd9aapLvC/pt6i5FdYlGShBZNcRi2FVjg6j6Wyab2UZp+N+wx9q+ FJcCgjDBh7td0UjAM0cl7qdX4jFNdL20MLwDGhBK0ITF7yolg4RGIdt67U0OykmtF1Ng 8KNkzG0Ho4LA6Vlqo6avUngetZWQK/uZTHo9dpPtJf/6QZFj9JRYs+uKtGkRYFnSanRt wspt15X573i7zaYtlAhz4hcIgsHIpKYFtyzwpp7Y54x1zRUsgl2M9oYZKdNtDDyY3dgp 1FygDLxMnnFiHcitfZe64cboZXmlOmq7L8jkBzIgm/DOTVDjq65nr/fXjr2/YF1kHy7N /FTQ== X-Gm-Message-State: ABy/qLZQsmM0asm8r8hg3kRVu2nWI/kPpU9wkf/GbTKFbhatwi2rD8Ao lhQoM2zG2hIR164telsovsM39w== X-Google-Smtp-Source: APBJJlFjYPT4M218ADNSnzkr3IWgI8sSPk0J+nYARdhmfuCH1saGPdRYT0ZqdGtrtzHHcgQGmMNDOg== X-Received: by 2002:a05:600c:b52:b0:3fa:71db:56ff with SMTP id k18-20020a05600c0b5200b003fa71db56ffmr6590901wmr.40.1691055670541; Thu, 03 Aug 2023 02:41:10 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:09 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:57 +0200 Subject: [PATCH v4 5/7] arm64: dts: mediatek: add smi support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-5-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=2121; i=amergnat@baylibre.com; h=from:subject:message-id; bh=lJi09wmfuA1CnXJrdr2+qCC0CVBcfrZwevdWJeNOAo0=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBky3Yu3yeqBTweXTt4cjB1hcjTBIfzC12xsT49Nncx PSlXDyOJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURYI2EA CCouYESfKP1onbfZhLrWVjFgWLu6PqRRHJ63+175fKOdum61IMImElsCVOkQRk4lVT8166SgtXvRKk so5hZRBIqgRJWEKDjyPaFDgg8SsXWw41ZOLuqCH4Expc9tkYflCBo6WfSTMNgvXL01+VHi+5TwhffY AyIZu1CGtkY/NQhi/hi98lgFAB9O+FSxkxqbJHpS2bKo9IEyuez1FxqQXllawa196TQyEQg35RLzUw cRbQAWF476YQ0DN1QZf2bs2msBOV/n9aAqDcEYOLbTlKWB5Cm/lsC8ZrL9P8ibUZIN4qZmLiqhcQ+9 KBVaVuNCI47Y0sqI0Dr9gL0qQ2s9n2lyYoI4lmyIJk5ObJMJVuDSb1NRi10lGJZfYfcnIl/yhvWWJk cwa3pE2yJRCib6ZF014i5tH6kjuWgQTiVkdXx23WTCldhjUroQf/wKP4O0pd0l+6ovu9B09Mi7PtVE 1EVIktUj/teOcf/PZZGW0y6Sa/iuYbjmhROyEXVNkKgN1fYuNgBHvpmKjCRyGMYbl+tK4NGun3Mawz FzWMbySbdTecoiwuRAdMV30/TLi8P2P7Bk5FnwHUBQIYm820jhAWVlC8R+8kVDEjLTotZ+3tdY5qi+ Z2mHMQ6S++b9Rsns53ghYOz8JIodTVyLN2wx6MGSsJCI/81ZcS1uP5rIgu8w== 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-20230803_024111_781693_1F770E80 X-CRM114-Status: GOOD ( 10.48 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=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. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index c2f88d153dee..a03b8c0da68b 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -340,16 +340,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 { @@ -367,6 +370,7 @@ power-domain@MT8365_POWER_DOMAIN_APU { "apu-5"; #power-domain-cells = <0>; mediatek,infracfg = <&infracfg>; + mediatek,smi = <&smi_common>; }; }; @@ -720,6 +724,17 @@ mmsys: syscon@14000000 { #clock-cells = <1>; }; + smi_common: smi@14002000 { + compatible = "mediatek,mt8365-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>; From patchwork Thu Aug 3 09:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339608 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 710ECC0015E for ; Thu, 3 Aug 2023 09:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=fxkPmAViZ4bBY9DKE4WBvD6KeHCq77X51+2zFhsJvjI=; b=RcXJX+734/oRxyquxhallFDlJb esRLtA9MKg2egmB6/mFu6AO4Glk5VwGqIMMs/qrTkLduCaIdDNKmtHGZJ7pzoEay+gmw+EjCIc58X Tydo2S0JZ0Yx/MgzjrOCBhixEg3a6OlxpEDrvhkOhNbLCBcWQ4qaEeA0z9AGkx4FL3+6Exsghd+Kg Zcq7cbZLXSPexfHVRibTHat2cGcTlKXVtaBpr4G9MCN+i1La5OCXqeZNvcrA6Hri6AauGvvrAu32b tlkTGCPlLinNTGqs+cdqtWwwoT+aW9GMh/o8NPQ697r75to50nubrh4cml3kC7FmX9Y+uOEayCvZU G0WPkcCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpi-007EaI-2I; Thu, 03 Aug 2023 09:41:26 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpY-007EOt-1S for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:17 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3fe110de46dso7604765e9.1 for ; Thu, 03 Aug 2023 02:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055672; x=1691660472; 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=fxkPmAViZ4bBY9DKE4WBvD6KeHCq77X51+2zFhsJvjI=; b=nVOzC/fyH+yzD8G9EHecBPK0eWIjtfrOVLSW24WxuU0FxPbQdHw/UyY+HdPU2PIFX0 mi3TJBIDPjNyU/0l07O7oXWdswmLt0WzQvuym12mSkOPnDEqkitET7zdLpvS8KvJGENm FYHS8+n2yGUxXWRz5HnCrfZw2QVn2FCyIUtfMqB+aKlBg6hMzAwTgmTmgP8E18HUDUCt OQjwnNA8dKEQUIlAzf8eapVPu2k2DpkieAhKWfHCJ9ENml6/0BB3Qbo8OvAv51MMKi0w 3wU+snUb5y6kf5e8OqQ/CDAnqfPwQOTddkbyYBv0mVWv4QURUNiKnmcoRQpbVCIqfPnS HMzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055672; x=1691660472; 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=fxkPmAViZ4bBY9DKE4WBvD6KeHCq77X51+2zFhsJvjI=; b=cqx/nAyUNeEWlBzmfjuAJTwl9exPlCyKUBc1fhENSTDVRWlXfi3patIrAroTZxnMh6 U54dYwhLV9y8jWms0qNtKqlF6MiZb4Dcr4YU8jZrPxmbSVy9pSGkzSn+IoM49aW3wgyQ 8RHDH304vx2JkMcIB5YDASCp+sfdAfGuMXzuVw8IxtI9vSRlc0jvw4KHypLJU5z7QJwk UJ82DcOASW2AhT+nD++30QArsJZIryGR+pCeyxEWrK4TjjvcvjUhpaA312cDU0Xw6RZY GBUe6YXLCpOM2LXKcnedBuUZevTr5H8jtyp51a7PPPUGPQDb2BZlAL72nHc23X3gmIYl RqqA== X-Gm-Message-State: ABy/qLbW219XU3IuwMaWTA3qQazTSCkDo1sl1Xc2AhAbdWl5AyVQOKnb loYNKZGud09t0PPfrg0lMbRcqA== X-Google-Smtp-Source: APBJJlGfqWuOZ1y3FemnkiQGD3vZ35hDptoXu7aAiWCmrn9R2zrux3fKhJjN70AH44CvsZEaEAqvpQ== X-Received: by 2002:a1c:4b18:0:b0:3fd:2996:9d88 with SMTP id y24-20020a1c4b18000000b003fd29969d88mr6702974wma.25.1691055671647; Thu, 03 Aug 2023 02:41:11 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:11 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:58 +0200 Subject: [PATCH v4 6/7] arm64: dts: mediatek: add larb support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-6-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=2919; i=amergnat@baylibre.com; h=from:subject:message-id; bh=YQ4gFuFLZ3ZXhHJoLIMLvf6JGXdHrmuwZeJIyfaEitM=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBky3YuBVw4i/Z9cSxRo3MXCg+TjdfkIHGZDri5k5Ip YHJc6mKJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURcx+D/ 4yToAVIyrWA4woG7STs3ZuLzCnqTegSZw1KjRjBJMWKRnCPzGNsiQPnLHGiBXcfxrs3EC3/8ljLxy2 4CoU71zfWWi3T/3aBfvLUk6kb3KqLMTFc/1/ipLh2p7eqqoYH89S+AUeR4uuTLdtqUP318svuSnjmA Z4IAl4mTVpfK3A8VprnFH6f463qbJD8nVvl6YyuHbfmP85v6eO82cpvCdNHCOeE7TPjL0YycBhKEsa axg2aVxGUPHr0aVGrxaLCFtL9ewWD5uCAHVJJ3ZGxfIEaSpSItz0eiTfDhH/DLFFOA7OzJKWdIWmIB o6cvangqcIz2Nxtc08zR82NpM9o995kB+MA4Io+NazQAfF5kjTIOxC87J0peEa9ZAW9dbTSUC4a+9p UyYuG+AukMC1t9U/er63LWZyU1r8mLTf/RwliEEvv24Bmc6b24RxrEZOeTn9C4gylf4z5v2UokpInQ MS8b+faKrWKr6iVa/B6G0NdqZBOYiu0ODVG6drg5n5oK/ZUJv2SanqPflrEwsmxU/yT0DnDtOBwqta sw1IyT8pmqBVk3v5LYxe71UX8EV6E4n5EQFUfaEtcRGPIOII/7rQ00KW/QJLF/Hav+Aq03HKBiiKBp WuajFlH8z2DGqPQXa5wECG+EPY+0n9lsnBtBQaZPGdPf2po6l+G408UBxfig== 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-20230803_024116_506854_DFF6B51D X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Local arbiter (LARB) is a component of Smart Multimedia Interface (SMI), used to help the memory management (IOMMU). This patch add 4 LARBs and 2 clocks for the larb1 and larb3 support. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index a03b8c0da68b..afcfa1dd242e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -735,12 +735,71 @@ smi_common: smi@14002000 { power-domains = <&spm MT8365_POWER_DOMAIN_MM>; }; + larb0: larb@14003000 { + compatible = "mediatek,mt8365-smi-larb", + "mediatek,mt8186-smi-larb"; + reg = <0 0x14003000 0 0x1000>; + mediatek,smi = <&smi_common>; + clocks = <&mmsys CLK_MM_MM_SMI_LARB0>, + <&mmsys CLK_MM_MM_SMI_LARB0>; + clock-names = "apb", "smi"; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + mediatek,larb-id = <0>; + }; + camsys: syscon@15000000 { compatible = "mediatek,mt8365-imgsys", "syscon"; reg = <0 0x15000000 0 0x1000>; #clock-cells = <1>; }; + larb2: larb@15001000 { + compatible = "mediatek,mt8365-smi-larb", + "mediatek,mt8186-smi-larb"; + reg = <0 0x15001000 0 0x1000>; + mediatek,smi = <&smi_common>; + clocks = <&mmsys CLK_MM_MM_SMI_IMG>, + <&camsys CLK_CAM_LARB2>; + clock-names = "apb", "smi"; + power-domains = <&spm MT8365_POWER_DOMAIN_CAM>; + mediatek,larb-id = <2>; + }; + + vdecsys: syscon@16000000 { + compatible = "mediatek,mt8365-vdecsys", "syscon"; + reg = <0 0x16000000 0 0x1000>; + #clock-cells = <1>; + }; + + larb3: larb@16010000 { + compatible = "mediatek,mt8365-smi-larb", + "mediatek,mt8186-smi-larb"; + reg = <0 0x16010000 0 0x1000>; + mediatek,smi = <&smi_common>; + clocks = <&vdecsys CLK_VDEC_LARB1>, + <&vdecsys CLK_VDEC_LARB1>; + clock-names = "apb", "smi"; + power-domains = <&spm MT8365_POWER_DOMAIN_VDEC>; + mediatek,larb-id = <3>; + }; + + vencsys: syscon@17000000 { + compatible = "mediatek,mt8365-vencsys", "syscon"; + reg = <0 0x17000000 0 0x1000>; + #clock-cells = <1>; + }; + + larb1: larb@17010000 { + compatible = "mediatek,mt8365-smi-larb", + "mediatek,mt8186-smi-larb"; + reg = <0 0x17010000 0 0x1000>; + mediatek,smi = <&smi_common>; + clocks = <&vencsys CLK_VENC>, <&vencsys CLK_VENC>; + clock-names = "apb", "smi"; + power-domains = <&spm MT8365_POWER_DOMAIN_VENC>; + mediatek,larb-id = <1>; + }; + apu: syscon@19020000 { compatible = "mediatek,mt8365-apu", "syscon"; reg = <0 0x19020000 0 0x1000>; From patchwork Thu Aug 3 09:40:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13339607 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 B4650C0015E for ; Thu, 3 Aug 2023 09:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=NaqmMPfKXAOtSVjFcLvPHbWm7slgkGY5/ld8VMlAl3Q=; b=s4VVdwb1Snbim+mBUhmNC3DvK8 ap1IhQDRyLWY6OBePHAJW0aLqQotdw9Lsxd05T8zLGc/ew64AByO4Fo6/Ql8kfxmQiBi6QawUQixK crLp0SWKDSuY+DSjEYGWb8GKXO0VWRWQ0G7eSbecua1SoCd5QopZ8uvxiHztqEhl4lewzk9gqK1DX DNaL8wY0jA9YcQJzAJgElQ7A30BHJV+56KfVtdXL7U21xpU6upPxH3julRZzDlSlSrKioKwj11nrd 07/jHeMCQe8KWz/3a8ytX7Q7lVksTaALnyVhOlZ/T1nVeIfKpLWFR/0qLttYD7v8poP4GGCb4k+4B Vp09pgTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpf-007EXk-1Z; Thu, 03 Aug 2023 09:41:23 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRUpW-007EPp-0Z for linux-mediatek@lists.infradead.org; Thu, 03 Aug 2023 09:41:15 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fe1d462762so7664715e9.0 for ; Thu, 03 Aug 2023 02:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691055673; x=1691660473; 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=NaqmMPfKXAOtSVjFcLvPHbWm7slgkGY5/ld8VMlAl3Q=; b=ORHKnuWxwNVvjhuPg+lGCHO2YLJA5sqiZdPzQsNUCwPqjluQs7KGXlQ8CubTtLmlQT c8bm7rPEPljBDm4e8hAyNHrnsMCInefUM5LcxQs7KP7xKaMJcmhFWzZrJD/xbaHkMq4K 0J5eFFVdb/TKh/yck1LHmLiMstpoxAt+ruXdmLEWzqe8yf1uh6C+rft1ICXtICDAjph2 HAspl4rKv91tZHnMiJUXBNwCch9/Fxri0gWcp5/L+rN6gbuBXEwIDeeqqmJuodktKHcJ gTTY88x8CVZsDWuBaRdCVQWh1gGKYMDVVyptnAv+x2ZNSyKHJeFpJx6eA9Ib9qSSYFuK SDHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691055673; x=1691660473; 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=NaqmMPfKXAOtSVjFcLvPHbWm7slgkGY5/ld8VMlAl3Q=; b=Plgs5GIrpUv3Er5M9FD7yTwB6RRlpJEaXvjZ+UZ2UKBZMTJJEivJnvSJg1NmNdlDzx 2DgkLwf16ARffr0RupLaHcaPrDY3QcSa23tvvU+SxdeXFc9IoklLG1ial3mO8qT81xw1 AzItD8habUyMN59x1CWV1afA872d/5MeKugptU/jk6GGfTcrS8iMaH2SpMhj2yNjmSfp H0oG/gW4BB9p3X3heXQOGKCTYWmI2fqUlqefLpC4uuzckmJvcDVrL4lMTgKvYeggr987 uWFpZeZggPK9C0QfUdNrm+q7M92Jk/+3l7kHTKGY23vuOISSMH/hJl1Pt2YfYIWP/br/ KJvw== X-Gm-Message-State: ABy/qLYMQNhNTCD3TFTWdG8no5vZ1p/g0yABfrajoFq3vvtxglBHMu4L Hd4XpE+KmhpRbgTWjSlwdR/GCA== X-Google-Smtp-Source: APBJJlE4g/QxkkNcPkq5XGfDtMFOGuI1W8qHwNsMr4YidpB8nT+vJcn+uCpQv4l+jguaoqHYqH0UeA== X-Received: by 2002:a7b:cc88:0:b0:3fe:1d13:4663 with SMTP id p8-20020a7bcc88000000b003fe1d134663mr6818673wma.1.1691055672966; Thu, 03 Aug 2023 02:41:12 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id n1-20020a05600c4f8100b003fe15ac0934sm13294994wmq.1.2023.08.03.02.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 02:41:12 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 03 Aug 2023 11:40:59 +0200 Subject: [PATCH v4 7/7] arm64: dts: mediatek: add iommu support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v4-7-84798657c410@baylibre.com> References: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> In-Reply-To: <20230207-iommu-support-v4-0-84798657c410@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Conor Dooley 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=1094; i=amergnat@baylibre.com; h=from:subject:message-id; bh=9vmrSAYQ/OJGejgymOj9rq18l0jyb8olHnhsKnJiPYw=; b=owEBbAKT/ZANAwAKAStGSZ1+MdRFAcsmYgBky3YuJx6x4dzDhkJEC8For4LCR2hLUkAQ+++WgYvK LGwc6IyJAjIEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZMt2LgAKCRArRkmdfjHURedSD/ i0CM6VH7TYVqNFUOU3Vvvj9lj3yLia/HYD5uuz2nC0zGYQeLx0mOPVnS7DEF8TBRwRXc8PLyiuWeIk faqvsYAXVImDAominB2/0DREyXWQ8YIBcnKzi92enu/y+pwFo/aS4WblRnwc4TzN4cFjFeS4/4O6gW 89KNusCnwqg20iHE/bTxOjaAHz598/azpJ/eawPEydC+Wd7GUudVnkXiIbsQzvYJ83I8UHMXH8kZQi pKg4StMsGHCS3mewVMRZCtmgB2tGmMwo/X87RD77II0ZVIV7I1OI6amUzBSNXB/nJHsMvIEYiapECo bxLrIHWMT2V9KcSxkgdp81B+ZbIRkro1vN2+M6fS5LTJMNAAd5YiIRyTxAWJ4Af5A986e6roNmUN3Y Om8RsQmDHwgKAQoDhsphdgKucuhPDEx897OX0Uk7SNgW/1qlGVM6nyBoi8kDGtyzBJZVACdT9vr01j Ijjc21Jm+h0tOits72Ao7oYZxXIdRL370X3vEn4yGPkTxK0lsei/mlY1DL7tQb1jMfCPSW+WLL1JcY gYvGxfzhdkyGXi2K59ZcwqOSYPg8N8SjTxg2HUgNd8c175WRL9tn9rZrY/c7K2ifAZCfJ2ZyVAB4M0 GNhxXJc3aVW+DycPFeL+AUfJvCrUMNclqlF24ClQJ6VRXjvTy096lXvt8W 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-20230803_024114_265349_8868AA69 X-CRM114-Status: GOOD ( 10.49 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add iommu support in the SoC DTS using the 4 local arbiters (LARBs) Reviewed-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index afcfa1dd242e..24581f7410aa 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -471,6 +471,14 @@ sysirq: interrupt-controller@10200a80 { reg = <0 0x10200a80 0 0x20>; }; + iommu: iommu@10205000 { + compatible = "mediatek,mt8365-m4u"; + reg = <0 0x10205000 0 0x1000>; + interrupts = ; + mediatek,larbs = <&larb0>, <&larb1>, <&larb2>, <&larb3>; + #iommu-cells = <1>; + }; + infracfg_nao: infracfg@1020e000 { compatible = "mediatek,mt8365-infracfg", "syscon"; reg = <0 0x1020e000 0 0x1000>;