* [PATCH v2] dt-bindings: i2c: i2c-st: convert to DT schema
@ 2023-02-13 19:16 Alain Volmat
2023-02-14 8:22 ` Krzysztof Kozlowski
2023-02-15 19:58 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Alain Volmat @ 2023-02-13 19:16 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Patrice Chotard
Cc: Alain Volmat, linux-i2c, devicetree, linux-kernel, linux-arm-kernel
Convert i2c-st.txt into st,sti-i2c.yaml for the i2c-st driver.
Signed-off-by: Alain Volmat <avolmat@me.com>
---
v2: correct subject / commit log
add default clock-frequency
remove maxItems for st,i2c-min-scl-pulse-width-us &
st,i2c-min-sda-pulse-width-us
remove extra spaces within example
.../devicetree/bindings/i2c/i2c-st.txt | 41 -----------
.../devicetree/bindings/i2c/st,sti-i2c.yaml | 71 +++++++++++++++++++
MAINTAINERS | 2 +-
3 files changed, 72 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..08f9c1e446fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
@@ -0,0 +1,71 @@
+# 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.
+
+ 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.
+
+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";
+ 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/MAINTAINERS b/MAINTAINERS
index 06d5be2c713c..2e32eb8d44f5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2925,7 +2925,7 @@ M: Patrice Chotard <patrice.chotard@foss.st.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
W: http://www.stlinux.com
-F: Documentation/devicetree/bindings/i2c/i2c-st.txt
+F: Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
F: arch/arm/boot/dts/sti*
F: arch/arm/mach-sti/
F: drivers/ata/ahci_st.c
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dt-bindings: i2c: i2c-st: convert to DT schema
2023-02-13 19:16 [PATCH v2] dt-bindings: i2c: i2c-st: convert to DT schema Alain Volmat
@ 2023-02-14 8:22 ` Krzysztof Kozlowski
2023-02-15 19:58 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-14 8:22 UTC (permalink / raw)
To: Alain Volmat, Rob Herring, Krzysztof Kozlowski, Patrice Chotard
Cc: linux-i2c, devicetree, linux-kernel, linux-arm-kernel
On 13/02/2023 20:16, Alain Volmat wrote:
> Convert i2c-st.txt into st,sti-i2c.yaml for the i2c-st driver.
>
> Signed-off-by: Alain Volmat <avolmat@me.com>
> ---
> v2: correct subject / commit log
> add default clock-frequency
> remove maxItems for st,i2c-min-scl-pulse-width-us &
> st,i2c-min-sda-pulse-width-us
> remove extra spaces within example
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dt-bindings: i2c: i2c-st: convert to DT schema
2023-02-13 19:16 [PATCH v2] dt-bindings: i2c: i2c-st: convert to DT schema Alain Volmat
2023-02-14 8:22 ` Krzysztof Kozlowski
@ 2023-02-15 19:58 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-02-15 19:58 UTC (permalink / raw)
To: Alain Volmat
Cc: Rob Herring, Krzysztof Kozlowski, Patrice Chotard, linux-i2c,
devicetree, linux-kernel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
On Mon, Feb 13, 2023 at 08:16:06PM +0100, Alain Volmat wrote:
> Convert i2c-st.txt into st,sti-i2c.yaml for the i2c-st driver.
>
> Signed-off-by: Alain Volmat <avolmat@me.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-15 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 19:16 [PATCH v2] dt-bindings: i2c: i2c-st: convert to DT schema Alain Volmat
2023-02-14 8:22 ` Krzysztof Kozlowski
2023-02-15 19:58 ` Wolfram Sang
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).