Advertisement
anand6105

spi_bbai

Apr 20th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2020 Deepak Khatri <deepaklorkhatri7@gmail.com>
  3. * https://lorforlinux.github.io/GSoC2020_BeagleBoard.org/
  4. *
  5. * See Cape Interface Spec page for more info on Bone Buses
  6. * https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec
  7. *
  8. * BBAI Virtual cape for /dev/bone/spi/0.1
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14.  
  15. /dts-v1/;
  16. /plugin/;
  17.  
  18. /*
  19. * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
  20. */
  21. &{/chosen} {
  22. overlays {
  23. BBAI-SPI0_1 = __TIMESTAMP__;
  24. };
  25. };
  26.  
  27. /*
  28. * Update the default pinmux of the pins.
  29. * See these files for the phandles (&P9_* & &P8_*)
  30. * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am335x-bone-common-univ.dtsi
  31. * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi
  32. */
  33. &ocp {
  34. P9_23_pinmux { pinctrl-0 = <&P9_23_spi_cs_pin>; }; /* CS */
  35. P9_18_pinmux { pinctrl-0 = <&P9_18_spi_pin>; }; /* MOSI */
  36. P9_21_pinmux { pinctrl-0 = <&P9_21_spi_pin>; }; /* MISO */
  37. P9_22_pinmux { pinctrl-0 = <&P9_22_spi_sclk_pin>; }; /* CLK */
  38. };
  39.  
  40. /*
  41. * See these files for the phandles (&bone_*) and other bone bus nodes
  42. * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbai-bone-buses.dtsi
  43. * BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/bbb-bone-buses.dtsi
  44. */
  45. &bone_spi_0 {
  46. status = "okay";
  47. #address-cells = <1>;
  48. #size-cells = <0>;
  49.  
  50. channel@1 {
  51. reg = <1>;
  52. compatible = "spidev";
  53. symlink = "bone/spi/0.1";
  54. spi-max-frequency = <16000000>;
  55. spi-cpha;
  56. };
  57. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement