Getting I2C to work with the Grinch custom kernel

I am trying to use I2C to communicate with the NXP NFC module PN7120. The instructions I am following can be found here:
The nxp-pn5xx kernel module that I am loading can be found here:
The demo App for testing the module can be found here:

The result of uname -a is:

Linux tegra-ubuntu 3.10.24-grinch-19.3.6-dtb-kmod #1 SMP PREEMPT Wed Apr 20 21:11:40 UTC 2016 armv7l armv7l armv7l GNU/Linux

A snippet of dmesg:

[  625.791701] pn54x_dev_open : 10,40
[  625.791722] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  625.791728] pn544_enable power on
[  625.992136] pn54x_dev_ioctl, cmd=1074063617, arg=0
[  625.992148] pn544_disable power off
[  626.193112] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  626.193131] pn544_enable power on
[  626.294768] tegra-i2c tegra12-i2c.0: no acknowledge from address 0x28
[  626.294858] pn54x_dev_write : i2c_master_send returned -121
[  626.302939] tegra-i2c tegra12-i2c.0: no acknowledge from address 0x28
[  626.303018] pn54x_dev_write : i2c_master_send returned -121
[  626.310984] tegra-i2c tegra12-i2c.0: no acknowledge from address 0x28
[  626.311087] pn54x_dev_write : i2c_master_send returned -121
[  626.319101] tegra-i2c tegra12-i2c.0: no acknowledge from address 0x28
[  626.319175] pn54x_dev_write : i2c_master_send returned -121
[  626.327165] tegra-i2c tegra12-i2c.0: no acknowledge from address 0x28
[  626.327256] pn54x_dev_write : i2c_master_send returned -121
[  626.335290] tegra-i2c tegra12-i2c.0: no acknowledge from address 0x28
[  626.335366] pn54x_dev_write : i2c_master_send returned -121
[  626.342152] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  626.342163] pn544_enable power on
[  626.543097] pn54x_dev_ioctl, cmd=1074063617, arg=0
[  626.543109] pn544_disable power off
[  626.744137] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  626.744162] pn544_enable power on

When I run the nfcDemoApp, I don’t get any error messages and it just says “press enter to quit”.
I have a Logic Analyzer attached to the I2C bus and there is no signal (neither clock nor data) when I run the nfcDemoApp, but I have verified that the I2C bus works with a user-space application I wrote.

I have the expected /dev/pn544 entry and I did add the device into the device-tree. It looks like the PN7120 won’t respond to its address, even though I verified 0x28 was the correct address.

Does anyone have any ideas as to why it’s not working?

Update 0: I have the PN7120 physically attached to I2C bus #1. It looks like the driver is trying to use tegra12-i2c.0, which maps to 0x7000C000. This is NOT what I want. I put the device tree node under i2c@7000C400. I’ll try using the i2c-0 pins on the Jetson and see if I get responses on that bus. Meanwhile, I’ll also look to see if I can configure it to use i2c-1

Update 1: So attaching the PN7120 to the i2c-0 bus seemed to be part of the problem… nfcDemoApp is still not giving any error messages, and dmesg doesn’t seem to give any errors.

output of dmesg:

[  137.360578] init: plymouth-stop pre-start process (2273) terminated with status 1
[  215.392538] pn54x_dev_open : 10,40
[  215.392556] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  215.392560] pn544_enable power on
[  215.593670] pn54x_dev_ioctl, cmd=1074063617, arg=0
[  215.593717] pn544_disable power off
[  215.794704] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  215.794746] pn544_enable power on
[  216.907563] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  216.908098] pn544_enable power on
[  217.109932] pn54x_dev_ioctl, cmd=1074063617, arg=0
[  217.110097] pn544_disable power off
[  217.311932] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  217.312113] pn544_enable power on
[  218.422467] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  218.423170] pn544_enable power on
[  218.624342] pn54x_dev_ioctl, cmd=1074063617, arg=0
[  218.624512] pn544_disable power off
[  218.826567] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  218.827195] pn544_enable power on
[  219.937294] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  219.937469] pn544_enable power on
[  220.139918] pn54x_dev_ioctl, cmd=1074063617, arg=0
[  220.140086] pn544_disable power off
[  220.341382] pn54x_dev_ioctl, cmd=1074063617, arg=1
[  220.341868] pn544_enable power on
[  256.452283] pn54x_dev_release : closing 10,40

BUT, the i2c bus is acting very strangely and the NFC module still doesn’t work. Using the logic analyzer, I can see that the clock signals are very irregular and most of the time there is no clock signal when data is being transfered. I am using the OM5577 development shield with pull-up resistors already in circuit. Thus, I don’t think I need additional pull-ups, but just to be on the safe side, I tested both with and without 10k pull-up resistors for SDA and SCLK. Both of them give the same erratic results.

Update 2: Okay, so I feel a little silly here… After switching from i2c-1 to i2c-0 bus (from 3.3v to 1.8v) I forgot to change the voltage settings on my Logic Analyzer. The i2c signal comes through nice and clear with ACK’s and everything. The nfcDemoApp still doesn’t behave like I would expect it to (the OM5577 shield refuses to scan any tags), but I think I have solved the driver issue.