Add support to auto-probe Torrent PHY driver for J7200
cover Add support to auto-probe Torrent PHY driver for J7200
J7200 requires U-Boot to configure the PHY unconditionally after binding. This prevents any rproc firmware to configure the PHY, preventing multi-core race conditions.
This series adds the support to auto-probe Torrent PHY driver for J7200.
Aksh Garg (2):
phy: cadence: Add optional auto-probe support
configs: j7200_evm_a72_defconfig: Enable config to auto-probe the PHY
configs/j7200_evm_a72_defconfig | 1 + drivers/phy/cadence/Kconfig | 7 +++++++ drivers/phy/cadence/phy-cadence-torrent.c | 14 ++++++++++++++ 3 files changed, 22 insertions(+)
Signature · 1 line
2.34.1
PATCH 1/2 phy: cadence: Add optional auto-probe support
Add PHY_CADENCE_TORRENT_AUTO_PROBE configuration option to support auto-probe of the Cadence Torrent PHY driver after binding. When enabled, it sets DM_FLAG_PROBE_AFTER_BIND to ensure the Torrent PHY is probed immediately after binding for the boards that require U-Boot to configure the PHY unconditionally for use by the Operating System and other runtime entities that boots later.
--- drivers/phy/cadence/Kconfig | 7 +++++++ drivers/phy/cadence/phy-cadence-torrent.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+)
drivers/phy/cadence/Kconfig +7 -0
@@ -10,6 +10,13 @@ config PHY_CADENCE_TORRENT help Enable this to support the Cadence Torrent PHY driver +config PHY_CADENCE_TORRENT_AUTO_PROBE + bool "Auto-probe Cadence Torrent PHY Driver after Binding" + depends on PHY_CADENCE_TORRENT + help + Enable this to auto-probe the Cadence Torrent PHY driver + after binding. + config SPL_PHY_CADENCE_TORRENT bool "Cadence Torrent PHY Driver" depends on SPL_DM_RESET
drivers/phy/cadence/phy-cadence-torrent.c +14 -0
@@ -592,6 +592,19 @@ static int cdns_torrent_phy_configure_multilink(struct cdns_torrent_phy *cdns_phreturn 0 ; } +static int cdns_torrent_phy_bind (struct udevice *dev) +{ +/* +* Make sure that the Cadence Torrent PHY driver gets probed +* after binding, for the boards that require U-Boot to +* configure the PHY unconditionally. +*/ +if (IS_ENABLED (CONFIG_PHY_CADENCE_TORRENT_AUTO_PROBE )) +dev_or_flags (dev,DM_FLAG_PROBE_AFTER_BIND ); + +return 0 ; +} +static int cdns_torrent_phy_probe (struct udevice *dev) {struct cdns_torrent_phy *cdns_phy =dev_get_priv (dev);
@@ -2491,6 +2504,7 @@ U_BOOT_DRIVER(torrent_phy_provider) = { .id = UCLASS_PHY, .of_match = cdns_torrent_id_table, .probe = cdns_torrent_phy_probe, + .bind = cdns_torrent_phy_bind, .remove = cdns_torrent_phy_remove, .ops = &cdns_torrent_phy_ops, .priv_auto = sizeof(struct cdns_torrent_phy),
Signature · 1 line
2.34.1
PATCH 2/2 configs: j7200_evm_a72_defconfig: Enable config to auto-probe the PHY
In reply to Aksh GargTI's J7200 EVM requires U-Boot to configure the PHY unconditionally after binding. This prevents any rproc firmware to configure the PHY, preventing multi-core race conditions.
Enable the PHY_CADENCE_TORRENT_AUTO_PROBE config for this purpose.
--- configs/j7200_evm_a72_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/j7200_evm_a72_defconfig +1 -0
@@ -158,6 +158,7 @@ CONFIG_PCIE_CDNS_TI=y CONFIG_PHY=y CONFIG_SPL_PHY=y CONFIG_PHY_CADENCE_TORRENT=y +CONFIG_PHY_CADENCE_TORRENT_AUTO_PROBE=y CONFIG_PHY_J721E_WIZ=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set
Signature · 1 line
2.34.1
Quoted 11 lines · Aksh Garg
J7200 requires U-Boot to configure the PHY unconditionally after binding. This prevents any rproc firmware to configure the PHY, preventing multi-core race conditions.
This series adds the support to auto-probe Torrent PHY driver for J7200.
Aksh Garg (2):
phy: cadence: Add optional auto-probe support
configs:j7200_evm_a72_defconfig: Enable config to auto-probe the PHY[...]
Applied to u-boot/next, thanks!
[1/2] phy: cadence: Add optional auto-probe support
commit: 920876b975202ec0d7be35da5914c02624a4e8bf
[2/2] configs: j7200_evm_a72_defconfig: Enable config to auto-probe the PHY
commit: a6d44cbaaa6955d1d3b43614a4ec4836a4bc939bSignature · 1 line
Tom