Skip to content

Commit

Permalink
dt-bindings: i2c: renesas,riic: Convert to json-schema
Browse files Browse the repository at this point in the history
Convert the Renesas RZ/A I2C Bus Interface (RIIC) Device Tree binding
documentation to json-schema.

Document missing properties.
Update the example to match reality.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Geert Uytterhoeven authored and Wolfram Sang committed May 28, 2021
1 parent 6221a93 commit 92b7716
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 33 deletions.
32 changes: 0 additions & 32 deletions Documentation/devicetree/bindings/i2c/renesas,riic.txt

This file was deleted.

82 changes: 82 additions & 0 deletions Documentation/devicetree/bindings/i2c/renesas,riic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/renesas,riic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas RZ/A I2C Bus Interface (RIIC)

maintainers:
- Chris Brandt <chris.brandt@renesas.com>
- Wolfram Sang <wsa+renesas@sang-engineering.com>

allOf:
- $ref: /schemas/i2c/i2c-controller.yaml#

properties:
compatible:
items:
- enum:
- renesas,riic-r7s72100 # RZ/A1H
- renesas,riic-r7s9210 # RZ/A2M
- const: renesas,riic-rz # RZ/A

reg:
maxItems: 1

interrupts:
items:
- description: Transmit End Interrupt (TEI)
- description: Receive Data Full Interrupt (RI)
- description: Transmit Data Empty Interrupt (TI)
- description: Stop Condition Detection Interrupt (SPI)
- description: Start Condition Detection Interrupt (STI)
- description: NACK Reception Interrupt (NAKI)
- description: Arbitration-Lost Interrupt (ALI)
- description: Timeout Interrupt (TMOI)

clock-frequency:
description:
Desired I2C bus clock frequency in Hz. The absence of this property
indicates the default frequency 100 kHz.

clocks:
maxItems: 1

power-domains:
maxItems: 1

required:
- compatible
- reg
- interrupts
- clocks
- clock-frequency
- power-domains
- '#address-cells'
- '#size-cells'

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/clock/r7s72100-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
i2c0: i2c@fcfee000 {
compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
reg = <0xfcfee000 0x44>;
interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 158 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 159 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
clock-frequency = <100000>;
power-domains = <&cpg_clocks>;
#address-cells = <1>;
#size-cells = <0>;
};
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -15613,7 +15613,7 @@ F: drivers/thermal/rcar_thermal.c
RENESAS RIIC DRIVER
M: Chris Brandt <chris.brandt@renesas.com>
S: Supported
F: Documentation/devicetree/bindings/i2c/renesas,riic.txt
F: Documentation/devicetree/bindings/i2c/renesas,riic.yaml
F: drivers/i2c/busses/i2c-riic.c

RENESAS USB PHY DRIVER
Expand Down

0 comments on commit 92b7716

Please sign in to comment.