gpio-7-segment.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/auxdisplay/gpio-7-segment.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: GPIO based LED segment display
  7. maintainers:
  8. - Chris Packham <chris.packham@alliedtelesis.co.nz>
  9. properties:
  10. compatible:
  11. const: gpio-7-segment
  12. segment-gpios:
  13. description: |
  14. An array of GPIOs one per segment. The first GPIO corresponds to the A
  15. segment, the seventh GPIO corresponds to the G segment. Some LED blocks
  16. also have a decimal point which can be specified as an optional eighth
  17. segment.
  18. -a-
  19. | |
  20. f b
  21. | |
  22. -g-
  23. | |
  24. e c
  25. | |
  26. -d- dp
  27. minItems: 7
  28. maxItems: 8
  29. required:
  30. - segment-gpios
  31. additionalProperties: false
  32. examples:
  33. - |
  34. #include <dt-bindings/gpio/gpio.h>
  35. led-7seg {
  36. compatible = "gpio-7-segment";
  37. segment-gpios = <&gpio 0 GPIO_ACTIVE_LOW>,
  38. <&gpio 1 GPIO_ACTIVE_LOW>,
  39. <&gpio 2 GPIO_ACTIVE_LOW>,
  40. <&gpio 3 GPIO_ACTIVE_LOW>,
  41. <&gpio 4 GPIO_ACTIVE_LOW>,
  42. <&gpio 5 GPIO_ACTIVE_LOW>,
  43. <&gpio 6 GPIO_ACTIVE_LOW>;
  44. };