Issue #1885

Touch key firmware binary in kernel source code (smdk4412)

Added by Joonas Kylmälä about 3 years ago. Updated about 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Type of work:


I noticed that the smdk4412 kernel used by Midas devices has some firmware in binary form: This should be removed as there doesn't seem to be source code for it, therefore making it non-free.



Updated by Joonas Kylmälä about 3 years ago

Simon Shields on IRC said the firmware is not needed (at least with mainline I guess) so it might be possible just to remove it also from this legacy kernel source.


Updated by Fil Bergamo almost 3 years ago

Joonas Kylmälä wrote:

Simon Shields on IRC said the firmware is not needed (at least with mainline I guess) so it might be possible just to remove it also from this legacy kernel source.

Is it just enough to remove the file itself?
Do we need to update any reference in other source files?

I can test a build without this firmware for i9100, i9300, n7100 and then send a patch, if the removal is that simple.

Also, I noticed that other firmware files in the same directory that seem to be in binary form only:

- touchkey_fw_NAATT.h
- touchkey_fw_NTT.h
- touchkey_fw_Q1.h
- touchkey_fw_T0.h
- touchkey_fw_U1.h

Furthermore, all source files in this directory seem to have a copyright header that references a seemingly non-free license:

Use may be limited by and subject to the applicable Cypress software license agreement.

A quick search on didn't get me anything meaningful regarding any general "Cypress software agreement".
There are some generic terms and conditions that apply to software obtained via, and they explicitly prohibit copying and redistributing sofware..

The only file that clearly states it's free software is cypress-touchkey.c
Though, this one free-licensed file does reference all other files that are seemingly-non-free.

The same applies to files in

While we are at it..
I took a sample look at
and it's full of binary-only files without a license..

What should we do about all this?

--- EDIT:

I tried to simply remove both directories: drivers/input/keyboard/cypressbln and drivers/input/keyboard/cypress
It does build, after removing references to those directories in drivers/input/keyboard/Kconfig, but, as expected, the "simulated hardware keys" on i9100 don't work.
I will try a less dramatic approach, by looking at specific references and try to cherry-pick files that can be safely removed..


Updated by Fil Bergamo almost 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Fil Bergamo

Updated by Fil Bergamo almost 3 years ago

I carefully removed all references to binary firmware data inside source files, rebuilt the whole tree from scratch, and tested for i9100 and i9300: touch keys still seem to work flawlessly, even with those binary firmwares removed.

In facts, the only place where firmware_data is used is in function LoadProgramData, defined at issp_driver_routines.c
Reading the comments above this function's definition suggests that it is only used for testing purposes, and is irrelevant for regular operation:

// The final application should load program data from HEX file generated by
// PSoC Designer into a 64 byte host ram buffer.
// This demo program will, instead, load predetermined data into each block.

So, it seems like we can do without these binary-only files:

Attached is a patch that removes those files and all related references in the cypress source code.
It is quite big because it lists the whole content of deleted files. I'm sorry but my knowledge of git is very limited and I wasn't able to prevent this, no matter how hard I tried...

  • Warning (1): I only tested it for i9100 and i9300 and only for brief operations, there's no guarantee over long-time side effects, even if they seem unlikely*
  • Warning (2): this patch does NOT solve the problem with the ambiguous copyright statement found in the other cypress source files, which must be still discussed*
    What shall we do about them?

Updated by Fil Bergamo almost 3 years ago

  • Target version changed from Replicant 6.0 to Replicant 6.0 0004

Updated by Kurtis Hanna almost 3 years ago

I saw these links posted in the IRC from user PabloPL and figured I'd post them here since I think they are related:

PabloPL also said" probably needs change in midas dts (but there should be already patch for it on forkbomb github repo)"


Updated by Denis 'GNUtoo' Carikli over 2 years ago

  • Status changed from Feedback to In Progress

Updated by Denis 'GNUtoo' Carikli over 2 years ago

  • Assignee changed from Fil Bergamo to Denis 'GNUtoo' Carikli

Updated by Joonas Kylmälä about 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Updated by Kurtis Hanna about 1 year ago

Perhaps I was mistaken with my last question. Maybe this commit is the reason why the "verdict" column should be updated:

Also available in: Atom PDF