2024-02-01 04:53:56

by Aahil Awatramani

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: i2c: designware: allow fine tuning tuning waveform from device tree

The Synopsys i2c driver allows a user to override the parameters
controlling the waveform using ACPI; this is useful for fine tuning when
needed to make spec compliance. Extend this support to the device tree to
allow non-ACPI platforms the same capabilities.

Signed-off-by: Aahil Awatramani <[email protected]>
---
Documentation/devicetree/bindings/i2c/i2c.txt | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
index fc3dd7ec0445..3c33c36571f9 100644
--- a/Documentation/devicetree/bindings/i2c/i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c.txt
@@ -45,6 +45,24 @@ wants to support one of the below features, it should adapt these bindings.
Number of nanoseconds the SCL signal takes to rise; t(r) in the I2C
specification.

+- i2c-scl-ss-hcnt
+ HCNT value for standard speed mode in I2C Controller.
+
+- i2c-scl-ss-lcnt
+ LCNT value for standard speed mode in I2C Controller.
+
+- i2c-scl-fs-hcnt
+ HCNT value for fast speed mode in I2C Controller.
+
+- i2c-scl-fs-lcnt
+ LCNT value for fast speed mode in I2C Controller.
+
+- i2c-scl-hs-hcnt
+ HCNT value for high speed mode in I2C Controller.
+
+- i2c-scl-hs-lcnt
+ LCNT value for high speed mode in I2C Controller.
+
- i2c-sda-falling-time-ns
Number of nanoseconds the SDA signal takes to fall; t(f) in the I2C
specification.
--
2.43.0.429.g432eaa2c6b-goog



2024-02-01 07:35:05

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: i2c: designware: allow fine tuning tuning waveform from device tree

On 01/02/2024 05:46, Aahil Awatramani wrote:
> The Synopsys i2c driver allows a user to override the parameters

Driver? That already suggests it is not suitable for binding...

> controlling the waveform using ACPI; this is useful for fine tuning when
> needed to make spec compliance. Extend this support to the device tree to
> allow non-ACPI platforms the same capabilities.
>
> Signed-off-by: Aahil Awatramani <[email protected]>
> ---
> Documentation/devicetree/bindings/i2c/i2c.txt | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt
> index fc3dd7ec0445..3c33c36571f9 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c.txt
> @@ -45,6 +45,24 @@ wants to support one of the below features, it should adapt these bindings.
> Number of nanoseconds the SCL signal takes to rise; t(r) in the I2C
> specification.
>
> +- i2c-scl-ss-hcnt
> + HCNT value for standard speed mode in I2C Controller.

I have no clue what is HCNT, so I expect you to help us understand what
is this and why this is suitable for DT. Your reference to driver
suggests it is not suitable for DT.

Best regards,
Krzysztof


2024-02-01 17:20:26

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: i2c: designware: allow fine tuning tuning waveform from device tree

On Thu, Feb 01, 2024 at 04:46:22AM +0000, Aahil Awatramani wrote:
> The Synopsys i2c driver allows a user to override the parameters
> controlling the waveform using ACPI; this is useful for fine tuning when
> needed to make spec compliance. Extend this support to the device tree to
> allow non-ACPI platforms the same capabilities.

DT has different counters from which one should derive these ones.
Can you explain why existing bindings may _not_ be utilised?

Without this very justification, NAK.

--
With Best Regards,
Andy Shevchenko



2024-02-09 21:06:14

by Aahil Awatramani

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: i2c: designware: allow fine tuning tuning waveform from device tree

Thank you Andy and Krzysztof,

I think you are right and I can use the other DT counter, I am
currently trying to test if they work for me.

Best,
Aahil

On Thu, Feb 1, 2024 at 3:49 AM Andy Shevchenko
<[email protected]> wrote:
>
> On Thu, Feb 01, 2024 at 04:46:22AM +0000, Aahil Awatramani wrote:
> > The Synopsys i2c driver allows a user to override the parameters
> > controlling the waveform using ACPI; this is useful for fine tuning when
> > needed to make spec compliance. Extend this support to the device tree to
> > allow non-ACPI platforms the same capabilities.
>
> DT has different counters from which one should derive these ones.
> Can you explain why existing bindings may _not_ be utilised?
>
> Without this very justification, NAK.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>