mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Issues with SPI on iMX7 Sabre Board
@ 2019-04-02 13:22 Kai Che
  2019-04-02 13:47 ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Che @ 2019-04-02 13:22 UTC (permalink / raw)
  To: barebox

Hi all,

I'm trying to communicate with SPI in barebox on the MC iMX7 Sabre Board.

I added the options in my barebox config:

CONFIG_SPI=y
CONFIG_CMD_SPI=y

But there is no SPI bus when I try to communicate with:

barebox@Freescale i.MX7 SabreSD Board:/ spi 0x1
spi bus 0 not found
spi: No such device
   
Could someone please tell me if a SPI driver exists for the iMX7 Sabre Board?

Thanks a lot,

Kai
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: Issues with SPI on iMX7 Sabre Board
  2019-04-02 13:22 Issues with SPI on iMX7 Sabre Board Kai Che
@ 2019-04-02 13:47 ` Ahmad Fatoum
       [not found]   ` <1554224044879.18784@mixed-mode.de>
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2019-04-02 13:47 UTC (permalink / raw)
  To: barebox

Hello Kai,

On 4/2/19 3:22 PM, Kai Che wrote:
> Hi all,
> 
> I'm trying to communicate with SPI in barebox on the MC iMX7 Sabre Board.
> 
> I added the options in my barebox config:
> 
> CONFIG_SPI=y
> CONFIG_CMD_SPI=y

How about CONFIG_DRIVER_SPI_IMX?

> 
> But there is no SPI bus when I try to communicate with:
> 
> barebox@Freescale i.MX7 SabreSD Board:/ spi 0x1
> spi bus 0 not found
> spi: No such device
>    
> Could someone please tell me if a SPI driver exists for the iMX7 Sabre Board?
> 
> Thanks a lot,
> 
> Kai
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: AW: Issues with SPI on iMX7 Sabre Board
       [not found]   ` <1554224044879.18784@mixed-mode.de>
@ 2019-04-03  9:27     ` Ahmad Fatoum
  0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-04-03  9:27 UTC (permalink / raw)
  To: Kai Che; +Cc: Barebox List

Please keep the barebox mailing list <barebox@lists.infradead.org> in CC.

On 2/4/19 18:54, Kai Che wrote:
> Hi,
> 
> Good point! But unfortunately nothing changed.

Nothing? It appears barebox reports SPI buses now unlike before.

> 
> I did some debugging in /drivers/spi/spi.c and apparently there are two SPI Masters.
> 
> One has the bus number (master->bus_num =) 2  and the other one on bus number = 32767
> 
> The bus on number 2 seems to be connected to the pins on the board, but only the MOSI and CLK seems to be working when checking with the logic analyzer.

The MISO is driven by the slave. You sure it's wired up correctly?
Can you short MISO and MOSI and check if you can receive what's transmitted?

> 
> barebox@Freescale i.MX7 SabreSD Board:/ spi -v -b 2 0x2
> device config
>     bus_num       = 2
>     max_speed_hz  = 1000000
>     chip_select   = 0
>     mode          = 0x0
>     bits_per_word = 8
> 
> wrote 1 bytes
> 00000000: 02                                                 .
> read 0 bytes
> 00000000:    
> 
> The Chip Select is always low no matter what I send.

chip select is usually active low. Does the chip select change at all?

> 
> I have no idea what the SPI on bus 32767 is doing.
> 
> Did someone managed to make SPI work on the Sabre Board?

I haven't used SPI in barebox before. Maybe someone with more experience can chime in,
but that's what I could think of.

> 
> Maybe my Chip Select Pin is broken.
> 
> Kind Regards,
> 
> Kai
> 
> ________________________________________
> Von: barebox <barebox-bounces@lists.infradead.org> im Auftrag von Ahmad Fatoum <a.fatoum@pengutronix.de>
> Gesendet: Dienstag, 2. April 2019 15:47
> An: barebox@lists.infradead.org
> Betreff: Re: Issues with SPI on iMX7 Sabre Board
> 
> Hello Kai,
> 
> On 4/2/19 3:22 PM, Kai Che wrote:
>> Hi all,
>>
>> I'm trying to communicate with SPI in barebox on the MC iMX7 Sabre Board.
>>
>> I added the options in my barebox config:
>>
>> CONFIG_SPI=y
>> CONFIG_CMD_SPI=y
> 
> How about CONFIG_DRIVER_SPI_IMX?
> 
>>
>> But there is no SPI bus when I try to communicate with:
>>
>> barebox@Freescale i.MX7 SabreSD Board:/ spi 0x1
>> spi bus 0 not found
>> spi: No such device
>>
>> Could someone please tell me if a SPI driver exists for the iMX7 Sabre Board?
>>
>> Thanks a lot,
>>
>> Kai
>> _______________________________________________
>> barebox mailing list
>> barebox@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/barebox
>>
> 
> 
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2019-04-03  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 13:22 Issues with SPI on iMX7 Sabre Board Kai Che
2019-04-02 13:47 ` Ahmad Fatoum
     [not found]   ` <1554224044879.18784@mixed-mode.de>
2019-04-03  9:27     ` AW: " Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox