Jump to content
  • 0

Pine A64 MIPI DSI mainline


Learnincurve
 Share

Question

Hi,

 

   I have a couple of these boards which I have been using with Armbian and the old, 3.10 kernel. Ideally I would really like to go mainline as later kernels have some functionality that would be useful for my use of the board. The only remaining reason (apart from cpu freq.) for sticking to the 3.10 kernel has been the lack of MIPI DSI support in mainline, but now I see that, despite the Matrix at http://linux-sunxi.org/Linux_mainlining_effort still being red for A64 mipi, some work is being/has been done by Maxime Ripard.

 

I'm just wondering if anyone here knows if a working mainline kernel with DSI for the Pine 64 is starting to look like a possibility and if it might be possible to include in an armbian build.  I might be able to do some testing of anyone can guide me in making a build with the necessary patches.

Link to comment
Share on other sites

Recommended Posts

  • 0

Hi,

Is anyone having issues with the touchscreen itself being reversed to the LCD panel using the latest mainline? I do get the LCD to come up and am seeing no issues - fantastic work by the way - but it's weird that the touchscreen is coming up the way it is, when I haven't had this issue on the earlier android builds at all.

 

I do see on the goodix driver source that there's some quirks that can be used for inverting x and y positions being reported (which is the issue I currently have - and it tracks if I rotate the screen, it's always inverted), but I can't get them to work at all on the main (not beta) release.

 

 

I'm using the 5.10.21-sunxi64 kernel based Focal Gnome Desktop image from the stable releases.

My armbianEnv.txt file consists of the following change:

<original stuff>
overlay_prefix=sun50i-a64
overlays=pine64-7inch-lcd
rootdev=UUID=....
<more original stuff>

 

I have tried using dtoverlay and trying something like the following, but with no success (as suggested by similar posts from raspi4 folks trying to get their goodix-enabled touch panels working:

<original stuff>
overlay_prefix=sun50i-a64
overlays=pine64-7inch-lcd
dtoverlay=goodix,interrupt=4,reset=17,touchscreen-inverted-x,touchscreen-inverted-y
rootdev=UUID=....
<more original stuff>

 

Thoughts? Suggestions? Is there a correct way of doing this in the env file, or elsewhere?

Thanks in advance!

Link to comment
Share on other sites

Search Before Posting!

  • 0

Hello @tobogdan I have exact the same problem. Debian Buster  5.10.21-sunxi64 - installed minimal Xorg, the touch is inverted in both directions. Also it seems, that scrollingis messed up as well. Did you find any solution ?

 

I found at least a workaround by inverting the axis in the libinput driver

 

You may need install xinput for this.

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech M720 Triathlon                 	id=6	[slave  pointer  (2)]
⎜   ↳ Goodix Capacitive TouchScreen           	id=10	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳   USB Keyboard                          	id=7	[slave  keyboard (3)]
    ↳   USB Keyboard System Control           	id=8	[slave  keyboard (3)]
    ↳   USB Keyboard Consumer Control         	id=9	[slave  keyboard (3)]
    ↳ axp20x-pek                              	id=11	[slave  keyboard (3)]
    ↳ Logitech M720 Triathlon                 	id=12	[slave  keyboard (3)]
    ↳ Goodix Capacitive TouchScreen           	id=13	[slave  keyboard (3)]

The touch screen pointer is located under the id 10

$ xinput list-props 10
Device 'Goodix Capacitive TouchScreen':
	Device Enabled (121):	1
	Coordinate Transformation Matrix (122):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix (279):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix Default (280):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Send Events Modes Available (267):	1, 0
	libinput Send Events Mode Enabled (268):	0, 0
	libinput Send Events Mode Enabled Default (269):	0, 0
	Device Node (270):	"/dev/input/event4"
	Device Product ID (271):	1046, 911

You need to change the coordinate matrix - here the number 122, for details see here

$ xinput set-prop 10 122 -1 0 1 0 -1 1 0 0 1
$ xinput list-props 10
Device 'Goodix Capacitive TouchScreen':
	Device Enabled (121):	1
	Coordinate Transformation Matrix (122):	-1.000000, 0.000000, 1.000000, 0.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix (279):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Calibration Matrix Default (280):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Send Events Modes Available (267):	1, 0
	libinput Send Events Mode Enabled (268):	0, 0
	libinput Send Events Mode Enabled Default (269):	0, 0
	Device Node (270):	"/dev/input/event4"
	Device Product ID (271):	1046, 911

At least clicking works fine now, problem is still, that any dragging results in scroll event downwards 

Link to comment
Share on other sites

  • 0

Hi @karlitos

That's basically what I've had to do as well, but it's a bit of a hacky way of getting it working especially when it seems that the goodix module does have quirks that you should be able to activate at the driver level. Ideally, we have the goodix module quirks enable and just treat it that way. I haven't tried rotating my screen yet, but I assume using the xinput method will end up breaking once you rotate the display.

 

For some reason, I can't seem to get the quirks registering. I think I'm just doing something wrong, I've never had to enable quirks before so it's probably just me.

 

I also see the same issue as you with the click/drag part but I'm not altogether sure how to handle that. I think the touch screen was only ever created for simple touch/poke interfaces, not for a 10-finger experience like you get on most modern systems, right?

 

Also, I was wondering if there's another thread we should start about this particular piece (as this thread was initially created for the LCD part, not necessarily for the touch piece) - if anyone wants to chime in here.

 

Hopefully folks with more experience/understanding than me can respond here.

Link to comment
Share on other sites

  • 0

Hi @tobogdan,

 

are you sure, the dtoverlay= line apply for the Pine64/Armbian ? I found it mentioned only in connecntion with raspberryPi. I also checked the /boot/dtb directory and did not found any .dtb file related to the goodix driver.

 

I am actually quite happy now with the workaround. Since the device id might change between reboots I was more successfull using

xinput set-prop 'pointer:Goodix Capacitive TouchScreen' 122 -1 0 1 0 -1 1 0 0 1

which seems to be consistent

Link to comment
Share on other sites

  • 0

Thanks @karlitos for the suggestion. I was trying to do something a bit more robust so that I wouldn't have to worry about devices moving around, or having to set up a login-script per user that got created on the device.

So I did something akin to what you did, but set it up in the /etc/X11/xorg.conf.d/01-armbian-defaults.conf section. I simply added the following:

Section "InputClass"
  Identifier 			"pointer:Goodix Capacitive TouchScreen"
  MatchProduct 			"Goodix Capacitive TouchScreen"
  Option			"TransformationMatrix" "-1 0 1 0 -1 1 0 0 1"
EndSection

 

This seems to work pretty consistently and well. While I'd like to use the tweaks instead, and just have it handled natively outside of relying on XInput, I guess this is good enough for now.

Thanks for your hint for using the "pointer" section since I had no idea for the life of me why it wasn't picking it up until I set it up like the above. This was tested on the xfce and gnome variants of the current kernel (5.10.34-sunxi64).

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...