[Linux-stm32] [PATCH] net: stmmac: Support gpio high-level reset for devices requiring it

lizhe sensor1010 at 163.com
Wed Jul 9 11:42:55 UTC 2025


Hi,

    i have already declared it in the DTS.




    &gmac {

            snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;




    };







Thx !

Lizhe





At 2025-07-09 19:11:02, "Russell King (Oracle)" <linux at armlinux.org.uk> wrote:
>On Wed, Jul 09, 2025 at 03:48:25PM +0800, lizhe wrote:
>> Hi, 
>> 
>> after replacing with this function, the function returns 0, meaning the gpio is
>> still at a low voltage level.
>> 
>> +              int gpio_state = -1;
>> 
>> 
>>                 if (delays[2])
>>                         msleep(DIV_ROUND_UP(delays[2], 1000));
>> +
>> +               gpio_state = gpiod_get_raw_value_cansleep(reset_gpio);
>> +               pr_info("gpio_state: %d\n", gpio_state);
>> +               pr_info("gpio_state: %d\n", gpio_state);
>> 
>>  gpio-111 (                    |snps,reset          ) out lo
>> 
>> 
>> [    3.899319] gpio_state: 0
>> [    3.899324] gpio_state: 0
>
>How have you declared the snps,reset-gpio property in DT?
>
>-- 
>RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
>FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://st-md-mailman.stormreply.com/pipermail/linux-stm32/attachments/20250709/362c47f8/attachment.html>


More information about the Linux-stm32 mailing list