@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)
-
回复: T113/D1-H (MQ-Pro)驱动 OV5640 摄像头(内含驱动源码)
@yuzukitsuru 加载之后报段错误,这个版本能不能解决这个问题
root@TinaLinux:/lib/modules/5.4.61# insmod videobuf2-memops.ko root@TinaLinux:/lib/modules/5.4.61# insmod videobuf2-dma-contig.ko root@TinaLinux:/lib/modules/5.4.61# insmod videobuf2-vmalloc.ko root@TinaLinux:/lib/modules/5.4.61# insmod vin_io.ko [ 72.641600] [VIN_WARN]sensor_helper_probe: cannot get sensor0_cameravdd supply, setting it to NULL! [ 72.651954] [VIN_WARN]sensor_helper_probe: cannot get sensor0_iovdd supply, setting it to NULL! [ 72.661786] [VIN_WARN]sensor_helper_probe: cannot get sensor0_avdd supply, setting it to NULL! [ 72.671670] [VIN_WARN]sensor_helper_probe: cannot get sensor0_dvdd supply, setting it to NULL! [ 72.682016] [VIN_WARN]sensor_helper_probe: cannot get sensor1_cameravdd supply, setting it to NULL! [ 72.692318] [VIN_WARN]sensor_helper_probe: cannot get sensor1_iovdd supply, setting it to NULL! [ 72.702155] [VIN_WARN]sensor_helper_probe: cannot get sensor1_avdd supply, setting it to NULL! [ 72.711922] [VIN_WARN]sensor_helper_probe: cannot get sensor1_dvdd supply, setting it to NULL! root@TinaLinux:/lib/modules/5.4.61# insmod ov5640.ko root@TinaLinux:/lib/modules/5.4.61# insmod vin_v4l2.ko [ 94.266161] vin_csi 5801000.csi: Adding to iommu group 0 [ 94.275576] sunxi-vin-core 5809000.vinc: Adding to iommu group 0 [ 94.282873] sunxi-vin-core 5809200.vinc: Adding to iommu group 0 [ 94.291191] [VIN_WARN]get csi isp clk fail [ 94.295852] [VIN_WARN]get csi isp src clk fail [ 94.300967] [VIN_WARN]get csi mipi clk fail [ 94.305682] [VIN_WARN]get csi mipi src clk fail [ 94.310798] [VIN_WARN]get csi isp clk fail [ 94.315499] [VIN_WARN]Get isp reset control fail [ 94.321390] 8<--- cut here --- [ 94.324819] Unable to handle kernel paging request at virtual address e1d220c8 [ 94.332920] pgd = 8fd21213 [ 94.335950] [e1d220c8] *pgd=00000000 [ 94.339961] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 94.345915] Modules linked in: vin_v4l2(+) ov5640 vin_io videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops r8188eu(C) sunxi_gpadc [ 94.359591] CPU: 0 PID: 228 Comm: insmod Tainted: G C 5.4.61 #92 [ 94.367786] Hardware name: Generic DT based system [ 94.373167] PC is at __device_attach_driver+0x14/0x98 [ 94.378833] LR is at bus_for_each_drv+0xa8/0xb8 [ 94.383911] pc : [<c03d4abc>] lr : [<c03d2b9c>] psr: 20000013 [ 94.390937] sp : c3c3fb28 ip : 00000000 fp : 00000000 [ 94.396794] r10: c0b36518 r9 : 00000000 r8 : c3c34088 [ 94.402652] r7 : c03d4aa8 r6 : c3c34020 r5 : c3c3fb64 r4 : bf015158 [ 94.409972] r3 : e1d220b0 r2 : 00000000 r1 : c3c3fb64 r0 : bf015158 [ 94.417292] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 94.425295] Control: 10c5387d Table: 43cfc06a DAC: 00000051 [ 94.431738] Process insmod (pid: 228, stack limit = 0x52e7d2dc) [ 94.438375] Stack: (0xc3c3fb28 to 0xc3c40000) [ 94.443262] fb20: c3c3e000 00000000 c3c3fb64 c03d2b9c 00000000 c7491ebc [ 94.452439] fb40: c41715dc 6b4b7779 c3c34020 c3c34020 c0b36548 c3c3e000 00000001 c03d480c [ 94.461615] fb60: c3c34020 c3c34020 00000001 6b4b7779 c3c34020 c0b36548 c3c34020 c6df3080 [ 94.470792] fb80: c3c3e000 c03d37a0 c3c34020 00000000 c0b2b278 c03d1348 00000000 c6df3040 [ 94.479968] fba0: c3c34020 c3c34004 c3c4f2ec 6b4b7779 c3c34000 c3c3fc1c 00000000 c6df3040 [ 94.489144] fbc0: c3c34020 c3c34004 c3c4f2ec c04a2adc c6df3040 c3c3fc1c 6b4b7779 c3c4f8a0 [ 94.498321] fbe0: c3c3fc1c c6df3040 00000000 0000003c c3c4f2b8 c04a2b1c c3c4f8a0 c04bfea8 [ 94.507498] fc00: c3c3e000 c3c4f8a0 c6df3040 00000000 0000003c c04bff18 c3c4f8a0 3635766f [ 94.516673] fc20: 00003034 00000000 00000000 00000000 003c0000 00000000 00000000 00000000 [ 94.525849] fc40: 00000000 00000000 00000000 00000000 00000000 6b4b7779 c3ce8600 0000003c [ 94.535024] fc60: c3c4f2b8 00000000 c6df3040 c3c4f8a0 00000000 bf089be0 00000000 c3c4f2b8 [ 94.544200] fc80: 0000003c c3c4f040 c3c4f040 c3c4f8a0 c3c4f040 c3c4f0fc 00000000 bf08a4dc [ 94.553377] fca0: 00000002 00000001 c7563410 c3c4f040 c3c4f5f0 c04f6ff0 ffffffff c3c4f6f0 [ 94.562554] fcc0: 00000000 1406f400 5f697363 6b6c636d 6c705f30 0000006c 00000000 6b4b7779 [ 94.571730] fce0: 00000000 c7563410 00000000 bf0923b0 bf0923b0 c0c68b80 00000017 c0c68b84 [ 94.580907] fd00: c3c3ff28 c03d60f4 c7563410 00000000 00000000 c03d45b4 c7563410 bf0923b0 [ 94.590084] fd20: bf0923b0 c03d4ba4 00000000 00000021 c8e9d8e4 c03d49e0 bf0923b0 c7563410 [ 94.599261] fd40: 6b4b7779 00000000 c7563410 bf0923b0 c03d4ba4 00000000 00000021 c03d4b8c [ 94.608437] fd60: 00000000 c7563410 bf0923b0 c03d4c50 c7563410 c3c3e000 bf0923b0 c03d2aa8 [ 94.617614] fd80: c8e9d8e4 c74902a8 c7552eb4 6b4b7779 c74902bc bf0923b0 c3c74900 00000000 [ 94.626791] fda0: c0b2ba50 c03d3a24 bf08fd2f bf08fd3a 00000000 bf0923b0 c3c3e000 bf09b000 [ 94.635967] fdc0: 00000028 c03d5428 00000000 c3c3e000 bf09b000 bf09b07c c0b4f000 c0102efc [ 94.645144] fde0: c7401c00 8040003f 00000000 c3c3e000 00000001 c7b706e0 c7b706e0 c3c3e000 [ 94.654320] fe00: c7401e00 c3cb71c0 0000804c c3c3e000 00000001 c01c2858 00000001 c3cb71c0 [ 94.663497] fe20: bf092440 c01c33f0 bf092440 6b4b7779 bf092440 00000021 c3c75940 00000028 [ 94.672672] fe40: 00000000 c0181a34 bf092440 07081000 bf092440 00000021 bf092488 c01804c8 [ 94.681849] fe60: bf09244c 00007fff bf092440 c017dcf8 00000000 c8e9d3e4 c8e9d8e4 c08023ec [ 94.691025] fe80: bf0925dc b6e6af90 c8e79000 000003d6 00000001 00000080 c3cbcec0 c8e79000 [ 94.700201] fea0: c3c14c00 00000025 00000000 00000000 00000000 00000000 00000000 00000000 [ 94.709377] fec0: 6e72656b 00006c65 00000000 00000000 00000000 00000000 00000000 00000000 [ 94.718552] fee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 6b4b7779 [ 94.727729] ff00: 00000000 0000490c b6e5091c 00000000 c8e9d90c c3c3e000 b6e6af90 c3c3e000 [ 94.736906] ff20: 00000051 c0180c18 c8e8db91 c8e8f0c0 c8e79000 0002490c c8e9d3e4 c8e9d2a4 [ 94.746082] ff40: c8e9509c 00018000 0001bd70 00008de0 0001e5dd 00000000 00000000 00000000 [ 94.755258] ff60: 00008dd0 0000001f 00000020 00000017 00000000 00000010 00000000 6b4b7779 [ 94.764434] ff80: 00000000 00000000 00000000 00000003 00000080 c0101228 c3c3e000 00000080 [ 94.773610] ffa0: 00000000 c0101000 00000000 00000000 b6e2c010 0002490c b6e6af90 00000011 [ 94.782786] ffc0: 00000000 00000000 00000003 00000080 0002490c 00000000 004c0f14 00000000 [ 94.791963] ffe0: be90fa84 be90fa68 004afe88 b6eb37ac 60000010 b6e2c010 00000000 00000000 [ 94.801151] [<c03d4abc>] (__device_attach_driver) from [<c03d2b9c>] (bus_for_each_drv+0xa8/0xb8) [ 94.811014] [<c03d2b9c>] (bus_for_each_drv) from [<c03d480c>] (__device_attach+0xc8/0x13c) [ 94.820290] [<c03d480c>] (__device_attach) from [<c03d37a0>] (bus_probe_device+0x28/0x80) [ 94.829469] [<c03d37a0>] (bus_probe_device) from [<c03d1348>] (device_add+0x5bc/0x6a4) [ 94.838356] [<c03d1348>] (device_add) from [<c04a2adc>] (i2c_new_client_device+0x1a4/0x1dc) [ 94.847729] [<c04a2adc>] (i2c_new_client_device) from [<c04a2b1c>] (i2c_new_device+0x8/0x14) [ 94.857201] [<c04a2b1c>] (i2c_new_device) from [<c04bfea8>] (v4l2_i2c_new_subdev_board+0xd0/0xd8) [ 94.867159] [<c04bfea8>] (v4l2_i2c_new_subdev_board) from [<c04bff18>] (v4l2_i2c_new_subdev+0x68/0x84) [ 94.877691] [<c04bff18>] (v4l2_i2c_new_subdev) from [<bf089be0>] (vin_remove+0x1a8/0x288 [vin_v4l2]) [ 94.888047] [<bf089be0>] (vin_remove [vin_v4l2]) from [<bf08a4dc>] (vin_probe+0x728/0xe2c [vin_v4l2]) [ 94.898447] [<bf08a4dc>] (vin_probe [vin_v4l2]) from [<c03d60f4>] (platform_drv_probe+0x48/0x94) [ 94.908308] [<c03d60f4>] (platform_drv_probe) from [<c03d45b4>] (really_probe+0x1f8/0x388) [ 94.917585] [<c03d45b4>] (really_probe) from [<c03d49e0>] (driver_probe_device+0x13c/0x154) [ 94.926959] [<c03d49e0>] (driver_probe_device) from [<c03d4b8c>] (device_driver_attach+0x44/0x5c) [ 94.936917] [<c03d4b8c>] (device_driver_attach) from [<c03d4c50>] (__driver_attach+0xac/0xb4) [ 94.946486] [<c03d4c50>] (__driver_attach) from [<c03d2aa8>] (bus_for_each_dev+0x6c/0xa4) [ 94.955664] [<c03d2aa8>] (bus_for_each_dev) from [<c03d3a24>] (bus_add_driver+0x150/0x1b0) [ 94.964940] [<c03d3a24>] (bus_add_driver) from [<c03d5428>] (driver_register+0xb4/0xf8) [ 94.973975] [<c03d5428>] (driver_register) from [<bf09b07c>] (init_module+0x7c/0x1000 [vin_v4l2]) [ 94.983985] [<bf09b07c>] (init_module [vin_v4l2]) from [<c0102efc>] (do_one_initcall+0x70/0x18c) [ 94.993849] [<c0102efc>] (do_one_initcall) from [<c0181a34>] (do_init_module+0x54/0x1dc) [ 95.002932] [<c0181a34>] (do_init_module) from [<c01804c8>] (load_module+0x1834/0x1e44) [ 95.011915] [<c01804c8>] (load_module) from [<c0180c18>] (sys_init_module+0x140/0x150) [ 95.020800] [<c0180c18>] (sys_init_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54) [ 95.029874] Exception stack(0xc3c3ffa8 to 0xc3c3fff0) [ 95.035540] ffa0: 00000000 00000000 b6e2c010 0002490c b6e6af90 00000011 [ 95.044716] ffc0: 00000000 00000000 00000003 00000080 0002490c 00000000 004c0f14 00000000 [ 95.053890] ffe0: be90fa84 be90fa68 004afe88 b6eb37ac [ 95.059558] Code: e1a04000 e5903004 e1a05001 e5916000 (e5933018) [ 95.066392] ---[ end trace 4ef5ab75bbabd3a8 ]--- Segmentation fault
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>
试一下