arm64: dts: qcom: sm8450-nagara: Set up camera regulators
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Thu, 29 Dec 2022 10:32:10 +0000 (11:32 +0100)
committerBjorn Andersson <andersson@kernel.org>
Wed, 11 Jan 2023 04:06:04 +0000 (22:06 -0600)
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 <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221229103212.984324-5-konrad.dybcio@linaro.org
arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts
arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx224.dts
arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi

index 561cd4f09ab70c1be588fc1910ccb44a51f16215..daf2f91f356ebd1ae5856c076bbfe461921a4bdb 100644 (file)
 / {
        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 {
                          "CAM_PWR_LD_EN",
                          "NC",
                          "FOCUS_N";
+
+       cam_pwr_ld_en: cam-pwr-ld-en-state {
+               pins = "gpio6";
+               function = "normal";
+               qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+               power-source = <0>;
+               drive-push-pull;
+               output-low;
+       };
 };
 
 &pm8350c_gpios {
                          "NC",
                          "NC",
                          "WIDEC_PWR_EN";
+
+       rgbc_ir_pwr_en: rgbc-ir-pwr-en-state {
+               pins = "gpio6";
+               function = "normal";
+               qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+               power-source = <1>;
+               drive-push-pull;
+               output-low;
+       };
 };
 
 &tlmm {
index fc9d74d0f227eb0ffc0f705c191cf90b8b769e26..dc4de2d3fe481a3bb6e6a2539c64e613a5fc5e73 100644 (file)
        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>;
        };
 };
 
                          "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;
+       };
 };
index 3c32ca9b55c71655934b6c4d0cf481d38615d64a..9d9d1338394689a65d9df263124f5c6d03fbdef8 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright (c) 2022, Konrad Dybcio <konrad.dybcio@somainline.org>
  */
 
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm8450.dtsi"
 #include "pm8350.dtsi"
        };
 
        /* 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 {
                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";