Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. /*
  2. * adapted from a cape that is
  3. * Copyright (C) 2013 CircuitCo
  4. *
  5. * Virtual cape for I2C2 on connector pins P9.21 P9.22
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. /dts-v1/;
  12. /plugin/;
  13.  
  14. / {
  15. compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
  16.  
  17. /* identification */
  18. part-number = "BB-I2C2-2";
  19. version = "00A0";
  20.  
  21. /* state the resources this cape uses */
  22. exclusive-use =
  23. /* the pin header uses */
  24. "P9.22", /* i2c2_sda */
  25. "P9.21", /* i2c2_scl */
  26. /* the hardware ip uses */
  27. "i2c2";
  28.  
  29. fragment@0 {
  30. target = <&am33xx_pinmux>;
  31. __overlay__ {
  32. bb_i2c2_2_pins: pinmux_bb_i2c2_2_pins {
  33. pinctrl-single,pins = <
  34. 0x150 0x72 /* i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */
  35. 0x154 0x72 /* i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */
  36. >;
  37. };
  38. };
  39. };
  40. fragment@1 {
  41. target = <&i2c2>;
  42. __overlay__ {
  43. status = "okay";
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&bb_i2c2_2_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. };
  56. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement