From f786198976ebb1b98e29660aad376d058ff63bc3 Mon Sep 17 00:00:00 2001
From: Arnav Singh <me@arnavion.dev>
Date: Mon, 6 May 2024 16:36:04 -0700
Subject: [PATCH 191/480] arm64: dts: sun50i: Define orientation and rotation
 for PinePhone rear camera

This enables libcamera to detect the correct orientation from
the device tree and propagate it further to e.g. Pipewire.

Signed-off-by: Arnav Singh <me@arnavion.dev>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index e7e90e5baff4..1a57720c25ef 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -617,6 +617,9 @@
 		reset-gpios = <&pio 3 3 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PD3 */
 		powerdown-gpios = <&pio 2 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PC0 */
 
+		orientation = <1>;
+		rotation = <270>;
+
 		port {
 			ov5640_ep: endpoint {
 				remote-endpoint = <&csi_ov5640_ep>;
-- 
2.49.0

