[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5711272-b302-430c-820f-81b475178e65@kernel.org>
Date: Tue, 7 May 2024 08:34:58 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Krishna Yarlagadda <kyarlagadda@...dia.com>, linux-tegra@...r.kernel.org,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: thierry.reding@...il.com, jonathanh@...dia.com, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, corbet@....net,
andi.shyti@...nel.org, wsa+renesas@...g-engineering.com,
ulf.hansson@...aro.org, adrian.hunter@...el.com, digetx@...il.com,
ldewangan@...dia.com, mkumard@...dia.com
Subject: Re: [RFC PATCH 04/11] i2c: dt-bindings: configuration settings
On 07/05/2024 00:51, Krishna Yarlagadda wrote:
> I2C interface timing registers are configured using config setting
> framework. Document available properties for Tegra I2C controllers.
>
> Signed-off-by: Krishna Yarlagadda <kyarlagadda@...dia.com>
> ---
> .../bindings/i2c/nvidia,tegra20-i2c.yaml | 104 ++++++++++++++++++
> 1 file changed, 104 insertions(+)
>
You called it RFC, so not ready for review, thus just few remarks.
Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
> diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> index 424a4fc218b6..3b22e75e5aa0 100644
> --- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.yaml
> @@ -119,6 +119,96 @@ properties:
> - const: rx
> - const: tx
>
> + config:
> + description: Config settings for I2C devices enlisted with I2C controller.
> + Config setting is the configuration based on chip/board/system
> + characterization on interface/controller settings. This is needed for
> + - making the controller internal configuration to better perform
> + - making the interface to work proper by setting drive strength, slew
> + rates etc
> + - making the low power leakage.
> + There are two types of recommended configuration settings
> + - Controller register specific for internal operation of controller.
> + - Pad control/Pinmux/pincontrol registers for interfacing.
> + These configurations can further be categorized as static and dynamic.
> + - Static config does not change until a controller is reset.
> + - Dynamic config changes based on mode or condition, controller is
> + operating in.
> + I2C has configuration based on clock speed and has below modes.
> + - common is set on all speeds and can be overridden by speed mode.
> + - high is set when clock mode is high speed.
> + - fastplus is set when clock mode is fast plus.
> + - fast is set when clock mode is fast mode.
> + - standard is set when clock mode is standard mode.
> + $ref: /schemas/misc/nvidia,tegra-config-settings.yaml
> + unevaluatedProperties: false
> + properties:
> + nvidia,i2c-clk-divisor-hs-mode:
> + description: I2C clock divisor for HS mode.
So you decided to implement clocks in DT? No.
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 0xffff
Anyway divisors, clock rates and everything is human-readable so in
decimal, not hex.
There are also several issues further, like using wrong units (time has
a unit), but since this is RFC, I will just NAK.
Best regards,
Krzysztof
Powered by blists - more mailing lists