Skip to content

Commit

Permalink
arm64: dts: qcom: sm6125: Move sdc2 pinctrl from seine-pdx201 to sm6125
Browse files Browse the repository at this point in the history
[ Upstream commit 6990640 ]

Both the sdc2-on and sdc2-off pinctrl nodes are used by the
sdhci@4784000 node in sm6125.dtsi.  Surprisingly sdc2-off is defined in
sm6125, yet its sdc2-on counterpart is only defined in board-specific DT
for the Sony Seine PDX201 board/device resulting in an "undefined label
&sdc2_state_on" error if sm6125.dtsi were included elsewhere.
This sm6125 base dtsi should not rely on externally defined labels; the
properties referencing it should then also be written externally.
Since the sdc2-on pin configuration is board-independent just like
sdc2-off, move it from seine-pdx201.dts into sm6125.dtsi.

The SDCard-detect pin (gpio98) is however board-specific, and remains as
an overwrite in seine-pdx201.dts for both the on and off state.

As a drive-by cleanup, reorder bias- and drive-strength properties.

Fixes: cff4bba ("arm64: dts: qcom: Add support for SM6125")
Fixes: 82e1783 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II")
Signed-off-by: Marijn Suijten <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
MarijnS95 authored and gregkh committed Aug 17, 2022
1 parent 579ea4a commit eb007ca
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
34 changes: 8 additions & 26 deletions arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,16 @@
&sdc2_state_off {
sd-cd {
pins = "gpio98";
drive-strength = <2>;
bias-disable;
};
};

&sdc2_state_on {
sd-cd {
pins = "gpio98";
drive-strength = <2>;
bias-pull-up;
};
};

Expand All @@ -102,32 +110,6 @@

&tlmm {
gpio-reserved-ranges = <22 2>, <28 6>;

sdc2_state_on: sdc2-on {
clk {
pins = "sdc2_clk";
bias-disable;
drive-strength = <16>;
};

cmd {
pins = "sdc2_cmd";
bias-pull-up;
drive-strength = <10>;
};

data {
pins = "sdc2_data";
bias-pull-up;
drive-strength = <10>;
};

sd-cd {
pins = "gpio98";
bias-pull-up;
drive-strength = <2>;
};
};
};

&usb3 {
Expand Down
24 changes: 22 additions & 2 deletions arch/arm64/boot/dts/qcom/sm6125.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -389,20 +389,40 @@
sdc2_state_off: sdc2-off {
clk {
pins = "sdc2_clk";
bias-disable;
drive-strength = <2>;
bias-disable;
};

cmd {
pins = "sdc2_cmd";
drive-strength = <2>;
bias-pull-up;
};

data {
pins = "sdc2_data";
drive-strength = <2>;
bias-pull-up;
};
};

sdc2_state_on: sdc2-on {
clk {
pins = "sdc2_clk";
drive-strength = <16>;
bias-disable;
};

cmd {
pins = "sdc2_cmd";
drive-strength = <10>;
bias-pull-up;
};

data {
pins = "sdc2_data";
drive-strength = <10>;
bias-pull-up;
drive-strength = <2>;
};
};
};
Expand Down

0 comments on commit eb007ca

Please sign in to comment.