
我使用了k3-j784s4-evm-csi2-ov5640.dtbo,启动后,使用lsmod查看,ov5640已正常加载上了,
但是使用devmem2读取dphy寄存器地址0x4504048出现内核panic。

除了0x04504048地址,我还尝试访问了0x4590B00, 0x04504040, 0x04504060, 0x04504100 等寄存器,均出现相同的panic。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

我使用了k3-j784s4-evm-csi2-ov5640.dtbo,启动后,使用lsmod查看,ov5640已正常加载上了,
但是使用devmem2读取dphy寄存器地址0x4504048出现内核panic。

除了0x04504048地址,我还尝试访问了0x4590B00, 0x04504040, 0x04504060, 0x04504100 等寄存器,均出现相同的panic。
# This uEnv.txt file can contain additional environment settings that you
# want to set in U-Boot at boot time. This can be simple variables such
# as the serverip or custom variables. The format of this file is:
# variable=value
# NOTE: This file will be evaluated after the bootcmd is run and the
# bootcmd must be set to load this file if it exists (this is the
# default on all newer U-Boot images. This also means that some
# variables such as bootdelay cannot be changed by this file since
# it is not evaluated until the bootcmd is run.
psdk_setup_file=.psdk_setup
check_psdk_setup=load mmc 1:1 ${loadaddr} ${psdk_setup_file}
# Reset to the default environment
do_psdk_setup=env default -f -a; saveenv
# Update the Linux hostname based on board_name
# The SK also requires an additional dtbo to boot. Prepend it to name_overlays depending on board_name
uenvcmd=printenv
# Setting the right U-Boot environment variables
dorprocboot=1
name_overlays=ti/k3-j784s4-evm-ethfw.dtbo ti/k3-j784s4-vision-apps.dtbo ti/k3-j784s4-evm-csi2-ov5640.dtbo // SPDX-License-Identifier: GPL-2.0
/*
* vision-apps: device-tree overlay
*
* Copyright (C) 2019 - 2022 Texas Instruments Incorporated - http://www.ti.com/
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/mux/ti-serdes.h>
&main_r5fss0_core0_shared_memory_queue_region {
status = "disabled";
};
&main_r5fss0_core0_shared_memory_bufpool_region {
status = "disabled";
};
#include "k3-j784s4-rtos-memory-map.dtsi"
&main_i2c1 {
status = "disabled";
};
&main_i2c4 {
status = "disabled";
};
&main_i2c5 {
status = "disabled";
};
&dss {
status = "disabled";
};
&serdes_wiz4 {
status = "disabled";
};
&ti_csi2rx0 {
status = "disabled";
};
&ti_csi2rx1 {
status = "disabled";
};
&ti_csi2rx2 {
status = "disabled";
};
Hi Ti,
demo 板启动后,lsmod查看如下,已经存在j721e_csi2rx,ov5640模块:
root@j784s4-evm:~# lsmod Module Size Used by overlay 139264 0 cfg80211 397312 0 bluetooth 503808 2 ecdh_generic 16384 1 bluetooth ecc 36864 1 ecdh_generic rfkill 28672 3 bluetooth,cfg80211 rpmsg_ctrl 12288 0 rpmsg_char 20480 1 rpmsg_ctrl panel_edp 32768 0 cdns_csi2rx 16384 1 ti_am335x_adc 16384 0 kfifo_buf 12288 1 ti_am335x_adc cdns3 40960 0 cdns_pltfrm 12288 0 cdns_usb_common 20480 1 cdns3 crct10dif_ce 12288 1 snd_soc_j721e_evm 28672 0 display_connector 12288 0 omap_mailbox 12288 11 omap_hwspinlock 12288 0 phy_can_transceiver 12288 3 at24 16384 0 ti_k3_r5_remoteproc 24576 0 j721e_csi2rx 24576 0 wave5 94208 0 ov5640 36864 0 videobuf2_dma_contig 16384 2 j721e_csi2rx,wave5 videobuf2_memops 12288 1 videobuf2_dma_contig v4l2_mem2mem 32768 1 wave5 snd_soc_davinci_mcasp 32768 2 k3_j72xx_bandgap 12288 0 v4l2_fwnode 20480 2 ov5640,cdns_csi2rx ... ..
我仍然在uEnv.txt使用如下环境变量启动的,此刻devmem2 0x04590B00 w仍然会出现panic.
Hi ti,
查看设备树文件,

主设备树文件中,如上所示:

k3-j784s4-evm-csi2-ov5640.dtso中对status进行了覆盖,改写为okay,
查找驱动文件,从compatible = "ti,j721e-csi2rx-shim";属性,在driver中找到对应的驱动文件为\board-support\ti-linux-kernel-6.6.44+git-ti\drivers\media\platform\ti\j721e-csi2rx\j721e-csi2rx.c,

板子起来后,lsmod查看,确实是加载了j721e_csi2rx.ko,以及ov5640.ko,

查看j721e-csi2rx.c,初始化过程中会注册v4l2设备"TI-CSI2RX",

板子起来后,查看v4l2设备
您好
请从 uEnv.txt 中删除"k3-j784s4-vision-apps.dtbo"、因为这会在 RTOS 端启用 csirx 和 DSS。 由于您使用的是 Linux、这将禁用 csirx 和 DSS。 进行此更改后、您是否可以共享 media-ctl -p 的输出?
root@j784s4-evm:~# media-ctl -p
Media controller API version 6.6.44
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:4520000.ticsi2rx
hw revision 0x1
driver version 6.6.44
Device topology
- entity 1: 4520000.ticsi2rx (9 pads, 0 link, 0 routes)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
pad1: Source
pad2: Source
pad3: Source
pad4: Source
pad5: Source
pad6: Source
pad7: Source
pad8: Source
- entity 11: cdns_csi2rx.4524000.csi-bridge (5 pads, 0 link, 0 routes)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
pad1: Source
pad2: Source
pad3: Source
pad4: Source
您好
这是完整的输出吗? 您在将器件树叠加添加到 uEnv.txt 之外是否对 SDK 进行了任何更改? 您是否连接了 LI OV5640 MIPI CSI 摄像头的传感器? 请查看 SDK 文档中的 CSI2RX 部分: 3.2.2.3. CSI2RX — Processor SDK Linux for J784s4 Documentation