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? |
[ Upstream commit dc09f00 ] During noirq suspend phase the Raspberry Pi power driver suffer of firmware property timeouts. The reason is that the IRQ of the underlying BCM2835 mailbox is disabled and rpi_firmware_property_list() will always run into a timeout [1]. Since the VideoCore side isn't consider as a wakeup source, set the IRQF_NO_SUSPEND flag for the mailbox IRQ in order to keep it enabled during suspend-resume cycle. [1] PM: late suspend of devices complete after 1.754 msecs WARNING: CPU: 0 PID: 438 at drivers/firmware/raspberrypi.c:128 rpi_firmware_property_list+0x204/0x22c Firmware transaction 0x00028001 timeout Modules linked in: CPU: 0 PID: 438 Comm: bash Tainted: G C 6.9.3-dirty msm8974-mainline#17 Hardware name: BCM2835 Call trace: unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x34/0x44 dump_stack_lvl from __warn+0x88/0xec __warn from warn_slowpath_fmt+0x7c/0xb0 warn_slowpath_fmt from rpi_firmware_property_list+0x204/0x22c rpi_firmware_property_list from rpi_firmware_property+0x68/0x8c rpi_firmware_property from rpi_firmware_set_power+0x54/0xc0 rpi_firmware_set_power from _genpd_power_off+0xe4/0x148 _genpd_power_off from genpd_sync_power_off+0x7c/0x11c genpd_sync_power_off from genpd_finish_suspend+0xcc/0xe0 genpd_finish_suspend from dpm_run_callback+0x78/0xd0 dpm_run_callback from device_suspend_noirq+0xc0/0x238 device_suspend_noirq from dpm_suspend_noirq+0xb0/0x168 dpm_suspend_noirq from suspend_devices_and_enter+0x1b8/0x5ac suspend_devices_and_enter from pm_suspend+0x254/0x2e4 pm_suspend from state_store+0xa8/0xd4 state_store from kernfs_fop_write_iter+0x154/0x1a0 kernfs_fop_write_iter from vfs_write+0x12c/0x184 vfs_write from ksys_write+0x78/0xc0 ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xcc93dfa8 to 0xcc93dff0) [...] PM: noirq suspend of devices complete after 3095.584 msecs Link: raspberrypi/firmware#1894 Fixes: 0bae6af ("mailbox: Enable BCM2835 mailbox support") Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
commit 9af2efe upstream. The fields in the hist_entry are filled on-demand which means they only have meaningful values when relevant sort keys are used. So if neither of 'dso' nor 'sym' sort keys are used, the map/symbols in the hist entry can be garbage. So it shouldn't access it unconditionally. I got a segfault, when I wanted to see cgroup profiles. $ sudo perf record -a --all-cgroups --synth=cgroup true $ sudo perf report -s cgroup Program received signal SIGSEGV, Segmentation fault. 0x00005555557a8d90 in map__dso (map=0x0) at util/map.h:48 48 return RC_CHK_ACCESS(map)->dso; (gdb) bt #0 0x00005555557a8d90 in map__dso (map=0x0) at util/map.h:48 msm8974-mainline#1 0x00005555557aa39b in map__load (map=0x0) at util/map.c:344 msm8974-mainline#2 0x00005555557aa592 in map__find_symbol (map=0x0, addr=140736115941088) at util/map.c:385 msm8974-mainline#3 0x00005555557ef000 in hists__findnew_entry (hists=0x555556039d60, entry=0x7fffffffa4c0, al=0x7fffffffa8c0, sample_self=true) at util/hist.c:644 msm8974-mainline#4 0x00005555557ef61c in __hists__add_entry (hists=0x555556039d60, al=0x7fffffffa8c0, sym_parent=0x0, bi=0x0, mi=0x0, ki=0x0, block_info=0x0, sample=0x7fffffffaa90, sample_self=true, ops=0x0) at util/hist.c:761 msm8974-mainline#5 0x00005555557ef71f in hists__add_entry (hists=0x555556039d60, al=0x7fffffffa8c0, sym_parent=0x0, bi=0x0, mi=0x0, ki=0x0, sample=0x7fffffffaa90, sample_self=true) at util/hist.c:779 msm8974-mainline#6 0x00005555557f00fb in iter_add_single_normal_entry (iter=0x7fffffffa900, al=0x7fffffffa8c0) at util/hist.c:1015 msm8974-mainline#7 0x00005555557f09a7 in hist_entry_iter__add (iter=0x7fffffffa900, al=0x7fffffffa8c0, max_stack_depth=127, arg=0x7fffffffbce0) at util/hist.c:1260 msm8974-mainline#8 0x00005555555ba7ce in process_sample_event (tool=0x7fffffffbce0, event=0x7ffff7c14128, sample=0x7fffffffaa90, evsel=0x555556039ad0, machine=0x5555560388e8) at builtin-report.c:334 msm8974-mainline#9 0x00005555557b30c8 in evlist__deliver_sample (evlist=0x555556039010, tool=0x7fffffffbce0, event=0x7ffff7c14128, sample=0x7fffffffaa90, evsel=0x555556039ad0, machine=0x5555560388e8) at util/session.c:1232 msm8974-mainline#10 0x00005555557b32bc in machines__deliver_event (machines=0x5555560388e8, evlist=0x555556039010, event=0x7ffff7c14128, sample=0x7fffffffaa90, tool=0x7fffffffbce0, file_offset=110888, file_path=0x555556038ff0 "perf.data") at util/session.c:1271 msm8974-mainline#11 0x00005555557b3848 in perf_session__deliver_event (session=0x5555560386d0, event=0x7ffff7c14128, tool=0x7fffffffbce0, file_offset=110888, file_path=0x555556038ff0 "perf.data") at util/session.c:1354 msm8974-mainline#12 0x00005555557affaf in ordered_events__deliver_event (oe=0x555556038e60, event=0x555556135aa0) at util/session.c:132 msm8974-mainline#13 0x00005555557bb605 in do_flush (oe=0x555556038e60, show_progress=false) at util/ordered-events.c:245 msm8974-mainline#14 0x00005555557bb95c in __ordered_events__flush (oe=0x555556038e60, how=OE_FLUSH__ROUND, timestamp=0) at util/ordered-events.c:324 msm8974-mainline#15 0x00005555557bba46 in ordered_events__flush (oe=0x555556038e60, how=OE_FLUSH__ROUND) at util/ordered-events.c:342 msm8974-mainline#16 0x00005555557b1b3b in perf_event__process_finished_round (tool=0x7fffffffbce0, event=0x7ffff7c15bb8, oe=0x555556038e60) at util/session.c:780 msm8974-mainline#17 0x00005555557b3b27 in perf_session__process_user_event (session=0x5555560386d0, event=0x7ffff7c15bb8, file_offset=117688, file_path=0x555556038ff0 "perf.data") at util/session.c:1406 As you can see the entry->ms.map was NULL even if he->ms.map has a value. This is because 'sym' sort key is not given, so it cannot assume whether he->ms.sym and entry->ms.sym is the same. I only checked the 'sym' sort key here as it implies 'dso' behavior (so maps are the same). Fixes: ac01c8c ("perf hist: Update hist symbol when updating maps") Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Matt Fleming <matt@readmodwrite.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: https://lore.kernel.org/r/20240826221045.1202305-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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