arm64: dts: qcom: sm6375-pdx225: Enable SD card slot
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Mon, 14 Nov 2022 10:50:43 +0000 (11:50 +0100)
committerBjorn Andersson <andersson@kernel.org>
Tue, 6 Dec 2022 17:05:30 +0000 (11:05 -0600)
Set SDHCI VMMC/VQMMC to <=2v96 and allow load setting by the SDHCI
driver, as required by this use case.

Configure the SD Card Detect pin, enable the SDHCI2 controller and
assign it the aforementioned regulators.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221114105043.36698-4-konrad.dybcio@linaro.org
arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts

index 004a4d2f709975b2587ea33edc9fd2947efd6990..5d4fc17e2fc45274027dd3a251fd52bc18c2658c 100644 (file)
 
                pm6125_l5: l5 {
                        regulator-min-microvolt = <1650000>;
-                       regulator-max-microvolt = <3050000>;
+                       regulator-max-microvolt = <2960000>;
+                       regulator-allow-set-load;
                };
 
                pm6125_l6: l6 {
 
                pm6125_l22: l22 {
                        regulator-min-microvolt = <2704000>;
-                       regulator-max-microvolt = <3544000>;
+                       regulator-max-microvolt = <2960000>;
+                       regulator-allow-set-load;
                };
 
                pm6125_l23: l23 {
        };
 };
 
+&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 {
+       status = "okay";
+
+       vmmc-supply = <&pm6125_l22>;
+       vqmmc-supply = <&pm6125_l5>;
+
+       cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
+};
+
 &tlmm {
        gpio-reserved-ranges = <13 4>;