linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] gpio: pcf857x: add support for reset-gpios on (most) PCA967x
@ 2025-02-20  9:56 Quentin Schulz
  2025-02-20  9:56 ` [PATCH 1/2] dt-bindings: gpio: nxp,pcf8575: add reset GPIO Quentin Schulz
  2025-02-20  9:56 ` [PATCH 2/2] gpio: pcf857x: add support for reset-gpios on (most) PCA967x Quentin Schulz
  0 siblings, 2 replies; 11+ messages in thread
From: Quentin Schulz @ 2025-02-20  9:56 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Laurent Pinchart
  Cc: Heiko Stuebner, linux-gpio, devicetree, linux-kernel,
	Quentin Schulz

The PCA9670, PCA9671, PCA9672 and PCA9673 all have a RESETN input pin
that is used to reset the I2C GPIO expander.

One needs to hold this pin low for at least 4us and the reset should be
finished after about 100us according to the datasheet[1]. Once the reset
is done, the "registers and I2C-bus state machine will be held in their
default state until the RESET input is once again HIGH.".

Because the logic is reset, the latch values eventually provided in the
Device Tree via lines-initial-states property are inapplicable so they
are simply ignored if a reset GPIO is provided.
This is eventually enforced by the Device Tree binding by making sure
both cannot be present at the same time.

Finally, the reset-gpios property is specific to PCA9670, PCA9671,
PCA9672 and PCA9673 so make it specific to those chips.

[1] https://www.nxp.com/docs/en/data-sheet/PCA9670.pdf 8.5 and fig 22.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (2):
      dt-bindings: gpio: nxp,pcf8575: add reset GPIO
      gpio: pcf857x: add support for reset-gpios on (most) PCA967x

 .../devicetree/bindings/gpio/nxp,pcf8575.yaml      | 33 ++++++++++++++++++++++
 drivers/gpio/gpio-pcf857x.c                        | 29 +++++++++++++++++--
 2 files changed, 59 insertions(+), 3 deletions(-)
---
base-commit: 6537cfb395f352782918d8ee7b7f10ba2cc3cbf2
change-id: 20250219-pca976x-reset-driver-c9aa95869426

Best regards,
-- 
Quentin Schulz <quentin.schulz@cherry.de>


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

end of thread, other threads:[~2025-02-20 21:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-20  9:56 [PATCH 0/2] gpio: pcf857x: add support for reset-gpios on (most) PCA967x Quentin Schulz
2025-02-20  9:56 ` [PATCH 1/2] dt-bindings: gpio: nxp,pcf8575: add reset GPIO Quentin Schulz
2025-02-20 12:24   ` Laurent Pinchart
2025-02-20 13:11     ` Quentin Schulz
2025-02-20 21:51   ` Heiko Stübner
2025-02-20  9:56 ` [PATCH 2/2] gpio: pcf857x: add support for reset-gpios on (most) PCA967x Quentin Schulz
2025-02-20 10:52   ` Heiko Stübner
2025-02-20 12:13     ` Quentin Schulz
2025-02-20 12:28       ` Laurent Pinchart
2025-02-20 13:20   ` Bartosz Golaszewski
2025-02-20 21:52   ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).