envelope-detector.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. Bindings for ADC envelope detector using a DAC and a comparator
  2. The DAC is used to find the peak level of an alternating voltage input
  3. signal by a binary search using the output of a comparator wired to
  4. an interrupt pin. Like so:
  5. _
  6. | \
  7. input +------>-------|+ \
  8. | \
  9. .-------. | }---.
  10. | | | / |
  11. | dac|-->--|- / |
  12. | | |_/ |
  13. | | |
  14. | | |
  15. | irq|------<-------'
  16. | |
  17. '-------'
  18. Required properties:
  19. - compatible: Should be "axentia,tse850-envelope-detector"
  20. - io-channels: Channel node of the dac to be used for comparator input.
  21. - io-channel-names: Should be "dac".
  22. - interrupt specification for one client interrupt,
  23. see ../../interrupt-controller/interrupts.txt for details.
  24. - interrupt-names: Should be "comp".
  25. Example:
  26. &i2c {
  27. dpot: mcp4651-104@28 {
  28. compatible = "microchip,mcp4651-104";
  29. reg = <0x28>;
  30. #io-channel-cells = <1>;
  31. };
  32. };
  33. dac: dac {
  34. compatible = "dpot-dac";
  35. vref-supply = <&reg_3v3>;
  36. io-channels = <&dpot 0>;
  37. io-channel-names = "dpot";
  38. #io-channel-cells = <1>;
  39. };
  40. envelope-detector {
  41. compatible = "axentia,tse850-envelope-detector";
  42. io-channels = <&dac 0>;
  43. io-channel-names = "dac";
  44. interrupt-parent = <&gpio>;
  45. interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
  46. interrupt-names = "comp";
  47. };