Skip to contentSkip to conversation

Issues with SPI on iMX7 Sabre Board

DISCUSSION Kai Che 2 participants 3 messages Apr 2, 2019 – Apr 3, 2019 1 message not in the archive

lore
Share & tools
lore

Kai Che

author
#0 lore raw

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

Hello Kai,

Quoted 8 lines · Kai Che

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?

Quoted 17 lines

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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Please keep the barebox mailing list <[email protected]> in CC.

Quoted 3 lines · Kai Che

Hi,

Good point! But unfortunately nothing changed.

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

Quoted 6 lines

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?

Quoted 7 lines

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
Quoted 8 lines

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?

Quoted 4 lines

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.

Quoted 57 lines

Maybe my Chip Select Pin is broken.

Kind Regards,

Kai

________________________________________
Von: barebox <[email protected]> im Auftrag von Ahmad Fatoum <[email protected]>
Gesendet: Dienstag, 2. April 2019 15:47
An: [email protected]
Betreff: Re: Issues with SPI on iMX7 Sabre Board

Hello Kai,

Quoted 8 lines · Kai Che

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?

Quoted 9 lines

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?

Quoted 8 lines

Thanks a lot,

Kai
_______________________________________________
barebox mailing list
[email protected]
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox