From patchwork Tue Mar 7 13:46:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13163623 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 02C19C678D5 for ; Tue, 7 Mar 2023 14:04: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: 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=Sj1MoUzTcJ5F0obMFGgkISN8DcHVQCwpZiEQY5HQF8w=; b=S0X7vjemDdd47c VFi8etooI1+d2xI6yYRlvegtvFnnFLriBixdgBUTrvMuD2pC1bGuHKkI/3ZIAHfhLDn3GjTx6MyWh Evxx6zwsV/VJ1OTgclXDxYpbXPg3WhE7VJOlMxox7c6vRcEJFxRo/ZwRjwcV6ptSeZoTwbWh192QI wH53CsTHbP1nEddGuPx+xPpB0vhMZ1jgaZwwVgXAJdJejvu2vjTuNPDxjOdhxR0gw0ZNE4sE+zLJ0 typvuExEohWfszLNkdDEz/3DACt/o2dFyyBLOphnFIqIvMMjfzKV8sqSNYZ7K37lUyq5x1L/lRdc7 /7NUk7nqpDjAz9EK2b8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXun-000cCc-62; Tue, 07 Mar 2023 14:03:42 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZXeK-000V3m-J1 for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 13:46:44 +0000 Received: by mail-wr1-x432.google.com with SMTP id j2so12154584wrh.9 for ; Tue, 07 Mar 2023 05:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678196799; 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=KxwMXMVHzfX0be9xjh/v8FRir/bg4Z2FDQF8dxvqQ/g=; b=5nT27x+qmjL5nvB/W87v9ODOkKtFTZyNzbIWkozBSPXT2hOsgHLmbfHIBKpmUvHlWl Z4qKfY3vTcSh5cayVVhsEhFWuTsXji6+24aEvugOMFlNyzuDy/cEAXFDovF1NHGakPp7 RulkzeOCub7tOH7BuqgTYV28oaOUGG0PtpjZs3TPHlXNvyjwJGABLLzdRNeJebO7IEq0 nvXZ0EWfI3FPPRwVmqLih1MV+M5k6Tewtbhef/dPkHk/6dOc3UDmEMdn79zX+ERrtOzY wgQo3jQoffKn6y4pRavLY91Zzhd4c32FdQE7Anv13x42fIK2sitDOanU3kO2kLUH5vCv HEEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678196799; 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=KxwMXMVHzfX0be9xjh/v8FRir/bg4Z2FDQF8dxvqQ/g=; b=jYXUfQotzWaNaitLDyJm9Hbgu3oMxKadbIfMqPf0CTj4Qj/TVtNjVqOvjtdJJOT07q W7xhwmRI3j/8tUIIXqFr3xitmZYJX3JP27XKaPbGymSNxYKyTAyb5aMUzsCeYVmGdDvX hY5HeKKMVe2/YhwJ+h+LQ/Jgr94+OmtCKbMhhw1wPXk/uQ2++ZZlUDeWCQ1lw3cgtJhl s2hOaRxnGtclD2E3aJfnJKuzOIV4r5HcjQRJ+1YXtPYcE75X19u9uoNw5gl97vawh9NB XO/90hwR0ZNQVXziOMSHaDz5ekEzTEcVy33ZKnuaYpCzwWzlNhVuW+Fqqqmlvan4RuCc Eo5w== X-Gm-Message-State: AO0yUKU83GuOGuS8L0W6s9FuqVYZwwCEUB3cWMO1f9PoI/lCz3FlW/hx MNCnj14AIEApDg4XOhSYyPwiHw== X-Google-Smtp-Source: AK7set8STd6s2B3fdSv7zGYq3k9bbGhTL6AoRZSF/YiaVRwon0fmmQFX7C18oa/Eow02IpFUa4f70g== X-Received: by 2002:adf:ff83:0:b0:2c7:1c8a:9183 with SMTP id j3-20020adfff83000000b002c71c8a9183mr8308888wrr.60.1678196799309; Tue, 07 Mar 2023 05:46:39 -0800 (PST) Received: from [127.0.1.1] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id o13-20020a5d670d000000b002c8476dde7asm12657607wru.114.2023.03.07.05.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:46:38 -0800 (PST) From: Alexandre Mergnat Date: Tue, 07 Mar 2023 14:46:28 +0100 Subject: [PATCH 3/6] arm64: dts: mediatek: add power domain support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20230207-iommu-support-v1-3-4f0c81fd52c1@baylibre.com> References: <20230207-iommu-support-v1-0-4f0c81fd52c1@baylibre.com> In-Reply-To: <20230207-iommu-support-v1-0-4f0c81fd52c1@baylibre.com> To: Krzysztof Kozlowski , Rob Herring , Matthias Brugger , Yong Wu , Krzysztof Kozlowski , AngeloGioacchino Del Regno Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=5185; i=amergnat@baylibre.com; h=from:subject:message-id; bh=kZCaTFt0UdZkt9fKcKs/p0bzAc4OINn/W3im+K90/as=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBkB0A7qva7P3Bh7A1qd+cuwNcGDeb8Wzyqd0IYjCiM T0kB8kCJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZAdAOwAKCRArRkmdfjHURbRRD/ 45q98Nji9hak/YdT3wIJhgy3uiIYGyWUl3xuNAbwsowRTdbL5bjIDAxZA7VXbL7St8XSOIC0eOPILa mS8cgcsI7zTnm9N08yH5PoCaq8wH3S7C3SlgoXvVxYeAfHHjaVElL0qKq96BaXeATqNU02d7pYMVFd w2exD/UDhnSzeAsnVtWSAV3jV0Ev33j3ZrVEHCCpMTBCiBPVisBg1F5waLF/jgU9tm0oc7LIMP4pS5 5d3KsuvzpaNpCG0SnviIuPWWJn7uPTtlBknqJ2UNqeoyDHirOxoT4fnf1Bbnr6n5+0/HL1SpgO+N1e OZs/U8GNHYA3CoF6lWxUT8lfkbe3IbXTyRAraqYU5r3rykIGLWMsl2bY6T/oecWQlY/p/mj2S5PtVV EkC9HWDFnpGv/fRBT+B4Kw2OFBxCoPvnVzBx84pbFILpfpXItUtY6nc7RZ9FESzrVLXjsyJm1Wwa1k XIYDjSOFoHpmq2EO9flWBjMPo/0apbj/81HP2/Ze31wou5yqrpBX8ozvu2Hi+EN8H1F6zQVj53xyQW LTpTpCx4zCobGKrWsAM25nwN+v43wgQsPNBHZVLWZSdPaMgxFNjmO8GA2itmfsHd/I1FNv//rgdisB Vdb1aDjh2hU6HqtCrl46Npql+mfWeGuFVxztqIh+yqQd5gqQ7y6vvfK2MmiA== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_054640_741185_1FD7D058 X-CRM114-Status: GOOD ( 12.48 ) 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 | 129 +++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index b5f5c77f7f84..67b375fe2020 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"; @@ -592,6 +702,25 @@ u2port1: usb-phy@1000 { #phy-cells = <1>; }; }; + + mmsys: syscon@14000000 { + compatible = "mediatek,mt8365-mmsys", "syscon"; + reg = <0 0x14000000 0 0x1000>; + #clock-cells = <1>; + }; + + camsys: syscon@15000000 { + compatible = "mediatek,mt8365-imgsys", "syscon"; + 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 {