phy: xilinx: zynqmp: Fix bus width setting for SGMII
authorRobert Hancock <robert.hancock@calian.com>
Wed, 26 Jan 2022 00:16:00 +0000 (18:16 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:54:23 +0000 (12:54 +0100)
commit39bf132a6ed584e57a92012afc20d362a3a8f6c9
treeee529fab613ce5c2d4174b5fb8de13c3a9ae2e87
parent108868dae2ee352764c3e446450368d4fa4bf3d3
phy: xilinx: zynqmp: Fix bus width setting for SGMII

[ Upstream commit 37291f60d0822f191748c2a54ce63b0bc669020f ]

TX_PROT_BUS_WIDTH and RX_PROT_BUS_WIDTH are single registers with
separate bit fields for each lane. The code in xpsgtr_phy_init_sgmii was
not preserving the existing register value for other lanes, so enabling
the PHY in SGMII mode on one lane zeroed out the settings for all other
lanes, causing other PS-GTR peripherals such as USB3 to malfunction.

Use xpsgtr_clr_set to only manipulate the desired bits in the register.

Fixes: 4a33bea00314 ("phy: zynqmp: Add PHY driver for the Xilinx ZynqMP Gigabit Transceiver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20220126001600.1592218-1-robert.hancock@calian.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/xilinx/phy-zynqmp.c