Linux CAN drivers development
 help / color / mirror / Atom feed
From: "Michael Luxen" <mluxen@gmx.net>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"Rosemarie Sheehy" <rsheehy@dairymaster.ie>,
	"tom_usenet@optusnet.com.au" <tom_usenet@optusnet.com.au>
Subject: AW: SocketCAN on Intel Edison with MCP 2515
Date: Wed, 26 Aug 2015 12:31:27 +0200	[thread overview]
Message-ID: <zarafa.55dd957f.34be.077c29991e8b8903@euve35974.vserver.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 3633 bytes --]

Hi, 

attached you can find a working DeviceTree examples which is working fine for me with 2x MCP2515 CAN devices via socketcan.
The ODROID-W is an BCM2835 SoC based (Raspi like) system running kernel 3.18.x.
Hint: My MCP2515 SPI is running wth 12MHz instead of 16MHz.

On another embedded system (Raspi B) I've some days ago used a fresh Rapbmc installation with kernel 3.18.x!
I've adapted the original DeviceTree from...
https://github.com/raspberrypi/linux/blob/rpi-3.18.y/arch/arm/boot/dts/overlays/mcp2515-can0-overlay.dts
...to my needs (16MHz to 12MHz MCP2515 SPI-clock)

Maybe you can use these background informations to adapt to the Edison platform.

Regards
Michael

-----Ursprüngliche Nachricht-----
Von:	Tom Evans <tom_usenet@optusnet.com.au>
Gesendet:	Mi 26.08.2015 06:56
Betreff:	Re: SocketCAN on Intel Edison with MCP 2515
An:	Rosemarie Sheehy <rsheehy@dairymaster.ie>; linux-can@vger.kernel.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/m
> icrochip,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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

[-- Attachment #2: ODROID-W_mcp2515-can-overlay.zip --]
[-- Type: application/x-zip-compressed, Size: 1549 bytes --]

             reply	other threads:[~2015-08-26 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 10:31 Michael Luxen [this message]
2015-08-26 10:36 ` SocketCAN on Intel Edison with MCP 2515 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=zarafa.55dd957f.34be.077c29991e8b8903@euve35974.vserver.de \
    --to=mluxen@gmx.net \
    --cc=linux-can@vger.kernel.org \
    --cc=rsheehy@dairymaster.ie \
    --cc=tom_usenet@optusnet.com.au \
    /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