xref: /linux/Documentation/devicetree/bindings/i2c/ingenic,i2c.yaml (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1118a209dSPaul Cercueil# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2118a209dSPaul Cercueil%YAML 1.2
3118a209dSPaul Cercueil---
4118a209dSPaul Cercueil$id: http://devicetree.org/schemas/i2c/ingenic,i2c.yaml#
5118a209dSPaul Cercueil$schema: http://devicetree.org/meta-schemas/core.yaml#
6118a209dSPaul Cercueil
7*a612130cSKrzysztof Kozlowskititle: Ingenic SoCs I2C controller
8118a209dSPaul Cercueil
9118a209dSPaul Cercueilmaintainers:
10118a209dSPaul Cercueil  - Paul Cercueil <paul@crapouillou.net>
11118a209dSPaul Cercueil
12118a209dSPaul CercueilallOf:
13118a209dSPaul Cercueil  - $ref: /schemas/i2c/i2c-controller.yaml#
14118a209dSPaul Cercueil
15118a209dSPaul Cercueilproperties:
16118a209dSPaul Cercueil  $nodename:
17118a209dSPaul Cercueil    pattern: "^i2c@[0-9a-f]+$"
18118a209dSPaul Cercueil
19118a209dSPaul Cercueil  compatible:
20b74b33f5SPaul Cercueil    oneOf:
21b74b33f5SPaul Cercueil      - enum:
22b74b33f5SPaul Cercueil          - ingenic,jz4770-i2c
23118a209dSPaul Cercueil          - ingenic,x1000-i2c
24b74b33f5SPaul Cercueil      - items:
25b74b33f5SPaul Cercueil          - const: ingenic,jz4780-i2c
26b74b33f5SPaul Cercueil          - const: ingenic,jz4770-i2c
27118a209dSPaul Cercueil
28118a209dSPaul Cercueil  reg:
29118a209dSPaul Cercueil    maxItems: 1
30118a209dSPaul Cercueil
31118a209dSPaul Cercueil  interrupts:
32118a209dSPaul Cercueil    maxItems: 1
33118a209dSPaul Cercueil
34118a209dSPaul Cercueil  clocks:
35118a209dSPaul Cercueil    maxItems: 1
36118a209dSPaul Cercueil
37118a209dSPaul Cercueil  clock-frequency:
38118a209dSPaul Cercueil    enum: [ 100000, 400000 ]
39118a209dSPaul Cercueil
40118a209dSPaul Cercueil  dmas:
41118a209dSPaul Cercueil    items:
42118a209dSPaul Cercueil      - description: DMA controller phandle and request line for RX
43118a209dSPaul Cercueil      - description: DMA controller phandle and request line for TX
44118a209dSPaul Cercueil
45118a209dSPaul Cercueil  dma-names:
46118a209dSPaul Cercueil    items:
47118a209dSPaul Cercueil      - const: rx
48118a209dSPaul Cercueil      - const: tx
49118a209dSPaul Cercueil
50118a209dSPaul Cercueilrequired:
51118a209dSPaul Cercueil  - compatible
52118a209dSPaul Cercueil  - reg
53118a209dSPaul Cercueil  - interrupts
54118a209dSPaul Cercueil  - clocks
55118a209dSPaul Cercueil  - clock-frequency
56118a209dSPaul Cercueil  - dmas
57118a209dSPaul Cercueil  - dma-names
58118a209dSPaul Cercueil
59118a209dSPaul CercueilunevaluatedProperties: false
60118a209dSPaul Cercueil
61118a209dSPaul Cercueilexamples:
62118a209dSPaul Cercueil  - |
63c4a11bf4SPaul Cercueil    #include <dt-bindings/clock/ingenic,jz4780-cgu.h>
64118a209dSPaul Cercueil    #include <dt-bindings/dma/jz4780-dma.h>
65118a209dSPaul Cercueil    #include <dt-bindings/interrupt-controller/irq.h>
66118a209dSPaul Cercueil    i2c@10054000 {
67b74b33f5SPaul Cercueil      compatible = "ingenic,jz4780-i2c", "ingenic,jz4770-i2c";
68118a209dSPaul Cercueil      #address-cells = <1>;
69118a209dSPaul Cercueil      #size-cells = <0>;
70118a209dSPaul Cercueil      reg = <0x10054000 0x1000>;
71118a209dSPaul Cercueil
72b588772aSRob Herring      interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
73118a209dSPaul Cercueil
74118a209dSPaul Cercueil      clocks = <&cgu JZ4780_CLK_SMB4>;
75118a209dSPaul Cercueil      pinctrl-names = "default";
76118a209dSPaul Cercueil      pinctrl-0 = <&pins_i2c4_data>;
77118a209dSPaul Cercueil
78118a209dSPaul Cercueil      dmas = <&dma JZ4780_DMA_SMB4_RX 0xffffffff>,
79118a209dSPaul Cercueil             <&dma JZ4780_DMA_SMB4_TX 0xffffffff>;
80118a209dSPaul Cercueil      dma-names = "rx", "tx";
81118a209dSPaul Cercueil
82118a209dSPaul Cercueil      clock-frequency = <400000>;
83118a209dSPaul Cercueil
84118a209dSPaul Cercueil      rtc@51 {
85118a209dSPaul Cercueil        compatible = "nxp,pcf8563";
86118a209dSPaul Cercueil        reg = <0x51>;
87118a209dSPaul Cercueil
88118a209dSPaul Cercueil        interrupts = <30 IRQ_TYPE_LEVEL_LOW>;
89118a209dSPaul Cercueil      };
90118a209dSPaul Cercueil    };
91