Skip to contentSkip to conversation

arm64: dts: ti: k3-am62x-sk: Add orientation to IMX219 sensor node

PATCH In review Thorsten Lannynd 3 participants 3 messages Nov 5

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: ti: k3-am62x-sk: Add orientation to IMX219 sensor node

The IMX219 CSI2 expansion module is externally attached. Without the orientation property, V4L2_CID_CAMERA_ORIENTATION (0x009a0922) is not exposed and libcamera fails with:

ERROR CameraSensor camera_sensor_raw.cpp:465 'imx219 4-0010':
Mandatory V4L2 control 0x009a0922 not available

Set orientation = <MEDIA_ORIENTATION_EXTERNAL> to fix this.

---
v2:
- Use MEDIA_ORIENTATION_EXTERNAL instead of <2> (Kieran Bingham)
- Add #include <dt-bindings/media/video-interface-devices.h>

 arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso +2 -0
index 149c59c07182..70c2a197f1dd 100644
@@ -8,6 +8,7 @@
 /plugin/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/media/video-interface-devices.h>
 
 &{/} {
 	clk_imx219_fixed: imx219-xclk {
@@ -72,6 +73,7 @@ ov5640: camera@10 {
 				VDDL-supply = <&reg_1p2v>;
 
 				reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
+				orientation = <MEDIA_ORIENTATION_EXTERNAL>;
 
 				port {
 					csi2_cam0: endpoint {
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw

Quoting Thorsten Lannynd (2026-11-05 03:32:24)

Quoted 10 lines

The IMX219 CSI2 expansion module is externally attached. Without the orientation property, V4L2_CID_CAMERA_ORIENTATION (0x009a0922) is not exposed and libcamera fails with:

ERROR CameraSensor camera_sensor_raw.cpp:465 'imx219 4-0010':
Mandatory V4L2 control 0x009a0922 not available

Set orientation = <MEDIA_ORIENTATION_EXTERNAL> to fix this.

Quoted 31 lines

---
v2:
- Use MEDIA_ORIENTATION_EXTERNAL instead of <2> (Kieran Bingham)
- Add #include <dt-bindings/media/video-interface-devices.h>

 arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso +2 -0
index 149c59c07182..70c2a197f1dd 100644
@@ -8,6 +8,7 @@
 /plugin/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/media/video-interface-devices.h>
 
 &{/} {
        clk_imx219_fixed: imx219-xclk {
@@ -72,6 +73,7 @@ ov5640: camera@10 {
                                VDDL-supply = <&reg_1p2v>;
 
                                reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
+                               orientation = <MEDIA_ORIENTATION_EXTERNAL>;
 
                                port {
                                        csi2_cam0: endpoint {
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#2 lore raw
In reply to Thorsten Lannynd

Hi Thorsten,

Thank you for the patch.

Quoting Thorsten Lannynd (2026-11-05 09:02:24)

Quoted 10 lines

The IMX219 CSI2 expansion module is externally attached. Without the orientation property, V4L2_CID_CAMERA_ORIENTATION (0x009a0922) is not exposed and libcamera fails with:

ERROR CameraSensor camera_sensor_raw.cpp:465 'imx219 4-0010':
Mandatory V4L2 control 0x009a0922 not available

Set orientation = <MEDIA_ORIENTATION_EXTERNAL> to fix this.

Thanks,
Jai

Quoted 31 lines

---
v2:
- Use MEDIA_ORIENTATION_EXTERNAL instead of <2> (Kieran Bingham)
- Add #include <dt-bindings/media/video-interface-devices.h>

 arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso +2 -0
index 149c59c07182..70c2a197f1dd 100644
@@ -8,6 +8,7 @@
 /plugin/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/media/video-interface-devices.h>
 
 &{/} {
        clk_imx219_fixed: imx219-xclk {
@@ -72,6 +73,7 @@ ov5640: camera@10 {
                                VDDL-supply = <&reg_1p2v>;
 
                                reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
+                               orientation = <MEDIA_ORIENTATION_EXTERNAL>;
 
                                port {
                                        csi2_cam0: endpoint {
Signature · 1 line
2.34.1