From patchwork Tue May 24 14:02:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12860221 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 05D5EC43217 for ; Tue, 24 May 2022 14:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbiEXOCS (ORCPT ); Tue, 24 May 2022 10:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238073AbiEXOCO (ORCPT ); Tue, 24 May 2022 10:02:14 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A36E541F81 for ; Tue, 24 May 2022 07:02:13 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id p189so10666905wmp.3 for ; Tue, 24 May 2022 07:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5mhXJbAqcgTA4KWN8H8AXnpke49ZRdi4wrpj76K6Kgc=; b=G4IYSvljgIaJ8D7CbXZ8ZTGNlBhC8ZJEkiFFe4/VgEZ4ayxT9sz/RUrl+u+mGqF6D7 pX+r4VIucEoGZ+xWS5l71vorfyTLIRDipriFyM7i08So4Po/MDdKVnLoHm0W3MF7d2Ja 8286NQ7ZOwCXSTklo9hRhkdd5b1DWPy55Tj6sDAn7W6jFeHYHC8hS/NBUVkBtiBvGZa7 kFKvZK8tWbOsCjcUIqhng4VhdIrW2mXtqFYEHaOFHlwkEqUdVS/SyHkplXO3bQ6BILAX tN85jZ6H5Yd/lLpipDHEItXggB1uewAL6vm4ew3kold8e3q9Lt1U+XCEUy9e6wN9pcBg sfqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5mhXJbAqcgTA4KWN8H8AXnpke49ZRdi4wrpj76K6Kgc=; b=WbM1yAj8E0v3cKrt4nsqlvhEnIb18vBTEXimj51zOo9BIj8oz8EV2m0mnIqHGwzFNZ NuvaVSyWbodhTSc1lCdklbXMgCogdgNYJWdgszwhVPFQAez76gUv+RlPjMdBEloQZbSJ HpTvdGgktq0D+LyfwzKUXXjbj1X5wpx8ES0nmSJUF/XrMJxqpRho7j0URYSNOZD868BS ZkD+9GTAa8uOQCqlLb3Qxk0OvDN5usZgQY/KN8Dl4swtGJCjLkRTsk8Lqz5knB4uzFI6 aZTC6NxbWOIIceARvKbjggHoFzOvsVSfizszWXMNr9/dbUizweBrmJW5Ogmm2q+gUpvr dL/A== X-Gm-Message-State: AOAM531M3G8pB82wCp4YMjB1Nt7HhlHEPWdGZ0yOxXGyWYrxC8+zxZ/k d8CP5kBEsaURxT/1FlYQC1c5mA== X-Google-Smtp-Source: ABdhPJxGjXM5D1+3NyM22sjywl+lIjmmgPdGLTImyxax0NR8FmreG4ZYBqLqU8ZJPz38USbY0UUT/Q== X-Received: by 2002:a05:600c:4fcc:b0:397:5a83:fac5 with SMTP id o12-20020a05600c4fcc00b003975a83fac5mr3435937wmq.107.1653400931852; Tue, 24 May 2022 07:02:11 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id f9-20020adfc989000000b0020c5253d8e0sm12829030wrh.44.2022.05.24.07.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 07:02:11 -0700 (PDT) From: Bryan O'Donoghue To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: vladimir.zapolskiy@linaro.org, mchehab@kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, mmitkov@quicinc.com, jgrahsl@snap.com, hfink@snap.com, Bryan O'Donoghue Subject: [PATCH v2 1/4] i2c: qcom-cci: Fix ordering of pm_runtime_xx and i2c_add_adapter Date: Tue, 24 May 2022 15:02:04 +0100 Message-Id: <20220524140207.2758605-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> References: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When we compile-in the CCI along with the imx412 driver and run on the RB5 we see that i2c_add_adapter() causes the probe of the imx412 driver to happen. This probe tries to perform an i2c xfer() and the xfer() in i2c-qcom-cci.c fails on pm_runtime_get() because the i2c-qcom-cci.c::probe() function has not completed to pm_runtime_enable(dev). Fix this sequence by ensuring pm_runtime_xxx() calls happen prior to adding the i2c adapter. Fixes: e517526195de ("i2c: Add Qualcomm CCI I2C driver") Reported-by: Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue Reviewed-by: Vladimir Zapolskiy Tested-by: Vladimir Zapolskiy --- drivers/i2c/busses/i2c-qcom-cci.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c index 5c7cc862f08f..90d02effeae9 100644 --- a/drivers/i2c/busses/i2c-qcom-cci.c +++ b/drivers/i2c/busses/i2c-qcom-cci.c @@ -638,6 +638,11 @@ static int cci_probe(struct platform_device *pdev) if (ret < 0) goto error; + pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC); + pm_runtime_use_autosuspend(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + for (i = 0; i < cci->data->num_masters; i++) { if (!cci->master[i].cci) continue; @@ -649,14 +654,13 @@ static int cci_probe(struct platform_device *pdev) } } - pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC); - pm_runtime_use_autosuspend(dev); - pm_runtime_set_active(dev); - pm_runtime_enable(dev); - return 0; error_i2c: + pm_runtime_put(dev); + pm_runtime_disable(dev); + pm_runtime_dont_use_autosuspend(dev); + for (--i ; i >= 0; i--) { if (cci->master[i].cci) { i2c_del_adapter(&cci->master[i].adap); From patchwork Tue May 24 14:02:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12860222 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 2A635C433F5 for ; Tue, 24 May 2022 14:02:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238092AbiEXOCW (ORCPT ); Tue, 24 May 2022 10:02:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238071AbiEXOCR (ORCPT ); Tue, 24 May 2022 10:02:17 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136733FBCA for ; Tue, 24 May 2022 07:02:15 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id e2so14247762wrc.1 for ; Tue, 24 May 2022 07:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sgUjeNlYCE2nYrQ7xP8GeK8Sj5Es/x6D2DUJducPl+M=; b=ULzV1Hc8Tsz7s8NR1qeuBqJZjnNMjGDsSk1eh67MSsDYWMG8uAWOUMzkGnIi9gLEqW aGx3UOuXgJXBr6Vq70q9DqLuFprSw+U/2Wbl5OuTdAxylt6/r9cz2HL+eh9Xq8RX52C+ p3GCYt4Fd1D2rti++gjT8J+qNF9awwCgu0Pm4D4ccrgYiXTF8OXAe+hyYKG5nyYB/v5g i2pGMs30/9plGElLHTRf9/rWOVbWfb2avMYoF8l/PsOa6doETPXO7bZBpV/O+6xgWBYs K01xufFo6SGSET0vnshmGF1XrlTdZiwtt+JKtT6zgX9lkpGISin62Jc4GpIy2PUUZz9D 4neA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sgUjeNlYCE2nYrQ7xP8GeK8Sj5Es/x6D2DUJducPl+M=; b=xJIbAgj07zkdvz+1fAvgMMR8dFUIcMd9Nz9trq7cGOZgxGjKe6HeMwO36NOyUFcXMl pLhUejjL0LjnXZQoYVV314xsCGalUTPEnaj0A2owaNMzdqYnenMeHQSEjKyPj4EOCCAu ISaa6KJiXsAz7ydhzKHk+T63BNZf6MCTSybSWz52wwmAklniTscO+itGtb8w/Zi2T4a/ tBXmhy99DFCl1qRLo+6rcrRaYFffqaLrEi9ji1vLTB5WuP18B4QU8W9DFRl6Cie61JzE UkgOe9qJWIuQqc5Yz2BOt7kHCoh0hft9jivqQRbPoa4alZDfkfn/HdsKx3pMJ2rQ33np OA4g== X-Gm-Message-State: AOAM5309/OjD2gLAo6t97B8nObv1V1ptsif3lF2Lkh+PduEI5wF0ZQpK Xd4zl/xEhxEqCIeGTLaCiize9Q== X-Google-Smtp-Source: ABdhPJyAzPo3Qyl20Ytz0mMvnvs68j4Zrn+qxWtypGt2QO0yt6mFQJz/zTX/wgyb7luUvzEQuf4FoQ== X-Received: by 2002:a5d:4529:0:b0:20d:1108:8d76 with SMTP id j9-20020a5d4529000000b0020d11088d76mr23186161wra.60.1653400933501; Tue, 24 May 2022 07:02:13 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id f9-20020adfc989000000b0020c5253d8e0sm12829030wrh.44.2022.05.24.07.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 07:02:12 -0700 (PDT) From: Bryan O'Donoghue To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: vladimir.zapolskiy@linaro.org, mchehab@kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, mmitkov@quicinc.com, jgrahsl@snap.com, hfink@snap.com, Bryan O'Donoghue Subject: [PATCH v2 2/4] arm64: dts: qcom: sm8250: Disable camcc by default Date: Tue, 24 May 2022 15:02:05 +0100 Message-Id: <20220524140207.2758605-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> References: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Vladimir Zapolskiy At the moment there are no changes in SM8250 board files, which require camera clock controller to run, whenever it is needed for a particular board, the status of camcc device node will be changed in a board file. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index cf0c97bd5ad3..2bc11cad3a44 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3407,6 +3407,7 @@ camcc: clock-controller@ad00000 { clock-names = "iface", "bi_tcxo", "bi_tcxo_ao", "sleep_clk"; power-domains = <&rpmhpd SM8250_MMCX>; required-opps = <&rpmhpd_opp_low_svs>; + status = "disabled"; #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>; From patchwork Tue May 24 14:02:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12860223 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 6727AC433FE for ; Tue, 24 May 2022 14:02:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238080AbiEXOCX (ORCPT ); Tue, 24 May 2022 10:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238081AbiEXOCR (ORCPT ); Tue, 24 May 2022 10:02:17 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0A141316 for ; Tue, 24 May 2022 07:02:16 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id f2so25906484wrc.0 for ; Tue, 24 May 2022 07:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iOhlZe5zCVmYqBGljaijQc2OGjPeMPWPgYrBs59bbm4=; b=yqKOOJqY/NOa/iYzr91FpndxRRx9L28WZXl4VwIAluIkeBoEN5QtTqOdRRA5K1i3Y3 41AV9MizZ1iqBTg0zSMFMXvKWA9TvsTx0y/wrqn3vvDa7k/zrIkLui3jUD/jNtYUXdyg x4d5D+6n5/ysmBqf7uSPG4Umkrw9mUiiAUkMIfCML6GqjHtLKETUWaXXYlMZCkv0Bq0d 06y2fPC8+jF3RqSzRUKJ4xBSOL9w/XDl54ln3H7uUGyD/2o1/rrkmohLOXD8fDRp3i+l Lt+hfkPWApIQndgCL0FsDntugNOeJE9pxNaa6Ipg6mY/bMzQNqv08MOLVvueXWTiu9Ne uspQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iOhlZe5zCVmYqBGljaijQc2OGjPeMPWPgYrBs59bbm4=; b=NwrBGAba8GGUJPPB8droMCPB+T349WZzXMNzeqaT00IQSAT04+Tq0IPTcLWo/n19An W+XzBix4ivxssUjm+NKmHN+oircmof5AmzYI3TyFIZmTViLW4SFRxvl8HQbLPkFNxu41 +PRRFTU4iUICM9AQtqkCCVi1v5wLxul38uc8jKs3RbZ5InJvAadK3wM9OauMYtMliNrt 0vfkTGAlaSjAYb85FRIKhEAYgXkFhS61wuk0IgYrelOEDAhynvqflU/RQ4M95eTtB1R3 Z26hM+BjUvtbZdEKThTm3wDM0NSXfNy+UPlTCorT+5dG8nCxiaMXJUA6Oy18021HTZ/t Wr6g== X-Gm-Message-State: AOAM530SUpFT+dizektYDsiq4kyq1MS/f5VYr1Aj+tg23j24+Ud1lJoa OGI01zYZevwbRul/ffLJEqYBUw== X-Google-Smtp-Source: ABdhPJxsBiRddg1DEe4aG4uBTDCiR18r3Fl1JyKj2bcWFO70KrwQvBxG9nNeeflZ8giiCgi9HQw0Gw== X-Received: by 2002:adf:ffd2:0:b0:20e:60ec:c37b with SMTP id x18-20020adfffd2000000b0020e60ecc37bmr23149636wrs.348.1653400934754; Tue, 24 May 2022 07:02:14 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id f9-20020adfc989000000b0020c5253d8e0sm12829030wrh.44.2022.05.24.07.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 07:02:14 -0700 (PDT) From: Bryan O'Donoghue To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: vladimir.zapolskiy@linaro.org, mchehab@kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, mmitkov@quicinc.com, jgrahsl@snap.com, hfink@snap.com, Bryan O'Donoghue , Konrad Dybcio Subject: [PATCH v2 3/4] arm64: dts: qcom: sm8250: camss: Define ports address/size cells Date: Tue, 24 May 2022 15:02:06 +0100 Message-Id: <20220524140207.2758605-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> References: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The ports {} address and size cells definition is the same for every derived 8250 board so, we should define it in the core sm8250.dtsi. Suggested-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Reviewed-by: Vladimir Zapolskiy --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 2bc11cad3a44..aa9a13364865 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3395,6 +3395,11 @@ camss: camss@ac6a000 { "cam_hf_0_mnoc", "cam_sf_0_mnoc", "cam_sf_icp_mnoc"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + }; }; camcc: clock-controller@ad00000 { From patchwork Tue May 24 14:02:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 12860224 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 2F4F4C433FE for ; Tue, 24 May 2022 14:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238086AbiEXOC2 (ORCPT ); Tue, 24 May 2022 10:02:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238094AbiEXOCW (ORCPT ); Tue, 24 May 2022 10:02:22 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B963448307 for ; Tue, 24 May 2022 07:02:18 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id t6so25873046wra.4 for ; Tue, 24 May 2022 07:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iXbAKg7nw/YPVpQzpMSW7CFDer8OTk9OFR3468QMlVU=; b=wRRSomMBWyLZtSm2GUksoxH8N5afcVR+fFJzKt0dzUhOp2edGNa6q92q+5LfkFoJIB c3wQ0YXdqN7uy65UARftVHRryTFY1eH/vM6a1zd+RXV3iM1rTQAmXvVMrsVJdKinpLxi 3Qg/FF7C9DXilpHYaMvGdzhqBOv9ycLVstHi0xl5cNPZgkYBMEeWHSwxkZwtw/zFlCHk Ziuby3RJsNzJNFcyut5fQzqotk2AweF9ErmV9rRrhP3rv8N2lhPMKmPygvjUdE0PrT9Z kYctfvfN7TfiPRjhtd52Eo+OpbD5V68MMTwnLEC6H7R27fqSwjcDoHaF5pWYUdQ3HDEy 1o9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iXbAKg7nw/YPVpQzpMSW7CFDer8OTk9OFR3468QMlVU=; b=gh1QShq9LZoCktyDrNqra91nMKnZVVqfisUVi7g7W7k+6XbzVhiKRJ9u/amsHKdF7L o4oNIH2WeIIIavdDoZ5SslDZsG/tt3wGRYZ6N2P/1HZZYO7HvWiIoxFd6OHQXnpfSTLB VFHOM+z8+G55CLYTe1PvkMJLyREs3oQHRntg9JWxAwfxkhd/S/Jf1+Bxi3hbYzilVWKU 6NyH2n2HZ6NbPDMjErKiJfAw/7hh5sq2uo3C1IDiGfZqVYoU1AiKt24uG0ni20/SDn5P CxQG/Co7Od2qEzOcVL9hBVlzPMB98loYGJ7lY2tmA8XumGfkNKqDwRKnEgCUrsNDUC/Y 1eVw== X-Gm-Message-State: AOAM533267knUEY8CKcxkg61Zyn9/EruVwKrmEg0S7p44aNTSx5k53TV wPRvwHkxgu+R/3IRFd5987ygGg== X-Google-Smtp-Source: ABdhPJzRAOMMaVGBLAFkdiNofBhPnbs39YQqKXkic4KUDYR0N2nuJv43ZCMpgcG+fzpbHenTIJ+s6A== X-Received: by 2002:adf:d1ec:0:b0:20e:58c3:6998 with SMTP id g12-20020adfd1ec000000b0020e58c36998mr23067468wrd.280.1653400936241; Tue, 24 May 2022 07:02:16 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id f9-20020adfc989000000b0020c5253d8e0sm12829030wrh.44.2022.05.24.07.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 07:02:15 -0700 (PDT) From: Bryan O'Donoghue To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: vladimir.zapolskiy@linaro.org, mchehab@kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, mmitkov@quicinc.com, jgrahsl@snap.com, hfink@snap.com, Bryan O'Donoghue Subject: [PATCH v2 4/4] arm64: dts: qcom: qrb5165-rb5: Enable the IMX577 on cam2 Date: Tue, 24 May 2022 15:02:07 +0100 Message-Id: <20220524140207.2758605-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> References: <20220524140207.2758605-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The IMX577 is on CCI1/CSI2 providing four lanes of camera data. An example media-ctl pipeline is: media-ctl --reset media-ctl -v -d /dev/media0 -V '"imx412 '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]' media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 60 ++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 33 +++++++++++++ 2 files changed, 93 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 0e63f707b911..756ddeb7530b 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1294,3 +1294,63 @@ &qup_spi0_data_clk { drive-strength = <6>; bias-disable; }; + +&camcc { + status = "okay"; +}; + +&camss { + status = "okay"; + vdda-phy-supply = <&vreg_l5a_0p88>; + vdda-pll-supply = <&vreg_l9a_1p2>; + + ports { + /* The port index denotes CSIPHY id i.e. csiphy2 */ + port@2 { + reg = <2>; + csiphy2_ep: endpoint { + clock-lanes = <7>; + data-lanes = <0 1 2 3>; + remote-endpoint = <&imx412_ep>; + }; + + }; + }; +}; + +&cci1 { + status = "okay"; +}; + +&cci1_i2c0 { + camera@1a { + /* + * rb5 ships with an imx577. camx code from qcom treats imx412 + * and imx577 the same way. Absent better data do the same here. + */ + compatible = "sony,imx412"; + reg = <0x1a>; + + reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>; + pinctrl-names = "default", "suspend"; + pinctrl-0 = <&cam2_default>; + pinctrl-1 = <&cam2_suspend>; + + clocks = <&camcc CAM_CC_MCLK2_CLK>; + assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>; + assigned-clock-rates = <24000000>; + + dovdd-supply = <&vreg_l7f_1p8>; + avdd-supply = <&vdc_5v>; + dvdd-supply = <&vdc_5v>; + + port { + imx412_ep: endpoint { + clock-lanes = <1>; + link-frequencies = /bits/ 64 <600000000>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&csiphy2_ep>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index aa9a13364865..2b65ec2806d0 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3788,6 +3788,39 @@ tlmm: pinctrl@f100000 { gpio-ranges = <&tlmm 0 0 181>; wakeup-parent = <&pdc>; + cam2_default: cam2-default { + rst { + pins = "gpio78"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + mclk { + pins = "gpio96"; + function = "cam_mclk"; + drive-strength = <16>; + bias-disable; + }; + }; + + cam2_suspend: cam2-suspend { + rst { + pins = "gpio78"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + + mclk { + pins = "gpio96"; + function = "cam_mclk"; + drive-strength = <2>; + bias-disable; + }; + }; + cci0_default: cci0-default { cci0_i2c0_default: cci0-i2c0-default { /* SDA, SCL */