Hi Li and everyone,
I used your patch and successfully run SDK binaries on Sabre Lite from Boundary Devices. However, the ethernet PHY does not seem to work, have you tested it?
Every time enet tries to read PHY ID and it gets 0xfffffffff0 instead. In U-boot code as well as in Linux kernel, are used GPIO pins (port 6) that are missing from board_network.c in SDK.
I mean the following snippet from U-boot code for sabrelite:
iomux_v3_cfg_t const enet_pads1[] = {
(...)
/* pin 35 - 1 (PHY_AD2) on reset */
MX6Q_PAD_RGMII_RXC__GPIO_6_30 | MUX_PAD_CTRL(NO_PAD_CTRL),
/* pin 32 - 1 - (MODE0) all */
MX6Q_PAD_RGMII_RD0__GPIO_6_25 | MUX_PAD_CTRL(NO_PAD_CTRL),
/* pin 31 - 1 - (MODE1) all */
MX6Q_PAD_RGMII_RD1__GPIO_6_27 | MUX_PAD_CTRL(NO_PAD_CTRL),
/* pin 28 - 1 - (MODE2) all */
MX6Q_PAD_RGMII_RD2__GPIO_6_28 | MUX_PAD_CTRL(NO_PAD_CTRL),
/* pin 27 - 1 - (MODE3) all */
MX6Q_PAD_RGMII_RD3__GPIO_6_29 | MUX_PAD_CTRL(NO_PAD_CTRL),
/* pin 33 - 1 - (CLK125_EN) 125Mhz clockout enabled */
MX6Q_PAD_RGMII_RX_CTL__GPIO_6_24 | MUX_PAD_CTRL(NO_PAD_CTRL),
(...)
}
Are these pins configured somewhere else in the SDK, or should they be added?
I added the following to imx_enet_iomux(void) definition but without success:
#ifdef BOARD_SABRE_LITE
gpio_set_gpio(GPIO_PORT6, 30);
gpio_set_gpio(GPIO_PORT6, 25);
gpio_set_gpio(GPIO_PORT6, 27);
gpio_set_gpio(GPIO_PORT6, 28);
gpio_set_gpio(GPIO_PORT6, 29);
gpio_set_gpio(GPIO_PORT6, 24);
gpio_set_direction(GPIO_PORT6, 30, GPIO_GDIR_OUTPUT);
gpio_set_direction(GPIO_PORT6, 25, GPIO_GDIR_OUTPUT);
gpio_set_direction(GPIO_PORT6, 27, GPIO_GDIR_OUTPUT);
gpio_set_direction(GPIO_PORT6, 28, GPIO_GDIR_OUTPUT);
gpio_set_direction(GPIO_PORT6, 29, GPIO_GDIR_OUTPUT);
gpio_set_direction(GPIO_PORT6, 24, GPIO_GDIR_OUTPUT);
gpio_set_level(GPIO_PORT6, 30, GPIO_HIGH_LEVEL);
gpio_set_level(GPIO_PORT6, 25, GPIO_HIGH_LEVEL);
gpio_set_level(GPIO_PORT6, 27, GPIO_HIGH_LEVEL);
gpio_set_level(GPIO_PORT6, 28, GPIO_HIGH_LEVEL);
gpio_set_level(GPIO_PORT6, 29, GPIO_HIGH_LEVEL);
gpio_set_level(GPIO_PORT6, 24, GPIO_HIGH_LEVEL);
#endif
It does not help, I still get the output like this (three lines are added by me to see the value read from iim registers):
imx_enet_phy_init: value = 0x0000ffff
imx_enet_phy_init: value = 0x0000ffff
imx_enet_phy_init: id = 0xfffffff0
[Warning] ENET not connect right PHY: ID=fffffff0
Have you got any suggestions?
Best regards,
Rafal