[Linux-stm32] [PATCH] net: stmmac: Support gpio high-level reset for devices requiring it
lizhe
sensor1010 at 163.com
Wed Jul 9 01:57:50 UTC 2025
Hi, Andrew
Thx,
i conducted an experiment, and no matter whether i configured it as
GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH in the dts, the resulting
GPIO pin state was 0, indicating a low level.
if (delays[2])
msleep(DIV_ROUND_UP(DELAYS[2], 1000));
+ gpio_state = gpiod_get_value_can_sleep(reset_gpio);
+ pr_info("gpio_state: %d\n", gpio_state);
At 2025-07-09 01:34:07, "Andrew Lunn" <andrew at lunn.ch> wrote:
>On Tue, Jul 08, 2025 at 09:50:44AM -0700, Lizhe wrote:
>> some devices only reset when the GPIO is at a high level, but the
>> current function lacks support for such devices. add high-level
>> reset functionality to the function to support devices that require
>> high-level triggering for reset
>
>You can probably specify this in DT:
>
>reset-gpios = <&qe_pio_e 18 GPIO_ACTIVE_LOW>;
>
>The gpio core will then flip the meaning of
>
>gpiod_set_value_cansleep(reset_gpio, 1);
>
>such that a value of 1 will become low, 0 will become high.
>
> Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://st-md-mailman.stormreply.com/pipermail/linux-stm32/attachments/20250709/757a6ded/attachment.html>
More information about the Linux-stm32
mailing list