public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: nm@ti.com, robertcnelson@gmail.com, trini@konsulko.com, marex@denx.de
Cc: n-francis@ti.com, praneeth@ti.com, s-vadapalli@ti.com,
	r-gunasekaran@ti.com, srk@ti.com, vigneshr@ti.com,
	u-boot@lists.denx.de, Roger Quadros <rogerq@kernel.org>
Subject: [PATCH 1/5] board: ti: j721e: Drop SERDES PHY init from board file
Date: Fri, 12 Jan 2024 14:49:47 +0200	[thread overview]
Message-ID: <20240112124951.238098-2-rogerq@kernel.org> (raw)
In-Reply-To: <20240112124951.238098-1-rogerq@kernel.org>

Since commit 69b19ca67bcb ("arm: dts: k3-j721e: Sync with v6.6-rc1"),
the following error message is seen at u-boot
	"Sierra init failed:-19"

Probing and initializing the SERDES PHY from
board file is not a clean solution so drop it.

Proper use case should be via PHY_UCLASS APIs.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 board/ti/j721e/evm.c | 77 --------------------------------------------
 1 file changed, 77 deletions(-)

diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index c541880107..b77cffc5ef 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -352,77 +352,6 @@ static int probe_daughtercards(void)
 }
 #endif
 
-void configure_serdes_torrent(void)
-{
-	struct udevice *dev;
-	struct phy serdes;
-	int ret;
-
-	if (!IS_ENABLED(CONFIG_PHY_CADENCE_TORRENT))
-		return;
-
-	ret = uclass_get_device_by_driver(UCLASS_PHY,
-					  DM_DRIVER_GET(torrent_phy_provider),
-					  &dev);
-	if (ret) {
-		printf("Torrent init failed:%d\n", ret);
-		return;
-	}
-
-	serdes.dev = dev;
-	serdes.id = 0;
-
-	ret = generic_phy_init(&serdes);
-	if (ret) {
-		printf("phy_init failed!!: %d\n", ret);
-		return;
-	}
-
-	ret = generic_phy_power_on(&serdes);
-	if (ret) {
-		printf("phy_power_on failed!!: %d\n", ret);
-		return;
-	}
-}
-
-void configure_serdes_sierra(void)
-{
-	struct udevice *dev, *link_dev;
-	struct phy link;
-	int ret, count, i;
-	int link_count = 0;
-
-	if (!IS_ENABLED(CONFIG_PHY_CADENCE_SIERRA))
-		return;
-
-	ret = uclass_get_device_by_driver(UCLASS_MISC,
-					  DM_DRIVER_GET(sierra_phy_provider),
-					  &dev);
-	if (ret) {
-		printf("Sierra init failed:%d\n", ret);
-		return;
-	}
-
-	count = device_get_child_count(dev);
-	for (i = 0; i < count; i++) {
-		ret = device_get_child(dev, i, &link_dev);
-		if (ret) {
-			printf("probe of sierra child node %d failed: %d\n", i, ret);
-			return;
-		}
-		if (link_dev->driver->id == UCLASS_PHY) {
-			link.dev = link_dev;
-			link.id = link_count++;
-
-			ret = generic_phy_power_on(&link);
-			if (ret) {
-				printf("phy_power_on failed!!: %d\n", ret);
-				return;
-			}
-		}
-	}
-}
-
 #ifdef CONFIG_BOARD_LATE_INIT
 static void setup_board_eeprom_env(void)
 {
@@ -476,12 +405,6 @@ int board_late_init(void)
 			probe_daughtercards();
 	}
 
-	if (board_is_j7200_som())
-		configure_serdes_torrent();
-
-	if (board_is_j721e_som())
-		configure_serdes_sierra();
-
 	return 0;
 }
 #endif
-- 
2.34.1


  reply	other threads:[~2024-01-12 12:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 12:49 [PATCH 0/5] k3-j721e: beagleboneai: Fix USB Roger Quadros
2024-01-12 12:49 ` Roger Quadros [this message]
2024-01-12 12:49 ` [PATCH 2/5] usb: cdns3: avoid error messages if phys don't exist Roger Quadros
2024-01-12 12:49 ` [PATCH 3/5] arm: dts: k3-j721e: Fix USB0 operation Roger Quadros
2024-01-12 12:49 ` [PATCH 4/5] arm: dts: k3-j721e-beagleboneai64: Fix USB operation Roger Quadros
2024-01-12 13:02   ` Nishanth Menon
2024-01-12 13:06     ` Roger Quadros
2024-01-12 13:14       ` Nishanth Menon
2024-01-12 13:21         ` Tom Rini
2024-01-15 11:40           ` Roger Quadros
2024-01-20 16:50             ` Tom Rini
2024-01-22 11:39               ` Roger Quadros
2024-01-22 16:00                 ` Tom Rini
2024-01-12 12:49 ` [PATCH 5/5] configs/j721e_beagleboneai64_a72_defconfig: Enable Sierra PHY Roger Quadros
2024-01-20 21:04 ` [PATCH 0/5] k3-j721e: beagleboneai: Fix USB Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240112124951.238098-2-rogerq@kernel.org \
    --to=rogerq@kernel.org \
    --cc=marex@denx.de \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=r-gunasekaran@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox