
On Tue, Aug 02, 2022 at 07:33:41AM -0400, Tom Rini wrote:
This platform needs to be converted to use DM_ETH as the deadline is 2 years passed due. Disable networking support for now.
Oh well, my bad. There are too many patches accumulated. Please see bellow for original version for reference (applied after this one is reverted) Alternatively I can rebase on current master, just let me know whichever way you prefer.
ladis
Cc: Enric Balletbo i Serra <eballetbo at gmail.com> Signed-off-by: Tom Rini <trini at konsulko.com>
board/isee/igep00x0/igep00x0.c | 58 ---------------------------------- configs/igep00x0_defconfig | 5 +-- 2 files changed, 1 insertion(+), 62 deletions(-)
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 0932f62b9beb..6c5e6fbbcb0d 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -88,62 +88,6 @@ int onenand_board_init(struct mtd_info *mtd) return 1; }
-#if defined(CONFIG_CMD_NET) -static void reset_net_chip(int gpio) -{
- if (!gpio_request(gpio, "eth nrst")) {
gpio_direction_output(gpio, 1);
udelay(1);
gpio_set_value(gpio, 0);
udelay(40);
gpio_set_value(gpio, 1);
mdelay(10);
- }
-}
-/*
- Routine: setup_net_chip
- Description: Setting up the configuration GPMC registers specific to the
Ethernet hardware.
- */
-static void setup_net_chip(void) -{
- struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
- static const u32 gpmc_lan_config[] = {
NET_LAN9221_GPMC_CONFIG1,
NET_LAN9221_GPMC_CONFIG2,
NET_LAN9221_GPMC_CONFIG3,
NET_LAN9221_GPMC_CONFIG4,
NET_LAN9221_GPMC_CONFIG5,
NET_LAN9221_GPMC_CONFIG6,
- };
- enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[5],
CONFIG_SMC911X_BASE, GPMC_SIZE_16M);
- /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
- writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
- /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
- writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
- /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
- writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
&ctrl_base->gpmc_nadv_ale);
- reset_net_chip(64);
-}
-int board_eth_init(struct bd_info *bis) -{ -#ifdef CONFIG_SMC911X
- return smc911x_initialize(0, CONFIG_SMC911X_BASE);
-#else
- return 0;
-#endif -} -#else -static inline void setup_net_chip(void) {} -#endif
#ifdef CONFIG_OF_BOARD_SETUP static int ft_enable_by_compatible(void *blob, char *compat, int enable) { @@ -234,8 +178,6 @@ int misc_init_r(void) OMAP34XX_CTRL_WKUP_CTRL_GPIO_IO_PWRDNZ, OMAP34XX_CTRL_WKUP_CTRL);
setup_net_chip();
omap_die_id_display();
set_led();
diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig index 17c97ac27f79..25eda11dd45e 100644 --- a/configs/igep00x0_defconfig +++ b/configs/igep00x0_defconfig @@ -67,7 +67,7 @@ CONFIG_ENV_UBI_VOLUME="config" CONFIG_ENV_UBI_VOLUME_REDUND="config_r" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y -CONFIG_NET_RANDOM_ETHADDR=y +# CONFIG_NET is not set CONFIG_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_MMC_OMAP_HS=y @@ -81,9 +81,6 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800 CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_MTD_UBI_FASTMAP=y -CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x2C000000 -CONFIG_SMC911X_32_BIT=y CONFIG_CONS_INDEX=3 CONFIG_SPI=y CONFIG_DM_SPI=y -- 2.25.1
From: Ladislav Michl ladis@linux-mips.org Date: Tue, 5 Apr 2022 15:47:45 +0200 Subject: [PATCH] ARM: igep00x0: convert to DM_ETH
The GPMC bus hasn't been converted, so omap3-igep0020-u-boot.dtsi needs to provide the address of the ethernet controller.
Signed-off-by: Ladislav Michl ladis@linux-mips.org --- arch/arm/dts/omap3-igep0020-u-boot.dtsi | 12 ++++++++++++ board/isee/igep00x0/igep00x0.c | 12 +----------- configs/igep00x0_defconfig | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/arch/arm/dts/omap3-igep0020-u-boot.dtsi b/arch/arm/dts/omap3-igep0020-u-boot.dtsi index 41beaf0900..d418b6a79f 100644 --- a/arch/arm/dts/omap3-igep0020-u-boot.dtsi +++ b/arch/arm/dts/omap3-igep0020-u-boot.dtsi @@ -9,6 +9,18 @@ chosen { stdout-path = &uart3; }; + + ethernet@2c000000 { + compatible = "smsc,lan9221","smsc,lan9115"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x2c000000 0xff>; + bank-width = <2>; + vddvario-supply = <&vddvario>; + vdd33a-supply = <&vdd33a>; + reg-io-width = <4>; + smsc,save-mac-address; + }; };
&uart1 { diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 0932f62b9b..b48acf9d9b 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -12,7 +12,6 @@ #include <dm.h> #include <ns16550.h> #include <twl4030.h> -#include <netdev.h> #include <spl.h> #include <asm/gpio.h> #include <asm/io.h> @@ -119,7 +118,7 @@ static void setup_net_chip(void) };
enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[5], - CONFIG_SMC911X_BASE, GPMC_SIZE_16M); + 0x2C000000, GPMC_SIZE_16M);
/* Enable off mode for NWE in PADCONF_GPMC_NWE register */ writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe); @@ -131,15 +130,6 @@ static void setup_net_chip(void)
reset_net_chip(64); } - -int board_eth_init(struct bd_info *bis) -{ -#ifdef CONFIG_SMC911X - return smc911x_initialize(0, CONFIG_SMC911X_BASE); -#else - return 0; -#endif -} #else static inline void setup_net_chip(void) {} #endif diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig index f0d6ac56b6..9f895113d9 100644 --- a/configs/igep00x0_defconfig +++ b/configs/igep00x0_defconfig @@ -70,8 +70,8 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800 CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y CONFIG_MTD_UBI_FASTMAP=y +CONFIG_DM_ETH=y CONFIG_SMC911X=y -CONFIG_SMC911X_BASE=0x2C000000 CONFIG_SMC911X_32_BIT=y CONFIG_CONS_INDEX=3 CONFIG_SPI=y