Re: [RFC] About ARM expansion boards and others things

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 4 mei 2011, om 12:46 heeft Enric Balletbò i Serra het volgende geschreven:

> 2011/5/4 Vladimir Pantelic <vladoman@xxxxxxxxx>:
>> Enric Balletbò i Serra wrote:
>>> 
>>> Hi guys,
>>> I'm thinking probably in a crazy idea, I hope someone can help me or
>>> kill definitely this idea from my mind.
>>> 
>>> I'll explain a little more, the real problem is I don't know how to
>>> add support for an expansion board for IGEP v2 board. I see most of
>>> boards adds the support inside the board-xxxxx.c file, for example if
>>> the expansion board has a Touchscreen interface using ADS7846/TSC2046
>>> they register ads7846 platform data in board-xxxx.c file. This is ok
>>> beacause the ads7846 can be detected and if expansion board is not
>>> present  the detection fails, but maybe other devices in expansion
>>> board can't be detected (for example an I/O expansion). So which is
>>> the best form to do this ?
>>> 
>>> I'm thinking in create a kernel module for the expansion board that
>>> add all the new features, the expansion board should come with a I2C
>>> E2PROM for board ID storage, so the idea is create an i2c driver that
>>> reads the E2PROM and if found the Board ID inits all the expansion
>>> board devices.
>> 
>> don't know if you are aware of that:
>> 
>> http://elinux.org/BeagleBoardPinMux#Expansion_boards
>> 
> 
> Yes I know it.
> 
>> also beagle.c board file has support for some expansion boards
>> already, maybe there is some code to be shared.
>> 
>> 
> 
> But I don't see any support for expansion board in board-omap3beagle.c
>  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/arm/mach-omap2/board-omap3beagle.c;h=33007fd4a0835fd298129c9fda30b844707cc08b;hb=HEAD
> 
> i see some patches (not published in mainline) that are reading a
> kernel cmdline. I mean,  the bootloader (u-boot) detects if an
> expansion board is present (mostly via i2c) and then add to the kernel
> cmdline a parameter with the name of the expansion board. The kernel
> reads this parameter and initializes the expansion board devices.
> 
> But not sure if this is a good solution. What solution do you think is
> better ? Using kernel cmdline or create a separate kernel module for
> every expansion board ?

We went the uboot way with beagle because the I2C subsystem in linux sucks for things like this. When we were implementing it there was no sane way to do:

1) register eeprom with i2c
2) read eeprom
3) register additional i2c devices on the expansion board

And of course in-kernel muxing didn't work back then.

To illustrate the problem a bit more, all camera sensor boards use the same I2C id for the sensor, so you can't register them all at once, you need to know which one is attached. So for the beagleboard xM we'd need the following:

a) being able to read the eeprom from linux and (re)initialize extra i2c devices, SPI, mmc, uart, etc
b) being able to read the ID register from the camera sensor and (re)setup the i2c data and v4l2 stuff

Personally, I don't care where the logic resides, it just needs to work and be expandable.

regards,

Koen--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux