Linux freezing and reboot after HDMI reconnect

Hello,
when booting with monitor connected by HDMI all works fine.
But if I switch the monitor off and on again the linux freezes and reboots after about a minute. This is reproducable with at least one monitor and one projector also connected with HDMI.
While logging the linux outputs with RS232 I got the following:

[   35.555240] tegra_dc_hdmi_irq: start                                         
[   35.559297] tegra_dc_hdmi_irq: end                                           
[   35.564694] hdmi_state_machine_worker (tid edb665c0): state 4 (Enabled), hpd1
[   35.574893] hdmi_state_machine_set_state_l: switching from state 4 (Enabled))
[   35.875669] tegra_dc_hdmi_irq: start                                         
[   35.880069] tegra_dc_hdmi_irq: end                                           
[   35.892894] hdmi_state_machine_worker (tid edb665c0): state 5 (Wait for HPD 1
[   35.906610] hdmi_state_machine_set_state_l: switching from state 5 (Wait for)
[   35.977789] hdmi_state_machine_worker (tid edb665c0): state 6 (Recheck EDID)0
[   36.902428] tegra_dc_hdmi_irq: start                                         
[   36.906707] tegra_dc_hdmi_irq: end                                           
[   36.911085] tegra-i2c tegra12-i2c.1: no acknowledge from address 0x50        
[   36.926845] tegra_edid_read_block(0) returned err -121                       
[   36.932313] hdmi_recheck_edid: read_edid_into_buffer() returned -121         
[   36.938878] hdmi_state_machine_set_state_l: switching from state 6 (Recheck )
[   36.949420] hdmi_state_machine_worker (tid edb665c0): state 6 (Recheck EDID)1
[   36.958997] hdmi_state_machine_set_state_l: switching from state 6 (Recheck )
[   37.008754] hdmi_state_machine_worker (tid edb665c0): state 0 (Reset), hpd 00
[   37.022747] hdmi_disable_l: audio_switch 0                                   
[   37.028746] hdmi_disable_l: hpd_switch 0                                     
[   37.033880] HDMI from connected to disconnected                              
[   37.049618] tegradc tegradc.1: using mode 0x0 pclk=0 href=0 vref=0           
[   37.066607] hdmi_state_machine_set_state_l: switching from state 0 (Reset) t)
[   37.080668] gk20a gk20a.0: unrecognized ioctl cmd: 0x8008486d                
[   37.103018] hdmi_state_machine_worker (tid edb665c0): state 1 (Check Plug), 0
[   37.115608] hdmi_disable_l: audio_switch 0                                   
[   37.127934] hdmi_disable_l: hpd_switch 0                                     
[   37.138898] hdmi_state_machine_set_state_l: switching from state 1 (Check Pl)
[   37.197830] tegradc tegradc.1: switching framebuffer to 1920x1080            
[   37.197838] tegradc tegradc.1: using mode 1920x1080 pclk=148500000 href=1 vr1
[   37.218979] tegra_dc_hdmi_irq: start                                         
[   37.222576] tegra_dc_hdmi_irq: end                                           
[   37.226216] hdmi_state_machine_worker (tid edb665c0): state 3 (Disabled), hp1
[   37.235755] hdmi_state_machine_set_state_l: switching from state 3 (Disabled)
[   37.283939] hdmi_state_machine_worker (tid edb665c0): state 0 (Reset), hpd 10
[   37.293047] hdmi_disable_l: audio_switch 0                                   
[   37.297329] hdmi_disable_l: hpd_switch 0                                     
[   37.301886] hdmi_state_machine_set_state_l: switching from state 0 (Reset) t)
[   37.320819] hdmi_state_machine_worker (tid edb665c0): state 1 (Check Plug), 0
[   37.330173] hdmi_state_machine_set_state_l: switching from state 1 (Check Pl)
[   37.398999] hdmi_state_machine_worker (tid edb665c0): state 2 (Check EDID), 0
[   37.408881] tegra-i2c tegra12-i2c.1: arb lost in communicate to add 0x50     
[   38.421138] tegra-i2c tegra12-i2c.1: --- register dump for debugging ----    
[   38.438572] tegra-i2c tegra12-i2c.1: I2C_CNFG - 0x2c00                       
[   38.449124] tegra-i2c tegra12-i2c.1: I2C_PACKET_TRANSFER_STATUS - 0xff0009   
[   38.457098] tegra-i2c tegra12-i2c.1: I2C_FIFO_CONTROL - 0xe2                 
[   38.463369] tegra-i2c tegra12-i2c.1: I2C_FIFO_STATUS - 0x800080              
[   38.469941] tegra-i2c tegra12-i2c.1: I2C_INT_MASK - 0xed                     
[   38.475861] tegra-i2c tegra12-i2c.1: I2C_INT_STATUS - 0x2                    
[   38.481833] tegra-i2c tegra12-i2c.1: msg->len - 1                            
[   38.487171] tegra-i2c tegra12-i2c.1: is_msg_write - 1                        
[   38.492917] tegra-i2c tegra12-i2c.1: next_msg->len - 128                     
[   38.498757] tegra-i2c tegra12-i2c.1: is_next_msg_write - 0                   
[   38.504825] tegra-i2c tegra12-i2c.1: buf_remaining - 128                     
[   38.510726] tegra-i2c tegra12-i2c.1: timeout config_load                     
[   38.516641] hdmi_state_machine_set_state_l: switching from state 2 (Check ED)
[   38.586039] hdmi_state_machine_worker (tid edb665c0): state 2 (Check EDID), 0
[   39.597908] tegra-i2c tegra12-i2c.1: timeout waiting for fifo flush          
[   39.607444] tegra-i2c tegra12-i2c.1: timeout config_load                     
[   39.612880] hdmi_state_machine_set_state_l: switching from state 2 (Check ED)
[   39.622352] BUG: workqueue leaked lock or atomic: kworker/0:1/0x00000001/31  
[   39.622352]      last function: hdmi_state_machine_worker                    
[   39.634735] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 3.10.40-2.7.5+g22e01
[   39.642344] Workqueue: events hdmi_state_machine_worker                      
[   39.647688] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   39.656362] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0075894>] (process_o)
[   39.665200] [<c0075894>] (process_one_work+0x2e8/0x3f8) from [<c0076654>] (w)
[   39.674473] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   39.682796] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   39.691492] BUG: workqueue leaked lock or atomic: kworker/0:1/0x00000001/31  
[   39.691492]      last function: pm_runtime_work                              
[   39.703086] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 3.10.40-2.7.5+g22e01
[   39.710757] Workqueue: pm pm_runtime_work                                    
[   39.715081] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   39.723820] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0075894>] (process_o)
[   39.732739] [<c0075894>] (process_one_work+0x2e8/0x3f8) from [<c0076654>] (w)
[   39.742172] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   39.750591] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   39.758774] BUG: scheduling while atomic: kworker/0:1/31/0x40000002          
[   39.765183] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   39.777332] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 3.10.40-2.7.5+g22e01
[   39.785060] Workqueue: pm pm_runtime_work                                    
[   39.789251] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   39.797989] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   39.806609] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   39.815261] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0088880>] (__cond_r)
[   39.823926] [<c0088880>] (__cond_resched+0x2c/0x3c) from [<c0725d10>] (_cond)
[   39.832802] [<c0725d10>] (_cond_resched+0x40/0x48) from [<c0075898>] (proces)
[   39.841964] [<c0075898>] (process_one_work+0x2ec/0x3f8) from [<c0076654>] (w)
[   39.851330] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   39.859805] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   39.877220] hdmi_state_machine_worker (tid edb665c0): state 2 (Check EDID), 0
[   39.886563] BUG: scheduling while atomic: kworker/0:1/31/0x00000002          
[   39.892925] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   39.904895] CPU: 0 PID: 31 Comm: kworker/0:1 Tainted: G        W    3.10.40-1
[   39.913540] Workqueue: events hdmi_state_machine_worker                      
[   39.918908] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   39.927613] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   39.936169] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   39.944764] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0723c64>] (schedule)
[   39.953705] [<c0723c64>] (schedule_timeout+0x1ec/0x220) from [<c0067c6c>] (m)
[   39.962278] [<c0067c6c>] (msleep+0x24/0x28) from [<c04ff138>] (tegra_i2c_flu)
[   39.971059] [<c04ff138>] (tegra_i2c_flush_fifos+0x78/0x84) from [<c04ffee8>])
[   39.980959] [<c04ffee8>] (tegra_i2c_xfer_msg+0x44/0x9e4) from [<c0500b50>] ()
[   39.990464] [<c0500b50>] (tegra_i2c_xfer+0x2c8/0x3d4) from [<c04fac8c>] (__i)
[   39.999513] [<c04fac8c>] (__i2c_transfer+0x54/0x7c) from [<c04fc4dc>] (i2c_t)
[   40.008281] [<c04fc4dc>] (i2c_transfer+0x98/0x118) from [<c035816c>] (tegra_)
[   40.017695] [<c035816c>] (tegra_edid_read_block+0x94/0xf0) from [<c03587b4>])
[   40.028036] [<c03587b4>] (tegra_edid_get_monspecs+0x48/0x2d8) from [<c035709)
[   40.038339] [<c0357094>] (handle_check_edid_l+0x50/0x1f4) from [<c0075804>] )
[   40.048060] [<c0075804>] (process_one_work+0x258/0x3f8) from [<c0076654>] (w)
[   40.057395] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   40.065781] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   40.080961] BUG: scheduling while atomic: kworker/0:1/31/0x00000002          
[   40.087293] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   40.099097] CPU: 0 PID: 31 Comm: kworker/0:1 Tainted: G        W    3.10.40-1
[   40.107690] Workqueue: events hdmi_state_machine_worker                      
[   40.112991] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   40.121652] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   40.130146] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   40.138723] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0723c64>] (schedule)
[   40.147623] [<c0723c64>] (schedule_timeout+0x1ec/0x220) from [<c0067c6c>] (m)
[   40.156115] [<c0067c6c>] (msleep+0x24/0x28) from [<c04ff138>] (tegra_i2c_flu)
[   40.164845] [<c04ff138>] (tegra_i2c_flush_fifos+0x78/0x84) from [<c04ffee8>])
[   40.174720] [<c04ffee8>] (tegra_i2c_xfer_msg+0x44/0x9e4) from [<c0500b50>] ()
[   40.184167] [<c0500b50>] (tegra_i2c_xfer+0x2c8/0x3d4) from [<c04fac8c>] (__i)
[   40.193154] [<c04fac8c>] (__i2c_transfer+0x54/0x7c) from [<c04fc4dc>] (i2c_t)
[   40.201879] [<c04fc4dc>] (i2c_transfer+0x98/0x118) from [<c035816c>] (tegra_)
[   40.211241] [<c035816c>] (tegra_edid_read_block+0x94/0xf0) from [<c03587b4>])
[   40.221530] [<c03587b4>] (tegra_edid_get_monspecs+0x48/0x2d8) from [<c035709)
[   40.231754] [<c0357094>] (handle_check_edid_l+0x50/0x1f4) from [<c0075804>] )
[   40.241432] [<c0075804>] (process_one_work+0x258/0x3f8) from [<c0076654>] (w)
[   40.250688] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   40.259024] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   40.270727] BUG: scheduling while atomic: kworker/0:1/31/0x00000002          
[   40.277025] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   40.288819] CPU: 0 PID: 31 Comm: kworker/0:1 Tainted: G        W    3.10.40-1
[   40.297361] Workqueue: events hdmi_state_machine_worker                      
[   40.302651] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   40.311285] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   40.319750] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   40.328312] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0723c64>] (schedule)
[   40.337200] [<c0723c64>] (schedule_timeout+0x1ec/0x220) from [<c0067c6c>] (m)
[   40.345659] [<c0067c6c>] (msleep+0x24/0x28) from [<c04ff138>] (tegra_i2c_flu)
[   40.354404] [<c04ff138>] (tegra_i2c_flush_fifos+0x78/0x84) from [<c04ffee8>])
[   40.364249] [<c04ffee8>] (tegra_i2c_xfer_msg+0x44/0x9e4) from [<c0500b50>] ()
[   40.373659] [<c0500b50>] (tegra_i2c_xfer+0x2c8/0x3d4) from [<c04fac8c>] (__i)
[   40.382654] [<c04fac8c>] (__i2c_transfer+0x54/0x7c) from [<c04fc4dc>] (i2c_t)
[   40.391379] [<c04fc4dc>] (i2c_transfer+0x98/0x118) from [<c035816c>] (tegra_)
[   40.400699] [<c035816c>] (tegra_edid_read_block+0x94/0xf0) from [<c03587b4>])
[   40.410995] [<c03587b4>] (tegra_edid_get_monspecs+0x48/0x2d8) from [<c035709)
[   40.421195] [<c0357094>] (handle_check_edid_l+0x50/0x1f4) from [<c0075804>] )
[   40.430890] [<c0075804>] (process_one_work+0x258/0x3f8) from [<c0076654>] (w)
[   40.440133] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   40.448418] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   40.464589] BUG: scheduling while atomic: kworker/0:1/31/0x00000002          
[   40.470906] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   40.482650] CPU: 0 PID: 31 Comm: kworker/0:1 Tainted: G        W    3.10.40-1
[   40.491200] Workqueue: events hdmi_state_machine_worker                      
[   40.496481] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   40.505108] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   40.513561] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   40.522122] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0723c64>] (schedule)
[   40.531017] [<c0723c64>] (schedule_timeout+0x1ec/0x220) from [<c0067c6c>] (m)
[   40.539476] [<c0067c6c>] (msleep+0x24/0x28) from [<c04ff138>] (tegra_i2c_flu)
[   40.548212] [<c04ff138>] (tegra_i2c_flush_fifos+0x78/0x84) from [<c04ffee8>])
[   40.558051] [<c04ffee8>] (tegra_i2c_xfer_msg+0x44/0x9e4) from [<c0500b50>] ()
[   40.567463] [<c0500b50>] (tegra_i2c_xfer+0x2c8/0x3d4) from [<c04fac8c>] (__i)
[   40.576449] [<c04fac8c>] (__i2c_transfer+0x54/0x7c) from [<c04fc4dc>] (i2c_t)
[   40.585160] [<c04fc4dc>] (i2c_transfer+0x98/0x118) from [<c035816c>] (tegra_)
[   40.594481] [<c035816c>] (tegra_edid_read_block+0x94/0xf0) from [<c03587b4>])
[   40.604775] [<c03587b4>] (tegra_edid_get_monspecs+0x48/0x2d8) from [<c035709)
[   40.614962] [<c0357094>] (handle_check_edid_l+0x50/0x1f4) from [<c0075804>] )
[   40.624641] [<c0075804>] (process_one_work+0x258/0x3f8) from [<c0076654>] (w)
[   40.633878] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   40.642156] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   40.675145] BUG: scheduling while atomic: kworker/0:1/31/0x00000002          
[   40.681442] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   40.693159] CPU: 0 PID: 31 Comm: kworker/0:1 Tainted: G        W    3.10.40-1
[   40.701703] Workqueue: events hdmi_state_machine_worker                      
[   40.706964] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   40.715592] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   40.724034] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   40.732567] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0723c64>] (schedule)
[   40.741458] [<c0723c64>] (schedule_timeout+0x1ec/0x220) from [<c0067c6c>] (m)
[   40.749901] [<c0067c6c>] (msleep+0x24/0x28) from [<c04ff138>] (tegra_i2c_flu)
[   40.758610] [<c04ff138>] (tegra_i2c_flush_fifos+0x78/0x84) from [<c04ffee8>])
[   40.768451] [<c04ffee8>] (tegra_i2c_xfer_msg+0x44/0x9e4) from [<c0500b50>] ()
[   40.777851] [<c0500b50>] (tegra_i2c_xfer+0x2c8/0x3d4) from [<c04fac8c>] (__i)
[   40.786809] [<c04fac8c>] (__i2c_transfer+0x54/0x7c) from [<c04fc4dc>] (i2c_t)
[   40.795519] [<c04fc4dc>] (i2c_transfer+0x98/0x118) from [<c035816c>] (tegra_)
[   40.804830] [<c035816c>] (tegra_edid_read_block+0x94/0xf0) from [<c03587b4>])
[   40.815100] [<c03587b4>] (tegra_edid_get_monspecs+0x48/0x2d8) from [<c035709)
[   40.825272] [<c0357094>] (handle_check_edid_l+0x50/0x1f4) from [<c0075804>] )
[   40.834932] [<c0075804>] (process_one_work+0x258/0x3f8) from [<c0076654>] (w)
[   40.844157] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   40.852422] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   40.869326] BUG: scheduling while atomic: kworker/0:1/31/0x00000002          
[   40.875618] Modules linked in: joydev apalis_tk1_k20_can apalis_tk1_k20_ts g0
[   40.887316] CPU: 0 PID: 31 Comm: kworker/0:1 Tainted: G        W    3.10.40-1
[   40.895840] Workqueue: events hdmi_state_machine_worker                      
[   40.901102] [<c0015290>] (unwind_backtrace+0x0/0x120) from [<c0011e78>] (sho)
[   40.909716] [<c0011e78>] (show_stack+0x18/0x1c) from [<c0086760>] (__schedul)
[   40.918160] [<c0086760>] (__schedule_bug+0x4c/0x68) from [<c0725210>] (__sch)
[   40.926695] [<c0725210>] (__schedule+0x7c/0x7f4) from [<c0723c64>] (schedule)
[   40.935565] [<c0723c64>] (schedule_timeout+0x1ec/0x220) from [<c0067c6c>] (m)
[   40.944003] [<c0067c6c>] (msleep+0x24/0x28) from [<c04ff138>] (tegra_i2c_flu)
[   40.952717] [<c04ff138>] (tegra_i2c_flush_fifos+0x78/0x84) from [<c04ffee8>])
[   40.962543] [<c04ffee8>] (tegra_i2c_xfer_msg+0x44/0x9e4) from [<c0500b50>] ()
[   40.971944] [<c0500b50>] (tegra_i2c_xfer+0x2c8/0x3d4) from [<c04fac8c>] (__i)
[   40.980907] [<c04fac8c>] (__i2c_transfer+0x54/0x7c) from [<c04fc4dc>] (i2c_t)
[   40.989604] [<c04fc4dc>] (i2c_transfer+0x98/0x118) from [<c035816c>] (tegra_)
[   40.998917] [<c035816c>] (tegra_edid_read_block+0x94/0xf0) from [<c03587b4>])
[   41.009174] [<c03587b4>] (tegra_edid_get_monspecs+0x48/0x2d8) from [<c035709)
[   41.019362] [<c0357094>] (handle_check_edid_l+0x50/0x1f4) from [<c0075804>] )
[   41.029014] [<c0075804>] (process_one_work+0x258/0x3f8) from [<c0076654>] (w)
[   41.038231] [<c0076654>] (worker_thread+0x1b0/0x328) from [<c007c3dc>] (kthr)
[   41.046505] [<c007c3dc>] (kthread+0xc0/0xcc) from [<c000e4b8>] (ret_from_for)
[   41.055942] tegra-i2c tegra12-i2c.1: timeout waiting for fifo flush    

It seems the reconnection failed by reading the EDID:

tegra_edid_read_block(0) returned err -121 
tegra-i2c tegra12-i2c.1: no acknowledge from address 0x50

Do you have any suggestions? Thanks.
Frank

It would be interesting to know what exact hardware versions of things you are talking about.

That said most possibly what you are seeing is related to the Apalis TK1 Errata number 7 as published here and the Ixora Errata number 1 as published here. This issue may be resolved by either using an Apalis TK1 V1.2A module or a different carrier board like our Apalis Evaluation board.

Thank you,
yes it seems that we have the problem discussed in the Errata sheet. Our Ixora board has the revision number V1.1A.
I try to implement the workaround mentioned in the Errata. I downloaded the git repository “r21.6” because we used image 2.7b5. But the kernel patch is obviously made for “r21.5” because some files changed and the patch changes doesn´t match:

tegra124-apalis-gpio.dtsi: some GPIOs are missing;
tegra124-apalis-pinmux.dtsi: The “nvidia,function” is already set to “i2c4”;
board-apalis-tk1-panel.c: The part that should be changed is completely missing;

The question is: Which changes are necessary to patch the kernel with version “r21.6”? Thank you.

Regards Frank

Thank you,

You are very welcome.

yes it seems that we have the problem discussed in the Errata sheet. Our Ixora board has the revision number V1.1A. I try to implement the workaround mentioned in the Errata.

I assume you are aware that the workaround discussed there is mainly about a hardware modification required. There is no known workaround just in software.

I downloaded the git repository “r21.6” because we used image 2.7b5.

I am not sure what exactly you mean by “r21.6” resp. the required branches and such concerning any of our BSPs are all mentioned in the following article on our developer website.

But the kernel patch is obviously made for “r21.5” because some files changed and the patch changes doesn´t match:

tegra124-apalis-gpio.dtsi: some GPIOs are missing; tegra124-apalis-pinmux.dtsi: The “nvidia,function” is already set to “i2c4”; board-apalis-tk1-panel.c: The part that should be changed is completely missing;

The question is: Which changes are necessary to patch the kernel with version “r21.6”? Thank you.

Starting with BSP 2.7b5 the proposed changes are already implemented as part of the Apalis TK1 V1.2A specific software modifications. Please note however that the errata you are talking about only would need the DDC/EDID specific modifications thereof.

Yes, I installed the HW bridge with connection between Pins 36/38 of LVDS connector and Pins 16/15 of X27 connector.
In the errata is mentioned

The device tree and kernel needs to be
patched to use these pins as DDC
channel for HDMI.

In the article “Build U-Boot and Linux Kernel from Source Code” the kernel git branch is defined with “toradex_tk1_l4t_r21.6” for image verion 2.7b5 and “toradex_tk1_l4t_r21.5” for older versions.

You said, that from BSP 2.7b5 on the changes for the kernel patch in the errata document ch. 7.2.3 are already implemented. Does this mean I only have to install the HW bridge with no kernel changes?
I tried it, but it doesn´t work. I got no monitor output.

With Ixora 1.1A and installed bridge, which BSP should I use and do I have to patch the kernel?
Thank you.

Regards
Frank

Starting with BSP 2.7b5 (git tag: Apalis-TK1_LXDE-Image_2.7b5-20171201), kernel changes are not required, but the device-tree still need’s to be adjusted.

Files arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-gpio.dtsi, arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-pinmux.dtsi need to be adjusted according to the errata and hdmi_ddc: i2c@7000c400 entry in arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-displays.dtsi needs to be changed to hdmi_ddc: i2c@7000c700.

Yes, I installed the HW bridge with connection between Pins 36/38 of LVDS connector and Pins 16/15 of X27 connector. In the errata is mentioned

The device tree and kernel needs to be patched to use these pins as DDC channel for HDMI.

In the article “Build U-Boot and Linux Kernel from Source Code” the kernel git branch is defined with “toradex_tk1_l4t_r21.6” for image verion 2.7b5 and “toradex_tk1_l4t_r21.5” for older versions.

Exactly.

You said, that from BSP 2.7b5 on the changes for the kernel patch in the errata document ch. 7.2.3 are already implemented. Does this mean I only have to install the HW bridge with no kernel changes?

No, as mentioned above such proposed changes are already implemented as part of the Apalis TK1 V1.2A specific software modifications. But of course the V1.2A hardware has some further modifications which are all integrated in a new device tree ultimately called tegra124-apalis-v1.2-eval.dtb.

I tried it, but it doesn´t work. I got no monitor output.

With Ixora 1.1A and installed bridge, which BSP should I use

As mentioned above I recommend using 2.7b5 or later.

and do I have to patch the kernel?

Yes, you would need resp. DDC/EDID specific modifications as found in the tegra124-apalis-v1.2-eval device tree.

Just for a quick test you may use our stock Embedded Linux Demo with LXDE 2.7b5 or later and try the v1.2 device tree e.g. as follows:

Apalis TK1 # setenv fdt_module apalis-v1.2; boot

Thank you.

You are very welcome.

WIth

Apalis TK1 # setenv fdt_module apalis-v1.2; boot

I got “Failed to read EDID after 5 times. Giving up.”

I assume you first installed one of our stock BSP demo images, isn’t it? And based on what exact version of the BSP did you try this?

I tried to install the latest demo (Tezi_2.8b2.97) with Easy Installer. But unfortunatly the install process hangs at 1% (5/497 MB). I do not have internet connection on the Apalis, so I have to install with USB, which does not work.

Is there any difference between the Demo (installed by Easy Installer) and the “legacy images” installed manually? Because Easy Installer doesn´t work for me, but manual.

That’s a known issue:

Please try one of the workarounds.

Setting the date to 2018-04-12 didn´t help.

At first: the latest “legacy” BSP “Apalis-TK1_LXDE-Image_2.8b2.97-20180331.tar.bz2” does not work. After manual flashing it said that uImage file could not be found.

Installing the demo (2.8b2) with Easy Installer doesn´t finish - see comments above.

So I work with legacy BSP "Apalis-TK1_LXDE-Image_2.7b5-20171201.tar.bz2 " - no problems with installation. HDMI monitor detected, but known bug when switching off and on (freezing, restart).

With Apalis TK1 # setenv fdt_module apalis-v1.2; boot I do not get monitor output. The linux log tries 5 times the I2C communication (DDC) and gives up. This behaviour is expected since we changed the output pins from Apalis for DDC.

If I install the HW bridge with default apalis fdt I get a lot of kernel errors at startup and no monitor outout. OK some signal confusion.

Then I start with Apalis TK1 # setenv fdt_module apalis-v1.2; boot and installed HW bridge and I get no kernel errors but again 5 tries of DDC commmunication and no monitor output.

Something wrong?

We’ve switched to zImage with 2.8, You need to revert u-boot environment to default with env default -aand saveenv

That´s it. But no difference in result to 2.7b5.

I use an oscilloscope to see I2C signals. When I unplug the HW bridge and measure at X27 pins 15/16 I expect some I2C traffic, but there is nothing. So apalis-v1.2 does not work for me.

Regarding to the errata sheet and its changes: My files look like this and what do I have to change?
tegra124-apalis-gpio.dtsi:

gpio_default: default {
			gpio-input = <
				TEGRA_GPIO(A, 1)  /* 120 UART1_DSR */
				TEGRA_GPIO(B, 1)  /* 124 UART1_DCD */
				TEGRA_GPIO(I, 5)  /*     MCU_INT3# */
				TEGRA_GPIO(I, 6)  /*     TEMP_ALERT_L */
				TEGRA_GPIO(J, 0)  /*     MCU_INT4# */
				TEGRA_GPIO(J, 2)  /*     MCU_INT2# */
				TEGRA_GPIO(K, 2)  /*     MCU_INT1# */
				TEGRA_GPIO(K, 7)  /* 122 UART1_RI */
				TEGRA_GPIO(N, 7)  /* 232 HDMI1_HPD */
				TEGRA_GPIO(V, 3)  /* 164 MMC1_CD# */
				TEGRA_GPIO(V, 4)  /*   5 Apalis GPIO3 */
				TEGRA_GPIO(V, 5)  /*   7 Apalis GPIO4 */
				TEGRA_GPIO(W, 3)  /*     TOUCH_INT */
				TEGRA_GPIO(W, 5)  /* 152 MMC1_D5 */
				TEGRA_GPIO(BB, 0) /*  96 USBH_OC# */
				TEGRA_GPIO(BB, 4) /* 262 USBO1_OC# */
				TEGRA_GPIO(CC, 5) /* 148 MMC1_D4 */
				TEGRA_GPIO(DD, 1) /*  15 Apalis GPIO7 */
				TEGRA_GPIO(DD, 2) /*  17 Apalis GPIO8 */

tegra124-apalis-pinmux.dtsi:

			/* Apalis GPIO */
			ddc_scl_pv4 {
				nvidia,pins = "ddc_scl_pv4";
				nvidia,function = "i2c4";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};
			ddc_sda_pv5 {
				nvidia,pins = "ddc_sda_pv5";
				nvidia,function = "i2c4";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
			};

if you boot without HDMI connected, then connect HDMI, do you see any messages in the serial console ?

You won’t see any activity with the bridge disconnected, i2c pull-ups are “behind” the bridge.

for 2.8 BSP:

diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-gpio.dtsi
b/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-gpio.dtsi
index 100e344..f0882c5 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-gpio.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-gpio.dtsi
@@ -17,9 +17,11 @@
TEGRA_GPIO(K, 7)
TEGRA_GPIO(N, 7)
TEGRA_GPIO(O, 5)
+ TEGRA_GPIO(T, 5)
+ TEGRA_GPIO(T, 6)
TEGRA_GPIO(V, 3)
- TEGRA_GPIO(V, 4)
- TEGRA_GPIO(V, 5)
+ /* TEGRA_GPIO(V, 4) */
+ /* TEGRA_GPIO(V, 5) */
TEGRA_GPIO(W, 3)
TEGRA_GPIO(W, 5)
TEGRA_GPIO(BB, 0)
diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-pinmux.dtsi
b/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-pinmux.dtsi
index 8d4ff4e..5c9ba71 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-pinmux.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-pinmux.dtsi
@@ -119,14 +119,14 @@
/* Apalis GPIO */
ddc_scl_pv4 {
nvidia,pins = "ddc_scl_pv4";
- nvidia,function = "rsvd2";
+ nvidia,function = "i2c4";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
ddc_sda_pv5 {
nvidia,pins = "ddc_sda_pv5";
- nvidia,function = "rsvd2";
+ nvidia,function = "i2c4";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;

and
hdmi_ddc: i2c@7000c400 entry in arch/arm/boot/dts/tegra124-platforms/tegra124-apalis-displays.dtsi needs to be changed to hdmi_ddc: i2c@7000c700.

I am confused, because in your file there is an additional line in tegra124-apalis-gpio.dtsi

TEGRA_GPIO(O, 5)

and in my tegra124-apalis-pinmux.dtsi the nvidia function are already set to:

nvidia,function = "i2c4";

Only focus on the changed lines, other are not really important for this. You’re right, tegra124-apalis-pinmux.dtsi is already modified in our repository.