android-rpi / device_arpi_rpi4

Device build-config for Raspberry Pi 4
219 stars 93 forks source link

How to add i2c device node? #127

Open hongbii opened 2 months ago

hongbii commented 2 months ago

Hi, I'm trying to integrate the Android-RPi arpi-11 with the NXP PN7150 NFC module, which uses I2C from onboard GPIO pins 2 and 3, an interrupt pin using onboard GPIO 23, and an enable pin using onboard GPIO 24. This is the I2C device tree definition I am trying to add to the bcm2711-rpi-4-b.dtb, but this implementation didn't work. Can anyone help? Thanks!

&i2c1 {
   pinctrl-names = "default";
   pinctrl-0 = <&i2c1_pins>;
   clock-frequency = <100000>;
   status = "okay";
   pn547: pn547@28 {
      compatible = "nxp,pn547";
      reg = <0x28>;
      clock-frequency = <400000>;
      interrupt-gpios = <&gpio 23 0>;
      enable-gpios = <&gpio 24 0>;
   };
};
losgobbi commented 3 weeks ago

Hi!! Is the NXP driver at the rpi-kernel? Looking briefly, I can see a repo from NXP with a nxp-pn5xx module, which should match the definition from this "compatible" string. You have to double check that. If it was enabled, you can check the kernel logs and look for driver logs if there is any. Regards!