Commit Graph

3 Commits (7bef62de79fefae588a970bedab5c18a159b5539)

Author SHA1 Message Date
Pawel Dembicki c02a9a2514 ramips: mt7620: fix external PHY autopolling
The port initialisation is based on assumption that phy address and
port number is the same. SoC allow different numbers and some board
have it.

Use phy address instead the port number to make sure that correct
addresses are polled.

In situation when only one PHY with address 0x0 is conected to
port 4, autopolling is broken.

This patch make autopolling correct when port number and phy address
are different.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
5 years ago
Mathias Kresin f96c7f697f ramips: handle mdio address and switch port seperate
The phy handling code forces a phy mdio address and the switch port to
which a phy is attached to be the same. Albeit such a configuration is
used for most boards, it isn't for all.

Pass the switch port number to the ethernet phy connect functions, to
ensure the correct list entry is edited and not the list entry that
matches th phys mdio address.

Use the mdio address with mdiobus_get_phy instead of the port number,
to make sure the expected ethernet phy gets connected.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Felix Fietkau ec502cd3fe ramips: rename ethernet driver folder to the same one that upstream uses
Preparation for sharing offload code with the mediatek target through
generic files/

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago