gpio-sysinfo.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. GPIO-based Sysinfo device
  2. This binding describes several GPIOs which specify a board revision. Each GPIO
  3. forms a digit in a ternary revision number. This revision is then mapped to a
  4. name using the revisions and names properties.
  5. Each GPIO may be floating, pulled-up, or pulled-down, mapping to digits 2, 1,
  6. and 0, respectively. The first GPIO forms the least-significant digit of the
  7. revision. For example, consider the property
  8. gpios = <&gpio 0>, <&gpio 1>, <&gpio 2>;
  9. If GPIO 0 is pulled-up, GPIO 1 is pulled-down, and GPIO 2 is floating, then the
  10. revision would be
  11. 0t201 = 2*9 + 0*3 + 1*3 = 19
  12. If instead GPIO 0 is floating, GPIO 1 is pulled-up, and GPIO 2 is pulled-down,
  13. then the revision would be
  14. 0t012 = 0*9 + 1*3 + 2*1 = 5
  15. Required properties:
  16. - compatible: should be "gpio-sysinfo".
  17. - gpios: should be a list of gpios forming the revision number,
  18. least-significant-digit first
  19. - revisions: a list of known revisions; any revisions not present will have the
  20. name "unknown"
  21. - names: the name of each revision in revisions
  22. Example:
  23. sysinfo {
  24. compatible = "gpio-sysinfo";
  25. gpios = <&gpio_a 15>, <&gpio_a 16>, <&gpio_a 17>;
  26. revisions = <19>, <5>;
  27. names = "rev_a", "foo";
  28. };