2023-10-24 22:31:47

by Chris Packham

[permalink] [raw]
Subject: [PATCH v4 1/2] dt-bindings: i2c: mv64xxx: add reset-gpios property

Add reset-gpios and reset-duration-us properties to the
marvell,mv64xxx-i2c binding. 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 <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---

Notes:
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

.../devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
index 461d1c9ee3f7..ecf5b279cfa4 100644
--- a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
@@ -70,6 +70,16 @@ properties:
resets:
maxItems: 1

+ reset-gpios:
+ description:
+ GPIO pin providing a common reset for all downstream devices. This GPIO
+ will be asserted then released before the downstream devices are probed.
+ maxItems: 1
+
+ reset-duration-us:
+ description: Reset duration in us.
+ default: 1
+
dmas:
items:
- description: RX DMA Channel
--
2.42.0


2023-10-24 23:30:03

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: i2c: mv64xxx: add reset-gpios property

Hi Chris,

On Wed, Oct 25, 2023 at 11:30:31AM +1300, Chris Packham wrote:
> Add reset-gpios and reset-duration-us properties to the
> marvell,mv64xxx-i2c binding. 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 <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

Acked-by: Andi Shyti <[email protected]>

Thanks,
Andi

2023-10-26 11:16:15

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: i2c: mv64xxx: add reset-gpios property


> + reset-gpios:
> + description:
> + GPIO pin providing a common reset for all downstream devices. This GPIO
> + will be asserted then released before the downstream devices are probed.

How about renaming this to "bus-reset-gpios"?

Reason: When I read "reset-gpios", then I assume the device itself will
be reset. In this case, the Marvell I2C controller. Some I2C mux devices
and PCA9564 already use the property like I described.


Attachments:
(No filename) (463.00 B)
signature.asc (849.00 B)
Download all attachments

2023-10-26 20:05:10

by Chris Packham

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: i2c: mv64xxx: add reset-gpios property

(resend as plain text)


On 27/10/23 00:15, Wolfram Sang wrote:
>> + reset-gpios:
>> + description:
>> + GPIO pin providing a common reset for all downstream devices. This GPIO
>> + will be asserted then released before the downstream devices are probed.
> How about renaming this to "bus-reset-gpios"?
>
> Reason: When I read "reset-gpios", then I assume the device itself will
> be reset. In this case, the Marvell I2C controller. Some I2C mux devices
> and PCA9564 already use the property like I described.

I don't have an objection to "bus-reset-gpios" it would be trivial for
me to spin a v5 with the naming changed if everyone is in agreement
(given my timezone I might just send out a v5 with this change and then
it can be argued whether to apply v4 or v5).