From patchwork Mon Sep 9 11:14:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Shao X-Patchwork-Id: 13796686 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 B5064ECE58A for ; Mon, 9 Sep 2024 11:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2E0O8WG9qwHR9JUYmxw/yuHs3HNYdoAdYl7RzElF3KM=; b=e/wzvZL+92zmgU f4Ar8SjgXpCOS2auwrPF37JuOqwUviANQXpza9j51AXCFcmEVHMbkAZJt7CuJnOEcl05gvzSGbjxe gc1V4m50ouPgMi/PITZKHXKX1PceU8DjH/Yqk/kh02YtIbJArRsWQrywva4DjpEBNmaC3NZYCVs4d 1eZVn7V8HRgyWkCetMocN+tpgSSqc3fYm2BX6OXUdvS9FcqvWiWpEBEkUH0LyXLnFaA6kF6/htUGA x1W/Ci9h9qJrDGz+wHJMrH4cbM46vupVOvMBB3fOX6qoXDhh0qaOqoJ1wiPUGCvVoQEntNFxZv2im TquJ3StyRZMDUbN7p16g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sncjI-00000001hbp-3QEb; Mon, 09 Sep 2024 11:38:48 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sncPW-00000001dOP-2f1D for linux-mediatek@lists.infradead.org; Mon, 09 Sep 2024 11:18:24 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2068a7c9286so37676635ad.1 for ; Mon, 09 Sep 2024 04:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1725880702; x=1726485502; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2E0O8WG9qwHR9JUYmxw/yuHs3HNYdoAdYl7RzElF3KM=; b=gy5Q7L/bBoU+UNxNkFzU4HUMYThFIy3tBeP69+lB1hofFY1MVAe/d3WTNx7vhBWEPG y7D/zuzdA63BDPTIN05ljIZFUaOJsruCzSc6++blMGi88+ENOy/J32mtkqN0vWRwh4GP Y9NiFBZWM4JcaDJUv9GJE1EhiV/+bgo5sjmoc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725880702; x=1726485502; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2E0O8WG9qwHR9JUYmxw/yuHs3HNYdoAdYl7RzElF3KM=; b=QtYhDlmnQxgaNBrZtTyfa9phdkesljdtBMetTdd7jB+4FujZ5bDO0ZSpQYULTHcKiP p2D/89F4+Pp/Tsx3D+KFghA2RvS0PNnYZCBQIqmpRXh3n08glrz4kgSdzsFlRpKzj3dv AMmG+gRj1DsQm3zg6RBOtCi/seQYPYqBMsg73CSY0ZjG/7pgTg2OIBY7/HNfxMjVXLQ3 mH+mPORme3p7SDUgEJwPyBsKlb++3tpHyRViAFD6akLxTs/CLMakulagCnkIoQ4zdWxm rUlpCe5gVA1vwpCICUy5iDqT9PUIT/VimOxbQj9dnCVi6HnlzY4gebiZG6LRvXEmlaGu 6MGA== X-Forwarded-Encrypted: i=1; AJvYcCVcPYZHUrXqsj7mP0wa0miFtcRgL01DhTKip91VErcFFktlC05WWOsKmcNPNS+C9aIRi4Cfm67BvHdNu0aN6A==@lists.infradead.org X-Gm-Message-State: AOJu0YxYj4UPIGiqYOxfiddrnvuDZiOJaxk/fQiji4b8g3qXnUHJaZvP bLqyVzdwLo+QpFRn9dv0fQ9bnYxsxjw/mkdnbWc8noyiU5ZodFT8PLs/z7tf/w== X-Google-Smtp-Source: AGHT+IGmr6w0YJFJy21E98ud0odKV33bYvulxcOeJu7Zcyxoe1V9M007M6uliWys5/1acdhBj/f9wQ== X-Received: by 2002:a17:903:230a:b0:206:c486:4c33 with SMTP id d9443c01a7336-206f0522330mr138456765ad.30.1725880702085; Mon, 09 Sep 2024 04:18:22 -0700 (PDT) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:6647:6d5f:dd48:8f5c]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710f1dc55sm32039745ad.186.2024.09.09.04.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 04:18:21 -0700 (PDT) From: Fei Shao To: AngeloGioacchino Del Regno , Matthias Brugger Subject: [PATCH 13/13] arm64: dts: mediatek: mt8188: Add audio support Date: Mon, 9 Sep 2024 19:14:26 +0800 Message-ID: <20240909111535.528624-14-fshao@chromium.org> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog In-Reply-To: <20240909111535.528624-1-fshao@chromium.org> References: <20240909111535.528624-1-fshao@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_041822_718855_75D87FBA X-CRM114-Status: GOOD ( 10.58 ) 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: , Cc: Rob Herring , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add following nodes to support audio enablement on MT8188 SoC: - sound card - audio controller (AFE) - audio DSP and its associated mailboxes Signed-off-by: Fei Shao --- arch/arm64/boot/dts/mediatek/mt8188.dtsi | 96 ++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi index 08f13ccefcfc..d99447a01a60 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -431,6 +431,11 @@ psci { method = "smc"; }; + sound: sound { + mediatek,platform = <&afe>; + status = "disabled"; + }; + thermal_zones: thermal-zones { cpu-little0-thermal { polling-delay = <1000>; @@ -1356,6 +1361,97 @@ scp: scp@10500000 { interrupts = ; }; + afe: audio-controller@10b10000 { + compatible = "mediatek,mt8188-afe"; + reg = <0 0x10b10000 0 0x10000>; + assigned-clocks = <&topckgen CLK_TOP_A1SYS_HP>; + assigned-clock-parents = <&clk26m>; + clocks = <&clk26m>, + <&apmixedsys CLK_APMIXED_APLL1>, + <&apmixedsys CLK_APMIXED_APLL2>, + <&topckgen CLK_TOP_APLL12_CK_DIV0>, + <&topckgen CLK_TOP_APLL12_CK_DIV1>, + <&topckgen CLK_TOP_APLL12_CK_DIV2>, + <&topckgen CLK_TOP_APLL12_CK_DIV3>, + <&topckgen CLK_TOP_APLL12_CK_DIV9>, + <&topckgen CLK_TOP_A1SYS_HP>, + <&topckgen CLK_TOP_AUD_INTBUS>, + <&topckgen CLK_TOP_AUDIO_H>, + <&topckgen CLK_TOP_AUDIO_LOCAL_BUS>, + <&topckgen CLK_TOP_DPTX>, + <&topckgen CLK_TOP_I2SO1>, + <&topckgen CLK_TOP_I2SO2>, + <&topckgen CLK_TOP_I2SI1>, + <&topckgen CLK_TOP_I2SI2>, + <&adsp_audio26m CLK_AUDIODSP_AUDIO26M>, + <&topckgen CLK_TOP_APLL1_D4>, + <&topckgen CLK_TOP_APLL2_D4>, + <&topckgen CLK_TOP_APLL12_CK_DIV4>, + <&topckgen CLK_TOP_A2SYS>, + <&topckgen CLK_TOP_AUD_IEC>; + clock-names = "clk26m", + "apll1", + "apll2", + "apll12_div0", + "apll12_div1", + "apll12_div2", + "apll12_div3", + "apll12_div9", + "top_a1sys_hp", + "top_aud_intbus", + "top_audio_h", + "top_audio_local_bus", + "top_dptx", + "top_i2so1", + "top_i2so2", + "top_i2si1", + "top_i2si2", + "adsp_audio_26m", + "apll1_d4", + "apll2_d4", + "apll12_div4", + "top_a2sys", + "top_aud_iec"; + interrupts = ; + power-domains = <&spm MT8188_POWER_DOMAIN_AUDIO>; + resets = <&watchdog 14>; + reset-names = "audiosys"; + mediatek,infracfg = <&infracfg_ao>; + mediatek,topckgen = <&topckgen>; + status = "disabled"; + }; + + adsp: adsp@10b80000 { + compatible = "mediatek,mt8188-dsp"; + reg = <0 0x10b80000 0 0x2000>, + <0 0x10d00000 0 0x80000>, + <0 0x10b8b000 0 0x100>, + <0 0x10b8f000 0 0x1000>; + reg-names = "cfg", "sram", "sec", "bus"; + assigned-clocks = <&topckgen CLK_TOP_ADSP>; + clocks = <&topckgen CLK_TOP_ADSP>, + <&topckgen CLK_TOP_AUDIO_LOCAL_BUS>; + clock-names = "audiodsp", "adsp_bus"; + mboxes = <&adsp_mailbox0>, <&adsp_mailbox1>; + mbox-names = "rx", "tx"; + power-domains = <&spm MT8188_POWER_DOMAIN_ADSP>; + status = "disabled"; + }; + + adsp_mailbox0: mailbox@10b86000 { + compatible = "mediatek,mt8188-adsp-mbox", "mediatek,mt8186-adsp-mbox"; + reg = <0 0x10b86100 0 0x1000>; + interrupts = ; + #mbox-cells = <0>; + }; + + adsp_mailbox1: mailbox@10b87000 { + compatible = "mediatek,mt8188-adsp-mbox", "mediatek,mt8186-adsp-mbox"; + reg = <0 0x10b87100 0 0x1000>; + interrupts = ; + #mbox-cells = <0>; + }; + adsp_audio26m: clock-controller@10b91100 { compatible = "mediatek,mt8188-adsp-audio26m"; reg = <0 0x10b91100 0 0x100>;