Message ID | 20230813162906.22640-1-aford173@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp2323847vqi; Sun, 13 Aug 2023 11:30:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEW0ovUkq0EMC+4G1C98nw0gRbKQ/nHRJfayIWpT6WSwHFtdXnsQ03FKgcwYAz1rrkwdQD X-Received: by 2002:a05:6402:5177:b0:523:1f4d:4029 with SMTP id d23-20020a056402517700b005231f4d4029mr5930860ede.21.1691951454610; Sun, 13 Aug 2023 11:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691951454; cv=none; d=google.com; s=arc-20160816; b=sJBIFPUOVdH8TtM8pONr1f5AK8Z16Hu4B3kUcdIc3UYvAi1siCckRekOj5H5kTPQ9G gSpryeNP+gmNbAqSg+7te9ExFK8Hq2/nu/C0kru/0+gYa7f3r7q/txEhYOaMywlw1LM5 2ccjyR2zPeUOh+KcSzHMdWDOnnWgiKGLW5BlJSdZ3Vz/lmrd0f6Z6HgCHLq3gz5keajO resiUfglaqcrjE/Sd7A6r8E60d9EbZJt/EUqVLoKCQhn9d6fmMBvQD/fuztd3z3lVQ8x XsrgOO1DM31UxXjv2APjUpvkAz7FYJW4sDZllVYwn8LB+VOcl70EuaKADt3tvPr+1Lpg kTow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3cwCNs6X4jJcwApJaNSkv7YlnkadabMnWiNmxCJPzIk=; fh=vnvlNkB3rmsHBF4zMwH+z9+4m0a2gqjhBN1phG+iw/s=; b=Usy2aPIfi/lLcs6oFZQ8CAtRcnIjTRLzDWxuCYb4qSdo/2d17lzK7QRQiX6x2EEpwu rgi/pGZZdH+0IzPasyfJp8/hvV59p6MZE6GZbvnVhJYzWWuxcKxuhzgE9Os2EDZJ/4eP hKucno+MUMrLWUyp1bIBBLti+dsmkbSNjQliI7mvE0qUoOn6O1BhVrWS1/7czTOeht/t hR3MS1v4hvDCkRcRqqH6GAU0Bn0rn5LZI6ZRmV612tarCpnpbZ0d6H7sMciI1Wb2RoKt kl+KhG7WRsPHiEEabWuUnKv9jCyeo8A2fBVhNaSWC5foE11aWubRnRpI6gfAp3cB3nD4 s9Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=s1Llsb0z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1-20020a056402514100b00525659aed8dsi565941edd.385.2023.08.13.11.30.30; Sun, 13 Aug 2023 11:30:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=s1Llsb0z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232252AbjHMQ3g (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Sun, 13 Aug 2023 12:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232466AbjHMQ30 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 13 Aug 2023 12:29:26 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05FF81BE4; Sun, 13 Aug 2023 09:29:14 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-790cadee81bso107370439f.0; Sun, 13 Aug 2023 09:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691944153; x=1692548953; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3cwCNs6X4jJcwApJaNSkv7YlnkadabMnWiNmxCJPzIk=; b=s1Llsb0zuv3RvKl172ebqYoUJ7ExuiMBapH7bui0VG/0n9OCww2xTDWS/Jd2fKw8Qu 8H7kzhPbnDF6Y/YH6tOGY1FhNyVdLyxH2rEDRj2NEi6EPZHDh2X0bcOe3Du6IefxLOmI bzGhiMmRp24jrrZxznM13ROlkST4397AfjXLQZiLUyw16IOkvu2y2XqcPl0GGoQnXdGr JDbMi5QkIY4OjVJ0GhHrL3LCqhfPznzzS/5qMQNgAHJtxBjumneqhYMNpv5BJBqMRkBu +kr0l5yzvcFtPnYlJ2Y8mpD+ORMmwZwX/wYpmfGGphICNkd/Lk9XpwhWTcit3ves1jV8 j+5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691944153; x=1692548953; 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=3cwCNs6X4jJcwApJaNSkv7YlnkadabMnWiNmxCJPzIk=; b=ijyd+Ueov55v9ik2fFvHbaoOsI5qzP8K1xQGJvaALz2G3zmC28TM3nwva7882uidX6 cZH8zA7TJp7Ll9opyqRPEY+5RZRCtJgmFOFeP93NPszS08SLAvqGfMhgVzHIv0k/0evf dTfJBPKnrRKF/3x3cN1LJNl4GIWXEZcNorHA5suScchFq6vYH5S5BF53Y1/jspRy0oFb vkHYj2vTvzC4vQrirEM4dlpHOLo1/X3yrpluYCaXuRw8CrXxtnucKcmVEjyv7R75ybiQ +vzAFq1gm7gKBjFVq51blJDpU5oWsOrYwSkimG9zj+WjimnygENxb5rwTLk+dJaK+OAU LTRQ== X-Gm-Message-State: AOJu0YzwDm2QJzSi9+9p2f5OGbgSnMawMPDP+Lcs+2gLCStaMX+iiV1Q HZ1y9cnii6omNa/WlM11xBYw2NooCDA= X-Received: by 2002:a6b:5c08:0:b0:790:c9a9:d760 with SMTP id z8-20020a6b5c08000000b00790c9a9d760mr9174772ioh.16.1691944152951; Sun, 13 Aug 2023 09:29:12 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:21ab:bc25:b29c:7b7e]) by smtp.gmail.com with ESMTPSA id fu11-20020a056638668b00b0042b6a760c31sm2454767jab.28.2023.08.13.09.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Aug 2023 09:29:12 -0700 (PDT) From: Adam Ford <aford173@gmail.com> To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford <aford173@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Lucas Stach <l.stach@pengutronix.de>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: imx8mp: Fix SDMA2/3 clocks Date: Sun, 13 Aug 2023 11:29:05 -0500 Message-Id: <20230813162906.22640-1-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774139688459177011 X-GMAIL-MSGID: 1774139688459177011 |
Series |
[1/2] arm64: dts: imx8mp: Fix SDMA2/3 clocks
|
|
Commit Message
Adam Ford
Aug. 13, 2023, 4:29 p.m. UTC
A previous patch to remove the Audio clocks from the main clock node
was intended 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.
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 <aford173@gmail.com>
Comments
Am Sonntag, dem 13.08.2023 um 11:29 -0500 schrieb Adam Ford: > A previous patch to remove the Audio clocks from the main clock node > was intended 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. > > 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. > Note that 800MHz for the AXI clock is overdrive mode for the chip. For other i.MX8M* chips we tried to have the nominal drive rates as assigned rates in DT. With the i.MX8MP it's currently a wild mix and most of the AXI clocks are set to OD rates, so I won't reject this patch based on this. Most boards run the DRAM at DDR4-4000, which already requires OD voltages, so there isn't much point in trying to stick to ND rates on those boards. We should probably do some consolidation here and come up with a proper policy for the i.MX8MP soon. > Fixes: 16c984524862 ("arm64: dts: imx8mp: don't initialize audio clocks from CCM node") > Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > index 6f2f50e1639c..408b0c4ec4f8 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 = <IMX8MP_POWER_DOMAIN_AUDIOMIX>; > 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>, > + <800000000>; > }; > > pgc_gpu2d: power-domain@6 {
On Mon, Aug 14, 2023 at 3:22 AM Lucas Stach <l.stach@pengutronix.de> wrote: > > Am Sonntag, dem 13.08.2023 um 11:29 -0500 schrieb Adam Ford: > > A previous patch to remove the Audio clocks from the main clock node > > was intended 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. > > > > 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. > > > Note that 800MHz for the AXI clock is overdrive mode for the chip. For > other i.MX8M* chips we tried to have the nominal drive rates as > assigned rates in DT. With the i.MX8MP it's currently a wild mix and > most of the AXI clocks are set to OD rates, so I won't reject this > patch based on this. > > Most boards run the DRAM at DDR4-4000, which already requires OD > voltages, so there isn't much point in trying to stick to ND rates on > those boards. We should probably do some consolidation here and come up > with a proper policy for the i.MX8MP soon. I didn't realize 800MHz was OD. I just set it to the rate that it was before the previous patch. I think the defaults should be ND, and let boards who need OD set them. Unless someone objects, I'll submit a V2. adam > > > Fixes: 16c984524862 ("arm64: dts: imx8mp: don't initialize audio clocks from CCM node") > > Signed-off-by: Adam Ford <aford173@gmail.com> > > Reviewed-by: Lucas Stach <l.stach@pengutronix.de> > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > index 6f2f50e1639c..408b0c4ec4f8 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 = <IMX8MP_POWER_DOMAIN_AUDIOMIX>; > > 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>, > > + <800000000>; > > }; > > > > pgc_gpu2d: power-domain@6 { >
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 6f2f50e1639c..408b0c4ec4f8 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 = <IMX8MP_POWER_DOMAIN_AUDIOMIX>; 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>, + <800000000>; }; pgc_gpu2d: power-domain@6 {