]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 4 Jun 2019 07:34:24 +0000 (07:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2019 03:07:56 +0000 (20:07 -0700)
commit1e7aadcb9fbb7cbb4835c551b6810981a97302c8
treeb08ef587db6259666dbb41c55e3ae0f598668851
parent3e1d9b82326353b8ad5f4572a5379c171db42cdb
net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing

The 88e6250 (as well as 6220, 6071, 6070, 6020) do not support
multi-chip (indirect) addressing. However, one can still have two of
them on the same mdio bus, since the device only uses 16 of the 32
possible addresses, either addresses 0x00-0x0F or 0x10-0x1F depending
on the ADDR4 pin at reset [since ADDR4 is internally pulled high, the
latter is the default].

In order to prepare for supporting the 88e6250 and friends, introduce
mv88e6xxx_info::dual_chip to allow having a non-zero sw_addr while
still using direct addressing.

Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/smi.c