From 63ede72498fdb55584228f62a27c7564a9bd3289 Mon Sep 17 00:00:00 2001
From: Arnav Singh <me@arnavion.dev>
Date: Mon, 6 May 2024 16:36:06 -0700
Subject: arm64: dts: sun50i: Define orientation and rotation for PinePhone
 front 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 1a57720c25ef..f0f1367c5868 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -593,6 +593,9 @@ gc2145: front-camera@3c {
 		reset-gpios = <&pio 4 16 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE16 */
 		enable-gpios = <&pio 4 17 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; /* PE17 */
 
+		orientation = <0>;
+		rotation = <90>;
+
 		port {
 			gc2145_ep: endpoint {
 				remote-endpoint = <&csi_gc2145_ep>;
-- 
2.35.3

