New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsupported nfc device in lenovo T470 #455
Comments
I believe the NFC module is connected via I2C bus. Lets see if it is being detected there; can you install
|
Output is:
|
Do you also dual boot Windows? If yes, could you please check the bus under which it is being detected in the device manager? Edit: The I2C adapter is not NFC |
I have the same problem and my output is
I do not have a dual boot with windows. Only ubuntu 17.10 on a t470s |
if someone needs support or information from the system please ask. It would be nice if there will be a driver for this nfc module. |
The device manager reports the NFC reader as NXP Semiconductors(Proximity) NXP Near Field Proximity Provider. Its "location" is under an I2C controller, "Serial I/O I2C Intel Host Controller - 9D60" (translated from my Language so it may be different from the English version). The "bus number" in the device manager is 0, the "BIOS name" is "_SB.PCI0.I2C0.NFC1". The I2C controller listed (Intel Host Controller) is under PCI bus 0, device 21. I'll keep Windows here for a couple more days before wiping it, so if need be, I can provide more details. |
Hey! I would like to participate in solving this issue! |
The same NFC/smartcard reader is installed in the Lenovo Thinkpad Yoga 260. |
Same story in the T580, also the Foxconn NXP NPC300. Wish it worked :( |
Some more details and clarifications:
The correct way to find out which I2C devices are connected to an I2C bus (and are responding) is the following:
This can only tell you the addresses of devices on the bus (e.g., "0x28"), not what they actually are, however. Most of the I2C buses you will see with |
Hi. I found something from DSDT table in my X1C 6th. |
Oh, I didn't know that this can be stored in the DSDT (unfortunately, the DSDT on my HP Elitebook 1030 G2 only contains "0x0000" as pin lists). |
I have a Thinkpad T480s which uses the same NPC300 chip and I partially succeeded getting it to run under Ubuntu 18.04. My DSDT is the same as the one @pccr10001 posted, so I guess the configuration is the same. I edited the pins in src/halimpl/pn54x/tml/i2c/phTmlNfc_alt.h like this:
I got the bus number from ic2detect -l which looks like this:
Bus 6 was the only one that made sense to me and indeed it worked. The i2c address and ports are from the DSDT, finally the offset 360 is from /sys/class/gpio/gpiochip360/base Afterwards I configured the library like this (not sure if it is a pn7150 or pn7120 but I guess 7150 because according to data sheets I found the chip supports tags of type 5 which the 7120 does not):
Then I ran make and make install and finally was able to start the demo app:
As you can see it correctly detected the Mifare classic card I tested. I'm not sure if the RAW Tag transceive failed means that something is still not working. Maybe my card is not a standard Mifare Classic but a modified version, I'm not sure and don't have anything else to test. I guess the next step would be to try to get the proper kernel module to run, it shouldn't be too hard with the configuration already known. One thing I noticed is that the touchpad does not seem to play well with the nfc driver. whenever I start it, the touchpad becomes laggy, the mouse pointer sometimes jumps around and acceleration seems to stop working. This persists for a few seconds, then everything works again and then it starts being buggy again. This even persists after I stop the nfc demo until I reboot the system. I don't have much experience with i2c so if anyone could point me in the right direction that would be great. Also I have never worked with NFC before, am I correct in assuming that libnfc and libnfc-nci are not compatible so even if we got it to work, most of the software out there would have to be heavily modified to work on our machines? |
@jr64 I can confirm this also works on my regular T480 with Arch Linux. Same DSDT file, and the i2c bus has the same name altough it is sometimes on The demo app works with poll, and write on a small tag, and share also works with my Android phone. I would also like to point out the path |
@JC64 This solution works on my X1C and card emulation works too, I am using Ubuntu 18.04.1. |
Update: I just modified the i2c kernel driver (https://github.com/NXPNFCLinux/nxp-pn5xx) to support ACPI and autoconfigure itself. Seems to work fine to me. I'll post the code as soon as I have cleaned it up. However, this still does not fix the touchpad issues I am experiencing. Does anyone else have this problem? Any ideas how to fix? I'm assuming the touchpad is also connected via i2c and the driver is somehow interfering with it? |
For anyone interested, I just uploaded the first version of my modified kernel driver: https://github.com/jr64/nxp-pn5xx |
@jr64 Here is the solution of the trackpoint problem. |
@pccr10001 Thanks, that seemed really promising but unfortunately it looks like they put an Elan touchpad and not a Synaptics in the T480s. To quote from https://patchwork.kernel.org/patch/10330857/: "- the T480s is using an Elan touchpad, so that's a different story" Luckily it looks like there is work being done on Elan too (https://patchwork.kernel.org/patch/10324633/) but it's not yet included in the kernel I'm running. Anyways, at least I'm fairly certain now that the problem is with the touchpad driver and not with the code I wrote for the NFC module. |
Oh and another funny detail: the only way I found to fix the slow trackpad without rebooting the system is to close and open the notebook. Reloading the psmouse driver seems to do nothing, but putting the device to sleep and waking it up again fixes it permanently (well at least until I use NFC again). |
I'm on a X280: But why would I need the kernel module adjusted by @jr64 , and how can I confirm that it worked after loading. Also are there any client tools, beside the demoapp, which work right now? |
@spielkind The kernel module has two advantages:
As for how to test: if you configure the library with "--enable-i2c" instead of "--enable-alt" it will only work if the kernel modules is loaded. |
Thanks @jr64 and others for the progress on this. I've gotten this to work (sort of) on a T480s with @jr64's kernel module and Edit: the detection rate for a passport with RFID works a lot better (as opposed to two random RFID-capable bank cards I have), though Im getting different NFCID values etc. every tap. I guess something with the configuration/calibration of the RF stuff is really off.. :-/ |
@jr64 : did you plan to upstream the driver ? I tried it on a x280 and it works as far as I can tell. That would be an improvement of the x280 support on Linux. |
I have been throught the upstream kernel and found the following commit: commit 0a5942c8e1480db4b8ee7a8d643e4945ef2f8fed
So at this point I assume the ACPI is supported in mainline since 2015. But if we look closely at the ACPI table and match hid we have in this driver: static const struct acpi_device_id pn544_hci_i2c_acpi_match[] = { But on my x280, the ACPI table is: |
dsdt table looks buggy: Intel ACPI Component Architecture Compiler aborting due to parser-detected syntax error(s) ASL Input: dsdt.dsl - 34418 lines, 1065629 bytes, 15154 keywords Compilation complete. 1 Errors, 0 Warnings, 0 Remarks, 0 Optimizations |
And even worse, run: Test |Pass |Fail |Abort|Warn |Skip |Info | WTF! |
@jr64 Same question here. Do you think your driver can be upstreamed? Thanks! |
Just want to let you know... With the patch series "[PATCH v2 00/12] NFC: nxp-nci: clean up and support new ID" (see [1]) I was able to get my NFC chip NXP NFC300 ("NXP1001") run on my Lenovo ThinkPad T470 with the NFC nxp-nci driver shipped with Linux v5.1.1. Furthermore, I can acces, list and poll with neard (daemon) v0.16 and neard-tools from Debian/buster. There is no need for nxp-pn5xx driver and libnfc-nci from NXP. Before this I expermented with jr64 nxp-pn5xx (acpi support) and libnfc-nci from NXP and had sucess with running the demo-app. I saw in the logs: NxpHal: phNxpNciHal_deriveChipType Hw Version (0x68) Not Found: Setting Default Chip Type : PN548C2 Hope this helps. UPDATE: Add relevant threads in linux-wireless mailing-list and patchwork [1] https://patchwork.kernel.org/project/linux-wireless/list/?submitter=33142 |
Cool, I applied the patchset against Linux 5.1.2 and the nfc adapter on my X1 C6 came to live. With I have neard installed but it cannot currently find the default bluetooth adapter to pair a bluetooth headset, but at least it's trying to do that. |
Hiya, I'm on kernel 5.4.3 (which definitely has the patchset changes, I've verified they're there manually) on a Lenovo T490. The following seem to be automatically loaded at boot:
which suggests the device is being automatically detected, but I can't get nfctool, nfc-list or rfkill to list an adaptor, and I have no unusual i2c devices listed under
Only one contains an entry for 0x28, and it has entries for every value. It's also DPDDC-A which according to above comments is graphics related:
The NXP-NCI demo app didn't work with the default configuration, but I also couldn't verify the demo app from the My DSDT also only lists 0x0000 for the various pin lists. I'd very much like to help debug and get this working for everyone, since it seems a waste to have the hardware but not be able to use it. Please let me know if there's any additional information I can provide, or further testing I can run to try to figure out the issue... |
My NFC reader started working after upgrading the Synaptics/Fingerprint reader firmware (Prometheus). This is in lvfs-testing which needs to be enabled for fwupdmgr. After upgrading, the reader is now detected by nfctool (Kernel 5.4.6). |
More updates on my side (Lenovo X1 Carbon Gen 7). tl;dr: linux_libnfc-nci works! The ACPI DSDT table is similar to the one posted above but addresses change:
i2cdetect -l:
This gives i2c-7 and i2c-8 as best candidates. But I also see I grabbed
Where the bus is the one determined above, the I2C address comes from the DSDT, 200 is the offset from Some people above reported some success at this point but my Doing I wonder if there is a way to get both a libnfc-nci program and rfkill co-exist. Pointers from here are appreciated! |
@jr64 first, I must report that the driver works on Thinkpad X1 Carbon Gen 7. Thanks for your work!
|
@crosser just two messages above I reported it working on 5.4.6 because it was upstreamed already. |
@hsanjuan Thanks! From the comment, it was not clear to me that you were using upstream module. |
@hsanjuan Can you please provide a few more details? I got my fingerprint reader upgraded to the firmware from lvfs-testing (although fwupdmgr now isn't displaying it), and I'm on 5.4.10. I've got all the in-kernel nfc adaptors compiled as modules for testing, but can't find one that actually produces any dmesg output or anything that shows up in libnfc's nfc-list. As best I can tell, my device isn't accessible directly over I2C, but shows up in /sys as Exactly which driver do you have loaded? Is it:
|
Does My nfc/nxp/nci related modules:
They all get loaded automatically, I did nothing special here and did not compile any extra modules. For reasons discussed above, libnfc tooling does not see it, but I could compile Mind that NFC needs to be enabled in the UEFI config (I had it disabled because it broke the touchpad before). |
Happy new 2020. Wow, so many feedbacks :-). Unfortunately, I have no more the Lenovo T470 notebook as I left the company. Thanks for the hint with upgrading to a newer firmware via LVFS/testing. My last feedback from the Linux-kernel maintainers: The userspace tools seem to be a culprit to communicate with NFC device. Happy testing and bonne chance folks. Regards,
|
@hsanjuan Ok, so we must have different configurations (mine's detailed higher up). I do get those modules automatically loaded, but
I haven't tried any non-kernel modules yet, so I haven't yet had the hardware working at all. What concerns me most is that I can't find the appropriate i2c bus in the list |
@ikelos hmm, I'm on the Thinkpad X1 Carbon Gen 7. While |
Hi! I tried replicating the steps described by @hsanjuan on different hardware - Thinkpad X390 Yoga. After compiling 5.4.8 kernel with upstream nxp_nci_i2c module enabled (current Debian default config does not include NCI modules) and adjusting the pin offsets according to my DSDT table, I could successfully run the various The device also shows up in I looked around the sources for |
@hsanjuan Hmmm, interesting to know the devices don't show up in i2cdetect, but given I don't have the buses it still suggests there's a difference. Correct, there's no NXP1001:00 under i2c, only under acpi. For the DSDT table, I tried to follow the instructions in the comment above:
So I'm guessing that's a problem? 5:S In the dsl file there's a section that mentions the NXP, it was:
I guess the pin lists being 0x0000 is also a problem. I'm not sure where to go from here, any pointers would be greatly appreciated... |
Thanks @pbirkants Just to clarify: Please, open a bug-report in Debian's BTS [1] that required kernel-modules and kernel-configs get enabled. I would have said please concentrate on the Linux-upstream work and contact the appropriate maintainers [2], but Linux-NFC maintenance is currently marked "orphan" [3]. I am still confused which user-space tools is needed to get stuff run. [1] https://www.debian.org/Bugs/ |
@ikelos the fact that the ports are 0x0000 does not look good though, perhaps someone on the internet has a decoded and posted a table with better values for your model? Maybe because ACPI is wrong, the kernel cannot find the device.... an alternative would be to try to get values from Windows if that's an option. |
I'm using Arch Linux on a T490. I had the kernel parameter |
Well, I was not as successful as I hoped. It's enabled in the UEFI firmware, the kernel modules are loaded, rkfill does list it, nfctools does list it:
But powering on does not work:
Also, nfc-list does not find it:
|
I'm running Ubuntu 20.04.1 LTS and tried about everything discussed here on my X1 Carbon 7th gen. |
Bump ! |
I have just published a blog post about this topic. A rough TLDR for Arch:
Note that, I do not have the NFC module present on T470, only the smartcard module. These two both appear to be handled by Alcor AU9450. |
Hey cool. |
Hi, I'm trying to get the NFC reader in my T590 working. It is detected by rfkill
It's also detected by the system as I2C device
And even by nfctool
But not by nfc-list (or any other libnfc application)
Trying to enable the chip with nfctool (that does recognize it) unfortunately gives another error
What can I do to get the chip working? I'd really love to get it working. I feel like I'm so close, yet so far away, especially 'cause I don't know why it is detected, but nothing more. Any help would be appreciated. Thanks in advance, Jetse |
The situation on my device is pretty similar to yours (HP ZBook Firefly G8), except that I can use it with I think that There was an issue regarding this (#466) but it was closed by @smortex, IMO, prematurely and for a wrong reason:
|
I have a similar issue on a Thinkpad T14 Gen3 (Intel).
From this it seems
NFC-related drivers are loaded:
|
Same issue on a Lenovo ThinkPad T14 Gen 3 (Intel). Here are some results:
→ returns nothing.
It seem that I'm able to power on the NFC module:
but this doesn't help anything:
I've found in this document that the NFC module used on the Lenovo ThinkPad T14 Gen 3 (Intel) is the It seems that this module is not supported on EDIT: I opened my laptop to check and the NFC module is indeed the |
I have the same issue with my Lenovo ThinkPad T590 (20N4) Arch Linux, kernel I enable the device with
With
in my Playing with the This is my "debug" code of the function
With the updated module loaded I get:
With
in the Polling results in a failure:
It seems that the fourth read triggers -EREMOTEIO from the NCI header read. Could this be an issue with |
Hello everyone, nfctool works on my ThinkPad (L15) after patching the nxp-nci driver. Information about the patch can be found here: Maybe this will help some of you as well. |
Nice to hear that, although that patch is a rough it makes the device working by checking the state of the IRQ GPIO prior reading. Next step would be adding support for Linux NFC subsystem in libnfc, as mentioned in issue #674. Marco |
I have the exact same situation as @JetseVerschuren, @albertodonato and @cluxter on my Lenovo ThinkPad X1 Yoga G7 with Fedora 39 and Kernel 6.6.13 . Even after enabling, According to the linked document my device also features the
However, I'm able to poll with
All this is with
I'm at a loss. Also, #674 is closed without any pull request. Looks like nothing happened there. @psy0p How did you verify that NFC is working? Maybe I'll try this patch in the future. For now I'm done with this. There seems to be little to no progress and I know too little to contribute in a meaningful way. As a side note: After compiling https://github.com/NXPNFCLinux/linux_libnfc-nci, I get the following error with the
This might very well be because I didn't install the compiled drivers via Interestingly, there is an open pull request over at NXPNFCLinux/linux_libnfc-nci#151, that claims to add support to my device but doesn't provide any additional information. As I understand this won't help with libnfc, anyway. EDIT: Taking a closer look at NXPNFCLinux/linux_libnfc-nci#151, this appears to be similar to what @jr64 did here: #455 (comment). I bet the configuration to the i2c-2 bus is the solution to get the Also, I found this test application: https://github.com/NXPNFCLinux/linux_NfcFactoryTestApp. Again, not tested yet but maybe I'll give this a second look in the future. |
Unfortunately, the nfc module of lenovo T470 is not yet supported.
Neither lsusb is showing the device:
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 138a:0097 Validity Sensors, Inc.
Bus 001 Device 004: ID 5986:111c Acer, Inc
Bus 001 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Is there any progress on this?
Thanks.
The text was updated successfully, but these errors were encountered: