Hi @KevinFFF,
Thank you for your prompt response.
Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?
I am using devkit for ORIN AGX with Jetson Linux 35.3.1 and JetPack 5.1.1.
Do you connect any I2C device on your board?
Yes. I have an I2C device with 0x27 address connected to MIPI Camera Board. I can detect already the device with the following command in user space:
i2cdetect -y -r 2
.
Is there tegra_profiler.h in your source?
Yes it is in the original position:
Jetson_Linux_R35.3.1\Linux_for_Tegra\sources\kernel\nvidia\include\linux\tegra_profiler.h
But when I added -DDEBUG to may make command it gives error. Otherwise no issue.
This is how I added DEBUG flag:
O_OPT+=(EXTRA_CFLAGS="-DDEBUG")
Have you just tried using pr_err
or pr_warn
to print debug messages?
They work. I replaced pr_debug with pr_crit to see the outputs in kernel-5.10/drivers/base/dd.c. Please see the attached log.
Besides, I am adding related part of my dummy final device-tree decompiled below. I added my mydevice to i2c@3180000 which is i2c2.
i2c@3180000 {
#address-cells = <0x1>;
#size-cells = <0x0>;
iommus = <0x2 0x4>;
dma-coherent;
compatible = "nvidia,tegra234-i2c";
reg = <0x0 0x3180000 0x0 0x100>;
...
tca6408@21 {
...
};
ov5693_c@36 {
...
};
mydevice@0x27 {
#address-cells = <0x1>;
#size-cells = <0x0>;
compatible = "mybrand,mytestdevice";
reg = <0x27>;
phandle = <0x38b>;
};
};
Here is the associated device driver:
static int mydevice_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
struct mydevice_priv *priv;
int ret;
printk(KERN_INFO "mydevice_probe: %i\n", __LINE__);
...
}
static const struct of_device_id mydevice_of_table[] = {
{ .compatible = "mybrand,mytestdevice" },
{ },
};
MODULE_DEVICE_TABLE(of, mydevice_of_table);
static struct i2c_driver mydevice_i2c_driver = {
.driver = {
.name = "mydevice",
.of_match_table = of_match_ptr(mydevice_of_table),
},
.probe_new = mydevice_probe,
.remove = mydevice_remove,
};
module_i2c_driver(mydevice_i2c_driver);
Please find attached the kernel log.
kernel_output.txt (134.4 KB)
Thanks in advance.