Adding a "platform" device (CAN controller)
Problem: I need to bring up the SJA 1000 CAN controller on the [Colibri Evaluation Carrier Board v2.1] (with Colibri T20 (NVidia Tegra)module inserted into it, which has ARM cpu). toradex.com/Products/Colibri/Modules/Colibri-T20
Research: On the Toradex website they write that subject chip is "connected to GMI bus" (which could be "General Memory Interface"). I couldn't find anything about "GMI bus" in google, and I assume this is the same as "platform bus".
Is this correct?
Ok, if so, we have the following: there are drivers in Linux
`kernel/drivers/net/can/sja1000/sja1000.c` & `sja1000_platform.c`
which should be what I need, in addition to `can` and `can-dev` drivers. But they can't be started (not even probed), because the kernel doesn't know about subject platform device.
All "platform" devices are added with their resources from the "board driver" `kernel/arch/arm/mach-tegra/board-colibri_t20.c` via `platform_add_devices() func`. The problem is that it initializes all the devices from Colibri T20 and not the CAN chip which is on Eval Board.
So finally, if all above is correct, to bring up the drivers, I need to create a "platform_device" structure with the array of "resource" structures inside it with exact numbers of IRQs and memory addresses. There is the controller's datasheet, as well as board's datasheet, people told it should be used. Please help me work out how to use it; which good articles/books to read for this.
Please help, I'm really stuck!
welcome to LQ :newbie:
Welcome. Usually we try to offer assistance or leave questions empty so that others search for zero replies would tend to look at each one. Now that this has been answered I will try to help if I can. (and I don't think so)
Are you booting to the T20_LinuxImageV1.0_20120504.tar.bz2 image?
I hope that someone with more knowledge will assist.
The company that makes these may also have some assistance available.
Yes, I'm booting the correct image from Toradex with with custom build FS and with added drivers for CAN SJA1000, tried both modules and kernel built-in - not working, because (I'm pretty sure) there is struct should be passed to platform_add_devices() at the system boot and it is not there for CAN controller.
The company is asking an enourmous amount of money for support on this problem, so my management want me to study this by myself :)
Try it again with the stock image and see if you can get it up or seen. I don't believe the choice of power to chip is an issue. It should be only for can voltage but investigate it. It could be that the chip is also isolated from the board and needs external or internal jumper to power it.
|All times are GMT -5. The time now is 01:41 AM.|