Questions regarding the camera "badge"

Currently, I get the “badge” information under “/sys/firmware/devicetree/base/tegra-camera-platform/modules/”. For example, if I want to get the “badge” information for port 1, I will check “/sys/firmware/devicetree/base/tegra-camera-platform/modules/module0/badge”.

My questions are:

  1. Is this path the same across all Jetson platforms, such as Orin, NX and etc.?
  2. How potable is this path? Let’s say, you change the Linux kernel, will this path change?
  3. Is there a better way to get the camera device based on the port which it connects to? I see examples using the index. Is the index corresponding to the port number? For example, for port [1, 6], the port 1 has the index 0 and the port 2 has the index 1?

Thanks a lot!

hello suchao,

>>Q1
yes, it uses the same path, please check below as well.

>>Q2
it is a node within sensor device tree. as you can see in the reference camera driver.
for example,

/ {
	tegra-camera-platform {
		modules {
			module0 {
				badge = "imx274_bottom_A6V26";

>>Q3

may I know what’s the actual use-case?
please check developer guide, Module Properties as see-also.
there’s position property which is used to identifying the camera position in the system.

I am trying to get the camera device corresponding to the port number. Currently, I use the port number to get the badge string. Then I go over all camera devices which I got from the camera provider and compare the badge from the camera property. If they match, then I get the correct camera device.

For example, if I want to get the camera device which connects to port 1, the first port. Then I go to the path and find the badge file content under “module0” directory. From the camera provider, I get all camera devices and compare the badge from the camera property from each camera device with the badge file content which I find in that path. If they match, then I find the correct camera device.

From your answer of the 3rd question, do you mean I can use " getSensorPlacement()" function of the ICameraProperties? If I want to get the camera device connected to port 1, will this function return “1”?

hello suchao,

so… you’re looking for an approach to maps the camera connections to your SW nodes.
normally, there’s also camera node definition rules it related to CSI port.
as you can see… it’s dual-cam definition with two IMX274, which using CSI-A (imx274_a) and CSI-C (imx274_c).
in the middle of badge property, it contains the position property naming…
for instance,

modules {
	module0 {
		badge = "imx274_bottom_A6V26";
		position = "bottom";
		drivernode0 {
			proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@0/imx274_a@1a";


	module1 {
		badge = "imx274_top_A6V26";
		position = "top";
		drivernode0 {
			proc-device-tree = "/proc/device-tree/i2c@3180000/tca9546@70/i2c@1/imx274_c@1a";

furthermore, getSensorPlacement() API it checks and return position property.
for example,
in a three-camera system: bottom , top , and center. camera sensor placement will shows 0, 1, 2 as a result.

So “position” cannot be used to identify a camera device. Then what can I use to identify a camera device?

Or is there a better way to identify the camera device other than parsing the badge?

Let’s say, I have two cameras. One is connected to CSI port 0 and the other is connected to CSI port 7. After I get the camera device vector from the camera provider, how can I identify which camera device is corresponding to which CSI port?

as mentioned above.
you may see-also camera node definition rules it related to CSI port.