devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Packham <chris.packham@alliedtelesis.co.nz>
To: wsa@kernel.org, andi.shyti@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	gregory.clement@bootlin.com
Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: [PATCH v6 1/2] dt-bindings: i2c: add bus-reset-gpios property
Date: Wed, 15 Nov 2023 16:57:52 +1300	[thread overview]
Message-ID: <20231115035753.925534-2-chris.packham@alliedtelesis.co.nz> (raw)
In-Reply-To: <20231115035753.925534-1-chris.packham@alliedtelesis.co.nz>

Add bus-reset-gpios and bus-reset-duration-us properties to the binding
description for i2c busses. These can be used to describe hardware where
a common reset GPIO is connected to all downstream devices on and I2C
bus. This reset will be asserted then released before the downstream
devices on the bus are probed.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---

Notes:
    I expect the first reaction to this will be a request to convert the
    binding to dtschema. I can attempt such a conversion but given it's one
    of the more core bindings I expect others may have strong opinions. I
    didn't want to start a conversion without hearing those opinions (or if
    I could get away without doing the conversion). It's also likely to spin
    off a whole lot of work to bring existing device trees into line.
    
    Changes in v6:
    - Retarget changes at the i2c core instead of an individual driver
    Changes in v5:
    - Rename reset-gpios and reset-duration-us to bus-reset-gpios and
      bus-reset-duration-us as requested by Wolfram
    Changes in v4:
    - Add r-by from Krzysztof
    Changes in v3:
    - Rename reset-delay-us to reset-duration-us to better reflect its
      purpose
    - Add default: for reset-duration-us
    - Add description: for reset-gpios
    Changes in v2:
    - Update commit message
    - Add reset-delay-us property

 Documentation/devicetree/bindings/i2c/i2c.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
index fc3dd7ec0445..3f95d71b9985 100644
--- a/Documentation/devicetree/bindings/i2c/i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c.txt
@@ -99,6 +99,14 @@ wants to support one of the below features, it should adapt these bindings.
 	indicates that the system is accessible via this bus as an endpoint for
 	MCTP over I2C transport.
 
+- bus-reset-gpios:
+	GPIO pin providing a common reset for all downstream devices. This GPIO
+	will be asserted then released before the downstream devices are probed.
+
+- bus-reset-duration-us:
+	Reset duration in us.
+	default: 1
+
 Required properties (per child device)
 --------------------------------------
 
-- 
2.42.0


  reply	other threads:[~2023-11-15  3:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15  3:57 [PATCH v6 0/2] i2c: bus-reset-gpios Chris Packham
2023-11-15  3:57 ` Chris Packham [this message]
2023-11-15 21:29   ` [PATCH v6 1/2] dt-bindings: i2c: add bus-reset-gpios property Krzysztof Kozlowski
2023-11-15 21:53     ` Chris Packham
2023-11-16 11:37       ` Krzysztof Kozlowski
2023-12-19 17:02       ` wsa
2023-12-19 19:28         ` Chris Packham
2023-12-19 20:50           ` wsa
2023-12-19 23:25             ` Andi Shyti
2023-12-20  7:22               ` Krzysztof Kozlowski
2023-12-20 11:03                 ` wsa
2023-12-20 11:29                   ` Krzysztof Kozlowski
2023-12-20 11:52                     ` wsa
2023-12-21  0:40                 ` Andi Shyti
2023-11-15  3:57 ` [PATCH v6 2/2] i2c: add an optional " Chris Packham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231115035753.925534-2-chris.packham@alliedtelesis.co.nz \
    --to=chris.packham@alliedtelesis.co.nz \
    --cc=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).