How to create /dev/spidev2.0 for beaglebone AI?

31 views
Skip to first unread message

jis...@gmail.com

unread,
Jul 22, 2020, 7:48:45 AM7/22/20
to BeagleBoard

How to create /dev/spidev2.0 for beaglebone AI?

Jason Kridner

unread,
Jul 22, 2020, 9:31:45 AM7/22/20
to beagl...@googlegroups.com, Deepak Khatri
On Wed, Jul 22, 2020 at 7:48 AM <jis...@gmail.com> wrote:

How to create /dev/spidev2.0 for beaglebone AI?

This is in-work as a Google Summer of Code project.

Deepak's overlay is here: https://github.com/lorforlinux/bb.org-overlays/blob/bone_spi/src/arm/BONE-SPI1_0-00A0.dts

The critical section is:

&ocp {
  P9_28_pinmux { pinctrl-0 = <&P9_28_spi_cs_pin>; }; /* CS */
   P9_30_pinmux { pinctrl-0 = <&P9_30_spi_pin>; }; /* MOSI */
   P9_29_pinmux { pinctrl-0 = <&P9_29_spi_pin>; }; /* MISO */
   P9_31_pinmux { pinctrl-0 = <&P9_31_spi_sclk_pin>; }; /* CLK */
};

&bone_spi_1_0 {
   status = "okay";
   spi-max-frequency = <16000000>;
   spi-cpha;
};

It depends on his changes to the base board device tree or it'll fail to boot: https://github.com/lorforlinux/BeagleBoard-DeviceTrees/blob/compatibility/src/arm/bbai-bone-buses.dtsi

The critical section is:

&mcspi3 {
   #address-cells = <1>;
   #size-cells = <0>;

   bone_spi_1_0: channel@0 {
     #address-cells = <1>;
     #size-cells = <0>;
     compatible = "spidev";
     symlink = "bone/spi/1.0";
     reg = <0>;
   };

   bone_spi_1_1: channel@1 {
     #address-cells = <1>;
     #size-cells = <0>;
     compatible = "spidev";
     symlink = "bone/spi/1.1";
     reg = <1>;
   };
};
 
That is, if I understand which port your are trying to expose. Some background and pins are show at https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec#SPI.

This doesn't have all the background and instructions I'd like, but I believe Deepak will be updating it.

Best to have a serial cable and know how to deal with a hung-up boot, but might be a good place to start to use spidev on BeagleBone AI.

Otherwise, this is scheduled for the August tri-annual software image release, which isn't that far away now.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/de6d58b0-2f0c-420d-88ee-c90c9e3c4f7eo%40googlegroups.com.


--
https://beagleboard.org/about/jkridner - a 501c3 non-profit educating around open hardware computing
Reply all
Reply to author
Forward
0 new messages