Received: by 2002:ab2:6816:0:b0:1f8:1780:a4ed with SMTP id t22csp32250lqo; Thu, 9 May 2024 10:22:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfucmgh6mTBD0KhDpE9GARUEzV+Au5ChVH9HGm+AZW44cw9mzlHBlTxNZI+/4ftk+foEjDvLX6FueEmPL0rTlRCG0WQaUg9A8XYejFFg== X-Google-Smtp-Source: AGHT+IEKXjeqMQzDusgL44hLiekHGXoZ72T9dAxd7WyMZur8/m9FvheuuWIQvFh8g9x8lY9hXK2M X-Received: by 2002:a05:6214:570a:b0:6a0:af44:f21 with SMTP id 6a1803df08f44-6a16821dadcmr74026d6.36.1715275348946; Thu, 09 May 2024 10:22:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715275348; cv=pass; d=google.com; s=arc-20160816; b=svkwMxp/+QVALPuVxtYetXXToChoDKnQx49jUorTLaiUVROPMvRQFqmhODV+Rgq99i dEp91QcIFH53mFPQ0QGJcbuJKjVMNyx+xZD7EO7HJCm94ZcBGvcX2elUCGBRtTd8WSJ0 Sc1QqMw1GvluXcAGk8w2QkhhnUvTLeKe5Y4VfqwxIqWzOn1KgcHswrtrdg3+5vFPih8V KkP//dOpOp/ljXrr6V4gP67OToCiqAzi4/qXpjIABs5wiN4hKgkqq5jyf2fYUQmO2LX+ 5YDbpU2dKx4J8lB/pF0QFg7btYr6qc0k2QcRilFc6kT7fTB3HfCCI5amX6yFpA9bUrBI AwXw== 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=a9Vb3YuZ3gDJtIxl2Sbvdd1WZSeeuwtpjpeot26KYrY=; fh=0zrz1GT/VQCqX9bI6IjXJam9P9XNnxQGxHOuc/iyGWA=; b=u32fSIWj53myThZoUOM6ICSjOoFTllGZztP21yoU5Tw10nTeO1kX6/FFd4mlAdnfBf UHJluCA6Io6GbxN68CQKmxRRAUFfNPjatGR8Y3sjzzkH67TWLt0GSZhk0kaU72t8s1+t M+N20B4wFTJcG1cJC2+d2hGmdesmSk5WtTZeefJUUSSeTpG+gGyyz9nrPp671vUyAWIb nOY0FbR31ruDiGofdZzaMMNnWr7t9VEImoK12cFvt825DRbF0CS/XWaGCnv4Mz5cIkHo dGefwk+FDHvscTyrkrtVg8/use1stzEuGIJrm59jwwdXI6G0RYLI5+ypQBdhfU+U3vsr CwHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QmLlGVur; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174726-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174726-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b70b8si17601036d6.334.2024.05.09.10.22.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 10:22:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174726-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QmLlGVur; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174726-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174726-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 876DA1C20CB0 for ; Thu, 9 May 2024 17:22:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6867012E4E; Thu, 9 May 2024 17:22:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QmLlGVur" 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 8322FDDAA; Thu, 9 May 2024 17:22:19 +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=1715275339; cv=none; b=tJ6TD082W/YOy+99kQ2wZRD2r9n1MayFcsLPS5g5OLV3Nkbup2qkv+nRnecqOugNo3dcsi7tnfrWwnTJNet7k/7ubefGlXD5vm96tFc2uopsZiUs4/gtZAe1Nd1WkPzQGimruWZhp5RsUfm4H6x+qq3yLuZWhe/B1nF1R1GSz3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715275339; c=relaxed/simple; bh=XwNk5V9R0QPzNcNh99wAkQowo9Pa2mx7s88SZ+TAMDE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CV5ffuVNlywPDSsLWXburd7tR7F3xguCyVsSOfIjXHUc6qBUJrKpOnefiDRS+Q7/bD9V0yiL4qZ4Nv9BoFKPzW+UNGOQEQXdhEy2jesZYz/uK2fgTUfLtWpBWhtL6JmX4ZjfK/65kIcbUK2iWGxZRmYMCbojjSYpqEphTYoyBgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QmLlGVur; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ACE7C116B1; Thu, 9 May 2024 17:22:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715275339; bh=XwNk5V9R0QPzNcNh99wAkQowo9Pa2mx7s88SZ+TAMDE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QmLlGVurc5Bzn2z4QgNAt8uPrwv3geS9SsHaBNCzsw9vL+xBzz5ZJEtyIm2LBIt81 ka5stnEFm6GIN9odgm2n+XjrDB6+L8agro9SPTMAetuiFy7PWgPwGg86RzUxib9Z6X pHOmi8qCqqzkf5hsqnBfK9PW++J4VTPqWWDYIIm9aO8LwrsJqEFC20SAIthM65SrC2 EiEoeEoA0GSlshYEMBdD3LqDgVatA2WMZaExJf/RzhDFdDeqVBqBaEbutoYP+IHnUm vWW9bmHDxD+2WYUZghfM/Et+CYKbIuZ+RI6BujaONxTri5Z9vjV3xjtV1uZA4Ukjsq 8P/X1XMnuyGYg== Date: Thu, 9 May 2024 18:22:15 +0100 From: Conor Dooley To: Witold Sadowski Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, broonie@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, pthombar@cadence.com Subject: Re: [PATCH v4 2/5] dt-bindings: spi: cadence: Add MRVL overlay bindings documentation for Cadence XSPI Message-ID: <20240509-hurried-canned-3ceac439b93d@spud> References: <20240509010523.3152264-1-wsadowski@marvell.com> <20240509010523.3152264-3-wsadowski@marvell.com> 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="WpdYn/ptb22WafW8" Content-Disposition: inline In-Reply-To: <20240509010523.3152264-3-wsadowski@marvell.com> --WpdYn/ptb22WafW8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hey Witold, On Wed, May 08, 2024 at 06:05:20PM -0700, Witold Sadowski wrote: > allOf: > - $ref: spi-controller.yaml# > + - if: > + properties: > + compatible: > + contains: > + const: marvell,cn10-xspi-nor > + then: > + properties: > + reg-names: > + items: > + - const: io > + - const: sdma > + - const: aux > + - const: xferbase > + reg: > + items: > + - description: address and length of the controller register set > + - description: address and length of the Slave DMA data port > + - description: address and length of the auxiliary registers > + - description: address and length of the xfer registers > + else: > + properties: > + reg-names: > + items: > + - const: io > + - const: sdma > + - const: aux > + reg: > + items: > + - description: address and length of the controller register set > + - description: address and length of the Slave DMA data port > + - description: address and length of the auxiliary registers The usual approach here is to define the loosest possible constraints at the top level, so unconditionally define the xfer register region, and then constrain things based on compatible. In this case, you can set minItems to 3 unconditionally and then do (in psuedocode): if: marvell then: reg: minitems: 4 else reg: maxItems: 3 Additionally, when the allOf: is more then just references to other documents, it should be moved below the required list. Thanks, Conor. --WpdYn/ptb22WafW8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZj0GRgAKCRB4tDGHoIJi 0qAUAQDDkek5uuZo8fhS+5+n+/KC5jbgv3VqBlRRX6dNq4+aMQEA3ieUk8uBqv3x G0rgnFNQrGoFLnff0xt+ojPwilKoWwg= =aE1J -----END PGP SIGNATURE----- --WpdYn/ptb22WafW8--