Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1427798pxf; Fri, 26 Mar 2021 07:39:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/ImVQlMI1kpeSdyYhRMnlNaGM7R3YGF/ojyH/b71fasVOOK/WG4azpPSEyo7ucRQFp3jv X-Received: by 2002:a05:6402:c:: with SMTP id d12mr15186428edu.100.1616769584476; Fri, 26 Mar 2021 07:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616769584; cv=none; d=google.com; s=arc-20160816; b=qMIsyjS43ve5KrF7xa/aJ4mOnBtV53c2WJccr3hDmXVJGMjpn+gwrt1Czp/yeTIxdf 3bRp4gsEOKxodbYnUK2oETmzU29gHSxIayFS92dQY/AL1i4LEYNv6zk+GRJ6xSiXnvQj PPqMUn1kxv9G5BwW954NqsuwEi8lCHPqNYOrUgLenrzr5Y2dhIS8/6x3P8kbsvnp+TIf dWMR1sN1Q7p8ZObQkypqGXALRMsUel2525TJ53TGDUwUGpT4h3bWzz+Di2NyqrDdhuJC rDQdkeb/iq8kxyiaIrHZctQTbR5KcDdAB4Q/SGNE3oTgKBivU5FD7sBik459VijNWGew xm5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0Fb86xMy9BxC60A13eBDgHkFRIfMFb9nSrJd+Q8d/yI=; b=pLZTCOtQ1WW26iT/GiLTcs556FXpQVXhgkNhRI82zSz+4nIvty9xSU/1NRMI9cU58z hvtkYNu+wxgcihzKrdGNgYz73ToK0BEpv/bbh/g2Gsx8BQC5lvN68F984ErnUsnKDgqJ w56EQ4/IoyG2x4j7R8Jb42jqRxHtAccFrT54ATMy4QCHMbkTSW4NsGXtphhvPvSo/N7P L/PpSnyxU0MCHWBH+wmjXCItGlD4ajZVc7TMG2r6WiM211q18n4ouUVan1EuwI8lk6Fb 6JRVjrKuACwXlMWaMGyHh97kFmeUUjb2z4SYKVGbyKhuD5Ga4JZKZDSU0CF3i4DWvrWh Glmg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si7995538ejl.54.2021.03.26.07.39.21; Fri, 26 Mar 2021 07:39:44 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230281AbhCZOhw (ORCPT + 99 others); Fri, 26 Mar 2021 10:37:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231184AbhCZOhc (ORCPT ); Fri, 26 Mar 2021 10:37:32 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41623C0613B1 for ; Fri, 26 Mar 2021 07:37:32 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPnaQ-0001Ln-5z; Fri, 26 Mar 2021 15:37:18 +0100 Received: from pza by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lPnaO-0007mU-JM; Fri, 26 Mar 2021 15:37:16 +0100 Date: Fri, 26 Mar 2021 15:37:16 +0100 From: Philipp Zabel To: Benjamin Gaignard Cc: ezequiel@collabora.com, mchehab@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, lee.jones@linaro.org, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@siol.net, hverkuil-cisco@xs4all.nl, emil.l.velikov@gmail.com, kernel@pengutronix.de, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, kernel@collabora.com Subject: Re: [PATCH v6 02/13] dt-bindings: media: nxp,imx8mq-vpu: Update the bindings for G2 support Message-ID: <20210326143716.GA27823@pengutronix.de> References: <20210318082046.51546-1-benjamin.gaignard@collabora.com> <20210318082046.51546-3-benjamin.gaignard@collabora.com> <20210326141156.GA8441@pengutronix.de> <3c23bfb0-eed4-63ad-be70-58aa129b0e35@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3c23bfb0-eed4-63ad-be70-58aa129b0e35@collabora.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 15:29:00 up 36 days, 17:52, 99 users, load average: 0.78, 0.37, 0.20 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: pza@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 03:26:15PM +0100, Benjamin Gaignard wrote: > > Le 26/03/2021 ? 15:11, Philipp Zabel a ?crit?: > > On Thu, Mar 18, 2021 at 09:20:35AM +0100, Benjamin Gaignard wrote: > > > Introducing G2 hevc video decoder lead to modify the bindings to allow > > > to get one node per VPUs. > > > VPUs share one hardware control block which is provided as a phandle on > > > an syscon. > > > Each node got now one reg and one interrupt. > > > Add a compatible for G2 hardware block: nxp,imx8mq-vpu-g2. > > > > > > To be compatible with older DT the driver is still capable to use 'ctrl' > > > reg-name even if it is deprecated now. > > > > > > Signed-off-by: Benjamin Gaignard > > > --- > > > version 5: > > > - This version doesn't break the backward compatibilty between kernel > > > and DT. > > > > > > .../bindings/media/nxp,imx8mq-vpu.yaml | 53 ++++++++++++------- > > > 1 file changed, 34 insertions(+), 19 deletions(-) > > > > > > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml > > > index 762be3f96ce9..79502fc8bde5 100644 > > > --- a/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml > > > +++ b/Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml > > > @@ -15,22 +15,18 @@ description: > > > properties: > > > compatible: > > > - const: nxp,imx8mq-vpu > > > + oneOf: > > > + - const: nxp,imx8mq-vpu > > > + - const: nxp,imx8mq-vpu-g2 > > > reg: > > > - maxItems: 3 > > > - > > > - reg-names: > > > - items: > > > - - const: g1 > > > - - const: g2 > > > - - const: ctrl > > > + maxItems: 1 > > > interrupts: > > > - maxItems: 2 > > > + maxItems: 1 > > > interrupt-names: > > > - items: > > > + oneOf: > > > - const: g1 > > > - const: g2 > > > @@ -46,14 +42,18 @@ properties: > > > power-domains: > > > maxItems: 1 > > > + nxp,imx8mq-vpu-ctrl: > > > + description: Specifies a phandle to syscon VPU hardware control block > > > + $ref: "/schemas/types.yaml#/definitions/phandle" > > > + > > Should we drop the 'q' here, i.e. nxp,imx8m-vpu-ctrl so we can use the same > > binding for i.MX8MM later? > > I don't know if the control block is the same or not on IMX8MM, so I have only > put a compatible targeting IMX8MQ. Oh, the compatible property of the control handle node can be different. I'm just suggesting that this phandle property be called the same. Otherwise we'd have to add another nxp,imx8mm-vpu-ctrl property and then mark either of the two as required, depending on the compatible. > > > > > required: > > > - compatible > > > - reg > > > - - reg-names > > > - interrupts > > > - interrupt-names > > > - clocks > > > - clock-names > > > + - nxp,imx8mq-vpu-ctrl > > > additionalProperties: false > > > @@ -62,18 +62,33 @@ examples: > > > #include > > > #include > > > - vpu: video-codec@38300000 { > > > + vpu_ctrl: syscon@38320000 { > > > + compatible = "nxp,imx8mq-vpu-ctrl", "syscon"; > > > + reg = <0x38320000 0x10000>; > > > + }; > > > + > > > + vpu_g1: video-codec@38300000 { > > > compatible = "nxp,imx8mq-vpu"; > > > - reg = <0x38300000 0x10000>, > > > - <0x38310000 0x10000>, > > > - <0x38320000 0x10000>; > > > - reg-names = "g1", "g2", "ctrl"; > > > - interrupts = , > > > - ; > > > - interrupt-names = "g1", "g2"; > > > + reg = <0x38300000 0x10000>; > > > + interrupts = ; > > > + interrupt-names = "g1"; > > > + clocks = <&clk IMX8MQ_CLK_VPU_G1_ROOT>, > > > + <&clk IMX8MQ_CLK_VPU_G2_ROOT>, > > Does the G1 VPU require the G2 clock and vice versa? > > Yes either the control hardware block won't work. Ok. Reviewed-by: Philipp Zabel regards Philipp