xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/loongson,ls2x-i2c.yaml (revision fe75646a0234a261c0013bf1840fdac4acaf0cec)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/i2c/loongson,ls2x-i2c.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Loongson LS2X I2C Controller
8
9maintainers:
10  - Binbin Zhou <zhoubinbin@loongson.cn>
11
12allOf:
13  - $ref: /schemas/i2c/i2c-controller.yaml#
14
15properties:
16  compatible:
17    enum:
18      - loongson,ls2k-i2c
19      - loongson,ls7a-i2c
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27required:
28  - compatible
29  - reg
30  - interrupts
31
32unevaluatedProperties: false
33
34examples:
35  - |
36    #include <dt-bindings/interrupt-controller/irq.h>
37
38    i2c0: i2c@1fe21000 {
39        compatible = "loongson,ls2k-i2c";
40        reg = <0x1fe21000 0x8>;
41        interrupt-parent = <&extioiic>;
42        interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
43        #address-cells = <1>;
44        #size-cells = <0>;
45
46        eeprom@57 {
47            compatible = "atmel,24c16";
48            reg = <0x57>;
49            pagesize = <16>;
50        };
51    };
52