Partition of ls1021a-iot qspi nor flash

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Partition of ls1021a-iot qspi nor flash

2,011件の閲覧回数
akhilpr
Contributor II

Hi, I m currently working on ls1021a iot board. I need to partition qspi nor flash. I have modified the dts file but still partition is not getting created(/proc/mtd shown empty). Do i have to modify any other file other than dts? please help me to sort out the issue.

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,229件の閲覧回数
zhangsongqin
Contributor I

root@ls1021atwr:~# cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00010000 00010000 "RCW Image"

mtd1: 00080000 00010000 "uboot"

mtd2: 00070000 00010000 "ext uboot"

mtd3: 00600000 00010000 "linux kernel"

mtd4: 00700000 00010000 "rootfs"

mtd5: 00008000 00008000 "spi0.0"

modify dts as follow  ,the same as norflash :

&qspi {

        num-cs = <2>;

        status = "okay";

        qflash0: n25q128a13@0 {

                compatible = "micron,n25q128a13";

                #address-cells = <1>;

                #size-cells = <1>;

                spi-max-frequency = <20000000>;

                reg = <0>;

        partition@0 {

       /* 64KB for rcw */

         reg = <0x00000000 0x00010000>;

         label = "RCW Image";

         read-only;

        };

        partition@10000 {

       /* 512KB for rcw */

         reg = <0x00010000 0x00080000>;

         label = "uboot";

         read-only;

        };

        partition@90000 {

       /* 448KB for ext boot */

         reg = <0x00090000 0x00070000>;

         label = "ext uboot";

         read-only;

        };

        partition@200000 {

       /* 6M for uImage */

         reg = <0x00200000 0x00600000>;

         label = "linux kernel";

         read-only;

        };

0 件の賞賛
返信

1,229件の閲覧回数
akhilpr
Contributor II

Hi zhang songqin,

Thanks for your effort. I able to create partition with ls1021a rev 2 board when i used compatible as  "spansion,s25fl512s" in dts. I also modified some portions of driver files.

0 件の賞賛
返信

1,229件の閲覧回数
toanjunifer
Senior Contributor I

Hi akhilpr‌,

How to modified portions of driver files ?

May you guide me ? I modified .dts file and It's ok, but when I do command: 

$ printenv 

in U-boot mode, I get:

baudrate=115200
board_name=EVK
board_rev=14X14
boot_fdt=try
bootcmd=run findfdt;mmc dev ${mmcdev};mmc dev ${mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
bootcmd_mfg=run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
ethact=FEC1
ethaddr=00:04:9f:04:d3:8d
ethprime=FEC
fdt_addr=0x83000000
fdt_file=undefined
fdt_high=0xffffffff
findfdt=if test $fdt_file = undefined; then if test $board_name = EVK && test $board_rev = 9X9; then setenv fdt_file imx6ul-9x9-evk.dtb; fi; if test $board_name = EVK && test $board_rev = 14X14; then setenv fdt_file imx6ul-14x14-evk.dtb; fi; if test $fdt_file = undefined; then echo WARNING: Could not determine dtb to use; fi; fi;
image=zImage
initrd_addr=0x83800000
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x80800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
mfgtool_args=setenv bootargs console=${console},${baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.file=/fat g_mass_storage.ro=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber="" clk_ignore_unused
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk1p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
panel=TFT43AB
script=boot.scr

Environment size: 2457/8188 byte

with no mtdparts. So I guess I missing something.

Thank you very much

Toan

0 件の賞賛
返信

1,229件の閲覧回数
dhruvalkumarpat
Contributor III

I am also facing some issue with my ls1021aiot based board. Though I am using s25fl164k part . I am able to create a and erase partition but when I tried to read or write system get hang and there is no turning back except reboot. Since you are talking about driver changes It might help me as well. Can you share your driver changes if it's ok for you , Appreciate any help.

Thanks

Dhruval

0 件の賞賛
返信

1,229件の閲覧回数
dhruvalkumarpat
Contributor III

Following changes in spi-nor.c  solved my problem .

{ "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

Thanks

Dhruval