All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Evans <tom_usenet@optusnet.com.au>
To: Rosemarie Sheehy <rsheehy@dairymaster.ie>, linux-can@vger.kernel.org
Subject: Re: SocketCAN on Intel Edison with MCP 2515
Date: Wed, 26 Aug 2015 14:54:23 +1000	[thread overview]
Message-ID: <55DD467F.8080701@optusnet.com.au> (raw)
In-Reply-To: <loom.20150825T164749-199@post.gmane.org>

On 26/08/15 00:49, Rosemarie Sheehy wrote:
> Michael Gallagher <mjg <at> isomorphdevelopment.com> writes:

Actually:

On 28/05/15 01:18, Michael Gallagher wrote:
 > ...

He may not be monitoring this list after 3 months.

> I am trying to trying to set the can bus on the Edison.
> I have the expansion board and the can-bus shield
> (https://www.sparkfun.com/products/10039)

That's an Arduino Shield board on an adaptor on an Intel Edison running (I'm 
guessing) Yocto Linux. Good luck with that, you may be the first in the world 
to try that combination.

Did you read all the other posts in this thread? You may get some clues from them

Apparently the RPi Linux will automatically detect the CAN chips, but you'll 
have to consult the Yocto/Edison documentation to see if it has been set up by 
someone to do that.

Michael didn't say which hardware he was using.

As I said in another post "Linux used t be plug-and-play, but they fixed that 
bug". Devices on an I2C bus can sometimes be automatically identified, but the 
MCP2515 is on an SPI bus, and it can't autodetect chips. You have to add 
descriptions in the Device Tree File for your board (or add information to the 
Bootstrap Configuration so it can edit the Device Tree - more complications 
and more languages to learn to get a simple job done).

Check your Linux Source Tree "Documentation/devicetree/bindings/net/can" 
directory. Mine has documentation for cc770, flexcan, mscan, sj1000 but no 
mcp251x.

A more modern version of Linux has this:

http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt

That doesn't tell you where in the tree to add that section. I assume it has 
to be under/inside or reference an SPI controller somehow.

So to try and find a worked example, google for <compatible = "microchip,mcp2515">

http://www.microchip.com/forums/m828830.aspx

Also check "Documentation/devicetree/bindings/spi-bus.txt".

Remember the device doesn't show up as "/dev/can0", but shows up as a network 
device when you run "/sbin/ifconfig". It might also show up under /sys 
somewhere too. You then have to control it (to enable and set the baud rate) 
with "canconfig". If you don't have that software installed you may have to 
find/configure/build/install it as well.

Tom


  reply	other threads:[~2015-08-26  4:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 15:18 SocketCAN on Intel Edison with MCP 2515 Michael Gallagher
2015-05-28  5:22 ` Rost, Martin
2015-05-28  8:19 ` Tom Evans
2015-07-26 10:05   ` John Whitmore
2015-07-23 12:32 ` Chris
2015-07-26 10:54 ` John Whitmore
2015-08-25 14:49 ` Rosemarie Sheehy
2015-08-26  4:54   ` Tom Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-08-26 10:31 AW: " Michael Luxen
2015-08-26 10:36 ` Rosemarie Sheehy

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=55DD467F.8080701@optusnet.com.au \
    --to=tom_usenet@optusnet.com.au \
    --cc=linux-can@vger.kernel.org \
    --cc=rsheehy@dairymaster.ie \
    /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.