From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 742FBC433EF for ; Wed, 27 Oct 2021 10:11:22 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9D7C610CA for ; Wed, 27 Oct 2021 10:11:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A9D7C610CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18DAF8346A; Wed, 27 Oct 2021 12:11:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aHUzlF70"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E26BC8329E; Wed, 27 Oct 2021 12:11:16 +0200 (CEST) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8F59F8358B for ; Wed, 27 Oct 2021 12:11:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-yb1-xb2f.google.com with SMTP id v200so4905628ybe.11 for ; Wed, 27 Oct 2021 03:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rknHg1gxuYmyDnua8bdxN6V4NWvFR1nvCaRuVoBiMeQ=; b=aHUzlF70Zp2K2EvlawL1UgNjKCNheLpcChHtw5sGkKCeHqU9p5Hb3OdMqfc8Zn4B+a sElOHl9rJvTFqWQEqvKwdMjsgBS7JJRmmlGryxrPjH/Jg5TeifRS6SPsVRoROKzosJL+ rqyC15owP6y6lUG9btRlU2XP1MkKNCbYy5BUYCbli09Y06QHV+rJxkTJpxw7m9Zc7CbP 8XdQ6RJsIHPS1aaz3HhQXKQgfludqoO7wWw2w+i3ffLpeWwqhX7E6tN/6dEx+VUlrXSJ NW2/VTEPUdivuodJT1al8gsqtEnH83F5O07/hIiwD+kv08mFQx16WgXBEsbofrIpBzgG Jmfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rknHg1gxuYmyDnua8bdxN6V4NWvFR1nvCaRuVoBiMeQ=; b=q2QGy/9RYM++iL2bgwpIb+YJ3+Jx4Jfp/cu/FaKC/X0MibIdlR5lf+q2H5UUq2lHhI qnLZm2uEuPOcRoN/Dm08nqeW+2mbi2BdqJ06ZjZlkkQdz+HrYxsFpadnHhjMvG6sltGk iJHLof/YUmy47mn+p5b++nkpEjLQUU9Ch2nTMeo1sjZH2Hrjy9ddmGSM9/WMnNY+3Cfx vcuxQPxoTP2jaUQrvM0rPCpoOrCqUQ0Cxl6Xw9w6qRVZ18rU/xGg+Tlt6WSRLAEwCdrt ZPJ+xL2RcwmnHtUVd8i1KWurrbsSo1OMnMglggDOjjpLfuGnDxxp218tmAy1NFY/tsOI HsHw== X-Gm-Message-State: AOAM532Bv0LVZXZpUHH3nKaJJCtUS40ClTt+4rZjGLVTlSePSeEHtRvp iy8//Qsht/4HCVCY7LCr5CdFJAPC4hy02QGj8co= X-Google-Smtp-Source: ABdhPJx9UIT+zAxX9FmTXEHEbTiTa4NXSyK0mQtOUgbTnrAe+zPfsUVeH3+2rt4FHHk5Q+0iSOpg3BNZbjKv2SUMwac= X-Received: by 2002:a25:361c:: with SMTP id d28mr28622042yba.345.1635329470220; Wed, 27 Oct 2021 03:11:10 -0700 (PDT) MIME-Version: 1.0 References: <20211015171147.51948-1-andriy.shevchenko@linux.intel.com> <20211015171147.51948-2-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Bin Meng Date: Wed, 27 Oct 2021 18:10:59 +0800 Message-ID: Subject: Re: [PATCH v1 2/2] x86: edison: Don't take SD card detect pin into consideration To: Andy Shevchenko Cc: Andy Shevchenko , Simon Glass , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Wed, Oct 27, 2021 at 4:52 PM Andy Shevchenko wrote: > > On Wed, Oct 27, 2021 at 5:57 AM Bin Meng wrote: > > On Sat, Oct 16, 2021 at 1:27 AM Andy Shevchenko > > wrote: > > > > > > There are two PCB designs in the wild which use the opposite > > > signaling for SD card detect. This makes U-Boot working in one case > > > and failing in the other. Quirk this out by disconnecting SD card > > > detect pin from the PCB by switching to mode 3. > > > > > > BugLink: https://github.com/edison-fw/meta-intel-edison/issues/136 > > ... > > > > sdcard: mmc@ff3fa000 { > > > compatible = "intel,sdhci-tangier"; > > > reg = <0xff3fa000 0x1000>; > > > + cd-inverted; > > > > So I wonder how sd card ever worked without the "cd-inverted" property? > > TL;DR: it worked on one PCB design and did not work on the other. When > we disconnect the pin the read value is always the same and inverted > to what we expected in the code. Great. That explains. Although I read the below comments a couple of times, it just did not come to my head that "when we disconnect the pin the read value is always the same and inverted to what we expected in the code." > > Have you read the commit message and the comment below? Have you read > the bug report? Yes, but it's not crystal clear hence the ask. So maybe we can update the comments to make such clearer? > > > > + /* > > > + * Disconnect SD card detect, so it won't affect the reality > > > + * on two different PCB designs where it's using the opposite > > > + * signaling: Edison/Arduino uses Active Low, while SparkFun > > > + * went with Active High. > > > + */ FWIW, Reviewed-by: Bin Meng Regards, Bin