xref: /linux/Documentation/devicetree/bindings/i2c/ingenic,i2c.yaml (revision 48dea9a700c8728cc31a1dd44588b97578de86ee)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/i2c/ingenic,i2c.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ingenic SoCs I2C controller devicetree bindings
8
9maintainers:
10  - Paul Cercueil <paul@crapouillou.net>
11
12allOf:
13  - $ref: /schemas/i2c/i2c-controller.yaml#
14
15properties:
16  $nodename:
17    pattern: "^i2c@[0-9a-f]+$"
18
19  compatible:
20    enum:
21      - ingenic,jz4780-i2c
22      - ingenic,x1000-i2c
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  clocks:
31    maxItems: 1
32
33  clock-frequency:
34    enum: [ 100000, 400000 ]
35
36  dmas:
37    items:
38      - description: DMA controller phandle and request line for RX
39      - description: DMA controller phandle and request line for TX
40
41  dma-names:
42    items:
43      - const: rx
44      - const: tx
45
46required:
47  - compatible
48  - reg
49  - interrupts
50  - clocks
51  - clock-frequency
52  - dmas
53  - dma-names
54
55unevaluatedProperties: false
56
57examples:
58  - |
59    #include <dt-bindings/clock/jz4780-cgu.h>
60    #include <dt-bindings/dma/jz4780-dma.h>
61    #include <dt-bindings/interrupt-controller/irq.h>
62    i2c@10054000 {
63      compatible = "ingenic,jz4780-i2c";
64      #address-cells = <1>;
65      #size-cells = <0>;
66      reg = <0x10054000 0x1000>;
67
68      interrupt-parent = <&intc>;
69      interrupts = <56>;
70
71      clocks = <&cgu JZ4780_CLK_SMB4>;
72      pinctrl-names = "default";
73      pinctrl-0 = <&pins_i2c4_data>;
74
75      dmas = <&dma JZ4780_DMA_SMB4_RX 0xffffffff>,
76             <&dma JZ4780_DMA_SMB4_TX 0xffffffff>;
77      dma-names = "rx", "tx";
78
79      clock-frequency = <400000>;
80
81      rtc@51 {
82        compatible = "nxp,pcf8563";
83        reg = <0x51>;
84
85        interrupt-parent = <&gpf>;
86        interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
87      };
88    };
89