From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF9A8C4828E for ; Fri, 2 Feb 2024 19:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6Q+4vCwU446kDxMPcpq/PZiN/1YvGfE80jO4QPuYAkw=; b=DYc8KoC/vmHFH0 2aWNxnzDDhN8YPq3jIAHarx8GPg440SetwO7GKWf8m0fpDouEV7kCje/XeCNGPAyUVgGmRTs9wdWv gGJvcolznxHMwn9cCMB8xWo+H0gteJcKqt/FFlWMmrPQBRCGpgjrIWhvRsuQq1WHE8Q+uk1KfTgOo cXRkjmY7bmshwgRs/SkzaCZsVOfMu42LCQdHDdWllRgO36zYu3g8DnYkeTan6V8SFUmi3QIeNIphq DPlqTXW5t69IFZp7nLGN9aDrEmY/QWYAFmEb2JS3ZiUOeVT9d8AacAhpNAIP6kixF366AXpm+jRTF HXBARGbGKlTbEKjcETdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVzYm-0000000DGMe-0nRa; Fri, 02 Feb 2024 19:51:08 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVzYc-0000000DGKx-1MqH for linux-arm-kernel@bombadil.infradead.org; Fri, 02 Feb 2024 19:50:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ea2QBOTBm9Vy8FnFdzWECIKMOMeXBaNz6S/vOVhIwpM=; b=WtARSbzBmQv6oUM/21osLV9JBL 8Ib1vrrrUD0y8e+Z1VrJ3iSUFjbIweE7KW2Zd+xabJDSYtO7lVWHltx0p75XFmDhdfnqNobk8Gpbu s51lSn6Le61i8z4KUg41BD2OWRHM8tUNVSqKMAsHwf2qIxRH9V/QWWguEn2z8MDQAaxHv4rzoh6IV Q1nbKRN2AvNa5h5Zne708Y/7pAl+1HT/mIYnXMgCUcy0maVUzgrpo3ya70rJz6cg5qx8/GsSoSsOu sws/COASGJ5labxwFqO7cx5ScDTn8nc7u3w2leAB16O35dK39ERLICwcmvwEQetmCaRKF6SXuMLvO MfSfKJjg==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVzYX-0000000ADvs-3z79 for linux-arm-kernel@lists.infradead.org; Fri, 02 Feb 2024 19:50:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6D6FA6283F; Fri, 2 Feb 2024 19:50:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E25DAC433C7; Fri, 2 Feb 2024 19:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706903427; bh=9A36iG8VpIfsmP3VT0ZetlwfDDDTLMTUJULYO7BI59Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mi5Bb+P3HTcfmhTyIpvsitzBOeVbiY1xZe4fhEbQ4xyRlb67VjswOtUK2ZAowS0MN w/Y+KOQhlZDpO7ZsJZGBg0xrCtBQLcILjX5mAa6tK6vaEgSYHstEneMrKW2q45wGpO wd5Mzom/O7NGxWXnf2Xjw3wa03mLLLwRYh/YmKq01tiwnI16i/9q8CFW+kssgfQx1h chW0j5aah/6e8nfIP4QUUP7eJ2m0JriMRAYtnOiR9JKghC+MEJYQV398h7UP5XRwLz M1eFGgIsGhOL3/JqgqozlD5Bc53kWAfmhDPdxVmtmtNHmZ7MZMZ5eVh20j9XBUWpz0 d+B+NJXMka7xQ== Date: Fri, 2 Feb 2024 13:50:24 -0600 From: Rob Herring To: Krzysztof Kozlowski Cc: Xu Yang , "gregkh@linuxfoundation.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "peter.chen@kernel.org" , dl-linux-imx , Jun Li , "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [EXT] Re: [PATCH v5 4/8] dt-bindings: usb: ci-hdrc-usb2: add restrictions for reg, interrupts, clock and clock-names properties Message-ID: <20240202195024.GA846913-robh@kernel.org> References: <20240131114324.3722428-1-xu.yang_2@nxp.com> <20240131114324.3722428-4-xu.yang_2@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240202_195034_460271_1ADDE5BF X-CRM114-Status: GOOD ( 27.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 02, 2024 at 12:04:51PM +0100, Krzysztof Kozlowski wrote: > On 02/02/2024 10:10, Xu Yang wrote: > > Hi Krzysztof, > > > >> > >> On 31/01/2024 12:43, Xu Yang wrote: > >>> Change reg, interrupts, clock and clock-names as common properties and add > >>> restrictions on them for different compatibles. > >>> > >>> 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 > >>> --- > >>> .../devicetree/bindings/usb/ci-hdrc-usb2.yaml | 118 ++++++++++++++++++ > >>> 1 file changed, 118 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml b/Documentation/devicetree/bindings/usb/ci- > >> hdrc-usb2.yaml > >>> index 3b56e0edb1c6..6ad3582051b8 100644 > >>> --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml > >>> +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml > >>> @@ -412,6 +412,124 @@ allOf: > >>> samsung,picophy-pre-emp-curr-control: false > >>> samsung,picophy-dc-vol-level-adjust: false > >>> > >>> + - if: > >>> + properties: > >>> + compatible: > >>> + const: fsl,imx27-usb > >>> + then: > >>> + properties: > >>> + clocks: > >>> + minItems: 3 > >>> + maxItems: 3 > >>> + clock-names: > >>> + minItems: 3 > >>> + maxItems: 3 > >>> + items: > >>> + anyOf: > >>> + - const: ipg > >>> + - const: ahb > >>> + - const: per > >> > >> This would be just: enum: [ipg, ahb, per], but in both cases I question > >> why the order should be flexible? Nothing in commit msg explains it. > > > > The driver will get the clock by clock-name, then the order should not > > matter. However, these three clock-names should be present at the same > > time. I should use enum then. > > > >> > >> Plus I will repeat myself from your v4. I don't think this is helping, > >> because the file will soon grow to umnanageable chunk. I prefer to fix > >> it at beginning, before we reach snps-schema level of complexities. > >> > >> Please define common schema, reference in this file and move IMX to own > >> file. > > > > I'm not that familiar with dt-bindings architecture. If I define a common > > schema, then should I create imx, qcom, nvidia and other dt-binding files > > too? > > No, the rest you can leave here. Someone, maybe me, will move them some > time. The point is to move at least IMX to its own file. That will only work as long as i.MX doesn't define any extra properties which it already has. We have to have at a minium common, imx, and everything else schema docs. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel