Re: AM335x BeagleBone SPI Issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Dec 11, 2012 at 07:52:16PM +0200, Felipe Balbi wrote:
> Hi,
> 
> On Tue, Dec 11, 2012 at 07:03:14PM +0200, Felipe Balbi wrote:
> > Hi,
> > 
> > On Tue, Dec 11, 2012 at 04:24:52PM +0000, Jack Mitchell wrote:
> > > On 11/12/12 15:22, Ben Gamari wrote:
> > > >Jack Mitchell <ml@xxxxxxxxxxxxxxxxxxx> writes:
> > > >
> > > >>Shubhro, Felipe,
> > > >>
> > > >>Thank you, the reordering dma patch fixed the dma issue I was having!
> > > >>However, the bad news, I now get the same results for the dma and
> > > >>non-dma spidev test. While the scope shows the SPI clk and data is fine,
> > > >>the reading from the program still shows 0x00 for all words.
> > > >>
> > > >Just to make sure this has been thought of: I've seen this sort of
> > > >behavior in the past when the CLK pin wasn't configured as an input.
> > > >
> > > >Cheers,
> > > >
> > > >- Ben
> > > >
> > > 
> > > Ok, Ben, well spotted indeed! I changed the dtsi to use INPUT_PULLUP
> > > instead of OUTPUT_PULLUP and wallah!
> > > 
> > >   am3358_pinmux: pinmux@44e10800 {
> > >     spi0_pins: pinmux_spi0_pins {
> > >       pinctrl-single,pins = <
> > >         0x150 *0x30*      /* spi0_sclk.gpio0_2, INPUT_PULLUP | MODE0
> > > */<------------ changed to INPUT
> > >         0x154 0x30      /* spi0_d0.gpio0_3, INPUT_PULLUP | MODE0 */
> > >         0x158 0x10      /* spi0_d1.i2c1_sda, OUTPUT_PULLUP | MODE0 */
> > >         0x15c 0x10      /* spi0_cs0.i2c1_scl, OUTPUT_PULLUP | MODE0 */
> > >       >;
> > >     };
> > >     spi1_pins: pinmux_spi1_pins {
> > >       pinctrl-single,pins = <
> > >         0x190 *0x33*  /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3
> > > */ <------------ changed to INPUT
> > >         0x194 0x33  /* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
> > >         0x198 0x13  /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
> > >         0x19c 0x13  /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
> > >       >;
> > >     };
> > 
> > funny, I did the same on my pandaboard and it still didn't work :-s
> > 
> > @@ -321,6 +322,10 @@ static struct omap_board_mux board_mux[] __initdata = {
> >         OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
> >         OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
> >         OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
> > +
> > +       /* SPI1 */
> > +       OMAP4_MUX(MCSPI1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
> 
> hehe, I'll reply to my own nonsense. Of course this won't work, I'm not
> muxing the other MCSPI pins :-p
> 
> I'll do that tomorrow and test, cheers

fyi, after muxing all lines correctly it works just fine on my panda.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux