Hello zhq li,
The address of TBI PHY is set in eTSECx_TBIPA, in u-boot TSEC device driver assigns the address 0x1f to TBI PHYS.
In include/tsec.h
#ifndef CONFIG_SYS_TBIPA_VALUE
# define CONFIG_SYS_TBIPA_VALUE 0x1f
#endif
In drivers/net/tsec.c.
priv->regs = tsec_info->regs;
priv->phyregs_sgmii = tsec_info->miiregs_sgmii;
priv->phyaddr = tsec_info->phyaddr;
priv->tbiaddr = CONFIG_SYS_TBIPA_VALUE;
priv->flags = tsec_info->flags;
You could refer to ls1021aqds definition.
In include/configs/ls1021aqds.h
#ifdef CONFIG_FSL_SGMII_RISER
#define CONFIG_SYS_TBIPA_VALUE 8
#endif
In Linux Kernel arch/arm/boot/dts/ls1021a-qds.dts
&mdio0 {
tbi0: tbi-phy@8 {
reg = <0x8>;
device_type = "tbi-phy";
};
};
Thanks,
Yiping