summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/i2c/samsung,s3c2410-i2c.yaml
blob: 84051b0129c2bc1739531b8b7b65c28601bbbd14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/samsung,s3c2410-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung S3C/S5P/Exynos SoC I2C Controller

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

properties:
  compatible:
    enum:
      - samsung,s3c2410-i2c
      - samsung,s3c2440-i2c
        # For s3c2440-like I2C used inside HDMIPHY block found on several SoCs:
      - samsung,s3c2440-hdmiphy-i2c
        # For s3c2440-like I2C used as a host to SATA PHY controller on an
        # internal bus:
      - samsung,exynos5-sata-phy-i2c

  '#address-cells':
    const: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: i2c

  gpios:
    description: |
      The order of the GPIOs should be the following:: <SDA, SCL>.  The GPIO
      specifier depends on the gpio controller. Required in all cases except
      for "samsung,s3c2440-hdmiphy-i2c" whose input/output lines are
      permanently wired to the respective client.
      This property is deprecated. Use "pinctrl-0" and "pinctrl-names" instead.
    deprecated: yes

  interrupts:
    maxItems: 1

  reg:
    maxItems: 1

  samsung,i2c-max-bus-freq:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Desired frequency in Hz of the bus.
    default: 100000

  samsung,i2c-sda-delay:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Delay (in ns) applied to data line (SDA) edges.
    default: 0

  samsung,i2c-slave-addr:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Slave address in multi-master environment.
    default: 0

  samsung,sysreg-phandle:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: Pandle to syscon used to control the system registers.

  '#size-cells':
    const: 0

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/i2c/i2c-controller.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,s3c2440-hdmiphy-i2c
              - samsung,exynos5-sata-phy-i2c
    then:
      properties:
        gpios: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,s3c2410-i2c
              - samsung,s3c2440-i2c
              - samsung,s3c2440-hdmiphy-i2c
    then:
      required:
        - interrupts

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/exynos5250.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    i2c@12c60000 {
        compatible = "samsung,s3c2440-i2c";
        reg = <0x12C60000 0x100>;
        interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
        #address-cells = <1>;
        #size-cells = <0>;
        clocks = <&clock CLK_I2C0>;
        clock-names = "i2c";
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_bus>;

        samsung,sysreg-phandle = <&sysreg_system_controller>;
        samsung,i2c-sda-delay = <100>;
        samsung,i2c-max-bus-freq = <20000>;
        samsung,i2c-slave-addr = <0x66>;

        eeprom@50 {
            compatible = "samsung,s524ad0xd1";
            reg = <0x50>;
        };
    };

    i2c@12ce0000 {
        compatible = "samsung,s3c2440-hdmiphy-i2c";
        reg = <0x12CE0000 0x1000>;
        interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
        #address-cells = <1>;
        #size-cells = <0>;
        clocks = <&clock CLK_I2C_HDMI>;
        clock-names = "i2c";

        samsung,i2c-sda-delay = <100>;
        samsung,i2c-max-bus-freq = <66000>;

        phy-i2c@38 {
            compatible = "samsung,exynos4212-hdmiphy";
            reg = <0x38>;
        };
    };

    i2c@121d0000 {
        compatible = "samsung,exynos5-sata-phy-i2c";
        reg = <0x121D0000 0x100>;
        #address-cells = <1>;
        #size-cells = <0>;
        clocks = <&clock CLK_SATA_PHYI2C>;
        clock-names = "i2c";

        samsung,i2c-sda-delay = <100>;
        samsung,i2c-max-bus-freq = <40000>;

        phy-i2c@38 {
            compatible = "samsung,exynos-sataphy-i2c";
            reg = <0x38>;
        };
    };