CI20 upstream

This page contains details about the latest kernel branch running on the CI20.

It will be periodically updated to keep up to speed with the latest.

The current branch tracking mainline 3.18.3

https://github.com/MIPS/CI20_linux

Overview
The CI20 uses the Ingenic JZ4780 SoC. Ingenic provided a 3.0.8 kernel with reasonable support for most peripherals on the JZ4780. However, Imagination Technologies has reworked many drivers and forward ported others.

Ingenic produce another SoC called the JZ4740. This SoC has many similarities to the JZ4780 and many of its drivers are in the mainline kernel, although some are rather outdated. With this in mind, the best practice would be to augment the JZ4740 drivers to work with the JZ4780.

The 3.16 branch was created to run the CI20 on a more recent kernel with the aforementioned similarities in mind. There was some work done on consolidation to use the existing JZ4740 drivers. But the core SoC parts were still disjoint.

After collaboration with the kernel community working on JZ4740, JZ4770, JZ4780. 3.18 was rewritten with heavy emphasis on consolidation of the core SoC driver. The resulting core patches are in-flight.

There is still lots of work to be done, so please do contribute to kernel development. We are very welcoming and friendly on #ci20 chatroom and the mailing list

Core
In-flight patch series for jz4780 core support in kernel can be seen here http://www.spinics.net/lists/mips/msg55258.html

Ethernet MAC Address
Due to the manufacturing process for the CI20, the ethernet's MAC address isn't burned into its EEPROM - it is instead burnt into EEPROM on the other side of the board. The move to 3.18 means the MAC address has to be set at boot time (otherwise a random MAC will be chosen).

This can be done using U-BOOT - add the following to your bootargs:

dm9000.mac_addr=${ethaddr}

Note: Setting this bootarg for a kernel before 3.18 will cause a kernel panic.

Audio over HDMI
Audio over HDMI is not currently supported in kernel 3.18+, although it was supported in 3.0.8.

WiFi firmware
WiFi on the CI20 is provided by a BRCM4330 chip that requires closed source firmware. These files cannot be shipped as part of the kernel repository and are instead loaded through user space.

The required files can be found here or copied and renamed from the Debian NAND image, as is illustrated below:

ci20:/lib/firmware/iw8103/fw_bcm4330b2.bin -> /lib/firmware/brcm/brcmfmac4330-sdio.bin

ci20:/lib/firmware/iw8103/nv_4330b2.txt -> /lib/firmware/brcm/brcmfmac4330-sdio.txt

Note: Without these files the wireless driver will fail when loading.

It is a good idea to unload the Broadcom module after copying over the firmware:

modprobe -r brcmfmac

Then load the module to enable WiFi:

modprobe brcmfmac

NAND
If you are using the default debian rootfs on NAND and just update the kernel then a change needs to be made to the bootargs.

The NAND drivers between 3.0.8 and 3.16 are different. And detect different partition structures - 3.0.8 detects rootfs on mtd1 whilst 3.18 detects rootfs on mtd3.

With this in mind, change U-BOOT's bootargs to:

setenv bootargs "console=ttyS4,115200 mem=256M@0x0 mem=768M@0x30000000 ubi.mtd=3 root=ubi0:root rootfstype=ubifs rw clock_ignore_unused" ^ Note: You might want to add another file in /boot instead of changing vmlinux.img so that you can still boot your CI20 if something is wrong with your kernel.

setenv bootcmd "mtdparts default; ubi part system; ubifsmount ubi:boot; ubifsload 0x88000000 uImage.3.18; bootm 0x88000000" ^ Finally, save the environment:

saveenv

SGX
GPU drivers rely on userland binaries and kernel module sources. The work to move to a DRI based system is on-going at IMG. Until the drivers are updated, using the GPU (openGL etc) will not be possible.

For normal usage, Xorg and framebuffer drivers do work. The default xorg.conf is configured to load the PowerVR module. Keep a copy of that somewhere else and use this xorg.conf

Note: Rename to xorg.conf. Don't leave it named xorg.conf.fbdev.

Place in: /etc/X11/xorg.conf