petalinux2020.1编译系统后不能看到mtd分区

3 篇文章 1 订阅
2 篇文章 0 订阅

使用petalinux2020.1建立QSPI启动的最小系统时,在petalinux-config中Subsystem AUTO Hardware Settingsflash setting中设置分区参数,参考如下:

然后完成u-boot、kernel、rootfs等配置后,就可以编译petalinux-build。

烧录完成后系统打印显示错误如下:

[    7.193832] zynqmp-qspi ff0f0000.spi: rx bus width not found

[    7.199505] zynqmp-qspi ff0f0000.spi: tx bus width not found

[    7.205446] spi_master spi0: cannot find modalias for /amba/spi@ff0f0000/flash@0

[    7.212870] spi_master spi0: Failed to create SPI device for /amba/spi@ff0f0000/flash@0

从蓝色字体发现,系统没找到设备的名称,查看设备树(位置:components/plnx_workspace/device-tree/device-tree),发现没有定义compatible属性,uboot显示的qspi型号为n25q256ax1,参考别的地方设置该属性为:compatible = "n25q256", "w25q512";

修改的文件为:(上述位置,系统自动生成的,这里的为用户自定义设置和修改)

project-spec/meta-user/recipes-bsp/device-tree/files

修改system-user.dtsi:

/include/ "system-conf.dtsi"

/ {

};

&qspi {

         is-dual = <0>;

         flash@0 {

                   compatible = "m25p80", "jedec,spi-nor"; /* 32MB */

                   #address-cells = <1>;

                   #size-cells = <1>;

                   reg = <0x0>;

                   spi-tx-bus-width = <1>;

                   spi-rx-bus-width = <4>; /* FIXME also DUAL configuration possible */

                   spi-max-frequency = <108000000>; /* Based on DC1 spec */

                   partition@0 {

                            label = "boot";

                            reg = <0x00000000 0x009c0000>;

                   };

                   partition@1 {

                            label = "bootenv";

                            reg = <0x009c0000 0x00040000>;

                   };

                   partition@2 {

                            label = "kernel";

                            reg = <0x00a00000 0x0a000000>;

                   };

                   partition@3 {

                            label = "bootscr";

                            reg = <0x0aa00000 0x00100000>;

                   };

                   partition@4 {

                            label = "rootfs";

                            reg = <0x0ab00000 0x05200000>;

                   };

                   partition@5 {

                            label = "fzk";

                            reg = <0x0fd00000 0x00200000>;

                   };

                   partition@6 {

                            label = "spare";

                            reg = <0x0ff00000 0x00100000>;

                   };      

         };

};

还有问题!!!

串口启动打印:spi-nor spi0.0: unrecognized JEDEC id bytes: c2 20 1c c2 20 1c

需要添加新的flash id,在文件drivers/mtd/spi-nor/spi-nor.c 的 2620行左右,添加id对应的参数:

{ "mx66l2g45g",  INFO(0xc2201c, 0, 64 * 1024, 4096, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

终于:可以看到qspi的分区了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值