From patchwork Thu Jan 6 23:55:34 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: 12705930 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 E3FFDC433EF for ; Thu, 6 Jan 2022 23:53:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343553AbiAFXxi (ORCPT ); Thu, 6 Jan 2022 18:53:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343558AbiAFXxe (ORCPT ); Thu, 6 Jan 2022 18:53:34 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A9AFC061212 for ; Thu, 6 Jan 2022 15:53:34 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id w20so7819651wra.9 for ; Thu, 06 Jan 2022 15:53:34 -0800 (PST) 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=ZhVNeBs7vzyROSZpuaXTYGD6xm3M8v73/QT84NJecB8=; b=KELKSau2oT1xFvKyY4DFAazfYbzPxhQjurxYQ7oGWGYC/Zoi+50GPAqgyGKqcDqn2C iQctGcVW/Gj7LckFzmhfdi5e0IK64tT0NYUzAcHZwQsUm7vOmBrAmmZ29RrZ4gvNNEyQ mDzcfFw5s98q5VRszP/PdBGw8lXG3SFsiQP3YCs86b/+AXDabQJ+QRqGbx4hIoXp4H2E I95jDjs8LXtZNcJgSxZB+sSug8uil2v0Nsjy+cdCZT1/cI/Ifm/S5SrVMwewsWe7wnUC geDJMmu4vunOHhxagzTL4nuV28Ow4ZsMmSmUhyzH8UaYDGpIOjM8QXikNt9YiE+vQLXy bycA== 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=ZhVNeBs7vzyROSZpuaXTYGD6xm3M8v73/QT84NJecB8=; b=dhKRr7M8fi6eS38L2UStUH6Mbqacmoxkinjdc2yHxsD/Pbppxr2FExe5qL1nMCSERs gPGm5IPZUympOFuEkI1bkBH+K4kM+L/nZoch7+uecgEaV1iAHSYPODfKAOvO4cPO2S1l dOsvlLX1XWZ0/TaFokt33E3fE94BJrBnDmxTavqXfV9ZYS9qeMuy1KAcBDnkRZom6HwP bFf+4/M1I142l4nonRjsEya4K82lauw+eNhqMkGnuITJaMbodlIW/9Fel374dkMtX+XH u4h/qLOflnR1y34m9JSCO5pybqamx+9zjzm7s0Xgs1jVNHZerurJkVLB7Bd15FeuN3Mf +wCw== X-Gm-Message-State: AOAM533uKCHHX/mK0ZyHv0g6Nl14dRuoxTKYkQdqdROoCtcV7BgoKwuW xtRJN5h7Thin6XM2oMHIHBh0L6OshcUfDQ== X-Google-Smtp-Source: ABdhPJxNkiPwZGI9s6xwMmpjSZGfhkE30arbomWtE9DxFEuHxXFWrpOqKPlUpHA+TJYMYrUdOVOaPw== X-Received: by 2002:a5d:68c9:: with SMTP id p9mr6818343wrw.695.1641513212564; Thu, 06 Jan 2022 15:53:32 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:31 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org, devicetree@vger.kernel.org, robh@kernel.org Subject: [PATCH 1/7] media: dt-bindings: media: camss: Fixup vdda regulator descriptions sdm845 Date: Thu, 6 Jan 2022 23:55:34 +0000 Message-Id: <20220106235540.1567839-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org If we review the schematic for RB3 Thundercomm document Turbox-845 we see that the CAMSS CSI PHY has the same basic power-rail layout as UFS, PCIe and USB PHYs. We should therefore have two regulator declarations as is the case for UFS, PCIe and USB. Cc: devicetree@vger.kernel.org Cc: robh@kernel.org Signed-off-by: Bryan O'Donoghue --- .../bindings/media/qcom,sdm845-camss.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml b/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml index 9ca5dfa7f2260..ae0642b9ae5ec 100644 --- a/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml @@ -203,9 +203,13 @@ properties: - const: vfe1 - const: vfe_lite - vdda-supply: + vdda-phy-supply: description: - Definition of the regulator used as analog power supply. + Phandle to a regulator supply to PHY core block. + + vdda-pll-supply: + description: + Phandle to 1.8V regulator supply to PHY refclk pll block. required: - clock-names @@ -217,7 +221,8 @@ required: - power-domains - reg - reg-names - - vdda-supply + - vdda-phy-supply + - vdda-pll-supply additionalProperties: false @@ -361,7 +366,8 @@ examples: "vfe1", "vfe_lite"; - vdda-supply = <®_2v8>; + vdda-phy-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l26a_1p2>; ports { #address-cells = <1>; From patchwork Thu Jan 6 23:55:35 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: 12705931 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 A7121C4332F for ; Thu, 6 Jan 2022 23:53:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343575AbiAFXxm (ORCPT ); Thu, 6 Jan 2022 18:53:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343574AbiAFXxg (ORCPT ); Thu, 6 Jan 2022 18:53:36 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8675CC061245 for ; Thu, 6 Jan 2022 15:53:35 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id i22so7789595wrb.13 for ; Thu, 06 Jan 2022 15:53:35 -0800 (PST) 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=NN+qWCSZGy/v8XPK3GfGhOOy6vI+oH7th5UvnDASdeQ=; b=MyowuYeOH+dlLfDjZE5uaUcBxPTnfRBRICJOh5t/czuU+VLaZClLX0ohrlh4pzeWeS cfrAchsJsVrx5ujwif5l1fEgePWTePxsL5hlB6fG6TL+wi0CcaKkRtXhcIUcLbdmTSRM F02fFy4+EQ027mMrz1sRvilM7Y5WXRbP+xzEcFfTJFoNHvJz0REH3Xjn/PwX2FJNIm/6 F0uhHpt267opCx4VdDiiLXiYZMaozT/dGF+MBUuU+46ePm4In6nvE8qLUV/VIviMz7X0 3yEzDMfliA2rQpFgfRsD5OEolORWBBPJS0lc5pDykLL77J5JxNeaZCe7jorZ9Z6aw9Qz 71bQ== 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=NN+qWCSZGy/v8XPK3GfGhOOy6vI+oH7th5UvnDASdeQ=; b=5iuqDRtd0ai+KV8QpgczFY/Asj5xw0XT0uZh1xU3vwBueV4E+J0I43XkcvF28BgDl2 sejIAIGHkeulKTQVcuNQ5lTQ73Ltg5x2quuCngy0Y/Mor+ljSb9pLeFhKABk+W7fxtrp WSvbJ0MH+V2AHOymfHDT3ZI8C84Y32ij2ddVyz8/48Q1yzWlGt6oIPkaPmIglx8UHhHt VE8xVjKdW/tUo9k1yvMJJZgmCLQnTwcgep+/Zs+DzL0lfJjPknkV0zrUru+FffWbuSIi PQ32sJiWV/975Sq8SnnjbyURwdKypZ/yFfHXxVpMM6B2FP8Lf0+flj9oyr0tZt4E9Epe et/Q== X-Gm-Message-State: AOAM532gVEyfnK4Yih0ZARkzHQenXQiC59LMphmiBOwvgU7AEzXJL4uH tY8YVkl9SmHXNobu6VP9EIadXUu7RnD0uQ== X-Google-Smtp-Source: ABdhPJxo7KxNxf9vEXrXR73eO9AbU/jeJeEHVVTtG45Z4QKqPgIYmCvY4Fbjp+8dKbnYqnw/KWhsmg== X-Received: by 2002:a5d:65c9:: with SMTP id e9mr3555246wrw.661.1641513213897; Thu, 06 Jan 2022 15:53:33 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:33 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org, devicetree@vger.kernel.org, robh@kernel.org Subject: [PATCH 2/7] media: dt-bindings: media: camss: Add vdda supply declarations sm8250 Date: Thu, 6 Jan 2022 23:55:35 +0000 Message-Id: <20220106235540.1567839-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add in missing vdda-phy-supply and vdda-pll-supply declarations. The sm8250 USB, PCIe, UFS, DSI and CSI PHYs use a common set of vdda rails. Define the CSI vdda regulators in the same way the qmp PHY does. Cc: devicetree@vger.kernel.org Cc: robh@kernel.org Signed-off-by: Bryan O'Donoghue --- .../bindings/media/qcom,sm8250-camss.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml b/Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml index af877d61b607d..07a2af12f37df 100644 --- a/Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sm8250-camss.yaml @@ -265,6 +265,14 @@ properties: - const: vfe_lite0 - const: vfe_lite1 + vdda-phy-supply: + description: + Phandle to a regulator supply to PHY core block. + + vdda-pll-supply: + description: + Phandle to 1.8V regulator supply to PHY refclk pll block. + required: - clock-names - clocks @@ -277,6 +285,8 @@ required: - power-domains - reg - reg-names + - vdda-phy-supply + - vdda-pll-supply additionalProperties: false @@ -316,6 +326,9 @@ examples: "vfe_lite0", "vfe_lite1"; + vdda-phy-supply = <&vreg_l5a_0p88>; + vdda-pll-supply = <&vreg_l9a_1p2>; + interrupts = , , , From patchwork Thu Jan 6 23:55:36 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: 12705932 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 B67DEC433FE for ; Thu, 6 Jan 2022 23:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343606AbiAFXxo (ORCPT ); Thu, 6 Jan 2022 18:53:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343577AbiAFXxh (ORCPT ); Thu, 6 Jan 2022 18:53:37 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9885EC06118A for ; Thu, 6 Jan 2022 15:53:36 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id v6so7814098wra.8 for ; Thu, 06 Jan 2022 15:53:36 -0800 (PST) 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=P5MT7rEoiiCVz2gFm3EQaB2V5VAMjaCUk3cu8vjhwBg=; b=nBpQ5R96wjA7v8we0vDgpADTO4FG8EmUknV1uOTY4F9urxVFnwoww7Seg9bM+fzVXk mBkBijjcmK8NN+hS0xg3/sldvz7LbYr9fydbj6OCoBljvy0Tg9jtL530Dlk6dYkbrlgQ E3msZfHtvNF9jnXcMDfTQL4F3HEYPbA7beGfdfs5TDMyLwTj99JXk/hcttxfy3rApeWV cuYFLaPFi4Au89w/CV1Zx8rKw0tZuivYtqBfBHMBvo21F25jJbWlzx6GDHV84RcnjAS6 +85hhYojv9VEa7n8Vhgzio656hf4lenor4vkB5El+dxVa7WwkKzV9ciJThta3xKSn/2u oEPw== 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=P5MT7rEoiiCVz2gFm3EQaB2V5VAMjaCUk3cu8vjhwBg=; b=k+7g8kh87RzOPjqPjToCmb+4KmivCwq47OVPY7MqUg1QMQ5anlDroAe27wEQe2rjSl urbWF0onkmOUdNFRKqkdtytFfgGIpFhjP4oV7UPjAxvqTUN089UIwhi+34BAj2mFkdjN Trtvoil+Y4Tdmlm2ed42xfjgW+V2tHCyhiUWAQX8gwpYSAw2wuY6PzWNFwdCDr2vKvXG BICF7O40B+wE3OoCkiqwE9sq4a7fkZB8cNWqeaCBgmY8z8BxdTs3biIV5ljFSO5UczSF uDFfrmFgPEozObWupjtQwzter6rMcyrjK0lpf+Db9vk6JVP1fTJIloPSYSCOSY9stPG5 +BpQ== X-Gm-Message-State: AOAM532aLQaXm6KV/KukgmCKwH/Bw7NqCaRHlYgTInXeHVVW2UL+1EQg jRtbnzyrmmrqc8sBgqQ4HmpdFbiU7hp0Mg== X-Google-Smtp-Source: ABdhPJzQ2zwvo7AzH07iONQTwtWjXq10u4Twx68ECRQit2ZdOapMSYdJ/IZvpkGsgfZPrcP83MsilQ== X-Received: by 2002:a05:6000:1b02:: with SMTP id f2mr495022wrz.496.1641513214966; Thu, 06 Jan 2022 15:53:34 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:34 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 3/7] arm64: dts: qcom: sdm845: Rename camss vdda-supply to vdda-phy-supply Date: Thu, 6 Jan 2022 23:55:36 +0000 Message-Id: <20220106235540.1567839-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The dts entry vdda-supply connects to a common vdda-phy-supply rail. Rename to reflect what the functionality is. Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index 13f80a0b6faaa..c4db88dbf8766 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -1115,7 +1115,7 @@ &cci { }; &camss { - vdda-supply = <&vreg_l1a_0p875>; + vdda-phy-supply = <&vreg_l1a_0p875>; status = "ok"; From patchwork Thu Jan 6 23:55:37 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: 12705933 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 6E5CBC433EF for ; Thu, 6 Jan 2022 23:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343619AbiAFXxq (ORCPT ); Thu, 6 Jan 2022 18:53:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343584AbiAFXxi (ORCPT ); Thu, 6 Jan 2022 18:53:38 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12655C034001 for ; Thu, 6 Jan 2022 15:53:38 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id r10so167651wrc.3 for ; Thu, 06 Jan 2022 15:53:38 -0800 (PST) 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=cmFENN6DpfU2w2rL3CjvPLwaJNNz4VsyBwG74nM5M44=; b=zUfhr6sav/maZtnP9i/JC5E/7dr0f9dGHSMAyCcPznMDdQRq3pdIuRG31d3vDW/DO/ Eh7rNOKQ8SsycNZFLrkm4/EsUr42xMCBKBrpaES7Y4RLufFoxTqrzOIKdcv5nwY25pqt mQivjVZPoPmKMWB1vXPMAgig08hegddrmxViDAJThX9iOb679J2pRc6raOU1y71Mhi61 2CvllXtZ4SmYRuSP+bYhIn0jddXCxKkSkhVwXyI6PIs4kAD39ZkVKVeetWgGdv2BE8w5 fh483m7gOf/DkAY57jfAYF+8v1/2iHqC7U3nkORoJoskuWq0Ctvqv1RPdig7t6felokq rYWg== 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=cmFENN6DpfU2w2rL3CjvPLwaJNNz4VsyBwG74nM5M44=; b=rCLqYiYfd4bcfr7QEa2M1wyMQmiEyJ7DY7+yR2z+B/ZFg6H5etdoRLYLHBlBBjsbyC 66H3JkVtTIBZ73gpVHCYjHT7dL7uDyyRWWkocoTusnciVz7YsNZpKxNFqV2C6PNaw3GG rSUFjGjRfbqEClSgSc30SNQ+fWwXMVlT19Snp8L6yiAZo3n1jyjy3J7nkolLRV4ytleQ SAqnl+1GSTMYr1GCiJhBFOtxhYSFFRfhGWAZDUjagV/CqC75uvaVWF0gjn9OEXyPPeoO RXcG50OX17dq/2c+o++2SJNPaRiqYadSUAny55Ov8c/iD5l+uJ4rMvdSqeBcy/qFMVGL a5lw== X-Gm-Message-State: AOAM533d6AlJeAkj9fxoEFHrtTUKcdCBEWQngxxwiaOsobbUJvgHlzvY oci+dFhF3XYXOu2/Q6VYxy0Jy4ijjROtYg== X-Google-Smtp-Source: ABdhPJzKFnQV7XhqXPsX/KMievHHwXmjdo/Bagi2gCQ4gxBVDyNaAYfRnuNTyuqtc56tJ/PU5X4qYQ== X-Received: by 2002:adf:fa4d:: with SMTP id y13mr8348924wrr.278.1641513216402; Thu, 06 Jan 2022 15:53:36 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:35 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 4/7] arm64: dts: qcom: sdm845: Add camss vdda-pll-supply Date: Thu, 6 Jan 2022 23:55:37 +0000 Message-Id: <20220106235540.1567839-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add in the missing vdda-pll-supply rail description. Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index c4db88dbf8766..f7bfd69b13620 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -1116,6 +1116,7 @@ &cci { &camss { vdda-phy-supply = <&vreg_l1a_0p875>; + vdda-pll-supply = <&vreg_l26a_1p2>; status = "ok"; From patchwork Thu Jan 6 23:55:38 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: 12705934 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 C1EC4C433FE for ; Thu, 6 Jan 2022 23:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343584AbiAFXxr (ORCPT ); Thu, 6 Jan 2022 18:53:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343560AbiAFXxk (ORCPT ); Thu, 6 Jan 2022 18:53:40 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79507C034003 for ; Thu, 6 Jan 2022 15:53:39 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id l12-20020a7bc34c000000b003467c58cbdfso4046980wmj.2 for ; Thu, 06 Jan 2022 15:53:39 -0800 (PST) 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=SDkMctUD/gJ+Gof8fTQm+7kOeT3NE6mMRPAJScK43qk=; b=uG3wBgBin/mToccyAYIFDqpz3OfVt2wre+ssVxMG7HSWa63GwVk3EpOI/gR6O1aa3x BX+vkrqKThU0d/6XnupQTj5yz8Cpea+p6g2tlwEChVWvMc4gWf3uLzEVIVDoJM7HNLzg x5UmToiirvXX2+hPeNoZFYh8Lc1pU2gw3mq7jWGLqIIyAi5khcMtBbEiaZDGhaIIgdNF BsS7ozGZCONaLLXlRWFrma1QV2ilYDIJ5Hu36Jg+825saOSC7El/UYdg456CU6egZRvi EJ4oJmZr39NmUBpKwlWDe/F0kYf0QfWRMF/c/H8fE8qdT9C3nIZNCVe+8QXgqJXLUB70 ntHg== 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=SDkMctUD/gJ+Gof8fTQm+7kOeT3NE6mMRPAJScK43qk=; b=NYO5Rs3xP8ZTi6gRLk5P5Vd5jrHXBST/YUmnZXGDlncfkoSKcybGKjsA7jSu5/wBNC kqDoyvFrnWXQA9srUjKKcK8r0GYs3LltG7YdIsYtWy+yqtXdQsMFbwVU7nGJtRw2YBpn fwcpzD+eQ53o8LsmYCJaBIQTHZJ4E07dQz3fTvsZnvh0Jwm7uV4O5UqiX+U97DOrNYUb myzIw+BX+1PqzQimdSJ6YP47kmx8rlYH8k+x4Asv+49lXKa+i0s35Dthi5oM7kQmsgxH F5Tb+wfOdYkoV19GL5mIhSsasKJXpDND2+SbXIQi6te9zqRGK0IJd5olP13TSp+/XG2s +8AA== X-Gm-Message-State: AOAM533PlPt7y3RoiWKZACVPlzNSYKztv9hlfLLaZ/OW3YNFT7qj1xh9 I8NTDZzSwfRC80TG/blrMaYGsgWTf6JWlA== X-Google-Smtp-Source: ABdhPJywhabZosV117drvm//qwVytEg3IdxmFSqYdg7KcRjwaOF+vL4XnZb7fXdzHoWQbSGfG+dgKA== X-Received: by 2002:a1c:1b8e:: with SMTP id b136mr156296wmb.189.1641513217512; Thu, 06 Jan 2022 15:53:37 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:37 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 5/7] media: camss: Add regulator_bulk support Date: Thu, 6 Jan 2022 23:55:38 +0000 Message-Id: <20220106235540.1567839-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the ability to enable or disable multiple regulators in bulk with camss. This is useful for sm8250, sdm845 and it looks like sdm660 where we have more than one CSI regulator to do at once. It should just work for standalone existing vdda regulators and parts which don't have an explicitly defined CSI regulator. Signed-off-by: Bryan O'Donoghue Reported-by: Vladimir Zapolskiy --- .../media/platform/qcom/camss/camss-csid.c | 40 +++++--- .../media/platform/qcom/camss/camss-csid.h | 3 +- drivers/media/platform/qcom/camss/camss.c | 94 +++++++++---------- drivers/media/platform/qcom/camss/camss.h | 2 +- 4 files changed, 75 insertions(+), 64 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c index 32f82e471bae1..786a18bd9571c 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.c +++ b/drivers/media/platform/qcom/camss/camss-csid.c @@ -173,7 +173,8 @@ static int csid_set_power(struct v4l2_subdev *sd, int on) if (ret < 0) return ret; - ret = csid->vdda ? regulator_enable(csid->vdda) : 0; + ret = regulator_bulk_enable(csid->num_supplies, + csid->supplies); if (ret < 0) { pm_runtime_put_sync(dev); return ret; @@ -181,16 +182,16 @@ static int csid_set_power(struct v4l2_subdev *sd, int on) ret = csid_set_clock_rates(csid); if (ret < 0) { - if (csid->vdda) - regulator_disable(csid->vdda); + regulator_bulk_disable(csid->num_supplies, + csid->supplies); pm_runtime_put_sync(dev); return ret; } ret = camss_enable_clocks(csid->nclocks, csid->clock, dev); if (ret < 0) { - if (csid->vdda) - regulator_disable(csid->vdda); + regulator_bulk_disable(csid->num_supplies, + csid->supplies); pm_runtime_put_sync(dev); return ret; } @@ -201,8 +202,8 @@ static int csid_set_power(struct v4l2_subdev *sd, int on) if (ret < 0) { disable_irq(csid->irq); camss_disable_clocks(csid->nclocks, csid->clock); - if (csid->vdda) - regulator_disable(csid->vdda); + regulator_bulk_disable(csid->num_supplies, + csid->supplies); pm_runtime_put_sync(dev); return ret; } @@ -211,7 +212,8 @@ static int csid_set_power(struct v4l2_subdev *sd, int on) } else { disable_irq(csid->irq); camss_disable_clocks(csid->nclocks, csid->clock); - ret = csid->vdda ? regulator_disable(csid->vdda) : 0; + regulator_bulk_disable(csid->num_supplies, + csid->supplies); pm_runtime_put_sync(dev); if (version == CAMSS_8250 || version == CAMSS_845) vfe_put(vfe); @@ -660,14 +662,22 @@ int msm_csid_subdev_init(struct camss *camss, struct csid_device *csid, } /* Regulator */ - - csid->vdda = NULL; - if (res->regulator[0]) - csid->vdda = devm_regulator_get(dev, res->regulator[0]); - if (IS_ERR(csid->vdda)) { - dev_err(dev, "could not get regulator\n"); - return PTR_ERR(csid->vdda); + for (i = 0; i < ARRAY_SIZE(res->regulators); i++) { + if (res->regulators[i]) + csid->num_supplies++; } + csid->supplies = devm_kmalloc_array(camss->dev, csid->num_supplies, + sizeof(csid->supplies), GFP_KERNEL); + if (!csid->supplies) + return -ENOMEM; + + for (i = 0; i < csid->num_supplies; i++) + csid->supplies[i].supply = res->regulators[i]; + + ret = devm_regulator_bulk_get(camss->dev, csid->num_supplies, + csid->supplies); + if (ret) + return ret; init_completion(&csid->reset_complete); diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media/platform/qcom/camss/camss-csid.h index 17a50fa426be1..f06040e44c515 100644 --- a/drivers/media/platform/qcom/camss/camss-csid.h +++ b/drivers/media/platform/qcom/camss/camss-csid.h @@ -152,7 +152,8 @@ struct csid_device { char irq_name[30]; struct camss_clock *clock; int nclocks; - struct regulator *vdda; + struct regulator_bulk_data *supplies; + int num_supplies; struct completion reset_complete; struct csid_testgen_config testgen; struct csid_phy_config phy; diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index d9905e737d88d..419c48c4f1d52 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -34,7 +34,7 @@ static const struct resources csiphy_res_8x16[] = { /* CSIPHY0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer" }, .clock_rate = { { 0 }, { 0 }, @@ -46,7 +46,7 @@ static const struct resources csiphy_res_8x16[] = { /* CSIPHY1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer" }, .clock_rate = { { 0 }, { 0 }, @@ -60,7 +60,7 @@ static const struct resources csiphy_res_8x16[] = { static const struct resources csid_res_8x16[] = { /* CSID0 */ { - .regulator = { "vdda" }, + .regulators = { "vdda" }, .clock = { "top_ahb", "ispif_ahb", "csi0_ahb", "ahb", "csi0", "csi0_phy", "csi0_pix", "csi0_rdi" }, .clock_rate = { { 0 }, @@ -77,7 +77,7 @@ static const struct resources csid_res_8x16[] = { /* CSID1 */ { - .regulator = { "vdda" }, + .regulators = { "vdda" }, .clock = { "top_ahb", "ispif_ahb", "csi1_ahb", "ahb", "csi1", "csi1_phy", "csi1_pix", "csi1_rdi" }, .clock_rate = { { 0 }, @@ -107,7 +107,7 @@ static const struct resources_ispif ispif_res_8x16 = { static const struct resources vfe_res_8x16[] = { /* VFE0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "vfe0", "csi_vfe0", "vfe_ahb", "vfe_axi", "ahb" }, .clock_rate = { { 0 }, @@ -129,7 +129,7 @@ static const struct resources vfe_res_8x16[] = { static const struct resources csiphy_res_8x96[] = { /* CSIPHY0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer" }, .clock_rate = { { 0 }, { 0 }, @@ -141,7 +141,7 @@ static const struct resources csiphy_res_8x96[] = { /* CSIPHY1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer" }, .clock_rate = { { 0 }, { 0 }, @@ -153,7 +153,7 @@ static const struct resources csiphy_res_8x96[] = { /* CSIPHY2 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy2_timer" }, .clock_rate = { { 0 }, { 0 }, @@ -167,7 +167,7 @@ static const struct resources csiphy_res_8x96[] = { static const struct resources csid_res_8x96[] = { /* CSID0 */ { - .regulator = { "vdda" }, + .regulators = { "vdda" }, .clock = { "top_ahb", "ispif_ahb", "csi0_ahb", "ahb", "csi0", "csi0_phy", "csi0_pix", "csi0_rdi" }, .clock_rate = { { 0 }, @@ -184,7 +184,7 @@ static const struct resources csid_res_8x96[] = { /* CSID1 */ { - .regulator = { "vdda" }, + .regulators = { "vdda" }, .clock = { "top_ahb", "ispif_ahb", "csi1_ahb", "ahb", "csi1", "csi1_phy", "csi1_pix", "csi1_rdi" }, .clock_rate = { { 0 }, @@ -201,7 +201,7 @@ static const struct resources csid_res_8x96[] = { /* CSID2 */ { - .regulator = { "vdda" }, + .regulators = { "vdda" }, .clock = { "top_ahb", "ispif_ahb", "csi2_ahb", "ahb", "csi2", "csi2_phy", "csi2_pix", "csi2_rdi" }, .clock_rate = { { 0 }, @@ -218,7 +218,7 @@ static const struct resources csid_res_8x96[] = { /* CSID3 */ { - .regulator = { "vdda" }, + .regulators = { "vdda" }, .clock = { "top_ahb", "ispif_ahb", "csi3_ahb", "ahb", "csi3", "csi3_phy", "csi3_pix", "csi3_rdi" }, .clock_rate = { { 0 }, @@ -249,7 +249,7 @@ static const struct resources_ispif ispif_res_8x96 = { static const struct resources vfe_res_8x96[] = { /* VFE0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ahb", "vfe0", "csi_vfe0", "vfe_ahb", "vfe0_ahb", "vfe_axi", "vfe0_stream"}, .clock_rate = { { 0 }, @@ -267,7 +267,7 @@ static const struct resources vfe_res_8x96[] = { /* VFE1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ahb", "vfe1", "csi_vfe1", "vfe_ahb", "vfe1_ahb", "vfe_axi", "vfe1_stream"}, .clock_rate = { { 0 }, @@ -287,7 +287,7 @@ static const struct resources vfe_res_8x96[] = { static const struct resources csiphy_res_660[] = { /* CSIPHY0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer", "csi0_phy", "csiphy_ahb2crif" }, .clock_rate = { { 0 }, @@ -301,7 +301,7 @@ static const struct resources csiphy_res_660[] = { /* CSIPHY1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer", "csi1_phy", "csiphy_ahb2crif" }, .clock_rate = { { 0 }, @@ -315,7 +315,7 @@ static const struct resources csiphy_res_660[] = { /* CSIPHY2 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy2_timer", "csi2_phy", "csiphy_ahb2crif" }, .clock_rate = { { 0 }, @@ -331,7 +331,7 @@ static const struct resources csiphy_res_660[] = { static const struct resources csid_res_660[] = { /* CSID0 */ { - .regulator = { "vdda", "vdd_sec" }, + .regulators = { "vdda", "vdd_sec" }, .clock = { "top_ahb", "ispif_ahb", "csi0_ahb", "ahb", "csi0", "csi0_phy", "csi0_pix", "csi0_rdi", "cphy_csid0" }, @@ -351,7 +351,7 @@ static const struct resources csid_res_660[] = { /* CSID1 */ { - .regulator = { "vdda", "vdd_sec" }, + .regulators = { "vdda", "vdd_sec" }, .clock = { "top_ahb", "ispif_ahb", "csi1_ahb", "ahb", "csi1", "csi1_phy", "csi1_pix", "csi1_rdi", "cphy_csid1" }, @@ -371,7 +371,7 @@ static const struct resources csid_res_660[] = { /* CSID2 */ { - .regulator = { "vdda", "vdd_sec" }, + .regulators = { "vdda", "vdd_sec" }, .clock = { "top_ahb", "ispif_ahb", "csi2_ahb", "ahb", "csi2", "csi2_phy", "csi2_pix", "csi2_rdi", "cphy_csid2" }, @@ -391,7 +391,7 @@ static const struct resources csid_res_660[] = { /* CSID3 */ { - .regulator = { "vdda", "vdd_sec" }, + .regulators = { "vdda", "vdd_sec" }, .clock = { "top_ahb", "ispif_ahb", "csi3_ahb", "ahb", "csi3", "csi3_phy", "csi3_pix", "csi3_rdi", "cphy_csid3" }, @@ -425,7 +425,7 @@ static const struct resources_ispif ispif_res_660 = { static const struct resources vfe_res_660[] = { /* VFE0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "throttle_axi", "top_ahb", "ahb", "vfe0", "csi_vfe0", "vfe_ahb", "vfe0_ahb", "vfe_axi", "vfe0_stream"}, @@ -446,7 +446,7 @@ static const struct resources vfe_res_660[] = { /* VFE1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "throttle_axi", "top_ahb", "ahb", "vfe1", "csi_vfe1", "vfe_ahb", "vfe1_ahb", "vfe_axi", "vfe1_stream"}, @@ -469,7 +469,7 @@ static const struct resources vfe_res_660[] = { static const struct resources csiphy_res_845[] = { /* CSIPHY0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src", "cpas_ahb", "cphy_rx_src", "csiphy0", "csiphy0_timer_src", "csiphy0_timer" }, @@ -487,7 +487,7 @@ static const struct resources csiphy_res_845[] = { /* CSIPHY1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src", "cpas_ahb", "cphy_rx_src", "csiphy1", "csiphy1_timer_src", "csiphy1_timer" }, @@ -505,7 +505,7 @@ static const struct resources csiphy_res_845[] = { /* CSIPHY2 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src", "cpas_ahb", "cphy_rx_src", "csiphy2", "csiphy2_timer_src", "csiphy2_timer" }, @@ -523,7 +523,7 @@ static const struct resources csiphy_res_845[] = { /* CSIPHY3 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src", "cpas_ahb", "cphy_rx_src", "csiphy3", "csiphy3_timer_src", "csiphy3_timer" }, @@ -543,7 +543,7 @@ static const struct resources csiphy_res_845[] = { static const struct resources csid_res_845[] = { /* CSID0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "cpas_ahb", "cphy_rx_src", "slow_ahb_src", "soc_ahb", "vfe0", "vfe0_src", "vfe0_cphy_rx", "csi0", @@ -563,7 +563,7 @@ static const struct resources csid_res_845[] = { /* CSID1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "cpas_ahb", "cphy_rx_src", "slow_ahb_src", "soc_ahb", "vfe1", "vfe1_src", "vfe1_cphy_rx", "csi1", @@ -583,7 +583,7 @@ static const struct resources csid_res_845[] = { /* CSID2 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "cpas_ahb", "cphy_rx_src", "slow_ahb_src", "soc_ahb", "vfe_lite", "vfe_lite_src", "vfe_lite_cphy_rx", "csi2", @@ -605,7 +605,7 @@ static const struct resources csid_res_845[] = { static const struct resources vfe_res_845[] = { /* VFE0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "cpas_ahb", "slow_ahb_src", "soc_ahb", "vfe0", "vfe0_axi", "vfe0_src", "csi0", @@ -625,7 +625,7 @@ static const struct resources vfe_res_845[] = { /* VFE1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "cpas_ahb", "slow_ahb_src", "soc_ahb", "vfe1", "vfe1_axi", "vfe1_src", "csi1", @@ -645,7 +645,7 @@ static const struct resources vfe_res_845[] = { /* VFE-lite */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi", "cpas_ahb", "slow_ahb_src", "soc_ahb", "vfe_lite", "vfe_lite_src", "csi2", @@ -666,7 +666,7 @@ static const struct resources vfe_res_845[] = { static const struct resources csiphy_res_8250[] = { /* CSIPHY0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "csiphy0", "csiphy0_timer" }, .clock_rate = { { 400000000 }, { 300000000 } }, @@ -675,7 +675,7 @@ static const struct resources csiphy_res_8250[] = { }, /* CSIPHY1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "csiphy1", "csiphy1_timer" }, .clock_rate = { { 400000000 }, { 300000000 } }, @@ -684,7 +684,7 @@ static const struct resources csiphy_res_8250[] = { }, /* CSIPHY2 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "csiphy2", "csiphy2_timer" }, .clock_rate = { { 400000000 }, { 300000000 } }, @@ -693,7 +693,7 @@ static const struct resources csiphy_res_8250[] = { }, /* CSIPHY3 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "csiphy3", "csiphy3_timer" }, .clock_rate = { { 400000000 }, { 300000000 } }, @@ -702,7 +702,7 @@ static const struct resources csiphy_res_8250[] = { }, /* CSIPHY4 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "csiphy4", "csiphy4_timer" }, .clock_rate = { { 400000000 }, { 300000000 } }, @@ -711,7 +711,7 @@ static const struct resources csiphy_res_8250[] = { }, /* CSIPHY5 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "csiphy5", "csiphy5_timer" }, .clock_rate = { { 400000000 }, { 300000000 } }, @@ -723,7 +723,7 @@ static const struct resources csiphy_res_8250[] = { static const struct resources csid_res_8250[] = { /* CSID0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "vfe0_csid", "vfe0_cphy_rx", "vfe0", "vfe0_areg", "vfe0_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -735,7 +735,7 @@ static const struct resources csid_res_8250[] = { }, /* CSID1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "vfe1_csid", "vfe1_cphy_rx", "vfe1", "vfe1_areg", "vfe1_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -747,7 +747,7 @@ static const struct resources csid_res_8250[] = { }, /* CSID2 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx", "vfe_lite", "vfe_lite_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -758,7 +758,7 @@ static const struct resources csid_res_8250[] = { }, /* CSID3 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx", "vfe_lite", "vfe_lite_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -772,7 +772,7 @@ static const struct resources csid_res_8250[] = { static const struct resources vfe_res_8250[] = { /* VFE0 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb", "camnoc_axi", "vfe0_ahb", "vfe0_areg", "vfe0", "vfe0_axi", "cam_hf_axi" }, @@ -790,7 +790,7 @@ static const struct resources vfe_res_8250[] = { }, /* VFE1 */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb", "camnoc_axi", "vfe1_ahb", "vfe1_areg", "vfe1", "vfe1_axi", "cam_hf_axi" }, @@ -808,7 +808,7 @@ static const struct resources vfe_res_8250[] = { }, /* VFE2 (lite) */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb", "camnoc_axi", "vfe_lite_ahb", "vfe_lite_axi", "vfe_lite", "cam_hf_axi" }, @@ -825,7 +825,7 @@ static const struct resources vfe_res_8250[] = { }, /* VFE3 (lite) */ { - .regulator = { NULL }, + .regulators = { NULL }, .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb", "camnoc_axi", "vfe_lite_ahb", "vfe_lite_axi", "vfe_lite", "cam_hf_axi" }, diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h index 9c644e638a948..c9b3e0df5be8f 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -42,7 +42,7 @@ #define CAMSS_RES_MAX 17 struct resources { - char *regulator[CAMSS_RES_MAX]; + char *regulators[CAMSS_RES_MAX]; char *clock[CAMSS_RES_MAX]; u32 clock_rate[CAMSS_RES_MAX][CAMSS_RES_MAX]; char *reg[CAMSS_RES_MAX]; From patchwork Thu Jan 6 23:55:39 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: 12705935 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 2C1F3C433F5 for ; Thu, 6 Jan 2022 23:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343583AbiAFXxs (ORCPT ); Thu, 6 Jan 2022 18:53:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343598AbiAFXxl (ORCPT ); Thu, 6 Jan 2022 18:53:41 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F73C0611FD for ; Thu, 6 Jan 2022 15:53:40 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id d187-20020a1c1dc4000000b003474b4b7ebcso1372220wmd.5 for ; Thu, 06 Jan 2022 15:53:40 -0800 (PST) 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=f0/jP+wtHGnEZCaZ9/FXXw65LhXfTFFCKBh0r3UhICg=; b=Dv/yut/JRt/ZVOjBgbZq7X4t3JU2hRhepXqMSK2lfvZyKE7pYV3PumP/JwIpJ4s4h7 a47lxKxlab97q0smmBcqmni1J00ZO9ibnRe4OuAi8dRI36MJmNeRUimQDRIG/x8vA/tr NuksPEMIR01ZKSV+i/t8wn5oQCGLtUUPFnHWZ/xgC03Bk7Ro9wH0bYVguDagtuz9mYBa hVuNpWL+SdrCi6wTxj1mjcgRUbAnnvmmZ9mkaosCsYen20yXbsWClJRNZGAOO8OzAeX1 UQ2HjN4FlUF1cTZk8lbjtGwtDYK4joFAgM+FNmYiPdS3PN69IUSjuNOKECg1/6Y+36pi 5fsA== 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=f0/jP+wtHGnEZCaZ9/FXXw65LhXfTFFCKBh0r3UhICg=; b=TyhcPDNoNCR4nCByoaTAekzl7l78qB2eR7Fa30oN+dHqTF0YwmvAIgxKWhzWmtRl4M 0zx5G7heHTOe03d5nkRInMtMOchs++3w08s+PnTROepzLceBnopgPEgtqqnyAbgmJE1i x1Ne4fm6ayBSQnmGMSWI16N+5AheXR3fMHAC8q2NrVL6T6BvrrvQvoteyTSIDU7K4epS CUAU84GsLZUlrd7szJBW6s0a0cCWK50vsu/7YZNq3BtMegpugEaEx2Yp4DmdwIQZkqO6 wyrhK354F2I8jICQ3Mmqh4YJEswMFLm46uI17LnOBt39uMqGoPy949LToDFcE76Ni6YS PGYA== X-Gm-Message-State: AOAM532S0ouFKMAwVQrnTsr0kyyKezPmJaF1kb+iXd+fYorgKRQZe+50 XkEERDV9DX9YeqI5S+BcgZu7o9PH6CfwVg== X-Google-Smtp-Source: ABdhPJxcFcMQuIk/0p73clG3HeTa7gIkYGcpdF+XxUcS0M11AJAff5lVTE72GMYHcCbKOlc2a6jhIQ== X-Received: by 2002:a05:600c:643:: with SMTP id p3mr8771786wmm.130.1641513218743; Thu, 06 Jan 2022 15:53:38 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:38 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 6/7] media: camss: Point sdm845 at the correct vdda regulators Date: Thu, 6 Jan 2022 23:55:39 +0000 Message-Id: <20220106235540.1567839-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Reviewing the RB3 schematic its clear that we have missed out on defining one of the power-rails associated with the CSI PHY. Other PHYs such as the UFS, PCIe and USB connect to these rails and define each regulator individually. This means if we were to switch off the other various PHYs which enable these rails, the CAMSS would not appropriately power-on the CSI PHY. Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 419c48c4f1d52..6de257502e88b 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -543,7 +543,7 @@ static const struct resources csiphy_res_845[] = { static const struct resources csid_res_845[] = { /* CSID0 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "cpas_ahb", "cphy_rx_src", "slow_ahb_src", "soc_ahb", "vfe0", "vfe0_src", "vfe0_cphy_rx", "csi0", @@ -563,7 +563,7 @@ static const struct resources csid_res_845[] = { /* CSID1 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "cpas_ahb", "cphy_rx_src", "slow_ahb_src", "soc_ahb", "vfe1", "vfe1_src", "vfe1_cphy_rx", "csi1", @@ -583,7 +583,7 @@ static const struct resources csid_res_845[] = { /* CSID2 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "cpas_ahb", "cphy_rx_src", "slow_ahb_src", "soc_ahb", "vfe_lite", "vfe_lite_src", "vfe_lite_cphy_rx", "csi2", From patchwork Thu Jan 6 23:55:40 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: 12705936 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 A9965C4321E for ; Thu, 6 Jan 2022 23:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343574AbiAFXxu (ORCPT ); Thu, 6 Jan 2022 18:53:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343566AbiAFXxm (ORCPT ); Thu, 6 Jan 2022 18:53:42 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DEDDC034007 for ; Thu, 6 Jan 2022 15:53:41 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id q8so7785517wra.12 for ; Thu, 06 Jan 2022 15:53:41 -0800 (PST) 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=zbDm820lh/1R1PbuB190FVHw4DIJK+VMDUkanKQM9EE=; b=Wxd9AYxtNoH54uR9HIPhb6G3I/Uk4pQ9JLrSQSxPECaZG12JuitteUjLWJU4r0lyMG 5o9CSl64XRyhb8lQEAT22AQ1jACr/EYMduigI7D0pQWy8H7hPCX8g2cHPrLSIh7kHuU0 by5/Ks/sSWoVX7pPXg/fQvFb9sZw2c4rXgPTWAXcpoaE4Ixi+7c1KbnGHEVSy/ke8Y3y j4m0TRPxgiGOi145LYmF5E/NQKavuRMl+vHeed5/AjxchhzOV4KkXoYTDKZoxT4IqnpI eP7jRpMcSr2TxVFCxrYdFWrYTn+tKwaRqY9nZcs6fOwsCKKmWlV836FIf0DybHlfLCki oTTQ== 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=zbDm820lh/1R1PbuB190FVHw4DIJK+VMDUkanKQM9EE=; b=PtbjNpLdwJcZ3wDcfv+Ys9hyJX/6Uc+7pPon3mG560xogiG82CI4x9oJhqPH8qQRZP FK6falyUhwdDpG9buW7WCZKH/7pYMp1OUQiBFsFSnPHFjpDyE+Yd5CIgKihZbgt/3Odp hR/xc6IhwCDSBo5ja4hfXnGswMMU2oMVMmwyDZyF7gvja4DXlyZLLivcEsDlwY9scnPn Y/YOPy3fxW6Pk+E9so5aRIEUR8btM1U9EnQqFvacInoCfhYpcQobFiWoqJgFJSr+oNAR mTIHhwN0q0SaQaoLor9rWVuIDVQZtfNs2oGULFKzAJ1wfM9KlPaN7vIOrpPiwHGii25/ 3DGQ== X-Gm-Message-State: AOAM531gxDwsHpNe938u/f8QVrSFfUu42vvsZLQXYUeX334DJ1FSreMH dZDBmR6Er7Kfgs3iZwsKPGOWEn/B14lZkA== X-Google-Smtp-Source: ABdhPJwxKvFJozRXC/w3qW/s98oTYefv/EmsOBswZrNPNGeLKEzptFAhz78oPiSj+GGeEx8a7hUPCA== X-Received: by 2002:a5d:5610:: with SMTP id l16mr29866184wrv.418.1641513219863; Thu, 06 Jan 2022 15:53:39 -0800 (PST) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id a71sm335893wme.39.2022.01.06.15.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 15:53:39 -0800 (PST) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, mchehab@kernel.org, hverkuil@xs4all.nl, robert.foss@linaro.org Cc: jonathan@marek.ca, andrey.konovalov@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, jgrahsl@snap.com, hfink@snap.com, vladimir.zapolskiy@linaro.org, dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org Subject: [PATCH 7/7] media: camss: Point sm8250 at the correct vdda regulators Date: Thu, 6 Jan 2022 23:55:40 +0000 Message-Id: <20220106235540.1567839-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> References: <20220106235540.1567839-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Reviewing the RB5 schematic its clear that we have missed out on defining both of the power-rails associated with the CSI PHY. Other PHYs such as the UFS, PCIe and USB connect to these rails and define each regulator individually. This means if we were to switch off the other various PHYs which enable these rails, the CAMSS would not appropriately power-on the CSI PHY. Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 6de257502e88b..412c8ee7c182d 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -723,7 +723,7 @@ static const struct resources csiphy_res_8250[] = { static const struct resources csid_res_8250[] = { /* CSID0 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "vfe0_csid", "vfe0_cphy_rx", "vfe0", "vfe0_areg", "vfe0_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -735,7 +735,7 @@ static const struct resources csid_res_8250[] = { }, /* CSID1 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "vfe1_csid", "vfe1_cphy_rx", "vfe1", "vfe1_areg", "vfe1_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -747,7 +747,7 @@ static const struct resources csid_res_8250[] = { }, /* CSID2 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx", "vfe_lite", "vfe_lite_ahb" }, .clock_rate = { { 400000000 }, { 400000000 }, @@ -758,7 +758,7 @@ static const struct resources csid_res_8250[] = { }, /* CSID3 */ { - .regulators = { NULL }, + .regulators = { "vdda-phy", "vdda-pll" }, .clock = { "vfe_lite_csid", "vfe_lite_cphy_rx", "vfe_lite", "vfe_lite_ahb" }, .clock_rate = { { 400000000 }, { 400000000 },