dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude configurable
authorHolger Brunck <holger.brunck@hitachienergy.com>
Thu, 10 Feb 2022 17:48:23 +0000 (18:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Feb 2022 11:21:34 +0000 (11:21 +0000)
commit926eae604403acfa27ba5b072af458e87e634a50
treee7c52b7855cf4689ea5baee618d7f4cb13a373de
parent066c4b6ba06392e5929ea2ebd17622090b500b58
dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude configurable

The mv88e6352, mv88e6240 and mv88e6176  have a serdes interface. This patch
allows to configure the output swing to a desired value in the
phy-handle of the port. The value which is peak to peak has to be
specified in microvolts. As the chips only supports eight dedicated
values we return EINVAL if the value in the DTS does not match one of
these values.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/serdes.c
drivers/net/dsa/mv88e6xxx/serdes.h