[PATCH v2 0/3] J721E: Fix initialization of QSGMII PHY

The following series of patches, - Fix the initialization of QSGMII PHY such that it is only applicable to J721E EVM - Remove the default setting of dorprocboot - Add boot_rprocs command in the GP bootcmd - Add phy initialization command in hs bootcmd
Changes since v1: - Add checks such that the QSGMII PHY initialization is only applicable for J721E EVM - Rearranged the order of PHY initialization and boot_rpocs in the bootcmd - Added reported-bys - Split the fix into two patches.
Aswath Govindraju (3): include: configs: j721e_evm.h: Fix the env variable corresponding to QSGMII PHY init configs: j721e_evm_a72_defconfig: Fix the bootcmd configs: j721e_hs_evm_a72_defconfig: Add command for initializing QSGMII PHY
configs/j721e_evm_a72_defconfig | 2 +- configs/j721e_hs_evm_a72_defconfig | 2 +- include/configs/j721e_evm.h | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-)

QSGMII PHY initialization should only be done for J721E EVMs and not for J721E-SK boards. Therefore, fix the environment variables accordingly.
Also, by default remote processors should not be booted in U-Boot but rather be left to the users to enable this by setting dorprocboot. Therefore, remove dorprocboot that is being set by default.
Fixes: 5980925e2a5a ("include: configs: j721e_evm: Add support to boot ethfw core in j721e") Reported-by: Suman Anna s-anna@ti.com Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- include/configs/j721e_evm.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index e4b167dd219d..5aaa31eaa152 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -122,9 +122,8 @@ "partitions=" PARTS_DEFAULT
/* Set the default list of remote processors to boot */ -#if defined(CONFIG_TARGET_J721E_A72_EVM) || defined(CONFIG_TARGET_J7200_A72_EVM) +#if defined(CONFIG_TARGET_J7200_A72_EVM) #define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY \ - "dorprocboot=1\0" \ "do_main_cpsw0_qsgmii_phyinit=1\0" \ "init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;" \ "gpio clear gpio@22_16\0" \ @@ -136,6 +135,22 @@ #ifdef DEFAULT_RPROCS #undef DEFAULT_RPROCS #endif +#elif defined(CONFIG_TARGET_J721E_A72_EVM) +#define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY \ + "init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;" \ + "gpio clear gpio@22_16\0" \ + "main_cpsw0_qsgmii_phyinit=" \ + "if test $board_name = J721EX-PM1-SOM || test $board_name = J721EX-PM2-SOM " \ + "|| test $board_name = j721e; then " \ + "do_main_cpsw0_qsgmii_phyinit=1; else " \ + "do_main_cpsw0_qsgmii_phyinit=0; fi;" \ + "if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && " \ + "test ${boot} = mmc; then " \ + "run init_main_cpsw0_qsgmii_phy;" \ + "fi;\0" +#ifdef DEFAULT_RPROCS +#undef DEFAULT_RPROCS +#endif #endif
#ifdef CONFIG_TARGET_J721E_A72_EVM

On Tue, Feb 22, 2022 at 10:49:03AM +0530, Aswath Govindraju wrote:
QSGMII PHY initialization should only be done for J721E EVMs and not for J721E-SK boards. Therefore, fix the environment variables accordingly.
Also, by default remote processors should not be booted in U-Boot but rather be left to the users to enable this by setting dorprocboot. Therefore, remove dorprocboot that is being set by default.
Fixes: 5980925e2a5a ("include: configs: j721e_evm: Add support to boot ethfw core in j721e") Reported-by: Suman Anna s-anna@ti.com Signed-off-by: Aswath Govindraju a-govindraju@ti.com
Applied to u-boot/next, thanks!

Add the command "boot_rprocs" that is required for booting remote processors in U-Boot.
Fixes: 5980925e2a5a ("include: configs: j721e_evm: Add support to boot ethfw core in j721e") Reported-by: Jesse Villarreal jesse.villarreal@ti.com Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- configs/j721e_evm_a72_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index b843a84415b1..7929e2226909 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -29,7 +29,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 # CONFIG_USE_SPL_FIT_GENERATOR is not set -CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" +CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" CONFIG_LOGLEVEL=7 CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y

On Tue, Feb 22, 2022 at 10:49:04AM +0530, Aswath Govindraju wrote:
Add the command "boot_rprocs" that is required for booting remote processors in U-Boot.
Fixes: 5980925e2a5a ("include: configs: j721e_evm: Add support to boot ethfw core in j721e") Reported-by: Jesse Villarreal jesse.villarreal@ti.com Signed-off-by: Aswath Govindraju a-govindraju@ti.com
Applied to u-boot/next, thanks!

QSGMII PHY present on the j721e common processor board requires to be initialized before the core boots up. Therefore, run the corresponding command during boot to do the same.
Signed-off-by: Aswath Govindraju a-govindraju@ti.com --- configs/j721e_hs_evm_a72_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/j721e_hs_evm_a72_defconfig b/configs/j721e_hs_evm_a72_defconfig index ae184b035878..c37c20a91b08 100644 --- a/configs/j721e_hs_evm_a72_defconfig +++ b/configs/j721e_hs_evm_a72_defconfig @@ -30,7 +30,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y # CONFIG_USE_SPL_FIT_GENERATOR is not set -CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; run get_fit_${boot}; run get_overlaystring; run run_fit" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; run get_fit_${boot}; run get_overlaystring; run run_fit" CONFIG_LOGLEVEL=7 CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y

On Tue, Feb 22, 2022 at 10:49:05AM +0530, Aswath Govindraju wrote:
QSGMII PHY present on the j721e common processor board requires to be initialized before the core boots up. Therefore, run the corresponding command during boot to do the same.
Signed-off-by: Aswath Govindraju a-govindraju@ti.com
Applied to u-boot/next, thanks!
participants (2)
-
Aswath Govindraju
-
Tom Rini