Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp518211imm; Thu, 5 Jul 2018 04:30:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfy876Yn3g4+9plSQRaSugGsHBRkpDc5VcEYD2uzn+dqfxekO+5hgXRWNJYbtxM+0itZNdh X-Received: by 2002:a65:5245:: with SMTP id q5-v6mr5196992pgp.67.1530790249910; Thu, 05 Jul 2018 04:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530790249; cv=none; d=google.com; s=arc-20160816; b=zEsRay3sR94XNi7MEYno34LY/YcV9MCluMUh25AtBuKpw9iMaS5josWJdiN79GYl29 eBh2Rs1jKODkBGlPrWe//7rg55oBXGyCcs1ok+vQgkivzOOZHazeWnpk4aMZ5gc4Ef4J yFn1ndLw9d1QvYxgVtNCy5gHSRo7po3bg+qYQ1sHAm6ClSef92kc/wNAR4QKQk4vjuB8 cvNMZwEriycY94SDB2MOD7ALv6zr7V5Yl72SsBlF+DLJ+vjZmKDr3/Q/pOhndrhC9joT c9AaUWMCgziniGehQO/hcXMSIlgoh+YQ+HSQp4sCKRYNug7iglxIMmenm5D+XgDi5Fak LHnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=DKHnT0ve43eMbzTr1PbSB/1kRrYg1Y9KmrOVDlBXjm8=; b=T3wUMQl4nz9Nm+CvxcFlxI3fxFrWZBKfc2MBShsvBaf3wEK7LZFox8P7afocjXsVco D2bU1VdRQELrmK7b8ROM5Qt8VzN1A/HCsCsGvgIR+rEd/Qt06YAxiB13T9xV2rF70Pgv 96yjbUdzcr1/qfsd8rFjN1DA6zD8Xy0Sey2l13QGF5OrDPW+fpVkcV/cvyPrX4QLLMvH sjbR/za2OGEBe9ghYnd5G96PwJOY7T+C7DXNGMldd6oplO5jWxs2cZSCjBDVu64X5X+Z 4cbcuGZp/M5Od5UbV0vtYE9D/A7ZvjnCi4ZMVnx8lGIahh1wJBjH1j6iliqqy9vlDXQA p5dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dLJBxzas; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59-v6si5625277plb.198.2018.07.05.04.30.34; Thu, 05 Jul 2018 04:30:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dLJBxzas; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753823AbeGEL3v (ORCPT + 99 others); Thu, 5 Jul 2018 07:29:51 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:37340 "EHLO mail-it0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753634AbeGEL3t (ORCPT ); Thu, 5 Jul 2018 07:29:49 -0400 Received: by mail-it0-f43.google.com with SMTP id p17-v6so11835387itc.2 for ; Thu, 05 Jul 2018 04:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DKHnT0ve43eMbzTr1PbSB/1kRrYg1Y9KmrOVDlBXjm8=; b=dLJBxzas1aOE8E4PokKRq86WB0IyhALnQl9wIVtM/Sygd/ztBQKb7ki5sfrYTvZLgb iZ3fuDz74ocQF+xfQrJCd4CbF5maEGvyC1F6sTXqlJhXM/e0yuS9bdfNszkhehR5+zv6 TiuryjG5HIPfIBap9npbBLMOUt5MZqGdhIoJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DKHnT0ve43eMbzTr1PbSB/1kRrYg1Y9KmrOVDlBXjm8=; b=jfw5GjnhuPCn/uZhJZCQvA6vXkmOamoUpunfNsHwVwD6CYrqV2y8q8F6s54zUwIzPR dZ16ETLK3di/pmhrR/cy7cgfC373Os88rqjfUJrO2Dor58cmpyIZma7BUEqvz/Uo/jWa S3PZuRKzCkAMZWTcjK4RwDjANNKxGcFt6+iZKV1gZVcxcWKDJQouMm6jxkoGQKJUqbaO +KS2bKkQb+86AO30+Zp68z0r9PlWC2hzzYM5sHhNAk/WNsKOPKz6bgTOGpoD3l5dJEez 74AOCC/OtqVG033EqxL0fUkIShnMJsuqTGdsRKve7Jpz2GV64ZYLmO5qSr8HKGorV3YL Txgg== X-Gm-Message-State: APt69E3+k9wWeaY3OmNuGWULT76he3n95YmlP7zjPCsxw0grmagY01go mHuIpTcOfHymlJcxfpS7PCa6c7hHUzjliPKl9bEf1g== X-Received: by 2002:a24:69cb:: with SMTP id e194-v6mr4862093itc.102.1530790188984; Thu, 05 Jul 2018 04:29:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:818f:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 04:29:48 -0700 (PDT) In-Reply-To: <69f6122b8a69f1ab41d2ef8274321689@agner.ch> References: <20180704150745.21003-1-stefan@agner.ch> <69f6122b8a69f1ab41d2ef8274321689@agner.ch> From: Ulf Hansson Date: Thu, 5 Jul 2018 13:29:48 +0200 Message-ID: Subject: Re: [PATCH v2] mmc: sdhci-esdhc-imx: allow 1.8V modes without 100/200MHz pinctrl states To: Stefan Agner Cc: Adrian Hunter , Fabio Estevam , Haibo Chen , Aisheng Dong , Michael Trimarchi , Russell King , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [...] >>> Btw, I still get the switching error once during boot-up: >>> mmc1: Switching to 3.3V signalling voltage failed >> >> I guess the this happens then also at system resume? >> >> The core tries first with 3.3 then if it fails, it continues with 1.8V, etc. >> >>> >>> This is due to the call from mmc_set_initial_signal_voltage. It is a bit >>> unfortunate since this is printed as a warning. Not sure if that could >>> be prevented somehow? >> >> Seems like SDHCI_SIGNALING_330 should not be set, unless 3.3V I/O is >> supported. That should avoid SDHCI from trying and instead just >> returning an error code immediately. >> >> This seems like a generic issues for all SDHCI variant drivers. > > Hm, can we resolve this in a generic fashion? > > E.g something like this in sdhci_setup_host(): > > if (!regulator_is_supported_voltage(mmc->supply.vqmmc, 3200000, > 3450000)) > host->flags &= ~SDHCI_SIGNALING_330; Something like that seems right, but a wider range should be allowed. 2.7V to 3.6V is allowed according to the specs. Also, vqmmc is optional, so in case it doesn't exist we must not clear the SDHCI_SIGNALING_330 bit. Kind regards Uffe