Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp543745pxb; Mon, 25 Apr 2022 16:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcbsRdp8ji33S+cbLoAlkYcBQV1U1Hzr8GctINEsByh38av1qkQ4fyqlxZd2DRwcWlvup+ X-Received: by 2002:a63:4b5d:0:b0:3aa:2a17:f7ff with SMTP id k29-20020a634b5d000000b003aa2a17f7ffmr17218631pgl.538.1650927964325; Mon, 25 Apr 2022 16:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650927964; cv=none; d=google.com; s=arc-20160816; b=Fo/o51ZCuza33lzqUfeMUlGXznbM7gINz+FEhJK0shAv4aW3wbKEKlZ9C3jjDRMD1M bXsiqYvhS35HOCfjgPAX71eehadp6CaJOQaXK5vDjKMr+OASyqbt8srZv+p2MnDhiSSQ OsXloCkYC1bCmuBeSbmNEE2SwJ5lBA//whRSMxHQUX230VaLcIR8hJNbvpP8qWnwWmcq EbpT9UmJyAPOAE0kMNW+ZJ5n+QQJ1OhHKvWoLyIVt9jMhk+trHQR0zcS5G29u23Oi8qz 4pwQ/1egGq/tSFBrqCugX/PiDi5vJtwSQrxyb9h5ye+vfAOWB6sSr7sLAMUZn5gKMjdX uOew== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :dkim-signature:message-id; bh=X8Ta4GzipQumeu0r/rHmc9vftZedUXuUiTTRXcfxSK0=; b=qhnIVTVTdT9lzO632/sKXOhU+beVic1yQbc0OPqciLsHQ+Xfi05tgwJvtVmjbGeybj E3fxIHSxivR2WQw77Z0K56pVccoU0GSEezM9dfuAaPkhJvzo67LAa49hNmKeS0SqA7++ X1IBtAByoL0MSPBZPvkXeB6EvmzZdOVZSDsJGL5L3X0OegysEpAu49zr5k0JFg/w1lo7 zsO+ZfDwqpjnlWOSbrrBN6JNy+4ISWKpOOyPN6kuBZbDvgLedj6n8eh/vDgrDatBdFPd Gqy+MSRX6CiBE4WAHQTs0TnspV0DQDEVfhTGUSzLpVQcICTK+Reo/NOEdX5r6NWdQBZa aahQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@puri.sm header.s=comms header.b=TwWQx10+; 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=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a1709029b8f00b001562e0ba125si16761954plp.504.2022.04.25.16.05.44; Mon, 25 Apr 2022 16:06:04 -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=fail header.i=@puri.sm header.s=comms header.b=TwWQx10+; 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=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241739AbiDYP0N (ORCPT + 99 others); Mon, 25 Apr 2022 11:26:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233952AbiDYP0J (ORCPT ); Mon, 25 Apr 2022 11:26:09 -0400 Received: from comms.puri.sm (comms.puri.sm [159.203.221.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5B3E1245; Mon, 25 Apr 2022 08:23:04 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 88251DF69E; Mon, 25 Apr 2022 08:22:34 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ykxmL21nwvSi; Mon, 25 Apr 2022 08:22:33 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1650900153; bh=PoAhs4rC8s2VNE3r6xYLUglE7+vVgjEdcfrBZL7HIYw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=TwWQx10+OrU5+LF4ic3BCkWUrj/bBD5KMY098Yi8iUApqrklehSe05vVv8EPRVqUb RWUi3fVqmTLK9uO7dolTzkIjwbG6BY4TCw7U0y/nzutY6qdNqZ+LK+qS5xZnCEkJEL AefHq+1F6sbK5QHuHFKO3j4SgtDT2hD6HNDFjIwUmdL29WqGUcKVF3OQtCIYWBxmKT +q4h9vT0Eay/TRIzdS6xvcFgzoN3UNppXHLBC/YZnD7gH0dxOsXVS6bPM/L1UMG6Jx yZonZuU3caMCSVPm+4QLnTH7SpYampk4ZgzpjFalBtPyZiB5K9+LtRJfKH/wtdDw9o QJHtNAjnwXevA== Subject: Re: [PATCH V4 07/11] arm64: dts: imx8mq: Enable both G1 and G2 VPU's with vpu-blk-ctrl From: Martin Kepplinger To: Adam Ford , linux-media@vger.kernel.org Cc: aford@beaconembedded.com, cphealy@gmail.com, kernel test robot , Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Greg Kroah-Hartman , Lucas Stach , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Date: Mon, 25 Apr 2022 17:22:24 +0200 In-Reply-To: <20220125171129.472775-8-aford173@gmail.com> References: <20220125171129.472775-1-aford173@gmail.com> <20220125171129.472775-8-aford173@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_NONE,SPF_PASS autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, dem 25.01.2022 um 11:11 -0600 schrieb Adam Ford: > With the Hantro G1 and G2 now setup to run independently, update > the device tree to allow both to operate.  This requires the > vpu-blk-ctrl node to be configured.  Since vpu-blk-ctrl needs > certain clock enabled to handle the gating of the G1 and G2 > fuses, the clock-parents and clock-rates for the various VPU's > to be moved into the pgc_vpu because they cannot get re-parented > once enabled, and the pgc_vpu is the highest in the chain. > > Signed-off-by: Adam Ford > Reported-by: kernel test robot > Reviewed-by: Ezequiel Garcia > > diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi > b/arch/arm64/boot/dts/freescale/imx8mq.dtsi > index 2df2510d0118..549b2440f55d 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi > @@ -737,7 +737,21 @@ pgc_gpu: power-domain@5 { >                                         pgc_vpu: power-domain@6 { >                                                 #power-domain-cells = > <0>; >                                                 reg = > ; > -                                               clocks = <&clk > IMX8MQ_CLK_VPU_DEC_ROOT>; > +                                               clocks = <&clk > IMX8MQ_CLK_VPU_DEC_ROOT>, > +                                                        <&clk > IMX8MQ_CLK_VPU_G1_ROOT>, > +                                                        <&clk > IMX8MQ_CLK_VPU_G2_ROOT>; > +                                               assigned-clocks = > <&clk IMX8MQ_CLK_VPU_G1>, > +                                                                 > <&clk IMX8MQ_CLK_VPU_G2>, > +                                                                 > <&clk IMX8MQ_CLK_VPU_BUS>, > +                                                                 > <&clk IMX8MQ_VPU_PLL_BYPASS>; > +                                               assigned-clock- > parents = <&clk IMX8MQ_VPU_PLL_OUT>, > +                                                                     >     <&clk IMX8MQ_VPU_PLL_OUT>, > +                                                                     >     <&clk IMX8MQ_SYS1_PLL_800M>, > +                                                                     >     <&clk IMX8MQ_VPU_PLL>; > +                                               assigned-clock-rates > = <600000000>, > +                                                                     >   <600000000>, > +                                                                     >   <800000000>, > +                                                                     >   <0>; >                                         }; >   >                                         pgc_disp: power-domain@7 { > @@ -1457,30 +1471,31 @@ usb3_phy1: usb-phy@382f0040 { >                         status = "disabled"; >                 }; >   > -               vpu: video-codec@38300000 { > -                       compatible = "nxp,imx8mq-vpu"; > -                       reg = <0x38300000 0x10000>, > -                             <0x38310000 0x10000>, > -                             <0x38320000 0x10000>; > -                       reg-names = "g1", "g2", "ctrl"; > -                       interrupts = , > -                                    ; > -                       interrupt-names = "g1", "g2"; > +               vpu_g1: video-codec@38300000 { > +                       compatible = "nxp,imx8mq-vpu-g1"; > +                       reg = <0x38300000 0x10000>; > +                       interrupts = ; > +                       clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>; > +                       power-domains = <&vpu_blk_ctrl > IMX8MQ_VPUBLK_PD_G1>; > +               }; > + > +               vpu_g2: video-codec@38310000 { > +                       compatible = "nxp,imx8mq-vpu-g2"; > +                       reg = <0x38310000 0x10000>; > +                       interrupts = ; > +                       clocks = <&clk IMX8MQ_CLK_VPU_G2_ROOT>; > +                       power-domains = <&vpu_blk_ctrl > IMX8MQ_VPUBLK_PD_G2>; > +               }; > + > +               vpu_blk_ctrl: blk-ctrl@38320000 { > +                       compatible = "fsl,imx8mq-vpu-blk-ctrl"; > +                       reg = <0x38320000 0x100>; > +                       power-domains = <&pgc_vpu>, <&pgc_vpu>, > <&pgc_vpu>; > +                       power-domain-names = "bus", "g1", "g2"; >                         clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>, > -                                <&clk IMX8MQ_CLK_VPU_G2_ROOT>, > -                                <&clk IMX8MQ_CLK_VPU_DEC_ROOT>; > -                       clock-names = "g1", "g2", "bus"; > -                       assigned-clocks = <&clk IMX8MQ_CLK_VPU_G1>, > -                                         <&clk IMX8MQ_CLK_VPU_G2>, > -                                         <&clk IMX8MQ_CLK_VPU_BUS>, > -                                         <&clk > IMX8MQ_VPU_PLL_BYPASS>; > -                       assigned-clock-parents = <&clk > IMX8MQ_VPU_PLL_OUT>, > -                                                <&clk > IMX8MQ_VPU_PLL_OUT>, > -                                                <&clk > IMX8MQ_SYS1_PLL_800M>, > -                                                <&clk > IMX8MQ_VPU_PLL>; > -                       assigned-clock-rates = <600000000>, > <600000000>, > -                                              <800000000>, <0>; > -                       power-domains = <&pgc_vpu>; > +                                <&clk IMX8MQ_CLK_VPU_G2_ROOT>; > +                       clock-names = "g1", "g2"; > +                       #power-domain-cells = <1>; >                 }; >   >                 pcie0: pcie@33800000 { With this update, when testing suspend to ram on imx8mq, I get: buck4: failed to disable: -ETIMEDOUT where buck4 is power-supply of pgc_vpu. And thus the transition to suspend (and resuming) fails. Have you tested system suspend after the imx8m-blk-ctrl update on imx8mq? thank you, martin