From: Andrew Lunn Subject: Re: [PATCHv2 4/4] dt-bindings: net: dsa: add new MT7530 binding to support MT7621 Date: Tue, 15 Jan 2019 14:18:37 +0100 Message-ID: <20190115131837.GB19687@lunn.ch> References: <20190114070334.20478-1-gerg@kernel.org> <20190114070334.20478-5-gerg@kernel.org> <20190114140702.GG4635@lunn.ch> <91475ef4-2ca1-7341-7b0a-08a8c7e6ee9c@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: sean.wang@mediatek.com, bjorn@mork.no, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, rene@vdorst.com, john@phrozen.org, neil@brown.name To: Greg Ungerer Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:43571 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729046AbfAONSw (ORCPT ); Tue, 15 Jan 2019 08:18:52 -0500 Content-Disposition: inline In-Reply-To: <91475ef4-2ca1-7341-7b0a-08a8c7e6ee9c@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jan 15, 2019 at 03:07:33PM +1000, Greg Ungerer wrote: > Hi Andrew, > > On 15/1/19 12:07 am, Andrew Lunn wrote: > >On Mon, Jan 14, 2019 at 05:03:34PM +1000, gerg@kernel.org wrote: > >>From: Greg Ungerer > >> > >>Add devicetree binding to support the compatible mt7530 switch as used > >>in the MediaTek MT7621 SoC. > > > >Hi Gerg > > > >It gets messy, but could you try to indicate that core-supply and > >io-supply are not required for your new device. Currently the binding > >indicates they are required for all devices. > > Yep, good point. Are you thinking something like this? > > --- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt > +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt > @@ -3,16 +3,19 @@ Mediatek MT7530 Ethernet switch > > Required properties: > > -- compatible: Must be compatible = "mediatek,mt7530"; > +- compatible: may be compatible = "mediatek,mt7530" > + or compatible = "mediatek,mt7621" > - #address-cells: Must be 1. > - #size-cells: Must be 0. > - mediatek,mcm: Boolean; if defined, indicates that either MT7530 is the part > on multi-chip module belong to MT7623A has or the remotely standalone > chip as the function MT7623N reference board provided for. > - core-supply: Phandle to the regulator node necessary for the core power. > + (not required on mediatek,mt7621) > - io-supply: Phandle to the regulator node necessary for the I/O power. > See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt > for details for the regulator setup on these boards. > + (not required on mediatek,mt7621) > > If the property mediatek,mcm isn't defined, following property is required Hi Greg As i said, it is a bit messy. I would probably have a section: Required properties which lists all common required properties. And then a section Required properties mediatek,mt7530 With those which are required by that device. Andrew