From patchwork Thu Nov 8 10:44:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10673987 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 6CE8A1057 for ; Thu, 8 Nov 2018 10:45:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5630C2CF65 for ; Thu, 8 Nov 2018 10:45:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46FC62CE3F; Thu, 8 Nov 2018 10:45:13 +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 C8D152CE3F for ; Thu, 8 Nov 2018 10:45:12 +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=jvRCpjZLcBdFQS3qk2j5ju1M/rir41nGanxHx5Y6Gfo=; b=oDB5Hw3aT3D+Cu bz5I57OqP/9wPqlExcf0UMpJNYRZ1ZcJgg9lsCrR/Klf7d1BUeNHIb6h/D5ND1UGGydwGDA+saWFO HlUTOh2aYBxik+7D4AqbBRH4r8hNfqnUlUgbsLAPcwYHRrzEgADT2YJ/wLo9BqnpVvvA2DYP/fwSV /J1pI3tUGDhx2bqNopZKdhEs/pvfNf375zCEdw0QXsI8wAB78Rx6lpxG/yErvV9WhA8omXWKkCOSt IP8kx4JehRwnKGMqqN6iPwY6Fn1YH58rp2pP6AKU9bdK25DAqzIsjakW36+P02Vzc1vNsakuEccEk U+FjY4yG5aZIdxDwtIsg==; 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 1gKhoF-0000Fc-1A; Thu, 08 Nov 2018 10:45:11 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKho9-0007fj-T9 for linux-amlogic@lists.infradead.org; Thu, 08 Nov 2018 10:45:07 +0000 Received: by mail-wm1-x342.google.com with SMTP id f1-v6so1232313wmg.1 for ; Thu, 08 Nov 2018 02:44:55 -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=Ej2YST9rdgBvI/3S+E/v4xZNuOxlt8n1LsFdJ1JaCwE=; b=kVaPTjceCYjCUMMCNJHYyespSLFNykzmSK1sKH6uqlOxEtJmWi2UNBZO30j4GKcFpx RzxPfpo9R98AYm+5BP4ut9PcuRPRDwyJ9sv+5OPwfLZ+1DLZ0b2QbGbwJUgSr+CdHvNs kjXRPTxXZM4EyAkMfDnZnB4lcYSjqrwMMprPITwokYmrRfJs2t6BBvXY+dd/uDfihurl bF6kNAUo8hoYSoVFdRSOv77bdiMTpmbSvgS5nZJ4vp9S1zJh7zCjD+V47L6yKHFfkbQG pJfugqOE2/UfsdNpYsPvVZ/4wrGRrcEjczkqhxImNwirc/xJxFZYsQNAerkKIEANAL7B w5nw== 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=Ej2YST9rdgBvI/3S+E/v4xZNuOxlt8n1LsFdJ1JaCwE=; b=NP7K9zGTIPBOgxO+K4hqL0WfZgyP1ZCnoG/wvvRuBbf8KtmLTiGjP5S3t9HMq7m8q7 qoY5f5cuNuk2SgelqpMeAQKZGtPddA7RVuucwcoPMty1hbUhgsxu/QNzJwOk04mcAcgg YaxFzRG0zP7GIfbdhD0v/58SG16bjjS5pwz4PLWjOTO3bBYb1LfWilICLaDKwyEM90uG 41SapAy/zYKpNs+UMuV3w3xnXl1p6yKj2HEJ3hfYT52NrLrPbEgVxlku59TDDRggU4ko fOWZARrMspeflxP3f5fyxnxJs7iiISlIxDGN0PoJd2Kl3SR38lY7TCmai42ITxOnmBe6 GtEQ== X-Gm-Message-State: AGRZ1gJXfT0xgHq/lpNZcxWSRlGM/cw0whlFu4ad3xM7nsPD97B/Snw5 V6fEBWijtHCpeWoEFJSeRqwTjw== X-Google-Smtp-Source: AJdET5fFBtoKY7h6IChvJJVCsOVJDwqX9+4WLhf3+gnaiLkjfu77l90tW7epnk0pLjGRPo34UW9row== X-Received: by 2002:a1c:8d86:: with SMTP id p128-v6mr746220wmd.48.1541673894163; Thu, 08 Nov 2018 02:44:54 -0800 (PST) Received: from boomer.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id o130-v6sm5884800wmd.11.2018.11.08.02.44.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 02:44:53 -0800 (PST) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH 4/4] ARM: dts: meson: consistently disable pin bias Date: Thu, 8 Nov 2018 11:44:26 +0100 Message-Id: <20181108104426.1877-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108104426.1877-1-jbrunet@baylibre.com> References: <20181108104426.1877-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181108_024506_075956_4A71BBC6 X-CRM114-Status: GOOD ( 14.15 ) 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 --- 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; }; }; };