linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* AM335x BeagleBone SPI Issues
@ 2012-12-10 13:23 Jack Mitchell
  2012-12-10 13:53 ` Felipe Balbi
  0 siblings, 1 reply; 27+ messages in thread
From: Jack Mitchell @ 2012-12-10 13:23 UTC (permalink / raw)
  To: linux-omap

Hi,

I am currently having issues with the SPI driver on the beaglebone using 
the 3.7-rc8 kernel[1]. I have probed the SPI pins and I have found that 
writing works however reading doesn't. When using DMA the program seems 
to lock hard and no data is sent on the bus. I am testing the bus using 
spidev and the spidev_test[2] application, however I first came across 
spi issues with a custom spi driver which stopped working when I 
transitioned from 3.2-psp to 3.7-rc8.

The current output I am seeing from the spidev_test program is just a 
series of 0x00 data, which looks to me like no data is getting in at 
all. The spidev_test program is not using DMA as the buffer size is too 
low, so I forced the dma on when buffer size is > 1 and the program 
hangs hard with the system still responding to other commands.I have 
briged the pins 18 and 21 on the BeagleBone P9 header.

Has anyone seen issues like this, or if not if someone could please test 
the latest 3.7-rc8 from [1] and let me know if it works for them and the 
issue is at my end.

To get spidev working with devicetree I applied the patch from [3] and 
changed the dtb as in the patch pasted below.

[1] https://github.com/beagleboard/kernel/tree/3.7
[2] http://lxr.linux.no/#linux+v3.6.9/Documentation/spi/spidev_test.c
[3] 
http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg09958.html

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 543365d..8fff665 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -440,10 +440,19 @@
  };

  &spi0 {
+  status = "okay";
         pinctrl-names = "default";
         pinctrl-0 = <&spi0_pins>;
+
+  spidev: spidev@0 {
+  compatible = "linux,spidev";
+  reg = <0>;
+  spi-max-frequency = <24000000>;
+  };
+
  };

+
  &spi1 {
         pinctrl-names = "default";
         pinctrl-0 = <&spi1_pins>;


-- 

   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* AM335x BeagleBone SPI Issues
@ 2012-12-10 13:17 Jack Mitchell
  0 siblings, 0 replies; 27+ messages in thread
From: Jack Mitchell @ 2012-12-10 13:17 UTC (permalink / raw)
  To: linux-omap

Hi,

I am currently having issues with the SPI driver on the beaglebone using 
the 3.7-rc8 kernel[1]. I have probed the SPI pins and I have found that 
writing works however reading doesn't. When using DMA the program seems 
to lock hard and no data is sent on the bus. I am testing the bus using 
spidev and the spidev_test[2] application, however I first came across 
spi issues with a custom spi driver which stopped working when I 
transitioned from 3.2-psp to 3.7-rc8.

The current output I am seeing from the spidev_test program is just a 
series of 0x00 data, which looks to me like no data is getting in at 
all. The spidev_test program is not using DMA as the buffer size is too 
low, so I forced the dma on when buffer size is > 1 and the program 
hangs hard with the system still responding to other commands.I have 
briged the pins 18 and 21 on the BeagleBone P9 header.

Has anyone seen issues like this, or if not if someone could please test 
the latest 3.7-rc8 from [1] and let me know if it works for them and the 
issue is at my end.

To get spidev working with devicetree I applied the patch from [3] and 
changed the dtb as in the patch pasted below.

[1] https://github.com/beagleboard/kernel/tree/3.7
[2] http://lxr.linux.no/#linux+v3.6.9/Documentation/spi/spidev_test.c
[3] 
http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg09958.html

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi 
b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 543365d..8fff665 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -440,10 +440,19 @@
  };

  &spi0 {
+  status = "okay";
         pinctrl-names = "default";
         pinctrl-0 = <&spi0_pins>;
+
+  spidev: spidev@0 {
+  compatible = "linux,spidev";
+  reg = <0>;
+  spi-max-frequency = <24000000>;
+  };
+
  };

+
  &spi1 {
         pinctrl-names = "default";
         pinctrl-0 = <&spi1_pins>;


-- 

   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2013-01-04 16:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 13:23 AM335x BeagleBone SPI Issues Jack Mitchell
2012-12-10 13:53 ` Felipe Balbi
2012-12-10 14:50   ` Jack Mitchell
2012-12-10 14:59     ` Felipe Balbi
2012-12-10 15:19       ` Jack Mitchell
2012-12-10 15:26         ` Shubhrajyoti Datta
2012-12-10 16:18           ` Jack Mitchell
2012-12-10 18:35         ` Felipe Balbi
2012-12-11  6:39           ` Shubhrajyoti Datta
2012-12-11 10:17           ` Jack Mitchell
2012-12-11 10:20             ` Felipe Balbi
2012-12-11 10:38               ` Jack Mitchell
2012-12-11 11:48                 ` Felipe Balbi
2012-12-11 14:27                   ` Felipe Balbi
2012-12-11 15:23                     ` Jack Mitchell
2012-12-11 16:15                       ` Felipe Balbi
2012-12-11 15:22             ` Ben Gamari
2012-12-11 16:24               ` Jack Mitchell
2012-12-11 16:36                 ` Jack Mitchell
2012-12-11 17:02                 ` Jack Mitchell
2013-01-04 14:46                   ` Jan Lübbe
2013-01-04 16:21                     ` Jack Mitchell
2013-01-04 16:36                       ` Jack Mitchell
2012-12-11 17:03                 ` Felipe Balbi
2012-12-11 17:52                   ` Felipe Balbi
2012-12-12  8:07                     ` Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2012-12-10 13:17 Jack Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).