net: ti: icssg-prueth: Add support for half duplex operation
authorMD Danish Anwar <danishanwar@ti.com>
Wed, 13 Sep 2023 09:10:11 +0000 (14:40 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Sep 2023 12:54:34 +0000 (13:54 +0100)
commit0a205f0fe8dd2ab80531b54f01d6483f37120c0e
tree1897949d72b10916504d6a9872a226b9469c3881
parent927c568d62128f48d6646d6df801c1ae25cf139f
net: ti: icssg-prueth: Add support for half duplex operation

This patch adds support for half duplex operation at 10M and 100M link
speeds for AM654x/AM64x devices.
- Driver configures rand_seed, a random number, in DMEM HD_RAND_SEED_OFFSET
field, which will be used by firmware for Back off time calculation.
- Driver informs FW about half duplex link operation in DMEM
PORT_LINK_SPEED_OFFSET field by setting bit 7 for 10/100M HD.

Hence, the half duplex operation depends on board design the
"ti,half-duplex-capable" property has to be enabled for ICSS-G ports if HW
is capable to perform half duplex.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/icssg/icssg_config.c
drivers/net/ethernet/ti/icssg/icssg_prueth.c
drivers/net/ethernet/ti/icssg/icssg_prueth.h