Part Number: J722SXH01EVM
Tool/software:
Hi,
I am trying to enable a new dummy CSI-2 sensor and unable to build the driver.
As described in the related question, I did the following:
- Add the sensor driver source code under drivers/media/i2c
- Add the sensor configuration in drivers/media/i2c/Kconfig
- Enable compilation of the sensor driver in drivers/media/i2c/Makefile
- Enable the kernel module for the sensor in arch/arm64/configs/defconfig
- Create a device tree overlay for the sensor and add it to arch/arm64/boot/dts/ti (updated formatting to match the other included sensors)
- Added the device tree overlay to arch/arm64/boot/dts/ti/Makefile.
The sensor shows up in the device tree, and CSI2 Rx seems to be properly probed.
root@j722s-evm:/proc/device-tree# ls | grep sensor sensor root@j722s-evm:/proc/device-tree# dmesg | grep csi2 [ 7.937727] platform sensor: Fixed dependency cycle(s) with /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000 [ 9.004053] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 2/4 lanes, 4 streams, external D-PHY
However, when I try to query the sensor, the sensor does not show up, Only the csi2rx.
root@j722s-evm:/proc/device-tree# v4l2-ctl --list-devices
TI-CSI2RX (platform:30102000.ticsi2rx):
/dev/media0
wave5-dec (platform:30210000.video-codec):
/dev/video0
/dev/video1
root@j722s-evm:/proc/device-tree# media-ctl -p
Media controller API version 6.6.32
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 6.6.32
Device topology
- entity 1: 30102000.ticsi2rx (7 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
- entity 9: cdns_csi2rx.30101000.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
Looking at the log after doing make linux, it seems like dummy-sensor.c is not being built (but the other drivers under media/i2c are):
... LD [M] drivers/media/i2c/ds90ub953.ko LD [M] drivers/media/i2c/ds90ub960.ko LD [M] drivers/media/i2c/imx219.ko LD [M] drivers/media/i2c/imx390.ko LD [M] drivers/media/i2c/imx412.ko LD [M] drivers/media/i2c/ov2312.ko LD [M] drivers/media/i2c/ov5640.ko LD [M] drivers/media/i2c/ov5645.ko LD [M] drivers/media/i2c/ox05b1s.ko ...
When comparing to the IMX219 driver, it seems like I'm adding the same changes to enable the dummy sensor, but for some reason the dummy sensor is getting skipped during make linux.
- I added typos in the driver code to see make linux would throw an error - it did not for dummy-sensor.c, but did for imx219.c
Questions
- What is causing the specific /media/i2c/ drivers above to be built while the other drivers defined in defconfig and Makefile are not?
- Why might cause the dummy sensor driver to be skipped?
Thank you,
Jin

