diff mbox series

[3/4] arm64: dts: qcom: msm8916: Use higher I2C drive-strength only on DB410c

Message ID 20200622151751.408995-4-stephan@gerhold.net
State Accepted
Commit 4a1f08cb58e522ef6c94a0b0dde4b483e1bbe1cd
Headers show
Series None | expand

Commit Message

Stephan Gerhold June 22, 2020, 3:17 p.m. UTC
Commit c240f29e75e6 ("arm64: dts: set the default i2c pin drive strength to 16mA")
changed the default drive-strength for I2C pins in msm8916-pins.dtsi
to the maximum possible (16 mA).

While this makes sense for apq8016-sbc (DB410c) where you can connect
an arbitrary amount of I2C devices with level shifters etc, there is
no need to use a higher drive strength for other MSM8916 devices.
The minimum drive strength (2 mA) seems to be totally sufficient
to have everything work there.

With the short pinctrl nodes introduced earlier we can easily override
the drive-strength only for apq8016-sbc now. Use that and change
the default back to 2 mA.

i2c1_default/i2c5_default are already using 2 mA because they were
added separately later and are not used in apq8016-sbc.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi  | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/msm8916-pins.dtsi |  6 +++---
 2 files changed, 19 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 6fff96a158e9..194343510dcb 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -779,6 +779,22 @@  l18 {
 	};
 };
 
+/*
+ * 2mA drive strength is not enough when connecting multiple
+ * I2C devices with different pull up resistors.
+ */
+&i2c2_default {
+	drive-strength = <16>;
+};
+
+&i2c4_default {
+	drive-strength = <16>;
+};
+
+&i2c6_default {
+	drive-strength = <16>;
+};
+
 &msmgpio {
 	msmgpio_leds: msmgpio-leds {
 		pins = "gpio21", "gpio120";
diff --git a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
index e1d4f8df7e79..4dc437f13fa5 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi
@@ -208,7 +208,7 @@  i2c2_default: i2c2-default {
 		pins = "gpio6", "gpio7";
 		function = "blsp_i2c2";
 
-		drive-strength = <16>;
+		drive-strength = <2>;
 		bias-disable;
 	};
 
@@ -224,7 +224,7 @@  i2c4_default: i2c4-default {
 		pins = "gpio14", "gpio15";
 		function = "blsp_i2c4";
 
-		drive-strength = <16>;
+		drive-strength = <2>;
 		bias-disable;
 	};
 
@@ -256,7 +256,7 @@  i2c6_default: i2c6-default {
 		pins = "gpio22", "gpio23";
 		function = "blsp_i2c6";
 
-		drive-strength = <16>;
+		drive-strength = <2>;
 		bias-disable;
 	};