0
selfbg

Touchscreen on sunxi-next

Recommended Posts

Hello, 

 

I want to use touchscreen on my lcd. To do this I do the following:

  • Compile my own dtbo and load it:
/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun7i-a20";

	fragment@0 {
		target = <&rtp>;
		__overlay__ {
			allwinner,ts-attached;
		};
	};
};
  • Blacklist gpadc modules:
blacklist sun4i_gpadc_iio
blacklist sun4i_gpadc

 

After reboot the touchscreen is working.

However I cannot see what is loading these two modules?

 

Also is there any other way getting working touchscreen?

 

I'm using armbian 5.34 with kernel version 4.13.11.

Share this post


Link to post
Share on other sites

sun4i-gpadc is loaded by DT "compatible" string

rtp: rtp@01c25000 {
	compatible = "allwinner,sun5i-a13-ts";
	reg = <0x01c25000 0x100>;
	interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
	#thermal-sensor-cells = <0>;
};
➜  ~  % modinfo sun4i-gpadc | grep ^alias
alias:          of:N*T*Callwinner,sun6i-a31-tsC*
alias:          of:N*T*Callwinner,sun6i-a31-ts
alias:          of:N*T*Callwinner,sun5i-a13-tsC*
alias:          of:N*T*Callwinner,sun5i-a13-ts
alias:          of:N*T*Callwinner,sun4i-a10-tsC*
alias:          of:N*T*Callwinner,sun4i-a10-ts
➜  ~  %

And sun4i-gpadc is an MFD driver and it will try to probe the sun4i-gpadc-iio

config MFD_SUN4I_GPADC
	tristate "Allwinner sunxi platforms' GPADC MFD driver"
	select MFD_CORE
	select REGMAP_MMIO
	select REGMAP_IRQ
	depends on ARCH_SUNXI || COMPILE_TEST
	depends on !TOUCHSCREEN_SUN4I
	help
	  Select this to get support for Allwinner SoCs (A10, A13 and A31) ADC.
	  This driver will only map the hardware interrupt and registers, you
	  have to select individual drivers based on this MFD to be able to use
	  the ADC or the thermal sensor. This will try to probe the ADC driver
	  sun4i-gpadc-iio and the hwmon driver iio_hwmon.

	  To compile this driver as a module, choose M here: the module will be
	  called sun4i-gpadc.

 

Share this post


Link to post
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
Reply to this topic...

×   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...
0