0001-adc-device-tree-node.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From 8a81ff173c5c9a0ab1df84fab17971dbcce8490a Mon Sep 17 00:00:00 2001
  2. From: David Lechner <david@lechnology.com>
  3. Date: Tue, 7 Feb 2017 13:22:07 -0600
  4. Subject: ARM: da850-lego-ev3: Add device tree node for A/DC
  5. This adds a node for the TI ADS7957 analog/digital converter on LEGO
  6. MINDSTORMS EV3 as well as a regulator node that is used by the A/DC node.
  7. Signed-off-by: David Lechner <david@lechnology.com>
  8. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
  9. ---
  10. arch/arm/boot/dts/da850-lego-ev3.dts | 21 +++++++++++++++++++++
  11. 1 file changed, 21 insertions(+)
  12. diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
  13. index 112ec92..0309537 100644
  14. --- a/arch/arm/boot/dts/da850-lego-ev3.dts
  15. +++ b/arch/arm/boot/dts/da850-lego-ev3.dts
  16. @@ -139,6 +139,19 @@
  17. enable-active-high;
  18. regulator-boot-on;
  19. };
  20. +
  21. + /*
  22. + * This is a simple voltage divider on VCC5V to provide a 2.5V
  23. + * reference signal to the ADC.
  24. + */
  25. + adc_ref: regulator2 {
  26. + compatible = "regulator-fixed";
  27. + regulator-name = "adc ref";
  28. + regulator-min-microvolt = <2500000>;
  29. + regulator-max-microvolt = <2500000>;
  30. + regulator-boot-on;
  31. + vin-supply = <&vcc5v>;
  32. + };
  33. };
  34. &pmx_core {
  35. @@ -293,6 +306,14 @@
  36. };
  37. };
  38. };
  39. +
  40. + adc: adc@3 {
  41. + compatible = "ti,ads7957";
  42. + reg = <3>;
  43. + #io-channel-cells = <1>;
  44. + spi-max-frequency = <10000000>;
  45. + vref-supply = <&adc_ref>;
  46. + };
  47. };
  48. &gpio {
  49. --
  50. cgit v1.1