AnsweredAssumed Answered

IFC NAND not working in Kernel

Question asked by Pranav Madhu on Feb 10, 2016
Latest reply on Feb 15, 2016 by Scott Wood

Hi,

I'm having a custom LS1021a board. We have a 1GB NAND Flash mounted on IFC  AD0-AD7 line. We are able to access the NAND from u-boot, but it fails on linux. The dmesg for its driver is

[   71.345016] fsl-ifc 153000000010000.ifc: Freescale Integrated Flash Controller

[   71.345037] fsl-ifc 153000000010000.ifc: failed to get memory region

 

[   97.042203] fsl,ifc-nand 0.ifc: fsl_ifc_nand_probe: failed to get resource

[   97.049056] fsl,ifc-nand: probe of 0.ifc failed with error -22

 

The device tree modification for ifc is provided below

 

ls1021a.dtsi

----------------

 

        ifc: ifc@1530000 {

            compatible = "fsl,ifc-nand","simple-bus","fsl,ls1021a-ifc", "fsl,ifc";

            reg = <0x0 0x1530000 0x0 0x10000>;

            interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;

            status="disabled";

            ranges=<0x0 0x0 0x0 0x7e800000 0x00010000>;

            flash@0,0 {

                            #address-cells = <1>;

                            #size-cells = <1>;

                            compatible = "fsl,ifc-nand";

                            reg = <0x0 0x0 0x10000>;

                            bank-width = <2>;

                            device-width = <1>;

 

                              partition@0 {

                                   /* 32MB for user data */

                                   reg = <0x0 0x02000000>;

                                   label = "NAND Data";

                              };

                    };

          };

 

ls1021a-iot.dts

--------------------

&ifc {

    status = "okay";

    compatible = "fsl,ifc-nand";

    #address-cells = <1>;

    #size-cells = <1>;

    reg = <0x0 0x0 0x10000>;

/*    ranges = < 0x1 0x0 0x0 0xffa00000 0x00010000 >;*/

    partition@0 {

        reg = <0x0 0x40000000>;

        label = "NAND Configuration";

    };

};

 

and the driver file

fsl_ifc_nand.c

------------------

static const struct of_device_id fsl_ifc_nand_match[] = {

    {

        .compatible = "fsl,ifc-nand",

    },

    {}

};

 

static struct platform_driver fsl_ifc_nand_driver = {

    .driver = {

        .name    = "fsl,ifc-nand",

        .owner = THIS_MODULE,

        .of_match_table = fsl_ifc_nand_match,

    },

    .probe       = fsl_ifc_nand_probe,

    .remove      = fsl_ifc_nand_remove,

};

 

Can anyone help me in solving this issue?

Thanks in Advance,

Pranav Madhu

Outcomes