2023-10-16 02:35:36

by Chris Packham

[permalink] [raw]
Subject: [PATCH v2 0/2] i2c: mv64xxx: reset-gpios

This series adds the ability to associate a gpio with an I2C bus so that
downstream devices can be brought out of reset when the host controller is
probed.

Chris Packham (2):
dt-bindings: i2c: mv64xxx: add reset-gpios property
i2c: mv64xxx: add an optional reset-gpios property

.../bindings/i2c/marvell,mv64xxx-i2c.yaml | 6 ++++++
drivers/i2c/busses/i2c-mv64xxx.c | 15 +++++++++++++++
2 files changed, 21 insertions(+)

--
2.42.0


2023-10-16 02:35:37

by Chris Packham

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

Add reset-gpios and reset-delay-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 released before the downstream devices on the bus are probed.

Signed-off-by: Chris Packham <[email protected]>
---

Notes:
Changes in v2:
- Update commit message
- Add reset-delay-us property

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

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

+ reset-gpios:
+ maxItems: 1
+
+ reset-delay-us:
+ description: Delay in us to wait after reset gpio de-assertion.
+
dmas:
items:
- description: RX DMA Channel
--
2.42.0

2023-10-16 05:25:58

by Krzysztof Kozlowski

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

On 16/10/2023 04:35, Chris Packham wrote:
> Add reset-gpios and reset-delay-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 released before the downstream devices on the bus are probed.
>
> Signed-off-by: Chris Packham <[email protected]>
> ---
>
> Notes:
> Changes in v2:
> - Update commit message
> - Add reset-delay-us property
>
> .../devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> index 461d1c9ee3f7..7223797b0572 100644
> --- a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> @@ -70,6 +70,12 @@ properties:
> resets:
> maxItems: 1
>
> + reset-gpios:
> + maxItems: 1
> +
> + reset-delay-us:
> + description: Delay in us to wait after reset gpio de-assertion.

Add:
default: XXXX


Best regards,
Krzysztof

2023-10-17 19:34:54

by Rob Herring (Arm)

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

On Mon, Oct 16, 2023 at 03:35:03PM +1300, Chris Packham wrote:
> Add reset-gpios and reset-delay-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 released before the downstream devices on the bus are probed.
>
> Signed-off-by: Chris Packham <[email protected]>
> ---
>
> Notes:
> Changes in v2:
> - Update commit message
> - Add reset-delay-us property
>
> .../devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> index 461d1c9ee3f7..7223797b0572 100644
> --- a/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/marvell,mv64xxx-i2c.yaml
> @@ -70,6 +70,12 @@ properties:
> resets:
> maxItems: 1
>
> + reset-gpios:
> + maxItems: 1

It would be worth saying this is common for all downstream devices on
the I2C bus here.

> +
> + reset-delay-us:
> + description: Delay in us to wait after reset gpio de-assertion.
> +
> dmas:
> items:
> - description: RX DMA Channel
> --
> 2.42.0
>