Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp551729rdb; Tue, 19 Sep 2023 03:37:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtqd/vyEctXa0MbjuzSlhhEHm6N8Lq3C30Dytq55wsAfiJdeoa4SDRDnx8TAYIvqwHlrYj X-Received: by 2002:a05:6a21:4881:b0:12f:c0c1:d70 with SMTP id av1-20020a056a21488100b0012fc0c10d70mr8582839pzc.40.1695119828505; Tue, 19 Sep 2023 03:37:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695119828; cv=none; d=google.com; s=arc-20160816; b=wLISOMbi/o8hktBfgDYI0C2jCq4TPejwSpVZ0GVSeMl/MU/6BNoOYSXtB9TD5CFP+z q0RjpBM3fMufx+eD92dLKlXbKZgDYBinTiiZ6jSpx25dCETl0qTZJyeOmKbekUAVv+ee Vdi2ZGCuDyDeyp4VUQOHLWWo4xseVK7g1SxmtLLSWBdzQFtbikhKfMPJzAbZh9hRpknK ICs3iNmNPnZBtZ2/DM35UpIfHAXwkbiDotfKnqZwaTgGNF/G370UVvaCRSWg2JAlPcjz +U606NhgcSNtrKnQc0QKX38Pb7uOussLVBubVlRuyrVlRfOCoj7wF5mI87rULRBQuFlP 0slg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=uLLC9vhNpwqZfzEvTfc/D/8qgBxymsbmKQe6lIC4+Q0=; fh=xfS+8O8pK0RYvmm02eRK5vlKeVakQCbqT1c0/QeFSo4=; b=FRG79oHrjxSFvLLYvIiY2W5dcG+kYPKJVyfYjgh9i5UE0h+/rAc/t0saoC7igPXods Gu/BDGo1X4OV3n0EGS046yZxBu0Zhzo8MY8dI4mhuTatFHfKIMehsYkARZ9Ufz3a9pL1 BSLSZtZx6/OLZPBmbhuWxsyNZObPknaJPW8a8ZqKDB3DqZ01x0bBBSbAWnxDcKdU8es3 w7mij844dZwq9Zi3lJyPNjSZfC5LZ9TcD8Ixkou0QcAC1ceBZx0hmgvg9EqtpD6Ic/BX hHkvzUgmvv0bOGkizTjMmUGl1IXBn4b4vZ3ZQaiVWQWJzgfGWuXqCzNSL4cJ49NJXKBo 436A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id cp16-20020a056a00349000b0068ffd96e1d4si9525006pfb.165.2023.09.19.03.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 03:37:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id DA60E8098BA6; Tue, 19 Sep 2023 03:23:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231537AbjISKXO convert rfc822-to-8bit (ORCPT + 99 others); Tue, 19 Sep 2023 06:23:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjISKXM (ORCPT ); Tue, 19 Sep 2023 06:23:12 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84595EA for ; Tue, 19 Sep 2023 03:23:06 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qiXsf-0008HL-2b; Tue, 19 Sep 2023 12:22:57 +0200 Message-ID: <1ea4b72b75f87db5e5ceb0cc88355b44ca2e5884.camel@pengutronix.de> Subject: Re: [PATCH] arm64: dts: imx8mp: assign parent clock and rate for audio clocks From: Lucas Stach To: Shengjiu Wang Cc: marex@denx.de, devicetree@vger.kernel.org, conor+dt@kernel.org, kernel@pengutronix.de, alexander.stein@ew.tq-group.com, festevam@gmail.com, Shengjiu Wang , Frank.Li@nxp.com, peng.fan@nxp.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, krzysztof.kozlowski+dt@linaro.org, aford173@gmail.com, shawnguo@kernel.org, s.hauer@pengutronix.de, linux-arm-kernel@lists.infradead.org, laurent.pinchart@ideasonboard.com Date: Tue, 19 Sep 2023 12:22:55 +0200 In-Reply-To: References: <1695108775-22924-1-git-send-email-shengjiu.wang@nxp.com> <8ce3f7e172a747100366ebd14d3bd74fe549ae10.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 19 Sep 2023 03:23:16 -0700 (PDT) Am Dienstag, dem 19.09.2023 um 17:59 +0800 schrieb Shengjiu Wang: > On Tue, Sep 19, 2023 at 4:20 PM Lucas Stach wrote: > > > > Hi Shengjiu, > > > > Am Dienstag, dem 19.09.2023 um 15:32 +0800 schrieb Shengjiu Wang: > > > Assign parent clock for audio AHB and AXI clocks, and assign > > > clock rate for audio PLL1 and PLL2. > > > > > Please don't do this. Configuring all those clocks in the clock > > controller is a pain to override if the board uses the PLLs in any > > other way than the reference design. > > > > The audio AXI and AHB clocks are already properly configured with Adams > > patch [1], so there is no need for the changes in this patch. > > > > Please set up the audio PLLs in the board DT in peripheral nodes that > > are actually using those clocks. > > > > Regards, > > Lucas > > > > [1] https://lore.kernel.org/all/20230819105002.132750-1-aford173@gmail.com/ > > For this patch, it changes the AXI clock to 600M. But the parent clock > is 800M, so the result AXI clock is 400M actually, the 800M can't be divided > to 600MHz. > That's right. Please review that patch and suggest changes if you see a better option. Adding another conflicting clock setup in the clk controller node isn't the solution to this. One possible solution would be to promote the VPU PLL to be the system PLL running at 600MHz, as there are quite a few peripherals which seem to need a 600MHz clock for nominal drive mode and we don't need any other specific VPU clocks, which couldn't be sourced from the system PLLs + VPU PLL running at 600MHz. Regards, Lucas > Best regards > Wang shengjiu > > > > > > > > Signed-off-by: Shengjiu Wang > > > --- > > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 16 +++++++++++++--- > > > 1 file changed, 13 insertions(+), 3 deletions(-) > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > index 6f2f50e1639c..8a8a2c4aff9f 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > @@ -734,16 +734,26 @@ clk: clock-controller@30380000 { > > > <&clk IMX8MP_CLK_A53_CORE>, > > > <&clk IMX8MP_CLK_NOC>, > > > <&clk IMX8MP_CLK_NOC_IO>, > > > - <&clk IMX8MP_CLK_GIC>; > > > + <&clk IMX8MP_CLK_GIC>, > > > + <&clk IMX8MP_CLK_AUDIO_AHB>, > > > + <&clk IMX8MP_CLK_AUDIO_AXI_SRC>, > > > + <&clk IMX8MP_AUDIO_PLL1>, > > > + <&clk IMX8MP_AUDIO_PLL2>; > > > assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>, > > > <&clk IMX8MP_ARM_PLL_OUT>, > > > <&clk IMX8MP_SYS_PLL2_1000M>, > > > <&clk IMX8MP_SYS_PLL1_800M>, > > > - <&clk IMX8MP_SYS_PLL2_500M>; > > > + <&clk IMX8MP_SYS_PLL2_500M>, > > > + <&clk IMX8MP_SYS_PLL1_800M>, > > > + <&clk IMX8MP_SYS_PLL1_800M>; > > > assigned-clock-rates = <0>, <0>, > > > <1000000000>, > > > <800000000>, > > > - <500000000>; > > > + <500000000>, > > > + <400000000>, > > > + <800000000>, > > > + <393216000>, > > > + <361267200>; > > > }; > > > > > > src: reset-controller@30390000 { > > >