ARM: dts: qcom-msm8974pro-oneplus-bacon: Add NFC node#17
ARM: dts: qcom-msm8974pro-oneplus-bacon: Add NFC node#17rhjdvsgsgks wants to merge 1 commit intomsm8974-mainline:qcom-msm8974-6.9.yfrom
Conversation
pin number in downstream are hardcoded in driver rather than read from dt https://github.com/LineageOS/android_kernel_oneplus_msm8974/blob/84bb8fee677f3d6b606e7c21efd34571cc4c818d/drivers/nfc/pn544-oppo_find7op.c#L49-L51
| compatible = "nxp,nxp-nci-i2c"; | ||
| reg = <0x28>; | ||
|
|
||
| interrupts-extended = <&tlmm 59 IRQ_TYPE_EDGE_FALLING>; |
There was a problem hiding this comment.
Other devices in mainline seem to use either IRQ_TYPE_EDGE_RISING or IRQ_TYPE_LEVEL_HIGH, so I'm inclined to think IRQ_TYPE_EDGE_FALLING is not very correct
There was a problem hiding this comment.
yes. i observed some
power_supply bq27541-0: driver failed to report `capacity' property: -6
bq27xxx-battery 0-0055: error reading current
for the charger on same bus which also using IRQ_TYPE_EDGE_FALLING. i will test IRQ_TYPE_EDGE_RISING and IRQ_TYPE_LEVEL_HIGH to see can they have a better stability
There was a problem hiding this comment.
i can confirm rmi4-i2c-dev on downstream are using IRQ_TYPE_EDGE_FALLING. but i didnt find anything about bq24196_charger's irq pin (and its config) on downstream. do you know where is it come from?
There was a problem hiding this comment.
What should the touchscreen (rmi4) and charger (bq....) have to do with the nfc chip? I don't quite get why you look at those right now.
| omit-battery-class; | ||
| }; | ||
|
|
||
| nfc@28 { |
There was a problem hiding this comment.
please move this node above the charger since 0x28 < 0x6b
| }; | ||
|
|
||
| nfc@28 { | ||
| compatible = "nxp,nxp-nci-i2c"; |
There was a problem hiding this comment.
You have any clue what actual NFC chipset is in the phone? Some number like NQ310 or PN547?
There was a problem hiding this comment.
on downstream kernel it says "pn544". but i cant use it with "nxp,pn544-i2c" driver
There was a problem hiding this comment.
Keep it like this then. Maybe we can find an ID register on the chip that give us some better idea but it's not really important
|
Super cool you got it working! I can test it also, I have a OnePlus One too For the commit, could you please set your git author to something that resembles a name & normal email address? And then add a Signed-off-by footer to the commit message please https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1 |
|
Just tested this on my device, and it works! 🎉 It's sometimes a bit picky with where exactly to place the NFC tag but it doesn't seem like it's something that could be changed in the dts anyways. I'd expect stock Android to not behave much different. |
|
@rhjdvsgsgks Please see #17 (comment), this is still missing for this patch to be accepted. |
|
ping |
|
Another ping? |
in downstream driver. they are also using
IRQ_TYPE_LEVEL_HIGHfor irq. should i swich back to it? or keep usingIRQ_TYPE_EDGE_FALLINGjust like whatbq24196_chargerhave? the device can work in both modeshttps://github.com/LineageOS/android_kernel_oneplus_msm8974/blob/84bb8fee677f3d6b606e7c21efd34571cc4c818d/drivers/nfc/pn544-oppo_find7op.c#L536