AnsweredAssumed Answered

NFC PN5180 on the IMX7D

Question asked by chandini indavara basavaraju on Jul 1, 2016
Latest reply on Jul 8, 2016 by chandini indavara basavaraju

H

 

I'm using IMX7D board and Freesacle Linux kernel 4.1.15 for development [using YOCTO to build]

 

I'm trying to insert NXP NFCRdLib Kernel BAL(Bus Abstraction Layer) Module. with reference of

GitHub - christianeisendle/nxprdlib-kernel-bal: NXP NFCRdLib Kernel BAL Module

 

successfully built  "bal.ko"  file and i did few changes in imx7d-sdb.dts file .

 

        &ecspi3 {

        fsl,spi-num-chipselects = <1>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>;
        cs-gpios = <&gpio6 22 0>;
        status = "okay";
 
        spidev0: spi@0 {
        compatible = "nxp,bal";
        reg = <0>;
        spi-max-frequency = <500000>;
        };
}
pinctrl_ecspi3_cs: ecspi3_cs_grp {
 fsl,pins = <
 MX7D_PAD_SAI2_TX_DATA__GPIO6_IO22   0x80000000
 >;
 };
pinctrl_ecspi3: ecspi3grp {
  fsl,pins = <
  MX7D_PAD_SAI2_TX_SYNC__ECSPI3_MISO 0x2
  MX7D_PAD_SAI2_TX_BCLK__ECSPI3_MOSI 0x2
  MX7D_PAD_SAI2_RX_DATA__ECSPI3_SCLK 0x2
  >;
  };
     
built new kernel .

 

But after inserting module getting below messages.

$  insmod bal.ko

Registering character device /dev/bal. Status: 0

BAL_SPI_DRIVER spi2.0: Probing BAL driver

BAL_SPI_DRIVER spi2.0: BUSY pin mapped to an invalid GPIO!

 

I know . i need to modify kernel in order to assign one SPI device with BAL module instead of the spidev module. But i am not sure where i need to make changes.

 

Could anyone help me to track this ?

 

For more refernce attached bal.c .

 

Thanks in advance.

 

Chandini

Original Attachment has been moved to: bal.c.zip

Outcomes