goodix,gt9916.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/input/touchscreen/goodix,gt9916.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Goodix Berlin series touchscreen controller
  7. description: The Goodix Berlin series of touchscreen controllers
  8. be connected to either I2C or SPI buses.
  9. maintainers:
  10. - Neil Armstrong <neil.armstrong@linaro.org>
  11. allOf:
  12. - $ref: touchscreen.yaml#
  13. - $ref: /schemas/spi/spi-peripheral-props.yaml#
  14. properties:
  15. compatible:
  16. enum:
  17. - goodix,gt9916
  18. reg:
  19. maxItems: 1
  20. interrupts:
  21. maxItems: 1
  22. reset-gpios:
  23. maxItems: 1
  24. avdd-supply:
  25. description: Analog power supply regulator on AVDD pin
  26. vddio-supply:
  27. description: power supply regulator on VDDIO pin
  28. spi-max-frequency: true
  29. touchscreen-inverted-x: true
  30. touchscreen-inverted-y: true
  31. touchscreen-size-x: true
  32. touchscreen-size-y: true
  33. touchscreen-swapped-x-y: true
  34. additionalProperties: false
  35. required:
  36. - compatible
  37. - reg
  38. - interrupts
  39. - avdd-supply
  40. - touchscreen-size-x
  41. - touchscreen-size-y
  42. examples:
  43. - |
  44. #include <dt-bindings/interrupt-controller/irq.h>
  45. #include <dt-bindings/gpio/gpio.h>
  46. i2c {
  47. #address-cells = <1>;
  48. #size-cells = <0>;
  49. touchscreen@5d {
  50. compatible = "goodix,gt9916";
  51. reg = <0x5d>;
  52. interrupt-parent = <&gpio>;
  53. interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
  54. reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  55. avdd-supply = <&ts_avdd>;
  56. touchscreen-size-x = <1024>;
  57. touchscreen-size-y = <768>;
  58. };
  59. };
  60. - |
  61. #include <dt-bindings/interrupt-controller/irq.h>
  62. #include <dt-bindings/gpio/gpio.h>
  63. spi {
  64. #address-cells = <1>;
  65. #size-cells = <0>;
  66. num-cs = <1>;
  67. cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
  68. touchscreen@0 {
  69. compatible = "goodix,gt9916";
  70. reg = <0>;
  71. interrupt-parent = <&gpio>;
  72. interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
  73. reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  74. avdd-supply = <&ts_avdd>;
  75. spi-max-frequency = <1000000>;
  76. touchscreen-size-x = <1024>;
  77. touchscreen-size-y = <768>;
  78. };
  79. };
  80. ...