Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp978736ybz; Wed, 22 Apr 2020 11:19:08 -0700 (PDT) X-Google-Smtp-Source: APiQypKLo81ckknEKJVpgnQhFSZZ4rcVaz1CZZT8mZpsTef7AZq9ztQ2LAoO8zO2YdyIR+N++k1l X-Received: by 2002:a17:906:c44b:: with SMTP id ck11mr27484723ejb.110.1587579548403; Wed, 22 Apr 2020 11:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587579548; cv=none; d=google.com; s=arc-20160816; b=noLcSj6nK6yaHeECdKfF/ZXqdsmtXv0BnX/I5QGw2dPtN6e9Xh2sX+ymJZ/cUyeMYX ba2kDGA+DVxKotFvrDOIiRNnsKIyAJ/ppZHa7TpRvMv7RnoPEZ5wFXOfh7mKq7s88ajs zTM65ekHzDcZjrOi85YFPeD7tUI+kUsRjH7XetTunKfHg4kw/HIQLoUsfgIO0t+kTckz 9mcWmsQnbzAwoiVHfWE5/BjUR2ywrAQKwPlveqbGnAT/qJ3b6vFB7VDMq5Iu5fuXpEIt srDBawthJPiDTMbW9XRPB5i63J8mqVcMt+lRyPyEaYMR4rqcBhnDqKWqwzqClnTTBCIa 3Pow== 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 :in-reply-to:references:mime-version:dkim-signature; bh=/O8wxkOyz2zqjTvXW5zmlSLKb1rtq1CNhNBPyoq68Ms=; b=hcWjgXVyGXhUPxhmj5B2JDjl++fQT3OZs1RE46VFeFaGtyuLB9DkeyjwzKkYCa9XfL NW+gLZY/5jMCRrYF9vKIexd+U4y7CWX6xn3LmcrwEgFSj9I2/xntU26HMSjHsAHKWdYU GNG95m8NxXHTZLiO5JyplH1XBORwuoYwwbRN1ZhLab0RE3V5XCPn1XPPxZfFuSaTpR8b 87Q+boQt2tpvuVdQXiP19qFsoX9Vc2BrRRT4nEDzJ1RKDwlmD9cvM35J9/H8yXNHJrcj H6yg+EVHArmQ5SwEFG1vBotdpTjOiRG+5A4k39NkRZslR0n0hFVG44rJu0JOCz/NrhJz kaSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mltae6nP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si32976ejd.3.2020.04.22.11.18.35; Wed, 22 Apr 2020 11:19:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mltae6nP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbgDVSRe (ORCPT + 99 others); Wed, 22 Apr 2020 14:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbgDVSRd (ORCPT ); Wed, 22 Apr 2020 14:17:33 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42A89C03C1A9; Wed, 22 Apr 2020 11:17:33 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id p10so3444073ioh.7; Wed, 22 Apr 2020 11:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/O8wxkOyz2zqjTvXW5zmlSLKb1rtq1CNhNBPyoq68Ms=; b=Mltae6nP2Mbpr8cAm/sWdOn8rNtI/OcVNw/eOS5AvECfCyKKYKWRzhTgMTN3KuMQ12 YDZoIz+eiUNnrsrOWB2JwH2pSNIf90p+8OyeWU0Zl7mGFkke8HotD8oCtnI8IyC7s2OT WljR0uyIlHxHgxXMprKYW+Y+Zhsdv2uCsFJBsAHwIRdNQRPbbICBZCLMf4xL0yRNKKoy QNAg2vy5mimsD9CYhdFH5ROCZSZa1vBEE4Sy7gEXrM1IUiWxScpvUbbtMpx5iUjz2gXa 0bCQd9lcEQC6Q6rAyVfn3Ne/HQ4hceLPJOyjh2LqYZR5BDbcoTqmup1GpQXmronZ/dww h0cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/O8wxkOyz2zqjTvXW5zmlSLKb1rtq1CNhNBPyoq68Ms=; b=Pv7v5E2HlUikZh0GGGY9UpIsoph57zKHbOdPU+mlRpc8fOv3kb+DtuectQNM/Qkn9I auvIHDquGObt54Dwz6bM4O+cxe8xXEFNCrENiO5oZiZFCyIQcya5ZD5vPTdE8K6WZJ62 LFssKZUjc7De59DPFeFJr0oxabILKO8IYHwn1g9aK/F6tQjIRVN2G/8eh7+cDrZpun6Y ZIf7MAURIazYrSe9CCw5nNWOVccSfPBWYnPsYx/FRlXgE2X6XesFrPNKK0ihazSaifWv x0R4agoVR3Cupg/s1rkBE4HUYCK4g1vJC2OgqcmYuAu3Sp9Ct4DwVYe3k4v1pdUOMVSu UsYg== X-Gm-Message-State: AGi0PubhAxeee1zy7SNsayKZ8qcY6TQTxWzx+rlNIidJUYDUMV5levWd fqhnGpKFZsXhsJRafaQAWsVUtd/PW52yLn7SxZs= X-Received: by 2002:a6b:e802:: with SMTP id f2mr26865444ioh.128.1587579452616; Wed, 22 Apr 2020 11:17:32 -0700 (PDT) MIME-Version: 1.0 References: <20200328003249.1248978-1-martin.blumenstingl@googlemail.com> <20200328003249.1248978-4-martin.blumenstingl@googlemail.com> In-Reply-To: <20200328003249.1248978-4-martin.blumenstingl@googlemail.com> From: Anand Moon Date: Wed, 22 Apr 2020 23:47:21 +0530 Message-ID: Subject: Re: [PATCH v5 3/3] mmc: host: meson-mx-sdhc: new driver for the Amlogic Meson SDHC host To: Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, devicetree , linux-mmc@vger.kernel.org, Ulf Hansson , Rob Herring , Mark Rutland , jianxin.pan@amlogic.com, Linux Kernel , yinxin_1989@aliyun.com, linux-arm-kernel , lnykww@gmail.com 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 Hi Martin, On Sat, 28 Mar 2020 at 06:04, Martin Blumenstingl wrote: > > The SDHC MMC host controller on Amlogic SoCs provides an eMMC and MMC > card interface with 1/4/8-bit bus width. > It supports eMMC spec 4.4x/4.5x including HS200 (up to 100MHz clock). > > The public S805 datasheet [0] contains a short documentation about the > registers. Unfortunately it does not describe how to use the registers > to make the hardware work. Thus this driver is based on reading (and > understanding) the Amlogic 3.10 GPL kernel code. > > Some hardware details are not easy to see. Jianxin Pan was kind enough > to answer my questions: > The hardware has built-in busy timeout support. The maximum timeout is > 30 seconds. This is only documented in Amlogic's internal > documentation. > > The controller only works with very specific clock configurations. The > details are not part of the public datasheet. In my own words the > supported configurations are: > - 399.812kHz: clkin = 850MHz div = 2126 sd_rx_phase = 63 > - 1MHz: clkin = 850MHz div = 850 sd_rx_phase = 55 > - 5.986MHz: clkin = 850MHz div = 142 sd_rx_phase = 24 > - 25MHz: clkin = 850MHz div = 34 sd_rx_phase = 15 > - 47.222MHz: clkin = 850MHz div = 18 sd_rx_phase = 11/15 (SDR50/HS) > - 53.125MHz: clkin = 850MHz div = 16 sd_rx_phase = (tuning) > - 70.833MHz: clkin = 850MHz div = 12 sd_rx_phase = (tuning) > - 85MHz: clkin = 850MHz div = 10 sd_rx_phase = (tuning) > - 94.44MHz: clkin = 850MHz div = 9 sd_rx_phase = (tuning) > - 106.25MHz: clkin = 850MHz div = 8 sd_rx_phase = (tuning) > - 127.5MHz: clkin = 1275MHz div = 10 sd_rx_phase = (tuning) > - 141.667MHz: clkin = 850MHz div = 6 sd_rx_phase = (tuning) > - 159.375MHz: clkin = 1275MHz div = 8 sd_rx_phase = (tuning) > - 212.5MHz: clkin = 1275MHz div = 6 sd_rx_phase = (tuning) > - (sd_tx_phase is always 1, 94.44MHz is not listed in the datasheet > but this is what the 3.10 BSP kernel on Odroid-C1 actually uses) > > NOTE: CMD23 support is disabled for now because it results in command > timeouts and thus decreases read performance. > > Tested-by: Wei Wang > Tested-by: Xin Yin > Reviewed-by: Xin Yin > Signed-off-by: Martin Blumenstingl > --- Please add my tested on Odroid C1+ Tested-by: Anand Moon Best Regards -Anand