0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/i2c/samsung,s3c2410-i2c.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Samsung S3C/S5P/Exynos SoC I2C Controller
0008
0009 maintainers:
0010 - Krzysztof Kozlowski <krzk@kernel.org>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - samsung,s3c2410-i2c
0016 - samsung,s3c2440-i2c
0017 # For s3c2440-like I2C used inside HDMIPHY block found on several SoCs:
0018 - samsung,s3c2440-hdmiphy-i2c
0019 # For s3c2440-like I2C used as a host to SATA PHY controller on an
0020 # internal bus:
0021 - samsung,exynos5-sata-phy-i2c
0022
0023 '#address-cells':
0024 const: 1
0025
0026 clocks:
0027 maxItems: 1
0028
0029 clock-names:
0030 items:
0031 - const: i2c
0032
0033 gpios:
0034 description: |
0035 The order of the GPIOs should be the following:: <SDA, SCL>. The GPIO
0036 specifier depends on the gpio controller. Required in all cases except
0037 for "samsung,s3c2440-hdmiphy-i2c" whose input/output lines are
0038 permanently wired to the respective client.
0039 This property is deprecated. Use "pinctrl-0" and "pinctrl-names" instead.
0040 deprecated: yes
0041
0042 interrupts:
0043 maxItems: 1
0044
0045 reg:
0046 maxItems: 1
0047
0048 samsung,i2c-max-bus-freq:
0049 $ref: /schemas/types.yaml#/definitions/uint32
0050 description:
0051 Desired frequency in Hz of the bus.
0052 default: 100000
0053
0054 samsung,i2c-sda-delay:
0055 $ref: /schemas/types.yaml#/definitions/uint32
0056 description:
0057 Delay (in ns) applied to data line (SDA) edges.
0058 default: 0
0059
0060 samsung,i2c-slave-addr:
0061 $ref: /schemas/types.yaml#/definitions/uint32
0062 description:
0063 Slave address in multi-master environment.
0064 default: 0
0065
0066 samsung,sysreg-phandle:
0067 $ref: /schemas/types.yaml#/definitions/phandle
0068 description: Pandle to syscon used to control the system registers.
0069
0070 '#size-cells':
0071 const: 0
0072
0073 required:
0074 - compatible
0075 - reg
0076
0077 allOf:
0078 - $ref: /schemas/i2c/i2c-controller.yaml#
0079 - if:
0080 properties:
0081 compatible:
0082 contains:
0083 enum:
0084 - samsung,s3c2440-hdmiphy-i2c
0085 - samsung,exynos5-sata-phy-i2c
0086 then:
0087 properties:
0088 gpios: false
0089
0090 - if:
0091 properties:
0092 compatible:
0093 contains:
0094 enum:
0095 - samsung,s3c2410-i2c
0096 - samsung,s3c2440-i2c
0097 - samsung,s3c2440-hdmiphy-i2c
0098 then:
0099 required:
0100 - interrupts
0101
0102 unevaluatedProperties: false
0103
0104 examples:
0105 - |
0106 #include <dt-bindings/clock/exynos5250.h>
0107 #include <dt-bindings/interrupt-controller/arm-gic.h>
0108
0109 i2c@12c60000 {
0110 compatible = "samsung,s3c2440-i2c";
0111 reg = <0x12C60000 0x100>;
0112 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
0113 #address-cells = <1>;
0114 #size-cells = <0>;
0115 clocks = <&clock CLK_I2C0>;
0116 clock-names = "i2c";
0117 pinctrl-names = "default";
0118 pinctrl-0 = <&i2c0_bus>;
0119
0120 samsung,sysreg-phandle = <&sysreg_system_controller>;
0121 samsung,i2c-sda-delay = <100>;
0122 samsung,i2c-max-bus-freq = <20000>;
0123 samsung,i2c-slave-addr = <0x66>;
0124
0125 eeprom@50 {
0126 compatible = "samsung,s524ad0xd1", "atmel,24c128";
0127 reg = <0x50>;
0128 };
0129 };
0130
0131 i2c@12ce0000 {
0132 compatible = "samsung,s3c2440-hdmiphy-i2c";
0133 reg = <0x12CE0000 0x1000>;
0134 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
0135 #address-cells = <1>;
0136 #size-cells = <0>;
0137 clocks = <&clock CLK_I2C_HDMI>;
0138 clock-names = "i2c";
0139
0140 samsung,i2c-sda-delay = <100>;
0141 samsung,i2c-max-bus-freq = <66000>;
0142
0143 phy-i2c@38 {
0144 compatible = "samsung,exynos4212-hdmiphy";
0145 reg = <0x38>;
0146 };
0147 };
0148
0149 i2c@121d0000 {
0150 compatible = "samsung,exynos5-sata-phy-i2c";
0151 reg = <0x121D0000 0x100>;
0152 #address-cells = <1>;
0153 #size-cells = <0>;
0154 clocks = <&clock CLK_SATA_PHYI2C>;
0155 clock-names = "i2c";
0156
0157 samsung,i2c-sda-delay = <100>;
0158 samsung,i2c-max-bus-freq = <40000>;
0159
0160 phy-i2c@38 {
0161 compatible = "samsung,exynos-sataphy-i2c";
0162 reg = <0x38>;
0163 };
0164 };