Devicetree
 help / color / mirror / Atom feed
From: Danila Tikhonov <danila@mainlining.org>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>, Kate Hsuan <hpa@redhat.com>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Eugene Lepshy <fekz115@gmail.com>,
	 Vasiliy Doylov <neko@altlinux.org>,
	Achill Gilgenast <achill@achill.org>,
	 Luca Weiss <luca.weiss@fairphone.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 ~postmarketos/upstreaming@lists.sr.ht,
	 Danila Tikhonov <danila@mainlining.org>
Subject: [PATCH 4/4] arm64: dts: qcom: sm7325-nothing-spacewar: Add front camera support
Date: Wed, 05 Aug 2026 22:54:27 +0300	[thread overview]
Message-ID: <20260805-imx471-v1-4-7be79f539ed8@mainlining.org> (raw)
In-Reply-To: <20260805-imx471-v1-0-7be79f539ed8@mainlining.org>

Add and configure the necessary nodes to enable the front camera
(Sony IMX471), connected to CSIPHY 0.

Signed-off-by: Danila Tikhonov <danila@mainlining.org>
---
 arch/arm64/boot/dts/qcom/kodiak.dtsi               |  7 ++++
 .../boot/dts/qcom/sm7325-nothing-spacewar.dts      | 46 +++++++++++++++++++++-
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi
index f2da3706d5c8..9a66e65b2271 100644
--- a/arch/arm64/boot/dts/qcom/kodiak.dtsi
+++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi
@@ -5852,6 +5852,13 @@ tlmm: pinctrl@f100000 {
 			gpio-ranges = <&tlmm 0 0 175>;
 			wakeup-parent = <&pdc>;
 
+			cam_mclk0_default: cam-mclk0-default-state {
+				pins = "gpio64";
+				function = "cam_mclk";
+				drive-strength = <2>;
+				bias-disable;
+			};
+
 			cam_mclk3_default: cam-mclk3-default-state {
 				pins = "gpio67";
 				function = "cam_mclk";
diff --git a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
index 7db9ae1c3cef..272c56328686 100644
--- a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
+++ b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts
@@ -12,6 +12,7 @@
 #include <dt-bindings/iio/qcom,spmi-adc7-pm8350b.h>
 #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/media/video-interfaces.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include <dt-bindings/sound/qcom,q6afe.h>
@@ -831,6 +832,23 @@ vreg_bob: bob {
 	};
 };
 
+&camss {
+	vdda-phy-supply = <&vreg_l10c_0p88>;
+	vdda-pll-supply = <&vreg_l6b_1p2>;
+
+	status = "okay";
+
+	ports {
+		port@0 {
+			csiphy0_ep: endpoint {
+				data-lanes = <0 1 2 3>;
+				bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+				remote-endpoint = <&camera_imx471_ep>;
+			};
+		};
+	};
+};
+
 &cci0 {
 	/*
 	 * cci0_i2c1 bus is unused and GPIO 71&72 are repurposed.
@@ -843,7 +861,33 @@ &cci0 {
 };
 
 &cci0_i2c0 {
-	/* D-PHY sony,imx471 (Front) @ 0x1a */
+	camf_imx471: camera@1a {
+		compatible = "sony,imx471";
+		reg = <0x1a>;
+
+		vana-supply = <&vreg_camf_vana_2p8>;
+		vdig-supply = <&vreg_camf_vdig_1p1>;
+		vif-supply = <&vreg_cam_vio_1p8>;
+
+		clocks = <&camcc CAM_CC_MCLK0_CLK>;
+		assigned-clocks = <&camcc CAM_CC_MCLK0_CLK>;
+		assigned-clock-rates = <19200000>;
+
+		reset-gpios = <&tlmm 20 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&cam_mclk0_default>;
+		pinctrl-names = "default";
+
+		orientation = <0>; /* Front facing */
+		rotation = <270>;
+
+		port {
+			camera_imx471_ep: endpoint {
+				data-lanes = <1 2 3 4>;
+				link-frequencies = /bits/ 64 <200000000>;
+				remote-endpoint = <&csiphy0_ep>;
+			};
+		};
+	};
 
 	camf_p24c64f: eeprom@52 {
 		compatible = "puya,p24c64f",

-- 
2.55.0


      parent reply	other threads:[~2026-08-05 19:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 19:54 [PATCH 0/4] Add front-facing camera support for Nothing Phone (1) Danila Tikhonov
2026-08-05 19:54 ` [PATCH 1/4] dt-bindings: media: i2c: Add Sony IMX471 CMOS Image Sensor Danila Tikhonov
2026-08-06 10:33   ` Sakari Ailus
2026-08-05 19:54 ` [PATCH 2/4] drivers: media: i2c: imx471: Add vdig and vif power supplies Danila Tikhonov
2026-08-05 19:54 ` [PATCH 3/4] drivers: media: i2c: imx471: Add Device Tree matching support Danila Tikhonov
2026-08-05 20:37   ` sashiko-bot
2026-08-05 19:54 ` Danila Tikhonov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260805-imx471-v1-4-7be79f539ed8@mainlining.org \
    --to=danila@mainlining.org \
    --cc=achill@achill.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fekz115@gmail.com \
    --cc=hpa@redhat.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=mchehab@kernel.org \
    --cc=neko@altlinux.org \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox