mr1989

Untitled

May 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2013 CircuitCo
  3. *
  4. * Virtual cape for I2C2 on connector pins P9.19 P9.20
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. /dts-v1/;
  11. /plugin/;
  12.  
  13. / {
  14. compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
  15.  
  16. /* identification */
  17. part-number = "BB-I2C2-ADXL";
  18. version = "00A0";
  19.  
  20. /* state the resources this cape uses */
  21. exclusive-use =
  22. /* the pin header uses */
  23. "P9.19", /* i2c2_sda */
  24. "P9.20", /* i2c2_scl */
  25. /* the hardware ip uses */
  26. "i2c2";
  27.  
  28. fragment@0 {
  29. target = <&am33xx_pinmux>;
  30. __overlay__ {
  31. bb_i2c2_pins: pinmux_bb_i2c2_pins {
  32. pinctrl-single,pins = <
  33. 0x178 0x73 /* i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
  34. 0x17c 0x73 /* i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */
  35. >;
  36. };
  37. };
  38. };
  39.  
  40. fragment@1 {
  41. target = <&i2c2>;
  42. __overlay__ {
  43. status = "okay";
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&bb_i2c2_pins>;
  46.  
  47. /* this is the configuration part */
  48. clock-frequency = <100000>;
  49.  
  50. #address-cells = <1>;
  51. #size-cells = <0>;
  52.  
  53. /* add any i2c devices on the bus here */
  54.  
  55. // commented out example of a touchscreen (taken from BB-BONE-LCD7-01-00A4) */
  56. adxl345@53 {
  57. compatible = "adi,adxl345";
  58. reg = <0x53>;//device ID of adxl345
  59. //interrupt-parent = <&gpio4>;
  60. //interrupts = <19 0x0>;
  61. //atmel,irq-gpio = <&gpio4 19 0>;
  62. };
  63. };
  64. };
  65. };
Add Comment
Please, Sign In to add comment