Skip to content

Commit

Permalink
dt-bindings: i2c: i2c-st: convert to DT schema
Browse files Browse the repository at this point in the history
Convert i2c-st.txt into st,sti-i2c.yaml for the i2c-st driver.

Signed-off-by: Alain Volmat <avolmat@me.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Alain Volmat authored and Wolfram Sang committed Feb 15, 2023
1 parent eb4d8ba commit b3de755
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 42 deletions.
41 changes: 0 additions & 41 deletions Documentation/devicetree/bindings/i2c/i2c-st.txt

This file was deleted.

71 changes: 71 additions & 0 deletions Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml
Original file line number Diff line number Diff line change
@@ -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>;
};
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3de755

Please sign in to comment.