Skip to content

Commit 7f815fc

Browse files
vireshkmstsirkin
authored andcommitted
dt-bindings: i2c: Add bindings for i2c-virtio
This patch adds binding for virtio I2C device, it is based on virtio-device bindings. Acked-by: Wolfram Sang <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Link: https://lore.kernel.org/r/33c317b95097ce491845c697db1e8285e3ec1d41.1627362340.git.viresh.kumar@linaro.org Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Rob Herring <[email protected]>
1 parent ad93f7b commit 7f815fc

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/i2c/i2c-virtio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Virtio I2C Adapter
8+
9+
maintainers:
10+
- Viresh Kumar <[email protected]>
11+
12+
allOf:
13+
- $ref: /schemas/i2c/i2c-controller.yaml#
14+
- $ref: /schemas/virtio/virtio-device.yaml#
15+
16+
description:
17+
Virtio I2C device, see /schemas/virtio/virtio-device.yaml for more details.
18+
19+
properties:
20+
$nodename:
21+
const: i2c
22+
23+
compatible:
24+
const: virtio,device22
25+
26+
required:
27+
- compatible
28+
29+
unevaluatedProperties: false
30+
31+
examples:
32+
- |
33+
virtio@3000 {
34+
compatible = "virtio,mmio";
35+
reg = <0x3000 0x100>;
36+
interrupts = <41>;
37+
38+
i2c {
39+
compatible = "virtio,device22";
40+
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
light-sensor@20 {
45+
compatible = "dynaimage,al3320a";
46+
reg = <0x20>;
47+
};
48+
};
49+
};
50+
51+
...

0 commit comments

Comments
 (0)