arm64: dts: qcom: sm7225-fairphone-fp4: Enable SD card
authorLuca Weiss <luca.weiss@fairphone.com>
Thu, 10 Nov 2022 15:15:06 +0000 (16:15 +0100)
committerBjorn Andersson <andersson@kernel.org>
Fri, 11 Nov 2022 20:29:57 +0000 (14:29 -0600)
Fairphone 4 uses sdhc_2 for the SD card, configure the pins for it and
enable it.

The regulators which are exclusively used for SDHCI have their maximum
voltage decreased to what downstream sets on the consumer side, like on
many other platforms and allowed to set the load.

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

index 30c94fd..1cb1405 100644 (file)
 
                vreg_l6e: ldo6 {
                        regulator-min-microvolt = <1700000>;
-                       regulator-max-microvolt = <3544000>;
+                       regulator-max-microvolt = <2950000>;
                        regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+                       regulator-allow-set-load;
+                       regulator-allowed-modes =
+                               <RPMH_REGULATOR_MODE_LPM
+                                RPMH_REGULATOR_MODE_HPM>;
                };
 
                vreg_l7e: ldo7 {
 
                vreg_l9e: ldo9 {
                        regulator-min-microvolt = <2700000>;
-                       regulator-max-microvolt = <3544000>;
+                       regulator-max-microvolt = <2960000>;
                        regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+                       regulator-allow-set-load;
+                       regulator-allowed-modes =
+                               <RPMH_REGULATOR_MODE_LPM
+                                RPMH_REGULATOR_MODE_HPM>;
                };
 
                vreg_l10e: ldo10 {
        status = "okay";
 };
 
+&sdc2_off_state {
+       sd-cd-pins {
+               pins = "gpio94";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+       };
+};
+
+&sdc2_on_state {
+       sd-cd-pins {
+               pins = "gpio94";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-pull-up;
+       };
+};
+
+&sdhc_2 {
+       vmmc-supply = <&vreg_l9e>;
+       vqmmc-supply = <&vreg_l6e>;
+
+       cd-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
+
+       status = "okay";
+};
+
 &tlmm {
        gpio-reserved-ranges = <13 4>, <56 2>;
 };