lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aG6p5_p9CmqxZcxM@shell.armlinux.org.uk>
Date: Wed, 9 Jul 2025 18:41:59 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: lizhe <sensor1010@....com>
Cc: Andrew Lunn <andrew@...n.ch>, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, mcoquelin.stm32@...il.com,
	alexandre.torgue@...s.st.com, vladimir.oltean@....com,
	maxime.chevallier@...tlin.com, netdev@...r.kernel.org,
	linux-stm32@...md-mailman.stormreply.com,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: Re: Re: Re: Re: [PATCH] net: stmmac: Support gpio high-level
 reset for devices requiring it

On Thu, Jul 10, 2025 at 12:05:05AM +0800, lizhe wrote:
> Hi,
> 
>      
> 
>   if i add the following code to this function, the gpio outputs a high level
> 
>   without this code, it outputs a low level, 
>   the function currently drivers the reset GPIO to a low state, failing to account 
> 
>   for devices requiring an active-high reset.
> 
> 
> 
> 
>   i invited our hardware engineer to  measure the voltage level on this GPIO pin,
> 
>   without  adding this code, the voltage at this GPIO pin remains at 0V
> 
> 
> 
> 
>   +             int current_value;
> 
> 
> 
> 
>   +             keep_high = device_property_read_bool(priv->device,
> 
>   +                                                             "snps,reset-keep-high");
> 
>   +              if (keep_high) {
> 
>   +                     gpiod_set_value_cansleep(reset_gpio, 1);
> 
>   +                      current_value = gpiod_get_value_cansleep(reset_gpio);
> 
>   +                      pr_info("current_value: %d\n", current_value);
> 
>   +              }
> 
>    in the RK3588 system, i am using ,there are many DTS node configured link this:
> 
>     snps, reset-gpio = <&gpioX RK_PXX GPIO_ACTIVE_HIGH>;   
>     All of them correctly parse the GPIO pin's state are described in the DTS
> 

I'm wondering at this point whether the problem here is one of
mis-understanding the engineering terminology. Look at the below
using a fixed-width font:

Active-high reset: _____/^^^^^^^^\____

Active-low reset:  ^^^^^\________/^^^^

                        | reset  |
			|asserted|

So, an active high reset needs to be logic low in order for the
device to function. An active low reset needs to be logic high
for the device to function.

You seem to be wanting to tell the kernel that you have an
active high reset, and expect it to be logic high when you
want it to be active. That is *not* an active high reset.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ