arm64: dts: qcom: sdm845-tama: Add camera GPIO regulators
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Thu, 24 Aug 2023 09:58:54 +0000 (11:58 +0200)
committerBjorn Andersson <andersson@kernel.org>
Wed, 20 Sep 2023 02:42:12 +0000 (19:42 -0700)
Like on many other platforms, Tama devices utilize lots of GPIO-
enabled regulators for the camera sensors. Define them in the DT.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230824-topic-tama_gpio-v1-3-014e9d198dce@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi

index 430857233967398df90767f050e8c693553131ff..b02a1dc5fecd6c0b4bab6888c835a60c4b29d833 100644 (file)
                };
        };
 
+       cam_vana_front_vreg: cam-vana-front-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "cam_vana_front_vreg";
+               gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-0 = <&chat_cam_pwr_en>;
+               pinctrl-names = "default";
+       };
+
+       cam_vana_rear_vreg: cam-vana-rear-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "cam_vana_rear_vreg";
+               gpio = <&tlmm 27 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-0 = <&main_cam_pwr_en>;
+               pinctrl-names = "default";
+       };
+
+       cam_vio_vreg: cam-vio-reagulator {
+               compatible = "regulator-fixed";
+               regulator-name = "cam_vio_vreg";
+               gpio = <&pmi8998_gpios 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-0 = <&cam_io_en>;
+               pinctrl-names = "default";
+       };
+
        vph_pwr: vph-pwr-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vph_pwr";
        };
 };
 
+&pmi8998_gpios {
+       cam_io_en: cam-io-en-state {
+               pins = "gpio12";
+               function = "normal";
+               qcom,drive-strength = <3>;
+               power-source = <0>;
+               drive-push-pull;
+               output-low;
+       };
+};
+
 &pmi8998_wled {
        default-brightness = <800>;
        qcom,switching-freq = <800>;
                bias-pull-down;
        };
 
+       chat_cam_pwr_en: chat-cam-pwr-en-state {
+               pins = "gpio8";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+               output-low;
+       };
+
        sde_te_active_sleep: sde-te-active-sleep-state {
                pins = "gpio10";
                function = "mdp_vsync";
                bias-pull-down;
        };
 
+       main_cam_pwr_en: main-cam-pwr-en-state {
+               pins = "gpio27";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+               output-low;
+       };
+
        ts_default: ts-default-state {
                reset-pins {
                        pins = "gpio99";