Advertisement
ankitdaf

dtsfile

May 28th, 2015
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. /dts-v1/;
  2. /plugin/;
  3.  
  4. #include <dt-bindings/board/am335x-bbw-bbb-base.h>
  5. #include <dt-bindings/pinctrl/am33xx.h>
  6.  
  7. / {
  8. compatible = "ti,beaglebone", "ti,beaglebone-black";
  9.  
  10. /* identification */
  11. part-number = "BB-ADS7846";
  12. version = "00A0";
  13.  
  14. /* state the resources this cape uses */
  15. exclusive-use =
  16. /* the pin header uses */
  17. "P9.17", /* SPI0_CS0 */
  18. "P9.18", /* SPI0_D1 */
  19. "P9.21", /* SPI0_D0 */
  20. "P9.22", /* SPI0_SCLK */
  21. "P9.25", /*pendown */
  22. /* the hardware it uses */
  23. "spi0";
  24.  
  25. fragment@0 {
  26. target = <&am33xx_pinmux>;
  27. __overlay__ {
  28. ads7846:pinmux_ads7846_pins {
  29. pinctrl-single,pins = <
  30. BONE_P9_17 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.uart4_rxd_mux2 */
  31. BONE_P9_18 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
  32. BONE_P9_21 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
  33. BONE_P9_22 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
  34. BONE_P9_25 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
  35. >;
  36. linux,phandle = <0x1>;
  37. phandle = <0x1>;
  38. };
  39. };
  40. };
  41.  
  42. fragment@1 {
  43. target = <&spi0>;
  44. __overlay__ {
  45. #address-cells = <0x1>;
  46. #size-cells = <0>;
  47. status = "okay";
  48. pinctrl-names = "default";
  49. pinctrl-0 = <&ads7846>;
  50. ads7846@0 {
  51. compatible = "linux,spidev";
  52. spi-max-frequency = <2000000>;
  53. interrupts = <255 2>; /* high-to-low edge triggered */
  54. interrupt-parent = <&gpio3>;
  55. pendown-gpio = <&gpio3 255 0>;
  56. reg = <0>;
  57.  
  58. /* driver defaults */
  59. ti,x-min = /bits/ 16 <0>;
  60. ti,y-min = /bits/ 16 <0>;
  61. ti,x-max = /bits/ 16 <0x0FFF>;
  62. ti,y-max = /bits/ 16 <0x0FFF>;
  63. ti,pressure-min = /bits/ 16 <0>;
  64. ti,pressure-max = /bits/ 16 <0xFFFF>;
  65. ti,x-plate-ohms = /bits/ 16 <400>;
  66. };
  67. };
  68. };
  69. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement