SHARE
TWEET

BB-SPI0DEV-00A0.dts

a guest Jun 7th, 2013 362 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * Copyright (C) 2013 CircuitCo
  3.  *
  4.  * Virtual cape for SPI0 on connector pins P9.22 P9.21 P9.18 P9.17
  5.  * Modified to enable /dev/spidev1.0 by Carl Johnson
  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";
  16.  
  17.     /* identification */
  18.     part-number = "BB-SPI0DEV";
  19.     version = "00A0";
  20.  
  21.     /* state the resources this cape uses */
  22.     exclusive-use =
  23.         /* the pin header uses */
  24.         "P9.17",    /* spi0_cs0 */
  25.         "P9.18",    /* spi0_d1 */
  26.         "P9.21",    /* spi0_d0 */
  27.         "P9.22",    /* spi0_sclk */
  28.         /* the hardware ip uses */
  29.         "spi0";
  30.  
  31.     fragment@0 {
  32.         target = <&am33xx_pinmux>;
  33.         __overlay__ {
  34.             bb_spi0_pins: pinmux_bb_spi0_pins {
  35.                 pinctrl-single,pins = <
  36.                     0x150 0x30  /* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */
  37.                     0x154 0x30  /* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */
  38.                     0x158 0x10  /* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */
  39.                     0x15c 0x10  /* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */
  40.                 >;
  41.             };
  42.         };
  43.     };
  44.  
  45.     fragment@1 {
  46.         target = <&spi0>;   /* spi0 is numbered correctly */
  47.         __overlay__ {
  48.             status = "okay";
  49.             pinctrl-names = "default";
  50.             pinctrl-0 = <&bb_spi0_pins>;
  51.             #address-cells = <1>;
  52.             #size-cells = <0>;
  53.             spidev@0 {
  54.                 #address-cells = <1>;
  55.                 #size-cells = <0>;
  56.                 spi-max-frequency = <24000000>;
  57.                 reg = <0>;
  58.                 compatible = "linux,spidev";
  59.             };
  60.         };
  61.     };
  62. };
RAW Paste Data
Top