From patchwork Wed Apr 5 08:06:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13201334 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 DB200C76188 for ; Wed, 5 Apr 2023 08:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h4YBkq4Gc3NNSt1XxOQ5QMg4dqIyxmoq8AW1sgVedu8=; b=o3qOczMCM4zv3k FTpSNG3/S5bKcKtcjyIeOlP9VGkkJUuqFFhlpPswUTaMS+rZlyeb8UqLOA4b+iQqsiFnNsS1HUA9O BJUVOgu4Yic2NvVF7rFITAXSOVMYWocoT77IQa28uEKrhznJjKXV+Lob9QD/ETDgQ3iT6BTpxdlzD PD7du5WOAPPYbJUBfyCSX11IUQRe1SPf6QDkp2sRurFP8Y6Mo3F9RuH1vrc2h+NM+03nU5mkyQBc4 miLXqZrDk8j1vNwYM3JLBrB34NVfi/4WU8aZLfCfdatiaCfcgEFt00v6Qbr8hErWgJWh5cOiW4WVy iHBGNVzoZxWrylfjYxjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjyBg-003j1B-02; Wed, 05 Apr 2023 08:08:12 +0000 Received: from mail-wm1-f54.google.com ([209.85.128.54]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjyBb-003ivg-2F for linux-arm-kernel@lists.infradead.org; Wed, 05 Apr 2023 08:08:09 +0000 Received: by mail-wm1-f54.google.com with SMTP id j1-20020a05600c1c0100b003f04da00d07so1704554wms.1 for ; Wed, 05 Apr 2023 01:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680682074; 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=vC37SPRuGSTtJnMrgLOqcrANQR2a4Xjl57wIS2cFdSmSDXVTJv87ZOCMnfWR/ekZmg zmxTY9Vly7gEaFZr9rrndEJL0fwvCfEZiKMlSh88tTP80g5ga2H1lyFQpRAlTRkVWs70 95EV1zgB4kEyXhwIRYRZZw80RPSRh6ov4mHpFvrQ5bN+e8gyxcFjA/gQyZZG1XylGquC j+V3A8UVrRtnCasdq/MNHMUYZctcx8+VlPJNWCdwRrAa8aYZnbVOm1K80TIFQqCX6GaY zoywVAJrYtnG8mUZh1tZwAOt7bb7qKHRnwVc1F9pawsXXjGSnOd3Vv+la8xLUP6nKrJ9 mZvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680682074; 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=n3Bl21cVvJnpDb8EnsOEgrTgcZMu/U+XDP7MrcnZ7YdnHlg7DAbnj4Nr4P/WBIkwkf 1kECFR0kJIxYq/vO2KULHjd/n6B+vg+Iw8OtKkVN0vMo9H/XktKox4GFrXmb+2671tVX epo7/60UE1CcqXv82DAJaOzBDzFcg96COpd2OXgysZnQaRdhUWZeP2fn1r9+Xw1QKOOb C7Mx5p5sW71EGTf/7xuLkihhmQSOOs6+i6cJZAOjQvm64bt4DMy0Zk++SvUeD9iU7meT V6rXwr6rbjpP45wOAfNP08CCZ21kYjFVyLnKQqO7VmJxvaoUinsCJWh60vnfK0kq9Q84 cv+g== X-Gm-Message-State: AAQBX9d/JMPiQUwyKhsluPQDRqdTQ2fgrpdY9tS8cf7mSc/TvGOTEH2Z PuxtYL/oS6Yes2euNv+zZeUrvNFjFBThxDIaaq8= X-Google-Smtp-Source: AKy350ZlwKxcKrdi1y+uB18vJkxgLBTl7GEMfPyPnXCKZka9q56+j7miIS2FFOvPTDEe5qCNKGJp+A== X-Received: by 2002:a05:600c:2054:b0:3ee:d7f:6676 with SMTP id p20-20020a05600c205400b003ee0d7f6676mr3956095wmg.11.1680682074529; Wed, 05 Apr 2023 01:07:54 -0700 (PDT) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id d4-20020a05600c3ac400b003ee8a1bc220sm1378395wms.1.2023.04.05.01.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 01:07:54 -0700 (PDT) From: Alexandre Mergnat Date: Wed, 05 Apr 2023 10:06:48 +0200 Subject: [PATCH v2 06/10] arm64: dts: mediatek: add power domain support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v2-6-60d5fa00e4e5@baylibre.com> References: <20230207-iommu-support-v2-0-60d5fa00e4e5@baylibre.com> In-Reply-To: <20230207-iommu-support-v2-0-60d5fa00e4e5@baylibre.com> To: Yong Wu , Krzysztof Kozlowski , Rob Herring , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski Cc: linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4617; i=amergnat@baylibre.com; h=from:subject:message-id; bh=8SGgl6AnSEaP0TiVCLT5CLjF1FPWuK/os69MqWsUi8E=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkLSxSZvY7WYtrVZZ048+sAksLv7mZ/3DDV3PIV9FZ VuXyio2JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZC0sUgAKCRArRkmdfjHUReXKD/ 98PT57pl0/HAZiA9k2UQRohub2R1PIJLlVB/FWhUTECl1UlKdYDJROhK19Y90ApxgQ82t2+uStIZwa j0LF0qW5GFKDCpUD+twPVbP5YyYTpojOnn3oFVZrvS2WSZg3udt/ZNxXPsu5UFC7MVaWq15AJk/7fS 7hLKrUjQA6s+3IBgfG+LqEV6XdPM5I49Tw3WWOUuyM0WOTHSTA6Wy4TuD2zdRwBRf5dBi4w6NgsV0A adG7XQbITYgCX7L9Z0xR6ApUjn2q0hAN2LbGCUi7zCLNkwWc4m25NICMHGXy6rlPk2B/Mjx9t41GBv eB64iiuQTvBqYPARuWv1KT1QhXVgbw7YNbHzQijc4omjkmYmQQebCMJSKi8VtV39f7hICaBvNNq23z +o299/8ex3ABSkjh9QcGFsL4NwEhf6tjcDqweQo/LjANxqBWK2i53aEuX7R0jAo2YtjTuYFuj9q3v/ s/oShVO7bYnWhC+/JY1rW60pCuY+pM7m+ypT4qZvH1SzRmZH/uJ5Ds08MtzMf85KNypMOr/W+uF4lt 7dpC68Fc0LIkIap8feQJm5Lt5RBstpS1j+iW1/jMFE1FoPrrRg9IfwmS5QpaR3ibMV5hYfMDESSour k1aI4F2WQ4ieUmj3D+vt+hmORx8vkhAwh8nrCTy4uJ6SdR4Fd++loOxV79WA== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230405_010807_737166_07EE3074 X-CRM114-Status: GOOD ( 12.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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";