N800

Overview
This page is about adding Nokia N800/N810 support to Linux mainline kernels. N800/N810 (from now on called just n8x0) has been in linux-omap tree far too long, we need to get it finally to mainline. There has been discussions on the linux-omap mailing list about this:


 * Re: N810: latest linux-omap-2.6.git master
 * OMAP support in mainline?
 * Re: Things to do after 2.6.29 gets released

All the information about n8x0 mainline inclusion is scattered and the purpose of this page is to collect them into one place. As this is a wiki, it's encouraged for the people to improve the page based on their knowledge.

Kernel Status
Colors:
 * Green = Available
 * Yellow = Work in Progress (WIP), for docs: no documentation, but kernel code available
 * Red = Missing
 * Cyan = Not Available (N/A)

Luke-Jr's git tree
Luke maintains a git tree with his latest work:

http://gitorious.org/~Luke-Jr/linux-omap/n8x0

Kalle Valo's old patches
Some older patches are available from:

http://www.valot.fi/kalle/n8x0/patches/

The patches are against a very old tree of Linus'. This was to make merge to the mainline as easy as possible.

They have been, at least, tested with Sourcery G++ Lite 2008q3-66.

TSC2301 support on linux-omap
TSC2301 support started in the linux-omap tree somewhere in early 2007. See for example commit d6aa131...

The sound driver was removed in commit c65c733... (5 Dec 2008) because the driver must be updated to the new ALSA SoC (ASoC) standard.

In 10, 17 Jun 2009 the other TSC2301 related files (keypad, touchscreen and core drivers) were all removed in commits 0887c51..., 42a0006... and 6e9c9bd.... Reason was just a reset to mainline. This code must be checked for compatibility with current mainline, and then resubmitted to there.

Compiling
Compilation instructions:

export ARCH=arm CROSS_COMPILE=arm-linux- make n8x0_defconfig make zImage modules flasher -k arch/arm/boot/zImage -l -b
 * 1) Set environment parameters for cross-compilation
 * 1) Load default configuration parameters for the N8x0
 * 1) Build kernel image and modules
 * 1) Load kernel for testing
 * 1) Record, or "flash" kernel into device memory
 * 2) flasher -k arch/arm/boot/zImage -f -b

Communication
All discussion should happen at <[mailto:linux-omap@vger.kernel.org linux-omap@vger.kernel.org]> (subscription instructions). Kalle Valo <[mailto:kvalo@adurom.com kvalo@adurom.com]> coordinates all this, so you might want to contact him in case there's something private you want to discuss and CC on all n8x0 related patches. The public communication in the mailing list is the preferred method.

The Plan
This a a draft and very much work in progress!

Most of the drivers needed by n8x0 should be already in mainline, notably exception being the Nokia's proprietary cbus support. But this must be checked.


 * 1) platform data support for omap serial driver
 * 2) n8x0 board file
 * 3) serial port
 * 4) onenand
 * 5) spi
 * 6) display
 * 7) touchscreen
 * 8) keyboard
 * 9) wlan
 * 10) usb
 * 11) cbus
 * 12) * should be converted to use spi framework and send to inclusion for mainline
 * 13) retu
 * 14) * should use new cbus driver
 * 15) tahvo
 * 16) * should use new cbus driver

User space interfaces for Maemo
Diablo (Maemo OS 2008) user space components use non-standard kernel interfaces and most likely the interfaces are not acceptable to mainline. To get Diablo running with latest mainline kernels, this needs to be solved somehow. (You should consider instead looking for more recent systems, such as MeeGo.)

Identified non-standard interfaces:


 * watchdog interface used by dsme
 * bme interface
 * private Wireless Extension calls used by wlancond/eapd
 * audio and DSP in general
 * maybe also display control
 * /proc/component_version read by linuxrc from initfs
 * /proc/bootreason read by dsme

In theory it might be possible to implement an out-of-tree module or separate patchset which provide the diablo specific interfaces to user space. This needs to be investigated.

Patch for dumping retu/tahvo userspace interface activities.

Simplify make
To avoid using adding ARCH variable to every make command add a file named  with the contents below and then you can run make without any options. Thanks to Johannes Berg for the tip.

ARCH=arm CROSS_COMPILE=arm-linux- include Makefile

Avoid CodeSourcery G++ Lite 2007q3-53 release
Kernel compiled with 2007q3-53 fails to boot:

<6>OMAP242x GPIO hardware version 1.8 <6>OMAP clockevent source: GPTIMER1 at 32000 Hz                                Console: colour dummy device 80x30 <6>Calibrating delay loop...

Links

 * Debian and recent linux kernel on N810
 * Gentoo for N8x0
 * OpenWRT on N810 Archived link
 * BOOTING NOKIA N8X0 WITH CURRENT KERNEL, VERSION 2008-07-03