All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: Benjamin Tissoires <btissoir@redhat.com>,
	Hans de Goede <hdegoede@redhat.com>
Cc: Wolfram Sang <wsa@kernel.org>,
	Andrea Ippolito <andrea.ippo@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Alex Hung <alex.hung@canonical.com>,
	Linux I2C <linux-i2c@vger.kernel.org>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	"Shah, Nehal-bakulchandra" <Nehal-bakulchandra.Shah@amd.com>
Subject: Re: Touchpad stickiness on AMD laptops (was Dell Inspiron/XPS)
Date: Tue, 11 Jan 2022 17:15:44 -0600	[thread overview]
Message-ID: <5409e747-0c51-24e2-7ffa-7dd9c8a7aec7@amd.com> (raw)
In-Reply-To: <CAO-hwJJ9ALxpd5oRU8SQ3F65hZjDitR=MzmwDk=uiEguaXZYtw@mail.gmail.com>

+ Nehal from the AMD platform drivers team

On 1/11/2022 05:13, Benjamin Tissoires wrote:
> On Tue, Jan 11, 2022 at 11:34 AM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi Wolfram,
>>
>> On 1/6/22 14:14, Wolfram Sang wrote:
>>> Hi Hans,
>>>
>>> bumping this old thread because there might be some progress and it
>>> still affects quite some people.
>>>
>>>> But I must be honest here, I don't see much progress being made
>>>> on this until someone with a significant amount of kernel / hw-enablement
>>>> experience gets it hands on one of these models. Either because some
>>>
>>> So, I am quite optimistic that Andrea's issue is the same one which
>>> Miroslav Bendik dived into [1]. I will surely try to help with part of
>>> the PIIX I2C driver, but I lack the experience with the RMI4 driver. I
>>> wonder if you could have a look and maybe share your thoughts?
>>>
>>> Thanks and all the best,
>>>
>>>     Wolfram
>>>
>>> [1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2FCAPoEpV0ZSidL6aMXvB6LN1uS-3CUHS4ggT8RwFgmkzzCiYJ-XQ%40mail.gmail.com&amp;data=04%7C01%7Cmario.limonciello%40amd.com%7Cc0a66169619743575d0008d9d4f36227%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637774964813744208%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2PEWQqq%2FqAl3WkxoaKYP5bqpeYoUqvgXwLxHtI5rEOQ%3D&amp;reserved=0
>>
>> Benjamin Tissoires really is the export on the synaptics PS/2 -> switch to
>> smbus mode devices, he did all the initial hw-enablement for them.
>>
>> Benjamin, see the email Wolfram linked above. It seems that on AMD
>> laptops we have synaptics intertouch devices connected to a plain
>> PIIX4 compatible I2C controller.
> 
> Oh, nice (looking at the thread). IIRC last time somebody tried to
> communicate with those touchpads it wasn't working at all.
> 
>>
>> So we need to either add support for SMBUS host-notify to the
>> PIIX4 smbus driver (at least for AMD parts) or we need to support
>> OOB IRQ signalling in the rmi4 code, assuming there is an OOB IRQ
>> at all.
> 
> If the touchpad is using SMBus, we need to have Host Notify. Google
> gave me the following datasheet for PIIX4
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.intel.com%2FAssets%2FPDF%2Fdatasheet%2F290562.pdf&amp;data=04%7C01%7Cmario.limonciello%40amd.com%7Cc0a66169619743575d0008d9d4f36227%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637774964813744208%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=SkwEfI9PxDidXisredOxjP11u%2FGwdq9UTwqqp4EOTZY%3D&amp;reserved=0 and it seems we
> would need to enable something in the section 7.3.9.

Nehal - can your team please look into the lack of 
I2C_FUNC_SMBUS_HOST_NOTIFY?  This causes SMBus touchpads to be unable to 
function out of PS/2 mode.

You can find many more details in the analysis that Miroslav did on 
what's missing in this thread:

https://lore.kernel.org/all/5fc2c68d-a9df-402a-58b5-fdd531f86b55@gmail.com/

> 
> However, without the hardware it's going to be tough for me to enable :/
> 
> For regular I2C touchpads, there is an OOB IRQ we can set up, but when
> the devices are presented and enabled through PS/2 first, they are
> using SMBus only AFAICT.
> 
> Cheers,
> Benjamin
> 
>>
>> I've also added Mario Limonciello from AMD's client group to the Cc,
>>
>> Mario, we can really use some help / insight from AMD here, both with
>> the problem to detect the IO addresses of the AMD PIIX4 compatible
>> smbus controller as well as with smbus host-notify support, see:
>>
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2FCAPoEpV0ZSidL6aMXvB6LN1uS-3CUHS4ggT8RwFgmkzzCiYJ-XQ%40mail.gmail.com&amp;data=04%7C01%7Cmario.limonciello%40amd.com%7Cc0a66169619743575d0008d9d4f36227%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637774964813744208%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2PEWQqq%2FqAl3WkxoaKYP5bqpeYoUqvgXwLxHtI5rEOQ%3D&amp;reserved=0
>>
>> Regards,
>>
>> Hans
>>
> 

Hans,

This thread has splintered but it comes down to two pieces to this puzzle:

1) Systems returning SMBUS address 0xff

The address can be potentially be returned using port I/O or it can be 
done using MMIO.

There is already a thread in process to add support for MMIO, but last I 
heard it's waiting for review comments.

https://lore.kernel.org/all/20210715221828.244536-1-Terry.Bowman@amd.com/

Besides receiving a review and modifying for review comments that patch 
has to spin at least one more time to extend AMD_PCI_SMBUS_REVISION_MMIO 
to 0x51 or later instead of 0x59 or later.

2) SMBus host notify (support for handling interrupts from slave device).

I've looped in the lead from the platform drivers team Nehal to comment
on adding this feature.

Now something else interesting - the SMBUS controller in these laptops 
often is listed in the ACPI tables on IRQ7 with a _HID of SMB0001.

That is adding an ISR for SMBUS Host Notify support may also potentially 
mean needing to revert 2bbb5fa37475d7aa5fa62f34db1623f3da2dfdfa

And maybe if we're lucky 
https://bugzilla.kernel.org/show_bug.cgi?id=201817 gets fixed too.

  reply	other threads:[~2022-01-11 23:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGhUXvBw4rzCQrqttyyS=Psxmhppk79c6fDoxPbV91jE7fO_9A@mail.gmail.com>
2021-08-27  6:57 ` Touchpad stickiness on Dell Inspiron/XPS Andrea Ippolito
2021-09-23  8:47   ` Andrea Ippolito
2021-09-23  9:00     ` Hans de Goede
2021-09-23  9:06       ` Andrea Ippolito
2022-01-06 13:14       ` Wolfram Sang
2022-01-11 10:34         ` Touchpad stickiness on AMD laptops (was Dell Inspiron/XPS) Hans de Goede
2022-01-11 11:13           ` Benjamin Tissoires
2022-01-11 23:15             ` Limonciello, Mario [this message]
2022-01-12  8:33               ` Wolfram Sang
2022-01-12 12:21                 ` Miroslav Bendík
2022-01-12 22:54                   ` Limonciello, Mario
2022-01-15  9:39                     ` Miroslav Bendík
2022-01-15 13:46                       ` Limonciello, Mario
2022-01-15 18:10                         ` Miroslav Bendík
2022-01-17  8:39                         ` Miroslav Bendík
2022-01-17  9:08                           ` Hans de Goede
2022-01-23 17:25                             ` Miroslav Bendík
2022-01-12 12:31                 ` Hans de Goede
2022-01-30 13:14               ` Miroslav Bendík
2022-02-06 18:13               ` Miroslav Bendík

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5409e747-0c51-24e2-7ffa-7dd9c8a7aec7@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=alex.hung@canonical.com \
    --cc=andrea.ippo@gmail.com \
    --cc=btissoir@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.