netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
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
Subject: Re: [PATCHv2 4/4] dt-bindings: net: dsa: add new MT7530 binding to support MT7621
Date: Thu, 17 Jan 2019 15:17:30 +1000	[thread overview]
Message-ID: <e9439cb1-43e4-75ed-98f3-26ae3b470342@kernel.org> (raw)
In-Reply-To: <20190116161256.GF29244@lunn.ch>

Hi Andrew,

On 17/1/19 2:12 am, Andrew Lunn wrote:
> On Wed, Jan 16, 2019 at 11:14:30PM +1000, Greg Ungerer wrote:
>> Hi Andrew,
>>
>> On 15/1/19 11:18 pm, Andrew Lunn wrote:
>> [snip]
>>> 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.
>>
>>
>> Ok, I see what you mean.
>> The simplest approach is something like this:
>>
>> diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
>> index aa3527f71fdc..47aa205ee0bd 100644
>> --- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt
>> +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
>> @@ -3,12 +3,16 @@ 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.
>> +
>> +If compatible mediatek,mt7530 is set then the following properties are required
>> +
>>   - core-supply: Phandle to the regulator node necessary for the core power.
>>   - io-supply: Phandle to the regulator node necessary for the I/O power.
>>   	See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> 
> Yes, that looks good.
> 
>>
>>
>> That leaves the existing if/else with other bindings in place after this.
>>
>> Maybe I am mis-reading the mt7530.c code but I am not entirely sure that
>> "reset-gpios" is actually required for the mediatek,mcm not defined case -
>> it is optional. (And I actually don't define it for my mt7621 case where
>> mediatek,mcm is not defined).
> 
> The gpio seems to be optional in general, any only used for
> device other than mediatek,mcm.
> 
> The reset controller is required for mediatek,mcm, but not others.
> 
> So it looks like the binding document needs a few fixes :-(

Yep.. Thanks for the feedback though. I'll roll a v3.

Regards
Greg





      reply	other threads:[~2019-01-17  5:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  7:03 [PATCHv2 0/4]: net: dsa: mt7530: support MT7530 in the MT7621 So gerg
2019-01-14  7:03 ` [PATCHv2 1/4] net: ethernet: mediatek: support MT7621 SoC ethernet hardware gerg
2019-01-14  7:03 ` [PATCHv2 2/4] net: ethernet: mediatek: do not force autonegiation at init gerg
2019-01-14 12:55   ` René van Dorst
2019-01-15  4:51     ` Greg Ungerer
2019-01-14  7:03 ` [PATCHv2 3/4] net: dsa: mt7530: support the 7530 switch on the Mediatek MT7621 SoC gerg
2019-01-14  7:03 ` [PATCHv2 4/4] dt-bindings: net: dsa: add new MT7530 binding to support MT7621 gerg
2019-01-14 14:07   ` Andrew Lunn
2019-01-15  5:07     ` Greg Ungerer
2019-01-15 13:18       ` Andrew Lunn
2019-01-16 13:14         ` Greg Ungerer
2019-01-16 16:12           ` Andrew Lunn
2019-01-17  5:17             ` Greg Ungerer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9439cb1-43e4-75ed-98f3-26ae3b470342@kernel.org \
    --to=gerg@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=f.fainelli@gmail.com \
    --cc=john@phrozen.org \
    --cc=neil@brown.name \
    --cc=netdev@vger.kernel.org \
    --cc=rene@vdorst.com \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).