Other Parts Discussed in Thread: TPD12S015, SYSCONFIG
Tool/software: Linux
I am trying to use the AM5728 keypad device. I am using kernel 4.4.41.
I have 4 rows and 4 columns muxed in the mux_data.h file of the boot loader:
{VIN2A_D3, (M9 | PIN_OUTPUT)}, /* vin2a_d3.kbd_col0 */
{VIN2A_D4, (M9 | PIN_OUTPUT)}, /* vin2a_d4.kbd_col1 */
{VIN2A_D5, (M9 | PIN_OUTPUT)}, /* vin2a_d5.kbd_col2 */
{VIN2A_D6, (M9 | PIN_OUTPUT)}, /* vin2a_d5.kbd_col3 */
{VIN1A_DE0, (M9 | PIN_INPUT_PULLUP)}, /* vin1a_de0.kbd_row0 */
{VIN1A_FLD0, (M9 | PIN_INPUT_PULLUP)}, /* vin1a_fld0.kbd_row1 */
{VIN1A_D8, (M9 | PIN_INPUT_PULLUP)}, /* vin1a_d8.kbd_row2 */
{VIN1A_D9, (M9 | PIN_INPUT_PULLUP)}, /* vin1a_d9.kbd_row3 */
I have configured the kernel with KEYBOARD_OMAP4.
I have added this entry to dra7.dtsi file, in ocp node (note the different versions of the interrupt specification, none work):
keypad: keypad@4ae1c000 {
compatible = "ti,omap4-keypad";
reg = <0x4ae1c000 0x80>;
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
// interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
// interrupts-extended = <&crossbar_mpu GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
// interrupts-extended = <&crossbar_mpu GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
keypad,num-rows = <4>;
keypad,num-columns = <4>;
linux,keymap = <
0x00000041 0x00010042 0x00020043 0x00030044
0x01000045 0x01010046 0x01020047 0x01030048
0x02000049 0x0201004a 0x0202004b 0x0203004c
0x0300004d 0x0301004e 0x0302004f 0x03030050
>;
};
Also, in our custom .dts file:
&keypad {
status = "okay";
};
When I boot the board with the above configuration, I get the following output in the log:
[ 10.319049] Unhandled fault: asynchronous external abort (0x1211) at 0x00000000
[ 10.319055] ------------[ cut here ]------------
[ 10.319067] WARNING: CPU: 0 PID: 248 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x368()
[ 10.319071] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_WKUP (Read): Data Access in User mode during Functional access
[ 10.319130] Modules linked in: pruss(+) omap4_keypad(+) omap_wdt phy_omap_usb2 phy_ti_pipe3 phy_omap_control ti_vpe ti_vip ti_sc ti_csc ti_vpdma v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 dwc3_omap videobuf2_core extcon rtc_omap pwm_tiehrpwm rtc_palmas flk_ti_mt9p031 aptina_pll spi_omap2_mcspi omap_remoteproc remoteproc virtio virtio_ring uio_pdrv_genirq uio cryptodev(O) fluke_mir_hp v4l2_common videodev media autofs4
[ 10.319135] CPU: 0 PID: 248 Comm: systemd-journal Tainted: G O 4.4.41 #9
[ 10.319137] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 10.319141] Backtrace:
[ 10.319151] [<c00130e4>] (dump_backtrace) from [<c00132e0>] (show_stack+0x18/0x1c)
[ 10.319160] r7:c02a2a78 r6:20000193 r5:00000000 r4:c06aca34
[ 10.319168] [<c00132c8>] (show_stack) from [<c027816c>] (dump_stack+0x8c/0xa0)
[ 10.319175] [<c02780e0>] (dump_stack) from [<c0032990>] (warn_slowpath_common+0x88/0xb8)
[ 10.319182] r7:c02a2a78 r6:00000093 r5:00000009 r4:ee21bb58
[ 10.319188] [<c0032908>] (warn_slowpath_common) from [<c00329f8>] (warn_slowpath_fmt+0x38/0x40)
[ 10.319196] r8:00000017 r7:c05ddaec r6:00000002 r5:c05ddbac r4:c05ddc50
[ 10.319203] [<c00329c4>] (warn_slowpath_fmt) from [<c02a2a78>] (l3_interrupt_handler+0x25c/0x368)
[ 10.319207] r3:eea22100 r2:c05ddc50
[ 10.319210] r4:80080003
[ 10.319217] [<c02a281c>] (l3_interrupt_handler) from [<c007e0e8>] (handle_irq_event_percpu+0xb4/0x160)
[ 10.319225] r10:c06c5ca9 r9:eea1b540 r8:00000017 r7:00000000 r6:00000000 r5:eea1b5a0
[ 10.319227] r4:eea22600
[ 10.319233] [<c007e034>] (handle_irq_event_percpu) from [<c007e1d4>] (handle_irq_event+0x40/0x64)
[ 10.319241] r10:00000000 r9:00000000 r8:ee808000 r7:00000000 r6:c0686cf4 r5:eea1b5a0
[ 10.319243] r4:eea1b540
[ 10.319249] [<c007e194>] (handle_irq_event) from [<c0081500>] (handle_fasteoi_irq+0xc0/0x194)
[ 10.319256] r7:00000000 r6:c0686cf4 r5:eea1b5a0 r4:eea1b540
[ 10.319261] [<c0081440>] (handle_fasteoi_irq) from [<c007d714>] (generic_handle_irq+0x2c/0x3c)
[ 10.319268] r7:00000000 r6:00000000 r5:00000017 r4:c067d41c
[ 10.319273] [<c007d6e8>] (generic_handle_irq) from [<c007d9ec>] (__handle_domain_irq+0x64/0xbc)
[ 10.319278] [<c007d988>] (__handle_domain_irq) from [<c000948c>] (gic_handle_irq+0x40/0x7c)
[ 10.319286] r9:00000000 r8:fa213000 r7:fa212000 r6:ee21bd18 r5:fa21200c r4:c06828c4
[ 10.319290] [<c000944c>] (gic_handle_irq) from [<c0013dc0>] (__irq_svc+0x40/0x74)
[ 10.319292] Exception stack(0xee21bd18 to 0xee21bd60)
[ 10.319295] bd00: c0699560 00000009
[ 10.319299] bd20: 00000000 ee4722c0 ee4722c0 00000001 ee858230 ee21be38 2f2f2f2f 00000000
[ 10.319304] bd40: 00000000 ee21bd74 ee21bd78 ee21bd68 c0184048 c0490b24 20000013 ffffffff
[ 10.319312] r9:00000000 r8:2f2f2f2f r7:ee21bd4c r6:ffffffff r5:20000013 r4:c0490b24
[ 10.319321] [<c0490b08>] (mutex_unlock) from [<c0184048>] (kernfs_iop_permission+0x44/0x5c)
[ 10.319327] [<c0184004>] (kernfs_iop_permission) from [<c012e31c>] (__inode_permission+0x84/0xd8)
[ 10.319333] r7:ee21be38 r6:00000001 r5:80808080 r4:ee4722c0
[ 10.319337] [<c012e298>] (__inode_permission) from [<c012e388>] (inode_permission+0x18/0x4c)
[ 10.319344] r7:ee21be38 r6:fefefeff r5:80808080 r4:ee34601d
[ 10.319348] [<c012e370>] (inode_permission) from [<c012fcd8>] (link_path_walk+0x6c/0x4e4)
[ 10.319352] [<c012fc6c>] (link_path_walk) from [<c01304bc>] (path_lookupat+0x88/0x10c)
[ 10.319360] r10:00000000 r9:00000000 r8:ee21bf10 r7:00000000 r6:ee21bf10 r5:ee346000
[ 10.319363] r4:ee21be38
[ 10.319368] [<c0130434>] (path_lookupat) from [<c0131e18>] (filename_lookup+0x98/0xf4)
[ 10.319374] r7:00000000 r6:ee21be38 r5:ee346000 r4:00000000
[ 10.319378] [<c0131d80>] (filename_lookup) from [<c0131f48>] (user_path_at_empty+0x4c/0x54)
[ 10.319386] r8:ee21bf40 r7:7f644ca0 r6:ee21bf10 r5:ffffff9c r4:00000000
[ 10.319391] [<c0131efc>] (user_path_at_empty) from [<c0128610>] (vfs_fstatat+0x54/0xa8)
[ 10.319397] r6:ffffff9c r5:00000000 r4:bef47070
[ 10.319402] [<c01285bc>] (vfs_fstatat) from [<c0128c64>] (SyS_lstat64+0x28/0x44)
[ 10.319410] r9:ee21a000 r8:c000fbc4 r7:000000c4 r6:7f645ca0 r5:7f644ccf r4:bef47070
[ 10.319416] [<c0128c3c>] (SyS_lstat64) from [<c000fa20>] (ret_fast_syscall+0x0/0x34)
[ 10.319418] r4:7f644658
[ 10.319421] ---[ end trace d673a89005621914 ]---
[ 10.677550] [drm] Initialized drm 1.1.0 20060810
[ 10.749385] pgd = ee35d5c0
[ 10.752102] [00000000] *pgd=00000000
[ 10.755700] Internal error: : 1211 [#1] PREEMPT SMP ARM
[ 10.760942] Modules linked in: pvrsrvkm(O+) drm omapdss(+) omapdss_base pruss(+) omap4_keypad(+) omap_wdt phy_omap_usb2 phy_ti_pipe3 phy_omap_control ti_vpe ti_vip ti_sc ti_csc ti_vpdma v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 dwc3_omap videobuf2_core extcon rtc_omap pwm_tiehrpwm rtc_palmas flk_ti_mt9p031 aptina_pll spi_omap2_mcspi omap_remoteproc remoteproc virtio virtio_ring uio_pdrv_genirq uio cryptodev(O) fluke_mir_hp v4l2_common videodev media autofs4
[ 10.804000] CPU: 1 PID: 308 Comm: systemd-udevd Tainted: G W O 4.4.41 #9
[ 10.811686] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 10.817801] task: ee2e1200 ti: edd08000 task.ti: edd08000
[ 10.823226] PC is at omap4_keypad_probe+0x288/0x438 [omap4_keypad]
[ 10.829432] LR is at __pm_runtime_resume+0x64/0x6c
[ 10.834240] pc : [<bf24266c>] lr : [<c0315b18>] psr: 400f0013
[ 10.834240] sp : edd09c88 ip : edd09c68 fp : edd09cc4
[ 10.845764] r10: eea6ba00 r9 : 00000000 r8 : ed828640
[ 10.851008] r7 : eea89610 r6 : eea89600 r5 : 00000000 r4 : ed828000
[ 10.857557] r3 : fce1c000 r2 : 00000000 r1 : 600f0013 r0 : 00000000
[ 10.864110] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 10.871272] Control: 30c5387d Table: ae35d5c0 DAC: 55555555
[ 10.877041] Process systemd-udevd (pid: 308, stack limit = 0xedd08210)
[ 10.883597] Stack: (0xedd09c88 to 0xedd0a000)
[ 10.887972] 9c80: 00000080 00000000 eea6cf40 00000000 eea89618 c06fff5c
[ 10.896184] 9ca0: eea89610 bf242bdc fffffdfb 0000002f ed828e48 00000000 edd09ce4 edd09cc8
[ 10.904396] 9cc0: c030d990 bf2423f0 c06fff5c eea89610 00000000 bf242bdc edd09d0c edd09ce8
[ 10.912605] 9ce0: c030bf18 c030d948 eea89610 bf242bdc eea89644 00000000 127d71dc ed828e48
[ 10.920816] 9d00: edd09d2c edd09d10 c030c0a0 c030bd20 00000000 bf242bdc c030c00c 00000000
[ 10.929027] 9d20: edd09d54 edd09d30 c030a1a0 c030c018 ee85bc5c eea6bab4 ee85bc70 bf242bdc
[ 10.937237] 9d40: ee8e5b00 c06b4550 edd09d64 edd09d58 c030b804 c030a13c edd09d8c edd09d68
[ 10.945448] 9d60: c030b440 c030b7ec bf242b50 edd09d78 bf242bdc bf245000 c0684760 ed828f40
[ 10.953657] 9d80: edd09da4 edd09d90 c030c840 c030b2a4 c06b4550 bf245000 edd09dbc edd09da8
[ 10.960273] connector-hdmi connector: failed to find video source
[ 10.967983] 9da0: c030d8b8 c030c7cc c0684760 bf245000 edd09dcc edd09dc0 bf245020 c030d87c
[ 10.976195] 9dc0: edd09e4c edd09dd0 c000978c bf24500c 00000000 00080000 00000001 ef40ea70
[ 10.984407] 9de0: edcbc100 c010911c edd08000 ee801e40 edd09e08 00009fa3 edd09e3c edd09e08
[ 10.987439] panel-dpi display: failed to find video source
[ 10.998118] 9e00: c0114464 c011390c 00000001 c010911c 127d71dc 0000001b edcbc100 f2ca3000
[ 11.002968] tpd12s015 encoder: failed to find video source
[ 11.011834] 9e20: 00000001 bf242c40 00000001 ed828f00 00000001 127d71dc ed828e48 bf242c40
[ 11.020047] 9e40: edd09e74 edd09e50 c00d239c c0009700 edd09e74 edd09e60 c0109208 edd09f44
[ 11.028259] 9e60: 00000001 ed828e40 edd09f3c edd09e78 c00a9d98 c00d2340 bf242c4c 00007fff
[ 11.036470] 9e80: bf242c40 c00a6f94 ee22ec00 c05bf8c8 c05bf8a0 c05bf894 c05bf8f8 c0498708
[ 11.044682] 9ea0: 00000000 bf242c4c f2cbdddc bf242de0 c068248c bf242e00 bf242c88 c00a6904
[ 11.052892] 9ec0: f2ca3000 0001ae2c 005c2951 00000000 0000000e 00000000 00000000 00000000
[ 11.061102] 9ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 11.069312] 9f00: 00000000 00000000 00000000 00000000 000000d8 00000000 00000006 b6e47d90
[ 11.077523] 9f20: 0000017b c000fbc4 edd08000 00000000 edd09fa4 edd09f40 c00aa1d8 c00a7fac
[ 11.085733] 9f40: 00000002 f2ca3000 0001ae2c f2cbd83c f2cb6e33 f2cb766c 00000e00 00001040
[ 11.093943] 9f60: 00000000 00000000 00000000 00000bec 00000024 00000025 0000000e 0000000b
[ 11.102155] 9f80: 00000009 00000000 00000000 00000000 7f6a8de0 00000000 00000000 edd09fa8
[ 11.110367] 9fa0: c000fa20 c00aa15c 00000000 7f6a8de0 00000006 b6e47d90 00000000 00000000
[ 11.118577] 9fc0: 00000000 7f6a8de0 00000000 0000017b 7f6ac428 00000000 7f6ac428 7f6ac118
[ 11.126788] 9fe0: bed56950 bed56940 b6e40c08 b6f2ddf2 80070030 00000006 00000000 00000000
[ 11.134994] Backtrace:
[ 11.137468] [<bf2423e4>] (omap4_keypad_probe [omap4_keypad]) from [<c030d990>] (platform_drv_probe+0x54/0xb8)
[ 11.147423] r10:00000000 r9:ed828e48 r8:0000002f r7:fffffdfb r6:bf242bdc r5:eea89610
[ 11.155320] r4:c06fff5c
[ 11.157872] [<c030d93c>] (platform_drv_probe) from [<c030bf18>] (driver_probe_device+0x204/0x2f8)
[ 11.166779] r7:bf242bdc r6:00000000 r5:eea89610 r4:c06fff5c
[ 11.172498] [<c030bd14>] (driver_probe_device) from [<c030c0a0>] (__driver_attach+0x94/0x98)
[ 11.180971] r9:ed828e48 r8:127d71dc r7:00000000 r6:eea89644 r5:bf242bdc r4:eea89610
[ 11.188798] [<c030c00c>] (__driver_attach) from [<c030a1a0>] (bus_for_each_dev+0x70/0xa4)
[ 11.197009] r7:00000000 r6:c030c00c r5:bf242bdc r4:00000000
[ 11.202730] [<c030a130>] (bus_for_each_dev) from [<c030b804>] (driver_attach+0x24/0x28)
[ 11.210764] r6:c06b4550 r5:ee8e5b00 r4:bf242bdc
[ 11.215426] [<c030b7e0>] (driver_attach) from [<c030b440>] (bus_add_driver+0x1a8/0x220)
[ 11.223468] [<c030b298>] (bus_add_driver) from [<c030c840>] (driver_register+0x80/0x100)
[ 11.231595] r7:ed828f40 r6:c0684760 r5:bf245000 r4:bf242bdc
[ 11.237312] [<c030c7c0>] (driver_register) from [<c030d8b8>] (__platform_driver_register+0x48/0x50)
[ 11.246395] r5:bf245000 r4:c06b4550
[ 11.250006] [<c030d870>] (__platform_driver_register) from [<bf245020>] (omap4_keypad_driver_init+0x20/0x24 [omap4_keypad])
[ 11.261182] r5:bf245000 r4:c0684760
[ 11.264793] [<bf245000>] (omap4_keypad_driver_init [omap4_keypad]) from [<c000978c>] (do_one_initcall+0x98/0x1e4)
[ 11.275102] [<c00096f4>] (do_one_initcall) from [<c00d239c>] (do_init_module+0x68/0x374)
[ 11.283225] r10:bf242c40 r9:ed828e48 r8:127d71dc r7:00000001 r6:ed828f00 r5:00000001
[ 11.291127] r4:bf242c40
[ 11.293678] [<c00d2334>] (do_init_module) from [<c00a9d98>] (load_module+0x1df8/0x2068)
[ 11.301710] r6:ed828e40 r5:00000001 r4:edd09f44
[ 11.306365] [<c00a7fa0>] (load_module) from [<c00aa1d8>] (SyS_finit_module+0x88/0x98)
[ 11.314222] r10:00000000 r9:edd08000 r8:c000fbc4 r7:0000017b r6:b6e47d90 r5:00000006
[ 11.322115] r4:00000000
[ 11.324666] [<c00aa150>] (SyS_finit_module) from [<c000fa20>] (ret_fast_syscall+0x0/0x34)
[ 11.332872] r6:00000000 r5:7f6a8de0 r4:00000000
[ 11.337531] Code: eb431885 e1a00009 eb443ac1 ea000018 (e5842018)
[ 11.343651] ---[ end trace d673a89005621915 ]---
I find that when I use interrupt 115, it causes lots of errors with other drivers failing to load. 120 behaves a bit better (but still gives the stack dumps). In that case the other drivers load and I get a /dev/input/event0 device. But pressing the buttons on the board does not result in any output from /dev/input/event0.