i2c-gpio.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: GPIO bitbanged I2C
  7. maintainers:
  8. - Wolfram Sang <wsa@kernel.org>
  9. allOf:
  10. - $ref: /schemas/i2c/i2c-controller.yaml#
  11. properties:
  12. compatible:
  13. items:
  14. - const: i2c-gpio
  15. sda-gpios:
  16. description:
  17. gpio used for the sda signal, this should be flagged as
  18. active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
  19. from <dt-bindings/gpio/gpio.h> since the signal is by definition
  20. open drain.
  21. maxItems: 1
  22. scl-gpios:
  23. description:
  24. gpio used for the scl signal, this should be flagged as
  25. active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
  26. from <dt-bindings/gpio/gpio.h> since the signal is by definition
  27. open drain.
  28. maxItems: 1
  29. i2c-gpio,sda-output-only:
  30. description: sda as output only
  31. type: boolean
  32. i2c-gpio,scl-output-only:
  33. description: scl as output only
  34. type: boolean
  35. i2c-gpio,delay-us:
  36. description: delay between GPIO operations (may depend on each platform)
  37. i2c-gpio,timeout-ms:
  38. description: timeout to get data
  39. # Deprecated properties, do not use in new device tree sources:
  40. gpios:
  41. minItems: 2
  42. maxItems: 2
  43. description: sda and scl gpio, alternative for {sda,scl}-gpios
  44. i2c-gpio,sda-open-drain:
  45. type: boolean
  46. deprecated: true
  47. description: this means that something outside of our control has put
  48. the GPIO line used for SDA into open drain mode, and that something is
  49. not the GPIO chip. It is essentially an inconsistency flag.
  50. i2c-gpio,scl-open-drain:
  51. type: boolean
  52. deprecated: true
  53. description: this means that something outside of our control has put the
  54. GPIO line used for SCL into open drain mode, and that something is not
  55. the GPIO chip. It is essentially an inconsistency flag.
  56. i2c-gpio,sda-has-no-pullup:
  57. type: boolean
  58. description: sda is used in a non-compliant way and has no pull-up.
  59. Therefore disable open-drain. This property is mutually-exclusive
  60. with i2c-gpio,sda-open-drain.
  61. i2c-gpio,scl-has-no-pullup:
  62. type: boolean
  63. description: scl is used in a non-compliant way and has no pull-up.
  64. Therefore disable open-drain. This property is mutually-exclusive
  65. with i2c-gpio,scl-open-drain.
  66. dependencies:
  67. i2c-gpio,sda-has-no-pullup:
  68. not:
  69. required:
  70. - i2c-gpio,sda-open-drain
  71. i2c-gpio,scl-has-no-pullup:
  72. not:
  73. required:
  74. - i2c-gpio,scl-open-drain
  75. required:
  76. - compatible
  77. - sda-gpios
  78. - scl-gpios
  79. unevaluatedProperties: false
  80. ...