# modprobe 8139too
Linux kernel for CM-X270
This page presents in some detail changes and addition done to Linux kernel to provide support for CM-X270 platform. Also, it gives some guidelines for drivers use and configuration.
Basic Platform Support
The CM-X270 platform basic support is implemented in the linux/arch/arm/mach-pxa/cm-x270.c. This file includes registration of the devices integrated in the PXA270 SoC, definitions of platform-specific configuration of these devices, platfrom-specific power management code and static mapping for memory mapped IO. This file also includes several routines needed for proper operation of the PCI bridge.
The board support for CM-X270 introduces driver for ITE 8152 companion chip and platform specific drivers for proper initalization of ITE 8152 on the CM-X270. The bridge driver implementation resides in linux/arch/arm/mach-pxa/it8152.[ch], parts of the CM-X270 specific initialization code are in linux/arch/arm/mach-pxa/cm-x270-pci.c. There are also changes in linux/arch/arm/kernel/bios32.c that are needed to use the ITE 8152 PCI bridge.
PCI Ethernet Cards
The CompuLab stock kernel does not include built-in support for PCI Ethernet cards. A driver for popular RealTek 8139 card is available as loadble kernel module in Debian linux for CM-X270 package. The modules is called 8139too and can be enabled using
# modprobe 8139too
Sound and Touchsreen
UCB1400 AC97 codec with inetgrated touchscreen has several registers, that are not present in AC97 standard. We added initialization of some of these registers and exposure of these registers to user space. This change can be found in linux/sound/pci/ac97/ac97_patch.[ch]
Both audio and touchscreen drivers are modularized if you use default CM-X270 configuration. The following commands enable audio support and touchscreen support respectively:
# modprobe snd-pxa2xx-ac97 # modprobe ucb1x00-ts
Note, that enabling touchscreen driver without AC97 controller driver is meaningless, since ucb1x00-ts driver uses AC97 bus to access the touchscreen device.
More information about Linux audio subsystem can be found at http://www.alsa-project.org
AC'97 and PCI interaction
CM-X270 contains local bus arbitration logic needed to arbiter bus acesses between the CPU and PCI bridge. This arbitration logic and AC97 controller share the same input clock. Linux AC97 driver tests whether there's an audio codec attached to the AC97 bus. If the driver does not find a codec, it disables PXA270 AC97 controller, and its clock altogether. Disabling this clock, in turn, disables the local bus arbitration, and makes PCI bridge useless.
To avoid such unpleasant sutiation we'd recommend not to enable sound drivers, unless you need them.
2700G graphics accelerator
The 2700G graphics accelerator driver implements standard Linux frame buffer devices. Currently it does not include support for 2D and 3D acceleration. The driver resides in linux/drivers/video/mbx/.
The 2700G timing parametrs and resolution can be set using standart Linux fbset utility.
CompuLab provides proprietary driver for on-board NAND flash. This driver emulates block device and provides wear-leveling for the flash. The driver uses the same NAND flash layout as the ARMMon bootloader.
Starting at latest kernel release at October 12, 2006, we also included MTD driver for CM-X270. More information about using MTD on CM-X270 can be found here
Recently we discovered that certain NAND flash chips are not tolerant to any activity on local bus during flash accesses. To overcum this limitation we added an option to NAND flash drivers that allows to ensure there is no bus activity at the time NAND flash is active. This option can be swithced on and of with block_irqs parameter of the NAND flash driver.
The driver for wireless LAN chip present on CM-X270L is provided by the chip manufacturer and therefore redistributed by CompuLab in binary form. The driver is called bgw200 and can be enabled using
# modprobe bgw200 pu8SSID=<your_ESSID>
You can use Linux standard iwconfig, iwscan, iwevent, iwgetid, iwlist, iwpriv, iwspy utilities. In Debain these utilties are part of wireless-tools package.
The bgw200 driver supports WEP encryption. The following command sequence enables the encryption. Here we assume that wireless chip was assigned eth1 interface, and that zero ESSID is intentionally meaningless.
# modprobe bgw200 pu8SSID=0 # iwconfig eth1 key restricted  <KEY> # iwconfig eth1 key restricted  # iwconfig eth1 essid <ESSID>
The PC Card market confuses people with differences in terminology sometimes referring to 16-bit PCMCIA cards as CompactFlash, and sometimes calling 32-bit cards PCMCIA. CM-X270 uses completely different interfaces to access 16-bit and 32-bit cards, so here we make some clarifications about terminology we use, and restrictions on PC Card usage. The PXA270 internal PCMCIA controller is used to access all types of 16-bit cards. Therefore we call all 16-bit cards PCMCIA. On the other side, 32-bit cards are accessed through CardBus controller present on the ATXBase, therefore we call all the types of 32-bit cards CardBus.
Our default Debian linux for CM-X270 tries to detect presence of the CardBus controller, and accrording to the detection results it loads an appropriate driver. Either pxa2xx-cs for PXA270 internal PCMCIA (16-bit) controller, or yenta_socket for external CardBus controller.
In general, the CardBus controller should also work with 16-bit cards, but currently this feature is not supported by our Linux kernel.
The support for MMC/SD card on CM-X270 is available as loadable kernel module. You need to
# modprobe mmc_block # modprobe pxamci
to enable these drivers.
Afterwards, to mount the memory card, monitor /proc/partitions to see what partitions were detected on the MMC/SD card. Next, if there's approptiate device node in /dev, you can directly mount it, otherwise you should create the device node first. For example, suppose MMC/SD partition you'like to mount is mmcblk0p1 then:
# if [ ! -b /dev/mmcblk0p1 ]; then mknod /dev/mmcblk0p1 b 253 1; fi # mount /dev/mmcblk0p1 /mnt/mmc
I2C and SPI
Standard I2C and SPI drivers can be used to access these buses on CM-X270. The I2C drivers are present in Linux kernel 2.6.16, and can be easily enabled using Linux kernel configuration.
As for the SPI drivers, they should be backported to Linux kernel 2.6.16 from 2.6.17 or more recent kernel version.
USB devices drivers for PXA270 are not available in vanilla kernels, and this is the main reason we do not support USB device functionality on CM-X270. Yet, there several patches available at Handhelds.org, Raphael Assenat site dedicated to Linux on CompuLab boards, and probably others. We never tried these patches, and we don't know which of them will work on CM-X270.