Advertisement
Guest User

Untitled

a guest
Jun 5th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2013 Pantelis Antoniou <panto@antoniou-consulting.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. /dts-v1/;
  9. /plugin/;
  10.  
  11. / {
  12. compatible = "ti,beaglebone", "ti,beaglebone-black";
  13.  
  14. /* identification */
  15. part-number = "BB-BONE-PRU-01";
  16. version = "00A0";
  17.  
  18. /* state the resources this cape uses */
  19. exclusive-use =
  20. /* the pin header uses */
  21. "P9.27", /* gpio */
  22. "P9.28", /* gpio */
  23. /* the hardware IP uses */
  24. "gpio3_19", "gpio3_17";
  25.  
  26. fragment@0 {
  27. target = <&am33xx_pinmux>;
  28. __overlay__ {
  29. gpio_helper_pins: pinmux_gpio_helper_pins {
  30. pinctrl-single,pins = <
  31. 0x1a4 0x0f /* P9 27 GPIO3_19: mcasp0_fsr.gpio3_19 | MODE7 | OUTPUT */
  32. 0x19c 0x2f /* P9 28 SPI1_CS0: mcasp0_ahclkr.gpio3_17 | MODE7 | INPUT */
  33. >;
  34. };
  35. };
  36. };
  37.  
  38. fragment@2 {
  39. target = <&ocp>;
  40. __overlay__ {
  41.  
  42. gpio_helper {
  43. compatible = "gpio-of-helper";
  44. status = "okay";
  45. pinctrl-names = "default";
  46. pinctrl-0 = <&gpio_helper_pins>;
  47.  
  48. /* declare your gpios */
  49. test_led {
  50. gpio-name = "test_led";
  51. gpio = <&gpio4 19 0x00>; /* gpio4 is gpio3 */
  52. output;
  53. init-high;
  54. };
  55.  
  56. test_input {
  57. gpio-name = "test_input";
  58. gpio = <&gpio4 17 0x00>; /* gpio4 is gpio3 */
  59. input;
  60. count-rising-edge;
  61. count-falling-edge;
  62. };
  63. };
  64. };
  65. };
  66. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement