From patchwork Sun May 22 16:28:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 575235 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56E26C4332F for ; Sun, 22 May 2022 16:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349773AbiEVQaA (ORCPT ); Sun, 22 May 2022 12:30:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349919AbiEVQ3N (ORCPT ); Sun, 22 May 2022 12:29:13 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1BE43BBC2; Sun, 22 May 2022 09:29:01 -0700 (PDT) Received: from g550jk.arnhem.chello.nl (a246182.upc-a.chello.nl [62.163.246.182]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id C260BCCD4C; Sun, 22 May 2022 16:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1653236900; bh=IgPmeXh7eVwr5HxZ2OomHFKNX8KpazVLkhoxxY0pExM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=c4i9i5n8jBgfDVKePplF1mJyCQ/ynI+kLQKvgP50y5sbU9Z1GPJ4G7mLcnnM7GTgB PpLG8h4PsyQxOiB4gL3hf4OMzvaZO3xtwgQEKbWVbnuvdRH3wE9xgAOtWoQUdEoIdk oDSbNoV9vWuSFXT1oSqjBubD2zua86FWq4HVTLlw= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Loic Poulain , Robert Foss , Rob Herring , Krzysztof Kozlowski , Todor Tomov , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, matti.lehtimaki@gmail.com, Luca Weiss Subject: [RFC PATCH 13/14] ARM: dts: qcom: msm8974-FP2: Add OV8865 rear camera Date: Sun, 22 May 2022 18:28:01 +0200 Message-Id: <20220522162802.208275-14-luca@z3ntu.xyz> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220522162802.208275-1-luca@z3ntu.xyz> References: <20220522162802.208275-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Configure the rear camera found in the 8MP camera module for Fairphone 2. There's also a AD5823 autofocus coil and an EEPROM present on the module but currently not included. Signed-off-by: Luca Weiss --- .../dts/qcom-msm8974pro-fairphone-fp2.dts | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts index 0fad82fc9e03..9a2c3a9177de 100644 --- a/arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts +++ b/arch/arm/boot/dts/qcom-msm8974pro-fairphone-fp2.dts @@ -77,6 +77,60 @@ &blsp1_uart2 { status = "okay"; }; +&camss { + status = "okay"; + + vdda-supply = <&pm8941_l12>; + + ports { + port@0 { + reg = <0>; + csiphy0_ep: endpoint { + clock-lanes = <1>; + data-lanes = <0 2 3 4>; + link-frequencies = /bits/ 64 <360000000>; + remote-endpoint = <&ov8865_ep>; + }; + }; + }; +}; + +&cci { + status = "okay"; +}; + +&cci_i2c0 { + ov8865: camera-sensor@10 { + compatible = "ovti,ov8865"; + reg = <0x10>; + + pinctrl-names = "default"; + pinctrl-0 = <&mclk0_pin_a>; + + clocks = <&mmcc CAMSS_MCLK0_CLK>; + + avdd-supply = <&pm8941_l17>; + dovdd-supply = <&pm8941_lvs3>; + dvdd-supply = <&pm8941_l3>; + + powerdown-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>; + reset-gpios = <&tlmm 90 GPIO_ACTIVE_LOW>; + + /* Rear camera */ + orientation = <1>; + rotation = <90>; + + port { + ov8865_ep: endpoint { + clock-lanes = <1>; + data-lanes = <0 2 3 4>; + link-frequencies = /bits/ 64 <360000000>; + remote-endpoint = <&csiphy0_ep>; + }; + }; + }; +}; + &dsi0 { status = "okay"; @@ -413,6 +467,15 @@ pm8941_l24: l24 { regulator-max-microvolt = <3075000>; regulator-boot-on; }; + + pm8941_lvs3: lvs3 { + /* + * TODO: Used as CCI0 and CCI1 pull-up. + * Replace with vbus-supply or similar once this lands + * upstream! + */ + regulator-always-on; + }; }; }; @@ -449,6 +512,13 @@ &smbb { }; &tlmm { + mclk0_pin_a: mclk0-pin-active { + pins = "gpio15"; + function = "cam_mclk0"; + drive-strength = <2>; + bias-disable; + }; + panel_pin: panel { te { pins = "gpio12";