raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.1k stars 4.97k forks source link

brcmstb-i2c - not able to set clock frequency #6425

Open shubham9436 opened 1 day ago

shubham9436 commented 1 day ago

Describe the bug

I am trying to set the clock frequency of the i2c but unable to do so.

I have tried configuring the /boot/config.txt

dtparam=i2c_arm_baudrate=200000

When i reboot and execute the command dmesg | grep i2c , i get the following output only

[    1.953095] i2c_dev: i2c /dev entries driver
[    2.794760] brcmstb-i2c fef04500.i2c:  @97500hz registered in polling mode
[    2.800296] brcmstb-i2c fef09500.i2c:  @97500hz registered in polling mode

Steps to reproduce the behaviour

I have tried configuring the /boot/config.txt

dtparam=i2c_arm_baudrate=200000

Device (s)

Raspberry Pi CM4

System

cat /etc/rpi-issue Raspberry Pi reference 2024-07-04 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 3a42dcf411046ddac504378ad4852fcb34790218, stage2

vcgencmd version Oct 17 2024 11:34:50 Copyright (c) 2012 Broadcom version b580e2acde306434ab07a913745a21451643ff55 (clean) (release) (start)

uname -a Linux raspberrypi 6.6.56-v8+ #1805 SMP PREEMPT Tue Oct 15 20:05:09 BST 2024 aarch64 GNU/Linux

Logs

[ 1.953095] i2c_dev: i2c /dev entries driver [ 2.794760] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode [ 2.800296] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode

Additional context

No response

pelwell commented 21 hours ago

The I2C interfaces at addresses 0xfef04500 and 0xfef09500 are dedicated to the HDMI connectors - they are the control channels, used for reading the EDID etc. You get a hint that they aren't the normal I2C interfaces from i2cdetect:

~$ i2cdetect -l
i2c-20  i2c             fef04500.i2c                            I2C adapter
i2c-21  i2c             fef09500.i2c                            I2C adapter

The Device Tree file gives them high bus numbers to differentiate them from the general purpose interfaces.