linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Kevin Hilman <khilman@baylibre.com>, Carlo Caione <carlo@caione.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] ARM: dts: meson: consistently disable pin bias
Date: Thu,  8 Nov 2018 11:44:26 +0100	[thread overview]
Message-ID: <20181108104426.1877-5-jbrunet@baylibre.com> (raw)
In-Reply-To: <20181108104426.1877-1-jbrunet@baylibre.com>

On Amlogic chipsets, the bias set through pinconf applies to the pad
itself, not only the GPIO function. This means that even when we change
the function of the pad from GPIO to anything else, the bias previously
set still applies.

As we have seen with the eMMC, depending on the bias type and the function,
it may trigger problems.

The underlying issue is that we inherit whatever was left by previous user
of the pad (pinconf, u-boot or the ROM code). As a consequence, the actual
setup we will get is undefined.

There is nothing mentioned in the documentation about pad bias and pinmux
function, however leaving it undefined is not an option.

This change consistently disable the pad bias for every pinmux functions.
It seems to work well, we can only assume that the necessary bias (if any)
is already provided by the pin function itself.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm/boot/dts/meson8.dtsi   | 12 ++++++++++++
 arch/arm/boot/dts/meson8b.dtsi  |  9 +++++++++
 arch/arm/boot/dts/meson8m2.dtsi |  1 +
 3 files changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 7162e0ca05b0..1e735c0d92e3 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -164,6 +164,7 @@
 				groups = "uart_tx_ao_a", "uart_rx_ao_a";
 				function = "uart_ao";
 			};
+			bias-disable;
 		};
 
 		i2c_ao_pins: i2c_mst_ao {
@@ -171,6 +172,7 @@
 				groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao";
 				function = "i2c_mst_ao";
 			};
+			bias-disable;
 		};
 
 		ir_recv_pins: remote {
@@ -178,6 +180,7 @@
 				groups = "remote_input";
 				function = "remote";
 			};
+			bias-disable;
 		};
 
 		pwm_f_ao_pins: pwm-f-ao {
@@ -185,6 +188,7 @@
 				groups = "pwm_f_ao";
 				function = "pwm_f_ao";
 			};
+			bias-disable;
 		};
 	};
 };
@@ -239,6 +243,7 @@
 					"sd_d3_a", "sd_clk_a", "sd_cmd_a";
 				function = "sd_a";
 			};
+			bias-disable;
 		};
 
 		sd_b_pins: sd-b {
@@ -247,6 +252,7 @@
 					"sd_d3_b", "sd_clk_b", "sd_cmd_b";
 				function = "sd_b";
 			};
+			bias-disable;
 		};
 
 		sd_c_pins: sd-c {
@@ -255,6 +261,7 @@
 					"sd_d3_c", "sd_clk_c", "sd_cmd_c";
 				function = "sd_c";
 			};
+			bias-disable;
 		};
 
 		spi_nor_pins: nor {
@@ -262,6 +269,7 @@
 				groups = "nor_d", "nor_q", "nor_c", "nor_cs";
 				function = "nor";
 			};
+			bias-disable;
 		};
 
 		eth_pins: ethernet {
@@ -273,6 +281,7 @@
 					 "eth_mdc";
 				function = "ethernet";
 			};
+			bias-disable;
 		};
 
 		pwm_e_pins: pwm-e {
@@ -280,6 +289,7 @@
 				groups = "pwm_e";
 				function = "pwm_e";
 			};
+			bias-disable;
 		};
 
 		uart_a1_pins: uart-a1 {
@@ -288,6 +298,7 @@
 				       "uart_rx_a1";
 				function = "uart_a";
 			};
+			bias-disable;
 		};
 
 		uart_a1_cts_rts_pins: uart-a1-cts-rts {
@@ -296,6 +307,7 @@
 				       "uart_rts_a1";
 				function = "uart_a";
 			};
+			bias-disable;
 		};
 	};
 };
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index cd1ca9dda126..6fc129ab4453 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -147,6 +147,7 @@
 				groups = "uart_tx_ao_a", "uart_rx_ao_a";
 				function = "uart_ao";
 			};
+			bias-disable;
 		};
 
 		ir_recv_pins: remote {
@@ -154,6 +155,7 @@
 				groups = "remote_input";
 				function = "remote";
 			};
+			bias-disable;
 		};
 	};
 };
@@ -220,6 +222,7 @@
 					 "eth_txd2",
 					 "eth_txd3";
 				function = "ethernet";
+				bias-disable;
 			};
 		};
 
@@ -235,6 +238,7 @@
 					 "eth_mdio_en",
 					 "eth_mdc";
 				function = "ethernet";
+				bias-disable;
 			};
 		};
 
@@ -242,6 +246,7 @@
 			mux {
 				groups = "i2c_sda_a", "i2c_sck_a";
 				function = "i2c_a";
+				bias-disable;
 			};
 		};
 
@@ -250,6 +255,7 @@
 				groups = "sd_d0_b", "sd_d1_b", "sd_d2_b",
 					"sd_d3_b", "sd_clk_b", "sd_cmd_b";
 				function = "sd_b";
+				bias-disable;
 			};
 		};
 
@@ -257,6 +263,7 @@
 			mux {
 				groups = "pwm_c1";
 				function = "pwm_c";
+				bias-disable;
 			};
 		};
 
@@ -265,6 +272,7 @@
 				groups = "uart_tx_b0",
 				       "uart_rx_b0";
 				function = "uart_b";
+				bias-disable;
 			};
 		};
 
@@ -273,6 +281,7 @@
 				groups = "uart_cts_b0",
 				       "uart_rts_b0";
 				function = "uart_b";
+				bias-disable;
 			};
 		};
 	};
diff --git a/arch/arm/boot/dts/meson8m2.dtsi b/arch/arm/boot/dts/meson8m2.dtsi
index 3e1f92273d7b..d1a28c2adac5 100644
--- a/arch/arm/boot/dts/meson8m2.dtsi
+++ b/arch/arm/boot/dts/meson8m2.dtsi
@@ -45,6 +45,7 @@
 				 "eth_rxd1", "eth_rxd0",
 				 "eth_mdio", "eth_mdc";
 			function = "ethernet";
+			bias-disable;
 		};
 	};
 };
-- 
2.19.1


  parent reply	other threads:[~2018-11-08 10:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 10:44 [PATCH 0/4] ARM: dts: meson: set pinmux bias Jerome Brunet
2018-11-08 10:44 ` [PATCH 1/4] arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux Jerome Brunet
2018-11-08 10:44 ` [PATCH 2/4] arm64: dts: meson: disable pad bias for mmc pinmuxes Jerome Brunet
2018-11-08 10:44 ` [PATCH 3/4] arm64: dts: meson: consistently disable pin bias Jerome Brunet
2018-11-08 10:44 ` Jerome Brunet [this message]
2018-11-09 13:49   ` [PATCH 4/4] ARM: " kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181108104426.1877-5-jbrunet@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=carlo@caione.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).