From patchwork Wed Sep 11 14:34:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fei Shao X-Patchwork-Id: 13800744 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 9A270EE49BC for ; Wed, 11 Sep 2024 14:55: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: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=RMA2TvApaDTXXGS5nmqA51iitinMolQ+6wWJX3y5BMY=; b=VmZMpADzzFYLL4 cFpP1dfRLU/FJQg2hRj/YK11Px2QWJM39P6si7NHPIDeEKDQu5S5sZ6h2gEX89RN5/bdmXYg+Qw+c hEuAqdhJy0EQSLDOG3ATwN+n+pOpjHlhU1kCxieb6JxJI5CmZZ7El3IdJ5r6/Yj/zGod1D9expHHe /RuGspuHaQIcek5ZmqEwMYvDtDgHaaS7YrRymtzL9jJQCEWUTfwmD3Ect49cKUuafh/fIXocX9KTz ZAQbGtwBlFh62JRbM4EhNUpBNALu29/Tv8HQFhqphBI4QNcMP6FikQsP4T83PvzlM3vb9awXWp2io I/y+S4v/akvRx+HeZn4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOkJ-0000000A1sw-0u5v; Wed, 11 Sep 2024 14:55:03 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soORN-00000009wDs-14hH for linux-mediatek@lists.infradead.org; Wed, 11 Sep 2024 14:35:31 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-277c28fac92so6016778fac.3 for ; Wed, 11 Sep 2024 07:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1726065328; x=1726670128; 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=RMA2TvApaDTXXGS5nmqA51iitinMolQ+6wWJX3y5BMY=; b=AKVTdNJgw9B46Fo+54n2jqtyWA8q3cXS8khes+c4B4edv3hcqkgunD9WxW3CM4DVCt 2eKQifDAVkLPPQ1sGkLHNEBisrqS4eYTB434kcJ9iXHLw0H38qzttsU71S8A5kSkH8sp a6h1ysYIEl10PrhIsJjzK335Q9hqvKGHzA0s0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726065328; x=1726670128; 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=RMA2TvApaDTXXGS5nmqA51iitinMolQ+6wWJX3y5BMY=; b=tslhB5W3vJBo6BT3/F2x0wPwDNusWegR2k8/vfD2oAJY+/N/b2/gE2RMhHl2GSMQLI qnSSfKdhUC3YBRhQBxZ0mg4KhYKihq9eZiy+UXft+2B8zVcuA0uyoI8lPgWRnw+PJWKE R//8YT8ABcTG4DLDhTZHMf6xt+LpsMBd3PzycDCQbBqtvrkolYdatIw8ejQyA1j8fPVf koCYDE3wt44hFZ3XxOc4HPu1bR/D/ZyFS6zKaHZSvNdiAKn5+FZFX9h9ARw3q6geT1Jp mHU7TRHpwo3Q6/hfcxm87wajZABNYxbtz+Qq0WJpi0Y2qiokmvcGov/pOLQCc3eYnhLr tcCA== X-Forwarded-Encrypted: i=1; AJvYcCVGYf4+hvitlVf/dQgkxs8l1BKhSnq/mwUKHNwRR2ijWb2gtVojm76tjTC0N5gRYRTtU5clAXsgwN7lnh7qkw==@lists.infradead.org X-Gm-Message-State: AOJu0Yy5Kx/xq374a1ztfv4zyxkL+71JeDnGB6sZ09BGlEIwC5oCzWhK 1ADCZQJxVVNVM4dE1oeMtjDnnyDzPSefCl0u2Tdr/0554Alqq76nS0d1YxiwYQ== X-Google-Smtp-Source: AGHT+IGh2PWgPSU6BdEEz5hfgfCNNula9mOJg1NHDihIHWnwxKEijWaa+jCqU93yQyerjX21e/lgUg== X-Received: by 2002:a05:6870:4723:b0:277:c28c:147e with SMTP id 586e51a60fabf-27b82ed0f49mr16843837fac.21.1726065328099; Wed, 11 Sep 2024 07:35:28 -0700 (PDT) Received: from fshao-p620.tpe.corp.google.com ([2401:fa00:1:10:102f:d738:6069:fd4b]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7db1fbb5901sm46620a12.24.2024.09.11.07.35.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:35:27 -0700 (PDT) From: Fei Shao To: AngeloGioacchino Del Regno , Matthias Brugger Subject: [PATCH v3 7/8] arm64: dts: mediatek: mt8188: Add audio support Date: Wed, 11 Sep 2024 22:34:00 +0800 Message-ID: <20240911143429.850071-8-fshao@chromium.org> X-Mailer: git-send-email 2.46.0.598.g6f2099f65c-goog In-Reply-To: <20240911143429.850071-1-fshao@chromium.org> References: <20240911143429.850071-1-fshao@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_073529_503776_7020FEA8 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: , 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 --- (no changes since v2) Changes in v2: - Replace hardcoded AFE reset ID with correct definition 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 a826ca4d10e3..6327e1006de8 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi @@ -429,6 +429,11 @@ psci { method = "smc"; }; + sound: sound { + mediatek,platform = <&afe>; + status = "disabled"; + }; + thermal_zones: thermal-zones { cpu-little0-thermal { polling-delay = <1000>; @@ -1349,6 +1354,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 MT8188_TOPRGU_AUDIO_SW_RST>; + 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>;