aboutsummaryrefslogtreecommitdiff
path: root/board/ti
diff options
context:
space:
mode:
authorAswath Govindraju2022-01-28 13:41:38 +0530
committerTom Rini2022-02-08 11:00:03 -0500
commitb361443154fe13ebc2cf1586a26bdef04ac30ad0 (patch)
treef76f4e83d289275d362e12808baf8efd778db879 /board/ti
parentff0becea71bd3ad3933aeb17f5773750d3483e31 (diff)
board: ti: j721e: evm.c: Add support for probing SerDes0
Add support for probing, initializing and powering, SerDes0 instance. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Diffstat (limited to 'board/ti')
-rw-r--r--board/ti/j721e/evm.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 077d83420c9..ad85b9d5011 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -413,6 +413,40 @@ void configure_serdes_torrent(void)
printf("phy_power_on failed !!\n");
}
+void configure_serdes_sierra(void)
+{
+ struct udevice *dev, *lnk_dev;
+ struct phy serdes;
+ int ret, count, i;
+
+ if (!IS_ENABLED(CONFIG_PHY_CADENCE_SIERRA))
+ return;
+
+ ret = uclass_get_device_by_driver(UCLASS_PHY,
+ DM_DRIVER_GET(sierra_phy_provider),
+ &dev);
+ if (ret)
+ printf("Sierra init failed:%d\n", ret);
+
+ serdes.dev = dev;
+ serdes.id = 0;
+
+ count = device_get_child_count(dev);
+ for (i = 0; i < count; i++) {
+ ret = device_get_child(dev, i, &lnk_dev);
+ if (ret)
+ printf("probe of sierra child node %d failed\n", i);
+ }
+
+ ret = generic_phy_init(&serdes);
+ if (ret)
+ printf("phy_init failed!!\n");
+
+ ret = generic_phy_power_on(&serdes);
+ if (ret)
+ printf("phy_power_on failed !!\n");
+}
+
int board_late_init(void)
{
if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
@@ -426,6 +460,9 @@ int board_late_init(void)
if (board_is_j7200_som())
configure_serdes_torrent();
+ if (board_is_j721e_som())
+ configure_serdes_sierra();
+
return 0;
}