@yuzukitsuru 用的芒果派Tina-Linux_20220818这个固件,我也怀疑就是II2这的问题,如果我不配置IIC AS CCI就不会段错误,这个一配上就会段错误,我再捋一下
L
lansecd 发布的最佳帖子
-
回复: T113/D1-H (MQ-Pro)驱动 OV5640 摄像头(内含驱动源码)
-
回复: T113 (tina) 如何编译打包spi nand flash 固件
@jr_online 这两个地方和你的一样,还是没有跑起来
[ 2.345411] hub 2-0:1.0: USB hub found [ 2.349659] hub 2-0:1.0: 1 port detected [ 2.357934] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.369727] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.377228] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.380544] clk: Not disabling unused clocks [ 2.386918] cfg80211: failed to load regulatory.db [ 2.391717] ALSA device list: [ 2.400452] #0: audiocodec [ 2.403812] alloc_fd: slot 0 not NULL! [ 2.408372] /dev/root: Can't open blockdev [ 2.413024] VFS: Cannot open root device "ubiblock0_5" or unknown-block(0,0): error -6 [ 2.421929] Please append a correct "root=" boot option; here are the available partitions: [ 2.431306] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 2.440572] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.61 #108 [ 2.447397] Hardware name: Generic DT based system [ 2.452786] [<c010e248>] (unwind_backtrace) from [<c010a870>] (show_stack+0x10/0x14) [ 2.461472] [<c010a870>] (show_stack) from [<c07600a0>] (dump_stack+0x7c/0x98) [ 2.469573] [<c07600a0>] (dump_stack) from [<c011956c>] (panic+0x104/0x3d8) [ 2.477380] [<c011956c>] (panic) from [<c0b01270>] (mount_block_root+0x254/0x2fc) [ 2.485771] [<c0b01270>] (mount_block_root) from [<c0b014d0>] (prepare_namespace+0x138/0x178) [ 2.495329] [<c0b014d0>] (prepare_namespace) from [<c07745a0>] (kernel_init+0x8/0x10c) [ 2.504206] [<c07745a0>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c) [ 2.512688] Exception stack(0xc7825fb0 to 0xc7825ff8) [ 2.518348] 5fa0: 00000000 00000000 00000000 00000000 [ 2.527514] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.536680] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 2.544098] CPU1: stopping [ 2.547131] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.61 #108 [ 2.553956] Hardware name: Generic DT based system [ 2.559329] [<c010e248>] (unwind_backtrace) from [<c010a870>] (show_stack+0x10/0x14) [ 2.568011] [<c010a870>] (show_stack) from [<c07600a0>] (dump_stack+0x7c/0x98) [ 2.576108] [<c07600a0>] (dump_stack) from [<c010c648>] (handle_IPI+0xcc/0x168) [ 2.584305] [<c010c648>] (handle_IPI) from [<c033849c>] (gic_handle_irq+0x70/0x78) [ 2.592793] [<c033849c>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8) [ 2.601177] Exception stack(0xc7865f80 to 0xc7865fc8) [ 2.606838] 5f80: 0000063c c7ecb4f4 00000000 c0114b40 00000002 c7864000 c0c04e28 c0c04e64 [ 2.616006] 5fa0: 4000406a 410fc075 00000000 00000000 c0c627d0 c7865fd0 c0107f94 c0107f84 [ 2.625169] 5fc0: 60000113 ffffffff [ 2.629080] [<c01021cc>] (__irq_svc) from [<c0107f84>] (arch_cpu_idle+0x1c/0x38) [ 2.637373] [<c0107f84>] (arch_cpu_idle) from [<c013de94>] (do_idle+0xd0/0x120) [ 2.645568] [<c013de94>] (do_idle) from [<c013e180>] (cpu_startup_entry+0x18/0x20) [ 2.654054] [<c013e180>] (cpu_startup_entry) from [<40102bec>] (0x40102bec) [ 2.661872] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
-
设置T113串口波特率为1M
用UART5非标准波率通信,波特率设置为1M,应用程序中串口配置如下:
//open uart fd = open("/dev/ttyS5", O_RDWR); if (fd < 0) { printf("open failed\n"); return -1; } /*set baudrate*/ tcgetattr(fd, &options); cfsetispeed(&options, B1000000); cfsetospeed(&options, B1000000); options.c_cflag |= (CLOCAL | CREAD); /*set databits*/ options.c_cflag &= ~CSIZE; options.c_cflag |= CS8; /*set crc*/ options.c_cflag &= ~PARENB; options.c_cflag &= ~CSTOPB; /*set stopbits*/ options.c_cflag &= ~CSTOPB; /*set parity*/ options.c_cflag &= ~PARENB; options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); options.c_oflag &= ~OPOST; options.c_cc[VTIME] = 0; options.c_cc[VMIN] = 0;
系统启动后,启动应用程序,发现报如下错误:
[ 241.774864] sw_uart_check_baudset()837 - uart5, select set 5, baud 1000000, uartclk 24000000 beyond rance[31000000, 120000000]
发现串口的时钟源为24MHZ,不支持该波特率设置,于是查看Linux_UART_开发指南.pdf,查找波特率的修改方法,具体可以查看该开发指南,这里贴出修改方法。
修改设备树,修改串口的时钟源
/lichee/linux-5.4/arch/arm/boot/dts/sun8iw20p1.dtsiuart5: uart@2501400 { compatible = "allwinner,sun8i-uart"; device_type = "uart5"; reg = <0x0 0x02501400 0x0 0x400>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <256>; clocks = <&ccu CLK_BUS_UART5>; clock-names = "uart5"; resets = <&ccu RST_BUS_UART5>; uart5_port = <5>; uart5_type = <2>; status = "disabled"; };
编译,烧录,启动发现终端乱码,这里把终端串口的时钟源也进行修改
uart0: uart@2500000 { compatible = "allwinner,sun8i-uart"; device_type = "uart0"; reg = <0x0 0x02500000 0x0 0x400>; interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; sunxi,uart-fifosize = <64>; clocks = <&ccu CLK_BUS_UART0>,<&ccu CLK_APB1>,<&ccu CLK_PSI_AHB>; clock-frequency = <50000000>; clock-names = "uart0"; resets = <&ccu RST_BUS_UART0>; uart0_port = <0>; uart0_type = <2>; status = "disabled"; };
再次,烧录,启动,运行程序,进行数据收发测试
-
回复: t113-s3支持双屏同显,和异显吗
@lyg116 T113-S3可以做到双屏(mipi+mipi)同显和异显。可以看看你那边具体是啥样的需求了,也可以发过来看看(meetyoo93@163.com)
lansecd 发布的最新帖子
-
回复: t113-s3支持双屏同显,和异显吗
@lyg116 T113-S3可以做到双屏(mipi+mipi)同显和异显。可以看看你那边具体是啥样的需求了,也可以发过来看看(meetyoo93@163.com)
-
回复: T113-S3 MIPI + LVDS 可以实现吗
@hubbell lcd_gpio_0 = <&pio PD 20 GPIO_ACTIVE_HIGH>
试一下 -
回复: T113/D1-H (MQ-Pro)驱动 OV5640 摄像头(内含驱动源码)
@yuzukitsuru 用的芒果派Tina-Linux_20220818这个固件,我也怀疑就是II2这的问题,如果我不配置IIC AS CCI就不会段错误,这个一配上就会段错误,我再捋一下