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 {