xref: /linux/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml (revision 7677fdbc036b93a882f660ca2484a6807e72f0be)
15ae45114SSam Protsenko# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25ae45114SSam Protsenko%YAML 1.2
35ae45114SSam Protsenko---
45ae45114SSam Protsenko$id: http://devicetree.org/schemas/i2c/i2c-exynos5.yaml#
55ae45114SSam Protsenko$schema: http://devicetree.org/meta-schemas/core.yaml#
65ae45114SSam Protsenko
75ae45114SSam Protsenkotitle: Samsung's High Speed I2C controller
85ae45114SSam Protsenko
95ae45114SSam Protsenkomaintainers:
108a1e6bb3SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzk@kernel.org>
115ae45114SSam Protsenko
125ae45114SSam Protsenkodescription: |
135ae45114SSam Protsenko  The Samsung's High Speed I2C controller is used to interface with I2C devices
145ae45114SSam Protsenko  at various speeds ranging from 100kHz to 3.4MHz.
155ae45114SSam Protsenko
16bd5f985dSJaewon Kim  In case the HSI2C controller is encapsulated within USI block (it's the case
17bd5f985dSJaewon Kim  e.g. for Exynos850 and Exynos Auto V9 SoCs), it might be also necessary to
18bd5f985dSJaewon Kim  define USI node in device tree file, choosing "i2c" configuration. Please see
19bd5f985dSJaewon Kim  Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml for details.
20bd5f985dSJaewon Kim
215ae45114SSam Protsenkoproperties:
225ae45114SSam Protsenko  compatible:
235ae45114SSam Protsenko    oneOf:
245ae45114SSam Protsenko      - enum:
255ae45114SSam Protsenko          - samsung,exynos5250-hsi2c    # Exynos5250 and Exynos5420
265ae45114SSam Protsenko          - samsung,exynos5260-hsi2c    # Exynos5260
275ae45114SSam Protsenko          - samsung,exynos7-hsi2c       # Exynos7
289da80ed6SKrzysztof Kozlowski          - samsung,exynosautov9-hsi2c
299da80ed6SKrzysztof Kozlowski      - items:
309da80ed6SKrzysztof Kozlowski          - enum:
319da80ed6SKrzysztof Kozlowski              - samsung,exynos5433-hsi2c
32*7677fdbcSKrzysztof Kozlowski              - tesla,fsd-hsi2c
339da80ed6SKrzysztof Kozlowski          - const: samsung,exynos7-hsi2c
349da80ed6SKrzysztof Kozlowski      - items:
359da80ed6SKrzysztof Kozlowski          - enum:
369da80ed6SKrzysztof Kozlowski              - samsung,exynos850-hsi2c
379da80ed6SKrzysztof Kozlowski          - const: samsung,exynosautov9-hsi2c
385ae45114SSam Protsenko      - const: samsung,exynos5-hsi2c    # Exynos5250 and Exynos5420
395ae45114SSam Protsenko        deprecated: true
405ae45114SSam Protsenko
415ae45114SSam Protsenko  reg:
425ae45114SSam Protsenko    maxItems: 1
435ae45114SSam Protsenko
445ae45114SSam Protsenko  interrupts:
455ae45114SSam Protsenko    maxItems: 1
465ae45114SSam Protsenko
475ae45114SSam Protsenko  clock-frequency:
485ae45114SSam Protsenko    default: 100000
495ae45114SSam Protsenko    description:
505ae45114SSam Protsenko      Desired operating frequency in Hz of the bus.
515ae45114SSam Protsenko
525ae45114SSam Protsenko      If not specified, the bus operates in fast-speed mode at 100kHz.
535ae45114SSam Protsenko
545ae45114SSam Protsenko      If specified, the bus operates in high-speed mode only if the
555ae45114SSam Protsenko      clock-frequency is >= 1MHz.
565ae45114SSam Protsenko
575ae45114SSam Protsenko  clocks:
58ea8491a2SSam Protsenko    minItems: 1
59ea8491a2SSam Protsenko    items:
60ea8491a2SSam Protsenko      - description: I2C operating clock
61ea8491a2SSam Protsenko      - description: Bus clock (APB)
625ae45114SSam Protsenko
635ae45114SSam Protsenko  clock-names:
64ea8491a2SSam Protsenko    minItems: 1
65ea8491a2SSam Protsenko    items:
66ea8491a2SSam Protsenko      - const: hsi2c
67ea8491a2SSam Protsenko      - const: hsi2c_pclk
685ae45114SSam Protsenko
695ae45114SSam Protsenkorequired:
705ae45114SSam Protsenko  - compatible
715ae45114SSam Protsenko  - reg
725ae45114SSam Protsenko  - interrupts
735ae45114SSam Protsenko  - clocks
745ae45114SSam Protsenko
75ea8491a2SSam ProtsenkoallOf:
76ea8491a2SSam Protsenko  - $ref: /schemas/i2c/i2c-controller.yaml#
77ea8491a2SSam Protsenko  - if:
78ea8491a2SSam Protsenko      properties:
79ea8491a2SSam Protsenko        compatible:
80ea8491a2SSam Protsenko          contains:
81ea8491a2SSam Protsenko            enum:
82ea8491a2SSam Protsenko              - samsung,exynosautov9-hsi2c
83ea8491a2SSam Protsenko
84ea8491a2SSam Protsenko    then:
85ea8491a2SSam Protsenko      properties:
86ea8491a2SSam Protsenko        clocks:
87ea8491a2SSam Protsenko          minItems: 2
88ea8491a2SSam Protsenko
89ea8491a2SSam Protsenko        clock-names:
90ea8491a2SSam Protsenko          minItems: 2
91ea8491a2SSam Protsenko
92ea8491a2SSam Protsenko      required:
93ea8491a2SSam Protsenko        - clock-names
94ea8491a2SSam Protsenko
95ea8491a2SSam Protsenko    else:
96ea8491a2SSam Protsenko      properties:
97ea8491a2SSam Protsenko        clocks:
98ea8491a2SSam Protsenko          maxItems: 1
99ea8491a2SSam Protsenko
1005ae45114SSam ProtsenkounevaluatedProperties: false
1015ae45114SSam Protsenko
1025ae45114SSam Protsenkoexamples:
1035ae45114SSam Protsenko  - |
1045ae45114SSam Protsenko    #include <dt-bindings/clock/exynos5420.h>
1055ae45114SSam Protsenko    #include <dt-bindings/interrupt-controller/arm-gic.h>
1065ae45114SSam Protsenko    #include <dt-bindings/interrupt-controller/irq.h>
1075ae45114SSam Protsenko
1085ae45114SSam Protsenko    hsi2c_8: i2c@12e00000 {
1095ae45114SSam Protsenko        compatible = "samsung,exynos5250-hsi2c";
1105ae45114SSam Protsenko        reg = <0x12e00000 0x1000>;
1115ae45114SSam Protsenko        interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
1125ae45114SSam Protsenko        #address-cells = <1>;
1135ae45114SSam Protsenko        #size-cells = <0>;
1145ae45114SSam Protsenko        clock-frequency = <100000>;
1155ae45114SSam Protsenko        clocks = <&clock CLK_USI4>;
1165ae45114SSam Protsenko        clock-names = "hsi2c";
1175ae45114SSam Protsenko
1185ae45114SSam Protsenko        pmic@66 {
1195ae45114SSam Protsenko            /* compatible = "samsung,s2mps11-pmic"; */
1205ae45114SSam Protsenko            reg = <0x66>;
1215ae45114SSam Protsenko        };
1225ae45114SSam Protsenko    };
123ea8491a2SSam Protsenko
124ea8491a2SSam Protsenko  - |
125ea8491a2SSam Protsenko    #include <dt-bindings/clock/exynos850.h>
126ea8491a2SSam Protsenko    #include <dt-bindings/interrupt-controller/arm-gic.h>
127ea8491a2SSam Protsenko
128ea8491a2SSam Protsenko    hsi2c_2: i2c@138c0000 {
129ea8491a2SSam Protsenko        compatible = "samsung,exynosautov9-hsi2c";
130ea8491a2SSam Protsenko        reg = <0x138c0000 0xc0>;
131ea8491a2SSam Protsenko        interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
132ea8491a2SSam Protsenko        #address-cells = <1>;
133ea8491a2SSam Protsenko        #size-cells = <0>;
134ea8491a2SSam Protsenko        clocks = <&cmu_peri CLK_GOUT_HSI2C2_IPCLK>,
135ea8491a2SSam Protsenko                 <&cmu_peri CLK_GOUT_HSI2C2_PCLK>;
136ea8491a2SSam Protsenko        clock-names = "hsi2c", "hsi2c_pclk";
137ea8491a2SSam Protsenko
138ea8491a2SSam Protsenko        pmic@66 {
139ea8491a2SSam Protsenko            /* compatible = "samsung,s2mps11-pmic"; */
140ea8491a2SSam Protsenko            reg = <0x66>;
141ea8491a2SSam Protsenko        };
142ea8491a2SSam Protsenko    };
143