From: John Whitmore <arigead@gmail.com>
To: Tom Evans <tom_usenet@optusnet.com.au>
Cc: Michael Gallagher <mjg@isomorphdevelopment.com>,
linux-can@vger.kernel.org
Subject: Re: SocketCAN on Intel Edison with MCP 2515
Date: Sun, 26 Jul 2015 11:05:44 +0100 [thread overview]
Message-ID: <20150726100542.GC11080@bamboo.electronicsoup> (raw)
In-Reply-To: <5566CF9C.4040302@optusnet.com.au>
On Thu, May 28, 2015 at 06:19:40PM +1000, Tom Evans wrote:
> On 28/05/15 01:18, Michael Gallagher wrote:
> >Hello,
> >
> >I am new to SocketCAN and have some basic questions, I'm hoping that
> >someone might be able to point me in the right direction.
> >
> >I have recompiled Yocto (uname - r returns 3.10.17-yocoto standard)
>
> That's pretty new. Newer linux versions rely more and more on the
> Device Tree. If the devices aren't enumerated in the Device Tree
> (meaning that you have an MCP2515 and it is at a specific
> address/chip-select on a particular SPI bus) then it won't enable
> it.
>
> Linux used to be "Plug and Play", but they've fixed that bug...
>
> Device Tree problems are really hard. The "language" and its
> "keywords" depend on every driver and every driver-writer, and they
> make different choices, and then change them when a new kernel comes
> out.
>
I'm certainly no expert but have to say that the Device Tree stuff is great,
from my point of view. I'm using RPi so previously had to edit a "C" board
file for my hardware and create structures to explain to the kernel what SPI
interface the MCP2515 was connected to, What SPI Clock Freq to use, and what
Chip Select pin to use. Then rebuild the kernel with that board file. Not
really Plug and Play.
With the later RPi kernels all I have to do is make sure MCP2515 driver is
included in the build and edit NO C files at all. Basically I then have a
device tree file that tells the RPi kernel you've got an MCP2515 connected on
Chip Select 1 and a RTC on Chip select 2. It does the rest.
One point on the original question is that when you executed "dmesg | grep
can" there was no mention of "can0" at all. It looked like the kernel didn't
recognise the chip was there. I'll try to check this for you but I think when
my system boots it recognises the device and instantiates can0 device.
I might be wrong but I'll check.
John
> Check in the Documentation/devicetree/Bindings to see if it says what to do.
>
> 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
next prev parent reply other threads:[~2015-07-26 10:05 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 [this message]
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
-- 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=20150726100542.GC11080@bamboo.electronicsoup \
--to=arigead@gmail.com \
--cc=linux-can@vger.kernel.org \
--cc=mjg@isomorphdevelopment.com \
--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 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.