xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/i2c-exynos5.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1e67e8565SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e67e8565SEmmanuel Vadot%YAML 1.2
3e67e8565SEmmanuel Vadot---
4e67e8565SEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/i2c-exynos5.yaml#
5e67e8565SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6e67e8565SEmmanuel Vadot
7e67e8565SEmmanuel Vadottitle: Samsung's High Speed I2C controller
8e67e8565SEmmanuel Vadot
9e67e8565SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
11e67e8565SEmmanuel Vadot
12e67e8565SEmmanuel Vadotdescription: |
13e67e8565SEmmanuel Vadot  The Samsung's High Speed I2C controller is used to interface with I2C devices
14e67e8565SEmmanuel Vadot  at various speeds ranging from 100kHz to 3.4MHz.
15e67e8565SEmmanuel Vadot
16e67e8565SEmmanuel Vadot  In case the HSI2C controller is encapsulated within USI block (it's the case
17e67e8565SEmmanuel Vadot  e.g. for Exynos850 and Exynos Auto V9 SoCs), it might be also necessary to
18e67e8565SEmmanuel Vadot  define USI node in device tree file, choosing "i2c" configuration. Please see
19e67e8565SEmmanuel Vadot  Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml for details.
20e67e8565SEmmanuel Vadot
21e67e8565SEmmanuel Vadotproperties:
22e67e8565SEmmanuel Vadot  compatible:
23e67e8565SEmmanuel Vadot    oneOf:
24e67e8565SEmmanuel Vadot      - enum:
25e67e8565SEmmanuel Vadot          - samsung,exynos5250-hsi2c    # Exynos5250 and Exynos5420
26e67e8565SEmmanuel Vadot          - samsung,exynos5260-hsi2c    # Exynos5260
27e67e8565SEmmanuel Vadot          - samsung,exynos7-hsi2c       # Exynos7
288d13bc63SEmmanuel Vadot          - samsung,exynosautov9-hsi2c
298d13bc63SEmmanuel Vadot      - items:
308d13bc63SEmmanuel Vadot          - enum:
318d13bc63SEmmanuel Vadot              - samsung,exynos5433-hsi2c
328d13bc63SEmmanuel Vadot              - tesla,fsd-hsi2c
338d13bc63SEmmanuel Vadot          - const: samsung,exynos7-hsi2c
348d13bc63SEmmanuel Vadot      - items:
358d13bc63SEmmanuel Vadot          - enum:
36*01950c46SEmmanuel Vadot              - google,gs101-hsi2c
378d13bc63SEmmanuel Vadot              - samsung,exynos850-hsi2c
388d13bc63SEmmanuel Vadot          - const: samsung,exynosautov9-hsi2c
39e67e8565SEmmanuel Vadot      - const: samsung,exynos5-hsi2c    # Exynos5250 and Exynos5420
40e67e8565SEmmanuel Vadot        deprecated: true
41e67e8565SEmmanuel Vadot
42e67e8565SEmmanuel Vadot  reg:
43e67e8565SEmmanuel Vadot    maxItems: 1
44e67e8565SEmmanuel Vadot
45e67e8565SEmmanuel Vadot  interrupts:
46e67e8565SEmmanuel Vadot    maxItems: 1
47e67e8565SEmmanuel Vadot
48e67e8565SEmmanuel Vadot  clock-frequency:
49e67e8565SEmmanuel Vadot    default: 100000
50e67e8565SEmmanuel Vadot    description:
51e67e8565SEmmanuel Vadot      Desired operating frequency in Hz of the bus.
52e67e8565SEmmanuel Vadot
53e67e8565SEmmanuel Vadot      If not specified, the bus operates in fast-speed mode at 100kHz.
54e67e8565SEmmanuel Vadot
55e67e8565SEmmanuel Vadot      If specified, the bus operates in high-speed mode only if the
56e67e8565SEmmanuel Vadot      clock-frequency is >= 1MHz.
57e67e8565SEmmanuel Vadot
58e67e8565SEmmanuel Vadot  clocks:
59e67e8565SEmmanuel Vadot    minItems: 1
60e67e8565SEmmanuel Vadot    items:
61e67e8565SEmmanuel Vadot      - description: I2C operating clock
62e67e8565SEmmanuel Vadot      - description: Bus clock (APB)
63e67e8565SEmmanuel Vadot
64e67e8565SEmmanuel Vadot  clock-names:
65e67e8565SEmmanuel Vadot    minItems: 1
66e67e8565SEmmanuel Vadot    items:
67e67e8565SEmmanuel Vadot      - const: hsi2c
68e67e8565SEmmanuel Vadot      - const: hsi2c_pclk
69e67e8565SEmmanuel Vadot
70e67e8565SEmmanuel Vadotrequired:
71e67e8565SEmmanuel Vadot  - compatible
72e67e8565SEmmanuel Vadot  - reg
73e67e8565SEmmanuel Vadot  - interrupts
74e67e8565SEmmanuel Vadot  - clocks
75e67e8565SEmmanuel Vadot
76e67e8565SEmmanuel VadotallOf:
77e67e8565SEmmanuel Vadot  - $ref: /schemas/i2c/i2c-controller.yaml#
78e67e8565SEmmanuel Vadot  - if:
79e67e8565SEmmanuel Vadot      properties:
80e67e8565SEmmanuel Vadot        compatible:
81e67e8565SEmmanuel Vadot          contains:
82e67e8565SEmmanuel Vadot            enum:
83e67e8565SEmmanuel Vadot              - samsung,exynosautov9-hsi2c
84e67e8565SEmmanuel Vadot
85e67e8565SEmmanuel Vadot    then:
86e67e8565SEmmanuel Vadot      properties:
87e67e8565SEmmanuel Vadot        clocks:
88e67e8565SEmmanuel Vadot          minItems: 2
89e67e8565SEmmanuel Vadot
90e67e8565SEmmanuel Vadot        clock-names:
91e67e8565SEmmanuel Vadot          minItems: 2
92e67e8565SEmmanuel Vadot
93e67e8565SEmmanuel Vadot      required:
94e67e8565SEmmanuel Vadot        - clock-names
95e67e8565SEmmanuel Vadot
96e67e8565SEmmanuel Vadot    else:
97e67e8565SEmmanuel Vadot      properties:
98e67e8565SEmmanuel Vadot        clocks:
99e67e8565SEmmanuel Vadot          maxItems: 1
100e67e8565SEmmanuel Vadot
101e67e8565SEmmanuel VadotunevaluatedProperties: false
102e67e8565SEmmanuel Vadot
103e67e8565SEmmanuel Vadotexamples:
104e67e8565SEmmanuel Vadot  - |
105e67e8565SEmmanuel Vadot    #include <dt-bindings/clock/exynos5420.h>
106e67e8565SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
107e67e8565SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
108e67e8565SEmmanuel Vadot
109e67e8565SEmmanuel Vadot    hsi2c_8: i2c@12e00000 {
110e67e8565SEmmanuel Vadot        compatible = "samsung,exynos5250-hsi2c";
111e67e8565SEmmanuel Vadot        reg = <0x12e00000 0x1000>;
112e67e8565SEmmanuel Vadot        interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
113e67e8565SEmmanuel Vadot        #address-cells = <1>;
114e67e8565SEmmanuel Vadot        #size-cells = <0>;
115e67e8565SEmmanuel Vadot        clock-frequency = <100000>;
116e67e8565SEmmanuel Vadot        clocks = <&clock CLK_USI4>;
117e67e8565SEmmanuel Vadot        clock-names = "hsi2c";
118e67e8565SEmmanuel Vadot
119e67e8565SEmmanuel Vadot        pmic@66 {
120e67e8565SEmmanuel Vadot            /* compatible = "samsung,s2mps11-pmic"; */
121e67e8565SEmmanuel Vadot            reg = <0x66>;
122e67e8565SEmmanuel Vadot        };
123e67e8565SEmmanuel Vadot    };
124e67e8565SEmmanuel Vadot
125e67e8565SEmmanuel Vadot  - |
126e67e8565SEmmanuel Vadot    #include <dt-bindings/clock/exynos850.h>
127e67e8565SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
128e67e8565SEmmanuel Vadot
129e67e8565SEmmanuel Vadot    hsi2c_2: i2c@138c0000 {
130e67e8565SEmmanuel Vadot        compatible = "samsung,exynosautov9-hsi2c";
131e67e8565SEmmanuel Vadot        reg = <0x138c0000 0xc0>;
132e67e8565SEmmanuel Vadot        interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
133e67e8565SEmmanuel Vadot        #address-cells = <1>;
134e67e8565SEmmanuel Vadot        #size-cells = <0>;
135e67e8565SEmmanuel Vadot        clocks = <&cmu_peri CLK_GOUT_HSI2C2_IPCLK>,
136e67e8565SEmmanuel Vadot                 <&cmu_peri CLK_GOUT_HSI2C2_PCLK>;
137e67e8565SEmmanuel Vadot        clock-names = "hsi2c", "hsi2c_pclk";
138e67e8565SEmmanuel Vadot
139e67e8565SEmmanuel Vadot        pmic@66 {
140e67e8565SEmmanuel Vadot            /* compatible = "samsung,s2mps11-pmic"; */
141e67e8565SEmmanuel Vadot            reg = <0x66>;
142e67e8565SEmmanuel Vadot        };
143e67e8565SEmmanuel Vadot    };
144