All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Input: edt-ft5x06 - FT6336G Touch Panel
@ 2020-03-02 14:30 Oliver Graute
  2020-03-02 15:00 ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Oliver Graute @ 2020-03-02 14:30 UTC (permalink / raw)
  To: linux-input
  Cc: dmitry.torokhov, rydberg, andriy.shevchenko, m.felsch, robh,
	mylene.josserand, p.zabel

Hello,

I have on of these FT6336G Touch Panels here and I try to get it work
with the ft6236 driver. It comes up with model identification "0x11". So
I added that identification to the switch case in
edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
corrupted stack. No clue why. Some ideas?

Best regards,

Oliver


@@ -879,6 +879,7 @@ static int edt_ft5x06_ts_identify(struct i2c_client *client,
 		 * the identification registers.
 		 */
 		switch (rdbuf[0]) {
+		case 0x11:   /* EDT EP0110M09 */
 		case 0x35:   /* EDT EP0350M09 */
 		case 0x43:   /* EDT EP0430M09 */
 		case 0x50:   /* EDT EP0500M09 */

In my device tree I added the following:

&i2c2 {
	#address-cells = <1>;
	#size-cells = <0>;
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_lpi2c2>;
	status = "okay";

	polytouch: edt_ft6236@38 {
		compatible = "focaltech,ft6236";
		reg = <0x38>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_edt_ft5x06>;
		interrupt-parent = <&lsio_gpio0>;
		interrupts = <2 0>;
	};
};

[    2.232596] i2c i2c-0: LPI2C adapter registered
[    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
[    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator
[    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
[    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
[    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
[    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
[    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
[    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
[    2.307544] Workqueue: events deferred_probe_work_func
[    2.312686] Call trace:
[    2.315141]  dump_backtrace+0x0/0x1c0
[    2.318802]  show_stack+0x14/0x20
[    2.322124]  dump_stack+0xb4/0xfc
[    2.325440]  panic+0x158/0x320
[    2.328494]  print_tainted+0x0/0xa8
[    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88
[    2.336248]  i2c_device_probe+0x2d0/0x2f8
[    2.340258]  really_probe+0xd8/0x438
[    2.343836]  driver_probe_device+0xdc/0x130
[    2.348017]  __device_attach_driver+0x88/0x108
[    2.352464]  bus_for_each_drv+0x74/0xc0
[    2.356302]  __device_attach+0xdc/0x160
[    2.360133]  device_initial_probe+0x10/0x18
[    2.364312]  bus_probe_device+0x90/0x98
[    2.368151]  device_add+0x434/0x770
[    2.371636]  device_register+0x1c/0x28
[    2.375383]  i2c_new_client_device+0x134/0x2a8
[    2.379833]  of_i2c_register_device+0xb0/0xd8
[    2.384192]  of_i2c_register_devices+0x9c/0x198
[    2.388724]  i2c_register_adapter+0x150/0x418
[    2.393076]  __i2c_add_numbered_adapter+0x58/0xa0
[    2.397776]  i2c_add_adapter+0x9c/0xc8
[    2.401525]  lpi2c_imx_probe+0x1b0/0x2a0
[    2.405451]  platform_drv_probe+0x50/0xa0
[    2.409461]  really_probe+0xd8/0x438
[    2.413032]  driver_probe_device+0xdc/0x130
[    2.417210]  __device_attach_driver+0x88/0x108
[    2.421658]  bus_for_each_drv+0x74/0xc0
[    2.425489]  __device_attach+0xdc/0x160
[    2.429321]  device_initial_probe+0x10/0x18
[    2.433499]  bus_probe_device+0x90/0x98
[    2.437331]  deferred_probe_work_func+0x88/0xd8
[    2.441864]  process_one_work+0x19c/0x320
[    2.445870]  worker_thread+0x1f0/0x420
[    2.449622]  kthread+0xf0/0x120
[    2.452762]  ret_from_fork+0x10/0x18
[    2.456349] SMP: stopping secondary CPUs
[    2.460272] Kernel Offset: disabled
[    2.463762] CPU features: 0x00002,2000200c
[    2.467859] Memory Limit: none
[    2.470927] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88 ]---




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-02 14:30 RFC: Input: edt-ft5x06 - FT6336G Touch Panel Oliver Graute
@ 2020-03-02 15:00 ` Andy Shevchenko
  2020-03-02 17:15   ` Oliver Graute
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2020-03-02 15:00 UTC (permalink / raw)
  To: Oliver Graute
  Cc: linux-input, dmitry.torokhov, rydberg, m.felsch, robh,
	mylene.josserand, p.zabel

On Mon, Mar 02, 2020 at 03:30:35PM +0100, Oliver Graute wrote:
> Hello,
> 
> I have on of these FT6336G Touch Panels here and I try to get it work
> with the ft6236 driver. It comes up with model identification "0x11". So
> I added that identification to the switch case in
> edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> corrupted stack. No clue why. Some ideas?

>  		 * the identification registers.
> +		case 0x11:   /* EDT EP0110M09 */

I have a question, how do you know it's M09 flavour?

> [    2.232596] i2c i2c-0: LPI2C adapter registered
> [    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
> [    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator

> [    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors

...because clearly here something wrong with Revision field.

> [    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> [    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
> [    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
> [    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
> [    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
> [    2.307544] Workqueue: events deferred_probe_work_func
> [    2.312686] Call trace:
> [    2.315141]  dump_backtrace+0x0/0x1c0
> [    2.318802]  show_stack+0x14/0x20
> [    2.322124]  dump_stack+0xb4/0xfc
> [    2.325440]  panic+0x158/0x320
> [    2.328494]  print_tainted+0x0/0xa8
> [    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-02 15:00 ` Andy Shevchenko
@ 2020-03-02 17:15   ` Oliver Graute
  2020-03-02 18:43     ` Marco Felsch
  0 siblings, 1 reply; 12+ messages in thread
From: Oliver Graute @ 2020-03-02 17:15 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-input, dmitry.torokhov, rydberg, m.felsch, robh,
	mylene.josserand, p.zabel

On 02/03/20, Andy Shevchenko wrote:
> On Mon, Mar 02, 2020 at 03:30:35PM +0100, Oliver Graute wrote:
> > Hello,
> > 
> > I have on of these FT6336G Touch Panels here and I try to get it work
> > with the ft6236 driver. It comes up with model identification "0x11". So
> > I added that identification to the switch case in
> > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > corrupted stack. No clue why. Some ideas?
> 
> >  		 * the identification registers.
> > +		case 0x11:   /* EDT EP0110M09 */
> 
> I have a question, how do you know it's M09 flavour?

This was an assumption after reading this thread on removing the old ft6236
driver and looking what the old driver did. There they talk about M09. 

https://patchwork.kernel.org/patch/9264845/

How can I be sure that that is right?

> 
> > [    2.232596] i2c i2c-0: LPI2C adapter registered
> > [    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
> > [    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator
> 
> > [    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> 
> ...because clearly here something wrong with Revision field.

yes, this is suspicious.
 
> 
> > [    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > [    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
> > [    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
> > [    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
> > [    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
> > [    2.307544] Workqueue: events deferred_probe_work_func
> > [    2.312686] Call trace:
> > [    2.315141]  dump_backtrace+0x0/0x1c0
> > [    2.318802]  show_stack+0x14/0x20
> > [    2.322124]  dump_stack+0xb4/0xfc
> > [    2.325440]  panic+0x158/0x320
> > [    2.328494]  print_tainted+0x0/0xa8
> > [    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88

The crash is gone after applying Marcos patch from here:

https://www.spinics.net/lists/linux-input/msg65908.html

Now the driver is loaded, but can't read data with evtest.

Best regards,

Oliver

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-02 17:15   ` Oliver Graute
@ 2020-03-02 18:43     ` Marco Felsch
  2020-03-03 19:37       ` Oliver Graute
  0 siblings, 1 reply; 12+ messages in thread
From: Marco Felsch @ 2020-03-02 18:43 UTC (permalink / raw)
  To: Oliver Graute
  Cc: Andy Shevchenko, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On 20-03-02 18:15, Oliver Graute wrote:
> On 02/03/20, Andy Shevchenko wrote:
> > On Mon, Mar 02, 2020 at 03:30:35PM +0100, Oliver Graute wrote:
> > > Hello,
> > > 
> > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > I added that identification to the switch case in
> > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > corrupted stack. No clue why. Some ideas?
> > 
> > >  		 * the identification registers.
> > > +		case 0x11:   /* EDT EP0110M09 */
> > 
> > I have a question, how do you know it's M09 flavour?
> 
> This was an assumption after reading this thread on removing the old ft6236
> driver and looking what the old driver did. There they talk about M09. 
> 
> https://patchwork.kernel.org/patch/9264845/
> 
> How can I be sure that that is right?
> 
> > 
> > > [    2.232596] i2c i2c-0: LPI2C adapter registered
> > > [    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
> > > [    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator
> > 
> > > [    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > 
> > ...because clearly here something wrong with Revision field.
> 
> yes, this is suspicious.
>  
> > 
> > > [    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > > [    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
> > > [    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
> > > [    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
> > > [    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
> > > [    2.307544] Workqueue: events deferred_probe_work_func
> > > [    2.312686] Call trace:
> > > [    2.315141]  dump_backtrace+0x0/0x1c0
> > > [    2.318802]  show_stack+0x14/0x20
> > > [    2.322124]  dump_stack+0xb4/0xfc
> > > [    2.325440]  panic+0x158/0x320
> > > [    2.328494]  print_tainted+0x0/0xa8
> > > [    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88
> 
> The crash is gone after applying Marcos patch from here:
> 
> https://www.spinics.net/lists/linux-input/msg65908.html

That shouldn't fix the problem..

> Now the driver is loaded, but can't read data with evtest.

Did you enable the CONFIG_INPUT_EVDEV option?

Regards,
  Marco

> Best regards,
> 
> Oliver
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-02 18:43     ` Marco Felsch
@ 2020-03-03 19:37       ` Oliver Graute
  2020-03-04  7:10         ` Marco Felsch
  0 siblings, 1 reply; 12+ messages in thread
From: Oliver Graute @ 2020-03-03 19:37 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Andy Shevchenko, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On 02/03/20, Marco Felsch wrote:
> On 20-03-02 18:15, Oliver Graute wrote:
> > On 02/03/20, Andy Shevchenko wrote:
> > > On Mon, Mar 02, 2020 at 03:30:35PM +0100, Oliver Graute wrote:
> > > > Hello,
> > > > 
> > > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > > I added that identification to the switch case in
> > > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > > corrupted stack. No clue why. Some ideas?
> > > 
> > > >  		 * the identification registers.
> > > > +		case 0x11:   /* EDT EP0110M09 */
> > > 
> > > I have a question, how do you know it's M09 flavour?
> > 
> > This was an assumption after reading this thread on removing the old ft6236
> > driver and looking what the old driver did. There they talk about M09. 
> > 
> > https://patchwork.kernel.org/patch/9264845/
> > 
> > How can I be sure that that is right?
> > 
> > > 
> > > > [    2.232596] i2c i2c-0: LPI2C adapter registered
> > > > [    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
> > > > [    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator
> > > 
> > > > [    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > > 
> > > ...because clearly here something wrong with Revision field.
> > 
> > yes, this is suspicious.
> >  
> > > 
> > > > [    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > > > [    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
> > > > [    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
> > > > [    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
> > > > [    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
> > > > [    2.307544] Workqueue: events deferred_probe_work_func
> > > > [    2.312686] Call trace:
> > > > [    2.315141]  dump_backtrace+0x0/0x1c0
> > > > [    2.318802]  show_stack+0x14/0x20
> > > > [    2.322124]  dump_stack+0xb4/0xfc
> > > > [    2.325440]  panic+0x158/0x320
> > > > [    2.328494]  print_tainted+0x0/0xa8
> > > > [    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88
> > 
> > The crash is gone after applying Marcos patch from here:
> > 
> > https://www.spinics.net/lists/linux-input/msg65908.html
> 
> That shouldn't fix the problem..
> 
> > Now the driver is loaded, but can't read data with evtest.
> 
> Did you enable the CONFIG_INPUT_EVDEV option?

yes, it was already enabled. But now its working for me. I see events
coming through during touching. My mistake was a wrong configured
interrupt line. But I still have this suspicious revision field and I
observe sometimes a different value there.

Best Regards,

Oliver

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-03 19:37       ` Oliver Graute
@ 2020-03-04  7:10         ` Marco Felsch
  2020-03-05 16:36           ` Oliver Graute
  0 siblings, 1 reply; 12+ messages in thread
From: Marco Felsch @ 2020-03-04  7:10 UTC (permalink / raw)
  To: Oliver Graute
  Cc: Andy Shevchenko, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On 20-03-03 20:37, Oliver Graute wrote:
> On 02/03/20, Marco Felsch wrote:
> > On 20-03-02 18:15, Oliver Graute wrote:
> > > On 02/03/20, Andy Shevchenko wrote:
> > > > On Mon, Mar 02, 2020 at 03:30:35PM +0100, Oliver Graute wrote:
> > > > > Hello,
> > > > > 
> > > > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > > > I added that identification to the switch case in
> > > > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > > > corrupted stack. No clue why. Some ideas?
> > > > 
> > > > >  		 * the identification registers.
> > > > > +		case 0x11:   /* EDT EP0110M09 */
> > > > 
> > > > I have a question, how do you know it's M09 flavour?
> > > 
> > > This was an assumption after reading this thread on removing the old ft6236
> > > driver and looking what the old driver did. There they talk about M09. 
> > > 
> > > https://patchwork.kernel.org/patch/9264845/
> > > 
> > > How can I be sure that that is right?
> > > 
> > > > 
> > > > > [    2.232596] i2c i2c-0: LPI2C adapter registered
> > > > > [    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
> > > > > [    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator
> > > > 
> > > > > [    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > > > 
> > > > ...because clearly here something wrong with Revision field.
> > > 
> > > yes, this is suspicious.
> > >  
> > > > 
> > > > > [    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > > > > [    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
> > > > > [    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
> > > > > [    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
> > > > > [    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
> > > > > [    2.307544] Workqueue: events deferred_probe_work_func
> > > > > [    2.312686] Call trace:
> > > > > [    2.315141]  dump_backtrace+0x0/0x1c0
> > > > > [    2.318802]  show_stack+0x14/0x20
> > > > > [    2.322124]  dump_stack+0xb4/0xfc
> > > > > [    2.325440]  panic+0x158/0x320
> > > > > [    2.328494]  print_tainted+0x0/0xa8
> > > > > [    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88
> > > 
> > > The crash is gone after applying Marcos patch from here:
> > > 
> > > https://www.spinics.net/lists/linux-input/msg65908.html
> > 
> > That shouldn't fix the problem..
> > 
> > > Now the driver is loaded, but can't read data with evtest.
> > 
> > Did you enable the CONFIG_INPUT_EVDEV option?
> 
> yes, it was already enabled. But now its working for me. I see events
> coming through during touching. My mistake was a wrong configured
> interrupt line. But I still have this suspicious revision field and I
> observe sometimes a different value there.

Did you saw those suspicious behaviour with the GENERIC_FT too?
Shouldn't make a real difference because the GENERIC_FT acts most the
time like the EDT_M09.

The problem is that display suppliers can flash their own firmware on
the touchcontroller and most the time we don't know the firmware
behaviour. Can you give us some more information about the used display?

Regards,
  Marco

> Best Regards,
> 
> Oliver
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-04  7:10         ` Marco Felsch
@ 2020-03-05 16:36           ` Oliver Graute
  2020-03-16 14:57             ` Oliver Graute
  0 siblings, 1 reply; 12+ messages in thread
From: Oliver Graute @ 2020-03-05 16:36 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Andy Shevchenko, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On 04/03/20, Marco Felsch wrote:
> On 20-03-03 20:37, Oliver Graute wrote:
> > On 02/03/20, Marco Felsch wrote:
> > > On 20-03-02 18:15, Oliver Graute wrote:
> > > > On 02/03/20, Andy Shevchenko wrote:
> > > > > On Mon, Mar 02, 2020 at 03:30:35PM +0100, Oliver Graute wrote:
> > > > > > Hello,
> > > > > > 
> > > > > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > > > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > > > > I added that identification to the switch case in
> > > > > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > > > > corrupted stack. No clue why. Some ideas?
> > > > > 
> > > > > >  		 * the identification registers.
> > > > > > +		case 0x11:   /* EDT EP0110M09 */
> > > > > 
> > > > > I have a question, how do you know it's M09 flavour?
> > > > 
> > > > This was an assumption after reading this thread on removing the old ft6236
> > > > driver and looking what the old driver did. There they talk about M09. 
> > > > 
> > > > https://patchwork.kernel.org/patch/9264845/
> > > > 
> > > > How can I be sure that that is right?
> > > > 
> > > > > 
> > > > > > [    2.232596] i2c i2c-0: LPI2C adapter registered
> > > > > > [    2.238931] edt_ft5x06 1-0038: probing for EDT FT5x06 I2C
> > > > > > [    2.244369] edt_ft5x06 1-0038: 1-0038 supply vcc not found, using dummy regulator
> > > > > 
> > > > > > [    2.257639] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > > > > 
> > > > > ...because clearly here something wrong with Revision field.
> > > > 
> > > > yes, this is suspicious.
> > > >  
> > > > > 
> > > > > > [    2.264536] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > > > > > [    2.273920] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 35, WAKE pin -1, Reset pin -1.
> > > > > > [    2.282124] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x9d4/0xa88
> > > > > > [    2.292830] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.6.0-rc1-next-20200214-00051-g9874f196742d #69
> > > > > > [    2.302224] Hardware name: Advantech iMX8QM DMSSE20 (DT)
> > > > > > [    2.307544] Workqueue: events deferred_probe_work_func
> > > > > > [    2.312686] Call trace:
> > > > > > [    2.315141]  dump_backtrace+0x0/0x1c0
> > > > > > [    2.318802]  show_stack+0x14/0x20
> > > > > > [    2.322124]  dump_stack+0xb4/0xfc
> > > > > > [    2.325440]  panic+0x158/0x320
> > > > > > [    2.328494]  print_tainted+0x0/0xa8
> > > > > > [    2.331978]  edt_ft5x06_ts_probe+0x9d4/0xa88
> > > > 
> > > > The crash is gone after applying Marcos patch from here:
> > > > 
> > > > https://www.spinics.net/lists/linux-input/msg65908.html
> > > 
> > > That shouldn't fix the problem..
> > > 
> > > > Now the driver is loaded, but can't read data with evtest.
> > > 
> > > Did you enable the CONFIG_INPUT_EVDEV option?
> > 
> > yes, it was already enabled. But now its working for me. I see events
> > coming through during touching. My mistake was a wrong configured
> > interrupt line. But I still have this suspicious revision field and I
> > observe sometimes a different value there.
> 
> Did you saw those suspicious behaviour with the GENERIC_FT too?
> Shouldn't make a real difference because the GENERIC_FT acts most the
> time like the EDT_M09.
> 
> The problem is that display suppliers can flash their own firmware on
> the touchcontroller and most the time we don't know the firmware
> behaviour. Can you give us some more information about the used display?

I try to get more information about FT6336G Touch Panel from vendor. I
have a datasheet here and a excel sheet (both under NDA) with some
default register settings. Nothing mention the M06/M09/M12 flavour.
Currently I run it with M09, sometimes I still observe random crashes
after probe. But most of the time it seems to work now.

Best Regards,

Oliver

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-05 16:36           ` Oliver Graute
@ 2020-03-16 14:57             ` Oliver Graute
  2020-03-16 16:30               ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Oliver Graute @ 2020-03-16 14:57 UTC (permalink / raw)
  To: linux-input
  Cc: dmitry.torokhov, rydberg, andriy.shevchenko, m.felsch, robh,
	mylene.josserand, p.zabel

On 02/03/20, Oliver Graute wrote:
> Hello,
> 
> I have on of these FT6336G Touch Panels here and I try to get it work
> with the ft6236 driver. It comes up with model identification "0x11". So
> I added that identification to the switch case in
> edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> corrupted stack. No clue why. Some ideas?

I still observe sometimes crashes with ft6236G. When it occurs it is
always a stack corruption in the probe function on bootup.

No clue why stack is corrupted sometimes. Is this related to the buggy
revision field?

Some further suggestions for debugging this?

[    3.806780] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
[    3.808468] at24 2-0050: 2-0050 supply vcc not found, using dummy regulator
[    3.814864] DEBUG: edt_ft5x06_ts_probe 1201
[    3.826215] DEBUG: edt_ft5x06_ts_probe 1211
[    3.830512] DEBUG: edt_ft5x06_ts_probe 1214
[    3.834904] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
[    3.844164] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
[    3.844264] DEBUG: edt_ft5x06_ts_probe 1222
[    3.850919] i2c i2c-2: LPI2C adapter registered
[    3.855187] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 55, WAKE pin -1, Reset pin -1.
[    3.867878] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x5c4/0xb00
[    3.878579] CPU: 4 PID: 115 Comm: kworker/u10:2 Not tainted 5.6.0-rc1-next-20200214-00057-g9e78f1560095-dirty #99
[    3.888838] Hardware name: Advantech iMX8QM DMSSE20 (DT)
[    3.894153] Workqueue: events_unbound async_run_entry_fn
[    3.899465] Call trace:
[    3.901909]  dump_backtrace+0x0/0x1c0
[    3.905571]  show_stack+0x14/0x20
[    3.908884]  dump_stack+0xb4/0xfc
[    3.912202]  panic+0x158/0x320
[    3.914929] mmc0: SDHCI controller on 5b010000.mmc [5b010000.mmc] using ADMA
[    3.915254]  print_tainted+0x0/0xa8
[    3.915262]  edt_ft5x06_ts_probe+0x5c4/0xb00
[    3.930063]  i2c_device_probe+0x2d0/0x2f8
[    3.934074]  really_probe+0xd8/0x438
[    3.935270] sdhci-esdhc-imx 5b030000.mmc: Got CD GPIO
[    3.937642]  driver_probe_device+0xdc/0x130
[    3.937648]  __device_attach_driver+0x88/0x108
[    3.942717] sdhci-esdhc-imx 5b030000.mmc: Got WP GPIO
[    3.946872]  bus_for_each_drv+0x74/0xc0
[    3.946875]  __device_attach_async_helper+0xb4/0x100
[    3.946877]  async_run_entry_fn+0x40/0x1a0
[    3.946883]  process_one_work+0x19c/0x320
[    3.973252]  worker_thread+0x48/0x420
[    3.976913]  kthread+0xf0/0x120
[    3.980051]  ret_from_fork+0x10/0x18
[    3.983634] SMP: stopping secondary CPUs
[    3.987558] Kernel Offset: disabled
[    3.991048] CPU features: 0x10002,2100600c
[    3.995148] Memory Limit: none
[    3.998201] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x5c4/0xb00 ]---

Best Regards,

Oliver

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-16 14:57             ` Oliver Graute
@ 2020-03-16 16:30               ` Andy Shevchenko
  2020-03-16 20:01                 ` Marco Felsch
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2020-03-16 16:30 UTC (permalink / raw)
  To: Oliver Graute
  Cc: linux-input, dmitry.torokhov, rydberg, m.felsch, robh,
	mylene.josserand, p.zabel

On Mon, Mar 16, 2020 at 03:57:36PM +0100, Oliver Graute wrote:
> On 02/03/20, Oliver Graute wrote:
> > Hello,
> > 
> > I have on of these FT6336G Touch Panels here and I try to get it work
> > with the ft6236 driver. It comes up with model identification "0x11". So
> > I added that identification to the switch case in
> > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > corrupted stack. No clue why. Some ideas?
> 
> I still observe sometimes crashes with ft6236G. When it occurs it is
> always a stack corruption in the probe function on bootup.
> 
> No clue why stack is corrupted sometimes. Is this related to the buggy
> revision field?
> 
> Some further suggestions for debugging this?

Are you sure you have proper I²C bus settings on electrical level
(pull-up strength, line capacitance, etc.)?

> [    3.806780] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> [    3.808468] at24 2-0050: 2-0050 supply vcc not found, using dummy regulator
> [    3.814864] DEBUG: edt_ft5x06_ts_probe 1201
> [    3.826215] DEBUG: edt_ft5x06_ts_probe 1211
> [    3.830512] DEBUG: edt_ft5x06_ts_probe 1214
> [    3.834904] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> [    3.844164] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
> [    3.844264] DEBUG: edt_ft5x06_ts_probe 1222
> [    3.850919] i2c i2c-2: LPI2C adapter registered
> [    3.855187] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 55, WAKE pin -1, Reset pin -1.

> [    3.867878] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x5c4/0xb00

Maybe you can look at the assembly to see how compiler puts variables on stack. Also enabling KASAN might help.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-16 16:30               ` Andy Shevchenko
@ 2020-03-16 20:01                 ` Marco Felsch
  2020-03-17 16:57                   ` Oliver Graute
  0 siblings, 1 reply; 12+ messages in thread
From: Marco Felsch @ 2020-03-16 20:01 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Oliver Graute, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On 20-03-16 18:30, Andy Shevchenko wrote:
> On Mon, Mar 16, 2020 at 03:57:36PM +0100, Oliver Graute wrote:
> > On 02/03/20, Oliver Graute wrote:
> > > Hello,
> > > 
> > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > I added that identification to the switch case in
> > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > corrupted stack. No clue why. Some ideas?
> > 
> > I still observe sometimes crashes with ft6236G. When it occurs it is
> > always a stack corruption in the probe function on bootup.
> > 
> > No clue why stack is corrupted sometimes. Is this related to the buggy
> > revision field?
> > 
> > Some further suggestions for debugging this?
> 
> Are you sure you have proper I²C bus settings on electrical level
> (pull-up strength, line capacitance, etc.)?
> 
> > [    3.806780] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > [    3.808468] at24 2-0050: 2-0050 supply vcc not found, using dummy regulator
> > [    3.814864] DEBUG: edt_ft5x06_ts_probe 1201
> > [    3.826215] DEBUG: edt_ft5x06_ts_probe 1211
> > [    3.830512] DEBUG: edt_ft5x06_ts_probe 1214
> > [    3.834904] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > [    3.844164] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
> > [    3.844264] DEBUG: edt_ft5x06_ts_probe 1222
> > [    3.850919] i2c i2c-2: LPI2C adapter registered
> > [    3.855187] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 55, WAKE pin -1, Reset pin -1.
> 
> > [    3.867878] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x5c4/0xb00
> 
> Maybe you can look at the assembly to see how compiler puts variables on stack. Also enabling KASAN might help.

This would be the easiest way to debug such failures and since ARMv8
support it you just need to enable it =)

Regards,
  Marco


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-16 20:01                 ` Marco Felsch
@ 2020-03-17 16:57                   ` Oliver Graute
  2020-03-17 17:40                     ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Oliver Graute @ 2020-03-17 16:57 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Andy Shevchenko, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On 16/03/20, Marco Felsch wrote:
> On 20-03-16 18:30, Andy Shevchenko wrote:
> > On Mon, Mar 16, 2020 at 03:57:36PM +0100, Oliver Graute wrote:
> > > On 02/03/20, Oliver Graute wrote:
> > > > Hello,
> > > > 
> > > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > > I added that identification to the switch case in
> > > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > > corrupted stack. No clue why. Some ideas?
> > > 
> > > I still observe sometimes crashes with ft6236G. When it occurs it is
> > > always a stack corruption in the probe function on bootup.
> > > 
> > > No clue why stack is corrupted sometimes. Is this related to the buggy
> > > revision field?
> > > 
> > > Some further suggestions for debugging this?
> > 
> > Are you sure you have proper I²C bus settings on electrical level
> > (pull-up strength, line capacitance, etc.)?
> > 
> > > [    3.806780] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > > [    3.808468] at24 2-0050: 2-0050 supply vcc not found, using dummy regulator
> > > [    3.814864] DEBUG: edt_ft5x06_ts_probe 1201
> > > [    3.826215] DEBUG: edt_ft5x06_ts_probe 1211
> > > [    3.830512] DEBUG: edt_ft5x06_ts_probe 1214
> > > [    3.834904] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > > [    3.844164] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
> > > [    3.844264] DEBUG: edt_ft5x06_ts_probe 1222
> > > [    3.850919] i2c i2c-2: LPI2C adapter registered
> > > [    3.855187] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 55, WAKE pin -1, Reset pin -1.
> > 
> > > [    3.867878] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x5c4/0xb00
> > 
> > Maybe you can look at the assembly to see how compiler puts variables on stack. Also enabling KASAN might help.
> 
> This would be the easiest way to debug such failures and since ARMv8
> support it you just need to enable it =)

ok, I enabled KASAN and I got the following trace:

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.6.0-rc1-next-20200214-00057-g9e78f1560095-dirty (alarm@imx8qm) (gcc version 9.2.0 (GCC)) #100 SMP PREEMPT Tue Mar 17 15:54:17 UTC 2020
[    0.000000] Machine model: Advantech iMX8QM DMSSE20
[    0.000000] earlycon: lpuart32 at MMIO 0x000000005a060000 (options '115200')
[    0.000000] printk: bootconsole [lpuart32] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 32 MiB at 0x00000000fe000000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000080200000-0x00000009ffffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x9fefe2100-0x9fefe3fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080200000-0x00000000bfffffff]
[    0.000000]   DMA32    [mem 0x00000000c0000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x00000009ffffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   node   0: [mem 0x0000000880000000-0x00000009ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000009ffffffff]
[    0.000000] On node 0 totalpages: 2096640
[    0.000000]   DMA zone: 4088 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 261632 pages, LIFO batch:63
[    0.000000]   DMA32 zone: 4096 pages used for memmap
[    0.000000]   DMA32 zone: 262144 pages, LIFO batch:63
[    0.000000]   Normal zone: 24576 pages used for memmap
[    0.000000]   Normal zone: 1572864 pages, LIFO batch:63
[    0.000000] kasan: KernelAddressSanitizer initialized
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] percpu: Embedded 30 pages/cpu s82584 r8192 d32104 u122880
[    0.000000] pcpu-alloc: s82584 r8192 d32104 u122880 alloc=30*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2063880
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200 root=/dev/nfs ip=dhcp nfsroot=10.200.134.119:/srv/nfs/rootfs_dmsse20/,v3,tcp rw debug
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0xbbfff000-0xbffff000] (64MB)
[    0.000000] Memory: 6990668K/8386560K available (19260K kernel code, 12216K rwdata, 13776K rodata, 17728K init, 13678K bss, 1363124K reserved, 32768K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=5, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=5.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=5
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 512 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: no VLPI support, no direct LPI support, no RVPEID support
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000051b00000
[    0.000000] ITS: No ITS available, not enabling LPIs
[    0.000000] random: get_random_bytes called from start_kernel+0x58c/0x770 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 8.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns
[    0.000010] sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
[    0.012032] Console: colour dummy device 80x25
[    0.016927] Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=32000)
[    0.026877] pid_max: default: 32768 minimum: 301
[    0.033756] LSM: Security Framework initializing
[    0.039202] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.046512] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.090850] ASID allocator initialised with 65536 entries
[    0.103996] rcu: Hierarchical SRCU implementation.
[    0.151788] EFI services will not be available.
[    0.164111] smp: Bringing up secondary CPUs ...
[    0.201364] Detected VIPT I-cache on CPU1
[    0.201436] GICv3: CPU1: found redistributor 1 region 0:0x0000000051b20000
[    0.201499] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.233434] Detected VIPT I-cache on CPU2
[    0.233483] GICv3: CPU2: found redistributor 2 region 0:0x0000000051b40000
[    0.233519] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.265563] Detected VIPT I-cache on CPU3
[    0.265610] GICv3: CPU3: found redistributor 3 region 0:0x0000000051b60000
[    0.265646] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.300493] CPU features: detected: EL2 vector hardening
[    0.300518] CPU features: detected: ARM erratum 1319367
[    0.300523] Detected PIPT I-cache on CPU4
[    0.300552] GICv3: CPU4: found redistributor 100 region 0:0x0000000051b80000
[    0.300579] CPU4: Booted secondary processor 0x0000000100 [0x410fd082]
[    0.300713] smp: Brought up 1 node, 5 CPUs
[    0.384707] SMP: Total of 5 processors activated.
[    0.389390] CPU features: detected: 32-bit EL0 Support
[    0.394536] CPU features: detected: CRC32 instructions
[    0.417980] CPU: All CPU(s) started at EL2
[    0.421810] alternatives: patching kernel code
[    0.437004] devtmpfs: initialized
[    0.566168] Unable to handle kernel paging request at virtual address dfffa00000000000
[    0.573965] Mem abort info:
[    0.576534]   ESR = 0x96000044
[    0.579597]   EC = 0x25: DABT (current EL), IL = 32 bits
[    0.584891]   SET = 0, FnV = 0
[    0.587916]   EA = 0, S1PTW = 0
[    0.591057] Data abort info:
[    0.593911]   ISV = 0, ISS = 0x00000044
[    0.597748]   CM = 0, WnR = 1
[    0.600689] [dfffa00000000000] address between user and kernel address ranges
[    0.607841] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[    0.613373] Modules linked in:
[    0.616425] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc1-next-20200214-00057-g9e78f1560095-dirty #100
[    0.626227] Hardware name: Advantech iMX8QM DMSSE20 (DT)
[    0.631532] pstate: 80000005 (Nzcv daif -PAN -UAO)
[    0.636327] pc : __memset+0x38/0x1ac
[    0.639880] lr : kasan_unpoison_shadow+0x34/0x50
[    0.644471] sp : ffff00093513fdc0
[    0.647771] x29: ffff00093513fdc0 x28: 0000000000000000 
[    0.653068] x27: 0000000000000000 x26: 0000000000000000 
[    0.658367] x25: 0000000000000000 x24: 000000000000000e 
[    0.663668] x23: ffffa00013ab4b30 x22: ffffa00013ab4970 
[    0.668967] x21: dfffa00000000000 x20: 0000000000000001 
[    0.674265] x19: 000000000000000e x18: 00000000ad856cb8 
[    0.679565] x17: 000000004a6c9290 x16: 00000000442eb574 
[    0.684864] x15: 0000000000007fff x14: ffffa000101ac700 
[    0.690164] x13: ffffa000101ac4b4 x12: ffff940002651145 
[    0.695464] x11: 1ffff40002651144 x10: ffff940002651144 
[    0.700762] x9 : 0000000000000000 x8 : dfffa00000000000 
[    0.706062] x7 : 0000000000000000 x6 : 000000000000003f 
[    0.711361] x5 : 0000000000000040 x4 : dfffa00000000000 
[    0.716661] x3 : ffffa00011976e20 x2 : 0000000000000001 
[    0.721960] x1 : 0000000000000000 x0 : dfffa00000000000 
[    0.727263] Call trace:
[    0.729704]  __memset+0x38/0x1ac
[    0.732917]  __asan_register_globals+0x44/0x88
[    0.737357]  _GLOBAL__sub_I_65535_1_drm_gem_init+0x1c/0x28
[    0.742832]  kernel_init_freeable+0x170/0x2e8
[    0.747166]  kernel_init+0x10/0x10c
[    0.750644]  ret_from_fork+0x10/0x18
[    0.754212] Code: b8004507 36080042 78002507 36000042 (39000107) 
[    0.760306] ---[ end trace 93cedcfba6557fc7 ]---
[    0.764918] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.772529] SMP: stopping secondary CPUs
[    0.776452] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---

Best Regards,

Oliver

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: RFC: Input: edt-ft5x06 - FT6336G Touch Panel
  2020-03-17 16:57                   ` Oliver Graute
@ 2020-03-17 17:40                     ` Andy Shevchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2020-03-17 17:40 UTC (permalink / raw)
  To: Oliver Graute
  Cc: Marco Felsch, linux-input, dmitry.torokhov, rydberg, robh,
	mylene.josserand, p.zabel

On Tue, Mar 17, 2020 at 05:57:05PM +0100, Oliver Graute wrote:
> On 16/03/20, Marco Felsch wrote:
> > On 20-03-16 18:30, Andy Shevchenko wrote:
> > > On Mon, Mar 16, 2020 at 03:57:36PM +0100, Oliver Graute wrote:
> > > > On 02/03/20, Oliver Graute wrote:
> > > > > Hello,
> > > > > 
> > > > > I have on of these FT6336G Touch Panels here and I try to get it work
> > > > > with the ft6236 driver. It comes up with model identification "0x11". So
> > > > > I added that identification to the switch case in
> > > > > edt_ft5x06_ts_identify(). But it crashes directly after the probe with a
> > > > > corrupted stack. No clue why. Some ideas?
> > > > 
> > > > I still observe sometimes crashes with ft6236G. When it occurs it is
> > > > always a stack corruption in the probe function on bootup.
> > > > 
> > > > No clue why stack is corrupted sometimes. Is this related to the buggy
> > > > revision field?
> > > > 
> > > > Some further suggestions for debugging this?
> > > 
> > > Are you sure you have proper I²C bus settings on electrical level
> > > (pull-up strength, line capacitance, etc.)?
> > > 
> > > > [    3.806780] edt_ft5x06 1-0038: Model "EP0110M09", Rev. "�", 0x0 sensors
> > > > [    3.808468] at24 2-0050: 2-0050 supply vcc not found, using dummy regulator
> > > > [    3.814864] DEBUG: edt_ft5x06_ts_probe 1201
> > > > [    3.826215] DEBUG: edt_ft5x06_ts_probe 1211
> > > > [    3.830512] DEBUG: edt_ft5x06_ts_probe 1214
> > > > [    3.834904] input: EP0110M09 as /devices/platform/bus@5a000000/5a820000.i2c/i2c-1/1-0038/input/input0
> > > > [    3.844164] at24 2-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
> > > > [    3.844264] DEBUG: edt_ft5x06_ts_probe 1222
> > > > [    3.850919] i2c i2c-2: LPI2C adapter registered
> > > > [    3.855187] edt_ft5x06 1-0038: EDT FT5x06 initialized: IRQ 55, WAKE pin -1, Reset pin -1.
> > > 
> > > > [    3.867878] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: edt_ft5x06_ts_probe+0x5c4/0xb00
> > > 
> > > Maybe you can look at the assembly to see how compiler puts variables on stack. Also enabling KASAN might help.
> > 
> > This would be the easiest way to debug such failures and since ARMv8
> > support it you just need to enable it =)
> 
> ok, I enabled KASAN and I got the following trace:

Nice. I think it has nothing to do with touch screen.

By the way...

> [    0.000000] Linux version 5.6.0-rc1-next-20200214-00057-g9e78f1560095-dirty (alarm@imx8qm) (gcc version 9.2.0 (GCC)) #100 SMP PREEMPT Tue Mar 17 15:54:17 UTC 2020

May you try the latest and greatest release candidate, i.e. v5.6-rc6 w/o any patches applied?
Then, enable only touchscreen and try again.

Otherwise it's probably good to inform ARM + kasan maintainers about the issue.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-03-17 17:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 14:30 RFC: Input: edt-ft5x06 - FT6336G Touch Panel Oliver Graute
2020-03-02 15:00 ` Andy Shevchenko
2020-03-02 17:15   ` Oliver Graute
2020-03-02 18:43     ` Marco Felsch
2020-03-03 19:37       ` Oliver Graute
2020-03-04  7:10         ` Marco Felsch
2020-03-05 16:36           ` Oliver Graute
2020-03-16 14:57             ` Oliver Graute
2020-03-16 16:30               ` Andy Shevchenko
2020-03-16 20:01                 ` Marco Felsch
2020-03-17 16:57                   ` Oliver Graute
2020-03-17 17:40                     ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.