From patchwork Wed Apr 17 20:43:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 162420 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5955268jan; Wed, 17 Apr 2019 13:44:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/hj+SU+cAwGr36thiqksoGbC6MLsHx1BezdlCGkgwT6LEkC/ZOqeJMOc4yBuTRF8X5wSd X-Received: by 2002:a63:af45:: with SMTP id s5mr1765627pgo.420.1555533849074; Wed, 17 Apr 2019 13:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555533849; cv=none; d=google.com; s=arc-20160816; b=Tqk+1ZWNVMpnUOPlG2vkjaWEHPX9gZDVs8pbwkQ9JaHjVpDMPPrHAtEWxy73CWBqkR KZx5yThNzK/Zka70ncJrwUq5ovH4aWdm3NSeV5ofo11VlbRgHmf5htMicfCj2FnRGED7 VMNpfKy3jjLNQv/02tgrOjdlY5huKPwzEokwuaHeg9+Ur/fCys9IRDm4xCzhCpcMwtEE hvUtxftSjgzqfl2ul1DZUJnAlrP87qm5KSGUW01QFO2qkRdDwpSGyC/6IS9J3iNMU8Cn nP5n5OrZeq5m/oMI7whvHRwqThrzgb9I+YSTKV+mlHjZbqt45i/WNwCyoKYndi1P2P8Z uGZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Rh/NLrobqB5mwi5oJdqhmcZ7w624es9RRpYu13HpzFU=; b=peTbzvmKazRZ63SyWWHacYtJUPQyJ6ONFNqpUYFXfIRJBaMmgzlVDBes4QrmxopRNj NKPyvyd5xVXm0VyJp6wX55qXLqkf0OzbW/SZehGLnAos8TuaoLwXVl8Lb6p8YBvsiojF Gq779liUVQKLOxN3BB/cHoZaOUxhXi/DrgCbwnM57RSj+qnlJDbaa4aTRyLzfuvJIsFF B1r9UuquZb/+lwSacf6xOiAxiJLDqL6ZLelQeGQ1W0DfB9ZxVoPXzvtjJeN3CplXWfPH qH5DRWuAVHDpZT69L9f4louCkn6Y65QAV5CySckfFPbpnyECw0Oyy0OOgcJXQ4RQg52N djPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=GffHTXGu; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l77si108181pfb.34.2019.04.17.13.44.08; Wed, 17 Apr 2019 13:44:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=GffHTXGu; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732687AbfDQUoI (ORCPT + 5 others); Wed, 17 Apr 2019 16:44:08 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37478 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbfDQUoI (ORCPT ); Wed, 17 Apr 2019 16:44:08 -0400 Received: by mail-wr1-f68.google.com with SMTP id w10so101048wrm.4 for ; Wed, 17 Apr 2019 13:44:07 -0700 (PDT) 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=Rh/NLrobqB5mwi5oJdqhmcZ7w624es9RRpYu13HpzFU=; b=GffHTXGuyf7ylUhUSCeiE7D3EbMZ4p1+TeB1Krnur7r6ACKxhJym6b4jW25nB4Fywh alDs9gVwPRI5pkxvhxzXmdBFwN5/yFlDvKBa9mQCnlpgIAPspg2mbGoYQi2szm/1n4MN POYEL4poD3mqYsaywnENjHmw3o50QRbJNXA0Qi3gRLOhXjHOqUhZBqNVOA/YNbbsLHSf ZQeGArIs2T0YmhakQdwHartrqIYbAvVOuWjv+e8JALeKz18w5T8KecavBU4ssfiipUv/ VerqXbFRuQd+YbjPSF86Rhqlu7iqr9/cL3hW5EzEt/AHN+9UoX1lCzzZoVOjpkk9iAAU 8bAQ== 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=Rh/NLrobqB5mwi5oJdqhmcZ7w624es9RRpYu13HpzFU=; b=uRcgTdevuZx6YuXzxBCv8ccxgiXADfwVofrCydFEKDUNeBAR/OiVjdzDMLa/M2wrGC umzLTeVJu6rK0a9DuxrXkt48ZCMWIJyLTDyShhNhlwKDOrkoaAKFIzHZ2Bn8q7NyC3u2 oO9WUto3CnFmL71pVxDQT6r23FEYZyN6rUpMb6Ty9wL/B7Fux4Iss5jn5oTLhAu2oeh/ ljWskQm/sQWN93VXol1D7UAtfferHUfLGcdznnpN37LzXOA41ueowDBmotqMHp4yXluD IqdPx7AfOfjMPQFKS8KfkpoUnlEBvcO+ZAqZayS6qLxbhO4Q4a3MPxjHqS2U/nTtx+fw yT+g== X-Gm-Message-State: APjAAAUCOf25URvUCPRS8jjzTflpRZRapNMXmCJY8T1RO71etbbcN936 d5ecXZyoAqxW/aauzCzSZSrFxm/e8+c= X-Received: by 2002:adf:f803:: with SMTP id s3mr38690686wrp.54.1555533846081; Wed, 17 Apr 2019 13:44:06 -0700 (PDT) Received: from boomer.lan (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.googlemail.com with ESMTPSA id c20sm98716866wre.28.2019.04.17.13.44.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 13:44:05 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Kevin Hilman Cc: Jerome Brunet , linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/7] mmc: meson-gx: clean up and tuning update Date: Wed, 17 Apr 2019 22:43:48 +0200 Message-Id: <20190417204355.469-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The purpose of this series is too improve reliability of the amlogic mmc driver on new (g12a) and old ones (axg, gxl, gxbb, etc...) * The 3 first patches are just harmless clean ups. * Patch 4 makes sure HS400 can't be enabled, we still have not been able to crack this modes. * Patch 5 removes some clock glitches when switching to DDR modes * Patch 6 and 7 changes the tuning method from Rx phase to signal resampling. It could have been done in a single patch but the unified diff was extremely ugly. The change has been split in two patches to ease review. The last tuning update that went through was meant to improve the axg support. Since then, it was reported to break some other boards, like the s912 vim2. Also with the current tuning method, it was impossible to find phase settings which would work on all the SoC, including the new ones. After redoing all the tests from scratch, it appeared that Rx phase made (strangely) almost no difference, especially on g12a and axg. It is important to have a phase shift between the Core and Tx clock, 180 works best. I discussed the test results with Amlogic. They suggested to use 180/0 or 0/180 for the Core and Tx phase. For tuning, they suggested to use signal resampling. So far, so good ... here the platform and modes tested: NanoPi-K2 (S905): SD UHS SDR50/DDR50, SDIO HS Odroid-C2 (S905): SD UHS SDR50/DDR50, eMMC DDR52/HS200 Khadas Vim (S905X): SD HS, SDIO HS, eMMC HS200 Libretech CC (S905X): SD HS, eMMC HS200 Khadas Vim2 (S912): SD HS, SDIO HS, eMMC HS200 S400 (A113D): SDIO UHS SDR104, eMMC DDR52/HS200 U200 (S905D2): SD HS, eMMC DDR52/HS200 SEI510 (S905X2): SD HS, eMMC DDR52/HS200 Jerome Brunet (7): mmc: meson-gx: remove open coded read with timeout mmc: meson-gx: ack only raised irq mmc: meson-gx: irq is not shared mmc: meson-gx: disable HS400 mmc: meson-gx: avoid clock glitch when switching to DDR modes mmc: meson-gx: remove Rx phase tuning mmc: meson-gx: add signal resampling tuning drivers/mmc/host/meson-gx-mmc.c | 418 +++++++++----------------------- 1 file changed, 113 insertions(+), 305 deletions(-) -- 2.20.1 Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl