mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Kai Che <Kai.Che@mixed-mode.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: AW: Issues with SPI on iMX7 Sabre Board
Date: Wed, 3 Apr 2019 11:27:12 +0200	[thread overview]
Message-ID: <ca4fb822-f08f-711a-3f11-92b08c43bd95@pengutronix.de> (raw)
In-Reply-To: <1554224044879.18784@mixed-mode.de>

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

      parent reply	other threads:[~2019-04-03  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 13:22 Kai Che
2019-04-02 13:47 ` Ahmad Fatoum
     [not found]   ` <1554224044879.18784@mixed-mode.de>
2019-04-03  9:27     ` Ahmad Fatoum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca4fb822-f08f-711a-3f11-92b08c43bd95@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=Kai.Che@mixed-mode.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox