From patchwork Fri Apr 7 09:34:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204621 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 92272C6FD1D for ; Fri, 7 Apr 2023 09:34:46 +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=Jxn+TRsbL2lgiHIWio+0AzhmetW3gojePjlFvN063GE=; b=vW4iWXnPYNti6cC9b+neSYbmXy niQuo3JKDMABkl36Hk3IPJiKrHgF8E+++iU0sJTZ2jkl8KTO/5GiHBV+EHQhqGWyC3ohHnCiMKYK0 dYxyvWKMMvCMKdbjoEJWr3gS5DUmSJqp1WAxXTWp8A4G06TSfmJbY7PYzbZrSTjBeF7/vprSzhDr1 vhzfmF4aaQYPSk/C0F5TthrgEDHyXhI1vZE3dbsphKmqVixlfDJ5DjRPiZE8yLd5+gwhElzxJnZi+ LVidSiSLjuLso7enmntVA6ABcNlbYrbEcj/qnL4ygaT2YZHABhVxvUZgJgciutBN7Q5N6lkQ5CoQJ hDWeBnuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUS-009g5g-1K; Fri, 07 Apr 2023 09:34:40 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUL-009g03-0D for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:34:34 +0000 Received: by mail-wr1-x436.google.com with SMTP id r29so41827307wra.13 for ; Fri, 07 Apr 2023 02:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860068; x=1683452068; 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=Jxn+TRsbL2lgiHIWio+0AzhmetW3gojePjlFvN063GE=; b=By+OkSQYatYSmT0Asjzri42rnDJ/FSFLdzIdKg27fdQtM6xcwmX/Y1cKgbaOI1nmKg +zgdg4qKlrE+Uixyd5mZ4owRbgTx1MpRUrk5faSksRknDJXvJfoCVxVj4DyfESvmTtQP v8kjifyj1toYv1OMUcmP0+ckJ/Ortic2SK8w1KiGaPTtwrem1fzyg6daBX61DkIgaums j6CKJz2kQ/wESuOW387iuXS/YH16sXDPBX5rdtvPekdMwlFq0rkyk0CH8f7asLgLfbWR z7k1b8Nq0asISiWH2NN2yLr6ODwp85FsDpSNmx61HlnVs7OcBYOM6D6u/FuAlmieK+Vc kVUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860068; x=1683452068; 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=Jxn+TRsbL2lgiHIWio+0AzhmetW3gojePjlFvN063GE=; b=TRzrG5zfGs87Q48gYhptgmnrChhMtxNDZ9KjgCvVVJA6KQdNY2tHbUNcZSjdiQ01n2 50mHPlR2ImJAIqZIV6H3wVWcjfDiGMr7Vv8mbHFcOA51JGCG65uBm5fUs01I0C1E0C8T 9tVC1ukPw5y8GB0HXZHnsocpEdZ8yUk9MDZLAEbYNNob5votwnjbsuw2Ub80Xjr5Eg2v gPUtm0ifB5FjMaR74GQwNm6+yfAeptSVuScpBU6X6/xH+qEC8CtsA2rBvmbyGgFKMA/g CWfl3WZOdYPzYQeC/ygukRIrF9WXWNXPWTjzbFVIMRDtfG+7uPC5KvZHseP0awTYpns9 7L1w== X-Gm-Message-State: AAQBX9dM1kMUyyy7JskYeZEKjGXshcVdHRcxk9vafYBPzlyqPj975Q76 Gd2wWrMnUHDCcg88DCm0Qk6SrQ== X-Google-Smtp-Source: AKy350YPtB2qqm/tfTf6wiR6eAJjclFxqHTy0s9UDld4/0zfFwB9yighmvTC2robN+fnfpNzduPjDQ== X-Received: by 2002:a05:6000:12cb:b0:2d7:89ce:8319 with SMTP id l11-20020a05600012cb00b002d789ce8319mr764774wrx.27.1680860067647; Fri, 07 Apr 2023 02:34:27 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:27 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:12 +0200 Subject: [PATCH v3 1/7] arm64: dts: mediatek: add mmsys support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-1-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=1181; i=amergnat@baylibre.com; h=from:subject:message-id; bh=IIlOfZtAZXJ+CTRWdZTf7MxepUo9ZjXmi2nPi0PBDfE=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+OhO5K9POZkm9D2W6JnijLrtwGC3rjMNLpfW/d/ KZhoB1mJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURdJ+D/ 9r9/Te9R69K349jViT+g4eRJgaXBXVs80vgLPMlbqBtrKR6AJ/XtQSM9ikDUQiUAarWTTTzVOwDPGy l+qc87ZFJkzn7YqK7Dn7/MMW6aXqTQv7pvB/jAtYrU2QPh+ALxyP2ryt0iQuI+snYSIoL368FTQbP8 WXdBnr57VMR90WF8bDnpNFcx0q9s4FyaT6kgAXA2jI0VTAuUukRXFLMjYjK7oK5/ELDMKiUjMlIV8Q 7lmjfRsotV5FnzNVe7C1NFtzn64X6htj/j2UqrA5NzPFhMAnzTm6sROLwhJjy8+nJyPkAjn1MyP/Jh gd97AZD9YVV855UR8X0dGgc3d9siodpUy6Wa8uZRY8i81gxqKjZv+ayHLUjMT1snW/ooEmy+8d/hJi OWTlAnNqgUC+ZLI5wV1Nf/NqZqdvJjKgVLB7z+0zyz1CQCSuP4tnQUTw0dzVkDtapdqO0BC6zB7+jN rs0DFJ49b2kFQF+jNqd9/X4LAA4t8SZ98T3Sb05RSaiVAbPWNuZ99VxICE8qY4d6+Jg8BhTy3wMFhw B7/xbdkRDtOP51uwSNyXjhVbFj0NvhODIZYtEEF2VYfadF5cM2wNEJsr76wUHEMMQY/CaoOhmxqIvW QnMbChzx7QkYAlSwdPVeNVoSbQAvk20iTHi0cCMDJQbZM4pUJVhdrBzwfMsg== 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-20230407_023433_156904_8D54B733 X-CRM114-Status: UNSURE ( 8.57 ) 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. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- 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 b5f5c77f7f84..db9ab538c34d 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -592,6 +592,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 Fri Apr 7 09:34:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204654 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 792C5C6FD1D for ; Fri, 7 Apr 2023 10:47:57 +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=YHYOqnIdeZEQQSsG6kV/waTEgcH9AADMsfaYGJviNTM=; b=OPR8oowT/QNnJaIzK5c2FxJIE2 LTNkaE56mXRBkts/WUk8Xcrkr4z301ot2tOtxcQeJXXhgX8dxY9FWUdSz2VxWa3bZroAh+cO97KP5 W/qvQaxunVwhAKmSG0ejjjbc9hloO2EE/cq3IP9JJ1/G1Moj03RKFmopDjIWKkwnkAuFFLxqEhuOm edx3q/vbIR2Lu65qDprNzxdULKheI+aaCU51qPkF/k1HFsUiqwPInk2uIuYAZFbvvq318c1mAe+aq +5OZfY762qxjSj11LrQnnrNFk9JMao2dhNBWKpDV+cFkGGnrp69yVwYReqzymqlYHp9JvWhx37XSs G/fA6Szg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkjdL-009tMT-1K; Fri, 07 Apr 2023 10:47:55 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUI-009g0A-0B for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:34:32 +0000 Received: by mail-wr1-x433.google.com with SMTP id j11so2177951wrd.2 for ; Fri, 07 Apr 2023 02:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860068; x=1683452068; 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=YHYOqnIdeZEQQSsG6kV/waTEgcH9AADMsfaYGJviNTM=; b=k3pIR4x5+wOfjx9lQEO60im9hZ96rrj0z+y5eKQBUKc/aMLuxUQhk06d4qr0J8cT/o VACKgdXzQIcO8Ww8V7/xqWlii5sZPH3YZ+ZFDurV2Qo99iqovpiMl5fjBn6p7hLCa61v loD9wxBbUmYRITQL6OBUyTTIrCG0/b0AEYF2HeBHAbrtfafFLPuthhR1xM14m5opHcJR GTG0DO3ErDPWNbNYiXkEf5H14rqlaBSuIVM38LSA80uKssCVELYsFVlMHeilpmK68etI 9sDeHmIS++xnJyJREr5ZkpaLXjQra4tK235i7NqDEqarbObSt9HIYH62uw4uQKx35ukF KUtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860068; x=1683452068; 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=YHYOqnIdeZEQQSsG6kV/waTEgcH9AADMsfaYGJviNTM=; b=zGxymI7xM6Bk1ew73zzlzsSuuwoBlehTcIXdsdE5FwB4GoyghPzkpvVGla6BjKx+8h /nZ/8LQVv/DWEBwU6QmaxvxL7LCzrCNJsZb6tWtqRmAHEckCTqJQ3STOb5fT51K+DBN+ fvlZ2yDCU4lyCmWJCWLN88NJDgYUzt5tBxB6v0/g1mDGvBsY7qCaLjg5oY3J+WXknnJf BErhS2Bq3JsRkB3xDySJXZrK0ZA8buITS0WjvsWGddSx34hObULTF86qC9oNoRXc5zfc gF269L6TAHv+LsGcPw6QE56twHsUJ0dfZq8behTluZK1OQicagrsG65YXzKv3aPLouKf NWVQ== X-Gm-Message-State: AAQBX9em/4btsGwi1xupGt43wPAGfujslaqW/cwm1SzcIiyf/YG3s3GF mnE8gFoMSZZPuX0C4v2QIO/RPQ== X-Google-Smtp-Source: AKy350bHUE4UFLR7A4HheArzii7UQVzEmxq9wP+ITj9W2OkfjTYRlR/FG24WqK5tgspb8CbPkQ9txg== X-Received: by 2002:adf:e846:0:b0:2ef:b052:1296 with SMTP id d6-20020adfe846000000b002efb0521296mr879884wrn.22.1680860068577; Fri, 07 Apr 2023 02:34:28 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:28 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:13 +0200 Subject: [PATCH v3 2/7] arm64: dts: mediatek: add camsys support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-2-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=1044; i=amergnat@baylibre.com; h=from:subject:message-id; bh=x/wu+Gg/Z7J2I0F/gXx6zOm7KvojSbz4OytIRAJsBIw=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+OhucnBrd49pvMbqIMlZUY8dvmyomr+x4uYi4vC eh+C3bKJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURVdHD/ 0WCP0DZQ+UKoyCD95Yd9rE6bg3Nr9C4CfmZyQ4806NHa1KO0J+tOvhXn8krVpWU8wXS8vY0148LXmI WBB18zc5bk/nSrYOhxr/05jCdr2f+KkAqZtUTx8qc4xMZ8K+DF/cxtya0LkFuVSUOTvSSBZf1501fZ nQ+eifAMYStNJPvkjSbUEkQ2lTf0rVgo5Alvz+5ZJPJiqJF7XLGAHNNgHGpg3BTqKBdE5j9OBkNRMg vAoyIXXlx2K/f5vFFXqAP+PVhyl8DibiL1a5W+kwZFZbba3NpoKbSayJWbJnXPBTGIpmkcW5tVoCox GqMOlGez00z8ErE8MDtZMdaBzMwCyp8aRjcGmtRn0DHIlQWFEgir1Sz4ow8zdRsiTP+CaJyMmkyJBe UQjxorXX//VMZbzrzFEf4cIX5LRE1Yg1RhPXHW8ZXPc7cGvA9SLSTK4ebAhj4a72vq+fx7+YfKSJEb 3mNeo5KugG+2EizgVze7CNOrVEBu/y6iQdQsY7uvpiO36sO6A7pgQ6/PiyeqWtTd77/sfFGKxYpqmz ywTYXzT638j/UbhN4VKvlI831lI+1uvrISiXTmE25cPzhG/2iWNXx9hIyYhKFzCeT5VUywB1LI1fKf rJHMAoek+0yGDMKNiQDj6zP6P5hMOZf4HP5n1mQ9W6X49hhRjeIkVGbh9RYQ== 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-20230407_023430_103534_86DE992A X-CRM114-Status: UNSURE ( 9.38 ) 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 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. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- 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 db9ab538c34d..73cb10d296fa 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -598,6 +598,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 Fri Apr 7 09:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204619 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 C8789C77B6E for ; Fri, 7 Apr 2023 09:34:40 +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=70JWiI3ir/yodHMirtpCr960hDJucp8ZmgOAZyHHfjo=; b=YGl0DjHhQLYIBTFQzhLuGIqoHH 9yht6RChKUkcsgUG9gfNQ+HuapZy1CFjMBGHox9Ohc2vxoL6jLFV8eYtLCDEGLCBku+EA0AlGb/rX w5o+HmeGu2YCI+b4IxefNfZ0O61GInJzjnZJiLkSWfTLhI/HuGxuDefCSRJYbBZWpqUFMPtNjRBzt /FFmDdMYcwTLlcyrvBJqk9C2+7O3op3Hi5JFY87aBE0kzb8rwsVuyEcETrOxjyp/2nLAbXqSDAzbS LucjgN3v6aqHUeUH6JMRxAOiF4PLpl9qZ2h+FMPbVCYu1aJUNPn+haJXJ9h3MPBKMKyCb5NdobQqj LzD3HFGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUM-009g3J-1S; Fri, 07 Apr 2023 09:34:34 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUJ-009g0H-0A for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:34:32 +0000 Received: by mail-wr1-x435.google.com with SMTP id e18so41840610wra.9 for ; Fri, 07 Apr 2023 02:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860069; x=1683452069; 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=70JWiI3ir/yodHMirtpCr960hDJucp8ZmgOAZyHHfjo=; b=QONjcM29kV4dmGB3rYEiONRK5cMaa6iuyKF2F42L3XXJJguLusSxoZpsDfEYzNHrJQ PCve/XJithRyJlBCCehKo5C6uADcrcFyBiWsUjesvvs4csM2RJExdrtZYgQfAlS/TcwH WquiPJgyLMhp05XnzHIPk2z2kmkrURr0wmt+FjT5EDEFe33tw1gD12kt1YM2kZiQahuz bH9IW8UsgdOR3nDyEOrUTw6pHBetJKgliKfuDtgtbZp8tYaefzJniFSkwJay4GbQoMYi f3guY3mNKfR7mBcXVNDqoK3oE9uz2POBhXN7jkoXhB1BE0gmhzupPCK7QE7nhD9t2ugg VzUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860069; x=1683452069; 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=70JWiI3ir/yodHMirtpCr960hDJucp8ZmgOAZyHHfjo=; b=RUKN7R7EBD9glu1tpd6Hs0WX7ifDVILyLzBOzcN/+u/yRSkHHbhrDqOmKA1lTlyOs6 7s4CbkM85E9YVCD/XcHMZyf+el7u7iEt6ma7lzV87mcgmJwfZ+Zg+EKhEvQlcbUZDVnw 8K9cjBLxEZvvxRbyr2jEk7WKIZxeEnHDUlGCAQHyAvRHWIU/BEIg4gAuqh38W2GnWVRK iKE/QS8S//nwyexcIP1Zq1gzBqrxTDT2VQW+XQ5ONo0ZtZ4TJYRiLsOeNr7lHoC+MIXQ R4wsMcGMbXYEUTH4Y849ekz2zeWSAMsai17/tfv6sBMBGi5iBN8X+IE7g4htoEsBXCg9 i54g== X-Gm-Message-State: AAQBX9dIczMwYgj/Ftqv/hencb6DHbW57uxXJrPw5FeBte8L6TglLpJE 8x5TOJEMy3nnkQwxPfgb5f0L2A== X-Google-Smtp-Source: AKy350YypaAVLJKTn67bZFSJ5w+Bznsf6177h4pS/ayorAldv93lbe3E88jagS9SiBVOi3W60rfOng== X-Received: by 2002:a5d:51d1:0:b0:2ce:a30d:f764 with SMTP id n17-20020a5d51d1000000b002cea30df764mr942043wrv.21.1680860069489; Fri, 07 Apr 2023 02:34:29 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:29 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:14 +0200 Subject: [PATCH v3 3/7] arm64: dts: mediatek: add apu support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-3-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=1091; i=amergnat@baylibre.com; h=from:subject:message-id; bh=xWFAj8fuPjSh5BRKLkeGKOoKQ305/M/G1EGxpvjOkWE=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+Ohlg4spt+Ph+OrbPJZKpEpJNrFe4L6RjUFlhcD 044pvFCJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURZK/D/ wIztu59Z6cma4MWtA5B7NQozRNiJHyTE/Kl8Z5vijoZ0nE/K4GDnlyrtym6yebHm/EehfkJMuhrphg Zz/cf/vxh+FX92tn4pfkqQlub9u2mz2eULkvrtNnCzTUaI/XdQXpGKfzxUF0mCHf75z919RvnzWNab RyHSvxl806VvR1jKbt62bbdDzwuFOENhrp0O1kJ8dQdNOU9DnXtZFRopBkQxYSXC/gLoD22MprXA9O z+5NDatU/AD6FiV+w7K4Di3a+mj/uCc9EWM0f65ekcXGhbyVb5bDeAW2tXrVoqtdAvy4caoDEbW5wD ELHrZ3k08yu0/pb8b1FUT253Tl9/wioZ0vMy+CXcdBpsG4cBb/+Ko53Nbvd1Ba7tNn9Blkh3NA5E8b ViVV0vL4qIBvhddGJX2urR3FA25LZbpxGGC8/2msWAuzwm09IoyrA6rCUo9k28nL3Y0QZe4dOygoHh 7gkUD/rtJ8/0C8XvT9aQbP4Ex5KqI3E9qvVlsDmUUnq163orhqdlXe2dwnhX3p2WrlFhMPBA2HhKVG xfhjzTKz44L+AyJ+KaJkEQLYKyLf9Tw14jO58hnx4Zi9VsUUxSgepunXgeocs5rHE47ygwGnj9lA7g xHgG6kPUFdRkYhaM6suBRYQTzpMmyU61mTNkUAxFMuNVY8PHgzFCmEwRS9Iw== 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-20230407_023431_087519_55641698 X-CRM114-Status: UNSURE ( 9.56 ) 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 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. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- 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 73cb10d296fa..386ab8902b55 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -604,6 +604,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 Fri Apr 7 09:34:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204653 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 B0264C76196 for ; Fri, 7 Apr 2023 10:45:36 +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=3KFcOYEAi46ZIl7QCtzcN5XD6VlwA2hJvytxtJEenkQ=; b=RL9zjmowWrGNdWFsYwTEUaAbO5 IdwVWYDsl6wbJSYh0C3FN7EpbypHP8y0Wv35WGCQidPb80IQowTfBKaTGQ6mI1h/xuOn/kOuDSwIw p0l0teSzAbSeLITo4+5ahzvP2Z3U4c6tHo4cgZ6dm32mnOvw8m0qnr8qhD226U4nWyzJYqgUlVkA4 0HjB3m3B/QGHGNw2pYishOyXcYt2kN4pzDCT5NvY8+t8vqtMMZi29unUjqNSlAb4QnYwnn1HIHdJ0 E/zQsyVGL8Ih7RZL64UaD+pgyW4MOg0/GaMLQuiTtq9yUMP+60mbSCGuMvTfLVTiKM+Xnn7JWbK31 u9cIqWAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkjax-009s2e-2b; Fri, 07 Apr 2023 10:45:27 +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 1pkjav-009s24-2s for linux-mediatek@bombadil.infradead.org; Fri, 07 Apr 2023 10:45:26 +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=3KFcOYEAi46ZIl7QCtzcN5XD6VlwA2hJvytxtJEenkQ=; b=dCJ9FIFRqpAcgqdN6ylg47M3Fc mbKl9zm4pHvJ/rf3gGpFHo+o+/WeDmn56lgQsAt69aMGeTiy4lj//GGBCNJPpFV+0TtDc3/C5uQI5 Xg5kNMnlw/+BZ6SzXrm5i7Md3Nhrvq4BRl+6KX87tW20h46uo6GP/Uzbnqcsr7kNqN84r5ccStN0b q+bYrdEvNmG3EDTtHvYFgsl3keINlbaH33bqHnNnpeh+f5yCLsR0JEWmyBry+2NHC+uSaqtGJnnqf H6jfnqymYbFR01TaICKqVRGNDHmQtG+p72e3bcJNQOenUSSe+iQGAogs0R0HF7NseHiPwNeDwyFzX QS/d+/ag==; Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUQ-00AzDU-2Z for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:36:09 +0000 Received: by mail-wr1-x433.google.com with SMTP id j11so2178008wrd.2 for ; Fri, 07 Apr 2023 02:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860070; x=1683452070; 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=3KFcOYEAi46ZIl7QCtzcN5XD6VlwA2hJvytxtJEenkQ=; b=rC8CFk78Ear9yw17oS85VokG+Iofo1AOflOUpNSVcFrPRfhKZChYgbY6Lc0R8pO0/G IqeuRobc0vx2r+nYVnR6mn7zvus2uJjdS5yKMeGei6Uylo1BRVvuOcsZjWdKaTdTwKq0 VAkCfLENFoIqZfkMuBrP6Lh1c1soi+HmmOBcEjx2p+3wzcDkBLw2MjNORRUytkavLRmK 3blAnIADp7fkoWhhihP/damDXlGg+dmuuswb3j0JYJUWTH01az0CaXOSe8j8ySkNUxqj E7fGc5OfNwPyukrAwoxPiUzFvalAGSP5hiUTrUL6bIBdyoMPkjVm78cIVC0UPM6mKri9 33eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860070; x=1683452070; 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=3KFcOYEAi46ZIl7QCtzcN5XD6VlwA2hJvytxtJEenkQ=; b=MrAuhJTeoghZDRPxCZy4Hv5QcgW479v3WA2uYa5x99vVbGSMRhmWtdjEgsGCOQC2AS PD1fkMyCvNSiqa2FRPSaU5om3uW80lQ+MWI/IbYSvE6Ue/a25dIxOlteNKPkeslwNT/9 DyANmiP5cV9aamCibP/1vleWDholkCNoL/nrRMdAiU+PY9rttLnzNznfnbRwE5su+yXs LYI9AMrnhI9mByTN9pmNEcYtbGRecFKRZbafO/VJ/L5cwkVMr3novtcS2XC730w1piog ygEH9AEf5s1VtCn+7SalcR4mFvBSIJvbwKFjq2KjvteGUjr0ogkcOFM3g1b4NbQxkG1Q nKQg== X-Gm-Message-State: AAQBX9fCjVL67mV5O+e5TtY0ZyCmdKReLjISZ5yu8qdpNYHl/aJ2/bfd CRBCUcEW0rOJJjxVsDneqMLvWQ== X-Google-Smtp-Source: AKy350aG9du0uwosq+FqixFFe8BXT07SgAILsAGexfDRZ7ImSOnkQuzCW7B0NCut1ljngJTh+NOpxA== X-Received: by 2002:a5d:69c8:0:b0:2ef:b341:4a2d with SMTP id s8-20020a5d69c8000000b002efb3414a2dmr605249wrw.24.1680860070539; Fri, 07 Apr 2023 02:34:30 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:30 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:15 +0200 Subject: [PATCH v3 4/7] arm64: dts: mediatek: add power domain support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-4-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=4617; i=amergnat@baylibre.com; h=from:subject:message-id; bh=8SGgl6AnSEaP0TiVCLT5CLjF1FPWuK/os69MqWsUi8E=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+OhYJB2BSSOnaWMDYSq5zrvNqXrrgEb/LQGOuDr XDl98PCJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURfwwEA CQXrE5TNxhv9xOA85ddxAywpvG6jv8pV5Eiy5GCVg9QUu+fCzZOjMd23dJyCqOgiPwHGwpTAbmCLco nfJaygKL70cBOElQTB+bkcDDyNmwa7yVbxU5fdFQNfA6gyASnf21NRskxCPnebZBHfRRY+U+pKGQAy OvrpoxdmY4e04GcN0V/LCXCT7GAQJOtar4fRJRwjXPh/e9qmLHm2Vanp6tDsV8zLkG48Xu+0492Kyn BdRX6qDKOuin6nC+vdkvS26MfdzelcqaB+DuhxJzgLYWSaAf/KQwKqNq4KyLJfxGveP3b3Ok89GgTg wy3WqwlsP8VSt4No7qqW3xaDQXmEuqmzHVlQekIgtVEeOT0N9gCit5iC+jUT4YM9giLkP9bRAPSP2S kgAwCEDS3MiLR85sb+EBreauTm7iIvrbzmOUXylDsjj9kjVAa/Pa8f97KiuXus1asSOYhUyP3/z/OP /x61gEjFyIpdFepotbTAT/xO5Crb0/6S7rEmf6YzNA5mtHOiiI8x3Mcsgrfihv05YkfAwqSFvpprER 48Uo2aqssvj7DcXNeujgHi8cscdQn9vyev5HEHN0de614iriB1fjLd396gQ0QznL0n/QbgEpsiiWZf z1Zh9agJ9HI/o/6McjhJ2sy/TsUsTs3dMr6mvFukpx/mt5v7E2MGJ53a3sRw== 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-20230407_103441_213294_C581DE3C X-CRM114-Status: GOOD ( 11.60 ) 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) Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno --- 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 386ab8902b55..0e4fa69a2415 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"; @@ -282,6 +283,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"; From patchwork Fri Apr 7 09:34:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204624 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 57642C77B61 for ; Fri, 7 Apr 2023 09:35:05 +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=tORp1I37+JIRNlLfmuNLwniBkIh0XbsRy1El1Qwfh5w=; b=YEzWaYkYE2+ERkA3OqDm7lAQPM cCwlTVJSPeP2Z+35thHoU8FINgIq4Vwwl1BKBre36yzL10y9dd46NTL9bxg5HW4NalUDYgd2z3B9o 3AmfOorXGRSTHZU/sigsfZoav5iF1OISdRqTyrPPm6FVHe2nVbwbNR1wachBsfU9qEFSmqLxISo+R e3uEOAzm1xV/ZeRZyiDy5528v9JVpzazXCE/paxHY5emEsa0KQ2it49Z6gzFp4k9bXy8nh0tMTpHB iimcze9ZWBSaEMDURWyTNX55kBirlmz7xltvV/Pv14OpqwLk4nhDHNOc10IMthPB7Me5MHMuNnLs1 x4WJKAYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUk-009gEv-0T; Fri, 07 Apr 2023 09:34:58 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUZ-009g9K-0Z for linux-mediatek@bombadil.infradead.org; Fri, 07 Apr 2023 09:34:47 +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=tORp1I37+JIRNlLfmuNLwniBkIh0XbsRy1El1Qwfh5w=; b=hq4kEbrUbaRI6AGmMQkP13uK94 rqfOgenXgzshUAwPJtXTNQ9G0uenwIkpT5VxHMzxAZI7pIznVshp5FLGHWXcTbZ199Ps02u/Wrjlz ojVGIoQmZcPjvd1LV+zMgzdY0OFlZkEFglh1IckNZUqZBC2u9lBtTdZ+UXKH2ykQ5bEtAIpzfgFXA w8Q5W9fVcx6UYilvmSvCOsdqIRCHKMPmoqjlIy1oMco6Ch7EH4ooNErjMTaqqCukPYNMIlqHRbJnm F1cHiw+VTuZOMFxQfS9ec3vEiKulf/kgsgH+KWvnVRPaBOE66tSSINp+28gLYWsjPbROBVVAHXQUN V/JkdeYg==; Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUQ-00AzDV-2a for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:34:44 +0000 Received: by mail-wr1-x42a.google.com with SMTP id m2so41852139wrh.6 for ; Fri, 07 Apr 2023 02:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860071; x=1683452071; 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=tORp1I37+JIRNlLfmuNLwniBkIh0XbsRy1El1Qwfh5w=; b=RSuG1BBx4bCJQ0eYtxaDMD910vcDXWy+sIyWzJ1nIcv/nKMsdJB1eaQrQyFQz+4FGF xuqULq4rBZ0/Kv7cxGn8KM2rTQaBoUjJgrF+k0xZbk8Tf7zvSEw9CyEiEWebrd/sIO/C pdQYBZgmsjzw92YR4NwCKHl7C7kQKkhmJ0dcRQeuAI9Tb35vmPY59HOfQeewwTsPys27 mdXTTX0/+BJmP8AS/nIvNZacmkXpxKa5U0MsNq35Syd6OI+1JpAFzvCG9UEKjiP/OaX3 Ed1xWybbx5PBFFwBlb2IPeTqAMl9Ye1keoxUvrh6yH4bbwywOq8QcOanwdWKjBwMqFql zmLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860071; x=1683452071; 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=tORp1I37+JIRNlLfmuNLwniBkIh0XbsRy1El1Qwfh5w=; b=Z7apEMAcpWfv7u7FD3jsURRqyDF/k01jHLKC/o2QEc7FxE3aRma/0wv5xWlgc5BsB4 p5BW32jIyGP9GAevEeSGBCphareBVquP+pIS+0xbP+jt7pAnVRy/uVNci+Wjm45FRvYs z9aJf8xepkEA3318wrXjkNiAASK77ZUAybs9Vk8XE+hqfU52pWQNRchohJDIQg9zvxbi 8PcbpcxrYeRCxt4CvuE5wo36MRMsMqqvfv8iJNBPVnrKRtZxx5LTFSPxEowaiF2Cqjk8 LtaKvmQnhpmtpQypGR7wBPvnn4NfsZO9v8OHbszXaceZX1SIHjn34ad2JillNqIQnnyP jrpw== X-Gm-Message-State: AAQBX9df/yr5jBzj9gfz+wmm7gUZ9+spxqHus10PfzYVXtycnrqq0HB4 rTBraBpkTqqYmpThohjsrAfsKQ== X-Google-Smtp-Source: AKy350bRaX25BJjuwBAyn87C14/6uA3JGJnA5KyGgh44d6eFan6tIBFWLkxt/l2BsXfJJPQMt2kKiA== X-Received: by 2002:adf:ec4d:0:b0:2cf:ea5d:f5fe with SMTP id w13-20020adfec4d000000b002cfea5df5femr955931wrn.36.1680860071643; Fri, 07 Apr 2023 02:34:31 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:31 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:16 +0200 Subject: [PATCH v3 5/7] arm64: dts: mediatek: add smi support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-5-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=2121; i=amergnat@baylibre.com; h=from:subject:message-id; bh=J4LWefgCJNgBuhY1OJrPCpnKJtdzqFO3621y4agMuJ0=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+OhKpEy6cL/H1p/HvPE1aODq1i4kG0au3hXRwDH /tjxL7CJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURdIKD/ 4iom3SPa8zqPqQUkQ9Jm7J4cF7sgWkc8BOx84oRJ8+klX0dQE0QFEyPsdSHaAjfgWKlikAiuiUzW+v EUJ9L7d0mPOg6IzWcAxHE89S06vjqmpBoyVwztw35bheyqzdstL6yfylwrYAfMY8+E8ZkxG9irn6II QokCOjedbM7IR/0urZ2vsz0EGilZjbzRKnqxlNUU7GGxXlau5FyS2HID92k6erM51JdDWQO/H2S5jN Ug9pUYQfPIH6SX/7ihLD5LIapPfAu0f4JDKp1o6aBgEpriwTUjUEr7Sv34ijvWR8uogIml1R8yPouM Yz31dI3xVkQmY9cDh2HO8weWhE6p9VtrCpDGWu15avcMKkc83aro1JbQTbbwsk3kVMgbpUcCkWJpOX 2HG8JGA+FHVBSEQU4RqPZ36TUDw3ayzOc2NX0SJFN204VVQG/0K3tfMzuMaJrldI8qVDXYr96Bj/Os 6JNHkOIUzmVyDzHSCcxjNg6wapdWcPot90H3fE4k1ii3ZRjoCescfAizuwSjVWo1HXip2K+qbygS1F HlixobTBiOxSESZ9MP5/RQv6lET9NlZ34jSgjvg9fxC5aDzgey89HwW5xaJk5HWqbygLPPOXmsrVgB 2TqI0+Pab5wV4PfNuKsu+u06FNj1V2P8fsleq/GlHrwT1f4BEzbGXGJKzlmQ== 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-20230407_103440_975321_6D0D6D53 X-CRM114-Status: UNSURE ( 9.59 ) 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 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 0e4fa69a2415..70915beb513c 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,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 Fri Apr 7 09:34:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204623 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 C30ECC6FD1D for ; Fri, 7 Apr 2023 09:35:03 +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=E8wkncoEW3UcSZNKmP1QjzM0HpYGIsR05ILVR35YRK0=; b=fkpXb3fqc3hLOYxXKSGwB/NlgN QEU6x7PwkyOj58iD3iNyTn47sge8z1z7LmIazdVC9qPsrtRq6AKtSslsX1IrqxN1hFndNNsSVAdKy u3gemFUECfWZZn9ES0IaIl670TrchK+HxijhOVT4/omwaizUA8/48W0193PdWj3Hc9D5GvK9Q2jeK aBd4doPOYvEi5+sNOBSvzH04TWi0y+DZe8bb9dFq56CurCF9+51G0U39I9MzFuR2Zx9B0Eu2g/XOh DeNEjhN85xEQrOBCk70PDSa1luCLmvAS+7t5YsX9oMBGQcm+lyR4f1vzNwpQMaQL9brwrjTDhq/VE 9IFAKAWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUj-009gE6-0P; Fri, 07 Apr 2023 09:34:57 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUY-009g96-2C for linux-mediatek@bombadil.infradead.org; Fri, 07 Apr 2023 09:34:46 +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=E8wkncoEW3UcSZNKmP1QjzM0HpYGIsR05ILVR35YRK0=; b=bDfn1ciR6s0y8Yq67d0FQSzVe1 BbnIEI/g4zJjdqfqdlunZlUfH8Fs5hnj7Mnte9RtSVJo78cDG92HTMPP82+jvC0smXVaLuk4t8w3B TLRcS4moZioTcdNgTSkk7pk520j4fyXNTB65OCWudV30q3KbwevOSmM+Qhfx7taEOeWpmog9+wu+k 301WK80PHDgQ3bkkEjXfLMZ9k4VJZqvWd8pqAcx8jo7DEmJ9jsdgQNXDMzPtnkIZllnn1aXnIyUv8 jwWiZkJftt2xUDmYGde4hyE0K/eMPpS6HYi7w0ButapcgwjP8TLUqFnliZfBNRqC8swx0cn2ndkKx xDAHRQYw==; Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUQ-00AzDX-2a for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:34:44 +0000 Received: by mail-wr1-x432.google.com with SMTP id v1so41849747wrv.1 for ; Fri, 07 Apr 2023 02:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860072; x=1683452072; 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=E8wkncoEW3UcSZNKmP1QjzM0HpYGIsR05ILVR35YRK0=; b=G+fKrs4Rnok+T9yu2dpYxTmWAs3dOQ7vbOz5QdPnis+h4koToGr8bX6tycleAtiA37 7ugBnFSk8S2CGL6/QOAkQgm/oZdsXBQtqGNeQ6C9AXvJ6N2lcrmeXyPm5+mS4Ia4KnVC Of7ZxgiUyQRbBbs+XXMrt0lGmmPXFthSRGZCmbAwWgUWmgLBXwF58sWPTjVSuQSQb1NH 9IDgUDsjGkZIV77mG8sJDUrmRd+7xsm8NJmkEQrKMgAnC8iEGbPzgJV8M9ZPlZcdGPSn 7lTbsufFJoAfOcF6v6LOqo9zdihkTcloXVRrPWhSV7O6inRolkh3Kx6Pk0hdbkZHlQH4 OKKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860073; x=1683452073; 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=E8wkncoEW3UcSZNKmP1QjzM0HpYGIsR05ILVR35YRK0=; b=TjB/6n7OZPAZ+nRKM4np0Xl6KH9kGVOIt9WSDeJZByvok/5kp3jPw2oWHjxQUwpZcx OcjpqF3HDiNVZoA9u1leJunk8cw5k/8xPCeTBBO5TbJgFjAfRazRlqyzBBpt67/lkqT2 Me4NoSHDrKMSb7m4KBY20O2NEHUiQwP6wusnh5JoCROeBBexjG5x5r53o0DDe7o17GaD hvMKRvfLXP1em3wjd0T30nguMOiOK2L7xk3e5xoxRPxFNcPiRUlFLJjUPwEENBhGpkxv LpZ29SDL2MxonNcQGkzKPxPotMTZLkAJ3L9++UPtSD8bJ3nrMFr3KbtwN9vvUqcurfJP 5Ulw== X-Gm-Message-State: AAQBX9cZ2zr9EEfQsO0FqL79ahjrSS9BBRQrNp97lf70Pj4ogn4wz302 kenBRWLkeLL66oJlfufGui6bxA== X-Google-Smtp-Source: AKy350aJyj0LUObDGF6QkURIbj/dclVOrpykWjc8RqbTL5P++90kDPYRhFUSx9890NzrvYhvhiUokg== X-Received: by 2002:adf:ee03:0:b0:2ce:b7a1:c1a3 with SMTP id y3-20020adfee03000000b002ceb7a1c1a3mr998008wrn.3.1680860072739; Fri, 07 Apr 2023 02:34:32 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:32 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:17 +0200 Subject: [PATCH v3 6/7] arm64: dts: mediatek: add larb support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-6-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=2919; i=amergnat@baylibre.com; h=from:subject:message-id; bh=/eg96dGEgFTbseacSYltO+tu8R5mtjKMtqf32ClmdXM=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+OhAHQ1FqZYfC72oBjPFXJ5fQNLH9cxIalmzV/J ZfLtvduJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURWsEEA DE/WrZfKEfR7OQxQ2VlvgVUR/0jjuKcg7X2Cgh9UAltf6sQT+Hbj66w1Ty9fv3rTvNU4N7Anhzv5pE hy4NXMYoRO/+qVnfkIMQLQDLZffN799KGzWbh/xNfhH3exmfCuTQ2emeDGrAUZ8bFXJH/v0RGp45S2 9e2UBjmy5ib0xKBi9P8lKmx2mS50YhNTAaihC1jitXfALrfc6HP/FikAQSlY+BFiX9hDYwwYURaX2i o60+B+ymNVmUsCw0SLtWdN4YN0uClPbaYdVCIFYMmlqJVAAaPCfqLiF1YxPViWaLVuTmS3Ylw/Cq/v KFClmwOEVxo49P//NQWu0n/7K5+i+XAwo6SvDWucr5O42YnXJDD5w7YMk2nqzeC5mb7ctyjBZkkXlg KxQQ44dn6DHX+XY29ATDNwKdBcEWYpTxqWYNB+ZxE0fiuVkQTpLvMARpRp9S4ortu5CvNitzvgp9wx zvCZXu/aQfkSP2juKeiqqD/4il65nNPd00U1/a8ioixNEMOMcfyvj4QSLSkj75thT1VXNAvIx4XZrF dP7KV5tABzRJ7eOEWw9iyjS4YgdMRIjaAEMrXCHAxMiQkDwN0EqrOrrq+3kCf/y3Okdfq/bAP5jk5P LnDm9fAeFPQoj/KGk9XZg24wAJLMMInusHgU7H2pfxLZ9zC4DPQYcZpqutLg== 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-20230407_103440_629226_BE668D35 X-CRM114-Status: UNSURE ( 9.68 ) 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 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 70915beb513c..07a7267f338e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -724,12 +724,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 Fri Apr 7 09:34:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13204622 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 696A2C6FD1D for ; Fri, 7 Apr 2023 09:34:50 +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=Ty5wIc3Z81+kG82VSRnC8Apz5DxLYwgxvYQ6Q3KABLA=; b=Cn7TdQznHWwPzSYo5k8bgXO48m VCNyklyZ84HhqjyvgGvGJEUX6eiAYBIKJQ6aPVLRL7B4HRxXhZhIBzD/JMlBV1TC4CxBcBcbINNOB eD8fwcwEYnLXYPtK3evPnxPIorsUDGu8Qo4llQeiRI6LGCe0KJFh1qRzgjui+R0PygZAdxpPIufYD Xdf0IVfqjG78+RHpOZ21J0kKL48oZPFn6TX1MjXukTusliNSwKYNdZoYquaG8zUK5h+J0BpoZF8IC 6O/1Hmyls4xpqZOBXBvTB5DTuilJW5UKecfZqtzuhwSdIDuyn2+xO5wd5XZY0JK69yKjt+11elRr0 O7NZMXDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUV-009g7Q-39; Fri, 07 Apr 2023 09:34:44 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkiUM-009g0H-09 for linux-mediatek@lists.infradead.org; Fri, 07 Apr 2023 09:34:35 +0000 Received: by mail-wr1-x435.google.com with SMTP id e18so41840736wra.9 for ; Fri, 07 Apr 2023 02:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680860073; x=1683452073; 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=Ty5wIc3Z81+kG82VSRnC8Apz5DxLYwgxvYQ6Q3KABLA=; b=tGurBQVuQ7y9plBgUeZloAz5GvkNiKOghaNxx/zgC4n9qgmf/dYpOv/I1JpDD7BAYm lD/0lDBqanGaFQctbOZnMkGXYeWdo2xX4SxSrY67cB0+aIEyvhmxN+M9zyHEanwotGOG HQq8w/lm6GHLYxROo9Vskj/9MZeCzS8DbKoaIkAmJL2wHIOVgQ80jHUhe4WJO1V5XQ9L jSxS1uvBzzsIaWb0JQnG/RvfWOLeJxeNq9BYFxzas5tknG5RslJOSFbgfAq0Mx3CrIoh M67aOk60Bt7VsO8EzPpf0Ltc9SQ/E8WITG/2UsmQMX6ZtgyB+d5A5y7iSf2XDPOQp5dY TxJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680860073; x=1683452073; 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=Ty5wIc3Z81+kG82VSRnC8Apz5DxLYwgxvYQ6Q3KABLA=; b=jwC7ViL2l4I68aqMoYVF+Srhyhd52fRu+0LC56CA4lDzLHGhmi9iroBrOFWX1ovzpF ZJNYzJAesZTlWICPrziViBxzhRsk4mjBxaijH2s+SDFIPyOWtG7fmrMBzaFV1ZSq59zs lNO4GCs6aGDvQLYGoWG4SX6YALzPMezXAsOO4sEFEPn3XIZJ9eI1UNAQFyFphuoGCkxO oYfhbm8OCd7qo3KL6v9mV5c3CfkVWIY8UP5QJhLvFk3h0VqkXbhDgLLK5OUCL6SK39gv G4OqGt9Ssq/BfXsEAuJNzTkTyS1Enfr34AdnkQfrIWfG7F348o4ndFpa0518tlCzzpiK xDKQ== X-Gm-Message-State: AAQBX9dTzaTZqc7p3kPuMdFlFvU29YnVWFtiz2qnTP/z/Y4OPgv5VchT E/ekc7hWfz4lpJI9HKozBoIA6Q== X-Google-Smtp-Source: AKy350ZCxukRPbiYxfQSW8vlwe9x8x2sFSg0sdY5cneYe0HCrfwmHA6Q4RTnYxKfkajPgrsZn6ufjQ== X-Received: by 2002:adf:db8e:0:b0:2d4:a843:d000 with SMTP id u14-20020adfdb8e000000b002d4a843d000mr857999wri.56.1680860073602; Fri, 07 Apr 2023 02:34:33 -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 s13-20020a5d510d000000b002d64fcb362dsm4020432wrt.111.2023.04.07.02.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 02:34:33 -0700 (PDT) From: Alexandre Mergnat Date: Fri, 07 Apr 2023 11:34:18 +0200 Subject: [PATCH v3 7/7] arm64: dts: mediatek: add iommu support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v3-7-97e19ad4e85d@baylibre.com> References: <20230207-iommu-support-v3-0-97e19ad4e85d@baylibre.com> In-Reply-To: <20230207-iommu-support-v3-0-97e19ad4e85d@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=1094; i=amergnat@baylibre.com; h=from:subject:message-id; bh=DnJEBHRsbqHL6qyjSRQDzaDxfH+izMrFh6xvaojG8T4=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkL+Ohg0L1C33TWbvz3zKaLZwmTsLFe1MkCtyZMLpe Ti6X3s+JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC/joQAKCRArRkmdfjHURZN1D/ 9aluz//LTMCYnheiQnLj++jXjk9/55KstgFzy9l/ZWVHcvv8qQgM37m3sxH+YQNW6PJHEUlYzA/75K dTUyKBiuWeqMB4BOwQo562DAf1kNBKsF5JcYN4fB0pjA4o5n4m+vzcZKAmtE81cPCrWO+Z680f7rod BLI9n/dMaWMSLeII7jmm2Npbe5D8hwifuSO9AUR06joR9hoGb/cDy1eOoehhAj5IPJk0P248cYB1Ri o+ThpClfOsU7f22gCusbilqxsw2AXhtW0OnUsfycFnXlzX5Z5EFCzIMJq3AzoUSTZcwD/0umfLMn5Z 0IfscdgMC/LtaEU5lHtjnj3b0nut0f43D++w9tUJJ/Np3HF9L/OIzb4kDE0HYBo1HNAAFiQHXRZIqf 3meLX+WJEi+cz8PgFkhmaFS47aAwoe/VlD4BQ3c4Q0O6nuctY/EYQVecHMbtGa6asRpdpSWV6td/15 FpfUITZap/juI5/Ll13V5MSfEbyH7+iE6qeeQo+GPdatetwyfuEoyQr4yV/tyUVDul0N/PtpwgrdKn FznOxUto/U6TBCeK9lh2DHw177IOmvD1ChDGCh4XpHDVUfNlnf5JF/tQ0t5bX295u22eNxSsZWEEQW jDnOWlcyNfLFUjdW3Wud9AwSiji2/arQFTmDrfqUDHwUhnVKbm+7MzULNntA== 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-20230407_023434_150602_190E9922 X-CRM114-Status: UNSURE ( 9.74 ) 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 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 07a7267f338e..6260744f4be5 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -456,6 +456,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>;