From patchwork Tue Dec 13 19:10:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 32934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp312290wrn; Tue, 13 Dec 2022 11:11:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7q13gfSho+Dg6F1CNVfZARWBzBVtPtfjhsMPLYKTgMdAXPD1BhNmoDgoPSRz2/90nXliVi X-Received: by 2002:a17:902:da87:b0:186:91e8:8a5b with SMTP id j7-20020a170902da8700b0018691e88a5bmr33558176plx.48.1670958705369; Tue, 13 Dec 2022 11:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670958705; cv=none; d=google.com; s=arc-20160816; b=pawD4dYHQZPVAtLVXE4mTdt16CbAd4T6TKfjJdCuzok0C9fFu1mNdPStiFwhRoWoB6 H9Fvlmgt2+DtfDIC3ZolrWhkTgRWdDM+xVhIT7LVWJsis7xlokGxZRkWm+FhS6Wezci0 mcZBq7cvlwtyro/EXpVBnT3PPONXwBARDd5O124aceR1eQnkL6SP+3jIuqRmv6CkkqDQ czAtbfynApiBB3/s2ZOsl0yN9Hr2PWIpGXOrNq0M9BSBKY9Z9Trjm8pJdgpa7sgQ//z8 i/5rdGytofL9CwJfoNT1eywEqKRe0lU6TpeBN3mBaqkWAOy6h+DTvSAm55+wJ5ZQiKpg h0Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ts/j2CHYg1kPm6cKPUq2V9hf2EsZAdlZm5xdzR+Qb20=; b=0/CwpHK2qy4tmAq9MzQUGZmPx+RHnpiT9A4dHJVuEKygHNKFtR11am2Wp/Aj5SB3uz GEpyzTqcdne8srqfnCPUG6xrRCztn1kqmjKk0o38e2ovf80V3d0LOmr+1iM6El2uvBg8 qzUXo11msKkuxfuth+ws9HAoC1bf+gyq6mBGAj0k6vq28ZbaYQvr2XEwLwHWMIPNpScT t6/PbhgndZb1CpWeVNTikZwZWqDBE0dHr3knIPkQSSk80ARbkLrdSsYiUX15xT0481j7 wQkFVVZ2iO6BAaobfz2gU/jqRU9sSQATNqQ8Mb+GLctbygE+Nc3L38IdTW0DSzPCPo5F Zm9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F61no4iB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id az1-20020a170902a58100b00189db2e76f1si458245plb.389.2022.12.13.11.11.32; Tue, 13 Dec 2022 11:11:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F61no4iB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236801AbiLMTLR (ORCPT + 99 others); Tue, 13 Dec 2022 14:11:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236712AbiLMTKt (ORCPT ); Tue, 13 Dec 2022 14:10:49 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C689248F4 for ; Tue, 13 Dec 2022 11:10:48 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id x11so4359011ljh.7 for ; Tue, 13 Dec 2022 11:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ts/j2CHYg1kPm6cKPUq2V9hf2EsZAdlZm5xdzR+Qb20=; b=F61no4iBYe7WADg1b5OwnJFFwNtT9IxMVRaCN4JwLtW7bINFK3JVPwj4fbgGE4lcv2 fsRThwY7svqFVHUk+PJE5EuU0bLGxF/vRRy7CKw8f+1YmcOx67gIbBlEHcoCRyv9+nMM WWzHM8dGwc5gtS/wX2RZC76Hge1DxEG34cZqxYBOoWBXHLRYYm1S+p2kBWmaZWUZ2QhJ R4U/pAsR4ImQBGcCsrZKQDavD/sJnhuZEO2oziqDE+wVpEeEY4217kIJo6USUA0nfmbm Ywl6PgxfXyHl0LHHKAxGEzIaL+2pEsM/rH3dNkt8PgqSM1D9G61gvmG6Zov7TZYfrOx+ t4bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ts/j2CHYg1kPm6cKPUq2V9hf2EsZAdlZm5xdzR+Qb20=; b=a/xJwcAhVbIv8lRf4XUVYmV/GLAET/YIwYWKa1kNhjw6THsa/gqQ5iM4hQu6qtqh9P pklhIj+LrnXV0piL4aJ+Nth41VSMqRiF5CJzzu4dhpLi3xkTAWl3RrVOIPDDRPkRRczz LGeEQ5OYgS7gAqJKLcTEM5507r42mCunGIFSnkpmkEDny6UmVEx7jZRg1MAI/t/I2qBB ef+kZgBWsMZZ9T8WBOLb+WAOzIDVztmrq7qrwhF3Xq8lbla+GMA1HFKrt6gzGIl9N++x Y8A4jNlCG3YFEhqTaKQtAYYvgPqeatL8s3DK5fzBdFez/+096CFyo28Jfa7x4cJ/BC2I kCHg== X-Gm-Message-State: ANoB5pnrFc8ZiQrQVo2unFAVasLx6ZwvNZ+oqA2jjVhTnW9uPLksgiLV ymREydPspmaJzvHVQ/T6Y0rLgA== X-Received: by 2002:a2e:be85:0:b0:26f:db34:a151 with SMTP id a5-20020a2ebe85000000b0026fdb34a151mr6879475ljr.20.1670958646572; Tue, 13 Dec 2022 11:10:46 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id w28-20020a05651c119c00b0026dfbdfc1ddsm372023ljo.11.2022.12.13.11.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 11:10:46 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Vinod Koul , Konrad Dybcio , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] arm64: dts: qcom: sm8450-nagara: Set up camera regulators Date: Tue, 13 Dec 2022 20:10:34 +0100 Message-Id: <20221213191036.611241-5-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213191036.611241-1-konrad.dybcio@linaro.org> References: <20221213191036.611241-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752127195381521657?= X-GMAIL-MSGID: =?utf-8?q?1752127195381521657?= Set up gpio-controlled fixed regulators for camera on PDX223 and fix up the existing ones in common and PDX224 trees. Signed-off-by: Konrad Dybcio --- .../qcom/sm8450-sony-xperia-nagara-pdx223.dts | 38 +++++++++++++++++++ .../qcom/sm8450-sony-xperia-nagara-pdx224.dts | 15 +++++++- .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 16 +++++++- 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts index 561cd4f09ab7..daf2f91f356e 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts @@ -11,6 +11,26 @@ / { model = "Sony Xperia 1 IV"; compatible = "sony,pdx223", "qcom,sm8450"; + + imx316_lvdd_regulator: imx316-lvdd-regulator { + compatible = "regulator-fixed"; + regulator-name = "imx316_lvdd_regulator"; + gpio = <&pm8350b_gpios 6 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwr_ld_en>; + }; + + tcs3490_vdd_regulator: rgbcir-vdd-regulator { + compatible = "regulator-fixed"; + regulator-name = "tcs3490_vdd_regulator"; + gpio = <&pm8350c_gpios 6 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&rgbc_ir_pwr_en>; + }; }; &pm8350b_gpios { @@ -22,6 +42,15 @@ &pm8350b_gpios { "CAM_PWR_LD_EN", "NC", "FOCUS_N"; + + cam_pwr_ld_en: cam-pwr-ld-en-state { + pins = "gpio6"; + function = "normal"; + qcom,drive-strength = ; + power-source = <0>; + drive-push-pull; + output-low; + }; }; &pm8350c_gpios { @@ -34,6 +63,15 @@ &pm8350c_gpios { "NC", "NC", "WIDEC_PWR_EN"; + + rgbc_ir_pwr_en: rgbc-ir-pwr-en-state { + pins = "gpio6"; + function = "normal"; + qcom,drive-strength = ; + power-source = <1>; + drive-push-pull; + output-low; + }; }; &tlmm { diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts index fc9d74d0f227..dc4de2d3fe48 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts @@ -12,11 +12,14 @@ / { model = "Sony Xperia 5 IV"; compatible = "sony,pdx224", "qcom,sm8450"; - imx563_vdig_vreg: imx563-vdig-regulator { + imx563_vdig_regulator: imx563-vdig-regulator { compatible = "regulator-fixed"; - regulator-name = "imx563_vdig_vreg"; + regulator-name = "imx563_vdig_regulator"; gpio = <&tlmm 22 GPIO_ACTIVE_HIGH>; enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&uwidec_pwr_en>; }; }; @@ -254,4 +257,12 @@ &tlmm { "APPS_I2C_0_SCL", "CCI_I2C3_SDA", "CCI_I2C3_SCL"; + + uwidec_pwr_en: uwidec-pwr-en-state { + pins = "gpio22"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; }; diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi index 3d96b6757aa3..e26bd077d3d9 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi @@ -3,6 +3,7 @@ * Copyright (c) 2022, Konrad Dybcio */ +#include #include #include "sm8450.dtsi" #include "pm8350.dtsi" @@ -93,11 +94,14 @@ ramoops@ffc00000 { }; /* Sadly, the voltages for these GPIO regulators are unknown. */ - imx650_vana_vreg: imx650-vana-regulator { + imx650_vana_regulator: imx650-vana-regulator { compatible = "regulator-fixed"; - regulator-name = "imx650_vana_vreg"; + regulator-name = "imx650_vana_regulator"; gpio = <&tlmm 23 GPIO_ACTIVE_HIGH>; enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&telec_pwr_en>; }; vph_pwr: vph-pwr-regulator { @@ -703,6 +707,14 @@ ts_int_default: ts-int-default-state { input-enable; }; + telec_pwr_en: telec-pwr-en-state { + pins = "gpio23"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; + sdc2_card_det_n: sd-card-det-n-state { pins = "gpio92"; function = "gpio";