-
Notifications
You must be signed in to change notification settings - Fork 27
ARM: dts: qcom-msm8974pro-oneplus-bacon: Add NFC node #17
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
base: qcom-msm8974-6.9.y
Are you sure you want to change the base?
ARM: dts: qcom-msm8974pro-oneplus-bacon: Add NFC node #17
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -180,6 +180,16 @@ | |||
interrupts-extended = <&tlmm 31 IRQ_TYPE_EDGE_FALLING>; | |||
omit-battery-class; | |||
}; | |||
|
|||
nfc@28 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move this node above the charger since 0x28 < 0x6b
@@ -180,6 +180,16 @@ | |||
interrupts-extended = <&tlmm 31 IRQ_TYPE_EDGE_FALLING>; | |||
omit-battery-class; | |||
}; | |||
|
|||
nfc@28 { | |||
compatible = "nxp,nxp-nci-i2c"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on downstream kernel it says "pn544". but i cant use it with "nxp,pn544-i2c" driver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
in downstream driver. they are also using
IRQ_TYPE_LEVEL_HIGH
for irq. should i swich back to it? or keep usingIRQ_TYPE_EDGE_FALLING
just like whatbq24196_charger
have? the device can work in both modeshttps://github.com/LineageOS/android_kernel_oneplus_msm8974/blob/84bb8fee677f3d6b606e7c21efd34571cc4c818d/drivers/nfc/pn544-oppo_find7op.c#L536