Bug 150481

Summary: i2c_designware: probe of 808622C1:06 failed with error -110
Product: Drivers Reporter: Francesco Defilippo (francesco)
Component: I2CAssignee: Drivers/I2C virtual user (drivers-i2c)
Status: RESOLVED DUPLICATE    
Severity: normal CC: fer, jwrdegoede, njitwb, porlock
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.6.4 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg

Description Francesco Defilippo 2016-07-26 16:51:04 UTC
Created attachment 226521 [details]
dmesg

[   10.803449] i2c_designware 808622C1:06: I2C bus managed by PUNIT
[   10.902287] i2c_designware 808622C1:06: punit semaphore timed out, resetting
[   10.905745] i2c_designware 808622C1:06: PUNIT SEM: 2
[   10.909178] ------------[ cut here ]------------
[   10.909199] WARNING: CPU: 0 PID: 1250 at /home/kernel/COD/linux/drivers/i2c/busses/i2c-designware-baytrail.c:106 baytrail_i2c_acquire+0x191/0x1e0 [i2c_designware_platform]
[   10.909202] Modules linked in: mei_txe(+) lpc_ich(+) mei snd_intel_sst_acpi snd_intel_sst_core snd_soc_sst_mfld_platform 8250_fintek snd_soc_sst_match snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine dw_dmac dw_dmac_core hci_uart snd_pcm btbcm intel_hid btqca sparse_keymap snd_timer btintel bluetooth snd soundcore rfkill_gpio i2c_designware_platform(+) i2c_designware_core pwm_lpss_platform 8250_dw pwm_lpss spi_pxa2xx_platform soc_button_array acpi_pad int3403_thermal int3400_thermal processor_thermal_device acpi_thermal_rel int340x_thermal_zone mac_hid intel_soc_dts_iosf ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr configfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c
[   10.909286]  raid1 raid0 multipath linear uas usb_storage hid_generic usbhid mmc_block crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper i915 cryptd i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm fjes video i2c_hid hid sdhci_acpi sdhci pinctrl_cherryview
[   10.909329] CPU: 0 PID: 1250 Comm: systemd-udevd Not tainted 4.6.4-040604-generic #201607111332
[   10.909333] Hardware name: N/A CherryTrail/Type2 - Board Product Name, BIOS YT8.2x64.001 01/06/2016
[   10.909337]  0000000000000286 00000000279abe47 ffff88003460f9e0 ffffffff813f3373
[   10.909344]  0000000000000000 0000000000000000 ffff88003460fa20 ffffffff8108293b
[   10.909349]  0000006a3460fa00 ffff880077769018 00000000fffee5ad 00000000fffee594
[   10.909355] Call Trace:
[   10.909368]  [<ffffffff813f3373>] dump_stack+0x63/0x90
[   10.909377]  [<ffffffff8108293b>] __warn+0xcb/0xf0
[   10.909383]  [<ffffffff81082a6d>] warn_slowpath_null+0x1d/0x20
[   10.909390]  [<ffffffffc05b5921>] baytrail_i2c_acquire+0x191/0x1e0 [i2c_designware_platform]
[   10.909397]  [<ffffffffc05a9237>] i2c_dw_init+0x27/0x430 [i2c_designware_core]
[   10.909403]  [<ffffffffc05aa009>] i2c_dw_probe+0x39/0x1c0 [i2c_designware_core]
[   10.909412]  [<ffffffff81568669>] ? pm_runtime_forbid+0x49/0x60
[   10.909418]  [<ffffffffc05b54b5>] dw_i2c_plat_probe+0x1e5/0x420 [i2c_designware_platform]
[   10.909426]  [<ffffffff8155eedb>] platform_drv_probe+0x3b/0xa0
[   10.909433]  [<ffffffff8149600d>] ? acpi_lpss_activate+0x4b/0x53
[   10.909438]  [<ffffffff8155ccac>] driver_probe_device+0x22c/0x440
[   10.909443]  [<ffffffff8155cf91>] __driver_attach+0xd1/0xf0
[   10.909448]  [<ffffffff8155cec0>] ? driver_probe_device+0x440/0x440
[   10.909453]  [<ffffffff8155a74c>] bus_for_each_dev+0x6c/0xc0
[   10.909458]  [<ffffffff8155c38e>] driver_attach+0x1e/0x20
[   10.909463]  [<ffffffff8155be1b>] bus_add_driver+0x1eb/0x280
[   10.909467]  [<ffffffffc05ba000>] ? 0xffffffffc05ba000
[   10.909472]  [<ffffffff8155d910>] driver_register+0x60/0xe0
[   10.909477]  [<ffffffff8155ee56>] __platform_driver_register+0x36/0x40
[   10.909484]  [<ffffffffc05ba017>] dw_i2c_init_driver+0x17/0x1000 [i2c_designware_platform]
[   10.909491]  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
[   10.909499]  [<ffffffff81841d88>] ? preempt_schedule_common+0x18/0x30
[   10.909505]  [<ffffffff81195439>] ? do_init_module+0x27/0x1df
[   10.909512]  [<ffffffff811fdff0>] ? kmem_cache_alloc_trace+0x100/0x1e0
[   10.909517]  [<ffffffff81195471>] do_init_module+0x5f/0x1df
[   10.909525]  [<ffffffff8110ea2a>] load_module+0x16aa/0x1c40
[   10.909530]  [<ffffffff8110b0e0>] ? __symbol_put+0x60/0x60
[   10.909538]  [<ffffffff8139ee1d>] ? ima_post_read_file+0x7d/0xa0
[   10.909544]  [<ffffffff8110f236>] SYSC_finit_module+0xe6/0x120
[   10.909550]  [<ffffffff8110f28e>] SyS_finit_module+0xe/0x10
[   10.909555]  [<ffffffff81845c36>] entry_SYSCALL_64_fastpath+0x1e/0xa8
[   10.909559] ---[ end trace 8824156dde400a66 ]---
[   10.909566] i2c_designware 808622C1:06: couldn't acquire bus ownership
[   10.920055] i2c_designware: probe of 808622C1:06 failed with error -110
Comment 1 WangBo 2016-07-27 02:46:40 UTC
I met the same issue. Maybe you can try modify PUNIT_SEMAPHORE from 0x7 to 0x10E in i2c-designware-baytrail.c.

0x7 is for baytrail and 0x10E is for CHT.

This modification can solve the problem of initialization timeout, but in the transmission of data will crash.

My hardware use CHT CPU and X-Power PMIC. I want to know if you're going to have the same problem.
Comment 2 Francesco Defilippo 2016-07-27 05:58:21 UTC
The kernel isn't compiled by me but from 

kernel.ubuntu.com/~kernel-ppa/mainline/

My hardware is Wintel Pro CX-W8 TV Box:

http://www.sunchip-tech.com/prod_view.aspx?TypeId=50001&Id=86&FId=t3:50001:3
Comment 3 WangBo 2016-07-27 06:39:29 UTC
Wintel Pro CX-W8 TV Box uses the Intel Z8300 as CPU. It is the same as my hardware. As far as I know, this problem exists in all the hardware using CHT CPU.
Comment 4 porlock 2016-11-11 22:30:21 UTC
On Wintel Pro W8 PRO changing PUNIT_SEMAPHORE to 0x10E makes kernel stuck on loading
Comment 5 Hans de Goede 2016-12-02 10:56:38 UTC
There really are 2 problems here:

1) On Cherrytrail the punit has the pmic i2c bus access semaphore at a different address (0x10e)
2) iosf_mbi also needs to be bound for things to work. The mainline kernel currently only has iosf_mbi support in pci mode not for acpi mode. So for some people just fixing 1. is enough, but not for everyone. 

This is currently being discussed in bug 155241, where good progress is  being made (patches are attached for both issues), so I'm marking this one as a dup of bug 155241.

*** This bug has been marked as a duplicate of bug 155241 ***