您尚未登录。

楼主 # 2022-06-08 13:43:43

a32425262
会员
注册时间: 2018-05-06
已发帖子: 101
积分: 403

f1c100s/V3s 使用两个Nor Flash的方法探索

看到openwrt有类似的方案,使用两个flash,主要目的是做双系统,或者单个flash空间不足,使用两个flash来做扩展

硬件方面:
两块flash除了cs引脚,其他都焊接在一起,第二片flash的cs连接到一个指定的IO
软件方面:
1.修改设备树

&pio {
        spi0_cs_pins: spi0_cs_pins {
                pins = "PC2", "PB2";
                function = "gpio_out";
        };
};
&spi0 {
        status ="okay";

        pinctrl-names = "default";
        pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
        cs-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>, <&pio 1 2 GPIO_ACTIVE_HIGH>;

        mx25l25635e:mx25l25635e@0 {
                compatible = "jedec,spi-nor";
                reg = <0x0>;
                spi-max-frequency = <50000000>;
                #address-cells = <1>;
                #size-cells = <1>;
        };
        ext_flash@0 {
                compatible = "jedec,spi-nor";
                spi-max-frequency = <50000000>;
                reg = <1>;
                #address-cells = <1>;
                #size-cells = <1>;
        };
};

好像没看到spi设备
2.修改mtdparts
原始的单flash

mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2 

双flash
***待添加

大佬们有什么指导意见吗

最近编辑记录 a32425262 (2022-06-08 13:44:56)

离线

#1 2022-06-08 13:55:22

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: f1c100s/V3s 使用两个Nor Flash的方法探索

多flash支持可以的:
https://bbs.aw-ol.com/topic/1217/share/9





离线

楼主 #2 2022-06-08 13:57:37

a32425262
会员
注册时间: 2018-05-06
已发帖子: 101
积分: 403

Re: f1c100s/V3s 使用两个Nor Flash的方法探索

感谢晕哥

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn