Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: cadence-torrent: Add delay for PIPE clock to be stable

The Torrent spec specifies delay of 660.5us after phy_reset is
asserted by the controller. To be on the safe side provide a delay
of 5ms to 10ms in ->phy_on() callback where the SERDES is already
configured in bootloader.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Link: https://lore.kernel.org/r/20210330110138.24356-6-kishon@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Kishon Vijay Abraham I and committed by
Vinod Koul
b20da3c6 e0611d6d

+9
+9
drivers/phy/cadence/phy-cadence-torrent.c
··· 371 371 .owner = THIS_MODULE, 372 372 }; 373 373 374 + static int cdns_torrent_noop_phy_on(struct phy *phy) 375 + { 376 + /* Give 5ms to 10ms delay for the PIPE clock to be stable */ 377 + usleep_range(5000, 10000); 378 + 379 + return 0; 380 + } 381 + 374 382 static const struct phy_ops noop_ops = { 383 + .power_on = cdns_torrent_noop_phy_on, 375 384 .owner = THIS_MODULE, 376 385 }; 377 386