summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2023-05-30 09:15:22 +0200
committerBjorn Andersson <andersson@kernel.org>2023-06-13 16:27:46 -0700
commitdfbda20dabaa1f284abd550035db5887384c8e4c (patch)
tree2ce455f9788f8be3e30791703484c2539ecd2159 /arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
parentf43b6dc7d56ecbd96d8dfb3c3225c46e18f1b842 (diff)
arm64: dts: qcom: msm8916/39: Fix SD card detect pinctrl
The current SD card detect pinctrl setup configures bias-pull-up for the "default" (active) case and bias-disable for the "sleep" case. Before commit b5c833b703cc ("mmc: sdhci-msm: Set IO pins in low power state during suspend") the pull up was permanently active. Since then it is only active when a valid SD card is inserted. This does not really make sense: For an active-low CD, the pull up is needed to pull the GPIO high when the card is not inserted. When the card gets inserted CD is shorted to ground (low). This means right now the pull-up is removed exactly when it is needed to detect the next card insertion. Generally, applying different bias for CD does not really make sense. It should always stay the same so card removals and insertions can be detected properly. The reason why card detection still works fine in practice is that most boards seem to have external pull up on the CD pin. However, this means that there is no need to configure an internal pull-up at all and we can keep bias-disable permanently. There are also some boards with different CD polarity (acer-a1-724) and with different GPIO number (huawei-g7). All in all this makes it obvious that the CD pin is board-specific and the pinctrl for it should be defined in the board DT. Move it to the boards that need it and use bias-disable permanently for the boards that seem to have external pull-up. The vendor device tree for msm8939-sony-xperia-kanuti-tulip suggests that it needs the internal pull-up permanently [1] so it gets bias-pull-up to be sure. [1]: https://github.com/sonyxperiadev/kernel/blob/57b5050e340f40a88e1ddb8d16fd9adb44418923/arch/arm/boot/dts/qcom/msm8939-kanuti_tulip.dtsi#L634-L636 Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230529-msm8916-pinctrl-v1-1-11f540b51c93@gerhold.net
Diffstat (limited to 'arch/arm64/boot/dts/qcom/msm8916-pins.dtsi')
-rw-r--r--arch/arm64/boot/dts/qcom/msm8916-pins.dtsi17
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
index 1b60d42a13c7..c2149bcf53c4 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
@@ -380,23 +380,6 @@
};
};
- pmx-sdc2-cd-pin-state {
- sdc2_cd_on: cd-on-pins {
- pins = "gpio38";
- function = "gpio";
-
- drive-strength = <2>;
- bias-pull-up;
- };
- sdc2_cd_off: cd-off-pins {
- pins = "gpio38";
- function = "gpio";
-
- drive-strength = <2>;
- bias-disable;
- };
- };
-
cdc-pdm-lines-state {
cdc_pdm_lines_act: pdm-lines-on-pins {
pins = "gpio63", "gpio64", "gpio65", "gpio66",