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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D371C433FE for ; Sat, 15 Jan 2022 09:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232738AbiAOJjZ (ORCPT ); Sat, 15 Jan 2022 04:39:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbiAOJjZ (ORCPT ); Sat, 15 Jan 2022 04:39:25 -0500 Received: from server00.inetadmin.eu (server00.inetadmin.eu [IPv6:2a01:390:1:2:e1b1:2:0:d7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB30EC061574; Sat, 15 Jan 2022 01:39:24 -0800 (PST) Received: from [192.168.1.103] (ip-46.34.226.0.o2inet.sk [46.34.226.0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: miroslav@wisdomtech.sk) by server00.inetadmin.eu (Postfix) with ESMTPSA id F3AA713A1C6; Sat, 15 Jan 2022 10:39:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wisdomtech.sk; s=dkiminetadmin; t=1642239559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gfeDWExe+wd+3DQxVnBg4hJPgt0RAPzKVg6T6rM3vFE=; b=aAwwPXkU/0mS6EVYioVb2wEL0ikrtJF9rDiZAeI2JWOITiyKlPUvb04T4m6+zQDeh9grAf oh8192Vdc+H5j0f9TG+1RDm+ynwkzI4dBL6MYpKvS9n20qSWsoL3hAtRxoBruIDLjGJEiw GLS2CSogwzgPBSVCZROwR2CYpNfP3aM= Message-ID: <5c0ed06a-617e-077a-a4a4-549e91d372ba@wisdomtech.sk> Date: Sat, 15 Jan 2022 10:39:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: Touchpad stickiness on AMD laptops (was Dell Inspiron/XPS) Content-Language: en-US To: "Limonciello, Mario" , Wolfram Sang , Benjamin Tissoires , Hans de Goede , Andrea Ippolito , Dmitry Torokhov , Alex Hung , Linux I2C , "open list:HID CORE LAYER" , Platform Driver , "Shah, Nehal-bakulchandra" References: <70cbe360-6385-2536-32bd-ae803517d2b2@redhat.com> <42c83ec8-bbac-85e2-9ab5-87e59a679f95@redhat.com> <5409e747-0c51-24e2-7ffa-7dd9c8a7aec7@amd.com> <596d6af1-d67c-b9aa-0496-bd898350865c@wisdomtech.sk> From: =?UTF-8?Q?Miroslav_Bend=c3=adk?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org > I think "SMBUSx11 I2CCommand" may be what you're looking for. This has no effect and i know (probably) why. In AMD documentation is address ending with 0x20 ASF, not SMBus. Some registers have same function and this is probably reason, why communication works. This code should write 0x2c address to I2CCommand. If this is RW, then reading should return 0x2c, but it returns 0x00. outb_p(0x2c, (0x11 + piix4_smba)); // I2CCommand printk(KERN_INFO "smbus I2CCommand %02x\n", inb_p(0x11 + piix4_smba)); If this is ASF, then 0x11 is read only. 0x0e, 0x0f should have initial value 0xa8 0xaa. Here is register dump: 0000 0002 5802 0000 0f59 00ff ff00 a8aa  0000 0081 0002 0400 0000 0000 0000 0000 Now i am trying to change ASF registers instead of SMBus registers. I have tried to enable interrupts and set listen address, but it don't work or i can't recognize the difference between interrupts generated by transfers and interrupts generated from slave. outb_p(0x02, 0x15 + piix4_smba); // SlaveIntrListenEn outb_p(0x2c << 1 | 0x01, 0x09 + piix4_smba); // ListenAdr | ListenAdrEn Here is register dump for interrupts: https://pastebin.com/eYnb30sL