From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v2 05/11] dt-bindings: net: sun4i-emac: Convert the binding to a schemas Date: Mon, 10 Jun 2019 16:55:46 +0200 Message-ID: <20190610145546.4xz7hdh3gk6vjrbx@flea> References: <91618c7e9a5497462afa74c6d8a947f709f54331.1560158667.git-series.maxime.ripard@bootlin.com> <20190610143139.GG28724@lunn.ch> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2hk2wdgp2lluy5gd" Return-path: Content-Disposition: inline In-Reply-To: <20190610143139.GG28724@lunn.ch> Sender: netdev-owner@vger.kernel.org To: Andrew Lunn Cc: Mark Rutland , Rob Herring , Frank Rowand , "David S . Miller" , Chen-Yu Tsai , Maxime Coquelin , Alexandre Torgue , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Chevallier , Antoine =?utf-8?Q?T=C3=A9nart?= , Florian Fainelli , Heiner Kallweit List-Id: devicetree@vger.kernel.org --2hk2wdgp2lluy5gd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Andrew, On Mon, Jun 10, 2019 at 04:31:39PM +0200, Andrew Lunn wrote: > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + - phy > > + - allwinner,sram > > Quoting ethernet.txt: > > - phy: the same as "phy-handle" property, not recommended for new bindings. > - phy-handle: phandle, specifies a reference to a node representing a PHY > device; this property is described in the Devicetree Specification and so > preferred; > > Can this be expressed in Yaml? Accept phy, but give a warning. Accept > phy-handle without a warning? Enforce that one or the other is > present? This is what we should be aiming for, yes, but right now we don't really have a way to express that for properties. The next specification of the schema spec seems to address that, and it should be released pretty soon, so it's always something that we can address later on, when it will be out. For that particular case, we can also work around it by requiring phy-handle instead of phy. That way, if phy-handle is missing we will have a warning. phy will not be validated though, which is kind of a shame, but still much better than what we currently have. Maxime --2hk2wdgp2lluy5gd--