Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365AbcKQVKJ (ORCPT ); Thu, 17 Nov 2016 16:10:09 -0500 Received: from vegas.theobroma-systems.com ([144.76.126.164]:55782 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbcKQVKI (ORCPT ); Thu, 17 Nov 2016 16:10:08 -0500 X-Greylist: delayed 738 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Nov 2016 16:10:07 EST MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 17 Nov 2016 21:57:43 +0100 From: klaus.goger@theobroma-systems.com To: Chen-Yu Tsai Cc: Maxime Ripard , Linus Walleij , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH] ARM: dts: sunxi: Explicitly enable pull-ups for MMC pins In-Reply-To: <20161117093438.17988-1-wens@csie.org> References: <20161117093438.17988-1-wens@csie.org> Message-ID: User-Agent: Roundcube Webmail/1.1.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1184 Lines: 34 On 2016-11-17 10:34, Chen-Yu Tsai wrote: > Given that MMC starts in open-drain mode and the pull-ups are required, > it's best to enable it for all the pin settings. It's even more complicated than that with MMC. It starts in open-drain mode for CMD during initialization but changes to push-pull afterwards. The card has internal pull-ups to prevent bus floating during setup and will disable them after switching to 4bit mode (or 8bit for eMMC when available). But even after switching to push-pull drivers there are states the bus would float and pull ups have to ensure a high level on the bus. See JESD84-A441 chapter 7.15 ff as reference. The difference between the P-bit and Z-bit is that a P-bit is actively driven to HIGH by the card respectively host output driver, while Z-bit is driven to (respectively kept) HIGH by the pull-up resistors Rcmd respectively Rdat. Enabling the pull ups on the CPU would be the right choice considering that most boards will not have external pull-ups. Even if they would have one, adding the internal in parallel would work in almost all cases and the increase in power consumption would be negligible. Cheers, Klaus