2023-06-20 06:40 AM
Hello all.
In my stm32mp1 linux yocto machine I'm attempting to modify the touchscreen devicetree to manage the GOODIX GT911 touchscreen driver.
Before modify the devicetree is the following
+&i2c2 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&i2c2_pins_a>;
+ pinctrl-1 = <&i2c2_pins_sleep_a>;
+ i2c-scl-rising-time-ns = <185>;
+ i2c-scl-falling-time-ns = <20>;
+ status = "okay";
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ polytouch: edt-ft5x06@38 {
+ compatible = "edt,edt-ft5x06";
+ reg = <0x38>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_edt_ft5x06>;
+ interrupt-parent = <&gpiob>;
+ interrupts = <3 0>;
+ touchscreen-size-x = <1024>;
+ touchscreen-size-y = <600>;
+ //touchscreen-swapped-x-y;
+ status = "okay";
+ };
+
+&pinctrl {
+ pinctrl_edt_ft5x06: pinctrl_edt_ft5x06-0 {
+ pins {
+ pinmux = <STM32_PINMUX('B', 3, GPIO)>;
+ };
+ };
After modify the devicetree is the following
+&i2c2 {
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&i2c2_pins_a>;
+ pinctrl-1 = <&i2c2_pins_sleep_a>;
+ i2c-scl-rising-time-ns = <185>;
+ i2c-scl-falling-time-ns = <20>;
+ status = "okay";
+ /delete-property/dmas;
+ /delete-property/dma-names;
+
+ polytouch: gt911@5d {
+ compatible = "goodix,gt911";
+ reg = <0x5d>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_goodix_gt911>;
+ interrupt-parent = <&gpiob>;
+ interrupts = <3 0>;
+ touchscreen-size-x = <1024>;
+ touchscreen-size-y = <600>;
+ //touchscreen-swapped-x-y;
+ status = "okay";
+ };
+&pinctrl {
+ pinctrl_goodix_gt911: pinctrl_goodix_gt911-0 {
+ pins {
+ pinmux = <STM32_PINMUX('B', 3, GPIO)>;
+ };
+ };
The build process finishes without errors but during the boot sequence, the "Kernel panic " message appears and the process stops. Below the consolle log starting from i2c driver loading
[ 2.515121] i2c /dev entries driver
[ 2.536805] stm32f7-i2c 40012000.i2c: can't use DMA
[ 2.541775] stm32f7-i2c 40012000.i2c: STM32F7 I2C-0 bus adapter
[ 2.563780] stm32f7-i2c 40013000.i2c: can't use DMA
[ 2.621395] Goodix-TS 1-005d: ID 911, version: 1060
[ 2.641770] input: Goodix Capacitive TouchScreen as /devices/platform/soc/40013000.i2c/i2c-1/1-005d/input/input0
[ 2.650861] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 2.658434] pgd = (ptrval)
[ 2.661185] [00000000] *pgd=00000000
[ 2.664652] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[ 2.669905] Modules linked in:
[ 2.672929] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.94 #1
[ 2.678871] Hardware name: STM32 (Device Tree Support)
[ 2.683976] PC is at desc_to_gpio+0x0/0x18
[ 2.688024] LR is at goodix_request_irq+0x14/0x68
[ 2.692672] pc : [<c0716c18>] lr : [<c0c2c3d8>] psr: 60000013
[ 2.698880] sp : db0b5b18 ip : db0c0000 fp : c1964574
[ 2.704055] r10: c144b888 r9 : da04e420 r8 : c1804c48
[ 2.709231] r7 : 00000001 r6 : 00000001 r5 : 00000000 r4 : db4a1dc0
[ 2.715699] r3 : 00002002 r2 : 00000001 r1 : 00000001 r0 : 00000000
[ 2.722171] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 2.729239] Control: 10c5387d Table: c020406a DAC: 00000051
[ 2.734931] Process swapper/0 (pid: 1, stack limit = 0x(ptrval))
[ 2.740882] Stack: (0xdb0b5b18 to 0xdb0b6000)
[ 2.745196] 5b00: db4a1dc0 00000000
[ 2.753306] 5b20: 00000001 00000001 c1804c48 db4a1dc0 00000000 c0c2c81c 00000000 00000000
[ 2.761414] 5b40: db4a1dc0 00000000 da04e400 c0c2cd94 00000000 00000000 00000000 00000000
[ 2.769521] 5b60: 31313939 31390000 10600031 eff0ae88 da04e420 c0c2c9a4 c1963260 da04e400
[ 2.777628] 5b80: 00000000 c1963260 00000000 c0c419ec c19fd2cc da04e420 c19fd2d0 00000000
[ 2.785734] 5ba0: 00000000 c09888a8 da04e420 c1963260 db0b5c24 c0988cc0 00000001 c19fd2a8
[ 2.793841] 5bc0: 00000000 c0988ac8 da04e400 c1963260 da04e420 00000000 c1804c48 db0b5c24
[ 2.801948] 5be0: c0988cc0 00000001 c19fd2a8 00000000 c1964574 c0986c40 c1964574 db20ef6c
[ 2.810055] 5c00: da0259b8 eff0ae88 da04e420 da04e420 c1804c48 da04e454 da01d480 c098863c
[ 2.818161] 5c20: da03ea80 da04e420 00000001 eff0ae88 da04e428 da04e420 c19645a4 da01d480
[ 2.826268] 5c40: da04e420 c0987a50 da04e428 c1804c48 00000000 c0984920 da01d440 00000000
[ 2.834374] 5c60: da04e404 c0994b34 00000000 eff0ae88 da04e420 da04e400 db0b5cc4 da01d440
[ 2.842480] 5c80: 00000000 da04e404 da04e420 c1804c48 da01d440 c0c3ffd4 00000000 c0f26f30
[ 2.850585] 5ca0: 0000005d c1804c48 da01d440 da01d480 dbba2c6c c144e274 da01d480 c0c44794
[ 2.858691] 5cc0: dbba2c98 31397467 00000031 00000000 00000000 00000000 005d0000 00000000
[ 2.866796] 5ce0: 00000000 dbba2c6c 00000000 00000000 00000000 00000000 00000000 eff0ae88
[ 2.874902] 5d00: dbba2c6c dbba2c6c dbba2cbc da01d440 dbba28a0 c0c44ac8 da01d440 00000000
[ 2.883008] 5d20: da01d480 00000000 db0b5dc4 db0b5dc4 c1804c48 c0c40e6c c1203c44 da01d440
[ 2.891115] 5d40: da01d440 00000000 00000000 00000200 db1f3600 db0b5dc4 db0b5dc4 c0c592c0
[ 2.899221] 5d60: 00000000 db2193c0 da01d440 c0f26f84 00000152 db213c80 db1f3610 da03e540
[ 2.907329] 5d80: 000030d4 00002710 00002710 c148734c 006000c0 00000052 40013000 c1965b1c
[ 2.915436] 5da0: da03e540 3b9aca00 51eb851f c1804c48 db1f3600 c1450388 000000b9 00000014
[ 2.923543] 5dc0: 00000000 db0b5dc4 db0b5dc4 eff0ae88 00000001 c1804c48 c1965b30 c0d06484
[ 2.931649] 5de0: 00000000 c04f852c c13c1748 00000000 dbba28a0 c40028e8 c40028e8 c40028e8
[ 2.939755] 5e00: 00000000 eff0ae88 00000000 db1f3610 00000000 c1965b30 00000000 00000000
[ 2.947861] 5e20: c1965b30 00000000 c16cf854 c098a7d0 c19fd2cc db1f3610 c19fd2d0 00000000
[ 2.955968] 5e40: 00000000 c09888a8 db1f3610 c1965b30 db1f3644 c0988bd0 00000000 c16cf834
[ 2.964074] 5e60: c16004a8 c0988ac8 c16cf854 c0f26f30 c1207f80 db1f3610 c1965b30 db1f3644
[ 2.972180] 5e80: c0988bd0 00000000 c16cf834 c16004a8 c16cf854 c0988cbc db213d34 c1804c48
[ 2.980285] 5ea0: c1965b30 c0986b6c c1940c40 db09f458 db213d34 eff0ae88 db09f46c c1965b30
[ 2.988390] 5ec0: da039100 c1940c40 00000000 c0987d10 c14505e0 c1804c48 ffffe000 c1965b30
[ 2.996496] 5ee0: c1804c48 ffffe000 c16a109c c09898e4 c1987120 c1804c48 ffffe000 c0302e5c
[ 3.004602] 5f00: dbfffe36 c0366400 c14d97f8 c1447800 00000000 00000006 00000006 c133e000
[ 3.012709] 5f20: 00000000 c1804c48 c134f1a8 c133e074 c1993e80 dbfffe20 dbfffe28 eff0ae88
[ 3.020815] 5f40: c16cf838 c1987120 c1756788 eff0ae88 c1987120 c1757130 00000007 c1993e80
[ 3.028920] 5f60: c1993e80 c1601128 00000006 00000006 00000000 c16004a8 0000015e 00000000
[ 3.037026] 5f80: db0c8504 00000000 c0f1fe14 00000000 00000000 00000000 00000000 00000000
[ 3.045132] 5fa0: 00000000 c0f1fe1c 00000000 c03010e8 00000000 00000000 00000000 00000000
[ 3.053238] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.061344] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 3.069469] [<c0716c18>] (desc_to_gpio) from [<c0c2c3d8>] (goodix_request_irq+0x14/0x68)
[ 3.077479] [<c0c2c3d8>] (goodix_request_irq) from [<c0c2c81c>] (goodix_configure_dev+0x1dc/0x280)
[ 3.086359] [<c0c2c81c>] (goodix_configure_dev) from [<c0c2cd94>] (goodix_ts_probe+0x3f0/0x494)
[ 3.094984] [<c0c2cd94>] (goodix_ts_probe) from [<c0c419ec>] (i2c_device_probe+0x244/0x264)
[ 3.103266] [<c0c419ec>] (i2c_device_probe) from [<c09888a8>] (really_probe+0x1fc/0x2b8)
[ 3.111284] [<c09888a8>] (really_probe) from [<c0988ac8>] (driver_probe_device+0x60/0x168)
[ 3.119474] [<c0988ac8>] (driver_probe_device) from [<c0986c40>] (bus_for_each_drv+0x80/0xc4)
[ 3.127924] [<c0986c40>] (bus_for_each_drv) from [<c098863c>] (__device_attach+0xd0/0x138)
[ 3.136115] [<c098863c>] (__device_attach) from [<c0987a50>] (bus_probe_device+0x84/0x8c)
[ 3.144221] [<c0987a50>] (bus_probe_device) from [<c0984920>] (device_add+0x36c/0x608)
[ 3.152067] [<c0984920>] (device_add) from [<c0c3ffd4>] (i2c_new_device+0x144/0x2d0)
[ 3.159743] [<c0c3ffd4>] (i2c_new_device) from [<c0c44794>] (of_i2c_register_device+0x5c/0x84)
[ 3.168280] [<c0c44794>] (of_i2c_register_device) from [<c0c44ac8>] (of_i2c_register_devices+0x88/0xcc)
[ 3.177592] [<c0c44ac8>] (of_i2c_register_devices) from [<c0c40e6c>] (i2c_register_adapter+0x17c/0x440)
[ 3.186904] [<c0c40e6c>] (i2c_register_adapter) from [<c0c592c0>] (stm32f7_i2c_probe+0xa38/0xe50)
[ 3.195698] [<c0c592c0>] (stm32f7_i2c_probe) from [<c098a7d0>] (platform_drv_probe+0x48/0x98)
[ 3.204146] [<c098a7d0>] (platform_drv_probe) from [<c09888a8>] (really_probe+0x1fc/0x2b8)
[ 3.212338] [<c09888a8>] (really_probe) from [<c0988ac8>] (driver_probe_device+0x60/0x168)
[ 3.220530] [<c0988ac8>] (driver_probe_device) from [<c0988cbc>] (__driver_attach+0xec/0xf0)
[ 3.228894] [<c0988cbc>] (__driver_attach) from [<c0986b6c>] (bus_for_each_dev+0x74/0xb4)
[ 3.237000] [<c0986b6c>] (bus_for_each_dev) from [<c0987d10>] (bus_add_driver+0x1c0/0x204)
[ 3.245192] [<c0987d10>] (bus_add_driver) from [<c09898e4>] (driver_register+0x74/0x108)
[ 3.253215] [<c09898e4>] (driver_register) from [<c0302e5c>] (do_one_initcall+0x54/0x284)
[ 3.261321] [<c0302e5c>] (do_one_initcall) from [<c1601128>] (kernel_init_freeable+0x2d4/0x364)
[ 3.269940] [<c1601128>] (kernel_init_freeable) from [<c0f1fe1c>] (kernel_init+0x8/0x110)
[ 3.278044] [<c0f1fe1c>] (kernel_init) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[ 3.285539] Exception stack(0xdb0b5fb0 to 0xdb0b5ff8)
[ 3.290544] 5fa0: 00000000 00000000 00000000 00000000
[ 3.298652] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.306756] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 3.313313] Code: e30011bd e34c013a ebf0c198 eafffff8 (e5903000)
[ 3.319513] ---[ end trace 9525448ef805ecf3 ]---
[ 3.323969] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 3.323969]
[ 3.332980] CPU1: stopping
[ 3.335647] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.19.94 #1
[ 3.342968] Hardware name: STM32 (Device Tree Support)
[ 3.348082] [<c031269c>] (unwind_backtrace) from [<c030cd3c>] (show_stack+0x10/0x14)
[ 3.355742] [<c030cd3c>] (show_stack) from [<c0f0b7cc>] (dump_stack+0xb0/0xc4)
[ 3.362898] [<c0f0b7cc>] (dump_stack) from [<c0310b9c>] (handle_IPI+0x418/0x444)
[ 3.370230] [<c0310b9c>] (handle_IPI) from [<c06bbb30>] (gic_handle_irq+0x98/0x9c)
[ 3.377728] [<c06bbb30>] (gic_handle_irq) from [<c0301a0c>] (__irq_svc+0x6c/0xa8)
[ 3.385135] Exception stack(0xdb0eff60 to 0xdb0effa8)
[ 3.390143] ff60: 00000000 00000738 dbb8d54c c031e220 ffffe000 c1804c78 c1804cbc 00000002
[ 3.398247] ff80: c1804c48 00000000 c175f628 c13f0a70 00000000 db0effb0 c0309384 c0309388
[ 3.406348] ffa0: 60000013 ffffffff
[ 3.409808] [<c0301a0c>] (__irq_svc) from [<c0309388>] (arch_cpu_idle+0x38/0x3c)
[ 3.417140] [<c0309388>] (arch_cpu_idle) from [<c0375984>] (do_idle+0x1dc/0x288)
[ 3.424468] [<c0375984>] (do_idle) from [<c0375d08>] (cpu_startup_entry+0x18/0x1c)
[ 3.431966] [<c0375d08>] (cpu_startup_entry) from [<c03025ec>] (__enable_mmu+0x0/0x14)
[ 3.439817] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 3.439817] ]---
Why this happens? How to solve it?
Many thanks
Regards