All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Baptiste Clenet <bapclenet@gmail.com>
Cc: linux-wpan@vger.kernel.org
Subject: Re: At86rf212B(driver at86rf230), Ralink MT7228, cs1 always high
Date: Mon, 1 Jun 2015 09:28:26 +0200	[thread overview]
Message-ID: <20150601072823.GA734@omega> (raw)
In-Reply-To: <CAPpUg6MTo5ifze9JxqCk1u9Y7OVXsZQNO9y0ZezkHMvJvhY1Zg@mail.gmail.com>

On Mon, Jun 01, 2015 at 09:00:30AM +0200, Baptiste Clenet wrote:
> Sorry, it was Ralink MT7628.
> I boot via device tree yes and the dts is configured to use AT86RF212B
> with chip select 1 :
> 
> palmbus@10000000 {
>   spi@b00 {
>       status = "okay";
> 
>       m25p80@0 {
>         #address-cells = <1>;
>         #size-cells = <1>;
>         compatible = "en25q64";
>         reg = <0 0>;
>         ...
>       };
> 
>       at86rf212@0 {
>           compatible = "atmel,at86rf212";
>           reg = <1>;

this normally represents the chip select, I don't know if this is just
eye candy or it's _really_ evaluated.

>           interrupts = <15 4>;
>           interrupt-parent = <&intc>;
>           reset-gpio = <&gpio0 16 1>;
>           sleep-gpio = <&gpio0 17 1>;
>           spi-max-frequency = <1000000>;
>       };
>   };
> };
> 
> 
> This didn't work so I had a look a the spi driver spi-mt7621.c and I
> saw that the driver wasn't implemented FOR two chip selects. This is
> why I change the function "static void mt7621_spi_set_cs();" (last
> message)
> 
> Does it make sense?
> 

I think it could make sense, depends what the hardware designer for Ralink
MT7628 did there.

First you need to figure out "who" make your chip select. I mean with
this question, if your SPI controller do the chip select or is it
software triggered by GPIO.

I don't know the spi subsystem much if the lastest one is ever supported
or you need to implement yourself (if possible). I think the spi subsystem
supports that, but I never setup such configuration.

If it's triggered by GPIO (this smells like the spi-mt7621.c function),
you need to care that the cs is handled by software correctly and now I
think that this can have 100 issues why it's not working currently in
your setup.

I think this is more a spi specific question and you should ask on:

http://vger.kernel.org/vger-lists.html#linux-spi

or get commercial support. Sorry, but I can't really help your with a
generic spi question and your issue smells like "reading zeros" on the
bus only.

- Alex

  reply	other threads:[~2015-06-01  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  9:28 At86rf212B(driver at86rf230), Ralink MT7228, cs1 always high Baptiste Clenet
2015-05-31 12:34 ` Alexander Aring
2015-06-01  7:00   ` Baptiste Clenet
2015-06-01  7:28     ` Alexander Aring [this message]
2015-06-01  7:55       ` Baptiste Clenet

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=20150601072823.GA734@omega \
    --to=alex.aring@gmail.com \
    --cc=bapclenet@gmail.com \
    --cc=linux-wpan@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.