0029-dt-bindings-Add-I2C-bindings-for-mt65xx-mt81xx.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From d1447a6815913823ef5e75d70efc6f08f288ee40 Mon Sep 17 00:00:00 2001
  2. From: Xudong Chen <[email protected]>
  3. Date: Wed, 6 May 2015 16:37:05 +0800
  4. Subject: [PATCH 29/76] dt-bindings: Add I2C bindings for mt65xx/mt81xx.
  5. Add devicetree bindings for Mediatek Soc I2C driver.
  6. Signed-off-by: Xudong Chen <[email protected]>
  7. Signed-off-by: Eddie Huang <[email protected]>
  8. ---
  9. .../devicetree/bindings/i2c/i2c-mt6577.txt | 41 ++++++++++++++++++++
  10. 1 file changed, 41 insertions(+)
  11. create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
  12. --- /dev/null
  13. +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
  14. @@ -0,0 +1,41 @@
  15. +* Mediatek's I2C controller
  16. +
  17. +The Mediatek's I2C controller is used to interface with I2C devices.
  18. +
  19. +Required properties:
  20. + - compatible: value should be either of the following.
  21. + (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
  22. + (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
  23. + (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
  24. + (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
  25. + (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
  26. + - reg: physical base address of the controller and dma base, length of memory
  27. + mapped region.
  28. + - interrupts: interrupt number to the cpu.
  29. + - clock-div: the fixed value for frequency divider of clock source in i2c
  30. + module. Each IC may be different.
  31. + - clocks: clock name from clock manager
  32. + - clock-names: Must include "main" and "dma", if enable have-pmic need include
  33. + "pmic" extra.
  34. +
  35. +Optional properties:
  36. + - clock-frequency: Frequency in Hz of the bus when transfer, the default value
  37. + is 100000.
  38. + - mediatek,have-pmic: platform can control i2c form special pmic side.
  39. + Only mt6589 and mt8135 support this feature.
  40. + - mediatek,use-push-pull: IO config use push-pull mode.
  41. +
  42. +Example:
  43. +
  44. + i2c0: i2c@1100d000 {
  45. + compatible = "mediatek,mt6577-i2c";
  46. + reg = <0x1100d000 0x70>,
  47. + <0x11000300 0x80>;
  48. + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
  49. + clock-frequency = <400000>;
  50. + mediatek,have-pmic;
  51. + clock-div = <16>;
  52. + clocks = <&i2c0_ck>, <&ap_dma_ck>;
  53. + clock-names = "main", "dma";
  54. + };
  55. +