Re: [meta-xilinx] macb.c and DT: detect/scan PHY address for a single mdio

2018-07-19 Thread Oleg K Dzhimiev
Mike,

Thanks. Will double check with reg=<0x0> - though expecting the same effect
as having it undefined.
Meanwhile I've found AR# 69132
 - looks exactly what is
needed - it just hasn't made it to the linux-xlnx yet.

Thanks again,
Oleg

On Thu, Jul 19, 2018 at 3:22 AM Mike Looijmans 
wrote:

> "0" is not a valid address for a PHY, it's the "broadcast" address on the
> MDIO
> bus. You should make your hardware designer who selected it hurt somewhere
> painful.
>
> Having said that, address 0 usally happens to work if there's only one PHY
> on
> that bus, since it will be the only one responding to that broadcast.
>
> Change reg = <0x3> to reg = <0x0> in the devicetree. You can optionally
> change
> the descriptions as well, but it's the "reg" that really matters. This
> might
> work on the board with address "3" because that will also respond to the
> broadcast address 0.
>
>
>
> On 18-07-18 03:12, Oleg K Dzhimiev wrote:
> > Hi,
> >
> > How do I keep the device tree compatible across the board revisions if
> phy
> > addrs are different?
> > We got a new board revision with a different phy reg, where old rev reg
> ==
> > 0x3, new rev reg == 0x0.
> >
> > Here's the DT:
> >
> > ps7_ethernet_0: ps7-ethernet@e000b000 {
> > local-mac-address = [00 0e 64 10 00 00];
> > phy-handle = <&phy3>;
> > phy-mode = "rgmii-id";
> > mdio {
> > #address-cells = <1>;
> > #size-cells = <0>;
> > phy3: phy@3 {
> >  /* Atheros 8035 */
> >  compatible =
> > "ethernet-phy-id004d.d072";
> > /* compatible = "ethernet-phy-ieee802.3-c22";*/
> > device_type = "ethernet-phy";
> > reg = <0x3>;
> > };
> > };
> > };
> >
> >
> > So far, with the old revision (addr==0x3) I have tried to remove 'reg'
> hoping
> > it would do some sort of scanning but the macb driver (macb_mii_probe)
> > registers 32 phy structs then picks the first one (addr==0) and timeouts
> > trying to reset it.
> >
> > Thanks,
> >
> > Oleg Dzhimiev
> > Electronics Engineer
> > phone: +1 801 783  x124
> > Elphel, Inc.
> >
> >
>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] macb.c and DT: detect/scan PHY address for a single mdio

2018-07-19 Thread Mike Looijmans
"0" is not a valid address for a PHY, it's the "broadcast" address on the MDIO 
bus. You should make your hardware designer who selected it hurt somewhere 
painful.


Having said that, address 0 usally happens to work if there's only one PHY on 
that bus, since it will be the only one responding to that broadcast.


Change reg = <0x3> to reg = <0x0> in the devicetree. You can optionally change 
the descriptions as well, but it's the "reg" that really matters. This might 
work on the board with address "3" because that will also respond to the 
broadcast address 0.




On 18-07-18 03:12, Oleg K Dzhimiev wrote:

Hi,

How do I keep the device tree compatible across the board revisions if phy 
addrs are different?
We got a new board revision with a different phy reg, where old rev reg == 
0x3, new rev reg == 0x0.


Here's the DT:

ps7_ethernet_0: ps7-ethernet@e000b000 {
local-mac-address = [00 0e 64 10 00 00];
phy-handle = <&phy3>;
phy-mode = "rgmii-id";
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy3: phy@3 {
                                         /* Atheros 8035 */
                                         compatible =
"ethernet-phy-id004d.d072";
/* compatible = "ethernet-phy-ieee802.3-c22";*/
device_type = "ethernet-phy";
reg = <0x3>;
};
};
};


So far, with the old revision (addr==0x3) I have tried to remove 'reg' hoping 
it would do some sort of scanning but the macb driver (macb_mii_probe) 
registers 32 phy structs then picks the first one (addr==0) and timeouts 
trying to reset it.


Thanks,

Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783  x124
Elphel, Inc.




--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] macb.c and DT: detect/scan PHY address for a single mdio

2018-07-17 Thread Oleg K Dzhimiev
Hi,

How do I keep the device tree compatible across the board revisions if phy
addrs are different?
We got a new board revision with a different phy reg, where old rev reg ==
0x3, new rev reg == 0x0.

Here's the DT:

> ps7_ethernet_0: ps7-ethernet@e000b000 {
> local-mac-address = [00 0e 64 10 00 00];
> phy-handle = <&phy3>;
> phy-mode = "rgmii-id";
> mdio {
> #address-cells = <1>;
> #size-cells = <0>;
> phy3: phy@3 {
> /* Atheros 8035 */
> compatible =
> "ethernet-phy-id004d.d072";
> /* compatible = "ethernet-phy-ieee802.3-c22";*/
> device_type = "ethernet-phy";
> reg = <0x3>;
> };
> };
> };


So far, with the old revision (addr==0x3) I have tried to remove 'reg'
hoping it would do some sort of scanning but the macb driver
(macb_mii_probe) registers 32 phy structs then picks the first one
(addr==0) and timeouts trying to reset it.

Thanks,

Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783  x124
Elphel, Inc.
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx