Commit f9800dde authored by Douglas Anderson's avatar Douglas Anderson Committed by Bjorn Andersson

arm64: dts: qcom: sc7280: Clean up sdc1 / sdc2 pinctrl

This patch makes a few improvements to the way that sdc1 / sdc2
pinctrl is specified on sc7280:

1. There's no reason to "group" the sdc pins into one overarching node
and there's a downside: we have to replicate the hierarchy in the
board device tree files. Let's clean this up.

2. There's really not a lot of reason not to list the "pinctrl" for
sdc1 (eMMC) in the SoC dtsi file. These aren't GPIO pins and
everyone's going to specify the same pins.

3. Even though it's likely that boards will need to override pinctrl
for sdc2 (SD card) to add the card detect GPIO, we can be symmetric
and add it to the SoC dsti file.

4. Let's get rid of the word "on" from the normal config and add a
"sleep" suffix to the sleep config. This looks cleaner to me.

This is intended to be a no-op change but it could plausibly change
behavior depending on how the pinctrl code parses things. One thing to
note is that "SD card detect" is explicitly listed now as keeping its
pull enabled in sleep since we still want to detect card insertions
even if the controller is suspended (because no card is inserted). The
pinctrl framework likely did this anyway, but it's nice to see it
explicit.
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Reviewed-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220202132301.v3.4.I79baad7f52351aafb470f8b21a9fa79d7031ad6a@changeid
parent b1969bc5
...@@ -676,9 +676,6 @@ &qupv3_id_1 { ...@@ -676,9 +676,6 @@ &qupv3_id_1 {
&sdhc_1 { &sdhc_1 {
status = "okay"; status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sdc1_on>;
pinctrl-1 = <&sdc1_off>;
vmmc-supply = <&pp2950_l7b>; vmmc-supply = <&pp2950_l7b>;
vqmmc-supply = <&pp1800_l19b>; vqmmc-supply = <&pp1800_l19b>;
}; };
...@@ -686,9 +683,8 @@ &sdhc_1 { ...@@ -686,9 +683,8 @@ &sdhc_1 {
&sdhc_2 { &sdhc_2 {
status = "okay"; status = "okay";
pinctrl-names = "default", "sleep"; pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>, <&sd_cd>;
pinctrl-0 = <&sdc2_on>; pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>, <&sd_cd>;
pinctrl-1 = <&sdc2_off>;
vmmc-supply = <&pp2950_l9c>; vmmc-supply = <&pp2950_l9c>;
vqmmc-supply = <&ppvar_l6c>; vqmmc-supply = <&ppvar_l6c>;
...@@ -883,47 +879,38 @@ &qup_uart7_rx { ...@@ -883,47 +879,38 @@ &qup_uart7_rx {
bias-pull-up; bias-pull-up;
}; };
&sdc1_on { &sdc1_clk {
clk { bias-disable;
bias-disable; drive-strength = <16>;
drive-strength = <16>; };
};
cmd {
bias-pull-up;
drive-strength = <10>;
};
data { &sdc1_cmd {
bias-pull-up; bias-pull-up;
drive-strength = <10>; drive-strength = <10>;
}; };
rclk { &sdc1_data {
bias-pull-down; bias-pull-up;
}; drive-strength = <10>;
}; };
&sdc2_on { &sdc1_rclk {
clk { bias-pull-down;
bias-disable; };
drive-strength = <16>;
};
cmd { &sdc2_clk {
bias-pull-up; bias-disable;
drive-strength = <10>; drive-strength = <16>;
}; };
data { &sdc2_cmd {
bias-pull-up; bias-pull-up;
drive-strength = <10>; drive-strength = <10>;
}; };
sd-cd { &sdc2_data {
pins = "gpio91"; bias-pull-up;
bias-pull-up; drive-strength = <10>;
};
}; };
/* PINCTRL - board-specific pinctrl */ /* PINCTRL - board-specific pinctrl */
...@@ -1311,6 +1298,12 @@ qup_uart7_sleep_tx: qup-uart7-sleep-tx { ...@@ -1311,6 +1298,12 @@ qup_uart7_sleep_tx: qup-uart7-sleep-tx {
bias-pull-up; bias-pull-up;
}; };
sd_cd: sd-cd {
pins = "gpio91";
function = "gpio";
bias-pull-up;
};
tp_int_odl: tp-int-odl { tp_int_odl: tp-int-odl {
pins = "gpio102"; pins = "gpio102";
function = "gpio"; function = "gpio";
......
...@@ -278,10 +278,6 @@ &qupv3_id_1 { ...@@ -278,10 +278,6 @@ &qupv3_id_1 {
&sdhc_1 { &sdhc_1 {
status = "okay"; status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sdc1_on>;
pinctrl-1 = <&sdc1_off>;
non-removable; non-removable;
no-sd; no-sd;
no-sdio; no-sdio;
...@@ -293,9 +289,8 @@ &sdhc_1 { ...@@ -293,9 +289,8 @@ &sdhc_1 {
&sdhc_2 { &sdhc_2 {
status = "okay"; status = "okay";
pinctrl-names = "default", "sleep"; pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>, <&sd_cd>;
pinctrl-0 = <&sdc2_on>; pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>, <&sd_cd>;
pinctrl-1 = <&sdc2_off>;
vmmc-supply = <&vreg_l9c_2p9>; vmmc-supply = <&vreg_l9c_2p9>;
vqmmc-supply = <&vreg_l6c_2p9>; vqmmc-supply = <&vreg_l6c_2p9>;
...@@ -424,6 +419,40 @@ &qup_uart7_rx { ...@@ -424,6 +419,40 @@ &qup_uart7_rx {
bias-pull-up; bias-pull-up;
}; };
&sdc1_clk {
bias-disable;
drive-strength = <16>;
};
&sdc1_cmd {
bias-pull-up;
drive-strength = <10>;
};
&sdc1_data {
bias-pull-up;
drive-strength = <10>;
};
&sdc1_rclk {
bias-pull-down;
};
&sdc2_clk {
bias-disable;
drive-strength = <16>;
};
&sdc2_cmd {
bias-pull-up;
drive-strength = <10>;
};
&sdc2_data {
bias-pull-up;
drive-strength = <10>;
};
&tlmm { &tlmm {
bt_en: bt-en { bt_en: bt-en {
pins = "gpio85"; pins = "gpio85";
...@@ -496,53 +525,17 @@ qup_uart7_sleep_rx: qup-uart7-sleep-rx { ...@@ -496,53 +525,17 @@ qup_uart7_sleep_rx: qup-uart7-sleep-rx {
bias-pull-up; bias-pull-up;
}; };
sw_ctrl: sw-ctrl { sd_cd: sd-cd {
pins = "gpio86"; pins = "gpio91";
function = "gpio"; function = "gpio";
input-enable;
bias-pull-down;
};
};
&sdc1_on {
clk {
bias-disable;
drive-strength = <16>;
};
cmd {
bias-pull-up; bias-pull-up;
drive-strength = <10>;
}; };
data { sw_ctrl: sw-ctrl {
bias-pull-up; pins = "gpio86";
drive-strength = <10>; function = "gpio";
}; input-enable;
rclk {
bias-pull-down; bias-pull-down;
}; };
}; };
&sdc2_on {
clk {
bias-disable;
drive-strength = <16>;
};
cmd {
bias-pull-up;
drive-strength = <10>;
};
data {
bias-pull-up;
drive-strength = <10>;
};
sd-cd {
pins = "gpio91";
bias-pull-up;
};
};
...@@ -616,6 +616,9 @@ qfprom: efuse@784000 { ...@@ -616,6 +616,9 @@ qfprom: efuse@784000 {
sdhc_1: sdhci@7c4000 { sdhc_1: sdhci@7c4000 {
compatible = "qcom,sc7280-sdhci", "qcom,sdhci-msm-v5"; compatible = "qcom,sc7280-sdhci", "qcom,sdhci-msm-v5";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sdc1_clk>, <&sdc1_cmd>, <&sdc1_data>, <&sdc1_rclk>;
pinctrl-1 = <&sdc1_clk_sleep>, <&sdc1_cmd_sleep>, <&sdc1_data_sleep>, <&sdc1_rclk_sleep>;
status = "disabled"; status = "disabled";
reg = <0 0x007c4000 0 0x1000>, reg = <0 0x007c4000 0 0x1000>,
...@@ -2427,6 +2430,9 @@ apss_merge_funnel_in: endpoint { ...@@ -2427,6 +2430,9 @@ apss_merge_funnel_in: endpoint {
sdhc_2: sdhci@8804000 { sdhc_2: sdhci@8804000 {
compatible = "qcom,sc7280-sdhci", "qcom,sdhci-msm-v5"; compatible = "qcom,sc7280-sdhci", "qcom,sdhci-msm-v5";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sdc2_clk>, <&sdc2_cmd>, <&sdc2_data>;
pinctrl-1 = <&sdc2_clk_sleep>, <&sdc2_cmd_sleep>, <&sdc2_data_sleep>;
status = "disabled"; status = "disabled";
reg = <0 0x08804000 0 0x1000>; reg = <0 0x08804000 0 0x1000>;
...@@ -3945,81 +3951,74 @@ qup_uart15_rx: qup-uart15-rx { ...@@ -3945,81 +3951,74 @@ qup_uart15_rx: qup-uart15-rx {
function = "qup17"; function = "qup17";
}; };
sdc1_on: sdc1-on { sdc1_clk: sdc1-clk {
clk { pins = "sdc1_clk";
pins = "sdc1_clk"; };
};
cmd { sdc1_cmd: sdc1-cmd {
pins = "sdc1_cmd"; pins = "sdc1_cmd";
}; };
data { sdc1_data: sdc1-data {
pins = "sdc1_data"; pins = "sdc1_data";
}; };
rclk { sdc1_rclk: sdc1-rclk {
pins = "sdc1_rclk"; pins = "sdc1_rclk";
};
}; };
sdc1_off: sdc1-off { sdc1_clk_sleep: sdc1-clk-sleep {
clk { pins = "sdc1_clk";
pins = "sdc1_clk"; drive-strength = <2>;
drive-strength = <2>; bias-bus-hold;
bias-bus-hold; };
};
cmd { sdc1_cmd_sleep: sdc1-cmd-sleep {
pins = "sdc1_cmd"; pins = "sdc1_cmd";
drive-strength = <2>; drive-strength = <2>;
bias-bus-hold; bias-bus-hold;
}; };
data { sdc1_data_sleep: sdc1-data-sleep {
pins = "sdc1_data"; pins = "sdc1_data";
drive-strength = <2>; drive-strength = <2>;
bias-bus-hold; bias-bus-hold;
}; };
rclk { sdc1_rclk_sleep: sdc1-rclk-sleep {
pins = "sdc1_rclk"; pins = "sdc1_rclk";
bias-bus-hold; drive-strength = <2>;
}; bias-bus-hold;
}; };
sdc2_on: sdc2-on { sdc2_clk: sdc2-clk {
clk { pins = "sdc2_clk";
pins = "sdc2_clk"; };
};
cmd { sdc2_cmd: sdc2-cmd {
pins = "sdc2_cmd"; pins = "sdc2_cmd";
}; };
data { sdc2_data: sdc2-data {
pins = "sdc2_data"; pins = "sdc2_data";
};
}; };
sdc2_off: sdc2-off { sdc2_clk_sleep: sdc2-clk-sleep {
clk { pins = "sdc2_clk";
pins = "sdc2_clk"; drive-strength = <2>;
drive-strength = <2>; bias-bus-hold;
bias-bus-hold; };
};
cmd { sdc2_cmd_sleep: sdc2-cmd-sleep {
pins ="sdc2_cmd"; pins = "sdc2_cmd";
drive-strength = <2>; drive-strength = <2>;
bias-bus-hold; bias-bus-hold;
}; };
data { sdc2_data_sleep: sdc2-data-sleep {
pins ="sdc2_data"; pins = "sdc2_data";
drive-strength = <2>; drive-strength = <2>;
bias-bus-hold; bias-bus-hold;
};
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment