Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2c_designware: controller timed out when DSI LCD is plugged in #5988

Closed
mozcelikors opened this issue Feb 26, 2024 · 3 comments
Closed

i2c_designware: controller timed out when DSI LCD is plugged in #5988

mozcelikors opened this issue Feb 26, 2024 · 3 comments

Comments

@mozcelikors
Copy link

mozcelikors commented Feb 26, 2024

Describe the bug

Hi,
I am working on a Yocto-based distro where I want to interface Pi 5 with Waveshare DSI 4.3 inch display. (Rev 2.1)
Unfortunately, so far wasn't able to get past the following backlight problem and somehow i2c controller looks timed out when I plug the module in:

[   44.778014] panel-simple 100000001.panel_disp: [drm:drm_panel_disable] failed to disable backlight: -110                                                                                                
[   45.828072] i2c_designware 1f00080000.i2c: controller timed out

It seems based on logs that at least DSI panel is recognized but this backlight / i2c_designware is the issue.

Since I dont have much Pi 5 specific knowledge I wanted to ask about you guys' opinions. What do you think the problem might be? I didn't try this in the default Raspbian OS but Waveshare website says it works with Pi 5.

DSI LCD seem to work on Bookworm (6.1.63), but when I compile kernel from here (6.1.74 or 6.1.77) it just doesn't work on a custom kernel. I am forgetting something for sure.

I would really appreciate if people with the knowledge could help here. Thanks in advance.

Steps to reproduce the behaviour

I am compiling raspberrypi kernel 6.1.77 from rpi-6.1.y branch where the last commits is with hash afd5f65.
Plugging in Waveshare DSI 4.3 Capacitive to the DSI1.

and set the following config:

enable_uart=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
dtoverlay=uart0-pi5                                                                                                                                                                                        
dtoverlay=vc4-kms-v3d
# tried both vc4-kms-v3d and vc4-kms-v3d-pi5                                                                                                                                                                                 
dtoverlay=vc4-kms-dsi-7inch                                                                                                                                                                                
max_usb_current=1                                                                                                                                                                                          
hdmi_group=2                                                                                                                                                                                               
hdmi_mode=87                                                                                                                                                                                               
hdmi_cvt 1024 600 60 6 0 0 0                                                                                                                                                                               
hdmi_drive=1

Device (s)

Raspberry Pi 5

System

raspberrypi kernel 6.1.77 from rpi-6.1.y branch where the last commits is with hash afd5f65.
Yocto-based custom distro
Linux raspberrypi5_custom 6.1.77-v8-16k #1 SMP PREEMPT Tue Feb 20 18:18:05 UTC 2024 aarch64 GNU/Linux

Logs

Here is the output of raspinfo (some of it):

root@raspberrypi5_custom:~# raspinfo

Linux raspberrypi5_custom 6.1.77-v8-16k #1 SMP PREEMPT Tue Feb 20 18:18:05 UTC 2024 aarch64 GNU/Linux
Revision        : c04170
Serial          : 751555830fbf9074
Model           : Raspberry Pi 5 Model B Rev 1.0
                                                                                                                                                                   
Display Information                                                                                                                                                                                        
-------------------                                                                                                                                                                                        
                                                                                                                                                                                                           
Running (F)KMS and X                                                                                                                                                                                       
                                                                                                                                                                                                           
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192                                                                                                                                       
HDMI-1 disconnected primary (normal left inverted right x axis y axis)                                                                                                                                     
...                                                                                                                                                                       
HDMI-2 disconnected (normal left inverted right x axis y axis)                                                                                                                                             
...                                                                                                                                                    
DSI-1-2 connected (normal left inverted right x axis y axis)                                                                                                                                               
        Identifier: 0x74                                                                                                                                                                                   
        Timestamp:  33591                                                                                                                                                                                  
        Subpixel:   unknown                                                                                                                                                                                
        Clones:                                                                                                                                                                                            
        CRTCs:      4                                                                                                                                                                                      
        Transform:  1.000000 0.000000 0.000000                                                                                                                                                             
                    0.000000 1.000000 0.000000                                                                                                                                                             
                    0.000000 0.000000 1.000000                                                                                                                                                             
                   filter:                                                                                                                                                                                 
        PRIME Synchronization: 1                                                                                                                                                                           
                supported: 0, 1                                                                                                                                                                            
        link-status: Good                                                                                                                                                                                  
                supported: Good, Bad                                                                                                                                                                       
        CONNECTOR_ID: 35                                                                                                                                                                                   
                supported: 35                                                                                                                                                                              
        non-desktop: 0                                                                                                                                                                                     
                range: (0, 1)                                                                                                                                                                              
  800x480 (0x76) 27.777MHz -HSync -VSync +preferred                                                                                                                                                        
        h: width   800 start  859 end  861 total  907 skew    0 clock  30.63KHz                                                                                                                            
        v: height  480 start  487 end  489 total  510           clock  60.05Hz                                                                                                                             
                                                                                                                                                                                                           
Connector 0 (32) HDMI-A-1 (disconnected)                                                                                                                                                                   
  Encoder 0 (31) TMDS                                                                                                                                                                                      
Connector 1 (42) HDMI-A-2 (disconnected)                                                                                                                                                                   
  Encoder 1 (41) TMDS                                                                                                                                                                                      
                                                                                                                                                                           
                                                                                                                                                                                                           
dmesg log                                                                                                                                                                                                  
---------                                                                                                                                                                                                  
...                                                                                                                                
[    2.280293] vc4-drm axi:gpu: bcm2712_iommu_of_xlate: MMU 1000005200.iommu                                                                                                                               
[    2.289125] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops)                                                                                                                                     
[    2.295646] sdhci-brcmstb 1000fff000.mmc: there is not valid maps for state default                                                                                                                     
[    2.295789] mmc1: CQHCI version 5.10                                                                                                                                                                    
[    2.307876] pl011-axi 1f00030000.serial: cts_event_workaround enabled                                                                                                                                   
[    2.308035] mmc0: CQHCI version 5.10                                                                                                                                                                    
[    2.314386] 1f00030000.serial: ttyAMA0 at MMIO 0x1f00030000 (irq = 126, base_baud = 0) is a PL011 AXI                                                                                                   
[    2.329255] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops)                                                                                                                                     
[    2.337589] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops)                                                                                                                                     
[    2.344207] of_cfs_init                                                                                                                                                                                 
[    2.346670] of_cfs_init: OK                                                                                                                                                                             
[    2.360085] mmc0: SDHCI controller on 1000fff000.mmc [1000fff000.mmc] using ADMA 64-bit                                                                                                                 
[    2.370059] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops)                                                                                                                                     
[    2.471436] mmc0: new ultra high speed SDR104 SDXC card at address aaaa                                                                                                                                 
[    2.478315] mmcblk0: mmc0:aaaa SD256 238 GiB                                                                                                                                                            
[    2.484046]  mmcblk0: p1 p2                                                                                                                                                                             
[    2.486927] mmcblk0: mmc0:aaaa SD256 238 GiB (quirks 0x00004000)                                                                                                                                        
[    2.494605] mmc1: SDHCI controller on 1001100000.mmc [1001100000.mmc] using ADMA 64-bit                                                                                                                 
[    2.507780] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops)                                                                                                                                     
[    2.528413] ALSA device list:                                                                                                                                                                           
[    2.531386]   No soundcards found.                                                                                                                                                                      
[    2.532968] vc4-drm axi:gpu: bound 107c580000.hvs (ops vc4_hvs_ops)                                                                                                                                     
[    2.542031] uart-pl011 107d001000.serial: no DMA platform data                                                                                                                                          
[    2.542805] mmc1: new ultra high speed DDR50 SDIO card at address 0001                                                                                                                                  
[    2.589581] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs                                                                                                                                          
[    2.595484] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.                                                                                                           
[    2.604058] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.                                                                                                                               
...                                                                                                                    
[    3.180353] vc4-drm axi:gpu: bound 107c501000.moplet (ops vc4_txp_ops)                                                                                                                                  
[    3.188665] edt_ft5x06 4-0038: supply iovcc not found, using dummy regulator                                                                                                                            
[    3.191175] cfg80211: Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'                                                                                                     
[    3.191376] cfg80211: Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'                                                                                             
[    3.191567] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'                                                                                                                                  
[    3.191756] cfg80211: Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'                                                                                                                
[    3.194670] vc4-drm axi:gpu: bound 107c410000.pixelvalve (ops vc4_crtc_ops)                                                                                                                             
[    3.210812] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2                                                                                                          
[    3.220622] vc4-drm axi:gpu: bound 107c411000.pixelvalve (ops vc4_crtc_ops)                                                                                                                             
[    3.227126] cfg80211: failed to load regulatory.db                                                                                                                                                      
[    3.235640] [drm] Initialized vc4 0.0.0 20140616 for axi:gpu on minor 0                                                                                                                                 
[    3.272573] vc4-drm axi:gpu: [drm] Cannot find any crtc or sizes                                                                                                                                        
[    3.281869] vc4-drm axi:gpu: [drm] Cannot find any crtc or sizes                                                                                                                                        
[    3.291105] vc4-drm axi:gpu: [drm] Cannot find any crtc or sizes                                                                                                                                        
[    3.324325] i2c_designware 1f00080000.i2c: i2c_dw_handle_tx_abort: lost arbitration                                                                                                                     
[    4.356072] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[    5.380086] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[    5.386146] drm-rp1-dsi 1f00130000.dsi: rp1dsi_host_attach: Attach DSI device name=tc358762 channel=0 lanes=1 format=0 flags=0x815 hs_rate=0 lp_rate=0                                                  
[    5.403316] [drm] Initialized drm-rp1-dsi 1.0.0 0 for 1f00130000.dsi on minor 1                                                                                                                         
[    5.414193] drm-rp1-dsi 1f00130000.dsi: [drm] rp1dsi: Nominal byte clock 72000000; scale by 4/12                                                                                                        
[    6.404074] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[    7.428072] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[    8.452073] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[    8.452084] edt_ft5x06 4-0038: touchscreen probe failed                                                                                                                                                 
[    9.476078] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   10.500071] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   11.524071] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   12.548070] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   12.656158] edt_ft5x06: probe of 4-0038 failed with error -110                                                                                                                                          
[   12.670107] pispbe 1000880000.pisp_be: bcm2712_iommu_of_xlate: MMU 1000005100.iommu                                                                                                                     
[   12.670243] pispbe 1000880000.pisp_be: pispbe_probe: HW version:  0x02252700                                                                                                                            
[   12.670244] pispbe 1000880000.pisp_be: pispbe_probe: BatchStatus: 0x00000000                                                                                                                            
[   12.670246] pispbe 1000880000.pisp_be: pispbe_probe: Status:      0x00000000                                                                                                                            
[   12.670247] pispbe 1000880000.pisp_be: Register nodes for group 0                                                                                                                                       
[   12.670425] pispbe 1000880000.pisp_be: input device node registered as /dev/video20                                                                                                                     
[   12.670549] pispbe 1000880000.pisp_be: tdn_input device node registered as /dev/video21                                                                                                                 
[   12.670604] pispbe 1000880000.pisp_be: stitch_input device node registered as /dev/video22                                                                                                              
[   12.670650] pispbe 1000880000.pisp_be: hog_output device node registered as /dev/video23                                                                                                                
[   12.670689] pispbe 1000880000.pisp_be: output0 device node registered as /dev/video24                                                                                                                   
[   12.670738] pispbe 1000880000.pisp_be: output1 device node registered as /dev/video25                                                                                                                   
[   12.670780] pispbe 1000880000.pisp_be: tdn_output device node registered as /dev/video26                                                                                                                
[   12.670829] pispbe 1000880000.pisp_be: stitch_output device node registered as /dev/video27                                                                                                             
[   12.670868] pispbe 1000880000.pisp_be: config device node registered as /dev/video28                                                                                                                    
[   12.671164] pispbe 1000880000.pisp_be: Register nodes for group 1                                                                                                                                       
[   12.672937] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.                                                                                            
[   12.674076] rpivid 1000800000.codec: bcm2712_iommu_of_xlate: MMU 1000005100.iommu                                                                                                                       
[   12.674178] pispbe 1000880000.pisp_be: input device node registered as /dev/video29                                                                                                                     
[   12.674288] pispbe 1000880000.pisp_be: tdn_input device node registered as /dev/video30                                                                                                                 
[   12.674335] pispbe 1000880000.pisp_be: stitch_input device node registered as /dev/video31                                                                                                              
[   12.674387] pispbe 1000880000.pisp_be: hog_output device node registered as /dev/video32                                                                                                                
[   12.674535] pispbe 1000880000.pisp_be: output0 device node registered as /dev/video33                                                                                                                   
[   12.674742] pispbe 1000880000.pisp_be: output1 device node registered as /dev/video34                                                                                                                   
[   12.674972] pispbe 1000880000.pisp_be: tdn_output device node registered as /dev/video35                                                                                                                
[   12.675041] pispbe 1000880000.pisp_be: stitch_output device node registered as /dev/video36                                                                                                             
[   12.675082] pispbe 1000880000.pisp_be: config device node registered as /dev/video37                                                                                                                    
[   12.683556] brcmfmac: F1 signature read @0x18000000=0x15264345                                                                                                                                          
[   12.684643] rpivid 1000800000.codec: Device registered as /dev/video19                                                                                                                                  
[   12.685116] Bluetooth: Core ver 2.22                                                                                                                                                                    
[   12.685579] NET: Registered PF_BLUETOOTH protocol family                                                                                                                                                
[   12.685584] Bluetooth: HCI device and connection manager initialized                                                                                                                                    
[   12.685600] Bluetooth: HCI socket layer initialized                                                                                                                                                     
[   12.685605] Bluetooth: L2CAP socket layer initialized                                                                                                                                                   
[   12.685614] Bluetooth: SCO socket layer initialized                                                                                                                                                     
[   12.687150] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6                                                                                                          
[   12.687386] usbcore: registered new interface driver brcmfmac                                                                                                                                           
[   12.687878] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.bin failed with error -2                                                                       
[   12.691080] Bluetooth: HCI UART driver ver 2.3                                                                                                                                                          
[   12.691094] Bluetooth: HCI UART protocol H4 registered                                                                                                                                                  
[   12.691119] Bluetooth: HCI UART protocol Three-wire (H5) registered                                                                                                                                     
[   12.691748] Bluetooth: HCI UART protocol Broadcom registered                                                                                                                                            
[   12.691802] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator                                                                                                                        
[   12.691844] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator                                                                                                                       
[   12.841323] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov  1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60                                                                
[   12.928811] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.                                                                                                                                          
[   13.028501] Bluetooth: hci0: BCM: chip id 107                                                                                                                                                           
[   13.028712] Bluetooth: hci0: BCM: features 0x2f                                                                                                                                                         
[   13.029803] Bluetooth: hci0: BCM4345C0                                                                                                                                                                  
[   13.029805] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000                                                                                                                                         
[   13.031015] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch                                                                                                                                       
[   13.716693] Bluetooth: hci0: BCM: features 0x2f                                                                                                                                                         
[   13.718081] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190                                                                                                                                      
[   13.718082] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382                                                                                                                                         
[   13.718400] Bluetooth: hci0: BCM: Using default device address (m.m.m.m)                                                                                                                                
[   13.892073] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   14.916070] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   15.940070] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   16.964077] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   17.988072] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   19.012071] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   20.036073] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   21.060071] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   22.084070] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   23.108074] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   23.108081] panel-simple 100000001.panel_disp: [drm:drm_panel_enable] failed to enable backlight: -110                                                                                                  
[   23.130737] Console: switching to colour frame buffer device 100x30                                                                                                                                     
[   23.653754] drm-rp1-dsi 1f00130000.dsi: [drm] fb0: drm-rp1-dsidrmf frame buffer device                                                                                                                  
[   23.668081] drm-rp1-dsi 1f00130000.dsi: rp1dsi_bind succeeded                                                                                                                                           
[   23.951422] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL)                                                                                
[   23.962393] macb 1f00100000.ethernet eth0: configuring for phy/rgmii-id link mode                                                                                                                       
[   23.976322] pps pps0: new PPS source ptp0                                                                                                                                                               
[   23.980373] macb 1f00100000.ethernet: gem-ptp-timer ptp clock registered.                                                                                                                               
[   28.069154] macb 1f00100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off                                                                                                                   
[   32.366551] NET: Registered PF_INET6 protocol family                                                                                                                                                    
[   32.371913] Segment Routing with IPv6                                                                                                                                                                   
[   32.375611] In-situ OAM (IOAM) with IPv6                                                                                                                                                                
[   33.832607] pl011-axi 1f00030000.serial: DMA channel TX dma2chan0                                                                                                                                       
[   33.838773] pl011-axi 1f00030000.serial: DMA channel RX dma2chan1                                                                                                                                       
[   35.556086] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   36.580087] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   37.604083] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   38.628072] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   39.652074] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   40.676070] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   41.700070] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   42.724072] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   43.748069] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   44.772069] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   44.778014] panel-simple 100000001.panel_disp: [drm:drm_panel_disable] failed to disable backlight: -110                                                                                                
[   45.828072] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   47.908085] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   48.932085] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   49.956076] i2c_designware 1f00080000.i2c: controller timed out                                                                                                                                         
[   50.980075] i2c_designware 1f00080000.i2c: controller timed out

Here is the output from i2cdetect -y 4 where DSI1 i2c should be:

root@raspberrypi5_custom:~# i2cdetect -y 4                                                                                                                                                                 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                                                                                                                                                        
00:                         -- -- -- -- -- -- -- --                                                                                                                                                        
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                                                        
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                                                        
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                                                        
40: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- --                                                                                                                                                        
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                                                        
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                                                        
70: -- -- -- -- -- -- -- --

Here are some extra kernel config options I am enabling:

CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_I2C=y
CONFIG_DRM_TOSHIBA_TC358762=y

Here is output from xrandr:

root@raspberrypi5_custom:~# export DISPLAY=:0.0                                                                                                                                                            
root@raspberrypi5_custom:~# xrandr                                                                                                                                                                         
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192                                                                                                                                       
HDMI-1 disconnected primary (normal left inverted right x axis y axis)                                                                                                                                     
HDMI-2 disconnected (normal left inverted right x axis y axis)                                                                                                                                             
DSI-1-2 connected (normal left inverted right x axis y axis)                                                                                                                                               
   800x480       60.05 + 

lsmod when the problem occurs:

root@raspberrypi5_custom:~# lsmod                                                                                                                                                                          
Module                  Size  Used by                                                                                                                                                                      
ipv6                  622592  18                                                                                                                                                                           
rpivid_hevc            81920  0                                                                                                                                                                            
pisp_be                65536  0                                                                                                                                                                            
v4l2_mem2mem           81920  1 rpivid_hevc                                                                                                                                                                
hci_uart               81920  0                                                                                                                                                                            
aes_ce_blk             65536  0                                                                                                                                                                            
brcmfmac              360448  0                                                                                                                                                                            
btbcm                  65536  1 hci_uart                                                                                                                                                                   
aes_ce_cipher          65536  1 aes_ce_blk                                                                                                                                                                 
edt_ft5x06             65536  0                                                                                                                                                                            
videobuf2_dma_contig    65536  2 pisp_be,rpivid_hevc                                                                                                                                                       
brcmutil               65536  1 brcmfmac                                                                                                                                                                   
spidev                 65536  0                                                                                                                                                                            
videobuf2_memops       65536  1 videobuf2_dma_contig                                                                                                                                                       
ghash_ce               65536  0                                                                                                                                                                            
videobuf2_v4l2         65536  3 pisp_be,rpivid_hevc,v4l2_mem2mem                                                                                                                                           
gf128mul               65536  1 ghash_ce                                                                                                                                                                   
videobuf2_common      114688  6 pisp_be,videobuf2_dma_contig,videobuf2_v4l2,rpivid_hevc,v4l2_mem2mem,videobuf2_memops                                                                                      
bluetooth             655360  3 hci_uart,btbcm                                                                                                                                                             
sha2_ce                65536  0                                                                                                                                                                            
sha256_arm64           65536  1 sha2_ce                                                                                                                                                                    
ecdh_generic           65536  1 bluetooth                                                                                                                                                                  
ecc                    81920  1 ecdh_generic                                                                                                                                                               
cfg80211              983040  1 brcmfmac                                                                                                                                                                   
sha1_ce                65536  0                                                                                                                                                                            
videodev              327680  5 pisp_be,videobuf2_v4l2,videobuf2_common,rpivid_hevc,v4l2_mem2mem                                                                                                           
v3d                   131072  0                                                                                                                                                                            
libaes                 65536  4 aes_ce_cipher,bluetooth,ghash_ce,aes_ce_blk                                                                                                                                
raspberrypi_hwmon      65536  0                                                                                                                                                                            
rfkill                 65536  2 bluetooth,cfg80211                                                                                                                                                         
gpu_sched             114688  1 v3d                                                                                                                                                                        
mc                     98304  6 videodev,pisp_be,videobuf2_v4l2,videobuf2_common,rpivid_hevc,v4l2_mem2mem                                                                                                  
i2c_brcmstb            65536  0                                                                                                                                                                            
spi_bcm2835            65536  0                                                                                                                                                                            
drm_rp1_dsi            65536  1                                                                                                                                                                            
drm_shmem_helper       65536  1 v3d                                                                                                                                                                        
i2c_designware_platform    65536  0                                                                                                                                                                        
rp1_adc                65536  0                                                                                                                                                                            
i2c_designware_core    65536  1 i2c_designware_platform                                                                                                                                                    
raspberrypi_gpiomem    65536  0                                                                                                                                                                            
gpio_keys              65536  0                                                                                                                                                                            
uio_pdrv_genirq        65536  0                                                                                                                                                                            
nvmem_rmem             65536  0                                                                                                                                                                            
uio                    65536  1 uio_pdrv_genirq  

lsmod from Bookworm when it actually works:

mozcelikors@raspberrypi:~ $ lsmod
Module                  Size  Used by
rfcomm                 81920  4
snd_seq_dummy          65536  0
snd_hrtimer            65536  1
snd_seq                98304  7 snd_seq_dummy
snd_seq_device         65536  1 snd_seq
algif_hash             65536  1
algif_skcipher         65536  1
af_alg                 65536  6 algif_hash,algif_skcipher
bnep                   65536  2
joydev                 65536  0
hci_uart               81920  0
btbcm                  65536  1 hci_uart
bluetooth             606208  33 hci_uart,btbcm,bnep,rfcomm
ecdh_generic           65536  2 bluetooth
aes_ce_blk             65536  4
aes_ce_cipher          65536  1 aes_ce_blk
brcmfmac              344064  0
ghash_ce               65536  0
gf128mul               65536  1 ghash_ce
sha2_ce                65536  0
rpivid_hevc            81920  0
ecc                    81920  1 ecdh_generic
brcmutil               65536  1 brcmfmac
sha256_arm64           65536  1 sha2_ce
binfmt_misc            65536  1
sha1_ce                65536  0
raspberrypi_hwmon      65536  0
libaes                 65536  4 aes_ce_cipher,bluetooth,ghash_ce,aes_ce_blk
pisp_be                65536  0
v4l2_mem2mem           81920  1 rpivid_hevc
videobuf2_dma_contig    65536  2 pisp_be,rpivid_hevc
edt_ft5x06             65536  0
videobuf2_memops       65536  1 videobuf2_dma_contig
cfg80211              966656  1 brcmfmac
videobuf2_v4l2         65536  3 pisp_be,rpivid_hevc,v4l2_mem2mem
videobuf2_common      114688  6 pisp_be,videobuf2_dma_contig,videobuf2_v4l2,rpivid_hevc,v4l2_mem2mem,videobuf2_memops
rfkill                 65536  6 bluetooth,cfg80211
videodev              311296  5 pisp_be,videobuf2_v4l2,videobuf2_common,rpivid_hevc,v4l2_mem2mem
mc                     98304  6 videodev,pisp_be,videobuf2_v4l2,videobuf2_common,rpivid_hevc,v4l2_mem2mem
raspberrypi_gpiomem    65536  0
rp1_adc                65536  0
nvmem_rmem             65536  0
uio_pdrv_genirq        65536  0
uio                    65536  1 uio_pdrv_genirq
i2c_dev                65536  0
fuse                  163840  5
dm_mod                180224  0
ip_tables              81920  0
x_tables               98304  1 ip_tables
ipv6                  589824  42
vc4                   409600  11
tc358762               65536  0
snd_soc_hdmi_codec     65536  2
spidev                 65536  0
rpi_panel_attiny_regulator    65536  5
regmap_i2c             65536  1 rpi_panel_attiny_regulator
drm_display_helper     65536  1 vc4
cec                    81920  1 vc4
drm_rp1_dsi            65536  5
drm_dma_helper         65536  2 drm_rp1_dsi,vc4
i2c_brcmstb            65536  0
snd_soc_core          294912  2 vc4,snd_soc_hdmi_codec
snd_compress           65536  1 snd_soc_core
drm_kms_helper        229376  7 drm_dma_helper,drm_rp1_dsi,vc4,tc358762
snd_pcm_dmaengine      65536  1 snd_soc_core
syscopyarea            65536  1 drm_kms_helper
sysfillrect            65536  1 drm_kms_helper
snd_pcm               163840  4 snd_soc_hdmi_codec,snd_compress,snd_soc_core,snd_pcm_dmaengine
v3d                   131072  7
spi_bcm2835            65536  0
gpio_keys              65536  0
sysimgblt              65536  1 drm_kms_helper
gpu_sched              98304  1 v3d
panel_simple          114688  0
drm_shmem_helper       65536  1 v3d
fb_sys_fops            65536  1 drm_kms_helper
snd_timer              81920  3 snd_seq,snd_hrtimer,snd_pcm
drm                   622592  27 gpu_sched,drm_kms_helper,panel_simple,drm_dma_helper,v3d,drm_rp1_dsi,vc4,tc358762,drm_shmem_helper,drm_display_helper
snd                   147456  9 snd_seq,snd_seq_device,snd_soc_hdmi_codec,snd_timer,snd_compress,snd_soc_core,snd_pcm
i2c_designware_platform    65536  0
drm_panel_orientation_quirks    65536  1 drm
i2c_designware_core    65536  1 i2c_designware_platform
backlight              65536  2 rpi_panel_attiny_regulator,drm

Additional context

No response

@6by9
Copy link
Contributor

6by9 commented Feb 26, 2024

You already have a discussion going on the forums over this - https://forums.raspberrypi.com/viewtopic.php?t=366281.

Please don't duplicate issues between the forums and Github, and certainly not without providing a link to the other discussion, otherwise you just waste other people's time.

@6by9 6by9 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@mozcelikors
Copy link
Author

Problem is fixed when Linux kernel is downgraded to 6.1.63 (official Bookworm kernel version that worked). I guess the fixes in i2c_designware that was introduced after 6.1.63 doesn't really get along with some of the devices.

@Tiger0215
Copy link

Problem is fixed when Linux kernel is downgraded to 6.1.63 (official Bookworm kernel version that worked). I guess the fixes in i2c_designware that was introduced after 6.1.63 doesn't really get along with some of the devices.

I encountered the same issue as you, and when I ran the fix by @pelwell, the problem was perfectly resolved:
"There's a PR (#6050) that may help with this issue. Similar failures are seen when the device fails to ACK data in time, and the PR changes the mark/space ratio on SCL to give the device longer to respond at any given clock speed.

You can install a trial, beta kernel containing the fix by running sudo rpi-update pulls/6050. Take care to back up any important data in your image before updating in case there is a regression."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants