arm64: dts: qcom: qcm6490-fairphone-fp5: Enable UFS
authorLuca Weiss <luca.weiss@fairphone.com>
Mon, 2 Oct 2023 12:30:41 +0000 (14:30 +0200)
committerBjorn Andersson <andersson@kernel.org>
Sat, 9 Dec 2023 03:33:11 +0000 (19:33 -0800)
Enable the UFS phy and controller so that we can access the internal
storage of the phone.

At the same time we need to bump the minimum voltage used for UFS VCC,
otherwise it doesn't initialize properly. The 2.952V is taken from the
vcc-voltage-level property downstream.

See also the following link for more information about the VCCQ/VCCQ2:
https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-extra/devicetree/+/1590a3739e7dc29d2597307881553236d492f188/fp5/yupik-idp-pm7250b.dtsi#207

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20231002-fp5-ufs-v2-1-e2d7de522134@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts

index d0b1e4e507ff93db0013788e6a70d77227ec5ba2..85391bed6376eb618687f5b2648ff7f8ce39f277 100644 (file)
                };
 
                vreg_l7b: ldo7 {
-                       regulator-min-microvolt = <2400000>;
-                       regulator-max-microvolt = <3544000>;
+                       /* Constrained for UFS VCC, at least until UFS driver scales voltage */
+                       regulator-min-microvolt = <2952000>;
+                       regulator-max-microvolt = <2952000>;
                        regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
                };
 
        };
 };
 
+&ufs_mem_hc {
+       reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+
+       vcc-supply = <&vreg_l7b>;
+       vcc-max-microamp = <800000>;
+       /*
+        * Technically l9b enables an eLDO (supplied by s1b) which then powers
+        * VCCQ2 of the UFS.
+        */
+       vccq-supply = <&vreg_l9b>;
+       vccq-max-microamp = <900000>;
+
+       status = "okay";
+};
+
+&ufs_mem_phy {
+       vdda-phy-supply = <&vreg_l10c>;
+       vdda-pll-supply = <&vreg_l6b>;
+
+       status = "okay";
+};
+
 &usb_1 {
        status = "okay";
 };