Hi,
AM335x EVMs use only MII and RGMII and then there is no sample codes for RMII. But, I try to use two RMII PHYs and so wonder if our EZSDK supports RMII also without issue.
below are source codes for RGMII on U-boot and Kernel.
<current SK board configuration>
-U-boot
/* MII mode defines */
#define MII_MODE_ENABLE 0x0
#define RGMII_MODE_ENABLE 0x3A
writel(RGMII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
PHY_INTERFACE_MODE_RGMII;
-Kernel-
am33xx_cpsw_init(AM33XX_CPSW_MODE_RGMII, NULL, NULL);
For RMII, I guess that PHY_INTERFACE_MODE_RMII & AM33XX_CPSW_MODE_RMII should be used(I could find this variables in the source codes).
However, RMII_MODE_ENABLE is not defined in board.c of U-boot. From TRM, it will be 0x3F.
9.3.31 gmii_sel Register (offset = 650h) [reset = 0h]
So I wonder if these are all we have to do for RMII mode. Please confirm it.
<my modification for RMII>
-U-boot
#define RMII_MODE_ENABLE 0x3f
writel(RMII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
PHY_INTERFACE_MODE_RMII;
-Kernel-
<pinmux modification....>
am33xx_cpsw_init(AM33XX_CPSW_MODE_RMII, NULL, NULL);
Thanks,
Devin