Skip to content

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

Open
wants to merge 1 commit into
base: qcom-msm8974-6.9.y
Choose a base branch
from

Conversation

rhjdvsgsgks
Copy link

@rhjdvsgsgks rhjdvsgsgks commented Jun 17, 2024

in downstream driver. they are also using IRQ_TYPE_LEVEL_HIGH for irq. should i swich back to it? or keep using IRQ_TYPE_EDGE_FALLING just like what bq24196_charger have? the device can work in both modes

https://github.com/LineageOS/android_kernel_oneplus_msm8974/blob/84bb8fee677f3d6b606e7c21efd34571cc4c818d/drivers/nfc/pn544-oppo_find7op.c#L536

compatible = "nxp,nxp-nci-i2c";
reg = <0x28>;

interrupts-extended = <&tlmm 59 IRQ_TYPE_EDGE_FALLING>;
Copy link
Member

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

Copy link
Author

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

Copy link
Author

@rhjdvsgsgks rhjdvsgsgks Jun 18, 2024

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?

Copy link
Member

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 {
Copy link
Member

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";
Copy link
Member

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?

Copy link
Author

@rhjdvsgsgks rhjdvsgsgks Jun 18, 2024

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

Copy link
Member

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

@z3ntu
Copy link
Member

z3ntu commented Jun 17, 2024

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

@z3ntu
Copy link
Member

z3ntu commented Jun 18, 2024

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.

@z3ntu
Copy link
Member

z3ntu commented Oct 20, 2024

@rhjdvsgsgks Please see #17 (comment), this is still missing for this patch to be accepted.

@z3ntu
Copy link
Member

z3ntu commented Feb 9, 2025

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants