All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] board:pm9263 - Switch to use DM_ETH
@ 2021-04-23 13:41 Ilko Iliev
  2021-05-13  6:58 ` Eugen.Hristev at microchip.com
  0 siblings, 1 reply; 2+ messages in thread
From: Ilko Iliev @ 2021-04-23 13:41 UTC (permalink / raw)
  To: u-boot

- Enable CONFIG_DM_ETH in configs/pm9263_defconfig
- Drop legacy initialization in board/ronetix/pm9263.c
- Remove network related setting from include/configs/pm9263.h

Signed-off-by: Ilko Iliev <iliev@ronetix.at>
---
Changes to v2:
 - improve commit message
---
 board/ronetix/pm9263/pm9263.c | 57 -----------------------------------
 configs/pm9263_defconfig      |  2 ++
 include/configs/pm9263.h      |  6 ----
 3 files changed, 2 insertions(+), 63 deletions(-)

diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index 95c0dec4db..46494b043f 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -19,10 +19,6 @@
 #include <asm/arch/at91_matrix.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
-#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
-#include <net.h>
-#endif
-#include <netdev.h>
 #include <asm/mach-types.h>

 DECLARE_GLOBAL_DATA_PTR;
@@ -73,41 +69,6 @@ static void pm9263_nand_hw_init(void)
 }
 #endif

-#ifdef CONFIG_MACB
-static void pm9263_macb_hw_init(void)
-{
-	/*
-	 * PB27 enables the 50MHz oscillator for Ethernet PHY
-	 * 1 - enable
-	 * 0 - disable
-	 */
-	at91_set_pio_output(AT91_PIO_PORTB, 27, 1);
-	at91_set_pio_value(AT91_PIO_PORTB, 27, 1); /* 1- enable, 0 - disable */
-
-	at91_periph_clk_enable(ATMEL_ID_EMAC);
-
-	/*
-	 * Disable pull-up on:
-	 *	RXDV (PC25) => PHY normal mode (not Test mode)
-	 *	ERX0 (PE25) => PHY ADDR0
-	 *	ERX1 (PE26) => PHY ADDR1 => PHYADDR = 0x0
-	 *
-	 * PHY has internal pull-down
-	 */
-
-	at91_set_pio_pullup(AT91_PIO_PORTC, 25, 0);
-	at91_set_pio_pullup(AT91_PIO_PORTE, 25, 0);
-	at91_set_pio_pullup(AT91_PIO_PORTE, 26, 0);
-
-	/* Re-enable pull-up */
-	at91_set_pio_pullup(AT91_PIO_PORTC, 25, 1);
-	at91_set_pio_pullup(AT91_PIO_PORTE, 25, 1);
-	at91_set_pio_pullup(AT91_PIO_PORTE, 26, 1);
-
-	at91_macb_hw_init();
-}
-#endif
-
 #ifdef CONFIG_LCD

 #ifdef CONFIG_LCD_IN_PSRAM
@@ -233,9 +194,6 @@ int board_init(void)
 #ifdef CONFIG_CMD_NAND
 	pm9263_nand_hw_init();
 #endif
-#ifdef CONFIG_MACB
-	pm9263_macb_hw_init();
-#endif
 #ifdef CONFIG_USB_OHCI_NEW
 	at91_uhp_hw_init();
 #endif
@@ -261,21 +219,6 @@ int dram_init_banksize(void)
 	return 0;
 }

-#ifdef CONFIG_RESET_PHY_R
-void reset_phy(void)
-{
-}
-#endif
-
-int board_eth_init(struct bd_info *bis)
-{
-	int rc = 0;
-#ifdef CONFIG_MACB
-	rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC, 0x01);
-#endif
-	return rc;
-}
-
 #ifdef CONFIG_DISPLAY_BOARDINFO
 int checkboard (void)
 {
diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
index 817a9847be..ef18e742d2 100644
--- a/configs/pm9263_defconfig
+++ b/configs/pm9263_defconfig
@@ -50,6 +50,8 @@ CONFIG_NAND_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_DATAFLASH=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_SPI=y
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 6c882b6ff9..7b028751bd 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -204,12 +204,6 @@
 					 AT91_MATRIX_SCFG_DEFMSTR_TYPE_FIXED	| \
 					 AT91_MATRIX_SCFG_SLOT_CYCLE(255))

-/* Ethernet */
-#define CONFIG_MACB			1
-#define CONFIG_RMII			1
-#define CONFIG_NET_RETRY_COUNT		20
-#define CONFIG_RESET_PHY_R		1
-
 /* USB */
 #define CONFIG_USB_ATMEL
 #define CONFIG_USB_ATMEL_CLK_SEL_PLLB
--
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2 1/2] board:pm9263 - Switch to use DM_ETH
  2021-04-23 13:41 [PATCH v2 1/2] board:pm9263 - Switch to use DM_ETH Ilko Iliev
@ 2021-05-13  6:58 ` Eugen.Hristev at microchip.com
  0 siblings, 0 replies; 2+ messages in thread
From: Eugen.Hristev at microchip.com @ 2021-05-13  6:58 UTC (permalink / raw)
  To: u-boot

On 4/23/21 4:41 PM, Ilko Iliev wrote:

> - Enable CONFIG_DM_ETH in configs/pm9263_defconfig
> - Drop legacy initialization in board/ronetix/pm9263.c
> - Remove network related setting from include/configs/pm9263.h
> 
> Signed-off-by: Ilko Iliev <iliev@ronetix.at>
> ---
> Changes to v2:
>   - improve commit message
> ---
>   board/ronetix/pm9263/pm9263.c | 57 -----------------------------------
>   configs/pm9263_defconfig      |  2 ++
>   include/configs/pm9263.h      |  6 ----
>   3 files changed, 2 insertions(+), 63 deletions(-)
> 

Applied with minor commit message change to u-boot-atmel/next, thanks !

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-13  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 13:41 [PATCH v2 1/2] board:pm9263 - Switch to use DM_ETH Ilko Iliev
2021-05-13  6:58 ` Eugen.Hristev at microchip.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.