Received: by 10.192.165.148 with SMTP id m20csp1056032imm; Thu, 10 May 2018 05:03:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZorbabLQ7UGae8zOvmA3CsK4Z8MVq5QThCs9IBwpdEgwa1Uf+L4aKLZL6tg62/eqi14hT1k X-Received: by 2002:a63:4383:: with SMTP id q125-v6mr965715pga.412.1525953839613; Thu, 10 May 2018 05:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525953839; cv=none; d=google.com; s=arc-20160816; b=dO4c8QdstJCYliz1V1sEndC2iHCPMk3x+gV/mie0vEEu7hN0OV/AXYolKUzxBglIGu wF9kX3R0vF+PBI8Xrh/dW3mYEi7X4OcXlQeOGeMQlHM263OF1gOhSJY0Q5dqBCvBN3Cb SVkrWxxa/zyDEHBFZ/pNtZQwTjUUMeo/X8UcYfIL4/noyY8LWgAsnGB5ICcfrXRWv8Fm FNTqBYf7LqDaBSUesd6VQZds/sLKyRJJVlKeYkKvE+jQjIQTzD99YD0oNYQD7Z0Oe0rd fIOPx4/vORUECFwZ1Kx69PDvTGmk4YzK0o0IxEIXmPj9UBxxO9TAJQTDJzkhIVAoEnn3 lUQw== 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=dd6NFcLZsbmELW20qvcxxCPoAaLn+UO+0Ba0NlL7lDg=; b=Vts61yJbqx1MBc9VxD+Ic5whmtw0daeWej+97OCaUNyHk+g8gLhBUIPZM7O+yjNSw5 CwOCYU3AALdoHGFK3tjxpKw9+zsTW7nsRd69rQFeTjvpE5Z6/UpdCeb8yONrO+3CDjFJ 9WuRmYT1qLGlfotKsgHhbtHyS0BmKlCvBkderym2fGM1XsyQptVaUMSrc2YPdNdKHbTG IG4djzB/Mu7YQjxpbrb/XXg4HR/aHSFDfq4NQjFr8Ir4CRbwXQ4TWkZ3LHPmf+5cff9Z H6nQQmr4IzRR3/qVYhNNoNhDwUCtHNFl4H6Y1cpHDD7zXlmTrv1LyXxhWvNrY7i01wmJ RdJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=CzCMR0zY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37-v6si647852plq.288.2018.05.10.05.03.38; Thu, 10 May 2018 05:03:59 -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=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=CzCMR0zY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757241AbeEJMDM (ORCPT + 99 others); Thu, 10 May 2018 08:03:12 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:53506 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756808AbeEJMDH (ORCPT ); Thu, 10 May 2018 08:03:07 -0400 Received: by mail-wm0-f68.google.com with SMTP id a67-v6so3497177wmf.3 for ; Thu, 10 May 2018 05:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dd6NFcLZsbmELW20qvcxxCPoAaLn+UO+0Ba0NlL7lDg=; b=CzCMR0zYQqK6WcZBxzd9484wyAGQ702Q//rxcK8ixEwXVYl0AwNQEk1gWsFaUy/rIu aLM7C14/sNJokFLj2656caG+n/MHMzVQvGKWbDht4ilEyNq1XKPG7TX7nshfFTjdmS0d khQwJn0HCzrrwao3V+7eNRLb4C4m4LEbjedYb4ori715sZkplsvqRgIGbtDYT01nSscz iO8OsG4JSj1XXiFutB5U/vAqqMXG1GS9Z2vzfk75yHSzcIxs+4gTzhj0aizxQjy39y6s o34sTnKoebABkSttBWeBLd5BLj8Uc5uaOmlFEW+Pf5qt4hpUqUo5+2AUbt6/AwZIOMMC 0WWA== 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=dd6NFcLZsbmELW20qvcxxCPoAaLn+UO+0Ba0NlL7lDg=; b=OxccreNgm6aI4AzP27pkvGLbCkPDpAnkCGJeU/XgfKPQNqXnmFGjg6A+1/rkw+jGtA N7IgsN2Pi9iNQj204JgX6LkVywG0DBkqiuWgclqkqHVpTBH0sa2J/mueCXg1SZWda8/D G9DdvOahSe9tHbNw+dqUkcx+7fb8VdDV03kArdkjZCnBK45gwKFGSYq/BhDq0eTpQT+U umYB19WvxcEFyYHipfaT8OcB9JeWoMa2Tb35cQCz9OOZ0+RwkEUA54znuzI3SMh8HaQV mokgYJTo7QsPtfFoFu9UYSFDnXXIyqZFBtnwWHIAKfkAK/C5xGipl5giUpJLMCnz21Tv 3hrA== X-Gm-Message-State: ALKqPwcD9wYTRGaXGxcfSZXfxgqVrKJKTPi/Vq95PX03FL+Lq4Yn5WjA 9QKHTAsfiNw+H6EPTHFqivNQ8ZVxIDb1FJdEDxjwuA== X-Received: by 2002:a50:f292:: with SMTP id f18-v6mr1977410edm.176.1525953786309; Thu, 10 May 2018 05:03:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.245.113 with HTTP; Thu, 10 May 2018 05:03:05 -0700 (PDT) In-Reply-To: References: From: Chris Chiu Date: Thu, 10 May 2018 20:03:05 +0800 Message-ID: Subject: Re: [BUG] i2c-hid: ELAN Touchpad does not work on ASUS X580GD To: Daniel Drake Cc: Jarkko Nikula , Jian-Hong Pan , Jiri Kosina , Benjamin Tissoires , Jani Nikula , Hans de Goede , Dmitry Torokhov , Adrian Salido , Jason Gerecke , linux-input , Andy Shevchenko , Mika Westerberg , Wolfram Sang , linux-i2c@vger.kernel.org, Linux Kernel , Linux Upstreaming Team 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 On Tue, May 8, 2018 at 11:47 PM, Daniel Drake wrote: > On Tue, May 8, 2018 at 8:31 AM, Jarkko Nikula > wrote: >>> Some update, we can make the touchpad work by simply modifying the >>> clk_rate of spt_i2c_info from 120000000 to 133000000 in intel-lpss-pci.c for >>> specific PCI ID 8086:a368 ~ a36a (CoffeeLake). Is the clock setting different >>> for the CoffeeLake series? >>> >> Hmm.. at quick look it looks like to be 133 MHz but I want to double check first from other specs. I'm also wondering why it results 600 kHz instead of expected 133/120 * 400 kHz = 443 kHz. Need to check timing parameters too. > > Thanks for looking at this. I believe we tried 133MHz just because > some other platforms in the file have the clock at that speed. > > In the original/shipped setup, the scope shows the SDA clock is > running at ~635kHz (rather than the intended 400kHz) and the debug > logs from the kernel producing that waveform shows that HCNT=105 and > LCNT=191 > > 105+191=296 parent clock ticks per cycle > > At 635kHz, a single clock cycle is 1575ns. What is the speed of the > parent clock if it ticks 296 times in 1575ns? I calculate this to be > 187960000Hz and further experiments indicate that clk_rate=187960000 > also makes the touchpad work. Unfortunately we don't have easy access > to the scope to measure the effect on the waveform. > > Also through experimentation we tried i2c-sda-falling-time-ns=400ns > (increasing from the default of 300ns) in order to make the HCNT > increase to 117. This also makes the touchpad work. > Report from guys who can access scope. If i2c-sda-falling-time-ns=400ns , HCNT increase to 117, the SCL high duration is 576ns as follows https://pasteboard.co/HkwERvP.png The original SCL high duration (HCNT = 105, 120MHz) is as follows https://pasteboard.co/HkwFxgY.png So the HCNT does affect but per this HCNT/LCNT value, just not 400kHz as expected. Any suggestion? > Please let us know if we can help further in finding an upstream fix > for this issue. > > Thanks > Daniel