
By default PHY address used for sunxi boards is 1. Some new boards (A20-SOM204-EVB) uses different address.
The code enables selective PHY address via menuconfig inside ARM submenu. The option has default value of 1.
Signed-off-by: Stefan Mavrodiev stefan@olimex.com --- arch/arm/mach-sunxi/Kconfig | 9 +++++++++ include/configs/sunxi-common.h | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 1fededd..034c2fd 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -838,6 +838,15 @@ config GMAC_TX_DELAY ---help--- Set the GMAC Transmit Clock Delay Chain value.
+config SUNXI_PHY_ADDR + int "PHY address" + default 1 + depends on SUN7I_GMAC + ---help--- + The default PHY address for SUNXI is 1. Change this if your PHY + is configured with different address. + + config SPL_STACK_R_ADDR default 0x4fe00000 if MACH_SUN4I default 0x4fe00000 if MACH_SUN5I diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index ee1cb39..fd68d2b 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -288,12 +288,12 @@ extern int soft_i2c_gpio_scl;
/* Ethernet support */ #ifdef CONFIG_SUN4I_EMAC -#define CONFIG_PHY_ADDR 1 +#define CONFIG_PHY_ADDR CONFIG_SUNXI_PHY_ADDR #define CONFIG_MII /* MII PHY management */ #endif
#ifdef CONFIG_SUN7I_GMAC -#define CONFIG_PHY_ADDR 1 +#define CONFIG_PHY_ADDR CONFIG_SUNXI_PHY_ADDR #define CONFIG_MII /* MII PHY management */ #define CONFIG_PHY_REALTEK #endif