Re: [PATCH] ARM: dts: BCM5301X: Change Ethernet switch management port

From: Florian Fainelli
Date: Wed Feb 13 2019 - 12:24:38 EST


On 2/13/19 12:07 AM, RafaÅ MiÅecki wrote:
> On 13.02.2019 05:25, Florian Fainelli wrote:
>> BCM5301X has 3 Ethernet controllers: GMAC0, 1, 2 which map to ports 5, 7
>> and 8 respectively of the internal switch. Future changes will turn on
>> management mode in the Ethernet switch driver (b53) which will require
>> us to use port 8.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
>> ---
>> Â arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 11 ++++++++---
>> Â 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
>> b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
>> index 3fced3b7f1a8..affa9cc7422d 100644
>> --- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
>> +++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
>> @@ -150,10 +150,15 @@
>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ label = "wan";
>> ÂÂÂÂÂÂÂÂÂ };
>> Â -ÂÂÂÂÂÂÂ port@5 {
>> -ÂÂÂÂÂÂÂÂÂÂÂ reg = <5>;
>> +ÂÂÂÂÂÂÂ port@8 {
>> +ÂÂÂÂÂÂÂÂÂÂÂ reg = <8>;
>> ÂÂÂÂÂÂÂÂÂÂÂÂÂ label = "cpu";
>> -ÂÂÂÂÂÂÂÂÂÂÂ ethernet = <&gmac0>;
>> +ÂÂÂÂÂÂÂÂÂÂÂ ethernet = <&gmac2>;
>> +
>> +ÂÂÂÂÂÂÂÂÂÂÂ fixed-link {
>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ speed = <1000>;
>> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ full-duplex;
>> +ÂÂÂÂÂÂÂÂÂÂÂ };
>> ÂÂÂÂÂÂÂÂÂ };
>> ÂÂÂÂÂ };
>> Â };
>
> I'm not exactly sure how Linux switch driver works, but from DT
> perspective I think we should rather have *hardware* described instead
> of a common Linux case.
>
> If I'm right, we should rather have all 3 switch ports described (5, 7,
> 8) and have Linux just use the one it needs.

Yes, let's do that.
--
Florian