Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2993878rdg; Tue, 17 Oct 2023 00:49:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIi/kVpDmRbWFRxu9RJdX3A0pE53MBBNBc0oTz3kpE3Ybl2HQx6x6rYApubzJaH4DEAAo3 X-Received: by 2002:a05:6358:cd1b:b0:143:5383:af8b with SMTP id gv27-20020a056358cd1b00b001435383af8bmr1782437rwb.11.1697528939540; Tue, 17 Oct 2023 00:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697528939; cv=none; d=google.com; s=arc-20160816; b=ypUJI2I3R6twMUUqf4m90nBLn5JlIsAYh0/EC5LGoXfySMDUDRnTHxgnXoYJJinfci N3n6BOSmxF0QpTqvzJNMS9C2Y2f+B6dRWP+AV97987uUu0HAOA0Ei4fc+BsZU+8WYE4W BEANogUSGkM1HyZfeJ1okDqVY7VBJ/3LYwWkFqOwkJbKVG3QkIhV5WrQKS4A/sypMsgu do8+re7v5qVfxl7BK+p+9WP6gVdqOPgs72GljDHq0ThhcoXYKsf4wFXGvOi6Ymkg0g86 UAirCmxN46vQike3eN/WH+hISuOLiXsKetI4BPRcBHrL0bCvgC/xM6KBYmnQWouGOlwR 2sGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=epCs/RvBVhghzXTDODPCxJb/XMGh64dmVlg1h86iYMw=; fh=bPRjhOg8piOs5Ncigly6vMCbTed5Tg0FhNAsuK+x5bQ=; b=Xp3JYzOKeXIx9vjspAg7lpVlKnlCit1TdS5zul+Bb6OKARUgoVeQQXoslyhw03Hpdm c7nAKTpt/jxKDDkYgZb/KmwRDvOyLakBkrXLURXxRmLMcLEGd+v+XacawPLvSpfd/WKI 0d9bIevrL3vIwIIq4REXilEyv9TUn45gV5Iqc8fsUQsBCRRvQhbyi3fIi7ve8y9u8uRk y1wbGHsQM2wWcvQ+NMf+KjB4kxNuDbIgZIBqy96TEDbBQ8fzpIgj50IJC84OD1dO11eq lcbjORxxLQp8DosaItZDOxMp6CjhweHgPqN4Gxy7pRluyvcR0bLXz0I9ZBae2+3Bi4Ku 3bwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eHNHh/gm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g17-20020aa796b1000000b006b7b42fe43asi1035268pfk.185.2023.10.17.00.48.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 00:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eHNHh/gm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2E999802C934; Tue, 17 Oct 2023 00:48:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234729AbjJQHsh (ORCPT + 99 others); Tue, 17 Oct 2023 03:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234669AbjJQHsf (ORCPT ); Tue, 17 Oct 2023 03:48:35 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9660DFD for ; Tue, 17 Oct 2023 00:48:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DEFBC433C9; Tue, 17 Oct 2023 07:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697528913; bh=ULSURu0f9pF10jB8uWo7rgXsdlYUF/R9Y1q7G+/vIm4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eHNHh/gmur/uVvgbuvQjCDcpZiBcUV6ML9UhjZcjC2NCtGe4I8Zg4p4iWCs0kQzf5 UM6k4E/tTEUqScuFvyXIrwIZPr/t7PaiHmV/sXJKD2qRn89b8oclTi3BlUxSYdQ5rA oQBMNkh0LddC71ItQZzn5Pn35UcXpzBi4tNlSfYdygxRwagFgRKiRzHnqSvroDIfrz 7xSqjcBMs5+a0S/p9V2/4gqULO/BSx/HVbC5nuA4ZHbi/lNBQqOU3sMRWEIEhW76Xa JwpBs8Ke4HaMf7vMx3+re7faHHVMrJAKYYC1aKzM+4xRvTveCny8kYO7CrcN+5OYRZ h1bhxyxKi7c8w== Date: Tue, 17 Oct 2023 08:48:27 +0100 From: Conor Dooley To: Ante Knezic Cc: olteanv@gmail.com, andrew@lunn.ch, conor+dt@kernel.org, davem@davemloft.net, devicetree@vger.kernel.org, edumazet@google.com, f.fainelli@gmail.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, linux-kernel@vger.kernel.org, marex@denx.de, netdev@vger.kernel.org, pabeni@redhat.com, robh+dt@kernel.org, woojung.huh@microchip.com Subject: Re: [PATCH net-next v2 2/2] dt-bindings: net: microchip,ksz: document microchip,rmii-clk-internal Message-ID: <20231017-fading-retrial-7faebda79ebb@spud> References: <20231016103708.6ka5vxfkdatrjvdk@skbuf> <20231017073548.15050-1-ante.knezic@helmholz.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wIO3iCZ/QV7V4j5D" Content-Disposition: inline In-Reply-To: <20231017073548.15050-1-ante.knezic@helmholz.de> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 17 Oct 2023 00:48:57 -0700 (PDT) --wIO3iCZ/QV7V4j5D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 17, 2023 at 09:35:48AM +0200, Ante Knezic wrote: > > > + microchip,rmii-clk-internal: > > > + $ref: /schemas/types.yaml#/definitions/flag > > > + description: > > > + Set if the RMII reference clock is provided internally. Otherw= ise > > > + reference clock should be provided externally. > > > + > > > +if: > > > + not: > > > + properties: > > > + compatible: > > > + enum: > > > + - microchip,ksz8863 > > > + - microchip,ksz8873 > > > +then: > > > + not: > > > + required: > > > + - microchip,rmii-clk-internal I think this bit can become the slightly simpler then: properties: microchip,rmii-clk-internal: false > > I think that what you want to express is that microchip,rmii-clk-intern= al > > is only defined for microchip,ksz8863 and microchip,ksz8873. > > Can't you describe that as "if: properties: compatible: (...) then: > > properties: microchip,rmii-clk-internal"? >=20 > If I understood you correctly you are refering to a solution like > if: > properties: > compatible: > enum: > - microchip,ksz8863 > - microchip,ksz8873 > then: > properties: > microchip,rmii-clk-internal: > $ref: /schemas/types.yaml#/definitions/flag > description: > Set if the RMII reference clock is provided internally. Otherwise > reference clock should be provided externally. >=20 > This was already suggested in v1, but was not a satisfactory solution > according to Mr. Conor Dooley: Yeah, we prefer not to have the property definitions inside the conditionals, but rather constrain or allow/disallow them there. Cheers, Conor. >=20 > >> On Tue, 10 Oct 2023 16:25:55 +0100, Conor Dooley wrote: > >> > On Tue, Oct 10, 2023 at 03:18:54PM +0200, Ante Knezic wrote: > >> > > Add documentation for selecting reference rmii clock on KSZ88X3 de= vices > >> > >=20 > >> > > Signed-off-by: Ante Knezic > >> > > --- > >> > > Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml | 6 = ++++++ > >> > > 1 file changed, 6 insertions(+) > >> > >=20 > >> > > diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,k= sz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml > >> > > index e51be1ac0362..3df5d2e72dba 100644 > >> > > --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml > >> > > +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml > >> > > @@ -49,6 +49,12 @@ properties: > >> > > Set if the output SYNCLKO clock should be disabled. Do not = mix with > >> > > microchip,synclko-125. > >> > > =20 > >> > > + microchip,rmii-clk-internal: > >> > > + $ref: /schemas/types.yaml#/definitions/flag > >> > > + description: > >> > > + Set if the RMII reference clock should be provided internal= ly. > >> >=20 > >> > > Applies only > >> > > + to KSZ88X3 devices. > >> >=20 > >> > This should be enforced by the schema, the example schema in the docs > >> > should show you how to do this. > >>=20 > >> I am guessing you are refering to limiting the property to ksz88x3 dev= ices? > >> Something like: > >>=20 > >> if: > >> properties: > >> compatible: > >> enum: > >> - microchip,ksz8863 > >> - microchip,ksz8873 > >> then: > >> properties: > >> microchip,rmii-clk-internal: > >> $ref: /schemas/types.yaml#/definitions/flag > >> description: > >> Set if the RMII reference clock is provided internally. Otherw= ise > >> reference clock should be provided externally. > > > >Not quite. The definition of the property should be outside the if/then, > >but one should be used to allow/disallow the property. >=20 --wIO3iCZ/QV7V4j5D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZS48SwAKCRB4tDGHoIJi 0velAQClJ9EQ6MEhRqxPuOI8Aa3rxhaXsnRNccr4O2vn8y6vLwD/ffOYqRRz1OQ+ vAcG8dVYyfmc7/0OfyJOWaW4keCGvQM= =/J8x -----END PGP SIGNATURE----- --wIO3iCZ/QV7V4j5D--