Subject: Re: [PATCH v1] net: dsa: qca8k: implement DT-based ports <-> phy translation

From: Florian Fainelli <[email-masked]>
Date: Tue, 5 Feb 2019 14:29:36 -0800

On 2/5/19 2:12 PM, Christian Lamparter wrote:
> On Tuesday, February 5, 2019 10:29:34 PM CET Andrew Lunn wrote:
>>> For now, I added the DT binding update to the patch as well.
>>> But if this is indeed the way to go, it'll get a separate patch.
>>
>> Hi Christian 
>>
>> You need to be careful with the DT binding. You need to keep backwards
>> compatible with it. An old DT blob needs to keep working. I don't
>> think this is true with this change.
> 
> Do you mean because of the 
> 
> -               switch0@0 {
> +               switch@10 {
>                         compatible = "qca,qca8337";
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>  
> -                       reg = <0>;
> +                       reg = <0x10>;
> 
> change?
> 
> or because I removed the phy-handles?>
> The reg = <0x10>; will be necessary regardless. Because this
> is really a bug in the existing binding example and if it is
> copied it will prevent the qca8k driver from loading. 
> This is due to a resource conflict, because there will be 
> already a "phy_port1: phy@0" registered at reg = <0>;
> So this never worked would have worked.

That part is fine, it is the removal of the phy-handle properties that
is possibly a problem, but in hindsight, I do not believe it will be a
compatibility issue. Lack of "phy-handle" property within the core DSA
layer means: utilize the switch's internal MDIO bus (ds->slave_mii_bus)
instance, which you are not removing, you are just changing how the PHYs
map to port numbers.

> Regards,
> Christian

-- 
Florian