Firmware Upgrade - atmel-maxtouch/linux GitHub Wiki
Firmware Upgrade
A maXTouch chip may support different firmware versions, however only compatible firmware will be accepted by the chip.
The firmware is provided from Atmel in an encrypted .enc format as ASCII HEX.
Firmware upgrade and configuration
Changes between firmware versions may result in removal or addition of individual configuration settings and entire objects. This alters the configuration CRC. This means that when the firmware is upgraded, normally a new configuration will need to be loaded to the chip. The kernel driver will attempt to upgrade/downgrade configuration automatically.
Using atmel_mxt_ts kernel driver
The “enc” firmware files must be converted into raw format:
xxd -r -p firmware.enc > maxtouch.fw
The file must be placed in the firmware loader path, normally /lib/firmware/
on Linux systems. Then, issuing
the following command will trigger firmware update:
echo maxtouch.fw > /sys/bus/i2c/drivers/atmel_mxt_ts/1-004a/update_fw
I2C flash using mxt-app
The mxt-app utility can also be used to flash maXTouch chips using the i2c-dev interface. This interface is enabled in the kernel configuration through CONFIG_I2C_CHARDEV. By default the utility will attempt to locate the sysfs debug interface to identify the correct I2C adapter and address for the chip. However it’s possible for user to manually provide this information through command line arguments.
To automatically scan chip’s bootloader address and flash firmware file.enc:
mxt-app --flash file.enc
To automatically scan chip’s bootloader address and flash firmware file.enc. Flash only when current firmware version within the chip is not 2.0.AA:
mxt-app --flash file.enc --firmware-version 2.0.AA
To bypass the driver and flash firmware file.enc to the chip registered at I2C adapter 2 with bootloader address 0x27:
mxt-app -d2 -a27 --flash file.enc
This last option is useful in case chip is stuck in bootloader mode and maXTouch driver isn’t running.
Note: The driver may still receive interrupts during the flashing process and performs many unsuccessful I2C reads. This is benign behaviour however.
USB flash using mxt-app
To automatically flash firmware to a maXTouch chip connected via USB:
mxt-app --flash file.enc
Further information
The document QTAN0051 - Bootloader
gives additional low-level
information about the bootloading protocol and is available from Atmel
under NDA.