Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1119397lql; Tue, 12 Mar 2024 07:50:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHtX72ySWPcmHlGyqcp6y4vyGmFhLFiEUOGbt0ieIZ6RDjCTgEpCJtrGNvrXnaQPOqsEj6kTTSoyPcQ804gbVs1ri8hIcPyOhCycC8Lg== X-Google-Smtp-Source: AGHT+IHy4LXWwGtfXv4LFIDeZquUlwBcUl56Or1Z4lvfisd2y2CuvSlUfF39XYmYB4GxWd6YXucL X-Received: by 2002:a17:90a:17eb:b0:29b:10bc:acaf with SMTP id q98-20020a17090a17eb00b0029b10bcacafmr7106894pja.30.1710255054799; Tue, 12 Mar 2024 07:50:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710255054; cv=pass; d=google.com; s=arc-20160816; b=UCRWiwYlNqnjkIPqtmr1x083B4rQb5gliFIRkF56roHJ3o7StfNykJwvfTtdU8gg7P 5OXRsBReorA5oRJ5a2q5vp3yEIkkhtvJbTo+SC8xkn1ew2zMW7JrtPa0MJu6ADXN1fki GOSERTWVuKMhYJnAuufOuTlD+96lZ4lVf7QpbaLjDeM6J/8FeMpTuN1XUE8U9RM9i3yB BWJNZEU6EHsU1KioLukDu4ZLxkFhCwVqGZHXh5A/YhW9o3EvwnR4F/tfmrQEcalAG52a ESaydk+l/+qfY6c/htumiBdtukxhhK9aHdqyfDHup+KsC9E7CwG1q68ItfCbpyhH+7qb h6/Q== 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=Xwsrg5ffq6SFxb6umV6abberin3qWdTK7zIcfkXl4X4=; fh=t4748LNIMCVAP3uADtbZgAUZak7FAdVzPWRG3MbEoBU=; b=D934lDitYEm0IM1h257dPEVvARsFoBLCYauucvWeDCSIe/FqI5Z69+Nk08AxsBB/XG MVKhsDw0B8aWhZG3IBzyQAypKjn5Gg1vQXyAITWb2XE5Ximsjv2O6NLC9CzXVVBkynnD RfZuUAisPnhV8NgxAIkt6RPTTD0EuICimWbYkWFsbWMP3kyGMDMIyC9yMU0nPmtrcasa h6UajbHKE2AyA5KotFEW+ijKlnm+cVoj2mAZJP6KauUE/l6gw7841+fjH9XhsIVoCnkM 3u3+hkQERdrWKf7ULgY7hcPsIeD/TqsFU0tO5VJrbGOTR8Ioyp8wj5PPrt/IwUuHn+G3 98Hw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ch/HFhvZ"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100394-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100394-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x11-20020a17090a9dcb00b0029c08881405si3932181pjv.154.2024.03.12.07.50.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 07:50:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100394-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ch/HFhvZ"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100394-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100394-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C2FA6283224 for ; Tue, 12 Mar 2024 14:50:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D07567BAEB; Tue, 12 Mar 2024 14:50:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ch/HFhvZ" 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 EC6241DFD8; Tue, 12 Mar 2024 14:50:37 +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=1710255038; cv=none; b=cRtcYqNi+xAHPDDCs2Hrr4L1nb95ZKAaTkxtkabkEw+PvACfgXgJlqEaCBLReu2pgKMGLeDSJqOHicdEYpeP0Z3XInEf9+J5IjJdNFbobx0CUyzKtKycCOXtcKgmc+f7NBo9y+bZJZEgOUXEAsDNCKjSaWdBt9XW+JbCuf2FX4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710255038; c=relaxed/simple; bh=weQH3/gYArkWG361nWx6QB+7+ypFbZg4bPxLz+L6YaM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gekihOxWEO6Fvoqxd7ocGsFBvhHbUSNqe0ArzrxSHCuxWSXnEfhwvAwN6857NNQsz4nK4TJIh9AllNWVJfJycdjvubMHvglYyEsYWWXU3St9jg7yT59Ebpi58b6lZ98R7/Q8ZA4v40tO7qCGPjgDS/Dtdb9pfxBQCZBsrctbrPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ch/HFhvZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AD9DC43394; Tue, 12 Mar 2024 14:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710255037; bh=weQH3/gYArkWG361nWx6QB+7+ypFbZg4bPxLz+L6YaM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ch/HFhvZSluXRP17dbhV2T8wcG4TrWNoidrLt5OgAwb5ee6GUl58rKrFLKeA9HZSI GGuBtiLqrNsl91nynLWcXj9/uuafLbUew/Qw2K/gxiOWC5T2WzfIwbh07asP7JP8dN wjNdOxeoFkPzuEf4xXVcD10MvH8e/zVggavxjoaGVe9P6Kq2Pi//ilHivKW/Ymr3uG ZD0vmyPh/Q/J/H6lQGyMETa2s5/JYsmhSNG2Bo7BQOq3mX7R5X1vLqVW0zmHrbFctc UfiayyZNXre9mfAjhjEOWiqe+dL2fkw6bxJWxQCLdnOpVyP9DMfgUeeivS4vEj4v70 EXxy27b5ukYgw== Date: Tue, 12 Mar 2024 08:50:35 -0600 From: Rob Herring To: Xu Yang Cc: gregkh@linuxfoundation.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, conor+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, peter.chen@kernel.org, jun.li@nxp.com, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 05/10] dt-bindings: usb: ci-hdrc-usb2-imx: add restrictions for reg, interrupts, clock and clock-names properties Message-ID: <20240312145035.GA2204647-robh@kernel.org> References: <20240312091703.1220649-1-xu.yang_2@nxp.com> <20240312091703.1220649-5-xu.yang_2@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240312091703.1220649-5-xu.yang_2@nxp.com> On Tue, Mar 12, 2024 at 05:16:58PM +0800, Xu Yang wrote: > Add restrictions for reg, interrupts, clock and clock-names properties > for imx Socs. > > Signed-off-by: Xu Yang > > --- > Changes in v4: > - new patch since v3's discussion > - split the reg, interrupts, clock and clock-names properties into > common part and device-specific > Changes in v5: > - keep common property unchanged > - make if-then more readable > - remove non imx part > Changes in v6: > - new patch based on ci-hdrc-usb2-imx.yaml > Changes in v7: > - no changes > Changes in v8: > - remove if:else:if:else:if:else block > --- > .../bindings/usb/chipidea,usb2-imx.yaml | 80 +++++++++++++++++++ > 1 file changed, 80 insertions(+) > > diff --git a/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml b/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml > index cdbb224e9f68..fb1c378dfe88 100644 > --- a/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml > +++ b/Documentation/devicetree/bindings/usb/chipidea,usb2-imx.yaml > @@ -49,6 +49,12 @@ properties: > - const: fsl,imx6ul-usb > - const: fsl,imx27-usb > > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > clocks: > minItems: 1 > maxItems: 3 > @@ -144,6 +150,80 @@ allOf: > - const: idle > - const: active > > + # imx27 Soc needs three clocks > + - if: > + properties: > + compatible: > + const: fsl,imx27-usb > + then: > + properties: > + clocks: > + minItems: 3 > + maxItems: 3 The max is already 3, so drop maxItems. > + clock-names: > + items: > + - const: ipg > + - const: ahb > + - const: per > + > + # imx25 and imx35 Soc need three clocks > + - if: > + properties: > + compatible: > + contains: > + enum: > + - fsl,imx25-usb > + - fsl,imx35-usb > + then: > + properties: > + clocks: > + minItems: 3 > + maxItems: 3 Same here. > + clock-names: > + items: > + - const: ipg > + - const: ahb > + - const: per > + > + # imx7d Soc need one clock > + - if: > + properties: > + compatible: > + items: > + - const: fsl,imx7d-usb > + - const: fsl,imx27-usb > + then: > + properties: > + clocks: > + maxItems: 1 > + clock-names: > + maxItems: 1 What's the name? > + > + # other Soc need one clock > + - if: > + properties: > + compatible: > + contains: > + enum: > + - fsl,imx23-usb > + - fsl,imx28-usb > + - fsl,imx50-usb > + - fsl,imx51-usb > + - fsl,imx53-usb > + - fsl,imx6q-usb > + - fsl,imx6sl-usb > + - fsl,imx6sx-usb > + - fsl,imx6ul-usb > + - fsl,imx8mm-usb > + - fsl,imx8mn-usb > + - fsl,vf610-usb > + then: > + properties: > + clocks: > + maxItems: 1 > + clock-names: > + maxItems: 1 > + > unevaluatedProperties: false > > examples: > -- > 2.34.1 >