mbox series

[0/7] Input: goodix - Add support for controllers without flash

Message ID 20210428114608.101795-1-hdegoede@redhat.com (mailing list archive)
Headers show
Series Input: goodix - Add support for controllers without flash | expand

Message

Hans de Goede April 28, 2021, 11:46 a.m. UTC
Hi All,

A while ago I bought a Glavey TM800A550L tablet. This is a Bay Trail (x86)
tablet which comes with Android from the factory.

It is mostly just another Bay Trail tablet, but the way the Goodix
touchscreen on it works is interesting. The controller needs to have
firmware uploaded to it before it will work. After that it pretty much
works 100% the same as any other Goodix touchscreen controller.

I've described this patch-set in the Subject as "Add support for
controllers without flash", but I suspect that the Goodix controllers
used on Bay Trail devices which ship with Windows pre-installed may also
lack flash; and that the Windows version of the BIOS-es on these devices
does the upload for us. Anyways just something which I'm wondering about,
these patches are necessary to make things work regardless.

These patches should also be useful for supporting the Goodix controllers
on some ARM based devices, as some of those need the OS to upload the
firmware too AFAIK.

Note patch 7/7 is included to get an overview of the entire set.
I'll merge that one myself through the pdx86 tree. Patches 1-6 are
intended for merging through the input tree.

Regards,

Hans


Hans de Goede (7):
  Input: goodix - Change goodix_i2c_write() len parameter type to int
  Input: goodix - Add a goodix.h header file
  Input: goodix - Refactor reset handling
  Input: goodix - Push error logging up into i2c_read and i2c_write
    helpers
  Input: goodix - Allow specifying the config filename through a
    "goodix,config-name" device-property
  Input: goodix - Add support for controllers without flash
  platform/x86: touchscreen_dmi: Add info for the Goodix GT912 panel of
    TM800A550L tablets

 MAINTAINERS                                 |   3 +-
 drivers/input/touchscreen/Makefile          |   3 +-
 drivers/input/touchscreen/goodix.c          | 239 +++++------
 drivers/input/touchscreen/goodix.h          | 118 ++++++
 drivers/input/touchscreen/goodix_fwupload.c | 437 ++++++++++++++++++++
 drivers/platform/x86/touchscreen_dmi.c      |  21 +
 6 files changed, 684 insertions(+), 137 deletions(-)
 create mode 100644 drivers/input/touchscreen/goodix.h
 create mode 100644 drivers/input/touchscreen/goodix_fwupload.c

Comments

Bastien Nocera April 28, 2021, 12:03 p.m. UTC | #1
On Wed, 2021-04-28 at 13:46 +0200, Hans de Goede wrote:
> Hi All,
> 
> A while ago I bought a Glavey TM800A550L tablet. This is a Bay Trail
> (x86)
> tablet which comes with Android from the factory.
> 
> It is mostly just another Bay Trail tablet, but the way the Goodix
> touchscreen on it works is interesting. The controller needs to have
> firmware uploaded to it before it will work. After that it pretty
> much
> works 100% the same as any other Goodix touchscreen controller.
> 
> I've described this patch-set in the Subject as "Add support for
> controllers without flash", but I suspect that the Goodix controllers
> used on Bay Trail devices which ship with Windows pre-installed may
> also
> lack flash; and that the Windows version of the BIOS-es on these
> devices
> does the upload for us. Anyways just something which I'm wondering
> about,
> these patches are necessary to make things work regardless.
> 
> These patches should also be useful for supporting the Goodix
> controllers
> on some ARM based devices, as some of those need the OS to upload the
> firmware too AFAIK.
> 
> Note patch 7/7 is included to get an overview of the entire set.
> I'll merge that one myself through the pdx86 tree. Patches 1-6 are
> intended for merging through the input tree.


I've done a cursory review, and didn't find anything particularly
egregious. Did you check that the intermediate patches all compiled?
Feel free to add my Reviewed-by:

My only question would be where the firmware are supposed to come from
after this gets merged.

Cheers
Hans de Goede April 28, 2021, 1:18 p.m. UTC | #2
Hi,

On 4/28/21 2:03 PM, Bastien Nocera wrote:
> On Wed, 2021-04-28 at 13:46 +0200, Hans de Goede wrote:
>> Hi All,
>>
>> A while ago I bought a Glavey TM800A550L tablet. This is a Bay Trail
>> (x86)
>> tablet which comes with Android from the factory.
>>
>> It is mostly just another Bay Trail tablet, but the way the Goodix
>> touchscreen on it works is interesting. The controller needs to have
>> firmware uploaded to it before it will work. After that it pretty
>> much
>> works 100% the same as any other Goodix touchscreen controller.
>>
>> I've described this patch-set in the Subject as "Add support for
>> controllers without flash", but I suspect that the Goodix controllers
>> used on Bay Trail devices which ship with Windows pre-installed may
>> also
>> lack flash; and that the Windows version of the BIOS-es on these
>> devices
>> does the upload for us. Anyways just something which I'm wondering
>> about,
>> these patches are necessary to make things work regardless.
>>
>> These patches should also be useful for supporting the Goodix
>> controllers
>> on some ARM based devices, as some of those need the OS to upload the
>> firmware too AFAIK.
>>
>> Note patch 7/7 is included to get an overview of the entire set.
>> I'll merge that one myself through the pdx86 tree. Patches 1-6 are
>> intended for merging through the input tree.
> 
> 
> I've done a cursory review, and didn't find anything particularly
> egregious. Did you check that the intermediate patches all compiled?

Yes I did.

> Feel free to add my Reviewed-by:

Thanks, I've added this locally so it will be part of a v2 if
a v2 is necessary.

> My only question would be where the firmware are supposed to come from
> after this gets merged.

That is a good question. I guess step 1 would be to see if we can 
get permission to distribute these from Goodix themselves, so
that these can be added to linux-firmware.

Alternatively I can ask the gsl-firmware repo maintainer if it
is ok to also add Goodix firmware there:

https://github.com/onitake/agsl-firmware/tree/master/firmware/linux

ATM that contains a whole bunch of firmwares for devices with
Silead GSLx6xx controllers. I've contacted Silead about this in
the past but I've failed to get permission to add these to
linux-firmware.

Regards,

Hans
Hans de Goede July 1, 2021, 2:29 p.m. UTC | #3
Hi,

On 4/28/21 1:46 PM, Hans de Goede wrote:
> Hi All,
> 
> A while ago I bought a Glavey TM800A550L tablet. This is a Bay Trail (x86)
> tablet which comes with Android from the factory.
> 
> It is mostly just another Bay Trail tablet, but the way the Goodix
> touchscreen on it works is interesting. The controller needs to have
> firmware uploaded to it before it will work. After that it pretty much
> works 100% the same as any other Goodix touchscreen controller.
> 
> I've described this patch-set in the Subject as "Add support for
> controllers without flash", but I suspect that the Goodix controllers
> used on Bay Trail devices which ship with Windows pre-installed may also
> lack flash; and that the Windows version of the BIOS-es on these devices
> does the upload for us. Anyways just something which I'm wondering about,
> these patches are necessary to make things work regardless.
> 
> These patches should also be useful for supporting the Goodix controllers
> on some ARM based devices, as some of those need the OS to upload the
> firmware too AFAIK.
> 
> Note patch 7/7 is included to get an overview of the entire set.
> I'll merge that one myself through the pdx86 tree. Patches 1-6 are
> intended for merging through the input tree.

Self NACK for this series I just found out that the controller on
a Chuwi Hi13 gets mis-indentified as needing fw upload even though
that is not the case.  I'll send out a fixed v2 rebased on top of
5.14-rc1 once 5.14-rc1 is out.

Regards,

Hans



> Hans de Goede (7):
>   Input: goodix - Change goodix_i2c_write() len parameter type to int
>   Input: goodix - Add a goodix.h header file
>   Input: goodix - Refactor reset handling
>   Input: goodix - Push error logging up into i2c_read and i2c_write
>     helpers
>   Input: goodix - Allow specifying the config filename through a
>     "goodix,config-name" device-property
>   Input: goodix - Add support for controllers without flash
>   platform/x86: touchscreen_dmi: Add info for the Goodix GT912 panel of
>     TM800A550L tablets
> 
>  MAINTAINERS                                 |   3 +-
>  drivers/input/touchscreen/Makefile          |   3 +-
>  drivers/input/touchscreen/goodix.c          | 239 +++++------
>  drivers/input/touchscreen/goodix.h          | 118 ++++++
>  drivers/input/touchscreen/goodix_fwupload.c | 437 ++++++++++++++++++++
>  drivers/platform/x86/touchscreen_dmi.c      |  21 +
>  6 files changed, 684 insertions(+), 137 deletions(-)
>  create mode 100644 drivers/input/touchscreen/goodix.h
>  create mode 100644 drivers/input/touchscreen/goodix_fwupload.c
>