Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3357042pxb; Mon, 24 Jan 2022 07:59:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyamHPNWhwPpd9q8O7aoFVqyeBe3+SrmTetypXVlw8HW8SgPHAkY6IDY/2Hriw7XIJv0UrO X-Received: by 2002:a17:902:d4c8:b0:14b:3567:ef4c with SMTP id o8-20020a170902d4c800b0014b3567ef4cmr9167573plg.112.1643039996111; Mon, 24 Jan 2022 07:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643039996; cv=none; d=google.com; s=arc-20160816; b=SPcsO6KPrPclZYzxJWt7Vd/kyBTfil9eoYCHTGp7qTiBLBZsRODNxh1IoqrW3Ky90j bkwLGTi9zA/5IST6NWworqTz/JjtzEdyqxd/81Ejnz7dTiA75mgDbqM/svXgJBWr3YvR 81lDMJiFBxoVHMKijxstgs7eGoz6sy91GT4yD7t06klX7AJ94sK/eOsZ/+GLFEt785kW MoDIll01JyZnk1Yhf7L0Nv5oBd/JjnJWpf5X6GTLYiX5gqteM45BKa9HBqJz0YvB7v0X UnhyyLGtn2GEHRY11WLQyG8DS9v45V0W1RNed9JhNeK4eossKfBrnD6jA/rrecrF92tw 5rZQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0kqapHPsVAmMS1hoADzYhtB33F6J8cOET2+FNwBRYVI=; b=PJqfzTfc1LQZD4Vg2UTEZd/BuzvuLpx/9fDlKXMswR2x7TH34cu6PCWcSnZQpgbquN LoYTdpRi/KnwM5qF3ytpVGrXjifzO1dmhu6Sh34IWx2WamnQHa6HyQeW4b9Vri8BKT23 kx3JlbgZ6f8jYfdEha/sNwkn7+CydltQAjtPiZgZnMYDezohLVpoV6JZGDFYtYRD/RgT jLNBH42iynJJdpKfnGf0INA0sewgkWmPZKLVHmD0OOsjkzXuHOk2jiqzD6Mt+Ans7EBt CjniukzTSO3SdeDLbo4ePN2n4xfqSz5jgh0BsuBPGh4UnAd3ELuhcFBsc6MIRi7G2N+8 pnig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UjHNdYVB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rm12si22465025pjb.16.2022.01.24.07.59.43; Mon, 24 Jan 2022 07:59:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UjHNdYVB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240947AbiAXCb5 (ORCPT + 99 others); Sun, 23 Jan 2022 21:31:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240846AbiAXCbr (ORCPT ); Sun, 23 Jan 2022 21:31:47 -0500 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DD22C06173B; Sun, 23 Jan 2022 18:31:47 -0800 (PST) Received: by mail-io1-xd2d.google.com with SMTP id h23so17705588iol.11; Sun, 23 Jan 2022 18:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0kqapHPsVAmMS1hoADzYhtB33F6J8cOET2+FNwBRYVI=; b=UjHNdYVBgQuefHEiP7NbKEkMw+838O6fih8G046RqbW05XTz91K2as73j4bCJHEG/i H+6hfjiigX46NZNy+WHb1T6KEYRkc42t+/G+r+z2ijG27j8F/GBOdDD0tRLLr/8+uT6y /b34Ko2Gs9uwNfeEL4Teub3gJKq9UyFtGClm0clhY9NANQYj3Ga0L8TaR2whBThWAUsq eK4IuWdTelBizfAvnVZyvp3a6sVnt3pAv0wqUxDw5oMNUXA0nA2OpA6C00az43q6IPbV xQGGJObqJrmnXPn+Gnj08tQpHKkUOebFzut8qf62RljmsicwQ/ODD151qV2Hh9LfJozS bPOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0kqapHPsVAmMS1hoADzYhtB33F6J8cOET2+FNwBRYVI=; b=vX4D+SBuHSw4Sn3l54rrOzmd0xGA6H6bXSE+jLu5e+ieojf1Jn7ITeD8NnkLBf4IK2 NXs/inBsQgZLhmDqu6bqjz0h2AvcoAAjPaoPZAXkkvX0IakS2O5WltidEo+HzQmgGSRk uSQxDjYj7hmo0oNhv4kpGWx6gDmDkJYVj9M+J81GTb5inVKlduYoL53SSXfhA0c8CvBo CyCuD/qBlrsBFYqd5hML69e4p19G7irwpWry/rvFtyjTtimw8MBr9RUBxirPsCgoNWbv uTr4fl0AaNFfvw3Ryg6KE0AvR9Vpvy1HcnK+8BxnKs+Dxv1a9/G/TWsCbdXEA3cHFY7I H4Yg== X-Gm-Message-State: AOAM530DX2EwP/GZr0SrDEezIYTVE2QrtDvUClbud6gGxpM5Q0TRv0p6 XopJxOCBFDvJ95fceU6GeICU+Qu8BSA= X-Received: by 2002:a02:2201:: with SMTP id o1mr5733193jao.213.1642991505768; Sun, 23 Jan 2022 18:31:45 -0800 (PST) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:582d:ad0e:e5a6:94b6]) by smtp.gmail.com with ESMTPSA id w4sm6625633ilq.56.2022.01.23.18.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 18:31:45 -0800 (PST) From: Adam Ford To: linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, shawnguo@kernel.org, aford@beaconembedded.com, Adam Ford , Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , 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-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH V3 06/10] arm64: dts: imx8mq: Enable both G1 and G2 VPU's with vpu-blk-ctrl Date: Sun, 23 Jan 2022 20:31:20 -0600 Message-Id: <20220124023125.414794-7-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220124023125.414794-1-aford173@gmail.com> References: <20220124023125.414794-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 { -- 2.32.0