嵌入式爱好者

MX6U挂载SPI-Flash方法

2022-10-27 10:15| 发布者: whl| 查看: 388| 评论: 0

类目: 知识库  >  I.MX6系列产品     文档编号: 793

MX6U挂载SPI-Flash方法

1、设备树中添加对应节点

&ecspi1 {
compatible = "fsl,imx51-ecspi";
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio4 26 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>,<&pinctrl_ecspi1_cs>;
status = "okay";

flash0: m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128;
spi-max-frequency = <29000000>;
spi-nor,ddr-quad-read-dummy = <6>;
reg = <0>;
};
};

2、重新编译内核和设备树烧录。

3、系统启动后,通过打印信息可以看到w25q128设备

在/dev节点下,能够生成mtd节点

遇到的问题:

1、格式化时报DMA错误

执行 mkfs.vfat /dev/mtdblock0

解决方法:

取消SPI的DMA功能

2、挂载时报,编码格式问题。

执行:mount -t vfat /dev/mtdblock0 /mnt

报错:FAT-fs (mtdblock0): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

解决方法:


已解决

未解决

只是看看

最新评论

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2025-5-4 16:33

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部