LS1021A-IOT QSPI PARTITIONING ISSUE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1021A-IOT QSPI PARTITIONING ISSUE

Jump to solution
1,353 Views
nikhilprakash
Contributor IV

Hi,

I am currently working on the LS1021a-iot board.I am trying to partition the QSPI NOR Flash.I have edited the dts file but the partition is not getting created(/proc/mtd shown empty).Is there any other file i need to modify?Please help me to solve the problem.

Thanks in advance.

1 Solution
848 Views
nikhilprakash
Contributor IV

Hi,

1.I edited the driver for quad spi (fsl-quadspi.c).The driver was always returning data of device type vybrid.I made necessary modification so that it returned the LS1021a's data.Here is the modification.

.devtype = FSL_QUADSPI_LS1(instead of FSL_QUADSPI_VYBRID)

2.Edited the dts and made necessary modifications for qspi.We had two qspi chips on the board.dts is given below.

&qspi {

    num-cs = <2>;

    bus-num = <0>;

    fsl,spi-num-chipselects = <2>;

    fsl,spi-flash-chipselects = <0>;

    fsl,qspi-has-second-chip;

  status = "okay";

    qflash0: s25fl512s@0 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "spansion,s25fl512s";

        spi-max-frequency = <20000000>;

        reg = <0>;

        partition@0 {

            label = "Filesystem";

            reg = <0x200000 0x28000000>;

        };

  partition@1 {

  label = "DTB";

  reg = <0x2A00000 0x100000>;

  };

  partition@2{

  label = "Kernel";

  reg = <0x2B00000 0x500000>;

  };

  partition@3{

  label = "Free-space";

  reg = <0x3000000 0x1000000>;

  };

    };

  qflash1: s25fl512s@1 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "spansion,s25fl512s";

        spi-max-frequency = <20000000>;

        reg = <1>;

        partition@0 {

            label = "NOR-Second64";

            reg = <0x0 0x4000000>;

        };

    };

};

Now the qspi is listed in /dev/mtd showing all the partitions.It worked!!!!!

View solution in original post

1 Reply
849 Views
nikhilprakash
Contributor IV

Hi,

1.I edited the driver for quad spi (fsl-quadspi.c).The driver was always returning data of device type vybrid.I made necessary modification so that it returned the LS1021a's data.Here is the modification.

.devtype = FSL_QUADSPI_LS1(instead of FSL_QUADSPI_VYBRID)

2.Edited the dts and made necessary modifications for qspi.We had two qspi chips on the board.dts is given below.

&qspi {

    num-cs = <2>;

    bus-num = <0>;

    fsl,spi-num-chipselects = <2>;

    fsl,spi-flash-chipselects = <0>;

    fsl,qspi-has-second-chip;

  status = "okay";

    qflash0: s25fl512s@0 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "spansion,s25fl512s";

        spi-max-frequency = <20000000>;

        reg = <0>;

        partition@0 {

            label = "Filesystem";

            reg = <0x200000 0x28000000>;

        };

  partition@1 {

  label = "DTB";

  reg = <0x2A00000 0x100000>;

  };

  partition@2{

  label = "Kernel";

  reg = <0x2B00000 0x500000>;

  };

  partition@3{

  label = "Free-space";

  reg = <0x3000000 0x1000000>;

  };

    };

  qflash1: s25fl512s@1 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "spansion,s25fl512s";

        spi-max-frequency = <20000000>;

        reg = <1>;

        partition@0 {

            label = "NOR-Second64";

            reg = <0x0 0x4000000>;

        };

    };

};

Now the qspi is listed in /dev/mtd showing all the partitions.It worked!!!!!