From patchwork Thu Nov 8 10:44:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10673985 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 E599913BF for ; Thu, 8 Nov 2018 10:45:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D527E2CF45 for ; Thu, 8 Nov 2018 10:45:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C93D82CF65; Thu, 8 Nov 2018 10:45:09 +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 6AA872CF45 for ; Thu, 8 Nov 2018 10:45:09 +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: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:In-Reply-To:References: List-Owner; bh=ZOw/Ptcgf4V3CeamPrRh/WPXDFjeHCTFnlItgODFsoo=; b=EMLbyR7O976E1l A2N6SdZrZoj3/40P0DMTXEBBi27Nza4JeFsiTHQH2dwtPyyUv7CaKAJwgB4fS8hUCy9ADpLNAyRtO XwgICCa/Ii0ktxvEkgqbF3jECXJ1GXFYmcYYaNCn6GNVJL58B7zUuYCIao04/LJvFX82DbIG78BP4 ksKqNnqP4XjuN7DrDEvJnjxIUDgcdFGOeD550siVyvRhYcAPh2K32NjKG/OSpKXgriTX1Ub2Yk6WI 1I/bXPqGMymeuN5548lscdZ1KBeVTv8ovk20Zq20cahSSYDPjg1RHcRGf2D14BpAOd8x2FpK68dfk WiiVW8ffahTw02XxVMGw==; 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 1gKhoC-0008P1-5D; Thu, 08 Nov 2018 10:45:08 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKho6-0007fO-Ns for linux-amlogic@lists.infradead.org; Thu, 08 Nov 2018 10:45:06 +0000 Received: by mail-wm1-x343.google.com with SMTP id a8-v6so714473wmf.1 for ; Thu, 08 Nov 2018 02:44:51 -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:mime-version :content-transfer-encoding; bh=vhPNVmfRa7pNj+I7+aRTRJyzPUhJcyunyJ631PKqVN0=; b=KAuDRxfV51gyqH2rydf36nfkogw6aaFx9BalBn1zZaWDQCAWu3nPiQZHmSWC9i7CsS LU/i8c+wmoYJ4s1jDGJiZMeurcXyb/56EmgGoBMdhofORAmcrdu86yd3U2Wzg9+OCWGn iT/IdNpg/nMGMlllh706QcbIjc8lUEseB92YGm+QWGKY+PbTY7+sANcfGFirqOV6IOct +gkrV2feHpoun1ip/T6Wu5+PqUP5JrqqbPWtlAL5rbRijy93TofjQT+2VL/L4BSkPwuJ rvEhFV7BA0yq9KAI1Ay665ZG/XPoVrvoay3JQtafh7MpBU9ox4kCG2yLfO2qbEfevHq2 Qq5Q== 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:mime-version :content-transfer-encoding; bh=vhPNVmfRa7pNj+I7+aRTRJyzPUhJcyunyJ631PKqVN0=; b=TjzJ+ESgQkO+4YSu5/Wt8SvFn9DOjjORzQIKDzW9JaDcnubA7DKuhT24zhXV7uJvrY lWs7RTnGv5dRBDcZiBirgHFGqYz40Y0tXy0mGAr05c2aOjbiWQqFs7o31djndV1mGuxu FFiCe2+nR0BM8EtTbxrTuHnz02oa4hqTJBaNTYYwbPLJHkuKxKlFFXEbcnNa/cUf5wvN ckKD3AaX/VMigeMsnOx3Iag5DllXxQw4vJwlxG6hJyggFXitk/1zqHv/CxitYHPl0WZ2 CoHLgwbKxiGv21lqRtGap+UI//KYg3saFhsx51DuGByYu6Q49qKChs2K0rHpGqkfiEeb /ngw== X-Gm-Message-State: AGRZ1gK7GatQxsZSSNFtH4wC8rYYhf++dH0rodxYVTcawNCTI9psakpW JP4EEpd1DFQFfH/8m5KPcwV1JQ== X-Google-Smtp-Source: AJdET5cS05uLjdFe4jY+1B2N4ffNf/4+hvR09ODCfpJg2AtYSVnxsz8CodO99dJDY3Y3pPypWnLg2A== X-Received: by 2002:a1c:38c1:: with SMTP id f184-v6mr780517wma.24.1541673889832; Thu, 08 Nov 2018 02:44:49 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 02:44:49 -0800 (PST) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH 0/4] ARM: dts: meson: set pinmux bias Date: Thu, 8 Nov 2018 11:44:22 +0100 Message-Id: <20181108104426.1877-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181108_024502_794299_54190C92 X-CRM114-Status: GOOD ( 16.14 ) 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. While trying to boot from SPI, I noticed the eMMC was not working anymore. Even if the related eMMC pad are not used by the SPI, the ROM code sets a pull-down on the eMMC pad and leaves it that way. This breaks the eMMC later on, in both u-boot and Linux. 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 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 patchset 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. I can't really test every pinmux configuration and it is fairly possible I missed something so it would be nice if more people could confirm if nothing (new) is broken after applying this series. One things could be the i2c. Usually the i2c pull-ups are physically present on the board but, if they are missing on platform, we may define a special pinmux setting with pull-up enabled. One last gotcha, I recently posted fixups around bias setting to pinctrl which have been merged: [0] [1]. These must be applied before applying this series, otherwise when requesting 'bias-disable' you'll probably get a pull-down instead. [0]: https://lkml.kernel.org/r/20181023160319.27003-1-jbrunet@baylibre.com [1]: https://lkml.kernel.org/r/20181029151340.9087-1-jbrunet@baylibre.com Jerome Brunet (4): arm64: dts: meson: remove extra subnode in mmc clk_gate pinmux arm64: dts: meson: disable pad bias for mmc pinmuxes arm64: dts: meson: consistently disable pin bias ARM: dts: meson: consistently disable pin bias arch/arm/boot/dts/meson8.dtsi | 12 +++ arch/arm/boot/dts/meson8b.dtsi | 9 ++ arch/arm/boot/dts/meson8m2.dtsi | 1 + arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 111 ++++++++++++++++++-- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 60 +++++++++-- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 62 +++++++++-- 6 files changed, 231 insertions(+), 24 deletions(-)