ath79 spi报错:ath79-spi 1f000000.spi: cs1 = max 1
一、问题及其解决方法
ath79 在dts中配置spi,固件启动后出错log如下:
[ 0.374839] ath79-spi 1f000000.spi: cs1 >= max 1
[ 0.379668] spi_master spi0: spi_device register error /ahb/spi@1f000000/flash@1
[ 0.387309] spi_master spi0: Failed to create SPI device for /ahb/spi@1f000000/flash@1
[ 0.406176] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.411104] 6 fixed-partitions partitions found on MTD device spi0.0
[ 0.417658] Creating 6 MTD partitions on "spi0.0":
[ 0.422632] 0x000000000000-0x000000040000 : "u-boot"
[ 0.428493] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.434607] 0x000000050000-0x000000060000 : "art"
[ 0.440165] 0x000000060000-0x000001000000 : "nor_firmware"
[ 0.446436] 0x000000060000-0x000000460000 : "kernel"
[ 0.452231] 0x000000460000-0x000001000000 : "nor_reserved"
[ 0.459194] libphy: Fixed MDIO Bus: probed
[ 1.138441] libphy: ag71xx_mdio: probed
[ 1.145395] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus.0
[ 1.799559] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[ 1.811180] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[ 1.819260] NET: Registered protocol family 10
[ 1.827674] Segment Routing with IPv6
[ 1.831590] NET: Registered protocol family 17
[ 1.836223] 8021q: 802.1Q VLAN Support v1.8
[ 1.844012] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 1.851786] Please append a correct "root=" boot option; here are the available partitions:
[ 1.860429] 1f00 256 mtdblock0
[ 1.860433] (driver?)
[ 1.867184] 1f01 64 mtdblock1
[ 1.867187] (driver?)
[ 1.873951] 1f02 64 mtdblock2
[ 1.873954] (driver?)
[ 1.880724] 1f03 16000 mtdblock3
[ 1.880728] (driver?)
[ 1.887478] 1f04 4096 mtdblock4
[ 1.887481] (driver?)
[ 1.894245] 1f05 11904 mtdblock5
[ 1.894248] (driver?)
[ 1.901017] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.910175] Rebooting in 1 seconds..
原因:
spi slave不识别。
解决方法:
修改dts中的spi
&spi {status = "okay";num-cs = <2>; #两个spi slave,根据个人的硬件情况选cs-gpios = <0>, <0>; #片选cs0与cs1为低电平有效.......
}
如cs-gpios = <0>, <0>, <&gpio1 18 GPIO_ACTIVE_LOW>;其中cs-gpios = <0>, <0>表示使用系统默认的cs0,与cs1低电平有效,而<&gpio1 18 GPIO_ACTIVE_LOW>表示cs2则绑定到gpio18,低电平有效
二、SPI知识拓展
CS: SPI从设备是否被选中的,只有片选信号为预先规定的使能信号时(高电位或低电位),对此 SPI 从设备的操作才有效。
通常使用如下图:一个从设备分配一根 SPI 的片选 CS 信号,常见的 SPI 从设备的片选信号为低电平选中设备,高电平释放设备。
ath79 spi报错:ath79-spi 1f000000.spi: cs1 = max 1相关推荐
- Python requests ip代理爬虫报错 HTTPSConnectionPool(host=‘xxxxx‘, port=443) Max retries exceed
本人系统:macOS10.15.6 Catalina 场景:使用Python requests 包+ip代理池爬取网站数据 出现报错:HTTPSConnectionPool(host='xxxxx', ...
- Python requests ip代理爬虫报错 HTTPSConnectionPool(host=‘xxxxx‘, port=443): Max retries exceed...
本人系统:macOS10.15.6 Catalina 场景:使用Python requests 包+ip代理池爬取网站数据 出现报错:HTTPSConnectionPool(host='xxxxx', ...
- mysql 报错 Specified key was too long; max key length is 767 bytes,开启系统变量:innodb_large_prefix
mysql 报错 Specified key was too long; max key length is 767 bytes 当mysql数据库的字符集使用了utf8mb4,就很容易在执行建表sq ...
- hive报错:hive create table: Specified key was too long; max key length is 767 bytes
create table tableName (name string);报错 Specified key was too long; max key length is 767 bytes 长度的问 ...
- An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist.报错
记录一次使用ElasticSearch报错 使用junit本地调试时,启动spring项目时,es bean 注入报错: An SPI class of type org.apache.lucene. ...
- SPI接口通信协议详解:SPI时序、2线、3线、4线SPI及4种常用工作模式
简介 SPI通信原理比I2C要简单,它主要是主从方式通信.这种模式通常只有一个主机和一个或者多个从机,标准的SPI是4根线,分别是SSEL(片选,也写作 SCS).SCLK(时钟,也写作SCK).MO ...
- linux spi驱动分析 三,Linux下SPI驱动分析
/* 神奇的分割线 */ 626/*-------------------------------------------------------------------------*/ 627 62 ...
- 利用spi发送接收信息c语言,SPI接收发送函数程序
unsigned char SPI_RW(unsigned char byte) { ?? ?unsigned char bit_ctr; ?? ?for(bit_ctr=0;bit_ctr<8 ...
- c语言spi测试代码,spi_test.c的spi跟踪(spi 数据传送流程)
晚上跟踪 了下spi_test.c,数据的传送流程大概是这样的: transfer()(spidev_test.c)--> ioctl()(spidev_test.c)--> spidev ...
最新文章
- 测试员薪资两极分化,如何成为月薪20K的自动化测试?
- shell查看并修复网络连接
- C语言 递归求阶乘和
- OpenCV3编程入门(毛星云)之用滚动条控制两图片的混合
- Sqlserver2014在Windows中打开Configuration Manager
- 【3分钟掌握】什么是DNS解析
- 纯CSS美化单复选框(checkbox、radio)
- C++ STL 初步介绍01
- eclipse启动出现“An Error has Occurred. See the log file”解决方法
- karatsuba乘法
- 1.5编程基础之循环控制_45金币
- 【蓝桥杯单片机】矩阵键盘和独立键盘新解(更稳定更高复用性)
- 【论文阅读-Bidding】《Real-Time Bidding Algorithms for Performance-Based Display Ad Allocation,2011年,微软》...
- java中bash应用_在bash脚本中查找java应用程序的进程ID(以查看目标应用程序是否已在运行)...
- educoder算法设计与分析 实验三 动态规划实验
- CSS border 属性及用border画各种图形
- 计算机工作组如何共享,如何将计算机加入一个工作组进行共享】
- SwiftUI应用开屏广告界面项目(一)
- 以太坊 POA 部署
- 《编程之美》之摞烙饼的排序问题