From patchwork Fri Nov 9 14:04:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10675979 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 EA4FE14D6 for ; Fri, 9 Nov 2018 14:05:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D970A2EA91 for ; Fri, 9 Nov 2018 14:05:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDCF72EA96; 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 2F0E22EA91 for ; Fri, 9 Nov 2018 14:05:16 +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=MP8zNJdq4bdjE44arvMHj/lrJWBc8oD0OZa2jPwDgzU=; b=KLa2LaWtUwiCdG WOups5UejUxA+CWCAY4o6cyaUTX4bO2Is84PyDa/tzNwm+chNWayoVWmOax+tQyul8dGE9/Ja4Hd5 WEl0tOdIEMzxfazBvUJ/LVsDrTPGISLY64lrLYh2ihK2YWDWu3qpPrEVIFXf+xW9IH29ZOcKLHv9E 1mzkYWRhX6oGrh/1+rv/+Fo4Ii3LiQcYB0AtkzezvKydvMDyMpSwfZZgXPPtheBCzaRLaPslcAQYL 6jBAwdU2FSo/bSSz+QfRyjfjH5GzO7CGCJAPKPZS5cezqJRhL0WoKsMKS1OZ+6vlBbueG41FOlrbg 33lqs15sWvujAoejZsxA==; 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-0001Ms-VV; Fri, 09 Nov 2018 14:05:14 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gL7PJ-0008PB-8q for linux-amlogic@lists.infradead.org; Fri, 09 Nov 2018 14:05:13 +0000 Received: by mail-wm1-x341.google.com with SMTP id f2-v6so2041220wme.3 for ; Fri, 09 Nov 2018 06:04:57 -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=mQxAvsz6eZHL2jjicI4Z0Mwsyk2aDw0JU6AF0+HrVlk=; b=V/HjndmbseqEXYEkWfb6aEr9MZbrxkv4vYCpPoKsFByBBJrFRlzGDWiFNWv1GOsJa3 oZLVAu+7gbHM++zhMDt2EXXduED5h9rUTor1QU+rMlkxzKkrkZnr2+GYtIDrXOubCoBi 0oUiXuYIl8Oj+WBSIT2iH9qY0VM15ik5K36ANcuZSl+EMK1zYMvONKw3RYq5sV/oj2Kz xmicJ27kSq69amLabCtCGbQpo4R8muOllOIvxT5y+myAq+xwa3WAiKZqWQtOMSwUUdwA XtmpZXDkMcHfMGXrq/QfKSP7KIV/tfgVDkqGy05Bg//WnbmEjGHV4tEd2+yMLLZVMey6 YS/w== 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=mQxAvsz6eZHL2jjicI4Z0Mwsyk2aDw0JU6AF0+HrVlk=; b=lzopQhvPWFeaRJVV5fnjKM16BJGyK+nwQ5x7AUIW9ovt0pxUC4ukk0J5QuPBs4DdQp /8iExjCXx8YvWyxgCKx7ZARhxDI8+5jTjdqEFh7kOTHZyDQIrkMam7MyTRq7PC/t/Gvg bx1mhrfI4ydAkMCgULvrzIDVFOXU3VrR3VQE39Z1mlV8XarwkFL+cdp1qenmgKvLDxud /tz5jt2EvmAPk5S03Uwqfn091QQBwGh1XNCE/LP2Do2vqFS/QeUlUIGipJAuQUnd5vAO Fifl2TwtzwVWDNnkDSs4fWljvlmPezRBBkOGLmyB82nujJAsFE3Z2nlIJlh+LqYXStJT tZoA== X-Gm-Message-State: AGRZ1gJyA8etOL8xYEjbmOk1bAsb7nWzRUUWwSFtZ2aqwSPsqAkJFtLT RpYfRmCzURbT6W1RJA6ZxgYGo6N84Pw= X-Google-Smtp-Source: AJdET5fojjhtna8wd+iKzMlOunk94TtmxHBL2fB4Hhcu19Vd1NeXLEyDYCd5Il6V//RKpAEUTRhLVg== X-Received: by 2002:a1c:83cb:: with SMTP id f194-v6mr4623327wmd.26.1541772295680; Fri, 09 Nov 2018 06:04:55 -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.04.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Nov 2018 06:04:55 -0800 (PST) From: Jerome Brunet To: Kevin Hilman , Carlo Caione Subject: [PATCH v2 0/4] ARM: dts: meson: set pinmux bias Date: Fri, 9 Nov 2018 15:04:41 +0100 Message-Id: <20181109140445.17795-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-20181109_060509_321541_AFAC6A90 X-CRM114-Status: GOOD ( 16.56 ) 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. Changes since v1 [2]: * Fix wrongly placed bias-disable on meson8 [0]: https://lkml.kernel.org/r/20181023160319.27003-1-jbrunet@baylibre.com [1]: https://lkml.kernel.org/r/20181029151340.9087-1-jbrunet@baylibre.com [2]: https://lkml.kernel.org/r/20181108104426.1877-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(-)