From patchwork Sat Aug 19 10:50:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13358586 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 705F7EE49A5 for ; Sat, 19 Aug 2023 10:50:42 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mD20hXfyxpEDJop705V8LR/AzzYR5lHKMDmJf3E2c9o=; b=qpzIinYyWOMIZz B03pQr9nN6hbiMBagBiK8X2T3Cz3CPLp/BzmUHKXYsft3ngmKkii9wNJhGNkVcn3VWBFok4Z6rXPR 281vbam4E/GCB+GVpN8mZJLe5GO624Mqzx6PZJ61nAEBBljHRfhQN92xBa3UdqMu+JbFfticyluFG WzCta+KvOVk2J6HtNMAsjsXlYcdhSGVbnO/htNpMsvYwuL+HL9Av44aK6dRNLZ0BrDuQ3Maa55x6V 4Swppdun600X3K9Voy31T0mFd7RDLVGyh4AZZdZdYIFnxi8O5/pfFXgDA2t+pHbt30rMwNUHuOPVI WXEms7g0f7jlhONwT6LA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qXJX8-00Aomn-3C; Sat, 19 Aug 2023 10:50:18 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qXJX6-00Aom4-1Y for linux-arm-kernel@lists.infradead.org; Sat, 19 Aug 2023 10:50:17 +0000 Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-34c5fec2a95so2061185ab.3 for ; Sat, 19 Aug 2023 03:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692442214; x=1693047014; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sbeZQ2le3QtFAiVegoQee4BG0sxJfK1rPbRwkbBgjUU=; b=EQX1sOvvQGxUahz1mDZkIRZIWFPKspEuIrX2EEYZuowtSFEreEGJak6pyk/Rvj5Q3W Wy1VX4ks7xdlRU08zcIP+JsHSdZO+B6uKv+/VaSJtWIOrkUUz2juJjtYZN3pLX21x7ca x+WUxlj4fccRG7GrJY4ebweGkrV4/gFee0wPMNrhjljlJKt/V3EUPFyFKYnbGTupw87C Ktqw/HVEU1s4P4op4U/sIM2phjfMykyhrNUTAVvcSjaXDpNuEWEqH0ZRuWKslc76w3s+ lBb2qm06qUwbF+lgNcUNhlIgxjN4aAYO4gK7Ykmy/f4up2jV8q99CFJL4dRtleg5ozvQ itMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692442214; x=1693047014; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sbeZQ2le3QtFAiVegoQee4BG0sxJfK1rPbRwkbBgjUU=; b=BOonWCTOfPjY6ko84oOCX23VxnoWw2AsJjiLFfdEWTaFHR3ogxEg9aNW+pjB3gyK6e 2mWMGQTccjuenj2QWkPuaZ2+25T5NICd83yGCqsfrGjDJVUrEmOdB77/kbmJQqekbI5N BqjJmPqGjl+O8+HqDnj22FF3oIFX/G8Y0hpqSZolvupYg/TKkWu88nKM6YTpp1lYF7Tl hIp8SGj7pZ/zEWnJPf7o7GoWICi1PFMhZ+RG4FhMMDhXWwfoAAWQE/ina56h1Bd3hSm5 DjAD8JGXXrP7yq1eH7Yof000kLXJj9+oB6wET56RvjfdURgQIQFG199xJsMp7vPyO3zq OC7Q== X-Gm-Message-State: AOJu0YxbLKQwsgYaUhRXmuRUqYvwiCGc3l4VYl9s6/UN6erqZyLMhKs6 Q1ggmLzjCiDaKgf/yiCXqrB5A6tnVcI= X-Google-Smtp-Source: AGHT+IFUw0ajLQarhK4ZPWbmihPnfaEUnAWHuo0k02mh1YcKSE2jirroj7XTRp5Vb64fRDfC+ojpbg== X-Received: by 2002:a92:cd09:0:b0:34b:ba9c:78ac with SMTP id z9-20020a92cd09000000b0034bba9c78acmr2319943iln.25.1692442213672; Sat, 19 Aug 2023 03:50:13 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:4a28:99c7:cf07:4f94]) by smtp.gmail.com with ESMTPSA id h16-20020a92d090000000b0034ac4ccd097sm1116470ilh.33.2023.08.19.03.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 03:50:13 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Lucas Stach , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 1/2] arm64: dts: imx8mp: Fix SDMA2/3 clocks Date: Sat, 19 Aug 2023 05:50:01 -0500 Message-Id: <20230819105002.132750-1-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230819_035016_521561_4107724D X-CRM114-Status: GOOD ( 11.25 ) 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 Commit 16c984524862 ("arm64: dts: imx8mp: don't initialize audio clocks from CCM node") removed the Audio clocks from the main clock node, because the intent is to force people to setup the audio PLL clocks per board instead of having a common set of rates, since not all boards may use the various audio PLL clocks in the same way. Unfortunately, with this parenting removed, the SDMA2 and SDMA3 clocks were slowed to 24MHz because the SDMA2/3 clocks are controlled via the audio_blk_ctrl which is clocked from IMX8MP_CLK_AUDIO_ROOT, and that clock is enabled by pgc_audio. Per the TRM, "The SDMA2/3 target frequency is 400MHz IPG and 400MHz AHB, always 1:1 mode, to make sure there is enough throughput for all the audio use cases." Instead of cluttering the clock node, place the clock rate and parent information into the pgc_audio node. With the parenting and clock rates restored for IMX8MP_CLK_AUDIO_AHB, and IMX8MP_CLK_AUDIO_AXI_SRC, it appears the SDMA2 and SDMA3 run at 400MHz again. Fixes: 16c984524862 ("arm64: dts: imx8mp: don't initialize audio clocks from CCM node") Signed-off-by: Adam Ford Reviewed-by: Lucas Stach Reviewed-by: Fabio Estevam --- V3: Update commit message wording. No functional change V2: Slow AUDIO_AXI to 600MHz for nominal drive. Individual boards can increase this to 800MHz if they have the proper voltage configured. diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 6f2f50e1639c..83d907294fbc 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -790,6 +790,12 @@ pgc_audio: power-domain@5 { reg = ; clocks = <&clk IMX8MP_CLK_AUDIO_ROOT>, <&clk IMX8MP_CLK_AUDIO_AXI>; + assigned-clocks = <&clk IMX8MP_CLK_AUDIO_AHB>, + <&clk IMX8MP_CLK_AUDIO_AXI_SRC>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>, + <&clk IMX8MP_SYS_PLL1_800M>; + assigned-clock-rates = <400000000>, + <600000000>; }; pgc_gpu2d: power-domain@6 { From patchwork Sat Aug 19 10:50:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13358587 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 59022EE49A5 for ; Sat, 19 Aug 2023 10:50:45 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fqw7YKgxfoj13O2CbqnHKK5Qs0Y/mY/uK5ykGP2i90M=; b=NOGprJSaXvH4oi vuw/ZvLIpEXbpZobMAUggMP67loxFUxd+ql9ASsmaZRsE8kBFQg5cNeBJOxaGV1sUg2Iv+yx8+ozI 3iZ960lhA+Bj/JHNDEeWtFA/mecBaPYKKtENYIE1zqY44p/NFcMeLII+aM5sYVTb0QsYWfe6Cqpj2 TweWiKeAIDrxCwLBEZQHDBYzLw2rjgGyx3fg1qFfbLDqaD1+RA++WU7GilltTEDyV57XaFok5r68v 5FpNG/AYvjr2ngXwfQIKb5//gWM/9sALq5ciYLC7cY0bjNwwYoz28ykpCdpbB5Ft9G2tF1ismsxVN Yp+y5FdA8bLC3iXhscXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qXJX9-00Aoms-1a; Sat, 19 Aug 2023 10:50:19 +0000 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qXJX6-00Aom6-28 for linux-arm-kernel@lists.infradead.org; Sat, 19 Aug 2023 10:50:17 +0000 Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-34c5fec2a95so2061275ab.3 for ; Sat, 19 Aug 2023 03:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692442215; x=1693047015; 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=sOHGrFpVbV94GxW582V7S/Br8+c79FnQLF+z0S/cUIg=; b=YackG/t5OxFEpw9bAOamPufsVnsxP/OwqNEwAPvBqI3Pso/gq7E+VnCHZ1D789B2km U598r70iSEb3fPqVFCG504V1gpJnaiBO8rL3Mbe6pXfXyHGAW0Zrg5v+o/EhQXBFsoPK gywGyTBZBxqZhQE/cDt/bTmt2KVNRpDtavjrLoBSluAJpTkN3yl+YtWps1HWR3mv/N3S YLvPX3h32Rnkw/Nw2jrqS3OVYrUI+fFhuIDzLiFYKQylSJKKTdrNX3HLCyeR/TfBtJdQ LI89t/RAvr22J9QtL32vAmVPZjWS9LwWiT70oqdotqROlr81Q7koS4eoRbcuAtMzT81U 9j9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692442215; x=1693047015; 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=sOHGrFpVbV94GxW582V7S/Br8+c79FnQLF+z0S/cUIg=; b=DCHGtA3qex5FHZunaN0J9eK5J/Odx6xeOVqOjlgVjNPezgv9ppiUb8KWxWGw5AfL36 GWkac9bi+N+voqgvNKK58kVmHV6Fv+qXFQmrNX8EwqqtlLWZOY/fxKtd+DqSAhkoGzBj 8aesJOLDtt8O/9v2fRkPjmE06jJ79AEyV0UpV9Ft7pyOMHKTJmCyUDA0/BDKAm/kkA8i K6wnyGGQcTJ5Sbc1vxenyR7tjx8GhPhNQmJmpyPrGSwrXvdnTr/+R3Um+iWHm/+HM+qk IL5OqONfNeVx3ZtP0mOEE8CuiwduipJEIsmsgCJRNGWbSGw4uCI98FJUgaMnTWbjxzbC XeuA== X-Gm-Message-State: AOJu0Yx/QGdgxlnp62udAgqUSOq9WGgqJjKCvzD0W49VgQWq2dgY3WPI sRveP24+b4/PuSJ1aA28S8imYuvG6iY= X-Google-Smtp-Source: AGHT+IGltsqOxipCI150IIex3vtDvzFIfLDHldGuBnX0OVoo2BOEdiVNS0N+e7jqCQFJL5ID4GY4cg== X-Received: by 2002:a05:6e02:106f:b0:34b:ad7a:384f with SMTP id q15-20020a056e02106f00b0034bad7a384fmr2155350ilj.20.1692442215113; Sat, 19 Aug 2023 03:50:15 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:4a28:99c7:cf07:4f94]) by smtp.gmail.com with ESMTPSA id h16-20020a92d090000000b0034ac4ccd097sm1116470ilh.33.2023.08.19.03.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 03:50:14 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Lucas Stach , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 2/2] arm64: dts: imx8mp-beacon-kit: Fix audio_pll2 clock Date: Sat, 19 Aug 2023 05:50:02 -0500 Message-Id: <20230819105002.132750-2-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230819105002.132750-1-aford173@gmail.com> References: <20230819105002.132750-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230819_035016_698480_F3299E9B X-CRM114-Status: GOOD ( 10.59 ) 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 Commit 16c984524862 ("arm64: dts: imx8mp: don't initialize audio clocks from CCM node") removed the Audio clocks from the main clock node, because the intent is to force people to setup the audio PLL clocks per board instead of having a common set of rates since not all boards may use the various audio PLL clocks for audio devices. This resulted in an incorrect clock rate when attempting to playback audio, since the AUDIO_PLL2 wasn't set any longer. Fix this by setting the AUDIO_PLL2 rate inside the SAI3 node since it's the SAI3 that needs it. Fixes: 16c984524862 ("arm64: dts: imx8mp: don't initialize audio clocks from CCM node") Signed-off-by: Adam Ford Reviewed-by: Lucas Stach Reviewed-by: Fabio Estevam --- V3: Update commit message wording. No functional change V2: No change diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts index 06e91297fb16..acd265d8b58e 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts @@ -381,9 +381,10 @@ &pcie_phy { &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; - assigned-clocks = <&clk IMX8MP_CLK_SAI3>; + assigned-clocks = <&clk IMX8MP_CLK_SAI3>, + <&clk IMX8MP_AUDIO_PLL2> ; assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>; - assigned-clock-rates = <12288000>; + assigned-clock-rates = <12288000>, <361267200>; fsl,sai-mclk-direction-output; status = "okay"; };