i2c-designware.txt 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. * Synopsys DesignWare I2C
  2. Required properties :
  3. - compatible : should be "snps,designware-i2c"
  4. or "mscc,ocelot-i2c" with "snps,designware-i2c" for fallback
  5. - reg : Offset and length of the register set for the device
  6. - interrupts : <IRQ> where IRQ is the interrupt number.
  7. - clocks : phandles for the clocks, see the description of clock-names below.
  8. The phandle for the "ic_clk" clock is required. The phandle for the "pclk"
  9. clock is optional. If a single clock is specified but no clock-name, it is
  10. the "ic_clk" clock. If both clocks are listed, the "ic_clk" must be first.
  11. Recommended properties :
  12. - clock-frequency : desired I2C bus clock frequency in Hz.
  13. Optional properties :
  14. - clock-names : Contains the names of the clocks:
  15. "ic_clk", for the core clock used to generate the external I2C clock.
  16. "pclk", the interface clock, required for register access.
  17. - reg : for "mscc,ocelot-i2c", a second register set to configure the SDA hold
  18. time, named ICPU_CFG:TWI_DELAY in the datasheet.
  19. - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
  20. This option is only supported in hardware blocks version 1.11a or newer and
  21. on Microsemi SoCs ("mscc,ocelot-i2c" compatible).
  22. - i2c-scl-falling-time-ns : should contain the SCL falling time in nanoseconds.
  23. This value which is by default 300ns is used to compute the tLOW period.
  24. - i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds.
  25. This value which is by default 300ns is used to compute the tHIGH period.
  26. Examples :
  27. i2c@f0000 {
  28. #address-cells = <1>;
  29. #size-cells = <0>;
  30. compatible = "snps,designware-i2c";
  31. reg = <0xf0000 0x1000>;
  32. interrupts = <11>;
  33. clock-frequency = <400000>;
  34. };
  35. i2c@1120000 {
  36. #address-cells = <1>;
  37. #size-cells = <0>;
  38. compatible = "snps,designware-i2c";
  39. reg = <0x1120000 0x1000>;
  40. interrupt-parent = <&ictl>;
  41. interrupts = <12 1>;
  42. clock-frequency = <400000>;
  43. i2c-sda-hold-time-ns = <300>;
  44. i2c-sda-falling-time-ns = <300>;
  45. i2c-scl-falling-time-ns = <300>;
  46. };x
  47. i2c@1120000 {
  48. #address-cells = <1>;
  49. #size-cells = <0>;
  50. reg = <0x2000 0x100>;
  51. clock-frequency = <400000>;
  52. clocks = <&i2cclk>;
  53. interrupts = <0>;
  54. eeprom@64 {
  55. compatible = "linux,slave-24c02";
  56. reg = <0x40000064>;
  57. };
  58. };