From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Alain Volmat <avolmat@me.com>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Patrice Chotard <patrice.chotard@foss.st.com>
Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] dt-bindings: i2c: conversion of i2c-st into DT schema YAML
Date: Mon, 13 Feb 2023 11:35:30 +0100 [thread overview]
Message-ID: <c5df077e-7ce1-0b59-bff0-847301c96d56@linaro.org> (raw)
In-Reply-To: <20230210101218.14529-1-avolmat@me.com>
On 10/02/2023 11:12, Alain Volmat wrote:
> File st,i2c.yaml replaces i2c-st.txt for the i2c-st driver.
Subject: dt-bindings: i2c: st,sti-i2c: convert to DT schema
(same reasoning as for SPI patch and maybe others)
>
> Signed-off-by: Alain Volmat <avolmat@me.com>
> ---
> .../devicetree/bindings/i2c/i2c-st.txt | 41 -----------
> .../devicetree/bindings/i2c/st,sti-i2c.yaml | 72 +++++++++++++++++++
> MAINTAINERS | 2 +-
> 3 files changed, 73 insertions(+), 42 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-st.txt
> create mode 100644 Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-st.txt b/Documentation/devicetree/bindings/i2c/i2c-st.txt
> deleted file mode 100644
> index 4c26fda3844a..000000000000
> --- a/Documentation/devicetree/bindings/i2c/i2c-st.txt
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -ST SSC binding, for I2C mode operation
> -
> -Required properties :
> -- compatible : Must be "st,comms-ssc-i2c" or "st,comms-ssc4-i2c"
> -- reg : Offset and length of the register set for the device
> -- interrupts : the interrupt specifier
> -- clock-names: Must contain "ssc".
> -- clocks: Must contain an entry for each name in clock-names. See the common
> - clock bindings.
> -- A pinctrl state named "default" must be defined to set pins in mode of
> - operation for I2C transfer.
> -
> -Optional properties :
> -- clock-frequency : Desired I2C bus clock frequency in Hz. If not specified,
> - the default 100 kHz frequency will be used. As only Normal and Fast modes
> - are supported, possible values are 100000 and 400000.
> -- st,i2c-min-scl-pulse-width-us : The minimum valid SCL pulse width that is
> - allowed through the deglitch circuit. In units of us.
> -- st,i2c-min-sda-pulse-width-us : The minimum valid SDA pulse width that is
> - allowed through the deglitch circuit. In units of us.
> -- A pinctrl state named "idle" could be defined to set pins in idle state
> - when I2C instance is not performing a transfer.
> -- A pinctrl state named "sleep" could be defined to set pins in sleep state
> - when driver enters in suspend.
> -
> -
> -
> -Example :
> -
> -i2c0: i2c@fed40000 {
> - compatible = "st,comms-ssc4-i2c";
> - reg = <0xfed40000 0x110>;
> - interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clk_s_a0_ls CLK_ICN_REG>;
> - clock-names = "ssc";
> - clock-frequency = <400000>;
> - pinctrl-names = "default";
> - pinctrl-0 = <&pinctrl_i2c0_default>;
> - st,i2c-min-scl-pulse-width-us = <0>;
> - st,i2c-min-sda-pulse-width-us = <5>;
> -};
> diff --git a/Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml b/Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
> new file mode 100644
> index 000000000000..dd6ff18b9ed7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/st,sti-i2c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: I2C controller embedded in STMicroelectronics STi platform
> +
> +maintainers:
> + - Patrice Chotard <patrice.chotard@foss.st.com>
> +
> +allOf:
> + - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - st,comms-ssc-i2c
> + - st,comms-ssc4-i2c
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + maxItems: 1
> +
> + clock-frequency:
> + enum: [ 100000, 400000 ]
default: 100000
> +
> + st,i2c-min-scl-pulse-width-us:
> + description:
> + The minimum valid SCL pulse width that is allowed through the
> + deglitch circuit. In units of us.
> + maxItems: 1
maxItems should not be needed.
> +
> + st,i2c-min-sda-pulse-width-us:
> + description:
> + The minimum valid SDA pulse width that is allowed through the
> + deglitch circuit. In units of us.
> + maxItems: 1
Ditto
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/clock/stih407-clks.h>
> + i2c@fed40000 {
> + compatible = "st,comms-ssc4-i2c";
Drop unnecessary spaces before =
Best regards,
Krzysztof
prev parent reply other threads:[~2023-02-13 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-10 10:12 [PATCH] dt-bindings: i2c: conversion of i2c-st into DT schema YAML Alain Volmat
2023-02-13 10:35 ` Krzysztof Kozlowski [this message]
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=c5df077e-7ce1-0b59-bff0-847301c96d56@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=avolmat@me.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrice.chotard@foss.st.com \
--cc=robh+dt@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).