mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Front camera enablement on Fairphone 5
@ 2026-03-13 16:00 Luca Weiss
  2026-03-13 16:00 ` [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins Luca Weiss
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Luca Weiss @ 2026-03-13 16:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vladimir Zapolskiy
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel, Luca Weiss

Since the Samsung S5KJN1 driver was upstreamed recently, we can enable
the camera upstream by adding a few bits to dts.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (3):
      arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins
      arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support
      arm64: defconfig: Enable S5KJN1 camera sensor

 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 128 +++++++++++++++------
 arch/arm64/configs/defconfig                       |   1 +
 2 files changed, 91 insertions(+), 38 deletions(-)
---
base-commit: 3daa4f5dc6cc1ac1ab2f95b5b4c16bc5fb87f48f
change-id: 20260313-fp5-s5kjn1-80a866aee261

Best regards,
-- 
Luca Weiss <luca.weiss@fairphone.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins
  2026-03-13 16:00 [PATCH 0/3] Front camera enablement on Fairphone 5 Luca Weiss
@ 2026-03-13 16:00 ` Luca Weiss
  2026-03-18 12:09   ` Konrad Dybcio
  2026-03-13 16:00 ` [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support Luca Weiss
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Luca Weiss @ 2026-03-13 16:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vladimir Zapolskiy
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel, Luca Weiss

As per DTS Coding Style, sort pinctrl subnodes by the "pins" property,
in preparation to add more pinctrl states.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 74 +++++++++++-----------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 455e5c9bb072..c9c24c36ba7e 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -1257,41 +1257,6 @@ &tlmm {
 	 */
 	gpio-reserved-ranges = <32 2>, <56 4>;
 
-	bluetooth_enable_default: bluetooth-enable-default-state {
-		pins = "gpio85";
-		function = "gpio";
-		output-low;
-		bias-disable;
-	};
-
-	disp_reset_n_active: disp-reset-n-active-state {
-		pins = "gpio44";
-		function = "gpio";
-		drive-strength = <8>;
-		bias-disable;
-	};
-
-	disp_reset_n_suspend: disp-reset-n-suspend-state {
-		pins = "gpio44";
-		function = "gpio";
-		drive-strength = <2>;
-		bias-pull-down;
-	};
-
-	hall_sensor_default: hall-sensor-default-state {
-		pins = "gpio155";
-		function = "gpio";
-		drive-strength = <2>;
-		bias-pull-up;
-	};
-
-	mdp_vsync: mdp-vsync-state {
-		pins = "gpio80";
-		function = "mdp_vsync";
-		drive-strength = <2>;
-		bias-pull-down;
-	};
-
 	pm8008_int_default: pm8008-int-default-state {
 		pins = "gpio25";
 		function = "gpio";
@@ -1345,9 +1310,17 @@ qup_uart7_sleep_rx: qup-uart7-sleep-rx-state {
 		bias-pull-up;
 	};
 
-	sw_ctrl_default: sw-ctrl-default-state {
-		pins = "gpio86";
+	disp_reset_n_active: disp-reset-n-active-state {
+		pins = "gpio44";
 		function = "gpio";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	disp_reset_n_suspend: disp-reset-n-suspend-state {
+		pins = "gpio44";
+		function = "gpio";
+		drive-strength = <2>;
 		bias-pull-down;
 	};
 
@@ -1359,12 +1332,39 @@ usb_redrive_1v8_en_default: usb-redrive-1v8-en-default-state {
 		output-high;
 	};
 
+	mdp_vsync: mdp-vsync-state {
+		pins = "gpio80";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	bluetooth_enable_default: bluetooth-enable-default-state {
+		pins = "gpio85";
+		function = "gpio";
+		output-low;
+		bias-disable;
+	};
+
+	sw_ctrl_default: sw-ctrl-default-state {
+		pins = "gpio86";
+		function = "gpio";
+		bias-pull-down;
+	};
+
 	aw86927_int_default: aw86927-int-default-state {
 		pins = "gpio101";
 		function = "gpio";
 		drive-strength = <2>;
 		bias-pull-up;
 	};
+
+	hall_sensor_default: hall-sensor-default-state {
+		pins = "gpio155";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
 };
 
 &uart5 {

-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support
  2026-03-13 16:00 [PATCH 0/3] Front camera enablement on Fairphone 5 Luca Weiss
  2026-03-13 16:00 ` [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins Luca Weiss
@ 2026-03-13 16:00 ` Luca Weiss
  2026-03-13 18:11   ` David Heidelberg
  2026-03-18 12:11   ` Konrad Dybcio
  2026-03-13 16:00 ` [PATCH 3/3] arm64: defconfig: Enable S5KJN1 camera sensor Luca Weiss
  2026-03-19  2:46 ` (subset) [PATCH 0/3] Front camera enablement on Fairphone 5 Bjorn Andersson
  3 siblings, 2 replies; 9+ messages in thread
From: Luca Weiss @ 2026-03-13 16:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vladimir Zapolskiy
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel, Luca Weiss

Add and configure the necessary nodes to enable the front camera
(Samsung S5KJN1), connected to CSIPHY 3.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 54 +++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index c9c24c36ba7e..f00a8f3e7f6e 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -12,6 +12,7 @@
 #include <dt-bindings/iio/qcom,spmi-adc7-pm7325.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,q6asm.h>
@@ -626,6 +627,24 @@ vreg_bob: bob {
 	};
 };
 
+&camss {
+	vdda-phy-supply = <&vreg_l10c>;
+	vdda-pll-supply = <&vreg_l6b>;
+
+	status = "okay";
+
+	ports {
+		port@3 {
+			csiphy3_ep: endpoint {
+				clock-lanes = <7>;
+				data-lanes = <0 1 2 3>;
+				bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
+				remote-endpoint = <&camera_s5kjn1_ep>;
+			};
+		};
+	};
+};
+
 &cci0 {
 	status = "okay";
 };
@@ -666,7 +685,33 @@ &cci1 {
 };
 
 &cci1_i2c1 {
-	/* S5KJN1SQ03 @ 10 */
+	camera@10 {
+		compatible = "samsung,s5kjn1";
+		reg = <0x10>;
+
+		vddio-supply = <&vreg_l6p>;
+		vddd-supply = <&vreg_l2p>;
+		vdda-supply = <&vreg_l3p>;
+
+		clocks = <&camcc CAM_CC_MCLK3_CLK>;
+		assigned-clocks = <&camcc CAM_CC_MCLK3_CLK>;
+		assigned-clock-rates = <24000000>;
+
+		reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&cam_mclk3_default>;
+		pinctrl-names = "default";
+
+		orientation = <0>; /* Front facing */
+		rotation = <270>;
+
+		port {
+			camera_s5kjn1_ep: endpoint {
+				data-lanes = <1 2 3 4>;
+				link-frequencies = /bits/ 64 <700000000>;
+				remote-endpoint = <&csiphy3_ep>;
+			};
+		};
+	};
 
 	eeprom@51 {
 		compatible = "giantec,gt24p128f", "atmel,24c128";
@@ -1332,6 +1377,13 @@ usb_redrive_1v8_en_default: usb-redrive-1v8-en-default-state {
 		output-high;
 	};
 
+	cam_mclk3_default: cam-mclk3-default-state {
+		pins = "gpio67";
+		function = "cam_mclk";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
 	mdp_vsync: mdp-vsync-state {
 		pins = "gpio80";
 		function = "mdp_vsync";

-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] arm64: defconfig: Enable S5KJN1 camera sensor
  2026-03-13 16:00 [PATCH 0/3] Front camera enablement on Fairphone 5 Luca Weiss
  2026-03-13 16:00 ` [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins Luca Weiss
  2026-03-13 16:00 ` [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support Luca Weiss
@ 2026-03-13 16:00 ` Luca Weiss
  2026-03-13 17:18   ` Dmitry Baryshkov
  2026-03-19  2:46 ` (subset) [PATCH 0/3] Front camera enablement on Fairphone 5 Bjorn Andersson
  3 siblings, 1 reply; 9+ messages in thread
From: Luca Weiss @ 2026-03-13 16:00 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vladimir Zapolskiy
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel, Luca Weiss

Enable the S5KJN1 driver which is used for the front camera on the
Fairphone 5 smartphone.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index b67d5b1fc45b..0457618a38d6 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -943,6 +943,7 @@ CONFIG_VIDEO_IMX219=m
 CONFIG_VIDEO_IMX412=m
 CONFIG_VIDEO_OV5640=m
 CONFIG_VIDEO_OV5645=m
+CONFIG_VIDEO_S5KJN1=m
 CONFIG_DRM=m
 CONFIG_DRM_I2C_NXP_TDA998X=m
 CONFIG_DRM_HDLCD=m

-- 
2.53.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] arm64: defconfig: Enable S5KJN1 camera sensor
  2026-03-13 16:00 ` [PATCH 3/3] arm64: defconfig: Enable S5KJN1 camera sensor Luca Weiss
@ 2026-03-13 17:18   ` Dmitry Baryshkov
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Baryshkov @ 2026-03-13 17:18 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Vladimir Zapolskiy, ~postmarketos/upstreaming,
	phone-devel, linux-arm-msm, devicetree, linux-kernel

On Fri, Mar 13, 2026 at 05:00:40PM +0100, Luca Weiss wrote:
> Enable the S5KJN1 driver which is used for the front camera on the
> Fairphone 5 smartphone.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>  arch/arm64/configs/defconfig | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support
  2026-03-13 16:00 ` [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support Luca Weiss
@ 2026-03-13 18:11   ` David Heidelberg
  2026-03-18 12:11   ` Konrad Dybcio
  1 sibling, 0 replies; 9+ messages in thread
From: David Heidelberg @ 2026-03-13 18:11 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy
  Cc: phone-devel, linux-arm-msm, devicetree, linux-kernel

On 13/03/2026 17:00, Luca Weiss wrote:

[...]

> @@ -1332,6 +1377,13 @@ usb_redrive_1v8_en_default: usb-redrive-1v8-en-default-state {
>   		output-high;
>   	};
>   
> +	cam_mclk3_default: cam-mclk3-default-state {

Maybe master clock states could be added architecture wide to kodiak.dtsi as 
done in [1]?

[1] https://lore.kernel.org/all/20260114-sdm845-mclk-v3-1-c9351deaf4f2@ixit.cz/

> +		pins = "gpio67";
> +		function = "cam_mclk";
> +		drive-strength = <2>;
> +		bias-disable;
> +	};
> +
>   	mdp_vsync: mdp-vsync-state {
>   		pins = "gpio80";
>   		function = "mdp_vsync";
> 

-- 
David Heidelberg


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins
  2026-03-13 16:00 ` [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins Luca Weiss
@ 2026-03-18 12:09   ` Konrad Dybcio
  0 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2026-03-18 12:09 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel

On 3/13/26 5:00 PM, Luca Weiss wrote:
> As per DTS Coding Style, sort pinctrl subnodes by the "pins" property,
> in preparation to add more pinctrl states.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support
  2026-03-13 16:00 ` [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support Luca Weiss
  2026-03-13 18:11   ` David Heidelberg
@ 2026-03-18 12:11   ` Konrad Dybcio
  1 sibling, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2026-03-18 12:11 UTC (permalink / raw)
  To: Luca Weiss, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vladimir Zapolskiy
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel

On 3/13/26 5:00 PM, Luca Weiss wrote:
> Add and configure the necessary nodes to enable the front camera
> (Samsung S5KJN1), connected to CSIPHY 3.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---

[...]

> +	cam_mclk3_default: cam-mclk3-default-state {
> +		pins = "gpio67";
> +		function = "cam_mclk";
> +		drive-strength = <2>;
> +		bias-disable;
> +	};

-> soc dtsi

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: (subset) [PATCH 0/3] Front camera enablement on Fairphone 5
  2026-03-13 16:00 [PATCH 0/3] Front camera enablement on Fairphone 5 Luca Weiss
                   ` (2 preceding siblings ...)
  2026-03-13 16:00 ` [PATCH 3/3] arm64: defconfig: Enable S5KJN1 camera sensor Luca Weiss
@ 2026-03-19  2:46 ` Bjorn Andersson
  3 siblings, 0 replies; 9+ messages in thread
From: Bjorn Andersson @ 2026-03-19  2:46 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Vladimir Zapolskiy, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
	devicetree, linux-kernel


On Fri, 13 Mar 2026 17:00:37 +0100, Luca Weiss wrote:
> Since the Samsung S5KJN1 driver was upstreamed recently, we can enable
> the camera upstream by adding a few bits to dts.
> 
> 

Applied, thanks!

[3/3] arm64: defconfig: Enable S5KJN1 camera sensor
      commit: 48847fea51194edeff7f475f8decba9b2ea95800

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-19  2:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-13 16:00 [PATCH 0/3] Front camera enablement on Fairphone 5 Luca Weiss
2026-03-13 16:00 ` [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Sort pinctrl nodes by pins Luca Weiss
2026-03-18 12:09   ` Konrad Dybcio
2026-03-13 16:00 ` [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add front camera support Luca Weiss
2026-03-13 18:11   ` David Heidelberg
2026-03-18 12:11   ` Konrad Dybcio
2026-03-13 16:00 ` [PATCH 3/3] arm64: defconfig: Enable S5KJN1 camera sensor Luca Weiss
2026-03-13 17:18   ` Dmitry Baryshkov
2026-03-19  2:46 ` (subset) [PATCH 0/3] Front camera enablement on Fairphone 5 Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®