Set it as the homepageBookmark this site

简体中文 繁體中文 English 日本語 Deutsch 한국 사람 بالعربية TÜRKÇE português คนไทย

 Retrieve your password
 Sign up now
img_loading
Intelligent detection

QQ login

Just one step, get started quickly

Search
广告投放联系QQ68610888广告投放联系QQ68610888
Quick navigation 764|Enshan Wireless Forum (Changzhou Enshan Computer Development Co., Ltd. All rights reserved) 4

求助 OPENWRT18.03 AR9331拓展SPI接口

[复制链接]
发表于 2022-1-29 18:31 | 显示全部楼层 |阅读模式
求助 OPENWRT18.03 AR9331拓展SPI接口
最近在研究给AR9331扩展一个SPI接口,CS0已经给FLASH了。
Intelligent detection
RT5350F上是在DTS里面修改的,但是这个CPU不一样。
希望给与指导,谢谢!!新年马上到了,祝大家新年快乐
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
Turn on Assisted Access| 发表于 2022-1-29 18:38 | 显示全部楼层
我在WR702N小路由上面增加了一个160*80的SPI TFT,希望大家给与指导,到时候把成果分享给大家。
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
Turn on Assisted Access| 发表于 2022-1-29 22:46 | 显示全部楼层
已经改好了硬件,草率了。请大师指点如何修改配置文件,扩展SPI

本帖子中包含更多资源

Points purchase (download add-ons and level up quickly) login 才可以下载或查看,没有账号?Sign up now

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
If your browser does not automatically redirect, please follow this link | 显示全部楼层
这样的非主流需求的,会的没兴趣,有兴趣的一知半解,跟我玩i2s音频输出一样,大佬们都不玩这个,只能自己参考着玩
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
Turn on Assisted Access| 发表于 2022-2-1 15:04 | 显示全部楼层
Special feature cards
1、查得ar9331支持3个spi设备,cs0 用于flash,cs1,cs2 空闲
2、修改dts,由于openwrt18.02版本没找到怎么改设备树配置,下载了openwrt20.02
3、设备树位置/home/oli/Documents/OpenWRT/openwrt20/openwrt/target/linux/ath79/dts
修改其中的ar9331_tplink_tl-wr710n-8m.dtsi
&spi{
       status=“okay"; 后面增加如下:
        status = "okay";
Click Bind phone number
        cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>, <&gpio 9 GPIO_ACTIVE_HIGH>;  //add css3 <&gpio 10 GPIO_ACTIVE_HIGH>

        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <25000000>;

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        uboot: partition@0 {
                                reg = <0x0 0x20000>;
                                label = "u-boot";
                                read-only;
                        };

                        partition@20000 {
                                compatible = "tplink,firmware";
                                reg = <0x20000 0x7d0000>;
                                label = "firmware";
                        };

                        art: partition@7f0000 {
                                reg = <0x7f0000 0x10000>;
                                label = "art";
                                read-only;
                        };
                };
        };
        spidev@1 {
                compatible = "spidev";
                reg = <1>;                                      //
                spi-max-frequency = <40000000>;   //spi 频率是400K

            };

        spidev@2 {
                compatible = "spidev";
                reg = <2>;                                      // cs3 reg=2
                spi-max-frequency = <40000000>;   //spi 频率是400K

            };

4、编译选项
Sign up now
5、编译升级固件,终端查看,已经出现spi0.1 如图。
尚未测试能否通讯,按道理应该没有问题。

本帖子中包含更多资源

Points purchase (download add-ons and level up quickly) login 才可以下载或查看,没有账号?Sign up now

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。

本版积分规则

Shut down

Welcome to the Enshan Wireless Forum

Only talk about technology, don't talk about politics! Don't spread rumors! For you and for others.
Only talk about technology, don't talk about politics! (Click for details) Remember not to spread rumors at will, just live your life in peace, for your own good and for the good of everyone. Enshan Wireless Forum welcomes your visit, please respect each other, friendly exchanges, it is recommended to keep a normal mind to look at the comments of netizens, do not overreact.

View »

If in doubt, add an administrator QQ86788181|Mobile version|Little dark house|Archiver|Enshan Wireless Forum (Changzhou Enshan Computer Development Co., Ltd. All rights reserved) ( Su ICP No. 05084872 )

GMT+8, 2025-6-23 02:11

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

快速回复 返回顶部 返回列表