From patchwork Fri Nov 9 14:04:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10675981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CBBF15A6 for ; Fri, 9 Nov 2018 14:05:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE5AA2EA87 for ; Fri, 9 Nov 2018 14:05:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E241B2EA99; Fri, 9 Nov 2018 14:05:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D2822EA87 for ; Fri, 9 Nov 2018 14:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Svv16DaP+wv/fVudnlHmIfNOaTpqaVG9ILdLar+Mkmg=; b=dydKwouAjmYLyw +rp9lNBC+/IRygguaEEO0Unqj16a06wrJPEYDCW/TUPeXXg0ZAQAzyDYMwergoaU3pXJcPsYQiLy/ tqiFFRuDeaPM5VEEcSgajpBiLqR7+a7eLh631iOBAeT4LtzXasneoiOpUPpxkvV1MvorH/YDTZY9g Q6LTJTChy1xE/pVt5WgjM3rT/rP3ROHjjwdT0IdR/IPMkJxtz0N7Orb70MVrfOTlJ436bzCYMi+YB Ajz4xDVewbFFwiVJwc3h1H2ITDxE6QxYUVzbLdDasTPGfusXeZik0ZOuDOhPk0H/AL0/0E/Wd4cxL 7BB5uECjthYsNHuc6zfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gL7PO-0001MR-9v; Fri, 09 Nov 2018 14:05:14 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gL7PJ-0000Ct-1Y for linux-amlogic@lists.infradead.org; Fri, 09 Nov 2018 14:05:12 +0000 Received: by mail-wr1-x444.google.com with SMTP id j17-v6so1996714wrq.11 for ; Fri, 09 Nov 2018 06:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5/+LTD+fuRT1vJpsOEDqaSSNT5CxZ1kKqaaiFemNQAc=; b=nOm2ynYWRy8mJ+DrTVG5b378frSIZWIq+mzRqi1werHbbBd2ouk2kmiA60ndUbxOr1 8fsx9BokSGX4hyc4xU9N14uWHo/FmTflKqlSsSmQKb07VsD5xgcFu6RZanFE9YiI22NX 9jJakJuKo+2wYc4ZdDmOhl6lDT8tJ6W6CsQq1E0WkcHmwmMtDc3SUkrhxXR2iqNQ+zwY m74KCVcP4uNRJH5uQe6mNCQNNAm8Aj0iE2E36mRV72DasuQEeICeHt06PWjiCSR+dR5c Fu6o0VlF01l86iBqtxwHlBrYTPh3KyRCe1MHHSPVj9HEa/MqXiB07tSHTtxZ4okNzg5C Y4HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5/+LTD+fuRT1vJpsOEDqaSSNT5CxZ1kKqaaiFemNQAc=; b=dR7naYniUTObqifBnFOIlTa/EfFF4i4FgT+dXkHgGFH50G2kOebe9lTOBP68BWLt7+ Tq/qyEWcheTVDT47ADEFxhdnezADdFgNJWI/w38RPSnduDkWEh0rDo6qUrS7k1AKGola r1S8Vf/eN0OUT5yvPL9kcZNBbzZ+vy4y+GqvW7MKOzrmNoCeGSq2ncHTq/unj3Y9HXdO fchwvcMMZVp10caXaY4fidQasIN39ipnHaR3BtQdV28xhP13z2BwAXRIvXqHdcYC0bQo GutPkBOYFb1GTgcBf1L3C7Eqs6/kQVfRTYhi23NplIZK6pUUFNkiZWNpqilm33WOFCqb UNjw== X-Gm-Message-State: AGRZ1gIB+HIGTtm+XnQu4V7VWucaK86tIsHYK969nZS6FH3+iWISlE6B sqBC/XIqr8SY/Ve10asFLTnKzw== X-Google-Smtp-Source: AJdET5epIfPIkhOvGZCStU7fzGfAT+stqgoM4MHpqUfF34YxLPp5f8heWxtzf/S5da/ygJtFD4GcjQ== X-Received: by 2002:adf:f24d:: with SMTP id b13-v6mr7646460wrp.142.1541772303455; Fri, 09 Nov 2018 06:05:03 -0800 (PST) Received: from boomer.baylibre.com ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id w18-v6sm15964987wrn.66.2018.11.09.06.05.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Nov 2018 06:05:02 -0800 (PST) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH v2 4/4] ARM: dts: meson: consistently disable pin bias Date: Fri, 9 Nov 2018 15:04:45 +0100 Message-Id: <20181109140445.17795-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109140445.17795-1-jbrunet@baylibre.com> References: <20181109140445.17795-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181109_060509_095065_447DD2C7 X-CRM114-Status: GOOD ( 14.38 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Martin Blumenstingl --- 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..08c54cf5420a 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -163,6 +163,7 @@ mux { groups = "uart_tx_ao_a", "uart_rx_ao_a"; function = "uart_ao"; + bias-disable; }; }; @@ -170,6 +171,7 @@ mux { groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao"; function = "i2c_mst_ao"; + bias-disable; }; }; @@ -177,6 +179,7 @@ mux { groups = "remote_input"; function = "remote"; + bias-disable; }; }; @@ -184,6 +187,7 @@ mux { groups = "pwm_f_ao"; function = "pwm_f_ao"; + bias-disable; }; }; }; @@ -238,6 +242,7 @@ groups = "sd_d0_a", "sd_d1_a", "sd_d2_a", "sd_d3_a", "sd_clk_a", "sd_cmd_a"; function = "sd_a"; + bias-disable; }; }; @@ -246,6 +251,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; }; }; @@ -254,6 +260,7 @@ groups = "sd_d0_c", "sd_d1_c", "sd_d2_c", "sd_d3_c", "sd_clk_c", "sd_cmd_c"; function = "sd_c"; + bias-disable; }; }; @@ -261,6 +268,7 @@ mux { groups = "nor_d", "nor_q", "nor_c", "nor_cs"; function = "nor"; + bias-disable; }; }; @@ -272,6 +280,7 @@ "eth_rxd1", "eth_rxd0", "eth_mdio", "eth_mdc"; function = "ethernet"; + bias-disable; }; }; @@ -279,6 +288,7 @@ mux { groups = "pwm_e"; function = "pwm_e"; + bias-disable; }; }; @@ -287,6 +297,7 @@ groups = "uart_tx_a1", "uart_rx_a1"; function = "uart_a"; + bias-disable; }; }; @@ -295,6 +306,7 @@ groups = "uart_cts_a1", "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..46b3564a6536 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -146,6 +146,7 @@ mux { groups = "uart_tx_ao_a", "uart_rx_ao_a"; function = "uart_ao"; + bias-disable; }; }; @@ -153,6 +154,7 @@ mux { 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; }; }; };