导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. lztmfx
    3. 帖子
    L
    • 资料
    • 关注 0
    • 粉丝 2
    • 我的积分 1489
    • 主题 9
    • 帖子 26
    • 最佳 4
    • 群组 0

    lztmfx 发布的帖子

    • 全志哪些芯片是DRM驱动?哪些是fb+de驱动?

      全志哪些芯片支持DRM驱动?哪些是fb+de驱动?现在被T113S3上的显示图层问题搞崩溃了,disp手册就说了一下总体框架和各种接口的含义,具体通道数量,图层数量不一定所有型号IC都一致,/sys/class/disp/disp/attr能获取的信息不多,ion显存这块没说怎么分配,直接跑参考的demo项目只要涉及显示的除了播放视频demo显示正常,其他的全部发生段错误,libuapi也看了,videoOutPort.h也看了,libuapi配置的时候还不能选用cma分配内存,不然自带的lvgl demo都起不来,只能用ION,displayV1和V2又是什么区别?懵逼了,要是支持drm框架就舒服了?后面新出的V851 V853是DRM框架吗?drm只要modetest一看整个显示逻辑就清晰多了。

      发布在 T Series
      L
      lztmfx
    • T113S3 DE显示图层怎么使用?

      看DISP的PDF有一些描述,但是不是很清楚,比如要显示多个图层时,每个图层的内存怎么申请和分配?只显示一个图层的时候,mmap申请内存就可以推到fb0显示,多图层不知道怎么管理,像drm框架有crtc,crtc下面有多个plane,每个plane的显存都是分开的,很直观,这个私有的disp框架有点搞不懂,播放视频demo的显示部分是封装的吧?看不到实现

      发布在 Linux
      L
      lztmfx
    • 回复: Tina linux用屏幕转换芯片时I2C初始化问题

      @hansk

      #define I2C_SCL_HIGH() (gpio_set_value(I2C_SCL, 1))
      #define I2C_SCL_LOW()  (gpio_set_value(I2C_SCL, 0))
      #define I2C_SDA_HIGH() gpio_direction_input(I2C_SDA) // 释放SDA(外部上拉拉高)
      #define I2C_SDA_LOW()  gpio_direction_output(I2C_SDA, 0)
      #define I2C_SDA_READ() gpio_get_value(I2C_SDA)
      
      void init_gpio(void)
      {
      	int ret = 0;
      	ret = gpio_request(I2C_SDA, NULL);
      	if(ret != 0)
      	{
      		printk("\n\n\n%s,%d,ncs8801 panel\n\n\n\n",__func__,__LINE__);
      	}
      	ret = gpio_request(I2C_SCL, NULL);
      	if(ret != 0)
      	{
      		printk("\n\n\n%s,%d,ncs8801 panel\n\n\n\n",__func__,__LINE__);
      	}
      
      	// 配置SCL为输出,初始高电平
          gpio_direction_output(I2C_SDA, 1);
          // SDA初始化为输出高电平(开漏模式需结合外部上拉)
          gpio_direction_output(I2C_SCL, 1);
      }
      
      void deinit_gpio(void)
      {
          gpio_free(I2C_SCL);
          gpio_free(I2C_SDA);
      }
      
      static void i2c_start(void)
      {
          I2C_SDA_HIGH();
          I2C_SCL_HIGH();
      	udelay(5);
          I2C_SDA_LOW();
      	udelay(5);
          I2C_SCL_LOW();
      }
      
      static void i2c_stop(void)
      {
          I2C_SDA_LOW();
          I2C_SCL_HIGH();
      	udelay(5);
          I2C_SDA_HIGH();
      	udelay(5);
      }
      
      static int i2c_write_byte(uint8_t data)
      {
          int ack = 0;
          int i;
          for (i = 7; i >= 0; i--)
          {
              (data & (1 << i)) ? I2C_SDA_HIGH() : I2C_SDA_LOW();
              udelay(2);
              I2C_SCL_HIGH();
              udelay(5);
              I2C_SCL_LOW();
              udelay(2);
          }
      
          // 释放 SDA 以便从机发送 ACK
          I2C_SDA_HIGH();
          I2C_SCL_HIGH();
          udelay(2);
          ack = I2C_SDA_READ() == 0; // 读取 ACK
          I2C_SCL_LOW();
          return ack;
      }
      
      static uint8_t i2c_read_byte(int ack)
      {
          uint8_t data = 0;
          int i;
          
          // 先设定 SDA 为输入模式
          gpio_direction_input(I2C_SDA);
          
          for (i = 7; i >= 0; i--)
          {
              I2C_SCL_HIGH();
              udelay(2);
              data |= (I2C_SDA_READ() << i);
              I2C_SCL_LOW();
              udelay(2);
          }
          
          // 发送 ACK 或 NACK
          if (ack)
              I2C_SDA_LOW();
          else
              I2C_SDA_HIGH(); // 释放 SDA 发送 NACK
      
          I2C_SCL_HIGH();
          udelay(5);
          I2C_SCL_LOW();
          
          return data;
      }
      
      int i2c_based_gpio_write(uint8_t i2cid, uint8_t addr, uint8_t send_val)
      {
          i2c_start();
          if (!i2c_write_byte((i2cid << 1)))
      	{
              i2c_stop();
              return -1;
          }
          if (!i2c_write_byte(addr))
      	{
              i2c_stop();
              return -1;
          }
          if (!i2c_write_byte(send_val))
      	{
              i2c_stop();
              return -1;
          }
          i2c_stop();
          return 0;
      }
      
      int i2c_based_gpio_write_lists(uint8_t i2cid, const struct reg_data *list, size_t count) {
          size_t i;
          for (i = 0; i < count; i++) {
              if (i2c_based_gpio_write(i2cid, list[i].reg, list[i].val) < 0) {
                  return -1;
              }
          }
          return 0;
      }
      
      int i2c_based_gpio_read(uint8_t i2cid, uint8_t addr, uint8_t *recv_val)
      {
          i2c_start();
          if (!i2c_write_byte((i2cid << 1)))
      	{
              i2c_stop();
              return -1;
          }
          if (!i2c_write_byte(addr))
      	{
              i2c_stop();
              return -1;
          }
          
          i2c_start();
          if (!i2c_write_byte((i2cid << 1) | 1))
      	{
              i2c_stop();
              return -1;
          }
          *recv_val = i2c_read_byte(1);
          i2c_stop();
          return 0;
      }
      

      i2c读写部分都在这儿了,写部分没问题了,读部分不知道有没有问题,写正常就点亮了我就没排查读了,我读ncs8801s时相关寄存器的值和预期不一样,但是屏亮了,我暂时不管了,后面有时间再看是值确实不对还是读的时序不对导致读出的值不对

      发布在 Linux
      L
      lztmfx
    • 回复: Tina linux用屏幕转换芯片时I2C初始化问题

      @hansk 发不了联系方式的,你看我资料能不能发邮件

      发布在 Linux
      L
      lztmfx
    • 回复: Tina linux用屏幕转换芯片时I2C初始化问题

      @hansk 我是放在kernel,uboot我没搞了,搞uboot就为了显示个logo没这个需求

      发布在 Linux
      L
      lztmfx
    • Tian的设备树大概的加载逻辑是什么?

      回复: 请问sys_config.fex与board.dts是什么关系

      看打包流程设备树最终应该是打包成了sunxi.fex,然后最后是合并到sys_partition.fex描述的boot分区吗?看uboot感觉又是放在FAT分区,有点理不清逻辑了,和uboot defconfig的这几个参数有关吗?

      CONFIG_SUNXI_NECESSARY_REPLACE_FDT=y
      CONFIG_RESERVE_FDT_SIZE=0x20000
      CONFIG_SYS_TEXT_BASE=0x43000000
      CONFIG_SUNXI_FDT_ADDR=0x41800000
      

      我想打包多份设备树在这个设备树分区里面,根据其他条件选择加载哪一份设备树

      发布在 V Series
      L
      lztmfx
    • 回复: Tina linux用屏幕转换芯片时I2C初始化问题

      @lztmfx 在 Tina linux用屏幕转换芯片时I2C初始化问题 中说:

      用上面的方法二报错是其他原因报的错,排查后不报错了,不过I2C还是通讯不上

      GPIO模拟I2C调通了,贴下主要部分:

      #define I2C_SCL  204 //PG12
      #define I2C_SDA  205 //PG13
      
      #define I2C_SCL_HIGH() (gpio_set_value(I2C_SCL, 1))
      #define I2C_SCL_LOW()  (gpio_set_value(I2C_SCL, 0))
      #define I2C_SDA_HIGH() gpio_direction_input(I2C_SDA) // 释放SDA(外部上拉拉高)
      #define I2C_SDA_LOW()  gpio_direction_output(I2C_SDA, 0)
      #define I2C_SDA_READ() gpio_get_value(I2C_SDA)
      
      static void i2c_start(void)
      {
          I2C_SDA_HIGH();
          I2C_SCL_HIGH();
      	udelay(5);
          I2C_SDA_LOW();
      	udelay(5);
          I2C_SCL_LOW();
      }
      
      static void i2c_stop(void)
      {
          I2C_SDA_LOW();
          I2C_SCL_HIGH();
      	udelay(5);
          I2C_SDA_HIGH();
      	udelay(5);
      }
      

      注意使用完GPIO后要释放掉,否则后面用到这两个IO的驱动就要报错了,因为这两个IO是真正的I2C PIN,后面I2C驱动用得到,我这个案例就是驱动需要I2C初始化,但是LCD驱动在I2C驱动之前加载,在LCD驱动里面用不了硬件I2C的功能,查了资料,如果从调整驱动加载顺序的思路入手,能查到的方法要么不实际要么没有任何效果。不能让I2C在LCD前加载那就只能GPIO模拟I2C了,参考ST7789V GPIO模拟SPI看着不可行,实际没有测试,因为模拟SPI的GPIO可以不切换方向,而I2C SDA在ACK时需要切换输出为输入,在设备树定义gpio_x的方法不知道怎么在驱动切换GPIO方向,最终使用gpio_request()的方法申请GPIO来做

      发布在 Linux
      L
      lztmfx
    • 回复: Tina linux用屏幕转换芯片时I2C初始化问题

      用上面的方法二报错是其他原因报的错,排查后不报错了,不过I2C还是通讯不上

      发布在 Linux
      L
      lztmfx
    • Tina linux用屏幕转换芯片时I2C初始化问题

      T113S3使用NCS8801 LVDS转EDP芯片,需要LCD驱动里面通过I2C初始化NCS8801,但是实际测试发现,tina linux的i2c晚于disp驱动加载,这样disp驱动里面获取不到有效的i2c适配器。有什么方法让i2c在disp前加载?另外看别的帖子说不建议在disp里面用硬件i2c初始化,推荐用GPIO模拟,看了SDK里面ST7789V也是用GPIO模拟SPI,但是SPI write的时候,引脚的输入输出是固定的,不用切换引脚状态,但是I2C的SDA引脚在发送完数据后需要切换为input模式来接收ACK信号的,这样如果用lcd设备树里面的这种方式是不行的吧?这个还可以在disp驱动里面通过代码切换lcd_gpio_X的参数吗?如输入改为输出。

      lcd_gpio_0 = <&pio PG 12 1 0 3 0>;
      lcd_gpio_1 = <&pio PG 13 1 0 3 0>;
      

      如果直接在disp驱动使用下面这种方式:

      #define I2C_SCL  204
      #define I2C_SDA  205
      #define I2C_SCL_LOW()  gpio_set_value(I2C_SCL, 0)
      #define I2C_SDA_HIGH() gpio_direction_output(I2C_SDA, 1)
      

      开机会有一堆报错

      [    0.650948] 8<--- cut here ---
      [    0.650952] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [    0.650960] pgd = (ptrval)
      [    0.658090] uart3: ttyS3 at MMIO 0x2500c00 (irq = 35, base_baud = 1500000) is a SUNXI
      ▒▒  0.660901] [00000000] *pgd=00000000
      [    0.669008] sw_console_setup()1807 - console setup baud 115200 parity n bits 8, flow n
      [    0.671684] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      [    0.696238] Modules linked in:
      [    0.696238] Modules linked in:
      [    0.696249] CPU: 0 PID: 21 Comm: kworker/0:1 Not tainted 5.4.61 #159
      [    0.696249] CPU: 0 PID: 21 Comm: kworker/0:1 Not tainted 5.4.61 #159
      [    0.696256] Hardware name: Generic DT based system
      [    0.696256] Hardware name: Generic DT based system
      [    0.702736] printk: console [ttyS3] enabled
      [    0.702736] printk: console [ttyS3] enabled
      [    0.716144] Workqueue: events start_work
      [    0.716144] Workqueue: events start_work
      [    0.716154] PC is at LCD_panel_init+0x44/0x13c
      [    0.716154] PC is at LCD_panel_init+0x44/0x13c
      [    0.716162] LR is at LCD_panel_init+0x40/0x13c
      [    0.716162] LR is at LCD_panel_init+0x40/0x13c
      [    0.726281] printk: bootconsole [earlycon0] disabled
      [    0.726281] printk: bootconsole [earlycon0] disabled
      [    0.735110] pc : [<c03962cc>]    lr : [<c03962c8>]    psr: 60000013
      [    0.735110] pc : [<c03962cc>]    lr : [<c03962c8>]    psr: 60000013
      [    0.735114] sp : c714de20  ip : 00000000  fp : 00000000
      [    0.735114] sp : c714de20  ip : 00000000  fp : 00000000
      [    0.735117] r10: 00000001  r9 : 00000000  r8 : c0b1bb66
      [    0.735117] r10: 00000001  r9 : 00000000  r8 : c0b1bb66
      [    0.735124] r7 : c0b1bb50  r6 : 00000000  r5 : 0000000b  r4 : c714c000
      [    0.735124] r7 : c0b1bb50  r6 : 00000000  r5 : 0000000b  r4 : c714c000
      [    0.821770] r3 : 50ca96b2  r2 : 50ca96b2  r1 : 06c7e000  r0 : 00000026
      [    0.821776] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      [    0.821783] Control: 10c5387d  Table: 4000406a  DAC: 00000051
      [    0.829589] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
      [    0.837001] Process kworker/0:1 (pid: 21, stack limit = 0x(ptrval))
      [    0.837006] Stack: (0xc714de20 to 0xc714e000)
      [    0.837017] de20: 00000000 50ca96b2 c730fa00 c7391000 c7390000 00000001 c0c5d028 c0373c88
      [    0.837032] de40: c08272ba c730fa00 c714de98 c07248e0 00000000 00000000 00000000 c036dcf4
      [    0.843742] uart uart4: uart4 supply uart not found, using dummy regulator
      [    0.854390] de60: 00000000 00000000 00020002 c714de6c c714de6c 50ca96b2 c7070c00 c06ea2ac
      [    0.854399] de80: c714c000 00000001 00000000 00000000 c0c596e8 c036df5c 00000001 00000000
      [    0.854407] dea0: 00000000 00000000 00000004 00000000 00000002 00000002 00000000 00000008
      [    0.854416] dec0: 00000000 50ca96b2 00000000 c714c000 c0c59350 00000002 c0c596e8 c0369d10
      [    0.861637] uart4: ttyS4 at MMIO 0x2501000 (irq = 36, base_baud = 1500000) is a SUNXI
      [    0.866247] dee0: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    0.866256] df00: 00000000 00000000 00000000 50ca96b2 00000000 c0c591e0 00000001 c0369e28
      [    0.866269] df20: c7040100 c76b6880 c0c594b8 c76b9900 00000000 00000000 c0c594bc c012f0ac
      [    0.876002] uart uart5: uart5 supply uart not found, using dummy regulator
      [    0.884498] df40: c7040100 c0c594b8 c7040100 c7040114 c76b6880 c714c000 c76b6898 c0b02d00
      [    0.884508] df60: c0b0b27c c012f6d0 00000000 c701e880 c714c000 c701e840 c7040100 c012f49c
      [    0.884517] df80: c704bec4 c701e89c 00000000 c0133f24 c701e840 c0133e04 00000000 00000000
      [    0.884527] dfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
      [    0.892457] uart5: ttyS5 at MMIO 0x2501400 (irq = 37, base_baud = 1500000) is a SUNXI
      [    0.901302] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    0.901310] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
      [    0.901333] [<c03962cc>] (LCD_panel_init) from [<c0373c88>] (disp_lcd_enable+0x2a4/0x2e0)
      [    0.901349] [<c0373c88>] (disp_lcd_enable) from [<c036dcf4>] (disp_device_attached_and_enable+0x140/0x260)
      [    0.911201] misc dump reg init
      [    0.919574] [<c036dcf4>] (disp_device_attached_and_enable) from [<c036df5c>] (bsp_disp_device_switch+0x8c/0xec)
      [    0.919586] [<c036df5c>] (bsp_disp_device_switch) from [<c0369d10>] (disp_device_set_config+0xd8/0x100)
      [    0.919597] [<c0369d10>] (disp_device_set_config) from [<c0369e28>] (start_work+0xf0/0x174)
      [    0.919610] [<c0369e28>] (start_work) from [<c012f0ac>] (process_one_work+0x144/0x20c)
      [    0.919626] [<c012f0ac>] (process_one_work) from [<c012f6d0>] (worker_thread+0x234/0x2d8)
      [    1.108057] [<c012f6d0>] (worker_thread) from [<c0133f24>] (kthread+0x120/0x12c)
      [    1.116309] [<c0133f24>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
      [    1.124361] Exception stack(0xc714dfb0 to 0xc714dff8)
      [    1.129992] dfa0:                                     00000000 00000000 00000000 00000000
      [    1.139112] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    1.148231] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
      [    1.155610] Code: e2878016 e5cd3003 ebf6fd7c e3a06000 (e5963000)
      [    1.162481] ---[ end trace a3d10cdfd74119e3 ]---
      
      

      最后就是官方LCD调试PDF文档里面提到过SPI,I2C初始化的方式,是通过读取设备树信息probe设备的方式,那理论上这种也是需要i2c在disp之前加载吧,而且他T113S3的设备树貌似无法匹配手册上的方法。

      发布在 Linux
      L
      lztmfx
    • 回复: T113 切换存储,nand flash切换到SD卡启动,挂载文件系统报错

      @shz18877605430 在 T113 切换存储,nand flash切换到SD卡启动,挂载文件系统报错 中说:

      rootfstype=squashfs

      rootfstype=ext4

      发布在 MR Series
      L
      lztmfx
    • T113S3 lvds dual配置不生效
      lvds1_pins_a: lvds1@0 {
      				pins  =  "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19";
      				function = "lvds1";
      				drive-strength = <30>;
      				bias-disable;
      			};
      
      lvds1_pins_b: lvds1@1 {
      				pins  = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19";
      				function = "io_disabled";
      				drive-strength = <30>;
      				bias-disable;
      			};
      
      &disp {
      	disp_init_enable         = <1>;
      	disp_mode                = <0>;
      
      	screen0_output_type      = <1>;
      	screen0_output_mode      = <10>;
      
      	screen1_output_type      = <1>;
      	screen1_output_mode      = <10>;
      
      	// screen1_output_format    = <0>;
      	// screen1_output_bits      = <0>;
      	// screen1_output_eotf      = <4>;
      	// screen1_output_cs        = <257>;
      	// screen1_output_dvi_hdmi  = <2>;
      	// screen1_output_range     = <2>;
      	// screen1_output_scan      = <0>;
      	// screen1_output_aspect_ratio = <8>;
      
      	dev0_output_type         = <1>;
      	dev0_output_mode         = <4>;
      	dev0_screen_id           = <0>;
      	dev0_do_hpd              = <0>;
      
      	dev1_output_type         = <1>;
      	dev1_output_mode         = <10>;
      	dev1_screen_id           = <1>;
      	dev1_do_hpd              = <1>;
      
      	def_output_dev           = <0>;
      	hdmi_mode_check          = <1>;
      
      	fb0_format               = <9>;
      	fb0_width                = <1920>;
      	fb0_height               = <1080>;
      
      	fb1_format               = <9>;
      	fb1_width                = <1920>;
      	fb1_height               = <1080>;
      	chn_cfg_mode             = <2>;
      
      	disp_para_zone           = <1>;
      	/*VCC-LCD*/
      /*	dc1sw-supply = <&reg_dc1sw>;*/
      	/*VCC-DSI*/
      /*	eldo3-supply = <&reg_eldo3>;*/
      	/*VCC-PD*/
      /*	dcdc1-supply = <&reg_dcdc1>;*/
      };
      
      &lcd0 {
      	lcd_used            = <1>;
      
      	lcd_driver_name     = "dual_lvds_lcd";
      	lcd_if              = <3>;
      
      	lcd_x               = <1920>;
      	lcd_y               = <1080>;
      	lcd_width           = <340>;
      	lcd_height          = <190>;
      	lcd_dclk_freq       = <159>;
      
      	lcd_pwm_used        = <0>;
      	lcd_pwm_ch          = <5>;//背光PWM通道号
      	lcd_pwm_freq        = <5000>;
      	lcd_pwm_pol         = <1>;
      	lcd_backlight       = <10>;
      	lcd_pwm_max_limit   = <255>;
      	//= <&pio PD 27 1 0 3 1>;
      	// lcd_bl_en = <&pio PG 3 1 0 3 1>;//背光使能引脚
      
      	lcd_hbp             = <272>;
      	lcd_ht              = <2272>;//48
      	lcd_hspw            = <32>;
      	lcd_vbp             = <80>;
      	lcd_vt              = <1169>;//3
      	lcd_vspw            = <6>;
      
      	lcd_lvds_if         = <1>;
      	lcd_lvds_colordepth = <0>;
      	lcd_lvds_mode       = <0>;
      	lcd_frm             = <0>;
      	lcd_hv_clk_phase    = <0>;
      	lcd_hv_sync_polarity= <0>;
      	lcd_gamma_en        = <0>;
      	lcd_bright_curve_en = <0>;
      	lcd_cmap_en         = <0>;
      
      	lcd_fsync_en = <0>;
      	lcd_fsync_act_time = <1000>;
      	lcd_fsync_dis_time = <1000>;
      	lcd_fsync_pol = <0>;
      
      	deu_mode            = <0>;
      	lcdgamma4iep        = <22>;
      	smart_color         = <90>;
      
      	lcd_gpio_0 = <&pio PG 3 1 0 3 0>;//背光使能
      
      	pinctrl-0 = <&lvds1_pins_a>;
      	pinctrl-1 = <&lvds1_pins_b>;
      };
      

      adb shell dump的信息:

      root@TinaLinux:/# fbset
      
      mode "1920x1080-60"
              geometry 1920 1080 1920 2160 24
              timings 6289 240 80 74 9 32 6
              accel false
              rgba 8/0,8/8,8/16,0/24
      endmode
      
      root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pinmux-pins
      Pinmux settings per pin
      Format: pin (name): mux_owner|gpio_owner (strict) hog?
      ...
      pin 96 (PD0): UNCLAIMED
      pin 97 (PD1): UNCLAIMED
      pin 98 (PD2): UNCLAIMED
      pin 99 (PD3): UNCLAIMED
      pin 100 (PD4): UNCLAIMED
      pin 101 (PD5): UNCLAIMED
      pin 102 (PD6): UNCLAIMED
      pin 103 (PD7): UNCLAIMED
      pin 104 (PD8): UNCLAIMED
      pin 105 (PD9): UNCLAIMED
      pin 106 (PD10): UNCLAIMED
      pin 107 (PD11): UNCLAIMED
      pin 108 (PD12): UNCLAIMED
      pin 109 (PD13): UNCLAIMED
      pin 110 (PD14): UNCLAIMED
      pin 111 (PD15): UNCLAIMED
      pin 112 (PD16): UNCLAIMED
      pin 113 (PD17): UNCLAIMED
      pin 114 (PD18): UNCLAIMED
      pin 115 (PD19): UNCLAIMED
      pin 116 (PD20): UNCLAIMED
      pin 117 (PD21): UNCLAIMED
      pin 118 (PD22): UNCLAIMED
      
      ....
      
      
      发布在 T Series
      L
      lztmfx
    • 回复: T113S3 I2C异常

      @awwwwa twi_drv_used 是做什么的?以前没看到过,我试试看,我后来把kernel log等级改成3就不打印这么多了

      发布在 T Series
      L
      lztmfx
    • 回复: T113S3 I2C异常

      @z2500abc 闹乌龙了,SCL和旁边的PWM引脚连锡了,另外正常的哪路TWI也会打印许多信息,我直接把kernel 的log等级改成3就不打印这么多了

      发布在 T Series
      L
      lztmfx
    • 回复: T113S3 SPINAND启动报错ECC错误

      可以启动了,kernel配置有问题,太折磨人了

      发布在 Linux
      L
      lztmfx
    • 回复: T113S3 SPINAND启动报错ECC错误

      @lztmfx 这个看似固件损坏或者NAND有坏块,实际上就是rootfs和kernel的SPIFLASH.UBIFS SQUASHFS配置不对

      发布在 Linux
      L
      lztmfx
    • T113S3 I2C异常

      root@TinaLinux:/# i2cdetect -y 0
      0 1 2 3 4 5 6 7 8 9 a b c d e f[ 225.484348] sunxi-i2c sunxi-i2c0: runtime resume finish

      00: [ 225.494594] sunxi-i2c sunxi-i2c0: engine-mode: start signal xfered
      [ 225.494608] sunxi-i2c sunxi-i2c0: engine-mode: [slave address:(0x3),irq state:(0x8)]
      [ 225.511400] sunxi-i2c sunxi-i2c0: engine-mode: 7bits+r/w = 0x6 xfered
      [ 225.518624] sunxi-i2c sunxi-i2c0: engine-mode: data 0x6 xfered
      [ 230.529514] sunxi-i2c sunxi-i2c0: engine-mode: xfer timeout(dev addr:0x3)
      [ 230.529546] sunxi-i2c sunxi-i2c0: runtime suspend finish
      [ 230.537143] 0x02502000: 00000000 00000000 00000000 00000000
      [ 230.549452] 0x02502010: 00000000 00000000 00000000 00000000
      -- [ 230.555922] sunxi-i2c sunxi-i2c0: runtime resume finish
      [ 230.562028] sunxi-i2c sunxi-i2c0: engine-mode: start signal xfered
      [ 235.569499] sunxi-i2c sunxi-i2c0: engine-mode: xfer timeout(dev addr:0x4)
      [ 235.569529] sunxi-i2c sunxi-i2c0: runtime suspend finish
      [ 235.577115] 0x02502000: 00000000 00000000 00000000 00000000
      [ 235.577121] 0x02502010: 00000000 00000000 00000000 00000000
      -- [ 235.595857] sunxi-i2c sunxi-i2c0: runtime resume finish
      [ 235.601971] sunxi-i2c sunxi-i2c0: engine-mode: start signal xfered
      ^C[ 240.609525] sunxi-i2c sunxi-i2c0: engine-mode: xfer timeout(dev addr:0x5)
      [ 240.609543] sunxi-i2c sunxi-i2c0: runtime suspend finish
      [ 240.617154] 0x02502000: 00000000 00000000 00000000 00000000
      [ 240.629478] 0x02502010: 00000000 00000000 00000000 00000000

      root@TinaLinux:/# i2cdetect -l
      i2c-0 i2c sunxi-i2c0 I2C adapter

      换了其他没有挂任何设备的I2C也是一样的报错,是不是kernel什么地方配置不对啊?和开源的好几个项目都对比过config配置了,不知道怎么排查了

      发布在 T Series
      L
      lztmfx
    • 回复: T113 Longan,Nand镜像编译出来之后,kernel跑到ubi0: attaching mtd3时出错

      请问找到原因了吗?我T113S3 SPINAND启动也是这个问题

      发布在 其它全志芯片讨论区
      L
      lztmfx
    • 回复: 解决那些千奇百怪的 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block 错误

      [ 1.883516] /dev/root: Can't open blockdev
      [ 1.888118] VFS: Cannot open root device "ubiblock0_5" or unknown-block(0,0): error -6
      [ 1.897030] Please append a correct "root=" boot option; here are the available partitions:
      [ 1.906413] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
      [ 1.915691] CPU0: stopping
      [ 1.918729] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.61 #43
      [ 1.925465] Hardware name: Generic DT based system
      [ 1.930859] [<c010df08>] (unwind_backtrace) from [<c010a698>] (show_stack+0x10/0x14)
      [ 1.939552] [<c010a698>] (show_stack) from [<c0666870>] (dump_stack+0x88/0xa4)
      [ 1.947659] [<c0666870>] (dump_stack) from [<c010c2d4>] (handle_IPI+0xe4/0x180)
      [ 1.955864] [<c010c2d4>] (handle_IPI) from [<c032330c>] (gic_handle_irq+0x70/0x78)
      [ 1.964362] [<c032330c>] (gic_handle_irq) from [<c01021cc>] (__irq_svc+0x6c/0xa8)
      [ 1.972757] Exception stack(0xc0a01f40 to 0xc0a01f88)
      [ 1.978425] 1f40: 00000e68 c76b8334 00000000 c0114860 00000001 c0a00000 c0a03de4 c0a03e20
      [ 1.987606] 1f60: c0a42000 c77ff540 c09280c0 00000000 00000001 c0a01f90 c0107fd0 c0107fc0
      [ 1.996781] 1f80: 60000013 ffffffff
      [ 2.000699] [<c01021cc>] (__irq_svc) from [<c0107fc0>] (arch_cpu_idle+0x1c/0x38)
      [ 2.009001] [<c0107fc0>] (arch_cpu_idle) from [<c013d694>] (do_idle+0xd4/0x128)
      [ 2.017202] [<c013d694>] (do_idle) from [<c013d978>] (cpu_startup_entry+0x18/0x20)
      [ 2.025699] [<c013d978>] (cpu_startup_entry) from [<c0900c80>] (start_kernel+0x360/0x3ec)
      [ 2.034881] [<c0900c80>] (start_kernel) from [<00000000>] (0x0)
      [ 2.041529] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

      使用的是SPI NAND,如果烧录到TF卡就正常启动,用NAND就找不到rootfs,实在是找不到问题了

      发布在 Linux
      L
      lztmfx
    • 回复: T113-S3 无法正常启动,之前一直报错

      @oct_linux 在 T113-S3 无法正常启动,之前一直报错 中说:

      174560d9-760b-4daf-ae2d-91897aa24f3d-48ded797a915339da9466344dde2217.png

      我遇到过类似现象,原因好像是改了调试串口,然后改得不太对导致UBOOT无打印日志,用NAND一直卡死,用TF卡启动等一段时间后进入系统了,不知道您是用什么启动?

      发布在 T Series
      L
      lztmfx
    • T113S3 SPINAND启动报错ECC错误

      kernel报错部分日志:
      [ 0.935032] sunxi-spinand: AW SPINand MTD Layer Version: 2.3 20211223
      [ 0.942318] sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.10 20200306
      [ 0.950182] sunxi-spinand-phy: not detect any munufacture from id table
      [ 0.957602] sunxi-spinand-phy: get spi-nand Model from fdt fail
      [ 0.964267] sunxi-spinand-phy: get phy info from fdt fail
      [ 0.970328] sunxi-spinand-phy: not detect munufacture from fdt
      [ 0.976936] sunxi-spinand-phy: detect munufacture from id table: Winbond
      [ 0.984472] sunxi-spinand-phy: detect spinand id: ff21aaef ffffffff
      [ 0.991551] sunxi-spinand-phy: ========== arch info ==========
      [ 0.998092] sunxi-spinand-phy: Model: W25N01GVZEIG
      [ 1.004843] sunxi-spinand-phy: Munufacture: Winbond
      [ 1.011103] sunxi-spinand-phy: DieCntPerChip: 1
      [ 1.016765] sunxi-spinand-phy: BlkCntPerDie: 1024
      [ 1.022736] sunxi-spinand-phy: PageCntPerBlk: 64
      [ 1.028494] sunxi-spinand-phy: SectCntPerPage: 4
      [ 1.034168] sunxi-spinand-phy: OobSizePerPage: 64
      [ 1.039936] sunxi-spinand-phy: BadBlockFlag: 0x0
      [ 1.045792] sunxi-spinand-phy: OperationOpt: 0x7
      [ 1.051662] sunxi-spinand-phy: MaxEraseTimes: 65000
      [ 1.057713] sunxi-spinand-phy: EccFlag: 0x0
      [ 1.063578] sunxi-spinand-phy: EccType: 2
      [ 1.069250] sunxi-spinand-phy: EccProtectedType: 3
      [ 1.074909] sunxi-spinand-phy: ========================================
      [ 1.082332] sunxi-spinand-phy:
      [ 1.085849] sunxi-spinand-phy: ========== physical info ==========
      [ 1.092789] sunxi-spinand-phy: TotalSize: 128 M
      [ 1.098158] sunxi-spinand-phy: SectorSize: 512 B
      [ 1.103535] sunxi-spinand-phy: PageSize: 2 K
      [ 1.108710] sunxi-spinand-phy: BlockSize: 128 K
      [ 1.114090] sunxi-spinand-phy: OOBSize: 64 B
      [ 1.119377] sunxi-spinand-phy: ========================================
      [ 1.126792] sunxi-spinand-phy:
      [ 1.130326] sunxi-spinand-phy: ========== logical info ==========
      [ 1.137158] sunxi-spinand-phy: TotalSize: 128 M
      [ 1.142539] sunxi-spinand-phy: SectorSize: 512 B
      [ 1.147908] sunxi-spinand-phy: PageSize: 4 K
      [ 1.153094] sunxi-spinand-phy: BlockSize: 256 K
      [ 1.158463] sunxi-spinand-phy: OOBSize: 128 B
      [ 1.163871] sunxi-spinand-phy: ========================================
      [ 1.171347] sunxi-spinand-phy: block lock register: 0x00
      [ 1.177374] sunxi-spinand-phy: feature register: 0x19
      [ 1.183057] sunxi-spinand-phy: sunxi physic nand init end
      [ 1.189546] Creating 4 MTD partitions on "sunxi_mtd_nand":
      [ 1.195706] 0x000000000000-0x000000100000 : "boot0"
      [ 1.209872] 0x000000100000-0x000000500000 : "uboot"
      [ 1.218476] random: fast init done
      [ 1.229412] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.238994] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.248227] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.258017] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.267242] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.276996] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.286190] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.295551] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.304916] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.319872] 0x000000500000-0x000000600000 : "secure_storage"
      [ 1.329829] sunxi-spinand-phy: ecc error 0x2
      [ 1.338202] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.350877] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.359899] 0x000000600000-0x000008000000 : "sys"
      [ 1.368773] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.377929] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.390579] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.399746] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.408886] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.418023] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.427164] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.436299] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.445416] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.454531] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.460110] sunxi-spinand-phy: phy blk 69 is bad
      [ 1.468838] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.477954] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.487099] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.496230] sunxi-spinand-phy: ecc error 0x2
      [ 1.504560] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.513687] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.522787] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.531902] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.540974] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.550098] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.559195] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.568325] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.577428] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.586558] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.595657] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.604773] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.613888] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.622978] sunxi-spinand-phy: ecc error 0x2
      [ 1.631307] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.640370] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.649497] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.658588] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.667728] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.676833] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.687493] random: crng init done
      [ 1.694772] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.703845] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.712931] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.721967] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.727532] sunxi-spinand-phy: phy blk 127 is bad
      [ 1.736333] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.745424] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.754527] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.763622] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.776164] sunxi-spinand-phy: ecc error 0x2
      [ 1.784561] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.793675] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.802753] sunxi-spinand-phy: ecc error 0x2
      [ 1.811072] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.820118] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.829227] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.838308] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.847428] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.856519] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.865615] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.874716] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.880293] sunxi-spinand-phy: phy blk 161 is bad
      [ 1.889092] sunxi-spinand-phy: unknown ecc value 0x3
      [ 1.898180] sunxi-spinand-phy: unknown ecc value 0x3
      。。。
      如果固件下载到NAND,报错结束后内核就报错卡死了,同一个固件用TF卡启动就先报NAND的ECC错,最后能正常启动。这种情况是不是大概率是NAND坏了?

      发布在 Linux
      L
      lztmfx
    • 回复: D1S TF卡启动固件修改文件系统无法启动

      论坛逛了一圈,成功进入系统。
      主要修改点:
      1.uboot里面menuconfig使能etx4
      2.kernel里面menuconfig使能ext4,取消squashfs
      3.SDK/device/config/chips/d1s/configs/default/env.cfg里面将rootfstype=squashfs改为rootfstype=ext4
      4.如果make成功,pack失败就修改SDK/device/config/chips/d1s/configs/nezha_sd/sys_partition.fex的相应分区大小,一般都是rootfs分区大小不够,需要多大才够可以看pack的报错有显示

      发布在 Linux
      L
      lztmfx
    • 回复: Tina Linux 存储介质切换:eMMC,SPI NAND,SPI NOR,SD Card,SD NAND

      D1S/F133默认nand,sd,都是ubi只读文件系统,想要TF卡为EXT4文件系统,buildroot取消squashfs,选ext4后uboot就报错找不到分区了,uboot和kernel都选好了ext4,还是不行,还要修改什么地方?

      发布在 Linux
      L
      lztmfx
    • D1S TF卡启动固件修改文件系统无法启动

      D1S默认启动TF卡固件为squashfs文件系统,可以正常启动。然后在tina根目录用make menuconfig把squashfs取消了,选择了ext4,kernel配置也选了对ext4文件系统的支持,编译后无法引导,看样子是挂在uboot了,报错如下:

      U-Boot 2018.07-ge987def5 (Nov 07 2022 - 03:11:27 +0000) Allwinner Technology

      [00.293]DRAM: 64 MiB
      [00.295]Relocation Offset is: 01eea000
      [00.300]secure enable bit: 0
      [00.302]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
      sunxi flash map init
      SPI ALL: ready
      [00.313]flash init start
      [00.315]workmode = 0,storage type = 1
      [00.318][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00
      [00.324][mmc]: get sdc_type fail and use default host:tm1.
      [00.330][mmc]: can't find node "mmc0",will add new node
      [00.335][mmc]: fdt err returned <no error>
      [00.339][mmc]: Using default timing para
      [00.342][mmc]: SUNXI SDMMC Controller Version:0x50310
      [00.361][mmc]: card_caps:0x3000000a
      [00.364][mmc]: host_caps:0x3000003f
      [00.368]sunxi flash init ok
      [00.370]line:703 init_clocks
      [00.373]drv_disp_init
      request pwm success, pwm7:pwm7:0x2000c00.
      [00.391]drv_disp_init finish
      [00.401]Loading Environment from SUNXI_FLASH... OK
      [00.420]boot_gui_init:start
      [00.423]set disp.dev2_output_type fail. using defval=0
      [00.450]set disp.fb0_rot_used fail. using defval=0
      [00.454]set disp.fb0_rot_degree fail. using defval=0
      [00.624]boot_gui_init:finish
      partno erro : can't find partition bootloader
      [00.633]bmp_name=bootlogo.bmp size 38454
      [00.644]out of usb burn from boot: not need burn key
      [00.649]Item0 (Map) magic is bad
      [00.652]the secure storage item0 copy0 magic is bad
      [00.657]Item0 (Map) magic is bad
      [00.659]the secure storage item0 copy1 magic is bad
      [00.664]Item0 (Map) magic is bad
      partno erro : can't find partition private
      root_partition is rootfs
      set root to /dev/mmcblk0p5
      [00.677]update part info
      [00.683]LCD open finish

      [00.687]change working_fdt 0x42aa9da0 to 0x42a89da0
      disable nand error: FDT_ERR_BADPATH
      [00.696]The storage not support sample function
      No reserved memory region found in source FDT
      [00.722]update dts
      Hit any key to stop autoboot: 0
      Unhandled exception: Load access fault
      EPC: 0000000043eebdc6 TVAL: 000000000008f840

      ERROR ### Please RESET the board

      请教一下,TF卡启动卡可以用EXT4文件系统吗?

      发布在 Linux
      L
      lztmfx
    • 回复: F133可以驱动3lane的MIPI屏吗?

      @wyljkl 设备树直接配置3lane吗?

      发布在 Linux
      L
      lztmfx
    • F133可以驱动3lane的MIPI屏吗?

      拿到一块3lane的MIPI屏,第一次见这么奇葩的,在设备树里可以直接写dsi lane=3吗?

      捕获.JPG

      发布在 Linux
      L
      lztmfx
    • 回复: mq-r t113 ov5640适配

      请教一下,这个方法适配F133A吗?看了一下RV内核的驱动和ARM内核不在同一个目录。

      发布在 MR Series
      L
      lztmfx
    • 1 / 1