Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1923494rdb; Tue, 20 Feb 2024 10:58:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWsJxyxHaEUwX3lUPXzRhdQT1yjSgg2sy1Yb1Lf9KPWhvLTSSgT0J3Ls8mPqJwSkyWY+K3jc+433vHsIyZbfw7ILzp1zeb2T05dCgGxMA== X-Google-Smtp-Source: AGHT+IGwuzsE5CFAzBJV8wquGuCSCkHEiUzTGJstTKKdB26YtJim7e8X479GDbhTauSxlk0PPysu X-Received: by 2002:aa7:d899:0:b0:564:4028:e2cf with SMTP id u25-20020aa7d899000000b005644028e2cfmr4593697edq.24.1708455519496; Tue, 20 Feb 2024 10:58:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708455519; cv=pass; d=google.com; s=arc-20160816; b=nOF2HBl87oxy7A1ZEgNUt8CY7j1f5h/7ymG13ZxhWNbG/gWJ9mX+HD3Z8OdbgQYo0C X8ZDLW5xjuLHs+4Rgg7EqRTFly8PQ2eNXIq8ZpSNAAOx+XoNzCZcZBfV/LROxH56a9WG 1T2mN1aw+qj1KGNJYZbTZGrty2t3bzGr+/DghkRrZuAQP6f4lU72l5od0OeVWwHwnnW/ 78AYCjgoKTJbXocifxRqW6zWCtbDNLkNvymaKOrcFN7HiIqcZFwakffhFM5/kzbqgpEG 6HLnn6D+PFfLFUjiyQxnte8ZRsbI15C9r/ZVM8cMaCjWO6kbVu9W6ksLO7MQRbnK4d/i 93Sg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YNUVBqmIt41qUQz6nuX1t/0eYTnuXuf/l2gB1uFE2e0=; fh=jMn9aN05Vm4XKxVW0kFyo0idEGTUZ5BBH+evt2yyV6U=; b=rUtcob0jlhHuM2zABowdR/Fi52m3bXkJRWaTFwbSm0f8k7UiERie1vskdgLeOlh0PA UfL2JOVd3D9KqWGUgoPuzRchCIWb3JG/B7SWtrY7SdYun94X/fMxmAeZJTmtHE2xq4/O +RxnOBJyS5SgbobXdS/Be6twqfO3EAguXyNRhJduU31JSqxTulzvTNjH3I20MuKRwyF+ cSxwTdYs7LhyOAC9omiUA13PmV4oXb3E+iP9qHXLYqMJ4fkZwClQgK8AM+vCh7ioSDZe iyv2quYlB3o8Xfr5WVf9uJ5z+v2Nj7bNRaVuXd/XUrBq9qi5I8tnO0RROV8vp9HB6QAC FRkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iRal7+Tj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-73555-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73555-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m16-20020aa7d350000000b00563f99102efsi3677772edr.241.2024.02.20.10.58.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 10:58:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73555-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iRal7+Tj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-73555-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73555-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3EF571F23D4D for ; Tue, 20 Feb 2024 18:58:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B877134CEC; Tue, 20 Feb 2024 18:58:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iRal7+Tj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 367ED12EBEC; Tue, 20 Feb 2024 18:58:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708455507; cv=none; b=m6K/qAKm7qP4nmE7rvM0oKQ2ZCQ4ZwDtN5P4l4JaRXGtzjsJNaizhBJ49RSUROms7z0TWoIYLkh3MQPyEovnuNKl+lE9CvKBIfBOP+Xxfy96IRuDbH+DF+bJMWSmc+Xdkgj95Y9dgGZlgmtAzQ7TjpYtgKF8iOsbI5XcWI5/TDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708455507; c=relaxed/simple; bh=4CW+LXiG5f6KUnfcKWM4ar6fdeuFp263jPQ98dKh8To=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YZPTlK/nHTobypjOTv25YH8u93nyNJj+zhgAIN+NKgG9ztc65odNzREUGrnc1kU9wrCn28g2OlShQlEqPfq+QdCP3UZUZH7/Zte/iQuaM7aD8+HqhTHPLhbo7VXnYXF0IckVzScp/jZyp/4AMtt30MA4m7wrcmme2rYhtlWpcNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iRal7+Tj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8244EC433F1; Tue, 20 Feb 2024 18:58:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708455506; bh=4CW+LXiG5f6KUnfcKWM4ar6fdeuFp263jPQ98dKh8To=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iRal7+Tjf7Yw6mzcb2bExp2WfEpXtJymsOzpnLJOxdxE3uQJ76YtQptlT33ndySIQ QbSlyCDhONv7jXWK7ZMb3JDD0HHrdgswSU9QNtCz7eYLN4beruUcNGHptKIbUVILDB AzO4g1N4Rsi8NV3/ZqwEnff5khPHFHzUqeyJZ1TnNrHopXdEfJ9EwtiJz4GUiZOIr4 mNy7F4xsrsfmDvFIq4FfiYf0FV0ievwNv3Ncc8cJD5JAPcsiv4QkqlsdYL/2iXA5Nf s7SeYrZK0dB901IfHMeaqcbYCZtx1cJkBu4Iicwgb6MlLepMijBLMZ/7UBJL5Ljrhp 0KXMtRKOd5K6A== Date: Tue, 20 Feb 2024 18:58:21 +0000 From: Conor Dooley To: Michael Riesch Cc: Mehdi Djait , =?iso-8859-1?Q?Th=E9o?= Lebrun , Thomas Petazzoni , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Sakari Ailus , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH 04/14] media: dt-bindings: media: rockchip,px30-vip: allow for different variants Message-ID: <20240220-catchy-cupcake-e600e5af7650@spud> References: <20240220-v6-8-topic-rk3568-vicap-v1-0-2680a1fa640b@wolfvision.net> <20240220-v6-8-topic-rk3568-vicap-v1-4-2680a1fa640b@wolfvision.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y+i2VP3O5QfWvvRS" Content-Disposition: inline In-Reply-To: <20240220-v6-8-topic-rk3568-vicap-v1-4-2680a1fa640b@wolfvision.net> --y+i2VP3O5QfWvvRS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Tue, Feb 20, 2024 at 10:39:14AM +0100, Michael Riesch wrote: > Move the documentation of clocks and resets to a allOf: structure in order > to allow for different variants of the IP block. >=20 > Signed-off-by: Michael Riesch > --- > .../bindings/media/rockchip,px30-vip.yaml | 58 ++++++++++++++--= ------ > 1 file changed, 37 insertions(+), 21 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/media/rockchip,px30-vip.ya= ml b/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml > index 675a1ea47210..7168f166798c 100644 > --- a/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml > +++ b/Documentation/devicetree/bindings/media/rockchip,px30-vip.yaml > @@ -24,32 +24,16 @@ properties: > interrupts: > maxItems: 1 > =20 > - clocks: > - items: > - - description: ACLK > - - description: HCLK > - - description: PCLK > - > - clock-names: > - items: > - - const: aclk > - - const: hclk > - - const: pclk > + clocks: true > + > + clock-names: true This is, unfortunately, not how we like multiple soc support to be handled. Instead, the widest constraints are added at the top level and constrained by the allOf. If none of the names etc are shared, at least the widest constraints for minItems and maxItems should be able to be here. That said, this patch should be squashed with the patch that actually adds the other device to the binding. Cheers, Conor. > =20 > iommus: > maxItems: 1 > =20 > - resets: > - items: > - - description: AXI > - - description: AHB > - - description: PCLK IN > + resets: true > =20 > - reset-names: > - items: > - - const: axi > - - const: ahb > - - const: pclkin > + reset-names: true > =20 > power-domains: > maxItems: 1 > @@ -85,6 +69,38 @@ required: > - clocks > - ports > =20 > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: rockchip,px30-vip > + then: > + properties: > + clocks: > + items: > + - description: ACLK > + - description: HCLK > + - description: PCLK > + > + clock-names: > + items: > + - const: aclk > + - const: hclk > + - const: pclk > + > + resets: > + items: > + - description: AXI > + - description: AHB > + - description: PCLK IN > + > + reset-names: > + items: > + - const: axi > + - const: ahb > + - const: pclkin > + > additionalProperties: false > =20 > examples: >=20 > --=20 > 2.30.2 >=20 --y+i2VP3O5QfWvvRS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZdT2TQAKCRB4tDGHoIJi 0tZhAQDtcuqCE1tbyiZKmF78dkxlm/na01H9RkqI8fZC7+braQD/U7aIEwSULwcM axi2QjcgExsgOX/i6A0txpW/TSVrcAo= =V7Gm -----END PGP SIGNATURE----- --y+i2VP3O5QfWvvRS--