[PATCH v2] board: ti: am335x: Conditional MDIO PAD configuration instead of static for AM335_ICE

Parvathi Pudi parvathi at couthit.com
Wed Apr 22 14:13:44 CEST 2026


Hi Markus,

> On Tue Apr 21, 2026 at 2:30 PM CEST, Parvathi Pudi wrote:
>> This patch removes the static MDIO pinmux configuration from
>> rmii1_pin_mux[] and instead configures the MDIO pins conditionally
>> during board_init(). Previously, the MDIO_CLK and MDIO_DATA pins
>> were always configured for CPSW in mux.c, which could lead to
>> unnecessary pin ownership and conflicts in scenarios where CPSW
>> is not used.
>>
>> With this change, the MDIO pins are configured only when required,
>> ensuring that CPSW Ethernet functionality in U-Boot remains unaffected.
>> This approach keeps Ethernet boot behavior intact and provides cleaner
>> separation between CPSW and other Ethernet use cases.
>>
>> Signed-off-by: Parvathi Pudi <parvathi at couthit.com>
> 
> Reviewed-by: Markus Schneider-Pargmann <msp at baylibre.com>
> 

Thanks for the review.

> Looks good to me, one nitpick inline:
> 
>> ---
>> Changes from v1 to v2 :
>> *) Adressed Markus Schneider-Pargmann's comments on this patch.
>>
>>  board/ti/am335x/board.c | 11 +++++++++++
>>  board/ti/am335x/mux.c   |  2 --
>>  2 files changed, 11 insertions(+), 2 deletions(-)
>>
>> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
>> index 90e37a8d913..f0a40cb82af 100644
>> --- a/board/ti/am335x/board.c
>> +++ b/board/ti/am335x/board.c
>> @@ -28,6 +28,7 @@
>>  #include <asm/arch/mmc_host_def.h>
>>  #include <asm/arch/sys_proto.h>
>>  #include <asm/arch/mem.h>
>> +#include <asm/arch/mux.h>
>>  #include <asm/global_data.h>
>>  #include <asm/io.h>
>>  #include <asm/emif.h>
>> @@ -72,6 +73,12 @@ static struct ctrl_dev *cdev = (struct ctrl_dev
>> *)CTRL_DEVICE_BASE;
>>  #define GPIO0_IRQSTATUSRAW	(AM33XX_GPIO0_BASE + 0x024)
>>  #define GPIO1_IRQSTATUSRAW	(AM33XX_GPIO1_BASE + 0x024)
>>  
>> +static struct module_pin_mux rmii1_mdio_pin_mux[] = {
>> +	{OFFSET(mdio_clk), MODE(0) | PULLUP_EN},	/* MDIO_CLK */
>> +	{OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */
>> +	{-1},
>> +};
>> +
>>  /*
>>   * Read header information from EEPROM into global structure.
>>   */
>> @@ -779,6 +786,10 @@ int board_init(void)
>>  			hang();
>>  		}
>>  
>> +		/* Set the Mux Mode to MDIO_DATA, MDIO_CLK */
> 
> I think it is ovious by the names. Can you please remove the comment?
>

Sure, we will address this and post the next version shortly.

Thanks and Regards,
Parvathi.


More information about the U-Boot mailing list