Hi all,
I am new to kernel development, and I found an old ASUS tinkerboard. I want to give it a second life with some fun projects.
The project I am building is another IP KVM, so I bought an HDMI to CSI module. After tinkering around for a while, I found I supplied the wrong clock for that module:
[ 8.469299] tc358743 2-000f: unsupported refclk rate: 50000000 Hz
[ 8.483069] kernel BUG at drivers/media/i2c/tc358743.c:593!
I have no idea about the clock value to put in the dts file, so I just copied some values from the ASUS kernel source.
From the driver code drivers/media/i2c/tc358743.c, it shows that there are only 3 valid clocks:
switch (state->pdata.refclk_hz) {
case 26000000:
case 27000000:
case 42000000:
...
default:
dev_err(dev, "unsupported refclk rate: %u Hz\n",
state->pdata.refclk_hz);
...
However, the clock values used in the dts file are some pre-defined macros:
# dts configuration
clocks = <&cru SCLK_VIP_OUT>;
# include/dt-bindings/clock/rk3288-cru.h that contains the `SCLK_VIP_OUT`
...
#define SCLK_CRYPTO 125
#define SCLK_MIPIDSI_24M 126
#define SCLK_VIP_OUT 127
...
I wonder if some folks have experience with the clock setting and can help me pick the correct value. Thank you.