diff --git a/arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi b/arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi index 173b492cd9..7832c9ab53 100644 --- a/arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi +++ b/arch/arm/dts/logicpd-som-lv-35xx-devkit-u-boot.dtsi @@ -15,6 +15,16 @@ /delete-property/ serial1; /delete-property/ serial2; }; + + ethernet@08000000 { + compatible = "smsc,lan9221","smsc,lan9115"; + reg = <0x08000000 0xff>; + bank-width = <2>; + vddvario-supply = <&vddvario>; + vdd33a-supply = <&vdd33a>; + reg-io-width = <4>; + smsc,save-mac-address; + }; }; &gpio1 { diff --git a/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi b/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi index 173b492cd9..7832c9ab53 100644 --- a/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi +++ b/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi @@ -15,6 +15,16 @@ /delete-property/ serial1; /delete-property/ serial2; }; + + ethernet@08000000 { + compatible = "smsc,lan9221","smsc,lan9115"; + reg = <0x08000000 0xff>; + bank-width = <2>; + vddvario-supply = <&vddvario>; + vdd33a-supply = <&vdd33a>; + reg-io-width = <4>; + smsc,save-mac-address; + }; }; &gpio1 { diff --git a/arch/arm/dts/logicpd-torpedo-35xx-devkit-u-boot.dtsi b/arch/arm/dts/logicpd-torpedo-35xx-devkit-u-boot.dtsi index 581247def0..89b20be38c 100644 --- a/arch/arm/dts/logicpd-torpedo-35xx-devkit-u-boot.dtsi +++ b/arch/arm/dts/logicpd-torpedo-35xx-devkit-u-boot.dtsi @@ -15,6 +15,16 @@ /delete-property/ serial1; /delete-property/ serial2; }; + + ethernet@08000000 { + compatible = "smsc,lan9221","smsc,lan9115"; + reg = <0x08000000 0xff>; + bank-width = <2>; + vddvario-supply = <&vddvario>; + vdd33a-supply = <&vdd33a>; + reg-io-width = <4>; + smsc,save-mac-address; + }; }; &gpio1 { diff --git a/arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi b/arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi index 9b709c147c..e56666e4bc 100644 --- a/arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi +++ b/arch/arm/dts/logicpd-torpedo-37xx-devkit-u-boot.dtsi @@ -11,6 +11,18 @@ /delete-property/ serial1; /delete-property/ serial2; }; + + ethernet@08000000 { + compatible = "smsc,lan9221","smsc,lan9115"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x08000000 0xff>; + bank-width = <2>; + vddvario-supply = <&vddvario>; + vdd33a-supply = <&vdd33a>; + reg-io-width = <4>; + smsc,save-mac-address; + }; }; &i2c1 { diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index 21d8a21010..50572c6a71 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -58,6 +57,8 @@ DECLARE_GLOBAL_DATA_PTR; #define LOGIC_MT28_OMAP35_ASYNC_GPMC_CONFIG6 0x09030000 #define LOGIC_MT28_OMAP35_ASYNC_GPMC_CONFIG7 0x00000C50 +#define CONFIG_SMC911X_BASE 0x08000000 + #ifdef CONFIG_SPL_OS_BOOT int spl_start_uboot(void) { @@ -204,11 +205,28 @@ static void unlock_nand(void) nand_unlock(mtd, 0, mtd->size, 0); } +#ifdef CONFIG_SMC911X +/* GPMC CS1 settings for Logic SOM LV/Torpedo LAN92xx Ethernet chip */ +static const u32 gpmc_lan92xx_config[] = { + NET_LAN92XX_GPMC_CONFIG1, + NET_LAN92XX_GPMC_CONFIG2, + NET_LAN92XX_GPMC_CONFIG3, + NET_LAN92XX_GPMC_CONFIG4, + NET_LAN92XX_GPMC_CONFIG5, + NET_LAN92XX_GPMC_CONFIG6, +}; +#endif + int board_late_init(void) { #ifdef CONFIG_CMD_NAND_LOCK_UNLOCK unlock_nand(); #endif + +#ifdef CONFIG_SMC911X + enable_gpmc_cs_config(gpmc_lan92xx_config, &gpmc_cfg->cs[1], + CONFIG_SMC911X_BASE, GPMC_SIZE_16M); +#endif return 0; } #endif @@ -219,23 +237,3 @@ void board_mmc_power_init(void) twl4030_power_mmc_init(0); } #endif - -#ifdef CONFIG_SMC911X -/* GPMC CS1 settings for Logic SOM LV/Torpedo LAN92xx Ethernet chip */ -static const u32 gpmc_lan92xx_config[] = { - NET_LAN92XX_GPMC_CONFIG1, - NET_LAN92XX_GPMC_CONFIG2, - NET_LAN92XX_GPMC_CONFIG3, - NET_LAN92XX_GPMC_CONFIG4, - NET_LAN92XX_GPMC_CONFIG5, - NET_LAN92XX_GPMC_CONFIG6, -}; - -int board_eth_init(bd_t *bis) -{ - enable_gpmc_cs_config(gpmc_lan92xx_config, &gpmc_cfg->cs[1], - CONFIG_SMC911X_BASE, GPMC_SIZE_16M); - - return smc911x_initialize(0, CONFIG_SMC911X_BASE); -} -#endif diff --git a/configs/omap35_logic_defconfig b/configs/omap35_logic_defconfig index bcf4efc621..a460ed559e 100644 --- a/configs/omap35_logic_defconfig +++ b/configs/omap35_logic_defconfig @@ -56,8 +56,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x08000000 CONFIG_SMC911X_32_BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y diff --git a/configs/omap35_logic_somlv_defconfig b/configs/omap35_logic_somlv_defconfig index 51c5d449e0..f6db27f02e 100644 --- a/configs/omap35_logic_somlv_defconfig +++ b/configs/omap35_logic_somlv_defconfig @@ -60,8 +60,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x08000000 CONFIG_SMC911X_32_BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig index 15925fb7db..918532a66c 100644 --- a/configs/omap3_logic_defconfig +++ b/configs/omap3_logic_defconfig @@ -55,8 +55,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x08000000 CONFIG_SMC911X_32_BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig index ea8fc37f12..4a63437653 100644 --- a/configs/omap3_logic_somlv_defconfig +++ b/configs/omap3_logic_somlv_defconfig @@ -62,8 +62,8 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 CONFIG_SPL_NAND_SIMPLE=y +CONFIG_DM_ETH=y CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x08000000 CONFIG_SMC911X_32_BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y