1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/samsung,s3c2410-i2c.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: Samsung S3C/S5P/Exynos SoC I2C Controller 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Krzysztof Kozlowski <krzk@kernel.org> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel Vadotproperties: 13c9ccf3a3SEmmanuel Vadot compatible: 14*8d13bc63SEmmanuel Vadot oneOf: 15*8d13bc63SEmmanuel Vadot - enum: 16c9ccf3a3SEmmanuel Vadot - samsung,s3c2410-i2c 17c9ccf3a3SEmmanuel Vadot - samsung,s3c2440-i2c 18c9ccf3a3SEmmanuel Vadot # For s3c2440-like I2C used inside HDMIPHY block found on several SoCs: 19c9ccf3a3SEmmanuel Vadot - samsung,s3c2440-hdmiphy-i2c 20c9ccf3a3SEmmanuel Vadot # For s3c2440-like I2C used as a host to SATA PHY controller on an 21c9ccf3a3SEmmanuel Vadot # internal bus: 22c9ccf3a3SEmmanuel Vadot - samsung,exynos5-sata-phy-i2c 23*8d13bc63SEmmanuel Vadot - items: 24*8d13bc63SEmmanuel Vadot - enum: 25*8d13bc63SEmmanuel Vadot - samsung,exynos7885-i2c 26*8d13bc63SEmmanuel Vadot - samsung,exynos850-i2c 27*8d13bc63SEmmanuel Vadot - const: samsung,s3c2440-i2c 28c9ccf3a3SEmmanuel Vadot 29c9ccf3a3SEmmanuel Vadot '#address-cells': 30c9ccf3a3SEmmanuel Vadot const: 1 31c9ccf3a3SEmmanuel Vadot 32c9ccf3a3SEmmanuel Vadot clocks: 33c9ccf3a3SEmmanuel Vadot maxItems: 1 34c9ccf3a3SEmmanuel Vadot 35c9ccf3a3SEmmanuel Vadot clock-names: 36c9ccf3a3SEmmanuel Vadot items: 37c9ccf3a3SEmmanuel Vadot - const: i2c 38c9ccf3a3SEmmanuel Vadot 39c9ccf3a3SEmmanuel Vadot gpios: 40c9ccf3a3SEmmanuel Vadot description: | 41c9ccf3a3SEmmanuel Vadot The order of the GPIOs should be the following:: <SDA, SCL>. The GPIO 42c9ccf3a3SEmmanuel Vadot specifier depends on the gpio controller. Required in all cases except 43c9ccf3a3SEmmanuel Vadot for "samsung,s3c2440-hdmiphy-i2c" whose input/output lines are 44c9ccf3a3SEmmanuel Vadot permanently wired to the respective client. 45c9ccf3a3SEmmanuel Vadot This property is deprecated. Use "pinctrl-0" and "pinctrl-names" instead. 46fac71e4eSEmmanuel Vadot deprecated: true 47c9ccf3a3SEmmanuel Vadot 48c9ccf3a3SEmmanuel Vadot interrupts: 49c9ccf3a3SEmmanuel Vadot maxItems: 1 50c9ccf3a3SEmmanuel Vadot 51c9ccf3a3SEmmanuel Vadot reg: 52c9ccf3a3SEmmanuel Vadot maxItems: 1 53c9ccf3a3SEmmanuel Vadot 54c9ccf3a3SEmmanuel Vadot samsung,i2c-max-bus-freq: 55c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 56c9ccf3a3SEmmanuel Vadot description: 57c9ccf3a3SEmmanuel Vadot Desired frequency in Hz of the bus. 58c9ccf3a3SEmmanuel Vadot default: 100000 59c9ccf3a3SEmmanuel Vadot 60c9ccf3a3SEmmanuel Vadot samsung,i2c-sda-delay: 61c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 62c9ccf3a3SEmmanuel Vadot description: 63c9ccf3a3SEmmanuel Vadot Delay (in ns) applied to data line (SDA) edges. 64c9ccf3a3SEmmanuel Vadot default: 0 65c9ccf3a3SEmmanuel Vadot 66c9ccf3a3SEmmanuel Vadot samsung,i2c-slave-addr: 67c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 68c9ccf3a3SEmmanuel Vadot description: 69c9ccf3a3SEmmanuel Vadot Slave address in multi-master environment. 70c9ccf3a3SEmmanuel Vadot default: 0 71c9ccf3a3SEmmanuel Vadot 72c9ccf3a3SEmmanuel Vadot samsung,sysreg-phandle: 73c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 74c9ccf3a3SEmmanuel Vadot description: Pandle to syscon used to control the system registers. 75c9ccf3a3SEmmanuel Vadot 76c9ccf3a3SEmmanuel Vadot '#size-cells': 77c9ccf3a3SEmmanuel Vadot const: 0 78c9ccf3a3SEmmanuel Vadot 79c9ccf3a3SEmmanuel Vadotrequired: 80c9ccf3a3SEmmanuel Vadot - compatible 81c9ccf3a3SEmmanuel Vadot - reg 82c9ccf3a3SEmmanuel Vadot 83c9ccf3a3SEmmanuel VadotallOf: 84c9ccf3a3SEmmanuel Vadot - $ref: /schemas/i2c/i2c-controller.yaml# 85c9ccf3a3SEmmanuel Vadot - if: 86c9ccf3a3SEmmanuel Vadot properties: 87c9ccf3a3SEmmanuel Vadot compatible: 88c9ccf3a3SEmmanuel Vadot contains: 89c9ccf3a3SEmmanuel Vadot enum: 90c9ccf3a3SEmmanuel Vadot - samsung,s3c2440-hdmiphy-i2c 91c9ccf3a3SEmmanuel Vadot - samsung,exynos5-sata-phy-i2c 92c9ccf3a3SEmmanuel Vadot then: 93c9ccf3a3SEmmanuel Vadot properties: 94c9ccf3a3SEmmanuel Vadot gpios: false 95c9ccf3a3SEmmanuel Vadot 96c9ccf3a3SEmmanuel Vadot - if: 97c9ccf3a3SEmmanuel Vadot properties: 98c9ccf3a3SEmmanuel Vadot compatible: 99c9ccf3a3SEmmanuel Vadot contains: 100c9ccf3a3SEmmanuel Vadot enum: 101c9ccf3a3SEmmanuel Vadot - samsung,s3c2410-i2c 102c9ccf3a3SEmmanuel Vadot - samsung,s3c2440-i2c 103c9ccf3a3SEmmanuel Vadot - samsung,s3c2440-hdmiphy-i2c 104c9ccf3a3SEmmanuel Vadot then: 105c9ccf3a3SEmmanuel Vadot required: 106c9ccf3a3SEmmanuel Vadot - interrupts 107c9ccf3a3SEmmanuel Vadot 108c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 109c9ccf3a3SEmmanuel Vadot 110c9ccf3a3SEmmanuel Vadotexamples: 111c9ccf3a3SEmmanuel Vadot - | 112c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/exynos5250.h> 113c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 114c9ccf3a3SEmmanuel Vadot 115c9ccf3a3SEmmanuel Vadot i2c@12c60000 { 116c9ccf3a3SEmmanuel Vadot compatible = "samsung,s3c2440-i2c"; 117c9ccf3a3SEmmanuel Vadot reg = <0x12C60000 0x100>; 118c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; 119c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 120c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 121c9ccf3a3SEmmanuel Vadot clocks = <&clock CLK_I2C0>; 122c9ccf3a3SEmmanuel Vadot clock-names = "i2c"; 123c9ccf3a3SEmmanuel Vadot pinctrl-names = "default"; 124c9ccf3a3SEmmanuel Vadot pinctrl-0 = <&i2c0_bus>; 125c9ccf3a3SEmmanuel Vadot 126c9ccf3a3SEmmanuel Vadot samsung,sysreg-phandle = <&sysreg_system_controller>; 127c9ccf3a3SEmmanuel Vadot samsung,i2c-sda-delay = <100>; 128c9ccf3a3SEmmanuel Vadot samsung,i2c-max-bus-freq = <20000>; 129c9ccf3a3SEmmanuel Vadot samsung,i2c-slave-addr = <0x66>; 130c9ccf3a3SEmmanuel Vadot 131c9ccf3a3SEmmanuel Vadot eeprom@50 { 132d5b0e70fSEmmanuel Vadot compatible = "samsung,s524ad0xd1", "atmel,24c128"; 133c9ccf3a3SEmmanuel Vadot reg = <0x50>; 134c9ccf3a3SEmmanuel Vadot }; 135c9ccf3a3SEmmanuel Vadot }; 136c9ccf3a3SEmmanuel Vadot 137c9ccf3a3SEmmanuel Vadot i2c@12ce0000 { 138c9ccf3a3SEmmanuel Vadot compatible = "samsung,s3c2440-hdmiphy-i2c"; 139c9ccf3a3SEmmanuel Vadot reg = <0x12CE0000 0x1000>; 140c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; 141c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 142c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 143c9ccf3a3SEmmanuel Vadot clocks = <&clock CLK_I2C_HDMI>; 144c9ccf3a3SEmmanuel Vadot clock-names = "i2c"; 145c9ccf3a3SEmmanuel Vadot 146c9ccf3a3SEmmanuel Vadot samsung,i2c-sda-delay = <100>; 147c9ccf3a3SEmmanuel Vadot samsung,i2c-max-bus-freq = <66000>; 148c9ccf3a3SEmmanuel Vadot 149c9ccf3a3SEmmanuel Vadot phy-i2c@38 { 150c9ccf3a3SEmmanuel Vadot compatible = "samsung,exynos4212-hdmiphy"; 151c9ccf3a3SEmmanuel Vadot reg = <0x38>; 152c9ccf3a3SEmmanuel Vadot }; 153c9ccf3a3SEmmanuel Vadot }; 154c9ccf3a3SEmmanuel Vadot 155c9ccf3a3SEmmanuel Vadot i2c@121d0000 { 156c9ccf3a3SEmmanuel Vadot compatible = "samsung,exynos5-sata-phy-i2c"; 157c9ccf3a3SEmmanuel Vadot reg = <0x121D0000 0x100>; 158c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 159c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 160c9ccf3a3SEmmanuel Vadot clocks = <&clock CLK_SATA_PHYI2C>; 161c9ccf3a3SEmmanuel Vadot clock-names = "i2c"; 162c9ccf3a3SEmmanuel Vadot 163c9ccf3a3SEmmanuel Vadot samsung,i2c-sda-delay = <100>; 164c9ccf3a3SEmmanuel Vadot samsung,i2c-max-bus-freq = <40000>; 165c9ccf3a3SEmmanuel Vadot 166c9ccf3a3SEmmanuel Vadot phy-i2c@38 { 167c9ccf3a3SEmmanuel Vadot compatible = "samsung,exynos-sataphy-i2c"; 168c9ccf3a3SEmmanuel Vadot reg = <0x38>; 169c9ccf3a3SEmmanuel Vadot }; 170c9ccf3a3SEmmanuel Vadot }; 171