您尚未登录。

#2 哇酷地摊(跳蚤市场) » 收个树莓派3b/3b+/4b » 2022-08-05 17:27:39

岁月快快快
回复: 6

如题,最近想玩一下树莓派,想收个3b/3b+/4b,有坛友有闲置吃灰要出的不
big_smile

#3 Re: 全志 SOC » f1c100s跑rt-thread,两个程序大小一样,但是启动时间相差了一倍 » 2022-06-29 18:20:41

midnight 说:

把程序尽可能做小,只加载该加载的部分

楼主位我描述的情况,现在的问题是两个一样大小的程序,启动时间不一样

#4 Re: 全志 SOC » f1c100s跑rt-thread,两个程序大小一样,但是启动时间相差了一倍 » 2022-06-29 09:09:12

Ican 说:

去掉不必要的打印信息可以减少启动时间,任务优先级调整一下

目前的打印信息很少,花的时间可以忽略不计,主要是这两种情况程序大小一样,但是启动时间相差了5秒多,卡在了从flash中拷贝程序到ram,跳转到应用程序的时候,应用程序(main)都还没跑起来,也就跟任务优先级没什么关系

#5 全志 SOC » f1c100s跑rt-thread,两个程序大小一样,但是启动时间相差了一倍 » 2022-06-28 19:59:21

岁月快快快
回复: 4

1、在f1c100s上跑rt-thread+lvgl碰到了一个很奇怪的问题,flash用的是16M的spi norflash,用到了jpeg解码,有很多图片转换出来的.h文件(图片数据数组),然后编译出来的程序大小有15M左右,这时从上电到有rt-thread的log出来,用了10秒钟这样,测试了从flash中拷贝程序到ram中花了大概5秒钟,剩下的5秒钟不知道芯片在干嘛....;

2、用一个mp3文件转换出.h文件(声音数据数组)来替换jpeg图片,同样编译出来一个15M左右大小的程序,这个程序从上电到有rt-thread的log出来只用了5秒钟(就是从flash中拷贝程序到ram中所花的时间);

不明白是什么原因导致第一种情况多花了5秒钟才跑到应用程序.....

第1种情况的log:

*****************************************
F1C100S BOOT0 START...
CPU Frequency:600,000,000 Hz
DRAM Size: 32 MB
*****************************************
SPI0 CLK SET.
SPI0 CLK SET.
SPI0 CLK[50,000,000HZ]...

Read BOOT1...
BOOT1 at Flash 0x00006000
File Size 22,496
Read BOOT1 to RAM 0x80000000
Jump BOOT1...


*****************************************
F1Cx00S BOOT1 START...
[2020-05-29]...
*****************************************

Read EXEC...
Exec at Flash 0x0000C000
File Size 15,305,184
Read exec to RAM 0x80080000
I.▒V▒)q▒▒▒^^^
----------分割线----------------------------
(这里已经复制完程序到ram中,开始跳转到应用程序)

过了5秒钟才有rt-thread 的log
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
--------------------------------------
--------------------------------------

 \ | /
- RT -     Thread Operating System
 / | \     3.1.3 build Jun 27 2022
 2006 - 2019 Copyright by rt-thread team
main begin


RT-Thread main thread start...
initialise macc module (0)
MACC_REGS_BASE=01C0E000

第2种情况的log:

*****************************************
F1C100S BOOT0 START...
CPU Frequency:600,000,000 Hz
DRAM Size: 32 MB
*****************************************
SPI0 CLK SET.
SPI0 CLK SET.
SPI0 CLK[50,000,000HZ]...

Read BOOT1...
BOOT1 at Flash 0x00006000
File Size 22,496
Read BOOT1 to RAM 0x80000000
Jump BOOT1...


*****************************************
F1Cx00S BOOT1 START...
[2020-05-29]...
*****************************************

Read EXEC...
Exec at Flash 0x0000C000
File Size 15,520,736
Read exec to RAM 0x80080000
I.▒V▒)q▒▒▒^^^
----------分割线----------------------------
(这里已经复制完程序到ram中,开始跳转到应用程序)
马上有rt-thread 的log
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
--------------------------------------
--------------------------------------

 \ | /
- RT -     Thread Operating System
 / | \     3.1.3 build Jun 27 2022
 2006 - 2019 Copyright by rt-thread team
main begin


RT-Thread main thread start...
initialise macc module (0)
MACC_REGS_BASE=01C0E000

#6 Re: 全志 SOC » D1s/f133-B 跑tina linux,有fb0设备,但是未执行LCD初始化函数 » 2022-04-29 11:13:00

修改了uboot的屏驱动和设备树,就可以初始化了,这样的话不就是内核里面的屏驱动没起作用

#7 Re: 全志 SOC » D1s/f133-B 跑tina linux,有fb0设备,但是未执行LCD初始化函数 » 2022-04-28 17:34:22

哇酷小二 说:
岁月快快快 说:
哇酷小二 说:

是 NV3052C 驱动芯片吗?

不是,是公司弄的一颗芯片......

逻辑分析仪搭一下,很容易判断问题的。

不是时序的问题,是初始化函数都没跑进去,发不了spi初始化数据。。。

#8 Re: 全志 SOC » D1s/f133-B 跑tina linux,有fb0设备,但是未执行LCD初始化函数 » 2022-04-28 16:51:33

哇酷小二 说:

是 NV3052C 驱动芯片吗?

不是,是公司弄的一颗芯片......

#9 Re: 全志 SOC » D1s/f133-B 跑tina linux,有fb0设备,但是未执行LCD初始化函数 » 2022-04-28 16:25:58

根据log定位到drivers/video/fbdev/sunxi/disp2/disp/dev_disp_debugfs.c中:

int dispdbg_init(void)
{
	my_dispdbg_root = debugfs_create_dir("dispdbg", NULL);
        printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
	if (!debugfs_create_file
	    ("command", 0644, my_dispdbg_root, NULL, &command_ops))
		goto Fail;
	if (!debugfs_create_file
	    ("name", 0644, my_dispdbg_root, NULL, &name_ops))
		goto Fail;
	if (!debugfs_create_file
	    ("start", 0644, my_dispdbg_root, NULL, &start_ops))
		goto Fail;
        printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
	if (!debugfs_create_file
	    ("param", 0644, my_dispdbg_root, NULL, &param_ops))
		goto Fail;
	if (!debugfs_create_file
	    ("info", 0644, my_dispdbg_root, NULL, &info_ops))
		goto Fail;
	if (!debugfs_create_file
		("dbglvl", 0644, my_dispdbg_root, NULL, &dbglvl_ops))
		goto Fail;
#if defined(CONFIG_SUNXI_MPP)
	if (debugfs_mpp_root) {
		if (!debugfs_create_file("vo", 0644, debugfs_mpp_root, NULL,
					 &vo_ops))
			goto Fail;
	}
#endif /*endif CONFIG_SUNXI_MPP */
	return 0;

Fail:
        printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
	debugfs_remove_recursive(my_dispdbg_root);
	my_dispdbg_root = NULL;
	return -ENOENT;
}

static const struct file_operations start_ops = {
	.write = dispdbg_start_write,
	.read = dispdbg_start_read,
	.open = dispdbg_start_open,
	.release = dispdbg_start_release,
};

static ssize_t dispdbg_start_write(struct file *file, const char __user *buf,
				   size_t count, loff_t *ppos)
{
        printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
	if (count >= sizeof(dispdbg_priv.start))
		return 0;
	if (copy_from_user(dispdbg_priv.start, buf, count)) {
		pr_warn("copy_from_user fail\n");
		return 0;
	}

	if (dispdbg_priv.start[count - 1] == 0x0A)
		dispdbg_priv.start[count - 1] = 0;
	else
		dispdbg_priv.start[count] = 0;
        printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
	dispdbg_process();
	return count;
}

static void dispdbg_process(void)
{
    ......
    if (!strncmp(dispdbg_priv.command, "enable", 6)) {
          printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
          lcd->enable(lcd);
    }    
    ......
}

调用的层次是
dispdbg_init()
    if (!debugfs_create_file
        ("start", 0644, my_dispdbg_root, NULL, &start_ops));
            dispdbg_start_write();
                dispdbg_process();
                    if (!strncmp(dispdbg_priv.command, "enable", 6)) {
                        printk(KERN_INFO "[%s] %s: %d\n", __FILE__, __FUNCTION__, __LINE__);
                        lcd->enable(lcd);
                    }
在lcd->enable(lcd)中最后会调用到LCD_panel_init函数;
log看到的是只执行了:
    if (!debugfs_create_file
        ("start", 0644, my_dispdbg_root, NULL, &start_ops));
start_ops里的.wrire函数dispdbg_start_write没有执行到,导致了LCD_panel_init函数没有被执行;

是要在应用程序里面操作fb0设备才会执行dispdbg_start_write 进行初始化?
但是用cat /dev/urandom > /dev/fb0 并没有看到dispdbg_start_write被执行到的log;

#11 全志 SOC » D1s/f133-B 跑tina linux,有fb0设备,但是未执行LCD初始化函数 » 2022-04-27 16:58:23

岁月快快快
回复: 8

如题,用d1s点一块4寸的720x720的spi屏,系统跑起来后,能看到fb0设备,但是用GPIO模拟spi发命令和数据的引脚上没有量到有波形,一直是高电平,log也没看到跑进过LCD_panel_init函数;
设备树lcd相关的配置:

&lcd0 {
	/* part 1 */
	lcd_used            = <1>;
	lcd_driver_name     = "axs1832a_720x720";

	/* part 2 */
	lcd_if              = <0>;
	lcd_hv_if           = <0>;

	/* part 3 */
	lcd_x               = <720>;
	lcd_y               = <720>;
	lcd_width           = <71>;
	lcd_height          = <71>;
	lcd_dclk_freq       = <35>;
	lcd_hbp             = <40>;
	lcd_ht              = <770>;
	lcd_hspw            = <2>;
	lcd_vbp             = <19>;
	lcd_vt              = <749>;
	lcd_vspw            = <2>;

	/* part 4 */
	lcd_backlight       = <100>;
	lcd_pwm_used        = <1>;
	lcd_pwm_ch          = <7>;
	lcd_pwm_freq        = <19000>;
	lcd_pwm_pol         = <0>;
	lcd_pwm_max_limit   = <255>;

	lcd_lvds_if         = <0>;
	lcd_lvds_colordepth = <1>;
	lcd_lvds_mode       = <0>;
	lcd_frm             = <0>;
	lcd_io_phase        = <0x0000>;
	lcd_gamma_en        = <0>;
	lcd_bright_curve_en = <0>;
	lcd_cmap_en         = <0>;

	deu_mode            = <0>;
	lcdgamma4iep        = <22>;
	smart_color         = <90>;

	lcd_gpio_0 = <&pio PE 4 GPIO_ACTIVE_HIGH>;
	lcd_gpio_1 = <&pio PD 22 GPIO_ACTIVE_HIGH>;
	lcd_gpio_2 = <&pio PE 1 GPIO_ACTIVE_HIGH>;
	lcd_gpio_3 = <&pio PE 0 GPIO_ACTIVE_HIGH>;
	pinctrl-0 = <&rgb18_pins_a>;
	pinctrl-1 = <&rgb18_pins_b>;
}

rgb18_pins_a: rgb18@0 {
    pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \
        "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \
        "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \
        "PD18", "PD19", "PD20", "PD21";
    function = "lcd0";
    drive-strength = <30>;
    bias-disable;
};

rgb18_pins_b: rgb18@1 {
    pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", \
        "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", \
        "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", \
        "PD18", "PD19", "PD20", "PD21";
    function = "io_disabled";
    bias-disable;
};

屏驱动代码是拷贝了lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/目录下的default_panel.c default_panel.h
在它的基础上加上SPI初始化代码的:

/*
 * Allwinner SoCs display driver.
 *
 * Copyright (C) 2016 Allwinner.
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#include "axs1832a_720x720.h"

#define HIGH 1
#define LOW  0

static void LCD_power_on(u32 sel);
static void LCD_power_off(u32 sel);
static void LCD_bl_open(u32 sel);
static void LCD_bl_close(u32 sel);

static void LCD_panel_init(u32 sel);
static void LCD_panel_exit(u32 sel);

static void LCD_cfg_panel_info(struct panel_extend_para *info)
{
	u32 i = 0, j = 0;
	u32 items;
	u8 lcd_gamma_tbl[][2] = {
		/* {input value, corrected value} */
		{0, 0},
		{15, 15},
		{30, 30},
		{45, 45},
		{60, 60},
		{75, 75},
		{90, 90},
		{105, 105},
		{120, 120},
		{135, 135},
		{150, 150},
		{165, 165},
		{180, 180},
		{195, 195},
		{210, 210},
		{225, 225},
		{240, 240},
		{255, 255},
	};

	u32 lcd_cmap_tbl[2][3][4] = {
		{
		 {LCD_CMAP_G0, LCD_CMAP_B1, LCD_CMAP_G2, LCD_CMAP_B3},
		 {LCD_CMAP_B0, LCD_CMAP_R1, LCD_CMAP_B2, LCD_CMAP_R3},
		 {LCD_CMAP_R0, LCD_CMAP_G1, LCD_CMAP_R2, LCD_CMAP_G3},
		 },
		{
		 {LCD_CMAP_B3, LCD_CMAP_G2, LCD_CMAP_B1, LCD_CMAP_G0},
		 {LCD_CMAP_R3, LCD_CMAP_B2, LCD_CMAP_R1, LCD_CMAP_B0},
		 {LCD_CMAP_G3, LCD_CMAP_R2, LCD_CMAP_G1, LCD_CMAP_R0},
		 },
	};

	items = sizeof(lcd_gamma_tbl) / 2;
	for (i = 0; i < items - 1; i++) {
		u32 num = lcd_gamma_tbl[i + 1][0] - lcd_gamma_tbl[i][0];

		for (j = 0; j < num; j++) {
			u32 value = 0;

			value =
			    lcd_gamma_tbl[i][1] +
			    ((lcd_gamma_tbl[i + 1][1] -
			      lcd_gamma_tbl[i][1]) * j) / num;
			info->lcd_gamma_tbl[lcd_gamma_tbl[i][0] + j] =
			    (value << 16) + (value << 8) + value;
		}
	}
	info->lcd_gamma_tbl[255] =
	    (lcd_gamma_tbl[items - 1][1] << 16) +
	    (lcd_gamma_tbl[items - 1][1] << 8) + lcd_gamma_tbl[items - 1][1];

	memcpy(info->lcd_cmap_tbl, lcd_cmap_tbl, sizeof(lcd_cmap_tbl));

}

static s32 LCD_open_flow(u32 sel)
{
	/* open lcd power, and delay 50ms */
	LCD_OPEN_FUNC(sel, LCD_power_on, 30);
	/* open lcd power, than delay 200ms */
	LCD_OPEN_FUNC(sel, LCD_panel_init, 50);
	/* open lcd controller, and delay 100ms */
	LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 100);
	/* open lcd backlight, and delay 0ms */
	LCD_OPEN_FUNC(sel, LCD_bl_open, 0);

	return 0;
}

static s32 LCD_close_flow(u32 sel)
{
	/* close lcd backlight, and delay 0ms */
	LCD_CLOSE_FUNC(sel, LCD_bl_close, 0);
	/* close lcd controller, and delay 0ms */
	LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 0);
	/* open lcd power, than delay 200ms */
	LCD_CLOSE_FUNC(sel, LCD_panel_exit, 200);
	/* close lcd power, and delay 500ms */
	LCD_CLOSE_FUNC(sel, LCD_power_off, 500);

	return 0;
}

static void LCD_power_on(u32 sel)
{
	/* config lcd_power pin to open lcd power0 */
	sunxi_lcd_power_enable(sel, 0);
	sunxi_lcd_pin_cfg(sel, 1);

/*#if defined(CONFIG_FPGA_V7_PLATFORM) || defined(CONFIG_FPGA_V4_PLATFORM)*/
	/*struct disp_panel_para *panel_info =*/
	    /*kmalloc(sizeof(struct disp_panel_para), GFP_KERNEL | __GFP_ZERO);*/

	/*bsp_disp_get_panel_info(sel, panel_info);*/
	/*if (panel_info->lcd_if == LCD_IF_HV) {*/
		/*writel(0x22222222, ioremap(0x0300b06c, 4));*/
		/*writel(0x22222222, ioremap(0x0300b070, 4));*/
		/*writel(0x22222222, ioremap(0x0300b074, 4));*/
		/*writel(0x22222222, ioremap(0x0300b078, 4));*/
	/*} else if(panel_info->lcd_if == LCD_IF_LVDS) {*/
		/*writel(0x33333333, ioremap(0x0300b06c, 4));*/
		/*writel(0x33333333, ioremap(0x0300b070, 4));*/
		/*writel(0x33333333, ioremap(0x0300b074, 4));*/
		/*writel(0x33333333, ioremap(0x0300b078, 4));*/
	/*}*/
	/*kfree(panel_info);*/
/*#endif*/
}

static void LCD_power_off(u32 sel)
{
	sunxi_lcd_pin_cfg(sel, 0);
	/* config lcd_power pin to close lcd power0 */
	sunxi_lcd_power_disable(sel, 0);
}

static void LCD_bl_open(u32 sel)
{
	sunxi_lcd_pwm_enable(sel);
	sunxi_lcd_backlight_enable(sel);
}

static void LCD_bl_close(u32 sel)
{
	/* config lcd_bl_en pin to close lcd backlight */
	sunxi_lcd_backlight_disable(sel);
	sunxi_lcd_pwm_disable(sel);
}

static void SetCsPinLevel(u8 val)
{

    if (val) {

        sunxi_lcd_gpio_set_value(0, 1, 1);
    } else {

        sunxi_lcd_gpio_set_value(0, 1, 0);
    }

}



static void SetClkPinLevel(u8 val)
{

    if (val) {

        sunxi_lcd_gpio_set_value(0, 3, 1);
    } else {

        sunxi_lcd_gpio_set_value(0, 3, 0);
    }

}



static void SetMosiPinLevel(u8 val)
{

    if (val) {

        sunxi_lcd_gpio_set_value(0, 2, 1);
    } else {

        sunxi_lcd_gpio_set_value(0, 2, 0);
    }

}



static void SetResetPinLevel(u8 val)
{

    if (val) {
        sunxi_lcd_gpio_set_value(0, 0, 1);
    } else {
        sunxi_lcd_gpio_set_value(0, 0, 0);
    }

}



static void SpiWriteAddr(u8 dat)
{

    u8 i;


    SetCsPinLevel(HIGH);

    SetClkPinLevel(LOW);

    sunxi_lcd_delay_us(5);
    SetCsPinLevel(LOW);

    SetClkPinLevel(LOW);

    SetMosiPinLevel(LOW);

    sunxi_lcd_delay_us(1);
    SetClkPinLevel(HIGH);

    sunxi_lcd_delay_us(1);
    for (i = 0; i < 8; i++) {

        SetClkPinLevel(LOW);

        if (dat & 0x80) {

            SetMosiPinLevel(HIGH);

        } else {

            SetMosiPinLevel(LOW);

        }

        dat <<= 1;

        sunxi_lcd_delay_us(1);
        SetClkPinLevel(HIGH);

        sunxi_lcd_delay_us(1);
    }

}



static void SpiWriteData(u8 dat)
{

    u8 i;


    SetClkPinLevel(LOW);

    SetMosiPinLevel(HIGH);

    sunxi_lcd_delay_us(1);
    SetClkPinLevel(HIGH);

    sunxi_lcd_delay_us(1);
    for (i = 0; i < 8; i++) {

        SetClkPinLevel(LOW);

        if(dat & 0x80) {

            SetMosiPinLevel(HIGH);

        } else {

            SetMosiPinLevel(LOW);

        }

        dat <<= 1;

        sunxi_lcd_delay_us(1);
        SetClkPinLevel(HIGH);

        sunxi_lcd_delay_us(1);
    }

}


static void LCD_panel_init(u32 sel)
{

    printk(KERN_INFO "=====================LCD_panel_init\n");


    SpiWriteAddr(0x11);

    sunxi_lcd_delay_ms(100); 





    SpiWriteAddr(0xBB);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x5a);

    SpiWriteData(0xa5);

    SpiWriteData(0x0F);







    SpiWriteAddr(0xc1);

    SpiWriteData(0x73);

    SpiWriteData(0x71);

    SpiWriteData(0x02);

    SpiWriteData(0x02);

    SpiWriteData(0x71);

    SpiWriteData(0x05);

    SpiWriteData(0x06);

    SpiWriteData(0x11);

    SpiWriteData(0x55);

    SpiWriteData(0x3F);

    SpiWriteData(0xAA);

    SpiWriteData(0xa0);

    SpiWriteData(0x06);

    SpiWriteData(0xFF);

    SpiWriteData(0xFF);

    SpiWriteData(0x7F);

    SpiWriteData(0x4F);

    SpiWriteData(0x52);

    SpiWriteData(0x00);

    SpiWriteData(0x4F);

    SpiWriteData(0x52);

    SpiWriteData(0x00);

    SpiWriteData(0x96);

    SpiWriteData(0x06);

    SpiWriteData(0xC0);

    SpiWriteData(0x01);

    SpiWriteData(0x30);

    SpiWriteData(0xC0);

    SpiWriteData(0x01);

    SpiWriteData(0x30);









    SpiWriteAddr(0xc3);

    SpiWriteData(0x05);

    SpiWriteData(0x0A);

    SpiWriteData(0x05);

    SpiWriteData(0x0a);

    SpiWriteData(0x00);

    SpiWriteData(0xE0);

    SpiWriteData(0x2E);

    SpiWriteData(0x22);

    SpiWriteData(0x1E);

    SpiWriteData(0x78);

    SpiWriteData(0x12);

    SpiWriteData(0x22);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x0A);

    SpiWriteData(0x0A);

    SpiWriteData(0x10);

    SpiWriteData(0x00);

    SpiWriteData(0xF0);

    SpiWriteData(0x18);

    SpiWriteData(0x18);

    SpiWriteData(0x40);

    SpiWriteData(0x00);

    SpiWriteData(0x22);

    SpiWriteData(0x22);

    SpiWriteData(0x0C);

    SpiWriteData(0x00);

    SpiWriteData(0xac);

    SpiWriteData(0xca);





    //11

    SpiWriteAddr(0xCF);

    SpiWriteData(0x47);

    SpiWriteData(0x32);

    SpiWriteData(0x00);

    SpiWriteData(0x31);

    SpiWriteData(0x55);

    SpiWriteData(0x23);

    SpiWriteData(0x12);

    SpiWriteData(0x12);

    SpiWriteData(0x51);

    SpiWriteData(0x33);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0xFE);

    SpiWriteData(0x01);



    SpiWriteAddr(0xCD);

    SpiWriteData(0x80);

    SpiWriteData(0xd7);

    SpiWriteData(0xad);

    SpiWriteData(0x73);
    SpiWriteData(0x00);

    SpiWriteData(0x96);

    SpiWriteData(0x0a);

    SpiWriteData(0x01);

    SpiWriteData(0x00);

    SpiWriteData(0x14);

    SpiWriteData(0x00);

    SpiWriteData(0x04);

    SpiWriteData(0xD0);

    SpiWriteData(0xF8);

    SpiWriteData(0x22);

    SpiWriteData(0xD0);

    SpiWriteData(0xE3);

    SpiWriteData(0x22);

    SpiWriteData(0x00);





    SpiWriteAddr(0xd0);

    SpiWriteData(0x01);

    SpiWriteData(0x4A);

    SpiWriteData(0xF8);

    SpiWriteData(0x13);

    SpiWriteData(0x20);

    SpiWriteData(0x50);

    SpiWriteData(0x07);

    SpiWriteData(0xe8);

    SpiWriteData(0x02);

    SpiWriteData(0x07);

    SpiWriteData(0x36);

    SpiWriteData(0x05);

    SpiWriteData(0x11);

    SpiWriteData(0x0A);

    SpiWriteData(0x64);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x11);

    SpiWriteData(0x64);

    SpiWriteData(0x03);

    SpiWriteData(0x00);

     





    SpiWriteAddr(0xd3);

    SpiWriteData(0x00);

    SpiWriteData(0x3d);

    SpiWriteData(0x40);

    SpiWriteData(0x44);

    SpiWriteData(0x46);

    SpiWriteData(0x48);

    SpiWriteData(0x4a);

    SpiWriteData(0x49);

    SpiWriteData(0x5c);

    SpiWriteData(0x59);

    SpiWriteData(0x59);

    SpiWriteData(0x5a);

    SpiWriteData(0x59);

    SpiWriteData(0x5a);

    SpiWriteData(0x5a);

    SpiWriteData(0x7f);

    SpiWriteData(0x94);

    SpiWriteData(0xa0);

    SpiWriteData(0xaa);

    SpiWriteData(0xa6);

    SpiWriteData(0xa7);

    SpiWriteData(0xb5);

    SpiWriteData(0xb2);

    SpiWriteData(0xb5);

    SpiWriteData(0xbe);

    SpiWriteData(0xba);

    SpiWriteData(0xb2);

    SpiWriteData(0xb9);

    SpiWriteData(0xc2);









    SpiWriteAddr(0xd4);

    SpiWriteData(0x00);

    SpiWriteData(0x3d);

    SpiWriteData(0x40);

    SpiWriteData(0x44);

    SpiWriteData(0x46);

    SpiWriteData(0x48);

    SpiWriteData(0x4a);

    SpiWriteData(0x49);

    SpiWriteData(0x5c);

    SpiWriteData(0x59);

    SpiWriteData(0x59);

    SpiWriteData(0x5a);

    SpiWriteData(0x59);

    SpiWriteData(0x5a);

    SpiWriteData(0x5a);

    SpiWriteData(0x7f);

    SpiWriteData(0x94);

    SpiWriteData(0xa0);

    SpiWriteData(0xaa);

    SpiWriteData(0xa6);

    SpiWriteData(0xa7);

    SpiWriteData(0xb5);

    SpiWriteData(0xb2);

    SpiWriteData(0xb5);

    SpiWriteData(0xbe);

    SpiWriteData(0xba);

    SpiWriteData(0xb2);

    SpiWriteData(0xb9);

    SpiWriteData(0xc2);



    SpiWriteAddr(0xd5);

    SpiWriteData(0x60);

    SpiWriteData(0x60);

    SpiWriteData(0x85);

    SpiWriteData(0x60);

    SpiWriteData(0x26);

    SpiWriteData(0x44);



    SpiWriteData(0x07);

    SpiWriteData(0x07);

    SpiWriteData(0x00);

    SpiWriteData(0x07);

    SpiWriteData(0x07);

    SpiWriteData(0x00);



    SpiWriteData(0x12);

    SpiWriteData(0x4c);

    SpiWriteData(0xD5);

    SpiWriteData(0x15);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x03);



    SpiWriteData(0x00);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x00);

    SpiWriteData(0xd0);

    SpiWriteData(0xa2);

    SpiWriteData(0x13);

    SpiWriteData(0x60);

    SpiWriteData(0x60);

    SpiWriteData(0x00);







    SpiWriteAddr(0xd6);

    SpiWriteData(0x10);

    SpiWriteData(0x32);

    SpiWriteData(0x54);

    SpiWriteData(0x76);

    SpiWriteData(0x98);

    SpiWriteData(0xBA);

    SpiWriteData(0xDC);

    SpiWriteData(0xFE);

    SpiWriteData(0x01);

    SpiWriteData(0x83);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x07);

    SpiWriteData(0x07);

    SpiWriteData(0x00);

    SpiWriteData(0x07);

    SpiWriteData(0x07);

    SpiWriteData(0x00);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x30);

    SpiWriteData(0x10);

    SpiWriteData(0x33);

    SpiWriteData(0x77);

    SpiWriteData(0x77);

    SpiWriteData(0x40);





    SpiWriteAddr(0xdd);

    SpiWriteData(0x1d);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1e);



    SpiWriteData(0x1f);

    SpiWriteData(0x02);

    SpiWriteData(0x00);

    SpiWriteData(0x0c);

    SpiWriteData(0x0e);



    SpiWriteData(0x08);

    SpiWriteData(0x0a);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);





    SpiWriteAddr(0xd9);

    SpiWriteData(0x1c);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1e);



    SpiWriteData(0x1f);

    SpiWriteData(0x03);

    SpiWriteData(0x01);

    SpiWriteData(0x0d);

    SpiWriteData(0x0f);



    SpiWriteData(0x09);

    SpiWriteData(0x0b);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

     



    SpiWriteAddr(0xd7);

    SpiWriteData(0x1d);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1e);

    SpiWriteData(0x00);

    SpiWriteData(0x02);

    SpiWriteData(0x0a);

    SpiWriteData(0x08);

    SpiWriteData(0x0e);

    SpiWriteData(0x0c);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);





    SpiWriteAddr(0xd8);

    SpiWriteData(0x1c);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1e);

    SpiWriteData(0x01);

    SpiWriteData(0x03);

    SpiWriteData(0x0b);

    SpiWriteData(0x09);

    SpiWriteData(0x0f);

    SpiWriteData(0x0d);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);

    SpiWriteData(0x1f);



    SpiWriteAddr(0xc4);



    SpiWriteData(0x54);

    SpiWriteData(0x00);



    SpiWriteAddr(0xDF);

    SpiWriteData(0x22);

    SpiWriteData(0x03);

    SpiWriteData(0x33);

    SpiWriteData(0xf1);

    SpiWriteData(0x33);

    SpiWriteData(0x08);

    SpiWriteData(0x02);

    SpiWriteData(0x17);

    SpiWriteData(0x00);

    SpiWriteData(0x00);

    SpiWriteData(0x20);

    SpiWriteData(0x17);



    SpiWriteAddr(0xCE);

    SpiWriteData(0x01);

    SpiWriteData(0x09);

    SpiWriteData(0xF0);

    SpiWriteData(0xF0);

    SpiWriteData(0x03);

    SpiWriteData(0x03);

    SpiWriteData(0x04);

    SpiWriteData(0x04);

    SpiWriteData(0x04);

    SpiWriteData(0x05);

    SpiWriteData(0x06);

    SpiWriteData(0x07);

    SpiWriteData(0x08);

    SpiWriteData(0x09);

    SpiWriteData(0x0A);

    SpiWriteData(0x0B);

    SpiWriteData(0x0C);

    SpiWriteData(0x0D);

    SpiWriteData(0x0E);

    SpiWriteData(0x0F);

    SpiWriteData(0x10);

    SpiWriteData(0x11);

    SpiWriteData(0x12);

    SpiWriteData(0x13);

    SpiWriteData(0x14);

    SpiWriteData(0x15);

    SpiWriteData(0x16);

    SpiWriteData(0x17);

    SpiWriteData(0x18);



    sunxi_lcd_delay_ms(200);



    SpiWriteAddr(0x29);



    return;

}



static void LCD_panel_exit(u32 sel)
{
}

/* sel: 0:lcd0; 1:lcd1 */
static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
{
	return 0;
}

struct __lcd_panel axs1832a_720x720_pannel = {
	/* panel driver name, must mach the lcd_drv_name in sys_config.fex */
	.name = "axs1832a_720x720",
	.func = {
		 .cfg_panel_info = LCD_cfg_panel_info,
		 .cfg_open_flow = LCD_open_flow,
		 .cfg_close_flow = LCD_close_flow,
		 .lcd_user_defined_func = LCD_user_defined_func,
		 }
	,
};

static void LCD_panel_init(u32 sel)
{

    printk(KERN_INFO "=====================LCD_panel_init\n");
    ......
}
LCD_panel_init函数里面有加了打印信息,但是log里面没看到有打印出来,模拟spi的IO口上也没有量到有波形,说明并未跑进LCD_panel_init函数;
打印log:

[113]HELLO! BOOT0 is starting!
[116]BOOT0 commit : 88480af
[118]set pll start
[120]fix vccio detect value:0xc0
[123]periph0 has been enabled
[126]set pll end
[128][pmu]: bus read error
[130]board init ok
[132]ZQ value = 0x2f
[134]get_pmu_exist() = -1
[137]ddr_efuse_type: 0xa
[139]trefi:7.8ms
[141][AUTO DEBUG] single rank and full DQ!
[145]ddr_efuse_type: 0xa
[147]trefi:7.8ms
[149][AUTO DEBUG] rank 0 row = 13
[153][AUTO DEBUG] rank 0 bank = 4
[156][AUTO DEBUG] rank 0 page size = 2 KB
[160]DRAM BOOT DRIVE INFO: V0.33
[163]DRAM CLK = 528 MHz
[165]DRAM Type = 2 (2:DDR2,3:DDR3)
[168]DRAMC read ODT  off.
[171]DRAM ODT off.
[172]ddr_efuse_type: 0xa
[175]DRAM SIZE =64 M
[177]dram_tpr4:0x0
[179]PLL_DDR_CTRL_REG:0xf8002b00
[182]DRAM_CLK_REG:0xc0000000
[185][TIMING DEBUG] MR2= 0x0
[189]DRAM simple test OK.
[191]dram size =64
[193]card no is 0
[195]sdcard 0 line count 4
[197][mmc]: mmc driver ver 2021-04-2 16:45
[207][mmc]: Wrong media type 0x0
[210][mmc]: ***Try SD card 0***
[218][mmc]: HSSDR52/SDR25 4 bit
[221][mmc]: 50000000 Hz
[224][mmc]: 15240 MB
[225][mmc]: ***SD/MMC 0 init OK!!!***
[275]Loading boot-pkg Succeed(index=0).
[278]Entry_name        = opensbi
[281]Entry_name        = u-boot
[285]Entry_name        = dtb
[288]mmc not para
▒289]Jump to second Boot.

U-Boot 2018.05-g24521d6 (Feb 11 2022 - 08:52:39 +0000) Allwinner Technology

[00.299]DRAM:  64 MiB
[00.301]Relocation Offset is: 01ee7000
[00.306]secure enable bit: 0
[00.309]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.315]flash init start
[00.317]workmode = 0,storage type = 1
[00.321][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[00.326][mmc]: get sdc_type fail and use default host:tm1.
[00.333][mmc]: can't find node "mmc0",will add new node
[00.338][mmc]: fdt err returned <no error>
[00.342][mmc]: Using default timing para
[00.345][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.363][mmc]: card_caps:0x3000000a
[00.366][mmc]: host_caps:0x3000003f
[00.369]sunxi flash init ok
[00.372]line:703 init_clocks
[00.375]drv_disp_init
request pwm success, pwm7:pwm7:0x2000c00.
[00.396]drv_disp_init finish
[00.399]boot_gui_init:start
[00.402]set disp.dev2_output_type fail. using defval=0
[00.409]boot_gui_init:finish
partno erro : can't find partition bootloader
54 bytes read in 1 ms (52.7 KiB/s)
[00.425]bmp_name=bootlogo.bmp size 38454
38454 bytes read in 3 ms (12.2 MiB/s)
[00.444]Loading Environment from SUNXI_FLASH... OK
[00.466]out of usb burn from boot: not need burn key
[00.500]Item0 (Map) magic is bad
[00.503]the secure storage item0 copy0 magic is bad
[00.537]Item0 (Map) magic is bad
[00.540]the secure storage item0 copy1 magic is bad
[00.545]Item0 (Map) magic is bad
partno erro : can't find partition private
root_partition is rootfs
set root to /dev/mmcblk0p5
[00.557]update part info
[00.560]update bootcmd
[00.563]change working_fdt 0x42aa6da0 to 0x42a86da0
disable nand error: FDT_ERR_BADPATH
No reserved memory region found in source FDT
FDT ERROR:get muxsel err returned FDT_ERR_INTERNAL
sunxi_pwm_pin_set_state, fdt_set_all_pin, ret=-1
[00.600]LCD open finish
[00.614]update dts
noncached_alloc(): addr = 0x42c8a080
noncached_alloc(): addr = 0x42c8a0c0
noncached_alloc(): addr = 0x42c8a100
noncached_alloc(): addr = 0x42c8a940
geth_sys_init:634: get node 'gmac0' error
geth_sys_init fail!
[00.635]Board Net Initialization Failed
[00.638]No ethernet found.
Hit any key to stop autoboot:  0
[01.941]no vendor_boot partition is found
Android's image name: d1s-nezha
Detect comp none
[01.958]
Starting kernel ...

[01.960][mmc]: MMC Device 2 not found
[01.964][mmc]: mmc 2 not find, so not exit
** 2 printk messages dropped **
  DMA32    [mem 0x0000000040000000-0x0000000043ffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000040000000-0x0000000043ffffff]
Initmem setup node 0 [mem 0x0000000040000000-0x0000000043ffffff]
On node 0 totalpages: 16384
  DMA32 zone: 224 pages used for memmap
  DMA32 zone: 0 pages reserved
  DMA32 zone: 16384 pages, LIFO batch:3
elf_hwcap is 0x20112d
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists, mobility grouping on.  Total pages: 16160
Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/pseudo_init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:recovery@mmcblk0p6:rootfs_data@mmcblk0p7:UDISK@mmcblk0p8 cma=0M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g24521d6(02/11/2022-08:52:39) mbr_
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
Sorting __ex_table...
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 55728K/65536K available (4316K kernel code, 397K rwdata, 1681K rodata, 140K init, 229K bss, 9808K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
        Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
plic: mapped 200 interrupts with 1 handlers for 2 contexts.
riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
riscv_timer_clockevent depends on broadcast, but no broadcast function available
clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
ASID allocator initialised with 65536 entries
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc.isra.27+0xfe/0x120 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: 0, 6144 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic allocations
cpuidle: using governor menu
rtc_ccu: sunxi ccu init OK
clock: sunxi ccu init OK
clock: sunxi ccu init OK
iommu: Default domain type: Translated
sunxi iommu: irq = 4
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
videodev: Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
pwm module init!
g2d 5410000.g2d: Adding to iommu group 0
G2D: rcq version initialized.major:252
clocksource: Switched to clocksource riscv_clocksource
sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP: Hash tables configured (established 512 bind 512)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator
spi spi0: spi0 supply spi not found, using dummy regulator
sunxi_spi_resource_get()2151 - [spi0] SPI MASTER MODE
sunxi_spi_resource_get()2189 - Failed to get sample mode
sunxi_spi_resource_get()2194 - Failed to get sample delay
sunxi_spi_resource_get()2198 - sample_mode:-1431633921 sample_delay:-1431633921
sunxi_spi_clk_init()2240 - [spi0] mclk 100000000
sunxi_spi_probe()2653 - [spi0]: driver probe succeed, base ffffffd004058000, irq 31
workingset: timestamp_bits=62 max_order=14 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
ntfs: driver 2.1.32 [Flags: R/W].
io scheduler mq-deadline registered
io scheduler kyber registered
[DISP]disp_module_init
disp 5000000.disp: Adding to iommu group 0
[DISP] parser_disp_init_para,line:1430:
of_property_read fb0_width fail
[DISP] disp_init,line:2386:
smooth display screen:0 type:1 mode:4
display_fb_request,fb_id:0
Freeing logo buffer memory: 1500K
disp_al_manager_apply ouput_type:1
[DISP] lcd_clk_config,line:732:
disp 0, clk: pll(210000000),clk(210000000),dclk(35000000) dsi_rate(210000000)
     clk real:pll(288000000),clk(288000000),dclk(48000000) dsi_rate(0)
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
[DISP]disp_module_init finish
sunxi_sid_init()551 - insmod ok
pwm-regulator: supplied by regulator-dummy
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
uart uart0: get regulator failed
uart uart0: uart0 supply uart not found, using dummy regulator
uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
printk: console [ttyS0] enabled
misc dump reg init
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=131 assert=1
sun8iw20-pinctrl 2000000.pinctrl: pin PE3 already requested by 2500000.uart; cannot claim for 2000000.pinctrl:131
sun8iw20-pinctrl 2000000.pinctrl: pin-131 (2000000.pinctrl:131) status -22
sunxi-rfkill soc@3000000:rfkill@0: can't request wlan_regon gpio 131
sunxi-rfkill: probe of soc@3000000:rfkill@0 failed with error -22
[ADDR_MGT] addr_mgt_probe: module version: v1.0.10
[ADDR_MGT] addr_mgt_probe: success.
sunxi-spinand: AW SPINand MTD Layer Version: 2.0 20201228
sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.10 20200306
sunxi-spinand-phy: not detect any munufacture from id table
sunxi-spinand-phy: get spi-nand Model from fdt fail
sunxi-spinand-phy: get phy info from fdt fail
sunxi-spinand-phy: not detect munufacture from fdt
sunxi-spinand-phy: detect munufacture from id table: Micron
sunxi-spinand-phy: detect spinand id: ffff242c ffffffff
sunxi-spinand-phy: ========== arch info ==========
sunxi-spinand-phy: Model:               MT29F2G01ABAGDWB
sunxi-spinand-phy: Munufacture:         Micron
sunxi-spinand-phy: DieCntPerChip:       1
sunxi-spinand-phy: BlkCntPerDie:        2048
sunxi-spinand-phy: PageCntPerBlk:       64
sunxi-spinand-phy: SectCntPerPage:      4
sunxi-spinand-phy: OobSizePerPage:      64
sunxi-spinand-phy: BadBlockFlag:        0x0
sunxi-spinand-phy: OperationOpt:        0x8f
sunxi-spinand-phy: MaxEraseTimes:       65000
sunxi-spinand-phy: EccFlag:             0x0
sunxi-spinand-phy: EccType:             6
sunxi-spinand-phy: EccProtectedType:    5
sunxi-spinand-phy: ========================================
sunxi-spinand-phy:
sunxi-spinand-phy: ========== physical info ==========
sunxi-spinand-phy: TotalSize:    256 M
sunxi-spinand-phy: SectorSize:   512 B
sunxi-spinand-phy: PageSize:     2 K
sunxi-spinand-phy: BlockSize:    128 K
sunxi-spinand-phy: OOBSize:      64 B
sunxi-spinand-phy: ========================================
sunxi-spinand-phy:
sunxi-spinand-phy: ========== logical info ==========
sunxi-spinand-phy: TotalSize:    256 M
sunxi-spinand-phy: SectorSize:   512 B
sunxi-spinand-phy: PageSize:     4 K
sunxi-spinand-phy: BlockSize:    256 K
sunxi-spinand-phy: OOBSize:      128 B
sunxi-spinand-phy: ========================================
sunxi-spinand-phy: MT29F2G01ABAGDWB reset rx bit width to 1
sunxi-spinand-phy: MT29F2G01ABAGDWB reset tx bit width to 1
sunxi-spinand-phy: block lock register: 0x00
sunxi-spinand-phy: feature register: 0x10
sunxi-spinand-phy: sunxi physic nand init end
Creating 4 MTD partitions on "sunxi_mtd_nand":
0x000000000000-0x000000100000 : "boot0"
0x000000100000-0x000000500000 : "uboot"
random: fast init done
0x000000500000-0x000000600000 : "secure_storage"
0x000000600000-0x000010000000 : "sys"
random: crng init done
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
sunxi-ehci: EHCI SUNXI driver
get ehci1-controller wakeup-source is fail.
sunxi ehci1-controller don't init wakeup source
[sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe00068b870, 0x:ffffffd00406f000, irq_no:31
sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
sunxi-ohci: OHCI SUNXI driver
get ohci1-controller wakeup-source is fail.
sunxi ohci1-controller don't init wakeup source
[sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe00068bc38
sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1
sunxi-rtc 7090000.rtc: registered as rtc0
sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:04 UTC (4)
sunxi-rtc 7090000.rtc: sunxi rtc probed
i2c /dev entries driver
IR NEC protocol handler initialized
uvcvideo: Unable to create debugfs directory
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
sunxi cedar version 1.1
sunxi-cedar 1c0e000.ve: Adding to iommu group 0
VE: install start!!!

VE: cedar-ve the get irq is 6

VE: install end!!!

VE: sunxi_cedar_probe
sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
sunxi-mmc 4020000.sdmmc: No vmmc regulator found
sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
sunxi-mmc 4020000.sdmmc: Got CD GPIO
sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4020000.sdmmc: detmode:gpio irq
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
sunxi-mmc 4021000.sdmmc: No vmmc regulator found
sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: detmode:manually by software
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
ashmem: initialized
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
exFAT: Version 1.3.0
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
mmc0: host does not support reading read-only switch, assuming write-enable
[AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1

[AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
mmc0: new high speed SDHC card at address 59b4
sid_rd_ver_reg()254 - ver >= 4, soc ver:5
[SNDCODEC][sunxi_card_init][583]:card init finished
sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
mmcblk0: mmc0:59b4       14.9 GiB
 mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input0
[SNDCODEC][sunxi_card_dev_probe][836]:register card finished
NET: Registered protocol family 10
[SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch
Segment Routing with IPv6
NET: Registered protocol family 17
sunxi-i2c sunxi-i2c2: sunxi-i2c2 supply twi not found, using dummy regulator
sunxi-i2c sunxi-i2c2: probe success
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
get ehci0-controller wakeup-source is fail.
sunxi ehci0-controller don't init wakeup source
[sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe00068b0e0, 0x:ffffffd004875000, irq_no:2e
[sunxi-ehci0]: Not init ehci0
get ohci0-controller wakeup-source is fail.
sunxi ohci0-controller don't init wakeup source
[sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe00068b4a8
[sunxi-ohci0]: Not init ohci0
clk: Not disabling unused clocks
ALSA device list:
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
  #0: audiocodec
alloc_fd: slot 0 not NULL!
cfg80211: failed to load regulatory.db
VFS: Mounted root (squashfs filesystem) readonly on device 179:5.
devtmpfs: mounted
Freeing unused kernel memory: 140K
This architecture does not have kernel memory protection.
Run /pseudo_init as init process
mount: mounting none on /dev failed: Device or resource busy
mount: mounting /dev/by-name/rootfs_data on /overlay failed: No such device
Mount Failed: formating /dev/by-name/rootfs_data to ext4 ...
/pseudo_init: line 395: mkfs.ext4: not found
can't run '/etc/preinit': No such file or directory
mount: mounting proc on /proc failed: Device or resource busy
mount: mounting tmpfs on /run failed: No such file or directory
hostname: can't open '/etc/hostname': No such file or directory
------run rc.preboot file-----
/etc/init.d/rcS: line 136: mkfs.ext4: not found
------run rc.modules file-----
------run rc.final file-----
file system registered
configfs-gadget 4100000.udc-controller: failed to start g1: -19
sh: write error: No such device
read descriptors
read strings

insmod_host_driver

[ehci0-controller]: sunxi_usb_enable_ehci
[sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe00068b0e0, 0x:ffffffd004875000, irq_no:2e
sunxi-ehci 4101000.ehci0-controller: 4101000.ehci0-controller supply hci not found, using dummy regulator
sunxi-ehci 4101000.ehci0-controller: EHCI Host Controller
sunxi-ehci 4101000.ehci0-controller: new USB bus registered, assigned bus number 3
sunxi-ehci 4101000.ehci0-controller: irq 46, io mem 0x04101000
sunxi-ehci 4101000.ehci0-controller: USB 2.0 started, EHCI 1.00
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
[ohci0-controller]: sunxi_usb_enable_ohci
[sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe00068b4a8
sunxi-ohci 4101400.ohci0-controller: 4101400.ohci0-controller supply hci not found, using dummy regulator
sunxi-ohci 4101400.ohci0-controller: OHCI Host Controller
sunxi-ohci 4101400.ohci0-controller: new USB bus registered, assigned bus number 4
sunxi-ohci 4101400.ohci0-controller: irq 47, io mem 0x04101400
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
host_chose finished!


BusyBox v1.27.2 () built-in shell (ash)

nice: can't execute '/usr/bin/story_ota_bin': No such file or directory
------run profile file-----
 _____  _              __     _
|_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
  | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
  | |  | || | || _ |  |_____||_||_|_||___||_,_|
  |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
 ----------------------------------------------
 Tina Linux (Neptune, 61CC0487)
 ----------------------------------------------
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# ls /dev/
ashmem           kmsg             mtd2             snd
bus              mmcblk0          mtd2ro           sunxi-reg
by-name          mmcblk0p1        mtd3             sunxi_pwm0
cedar_dev        mmcblk0p2        mtd3ro           sunxi_soc_info
console          mmcblk0p3        mtdblock0        tty
cpu_dma_latency  mmcblk0p4        mtdblock1        ttyS0
disp             mmcblk0p5        mtdblock2        ubi_ctrl
fb0              mmcblk0p6        mtdblock3        urandom
full             mmcblk0p7        null             usb-ffs
g2d              mmcblk0p8        ptmx             video4
gpiochip0        mtd0             pts              zero
i2c-2            mtd0ro           random
input            mtd1             rtc0
ion              mtd1ro           shm
root@TinaLinux:/# cat /sys/class/
addr_mgt/              ieee80211/             scsi_host/
android_usb/           input/                 sound/
bdi/                   iommu/                 spi_master/
block/                 mem/                   sunxi_dump/
cedar_ve/              misc/                  sunxi_info/
devlink/               mmc_host/              sunxi_pwm_char_class/
disp/                  mtd/                   tty/
dma/                   net/                   ubi/
g2d/                   power_supply/          udc/
gpio/                  pwm/                   udc_reg/
graphics/              rc/                    usb_role/
hci_reg/               regulator/             video4linux/
hwmon/                 rtc/                   wakeup/
i2c-adapter/           scsi_device/
i2c-dev/               scsi_disk/
root@TinaLinux:/# cat /sys/class/graphics/fb0/
bits_per_pixel        mode                  state
blank                 modes                 stride
console               name                  subsystem/
cursor                pan                   uevent
dev                   power/                virtual_size
device/               rotate                waiting_for_supplier
root@TinaLinux:/# cat /sys/class/graphics/fb0/mode
mode   modes
root@TinaLinux:/# cat /sys/class/graphics/fb0/modes
U:720x720p-60
root@TinaLinux:/#

有大佬知道是什么原因吗?

#12 Re: 全志 SOC » D1s/f133-B 跑tina linux,进命令行后,无法输入命令 » 2022-04-25 14:07:36

哇酷小二 说:

sun8iw20-pinctrl 2000000.pinctrl: pin PE3 already requested by 2500000.uart; cannot claim for 2000000.pinctrl:131
sun8iw20-pinctrl 2000000.pinctrl: pin-131 (2000000.pinctrl:131) status -22

检查 dts, PE3可能在别处用了。

结贴,板子上引出来的引脚PE8的丝印搞错了,弄成了PE3......,接到真正的PE3上就OK了,手动捂脸
roll

#13 全志 SOC » D1s/f133-B 跑tina linux,进命令行后,无法输入命令 » 2022-04-24 20:56:31

岁月快快快
回复: 2

如题,按照晕哥的教程 https://whycan.com/t_6440.html ,下载了tina v2.0,编译烧录到sd卡上,插入sd卡启动,跑进命令行之后,键盘敲命令无反应;
log如下:

[32]HELLO! BOOT0 is starting!
[35]BOOT0 commit : 88480af
[38]set pll start
[39]periph0 has been enabled
[42]set pll end
[44][pmu]: bus read error
[46]board init ok
[48]ZQ value = 0x2f
[50]get_pmu_exist() = -1
[52]ddr_efuse_type: 0xa
[55]trefi:7.8ms
[57][AUTO DEBUG] single rank and full DQ!
[61]ddr_efuse_type: 0xa
[63]trefi:7.8ms
[65][AUTO DEBUG] rank 0 row = 13
[68][AUTO DEBUG] rank 0 bank = 4
[71][AUTO DEBUG] rank 0 page size = 2 KB
[75]DRAM BOOT DRIVE INFO: V0.33
[78]DRAM CLK = 528 MHz
[80]DRAM Type = 2 (2:DDR2,3:DDR3)
[83]DRAMC read ODT  off.
[85]DRAM ODT off.
[87]ddr_efuse_type: 0xa
[90]DRAM SIZE =64 M
[92]dram_tpr4:0x0
[93]PLL_DDR_CTRL_REG:0xf8002b00
[96]DRAM_CLK_REG:0xc0000000
[99][TIMING DEBUG] MR2= 0x0
[103]DRAM simple test OK.
[105]dram size =64
[107]card no is 0
[109]sdcard 0 line count 4
[111][mmc]: mmc driver ver 2021-04-2 16:45
[121][mmc]: Wrong media type 0x0
[124][mmc]: ***Try SD card 0***
[132][mmc]: HSSDR52/SDR25 4 bit
[135][mmc]: 50000000 Hz
[138][mmc]: 15240 MB
[140][mmc]: ***SD/MMC 0 init OK!!!***
[189]Loading boot-pkg Succeed(index=0).
[193]Entry_name        = opensbi
[196]Entry_name        = u-boot
[200]Entry_name        = dtb
[202]mmc not para
▒204]Jump to second Boot.

U-Boot 2018.05-g24521d6 (Feb 11 2022 - 08:52:39 +0000) Allwinner Technology

[00.213]DRAM:  64 MiB
[00.215]Relocation Offset is: 01ee7000
[00.220]secure enable bit: 0
[00.223]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.229]flash init start
[00.232]workmode = 0,storage type = 1
[00.235][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[00.241][mmc]: get sdc_type fail and use default host:tm1.
[00.247][mmc]: can't find node "mmc0",will add new node
[00.252][mmc]: fdt err returned <no error>
[00.256][mmc]: Using default timing para
[00.260][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.277][mmc]: card_caps:0x3000000a
[00.280][mmc]: host_caps:0x3000003f
[00.284]sunxi flash init ok
[00.286]line:703 init_clocks
[00.289]drv_disp_init
request pwm success, pwm7:pwm7:0x2000c00.
[00.310]drv_disp_init finish
[00.313]boot_gui_init:start
[00.316]set disp.dev2_output_type fail. using defval=0
[00.323]boot_gui_init:finish
partno erro : can't find partition bootloader
54 bytes read in 0 ms
[00.338]bmp_name=bootlogo.bmp size 38454
38454 bytes read in 3 ms (12.2 MiB/s)
[00.357]Loading Environment from SUNXI_FLASH... OK
[00.379]out of usb burn from boot: not need burn key
[00.414]Item0 (Map) magic is bad
[00.416]the secure storage item0 copy0 magic is bad
[00.451]Item0 (Map) magic is bad
[00.453]the secure storage item0 copy1 magic is bad
[00.458]Item0 (Map) magic is bad
partno erro : can't find partition private
root_partition is rootfs
set root to /dev/mmcblk0p5
[00.470]update part info
[00.473]update bootcmd
[00.476]change working_fdt 0x42aa6da0 to 0x42a86da0
disable nand error: FDT_ERR_BADPATH
No reserved memory region found in source FDT
FDT ERROR:fdt_set_all_pin:[/soc/pwm7]-->FDT_ERR_BADSTRUCTURE
sunxi_pwm_pin_set_state, fdt_set_all_pin, ret=-1
[00.513]LCD open finish
[00.526]update dts
noncached_alloc(): addr = 0x42c8a080
noncached_alloc(): addr = 0x42c8a0c0
noncached_alloc(): addr = 0x42c8a100
noncached_alloc(): addr = 0x42c8a940
geth_sys_init:634: get node 'gmac0' error
geth_sys_init fail!
[00.546]Board Net Initialization Failed
[00.550]No ethernet found.
Hit any key to stop autoboot:  0
[01.852]no vendor_boot partition is found
Android's image name: d1s-nezha
Detect comp none
[01.870]
Starting kernel ...

[01.872][mmc]: MMC Device 2 not found
[01.876][mmc]: mmc 2 not find, so not exit
Linux version 5.4.61 (root@ubuntu) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #10 PREEMPT Sun Apr 24 11:52:44 UTC 2022
Zone ranges:
  DMA32    [mem 0x0000000040000000-0x0000000043ffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000040000000-0x0000000043ffffff]
Initmem setup node 0 [mem 0x0000000040000000-0x0000000043ffffff]
On node 0 totalpages: 16384
  DMA32 zone: 224 pages used for memmap
  DMA32 zone: 0 pages reserved
  DMA32 zone: 16384 pages, LIFO batch:3
elf_hwcap is 0x20112d
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists, mobility grouping on.  Total pages: 16160
Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/pseudo_init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:recovery@mmcblk0p6:rootfs_data@mmcblk0p7:UDISK@mmcblk0p8 cma=0M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g24521d6(02/11/2022-08:52:39) mbr_
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
Sorting __ex_table...
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 55732K/65536K available (4312K kernel code, 401K rwdata, 1680K rodata, 140K init, 229K bss, 9804K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
        Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
plic: mapped 200 interrupts with 1 handlers for 2 contexts.
riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
riscv_timer_clockevent depends on broadcast, but no broadcast function available
clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
ASID allocator initialised with 65536 entries
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc.isra.27+0xfe/0x120 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: 0, 6144 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic allocations
cpuidle: using governor menu
rtc_ccu: sunxi ccu init OK
clock: sunxi ccu init OK
clock: sunxi ccu init OK
iommu: Default domain type: Translated
sunxi iommu: irq = 4
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
videodev: Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
pwm module init!
g2d 5410000.g2d: Adding to iommu group 0
G2D: rcq version initialized.major:252
clocksource: Switched to clocksource riscv_clocksource
sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP: Hash tables configured (established 512 bind 512)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator
spi spi0: spi0 supply spi not found, using dummy regulator
sunxi_spi_resource_get()2151 - [spi0] SPI MASTER MODE
sunxi_spi_resource_get()2189 - Failed to get sample mode
sunxi_spi_resource_get()2194 - Failed to get sample delay
sunxi_spi_resource_get()2198 - sample_mode:-1431633921 sample_delay:-1431633921
sunxi_spi_clk_init()2240 - [spi0] mclk 100000000
sunxi_spi_probe()2653 - [spi0]: driver probe succeed, base ffffffd004058000, irq 31
workingset: timestamp_bits=62 max_order=14 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
ntfs: driver 2.1.32 [Flags: R/W].
io scheduler mq-deadline registered
io scheduler kyber registered
[DISP]disp_module_init
disp 5000000.disp: Adding to iommu group 0
[DISP] parser_disp_init_para,line:1430:
of_property_read fb0_width fail
[DISP] disp_init,line:2386:
smooth display screen:0 type:1 mode:4
display_fb_request,fb_id:0
Freeing logo buffer memory: 1500K
disp_al_manager_apply ouput_type:1
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
[DISP]disp_module_init finish
sunxi_sid_init()551 - insmod ok
pwm-regulator: supplied by regulator-dummy
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
uart uart0: get regulator failed
uart uart0: uart0 supply uart not found, using dummy regulator
uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
printk: console [ttyS0] enabled
misc dump reg init
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=131 assert=1
sun8iw20-pinctrl 2000000.pinctrl: pin PE3 already requested by 2500000.uart; cannot claim for 2000000.pinctrl:131
sun8iw20-pinctrl 2000000.pinctrl: pin-131 (2000000.pinctrl:131) status -22
sunxi-rfkill soc@3000000:rfkill@0: can't request wlan_regon gpio 131
sunxi-rfkill: probe of soc@3000000:rfkill@0 failed with error -22
[ADDR_MGT] addr_mgt_probe: module version: v1.0.10
[ADDR_MGT] addr_mgt_probe: success.
sunxi-spinand: AW SPINand MTD Layer Version: 2.0 20201228
sunxi-spinand-phy: AW SPINand Phy Layer Version: 1.10 20200306
sunxi-spinand-phy: not detect any munufacture from id table
sunxi-spinand-phy: get spi-nand Model from fdt fail
sunxi-spinand-phy: get phy info from fdt fail
sunxi-spinand-phy: not detect munufacture from fdt
sunxi-spinand-phy: detect munufacture from id table: Micron
sunxi-spinand-phy: detect spinand id: ffff242c ffffffff
sunxi-spinand-phy: ========== arch info ==========
sunxi-spinand-phy: Model:               MT29F2G01ABAGDWB
sunxi-spinand-phy: Munufacture:         Micron
sunxi-spinand-phy: DieCntPerChip:       1
sunxi-spinand-phy: BlkCntPerDie:        2048
sunxi-spinand-phy: PageCntPerBlk:       64
sunxi-spinand-phy: SectCntPerPage:      4
sunxi-spinand-phy: OobSizePerPage:      64
sunxi-spinand-phy: BadBlockFlag:        0x0
sunxi-spinand-phy: OperationOpt:        0x8f
sunxi-spinand-phy: MaxEraseTimes:       65000
sunxi-spinand-phy: EccFlag:             0x0
sunxi-spinand-phy: EccType:             6
sunxi-spinand-phy: EccProtectedType:    5
sunxi-spinand-phy: ========================================
sunxi-spinand-phy:
sunxi-spinand-phy: ========== physical info ==========
sunxi-spinand-phy: TotalSize:    256 M
sunxi-spinand-phy: SectorSize:   512 B
sunxi-spinand-phy: PageSize:     2 K
sunxi-spinand-phy: BlockSize:    128 K
sunxi-spinand-phy: OOBSize:      64 B
sunxi-spinand-phy: ========================================
sunxi-spinand-phy:
sunxi-spinand-phy: ========== logical info ==========
sunxi-spinand-phy: TotalSize:    256 M
sunxi-spinand-phy: SectorSize:   512 B
sunxi-spinand-phy: PageSize:     4 K
sunxi-spinand-phy: BlockSize:    256 K
sunxi-spinand-phy: OOBSize:      128 B
sunxi-spinand-phy: ========================================
sunxi-spinand-phy: MT29F2G01ABAGDWB reset rx bit width to 1
sunxi-spinand-phy: MT29F2G01ABAGDWB reset tx bit width to 1
sunxi-spinand-phy: block lock register: 0x00
sunxi-spinand-phy: feature register: 0x10
sunxi-spinand-phy: sunxi physic nand init end
Creating 4 MTD partitions on "sunxi_mtd_nand":
0x000000000000-0x000000100000 : "boot0"
0x000000100000-0x000000500000 : "uboot"
random: fast init done
0x000000500000-0x000000600000 : "secure_storage"
0x000000600000-0x000010000000 : "sys"
random: crng init done
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
sunxi-ehci: EHCI SUNXI driver
get ehci1-controller wakeup-source is fail.
sunxi ehci1-controller don't init wakeup source
[sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe00068b870, 0x:ffffffd00406f000, irq_no:31
sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
sunxi-ohci: OHCI SUNXI driver
get ohci1-controller wakeup-source is fail.
sunxi ohci1-controller don't init wakeup source
[sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe00068bc38
sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
sunxi-rtc 7090000.rtc: registered as rtc0
sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:03:19 UTC (199)
sunxi-rtc 7090000.rtc: sunxi rtc probed
i2c /dev entries driver
IR NEC protocol handler initialized
uvcvideo: Unable to create debugfs directory
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
sunxi cedar version 1.1
sunxi-cedar 1c0e000.ve: Adding to iommu group 0
VE: install start!!!

VE: cedar-ve the get irq is 6

VE: install end!!!

VE: sunxi_cedar_probe
sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
sunxi-mmc 4020000.sdmmc: No vmmc regulator found
sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
sunxi-mmc 4020000.sdmmc: Got CD GPIO
sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4020000.sdmmc: detmode:gpio irq
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
sunxi-mmc 4021000.sdmmc: No vmmc regulator found
sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sunxi-mmc 4021000.sdmmc: detmode:manually by software
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
ashmem: initialized
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
exFAT: Version 1.3.0
[AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1

mmc0: host does not support reading read-only switch, assuming write-enable
[AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0
[AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
sid_rd_ver_reg()254 - ver >= 4, soc ver:5
[SNDCODEC][sunxi_card_init][583]:card init finished
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input0
sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
mmc0: new high speed SDHC card at address 59b4
mmcblk0: mmc0:59b4       14.9 GiB
[SNDCODEC][sunxi_card_dev_probe][836]:register card finished
 mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
NET: Registered protocol family 10
[SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch
Segment Routing with IPv6
NET: Registered protocol family 17
sunxi-i2c sunxi-i2c2: sunxi-i2c2 supply twi not found, using dummy regulator
sunxi-i2c sunxi-i2c2: probe success
sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
get ehci0-controller wakeup-source is fail.
sunxi ehci0-controller don't init wakeup source
[sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe00068b0e0, 0x:ffffffd0047f1000, irq_no:2e
[sunxi-ehci0]: Not init ehci0
get ohci0-controller wakeup-source is fail.
sunxi ohci0-controller don't init wakeup source
[sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe00068b4a8
[sunxi-ohci0]: Not init ohci0
clk: Not disabling unused clocks
ALSA device list:
  #0: audiocodec
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
alloc_fd: slot 0 not NULL!
cfg80211: failed to load regulatory.db
VFS: Mounted root (squashfs filesystem) readonly on device 179:5.
devtmpfs: mounted
Freeing unused kernel memory: 140K
This architecture does not have kernel memory protection.
Run /pseudo_init as init process
mount: mounting none on /dev failed: Device or resource busy
mount: mounting /dev/by-name/rootfs_data on /overlay failed: No such device
Mount Failed: formating /dev/by-name/rootfs_data to ext4 ...
/pseudo_init: line 395: mkfs.ext4: not found
can't run '/etc/preinit': No such file or directory
mount: mounting proc on /proc failed: Device or resource busy
mount: mounting tmpfs on /run failed: No such file or directory
hostname: can't open '/etc/hostname': No such file or directory
------run rc.preboot file-----
/etc/init.d/rcS: line 136: mkfs.ext4: not found
------run rc.modules file-----
------run rc.final file-----
file system registered
configfs-gadget 4100000.udc-controller: failed to start g1: -19
sh: write error: No such device
read descriptors
read strings

insmod_host_driver

[ehci0-controller]: sunxi_usb_enable_ehci
[sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe00068b0e0, 0x:ffffffd0047f1000, irq_no:2e
sunxi-ehci 4101000.ehci0-controller: 4101000.ehci0-controller supply hci not found, using dummy regulator
sunxi-ehci 4101000.ehci0-controller: EHCI Host Controller
sunxi-ehci 4101000.ehci0-controller: new USB bus registered, assigned bus number 3
sunxi-ehci 4101000.ehci0-controller: irq 46, io mem 0x04101000
sunxi-ehci 4101000.ehci0-controller: USB 2.0 started, EHCI 1.00
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
[ohci0-controller]: sunxi_usb_enable_ohci
[sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe00068b4a8
sunxi-ohci 4101400.ohci0-controller: 4101400.ohci0-controller supply hci not found, using dummy regulator
sunxi-ohci 4101400.ohci0-controller: OHCI Host Controller
sunxi-ohci 4101400.ohci0-controller: new USB bus registered, assigned bus number 4
sunxi-ohci 4101400.ohci0-controller: irq 47, io mem 0x04101400
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 1 port detected
host_chose finished!


BusyBox v1.27.2 () built-in shell (ash)

nice: can't execute '/usr/bin/story_ota_bin': No such file or directory
------run profile file-----
 _____  _              __     _
|_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
  | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
  | |  | || | || _ |  |_____||_||_|_||___||_,_|
  |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
 ----------------------------------------------
 Tina Linux (Neptune, 61CC0487)
 ----------------------------------------------
root@TinaLinux:/#

debug 串口用的是uart0 PE2 PE3;
量了RX脚,是通的;
在uboot里面配置bootargs变量,设置串口0为终端,也没有起作用;
有大佬知道是哪里没设置好吗?

#14 Re: 全志 SOC » 最近准备入坑,偏向裸机,选择哪款Soc好点? » 2022-04-24 10:21:34

Gentlepig 说:

也可以考虑新出的d1s,f133。

F133跟D1S有什么区别啊,SDK可以共用吗?

#15 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-22 20:57:13

linux下面好像还是beta版本,看来只能手写或者在windows下弄了

#16 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-21 16:09:49

@海石生风
感谢大佬,example里面的demo已经可以成功编译运行了,但是如果编译我自己在界面设计器里面打包出来的demo,在板子上还是运行不了;
报错无法加载libawtk.so库:

# ./demo
/opt/releaseGif/bin/demo: can't load library 'libawtk.so'

# strings ./libawtk.so  | grep -i glibc
GLIBCXX_3.4
_Znwj@@GLIBCXX_3.4
_Znaj@@GLIBCXX_3.4
_ZdaPv@@GLIBCXX_3.4

对比了example里面编译出来的libawtk.so的glibc库版本又是一样的;
可能是linux下面的界面设计器的问题?
安装的是AWStudio-Community-amd64-1.0.21.deb这个版本

#17 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-20 15:33:27

海石生风 说:

那估计是你的文件系统有问题

麻烦不断,又有新问题了,用编译buildroot的工具链来编译awtk-linux-fb报错:

-I/home/robert/myProject/aboutLinux/linuxFile/SweepFLoorMachineUseLinux/awtkApp/awtk/res build/var/awtk/src/charset/encoding.c
build/var/awtk/src/charset/encoding.c:30:10: fatal error: iconv.h: No such file or directory
 #include <iconv.h>
          ^~~~~~~~~
compilation terminated.
scons: *** [build/var/awtk/src/charset/encoding.o] Error 1
scons: building terminated because of errors.

可能是buildroot工具链不支持iconv库?或者是我没配置好?
配置如下:
1.png
.png
buildroot试了buildroot-2018.02.2和buildroot-2018.08.2,都有一样的问题
用同样的buildroot工具链去编译lvgl又是没有问题的,可以编译通过,编译出来的demo可以在板子上运行;
用编译内核的工具链gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz去编译awtk-linux-fb又是可以通过的,没有报缺少iconv.h;
但是用编译内核的工具链编出来的应用程序在板子上执行不了,应该是和编译根文件系统用的glibc的版本不一样导致,所以只能用buildroot的工具链来编译;
strings buildroot-2018.02.2/output/host/bin/arm-linux-gcc | grep -i glibc
GLIBC_2.14
GLIBC_2.3
GLIBC_2.2.5

用编译内核的工具链编译出来的应用程序执行报错信息:

[root@buildroot: /opt/release/bin]$./demo &
[1]-  Done(127)                  ./demo
[root@buildroot: /opt/release/bin]$-sh: ./demo: not found
^C
[root@buildroot: /opt/release/bin]$strings libawtk.so  | grep -i glibc
GLIBC_2.4
GLIBCXX_3.4
GLIBC_2.7
signal@@GLIBC_2.4
atan@@GLIBC_2.4
pthread_cond_init@@GLIBC_2.4
chdir@@GLIBC_2.4
stdin@@GLIBC_2.4
sem_destroy@@GLIBC_2.4
_Znwj@@GLIBCXX_3.4
pthread_mutex_lock@@GLIBC_2.4
wcslen@@GLIBC_2.4
pthread_mutex_init@@GLIBC_2.4
fsync@@GLIBC_2.4
rand@@GLIBC_2.4
sqrt@@GLIBC_2.4
ftruncate@@GLIBC_2.4
iswspace@@GLIBC_2.4
popen@@GLIBC_2.4
log@@GLIBC_2.4
dlerror@@GLIBC_2.4
gettimeofday@@GLIBC_2.4
recvfrom@@GLIBC_2.4
pthread_cond_destroy@@GLIBC_2.4
socketpair@@GLIBC_2.4
getsockopt@@GLIBC_2.4
strcasecmp@@GLIBC_2.4
ftello@@GLIBC_2.4
utime@@GLIBC_2.4
freeaddrinfo@@GLIBC_2.4
strtol@@GLIBC_2.4
free@@GLIBC_2.4
atan2f@@GLIBC_2.4
readdir@@GLIBC_2.4
getaddrinfo@@GLIBC_2.4
fseek@@GLIBC_2.4
atanf@@GLIBC_2.4
tanf@@GLIBC_2.4
qsort@@GLIBC_2.4
strncmp@@GLIBC_2.4
pthread_join@@GLIBC_2.4
ceilf@@GLIBC_2.4
closedir@@GLIBC_2.4
printf@@GLIBC_2.4
cosf@@GLIBC_2.4
pthread_cond_timedwait@@GLIBC_2.4
dlclose@@GLIBC_2.4
feof@@GLIBC_2.4
puts@@GLIBC_2.4
pthread_cond_signal@@GLIBC_2.4
perror@@GLIBC_2.4
asin@@GLIBC_2.4
strtoll@@GLIBC_2.4
getpwuid@@GLIBC_2.4
sendto@@GLIBC_2.4
readlink@@GLIBC_2.4
cos@@GLIBC_2.4
lround@@GLIBC_2.4
exp@@GLIBC_2.4
putchar@@GLIBC_2.4
memset@@GLIBC_2.4
pthread_self@@GLIBC_2.4
opendir@@GLIBC_2.4
acosf@@GLIBC_2.4
srandom@@GLIBC_2.4
recv@@GLIBC_2.4
remove@@GLIBC_2.4
fcntl@@GLIBC_2.4
wcschr@@GLIBC_2.4
listen@@GLIBC_2.4
snprintf@@GLIBC_2.4
ldexp@@GLIBC_2.4
pthread_mutex_trylock@@GLIBC_2.4
close@@GLIBC_2.4
pthread_cond_broadcast@@GLIBC_2.4
fopen@@GLIBC_2.4
_Znaj@@GLIBCXX_3.4
read@@GLIBC_2.4
bsearch@@GLIBC_2.4
pow@@GLIBC_2.4
vfprintf@@GLIBC_2.4
sinf@@GLIBC_2.4
__ctype_toupper_loc@@GLIBC_2.4
memmove@@GLIBC_2.4
freopen@@GLIBC_2.4
rmdir@@GLIBC_2.4
unlink@@GLIBC_2.4
gethostbyname@@GLIBC_2.4
dlopen@@GLIBC_2.4
ioctl@@GLIBC_2.4
tcflush@@GLIBC_2.4
cfsetspeed@@GLIBC_2.4
localtime@@GLIBC_2.4
gmtime_r@@GLIBC_2.4
system@@GLIBC_2.4
realloc@@GLIBC_2.4
strcpy@@GLIBC_2.4
mmap@@GLIBC_2.4
wcsncpy@@GLIBC_2.4
wcscmp@@GLIBC_2.4
_ZdlPv@@GLIBCXX_3.4
__assert_fail@@GLIBC_2.4
ceil@@GLIBC_2.4
open@@GLIBC_2.4
sincosf@@GLIBC_2.4
bind@@GLIBC_2.4
pthread_mutex_destroy@@GLIBC_2.4
tcsetattr@@GLIBC_2.4
fread@@GLIBC_2.4
fileno@@GLIBC_2.4
socket@@GLIBC_2.4
access@@GLIBC_2.4
mkdir@@GLIBC_2.4
atan2@@GLIBC_2.4
__cxa_atexit@@GLIBC_2.4
strstr@@GLIBC_2.4
sqrtf@@GLIBC_2.4
sem_init@@GLIBC_2.4
sem_timedwait@@GLIBC_2.4
__register_atfork@@GLIBC_2.4
pclose@@GLIBC_2.4
_ZdaPv@@GLIBCXX_3.4
__isoc99_vsscanf@@GLIBC_2.7
setsockopt@@GLIBC_2.4
select@@GLIBC_2.4
shutdown@@GLIBC_2.4
sleep@@GLIBC_2.4
raise@@GLIBC_2.4
__ctype_b_loc@@GLIBC_2.4
pthread_cond_wait@@GLIBC_2.4
getuid@@GLIBC_2.4
strtoull@@GLIBC_2.4
connect@@GLIBC_2.4
rewinddir@@GLIBC_2.4
calloc@@GLIBC_2.4
ftell@@GLIBC_2.4
ferror@@GLIBC_2.4
iconv_close@@GLIBC_2.4
fgets@@GLIBC_2.4
__fxstat@@GLIBC_2.4
sem_post@@GLIBC_2.4
fwrite@@GLIBC_2.4
sincos@@GLIBC_2.4
memcpy@@GLIBC_2.4
tan@@GLIBC_2.4
malloc@@GLIBC_2.4
strlen@@GLIBC_2.4
getcwd@@GLIBC_2.4
munmap@@GLIBC_2.4
accept@@GLIBC_2.4
usleep@@GLIBC_2.4
fclose@@GLIBC_2.4
write@@GLIBC_2.4
atof@@GLIBC_2.4
fseeko@@GLIBC_2.4
floorf@@GLIBC_2.4
fmodf@@GLIBC_2.4
__xstat@@GLIBC_2.4
stdout@@GLIBC_2.4
random@@GLIBC_2.4
iconv_open@@GLIBC_2.4
pthread_create@@GLIBC_2.4
strcmp@@GLIBC_2.4
time@@GLIBC_2.4
iconv@@GLIBC_2.4
tcgetattr@@GLIBC_2.4
__errno_location@@GLIBC_2.4
send@@GLIBC_2.4
tolower@@GLIBC_2.4
__sysv_signal@@GLIBC_2.4
strncpy@@GLIBC_2.4
fflush@@GLIBC_2.4
memcmp@@GLIBC_2.4
strrchr@@GLIBC_2.4
wcscpy@@GLIBC_2.4
__ctype_tolower_loc@@GLIBC_2.4
alarm@@GLIBC_2.4
getsockname@@GLIBC_2.4
mktime@@GLIBC_2.4
sin@@GLIBC_2.4
fputs@@GLIBC_2.4
getenv@@GLIBC_2.4
clock_gettime@@GLIBC_2.4
dlsym@@GLIBC_2.4
rename@@GLIBC_2.4
acos@@GLIBC_2.4
sem_wait@@GLIBC_2.4
strchr@@GLIBC_2.4
__cxa_finalize@@GLIBC_2.4
pthread_mutex_unlock@@GLIBC_2.4
settimeofday@@GLIBC_2.4
vsnprintf@@GLIBC_2.4
floor@@GLIBC_2.4
[2]+  Done(127)                  ./demo
[root@buildroot: /opt/release/bin]$[  181.351505] random: crng init done

[root@buildroot: /opt/release/bin]$ldd demo
checking sub-depends for '/usr/lib/libstdc++.so.6'
checking sub-depends for 'not found'
checking sub-depends for 'not found'
checking sub-depends for 'not found'
checking sub-depends for 'not found'
checking sub-depends for '/lib/libgcc_s.so.1'
checking sub-depends for 'not found'
checking sub-depends for '/lib/libc.so.0'
        ld-uClibc.so.1 => /lib/ld-uClibc.so.1 (0xb6f6a000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00000000)
        libpthread.so.0 => not found (0x00000000)
        librt.so.1 => not found (0x00000000)
        libm.so.6 => not found (0x00000000)
        libdl.so.2 => not found (0x00000000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
        libc.so.6 => not found (0x00000000)
        libc.so.0 => /lib/libc.so.0 (0x00000000)
        /lib/ld-uClibc.so.1 => /lib/ld-uClibc.so.1 (0x00000000)
        /lib/ld-uClibc.so.1 => /lib/ld-uClibc.so.1 (0x00000000)

@海石生风
大佬,你是用的什么版本的工具链来编译awtk的呢

#18 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-19 13:14:27

海石生风 说:

@岁月快快快
AWTK的构造系统在编译前即读取配置文件时会先在编译目录里创建bin文件夹,如果你在这个目录里有个bin文件,那自然创建bin文件夹就失败了,从导致读取配置文件失败。

这个文件不是我创建的,是编译以后自动生成的,也就是我第一次编译因为其它的原因出错了,然后也生成了这个文件,然后再去编译就会一直报错,直接删掉,或者执行scons -c(类似于make clean的操作), 就通过了

#19 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-18 23:38:03

把awtk-linux-fb文件夹下"bin"这个文件删掉就可以编译了,这个文件好像是编译一次之后不管通不通过都会生成,然后如果有这文件的时候再去编译就会报上面的错误,应该是把bin这个文件识别成SConstruct文件,然后就报错了,太坑了!

#20 Re: 计算机图形/GUI/RTOS/FileSystem/OpenGL/DirectX/SDL2 » LVGL的linux_frame_buffer项目加入FB双缓 » 2022-03-18 16:00:54

main.c:
#include "lvgl/lvgl.h"
#include "lv_drivers/display/fbdev.h"
#include "lv_demos/lv_demo.h"
#include <unistd.h>
#include <pthread.h>
#include <time.h>
#include <sys/time.h>

#define DISP_BUF_SIZE (480 * 480)
//#define DISP_BUF_SIZE (480 * 1024)

int main(void)
{
    /*LittlevGL init*/
    lv_init();

    /*Linux frame buffer device init*/
    fbdev_init();

    /*A small buffer for LittlevGL to draw the screen's content*/
    static lv_color_t buf[DISP_BUF_SIZE], buf1[DISP_BUF_SIZE];

    /*Initialize a descriptor for the buffer*/
    static lv_disp_draw_buf_t disp_buf;
    lv_disp_draw_buf_init(&disp_buf, buf, buf1, DISP_BUF_SIZE);

    /*Initialize and register a display driver*/
    static lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);
    disp_drv.draw_buf   = &disp_buf;
    disp_drv.flush_cb   = fbdev_flush;
    disp_drv.hor_res    = 480;
    disp_drv.ver_res    = 480;
    lv_disp_drv_register(&disp_drv);

    /*Create a Demo*/
    //lv_demo_widgets();
    lv_demo_gif();

    /*Handle LitlevGL tasks (tickless mode)*/
    while(1) {
        lv_task_handler();
        usleep(5000);
    }

    return 0;
}

/*Set in lv_conf.h as `LV_TICK_CUSTOM_SYS_TIME_EXPR`*/
uint32_t custom_tick_get(void)
{
    static uint64_t start_ms = 0;
    if(start_ms == 0) {
        struct timeval tv_start;
        gettimeofday(&tv_start, NULL);
        start_ms = (tv_start.tv_sec * 1000000 + tv_start.tv_usec) / 1000;
    }

    struct timeval tv_now;
    gettimeofday(&tv_now, NULL);
    uint64_t now_ms;
    now_ms = (tv_now.tv_sec * 1000000 + tv_now.tv_usec) / 1000;

    uint32_t time_ms = now_ms - start_ms;
    return time_ms;
}

fbdev.c:
/**
 * @file fbdev.c
 *
 */

/*********************
 *      INCLUDES
 *********************/
#include "fbdev.h"
#if USE_FBDEV || USE_BSD_FBDEV

#include <stdlib.h>
#include <unistd.h>
#include <stddef.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

#if USE_BSD_FBDEV
#include <sys/fcntl.h>
#include <sys/time.h>
#include <sys/consio.h>
#include <sys/fbio.h>
#else  /* USE_BSD_FBDEV */
#include <linux/fb.h>
#endif /* USE_BSD_FBDEV */

/*********************
 *      DEFINES
 *********************/
#ifndef FBDEV_PATH
#define FBDEV_PATH  "/dev/fb0"
#endif

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *      STRUCTURES
 **********************/

struct bsd_fb_var_info{
    uint32_t xoffset;
    uint32_t yoffset;
    uint32_t xres;
    uint32_t yres;
    int bits_per_pixel;
 };

struct bsd_fb_fix_info{
    long int line_length;
    long int smem_len;
};

/**********************
 *  STATIC PROTOTYPES
 **********************/

/**********************
 *  STATIC VARIABLES
 **********************/
#if USE_BSD_FBDEV
static struct bsd_fb_var_info vinfo;
static struct bsd_fb_fix_info finfo;
#else
static struct fb_var_screeninfo vinfo;
static struct fb_fix_screeninfo finfo;
#endif /* USE_BSD_FBDEV */
static char *fbp = 0,*fbpbase = 0;
static long int screensize = 0;
static long int half_screensize = 0;
static int fbfd = 0;

/**********************
 *      MACROS
 **********************/


/**********************
 *   GLOBAL FUNCTIONS
 **********************/

void fbdev_init(void)
{
    // Open the file for reading and writing
    fbfd = open(FBDEV_PATH, O_RDWR);
    if(fbfd == -1) {
        perror("Error: cannot open framebuffer device");
        return;
    }
    LV_LOG_INFO("The framebuffer device was opened successfully");

    // Make sure that the display is on.

#if USE_BSD_FBDEV
    struct fbtype fb;
    unsigned line_length;

    //Get fb type
    if (ioctl(fbfd, FBIOGTYPE, &fb) != 0) {
        perror("ioctl(FBIOGTYPE)");
        return;
    }

    //Get screen width
    if (ioctl(fbfd, FBIO_GETLINEWIDTH, &line_length) != 0) {
        perror("ioctl(FBIO_GETLINEWIDTH)");
        return;
    }

    vinfo.xres = (unsigned) fb.fb_width;
    vinfo.yres = (unsigned) fb.fb_height;
    vinfo.bits_per_pixel = fb.fb_depth + 8;
    vinfo.xoffset = 0;
    vinfo.yoffset = 0;
    finfo.line_length = line_length;
    finfo.smem_len = finfo.line_length * vinfo.yres;
#else /* USE_BSD_FBDEV */

    // Get fixed screen information
    if(ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo) == -1) {
        perror("Error reading fixed information");
        return;
    }

    // Get variable screen information
    if(ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo) == -1) {
        perror("Error reading variable information");
        return;
    }
#endif /* USE_BSD_FBDEV */

    LV_LOG_INFO("%dx%d, %dbpp", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);

    // Figure out the size of the screen in bytes
    screensize =  finfo.smem_len; //finfo.line_length * vinfo.yres;    
    half_screensize = screensize/2;
    // Map the device to memory
    fbp = (char *)mmap(0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);
	fbpbase =  fbp;
    if((intptr_t)fbp == -1) {
        perror("Error: failed to map framebuffer device to memory");
        return;
    }
    memset(fbp, 0, screensize);
    // Don't initialise the memory to retain what's currently displayed / avoid clearing the screen.
    // This is important for applications that only draw to a subsection of the full framebuffer.

    LV_LOG_INFO("The framebuffer device was mapped to memory successfully");

}

void fbdev_exit(void)
{
    close(fbfd);
}

char toggle = 0;
/**
 * Flush a buffer to the marked area
 * @param drv pointer to driver where this function belongs
 * @param area an area where to copy `color_p`
 * @param color_p an array of pixels to copy to the `area` part of the screen
 */
void fbdev_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p)
{
    if(fbp == NULL ||
            area->x2 < 0 ||
            area->y2 < 0 ||
            area->x1 > (int32_t)vinfo.xres - 1 ||
            area->y1 > (int32_t)vinfo.yres - 1) {
        lv_disp_flush_ready(drv);
        return;
    }

	if(toggle == 0)
	{
		toggle = 1;

		vinfo.yoffset = 0;
		fbp =fbpbase;
	}
	else
	{
		toggle = 0;
		vinfo.yoffset = vinfo.yres;	
		fbp =  fbpbase + half_screensize;


	
	}	
	
	
	

    /*Truncate the area to the screen*/
    int32_t act_x1 = area->x1 < 0 ? 0 : area->x1;
    int32_t act_y1 = area->y1 < 0 ? 0 : area->y1;
    int32_t act_x2 = area->x2 > (int32_t)vinfo.xres - 1 ? (int32_t)vinfo.xres - 1 : area->x2;
    int32_t act_y2 = area->y2 > (int32_t)vinfo.yres - 1 ? (int32_t)vinfo.yres - 1 : area->y2;


    lv_coord_t w = (act_x2 - act_x1 + 1);
    long int location = 0;
    long int byte_location = 0;
    unsigned char bit_location = 0;

    /*32 or 24 bit per pixel*/
    if(vinfo.bits_per_pixel == 32 || vinfo.bits_per_pixel == 24) {
        uint32_t * fbp32 = (uint32_t *)fbp;
        int32_t y;
        for(y = act_y1; y <= act_y2; y++) {
            location = (act_x1 ) + (y ) * finfo.line_length / 4;
            memcpy(&fbp32[location], (uint32_t *)color_p, (act_x2 - act_x1 + 1) * 4);
            color_p += w;
        }
    } else {
        /*Not supported bit per pixel*/
    }
    
    if (ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo) < 0) {
        fprintf(stderr, "active fb swap failed\n");
    }
    //May be some direct update command is required
    //ret = ioctl(state->fd, FBIO_UPDATE, (unsigned long)((uintptr_t)rect));

    lv_disp_flush_ready(drv);
}



/**********************
 *   STATIC FUNCTIONS
 **********************/

#endif

楼主,我是在f1c100s上面跑的lvgl8.2,播放gif动图太卡了,所以就试了一下你这样改成双缓冲,改了之后动图就播放不了了(只显示了一张图片就停了),没改fbdev.c之前是可以正常播放的,可能是什么原因呢

#21 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-17 13:46:40

海石生风 说:

@岁月快快快
没遇到过种问题,你的awtk-linux-fb/awtk_config.py配置文件是怎么改的?帖下git diff输出看下。
建议尝试用apt或者从源码重新安装scons。

从源码安装也试了,报一样的错误
sad

#22 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-17 13:06:07

diff --git a/awtk_config.py b/awtk_config.py
index b789e90..e43b4ef 100644
--- a/awtk_config.py
+++ b/awtk_config.py
@@ -103,15 +103,18 @@ OS_FLAGS='-Wall -Os -fno-strict-aliasing '
 #TSLIB_LIB_DIR=joinPath(TK_LINUX_FB_ROOT, '3rd/tslib/src/.libs')
 
 #for prebuild tslib
-TSLIB_LIB_DIR='/opt/28x/tslib/lib'
-TSLIB_INC_DIR='/opt/28x/tslib/include'
-TOOLS_PREFIX='/opt/28x/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-linux-'
+#TSLIB_LIB_DIR='/opt/28x/tslib/lib'
+#TSLIB_INC_DIR='/opt/28x/tslib/include'
+#TOOLS_PREFIX='/opt/28x/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-linux-'
+TSLIB_LIB_DIR=''
+TSLIB_INC_DIR=''
+TOOLS_PREFIX='/usr/local/arm-linux-gcc/bin/arm-linux-gnueabi'
 
 #TOOLS_PREFIX='/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-'
 
 #for qemu
-TOOLS_PREFIX='/opt/qemu/buildroot-2021.02.2/output/host/bin/arm-linux-'
-TSLIB_LIB_DIR=''
+#TOOLS_PREFIX='/opt/qemu/buildroot-2021.02.2/output/host/bin/arm-linux-'
+#TSLIB_LIB_DIR=''
 
 #TSLIB_LIB_DIR=''

按照官方的教程来移植的,apt安装和pip安装scons都试过了,都是报这个错误;https://github.com/zlgopen/awtk-linux-fb/issues/49#  github上面有人说是linux环境的问题,我之前的环境是ubuntu16.04.6,重新装了个deepin20.4,也是报一样的错误

#23 Re: 全志 SOC » builroot工具链问题导致可执行文件运行报错-sh: ./demo: not found » 2022-03-16 16:33:55

就是编译工具链的问题,换成跟buildroot一样的工具链arm-linux-gcc就可以执行了,换成arm-linux-gcc之后编译出错,我是把tslib去掉就不报错了,应该要自己去移植一个tslib,glibc要跟arm-linux-gcc的glibc版本一样

#24 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-15 23:38:21

@海石生风
多谢指点,现在正在移植AWTK到linux上,按照官方的教程编译demo,一直报错:
TypeError: File /home/robert/myProject/aboutLinux/linuxFile/SweepFLoorMachineUseLinux/awtkApp/awtk-linux-fb/bin found where directory expected.:
File "/home/robert/myProject/aboutLinux/linuxFile/SweepFLoorMachineUseLinux/awtkApp/awtk-linux-fb/SConstruct", line 77:
SConscript(SConscriptFiles)
File "/usr/local/lib/python3.7/dist-packages/SCons/Script/SConscript.py", line 660:
return method(*args, **kw)
File "/usr/local/lib/python3.7/dist-packages/SCons/Script/SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "/usr/local/lib/python3.7/dist-packages/SCons/Script/SConscript.py", line 285:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "/home/robert/myProject/aboutLinux/linuxFile/SweepFLoorMachineUseLinux/awtkApp/awtk-linux-fb/build/var/awtk/src/SConscript", line 100:
LIBS=TKC_DEPS_LIBS, LINKFLAGS=TKC_LINKFLAGS)
File "/usr/local/lib/python3.7/dist-packages/SCons/Environment.py", line 238:
return super().call(target, source, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/SCons/Util.py", line 742:
return self.method(*nargs, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/SCons/Builder.py", line 662:
return self._execute(env, target, source, OverrideWarner(kw), ekw)
File "/usr/local/lib/python3.7/dist-packages/SCons/Builder.py", line 568:
tlist, slist = self._create_nodes(env, target, source)
File "/usr/local/lib/python3.7/dist-packages/SCons/Builder.py", line 513:
tlist = env.arg2nodes(target, target_factory, target=target, source=source)
File "/usr/local/lib/python3.7/dist-packages/SCons/Environment.py", line 468:
v = node_factory(self.subst(v, **kw))
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 1435:
return self._lookup(name, directory, File, create)
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 1414:
return root._lookup_abs(p, fsclass, create)
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 2434:
dir_node = self._lookup_abs(dir_name, Dir)
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 2439:
result.diskcheck_match()
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 1646:
"File %s found where directory expected.")
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 389:
return self.func(*args, **kw)
File "/usr/local/lib/python3.7/dist-packages/SCons/Node/FS.py", line 410:
raise TypeError(errorfmt % node.get_abspath())

按照 https://github.com/zlgopen/awtk-linux-fb/issues/49#
去修改,也是报一样的错误

有遇到过这样的错误吗

#25 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-11 19:25:53

@海石生风
lvgl有缓存图片的功能,我打开了感觉也没有什么用,准备试一下移植AWTK看看效果如何

#26 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-10 15:11:33

cube 说:

把那个帧率fps显示打开,看下现在是什么帧率?

fps显示是30-32  cpu占用率百分之九十多,整个gif做的是6秒钟,板子上显示12秒才显示完  翻了一倍.....

#27 Re: 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-10 11:48:22

aozima 说:

要不用硬件jpg?

硬件jpg解码是视频解码吧,直接用播放视频的形式来做感觉不好做成一个控件啊,图片控件可以直接调用lvgl的接口来显示和隐藏

#29 全志 SOC » F1C100s跑rtt+lvgl显示gif图片效果卡顿求助 » 2022-03-09 17:02:21

岁月快快快
回复: 27

如题,用了LVGL的gif库来显示动图,图片大小2.13M,转换成C文件之后13.6M,效果不太好,显示得很缓慢,是哪里没优化好吗,还是说软件解码效果就是这样的?有什么其它的图形库显示gif图片流畅的吗,请大佬们指点一二

#30 Re: 全志 SOC » F1C00S移植xboot 如何修改打印串口? » 2022-03-09 16:26:27

lanlanzhilian 说:

怎么解决的?
记录一下,万一以后又忘了;)

    "uart-16550@0x01c25400": {
        "clock-name": "link-uart1",
        "reset": 85,
        "txd-gpio": 3,
        "txd-gpio-config": 5,
        "rxd-gpio": 2,
        "rxd-gpio-config": 5,
        "baud-rates": 115200,
        "data-bits": 8,
        "parity-bits": 0,
        "stop-bits": 1
    },

txd-gpio rxd-gpio 改成对应的IO口

#31 Re: 全志 SOC » 站在微凉大侠的肩膀上,编写F1C100S平台的CVBS IN驱动, 也就是驱动完全找不到北的TVD模块。 » 2022-02-11 14:12:27

@xboot
大佬,画面的反应速度有点慢,有什么办法提高显示画面的速度吗,还有一个就是调用matrix_scale进行缩放之后,因为进行了浮点运算,
画面显示的速度更慢了(f1c100s好像没有硬浮点)
,除了这个办法还有其它办法把图像扩充到全屏吗;摄像头移动的时候,画面有撕裂线(像波浪一样),是因为没开双缓冲的原因吗

#32 Re: 全志 SOC » f1c100s上跑xboot,移植gt911求助 » 2022-02-10 14:46:52

xboot 说:

参考 cmd-event.c

get,多谢大佬
lol

#33 Re: 全志 SOC » f1c100s上跑xboot,移植gt911求助 » 2022-02-09 19:15:09

@xboot
get,还有个问题,在应用程序中要调哪个接口来读取坐标值呢

#34 全志 SOC » f1c100s上跑xboot,移植gt911求助 » 2022-02-09 18:02:11

岁月快快快
回复: 6

如题,最近在移植gt911的驱动到f1c100s上,跑的xboot;
拷贝xboot主线z11s上的gt911的驱动/src/arch/arm32/mach-z11s/driver/ts-gt911.c 到f1c100s的目录中/src/arch/arm32/mach-f1c100s/driver/
,然后修改设备树文件sast-kk131.json:
加上:

"i2c-f1c100s@0x01c27800": {
	"clock-name": "link-i2c2",
	"clock-frequency": 400000,
	"reset": 82,
	"sda-gpio": 129,
	"sda-gpio-config": 4,
	"scl-gpio": 128,
	"scl-gpio-config": 4
},

"ts-gt911@0": {
	"i2c-bus": "i2c-f1c100s.2",
	"slave-address": 20,
	"interrupt-gpio": 137,
	"interrupt-gpio-config": 6,
	"reset-gpio": 138,
	"reset-gpio-config": 1
},

复位脚和中断脚用的是:PE10和PE9;iic用的是PE0和PE1;
设备树这样改不知道可以了吗?
要不要类似下面这样加上中断的定义?:

"irq-f1c100s-gpio@0x01f02a40": {
	"interrupt-base": 128,
	"interrupt-count": 6,
	"interrupt-parent": 40
},

要加上的话,interrupt-base、interrupt-count、interrupt-parent不知道代表什么含义,中断号吗?

另外不知道怎么在应用程序中读取坐标值,请路过的大神指点一二

#35 Re: 全志 SOC » 用F1C100S开发了一个项目,原始技术实现,裸奔XUI GUI框架 » 2022-01-26 16:04:26

xboot 说:

可以调用这个布局函数
void xui_layout_set_next(struct xui_context_t * ctx, struct region_t * r, int relative);

@xboot,大佬,按照@linghaibin坛友这样写:

static void ShowPage(struct xui_context_t * ctx)
{
    struct xfs_context_t * ctx_xfs;
    struct surface_t * page;

    xui_begin(ctx);
    ctx_xfs = xfs_alloc("/private/framework", 0);
    if(ctx_xfs) {
        page = surface_alloc_from_xfs(ctx_xfs, "assets/images/06.png");
        if (page) {
            xui_image_ex(ctx, page, 0, XUI_IMAGE_CONTAIN);
            surface_free(page);
        }
        xfs_free(ctx_xfs);
    }
    xui_end(ctx);
}

图片没显示出来,显示成了这样:
126.jpg
按照开机logo这样写,是可以正常显示图片的:

static void ShowPage(const char * filename)
{
    struct device_t * pos, * n;
    struct xfs_context_t * ctx;
    struct surface_t * s, * page;
    struct framebuffer_t * fb;
    struct matrix_t m;

    ctx = xfs_alloc("/private/framework", 0);
    if(ctx)
    {
        page = surface_alloc_from_xfs(ctx, filename);
        if(page)
        {
            list_for_each_entry_safe(pos, n, &__device_head[DEVICE_TYPE_FRAMEBUFFER], head)
            {
                if((fb = (struct framebuffer_t *)(pos->priv)))
                {
                    s = framebuffer_create_surface(fb);
                    matrix_init_identity(&m);
                    surface_blit(s, NULL, &m, page, RENDER_TYPE_GOOD);
                    framebuffer_present_surface(fb, s, NULL);
                    framebuffer_destroy_surface(fb, s);
                }
            }
            surface_free(page);
        }
        xfs_free(ctx);
    }
}

第一种方式是我还少了什么步骤吗

#36 Re: 全志 SOC » 用F1C100S开发了一个项目,原始技术实现,裸奔XUI GUI框架 » 2022-01-25 17:35:30

xboot 说:

可以的,什么效果都可以做到,对于在一个控件之上,再绘制一个控件,需要主动调用布局相关函数,不然,会依次向下排列的。

我是想在固定的坐标位置显示时间(或者贴上一张小尺寸的图片覆盖原来显示的图片的某一区域),不传入坐标值的话,布局函数怎么知道要显示在什么地方呢

#37 Re: 全志 SOC » 用F1C100S开发了一个项目,原始技术实现,裸奔XUI GUI框架 » 2022-01-24 14:28:11

调用surface_alloc_from_xfs()显示一张图片,然后在图片的某个地方显示一个可以变化的时间,这样可以做到吗

#40 Re: 全志 SOC » XFEL已支持spi nand flash烧写 » 2022-01-17 16:55:43

HongSang 说:

@岁月快快快
您好 烧写完能启动吗 可以分享下这两个文件吗

sys-copyself.zip

#41 Re: 全志 SOC » XFEL已支持spi nand flash烧写 » 2022-01-17 16:06:38

2048 改成1024,就不进fel下载模式了,但是遇到了个奇怪的问题:

sys-copyself.c:

void test(void)
{
    sys_uart_putc('t');
    sys_uart_putc('e');
    sys_uart_putc('s');
    sys_uart_putc('t');
    sys_uart_putc(' ');
}

...
else if(d == BOOT_DEVICE_SPINAND)
{
	struct zdesc_t * z = (struct zdesc_t *)__heap_start;
	void * mem = (void *)__image_start;
	void * tmp = (void *)z + sizeof(struct zdesc_t);
	uint32_t size = __image_end - __image_start;

        //mprintf("enter BOOT_DEVICE_SPINAND !");
        sys_uart_putc('1');
        sys_uart_putc('6');
        sys_uart_putc('6');
        sys_uart_putc(' ');
        #if 0
	sys_spinand_init();
	sys_spinand_read(1048576 + 65536, z, sizeof(struct zdesc_t));
	sys_spinand_exit();
	if((z->magic[0] == 'Z') && (z->magic[1] == 'B') && (z->magic[2] == 'L') && (z->magic[3] == '!'))
	{
		//if(sys_verify((char *)z->pubkey, (char *)z->sha256, (char *)z->signature))
		{
			uint32_t csize = (z->csize[0] << 24) | (z->csize[1] << 16) | (z->csize[2] << 8) | (z->csize[3] << 0);
			uint32_t dsize = (z->dsize[0] << 24) | (z->dsize[1] << 16) | (z->dsize[2] << 8) | (z->dsize[3] << 0);
			sys_spinand_init();
			sys_spinand_read(1048576 + 65536 + sizeof(struct zdesc_t), tmp, csize);
			sys_spinand_exit();
			//if(sys_hash((char *)(&z->majoy), (sizeof(struct zdesc_t) - 100) + csize, (char *)z->sha256))
			{
				sys_decompress(tmp, csize, mem, dsize);
			}
		}
	}
	else
        #endif
	{
	    //mprintf("enter line180 !");
	    test();
            nandTest();
            sys_uart_putc('1');
            sys_uart_putc('9');
            sys_uart_putc('4');
            sys_uart_putc(' ');
            nandTest();
	    sys_spinand_init();
	    spinand_read(1048576, mem, size);
	    spinand_exit();
	}
}
else if(d == BOOT_DEVICE_SDCARD)
{
}
...

sys-spinand.c:

void nandTest(void)
{

}

sys-copyself.c自拷贝函数中如果调用了sys-spinand.c中的函数就会导致程序像挂掉一样;
测试代码中test()函数之后调用sys-spinand.c中的空函数nandTest(),后面的打印信息“194”就打不出来了,如果不调用nandTest(),就可以正常的打印出
“194”;把测试代码去掉,在sys_spinand_init()函数最开始的地方加上的打印信息,也没有打印出来,所以我推断调了sys-spinand.c中的函数之后程序就挂掉了,没有拷贝成功;
打印信息:
_16424046945692.png

把spi部分的代码全部搬到sys-copyself.c中,就可以正常启动了
lol

不过启动速度有点慢,用了将近5秒才起来,有什么优化办法吗,还是说nand启动就是这么慢的

#42 Re: 全志 SOC » XFEL已支持spi nand flash烧写 » 2022-01-15 11:37:11

修改了sys-copyself.c

/*
 * sys-copyself.c
 *
 * Copyright(c) 2007-2022 Jianjun Jiang <8192542@qq.com>
 * Official site: http://xboot.org
 * Mobile phone: +86-18665388956
 * QQ: 8192542
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

#include <xboot.h>

extern unsigned char __image_start[];
extern unsigned char __image_end[];
extern unsigned char __heap_start[];
extern void return_to_fel(void);
extern void sys_mmu_init(void);
extern void sys_uart_putc(char c);
extern void sys_decompress(char * src, int slen, char * dst, int dlen);
extern int sys_hash(char * buf, int len, char * sha256);
extern int sys_verify(char * public, char * sha256, char * signature);
extern void sys_spinor_init(void);
extern void sys_spinor_exit(void);
extern void sys_spinor_read(int addr, void * buf, int count);
extern void sys_spinand_init(void);
extern void sys_spinand_exit(void);
extern void sys_spinand_read(int addr, void * buf, int count);

struct zdesc_t {			/* Total 256 bytes */
	uint8_t magic[4];		/* ZBL! */
	uint8_t signature[64];	/* Ecdsa256 signature of sha256 */
	uint8_t sha256[32];		/* Sha256 hash */
	uint8_t majoy;			/* Majoy version */
	uint8_t minior;			/* Minior version */
	uint8_t patch;			/* Patch version */
	uint8_t csize[4];		/* Compress size of image */
	uint8_t dsize[4];		/* Decompress size of image */
	uint8_t pubkey[33];		/* Ecdsa256 public key */
	uint8_t message[112];	/* Message additionally */
};

enum {
	BOOT_DEVICE_FEL	= 0,
	BOOT_DEVICE_SPINOR,
	BOOT_DEVICE_SPINAND,
	BOOT_DEVICE_SDCARD,
};

static int get_boot_device(void)
{
	u32_t * t = (void *)0x00000058;

	if(t[0] == 0x3)
		return BOOT_DEVICE_SPINOR;
	else if(t[0] == 0x4)
		return BOOT_DEVICE_SPINAND;
	else if(t[0] == 0x0)
		return BOOT_DEVICE_SDCARD;
	else if(t[0] == 0x1)
		return BOOT_DEVICE_FEL;
	return BOOT_DEVICE_SPINOR;

}

void sys_copyself(void)
{
	int d = get_boot_device();

	if(d == BOOT_DEVICE_FEL)
	{
		sys_uart_putc('B');
		sys_uart_putc('o');
		sys_uart_putc('o');
		sys_uart_putc('t');
		sys_uart_putc(' ');
		sys_uart_putc('t');
		sys_uart_putc('o');
		sys_uart_putc(' ');
		sys_uart_putc('F');
		sys_uart_putc('E');
		sys_uart_putc('L');
		sys_uart_putc(' ');
		sys_uart_putc('m');
		sys_uart_putc('o');
		sys_uart_putc('d');
		sys_uart_putc('e');
		sys_uart_putc('\r');
		sys_uart_putc('\n');
		return_to_fel();
	}
	else if(d == BOOT_DEVICE_SPINOR)
	{
		struct zdesc_t * z = (struct zdesc_t *)__heap_start;
		void * mem = (void *)__image_start;
		void * tmp = (void *)z + sizeof(struct zdesc_t);
		uint32_t size = __image_end - __image_start;

		sys_mmu_init();
		sys_spinor_init();
		sys_spinor_read(24576, z, sizeof(struct zdesc_t));
		sys_spinor_exit();
		if((z->magic[0] == 'Z') && (z->magic[1] == 'B') && (z->magic[2] == 'L') && (z->magic[3] == '!'))
		{
			//if(sys_verify((char *)z->pubkey, (char *)z->sha256, (char *)z->signature))
			{
				uint32_t csize = (z->csize[0] << 24) | (z->csize[1] << 16) | (z->csize[2] << 8) | (z->csize[3] << 0);
				uint32_t dsize = (z->dsize[0] << 24) | (z->dsize[1] << 16) | (z->dsize[2] << 8) | (z->dsize[3] << 0);
				sys_spinor_init();
				sys_spinor_read(24576 + sizeof(struct zdesc_t), tmp, csize);
				sys_spinor_exit();
				//if(sys_hash((char *)(&z->majoy), (sizeof(struct zdesc_t) - 100) + csize, (char *)z->sha256))
				{
					sys_decompress(tmp, csize, mem, dsize);
				}
			}
		}
		else
		{
			sys_spinor_init();
			sys_spinor_read(0, mem, size);
			sys_spinor_exit();
		}
	}
	else if(d == BOOT_DEVICE_SPINAND)
	{
		struct zdesc_t * z = (struct zdesc_t *)__heap_start;
		void * mem = (void *)__image_start;
		void * tmp = (void *)z + sizeof(struct zdesc_t);
		uint32_t size = __image_end - __image_start;

		sys_spinand_init();
		sys_spinand_read(1048576 + 65536, z, sizeof(struct zdesc_t));
		sys_spinand_exit();
		if((z->magic[0] == 'Z') && (z->magic[1] == 'B') && (z->magic[2] == 'L') && (z->magic[3] == '!'))
		{
			//if(sys_verify((char *)z->pubkey, (char *)z->sha256, (char *)z->signature))
			{
				uint32_t csize = (z->csize[0] << 24) | (z->csize[1] << 16) | (z->csize[2] << 8) | (z->csize[3] << 0);
				uint32_t dsize = (z->dsize[0] << 24) | (z->dsize[1] << 16) | (z->dsize[2] << 8) | (z->dsize[3] << 0);
				sys_spinand_init();
				sys_spinand_read(1048576 + 65536 + sizeof(struct zdesc_t), tmp, csize);
				sys_spinand_exit();
				//if(sys_hash((char *)(&z->majoy), (sizeof(struct zdesc_t) - 100) + csize, (char *)z->sha256))
				{
					sys_decompress(tmp, csize, mem, dsize);
				}
			}
		}
		else
		{
			sys_spinand_init();
			sys_spinand_read(1048576, mem, size);
			sys_spinand_exit();
		}
	}
	else if(d == BOOT_DEVICE_SDCARD)
	{
	}
}

修改并加入sys-spinand.c

/*
 * sys-spinand.c
 *
 * Copyright(c) 2007-2022 Jianjun Jiang <8192542@qq.com>
 * Official site: http://xboot.org
 * Mobile phone: +86-18665388956
 * QQ: 8192542
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

#include <xboot.h>

/*
 * Default spi nand page size: 2048(11), 4096(12)
 */
#define SPINAND_PAGE_BITS	(11)
#define SPINAND_PAGE_MASK	((1 << SPINAND_PAGE_BITS) - 1)
#define SPINAND_PAGE_SIZE	(1 << SPINAND_PAGE_BITS)

enum {
	SPI_GCR	= 0x04,
	SPI_TCR	= 0x08,
	SPI_IER	= 0x10,
	SPI_ISR	= 0x14,
	SPI_FCR	= 0x18,
	SPI_FSR	= 0x1c,
	SPI_WCR	= 0x20,
	SPI_CCR	= 0x24,
	SPI_MBC	= 0x30,
	SPI_MTC	= 0x34,
	SPI_BCC	= 0x38,
	SPI_TXD	= 0x200,
	SPI_RXD	= 0x300,
};

void sys_spinand_init(void)
{
	virtual_addr_t addr;
	u32_t val;

	/* Config GPIOC0, GPIOC1, GPIOC2 and GPIOC3 */
	addr = 0x01c20848 + 0x00;
	val = read32(addr);
	val &= ~(0xf << ((0 & 0x7) << 2));
	val |= ((0x2 & 0x7) << ((0 & 0x7) << 2));
	write32(addr, val);

	val = read32(addr);
	val &= ~(0xf << ((1 & 0x7) << 2));
	val |= ((0x2 & 0x7) << ((1 & 0x7) << 2));
	write32(addr, val);

	val = read32(addr);
	val &= ~(0xf << ((2 & 0x7) << 2));
	val |= ((0x2 & 0x7) << ((2 & 0x7) << 2));
	write32(addr, val);

	val = read32(addr);
	val &= ~(0xf << ((3 & 0x7) << 2));
	val |= ((0x2 & 0x7) << ((3 & 0x7) << 2));
	write32(addr, val);

	/* Deassert spi0 reset */
	addr = 0x01c202c0;
	val = read32(addr);
	val |= (1 << 20);
	write32(addr, val);


	/* Open the spi0 bus gate */
	addr = 0x01c20000 + 0x60;
	val = read32(addr);
	val |= (1 << 20);
	write32(addr, val);



	/* Set spi clock rate control register, divided by 4 */
	addr = 0x01c05000;
	write32(addr + SPI_CCR, 0x00001001);

	/* Enable spi0 and do a soft reset */
	addr = 0x01c05000;
	val = read32(addr + SPI_GCR);
	val |= (1 << 31) | (1 << 7) | (1 << 1) | (1 << 0);
	write32(addr + SPI_GCR, val);
	while(read32(addr + SPI_GCR) & (1 << 31));

	val = read32(addr + SPI_TCR);
	val &= ~(0x3 << 0);
	val |= (1 << 6) | (1 << 2);
	write32(addr + SPI_TCR, val);

	val = read32(addr + SPI_FCR);
	val |= (1 << 31) | (1 << 15);
	write32(addr + SPI_FCR, val);
}

void sys_spinand_exit(void)
{
	virtual_addr_t addr = 0x01c05000;
	u32_t val;

	/* Disable the spi0 controller */
	val = read32(addr + SPI_GCR);
	val &= ~((1 << 1) | (1 << 0));
	write32(addr + SPI_GCR, val);
}

static void sys_spi_select(void)
{
	virtual_addr_t addr = 0x01c05000;
	u32_t val;

	val = read32(addr + SPI_TCR);
	val &= ~((0x3 << 4) | (0x1 << 7));
	val |= ((0 & 0x3) << 4) | (0x0 << 7);
	write32(addr + SPI_TCR, val);
}

static void sys_spi_deselect(void)
{
	virtual_addr_t addr = 0x01c05000;
	u32_t val;

	val = read32(addr + SPI_TCR);
	val &= ~((0x3 << 4) | (0x1 << 7));
	val |= ((0 & 0x3) << 4) | (0x1 << 7);
	write32(addr + SPI_TCR, val);
}

static void sys_spi_write_txbuf(u8_t * buf, int len)
{
	virtual_addr_t addr = 0x01c05000;
	int i;

	write32(addr + SPI_MTC, len & 0xffffff);
	write32(addr + SPI_BCC, len & 0xffffff);
	if(buf)
	{
		for(i = 0; i < len; i++)
			write8(addr + SPI_TXD, *buf++);
	}
	else
	{
		for(i = 0; i < len; i++)
			write8(addr + SPI_TXD, 0xff);
	}
}

static int sys_spi_transfer(void * txbuf, void * rxbuf, int len)
{
	virtual_addr_t addr = 0x01c05000;
	int count = len;
	u8_t * tx = txbuf;
	u8_t * rx = rxbuf;
	u8_t val;
	int n, i;

	while(count > 0)
	{
		n = (count <= 64) ? count : 64;
		write32(addr + SPI_MBC, n);
		sys_spi_write_txbuf(tx, n);
		write32(addr + SPI_TCR, read32(addr + SPI_TCR) | (1 << 31));

		while((read32(addr + SPI_FSR) & 0xff) < n);
		for(i = 0; i < n; i++)
		{
			val = read8(addr + SPI_RXD);
			if(rx)
				*rx++ = val;
		}

		if(tx)
			tx += n;
		count -= n;
	}
	return len;
}

static int sys_spi_write_then_read(void * txbuf, int txlen, void * rxbuf, int rxlen)
{
	if(sys_spi_transfer(txbuf, NULL, txlen) != txlen)
		return -1;
	if(sys_spi_transfer(NULL, rxbuf, rxlen) != rxlen)
		return -1;
	return 0;
}

static void sys_spinand_wait(void)
{
	u8_t tx[2];
	u8_t rx[1];

	tx[0] = 0x0f;
	tx[1] = 0xc0;
	do {
		sys_spi_select();
		sys_spi_write_then_read(tx, 2, rx, 1);
		sys_spi_deselect();
	} while((rx[0] & 0x1) == 0x1);
}

void sys_spinand_read(int addr, void * buf, int count)
{
	u8_t tx[4];
	u32_t pa, ca;
	int n;

	while(count > 0)
	{
		pa = addr >> SPINAND_PAGE_BITS;
		ca = addr & SPINAND_PAGE_MASK;
		n = count > (SPINAND_PAGE_SIZE - ca) ? (SPINAND_PAGE_SIZE - ca) : count;
		tx[0] = 0x13;
		tx[1] = (u8_t)(pa >> 16);
		tx[2] = (u8_t)(pa >> 8);
		tx[3] = (u8_t)(pa >> 0);
		sys_spi_select();
		sys_spi_write_then_read(tx, 4, 0, 0);
		sys_spi_deselect();
		sys_spinand_wait();
		tx[0] = 0x03;
		tx[1] = (u8_t)(ca >> 8);
		tx[2] = (u8_t)(ca >> 0);
		tx[3] = 0x0;
		sys_spi_select();
		sys_spi_write_then_read(tx, 4, buf, n);
		sys_spi_deselect();
		sys_spinand_wait();
		addr += n;
		buf += n;
		count -= n;
	}
}

还是起不来,start.S也要改么,还是漏掉了哪个文件没修改
mad

#43 Re: 全志 SOC » XFEL已支持spi nand flash烧写 » 2022-01-14 20:27:45

f1c100s目录里面没有sys-spinand.c,感觉可能跟这个有关,加上去再试一下
_20220114202506.png

#44 Re: 全志 SOC » XFEL已支持spi nand flash烧写 » 2022-01-14 17:17:29

编译bin文件出来的log提示:The bootloader head has been fixed, spl size is 16384 bytes, 我把split-size改成16384也还是不行:
sudo xfel spinand splwrite 16384 1048576 xboot.bin

#45 Re: 全志 SOC » XFEL已支持spi nand flash烧写 » 2022-01-14 17:14:40

@xboot
大佬,用sudo xfel spinand write 0 xboot.bin命令和sudo xfel spinand splwrite 2048 1048576 xboot.bin烧程序进nand flash,
烧成功了,但是都没有启动起来,都是直接进了fel下载模式,用sunxi-fel -p spiflash-write 0 xboot.bin命令也是一样的;用xfel spinand命令也检测到了nand flash的型号和容量,读bin数据出来对比也是完全一样,是还有哪里没操作对吗?
用的nand是华邦的W25N01GV,soc是f1c100s;

#47 Re: 全志 SOC » 站在微凉大侠的肩膀上,编写F1C100S平台的CVBS IN驱动, 也就是驱动完全找不到北的TVD模块。 » 2022-01-08 16:16:40

@xboot
大佬,调不了显示分辨率的吗,我的LCD是800*600的,显示出来的效果不全,看你的效果也是两边没显示全
_20220106174627.jpg

把初始化函数f1c100s_tvd_init中的width改成800,height改成600:

struct cam_f1c100s_tvd_pdata_t {
	virtual_addr_t virt;
	char * clk;
	int irq;
	int reset;
	int channel;

	//unsigned char yc[720 * 576 * 2];
	unsigned char yc[800 * 600 * 2];
	enum video_format_t fmt;
	int width;
	int height;
	int buflen;
	int ready;
};

...... 
	s = f1c100s_tvd_get_source(pdat);
	if(s == TVD_SOURCE_NTSC)
	{
		pdat->fmt = VIDEO_FORMAT_NV12;
		pdat->width = 720;
		pdat->height = 480;
		pdat->buflen = pdat->width * pdat->height * 2;
		pdat->ready = 0;
		f1c100s_tvd_config(pdat, s, TVD_PL_YUV420);
		f1c100s_tvd_set_fmt(pdat, TVD_PL_YUV420);
		f1c100s_tvd_set_addr(pdat, &pdat->yc[0], &pdat->yc[pdat->width * pdat->height]);
	}
	else if(s == TVD_SOURCE_PAL)
	{
		pdat->fmt = VIDEO_FORMAT_NV12;
		//pdat->width = 720;
		//pdat->height = 576;
		pdat->width = 800;
		pdat->height = 600;
		pdat->buflen = pdat->width * pdat->height * 2;
		pdat->ready = 0;
		f1c100s_tvd_config(pdat, s, TVD_PL_YUV420);
		f1c100s_tvd_set_fmt(pdat, TVD_PL_YUV420);
		f1c100s_tvd_set_addr(pdat, &pdat->yc[0], &pdat->yc[pdat->width * pdat->height]);
	}
	f1c100s_tvd_set_blue(pdat, 2);
	f1c100s_tvd_capture_off(pdat);
	f1c100s_tvd_irq_clear(pdat);
	f1c100s_tvd_irq_disable(pdat);

显示就不正常了:
_20220108160538.jpg

把draw_preview函数里面的width和height改成800和600:
    pdat->s->width = 800;
    pdat->s->height = 600;
    matrix_init_translate(&m, (surface_get_width(s) - surface_get_width(pdat->s)) / 2, (surface_get_height(s) - surface_get_height(pdat->s)) / 2);
    surface_blit(s, NULL, &m, pdat->s, RENDER_TYPE_GOOD);
显示效果只是移了一下位置
_20220108160519.jpg

#49 Re: 全志 SOC » 站在微凉大侠的肩膀上,编写F1C100S平台的CVBS IN驱动, 也就是驱动完全找不到北的TVD模块。 » 2022-01-07 14:46:39

@xboot
大佬,调饱和度和对比度对应的寄存器是哪两个,找了很久都没找到资料

#51 全志 SOC » F1C00S移植xboot 如何修改打印串口? » 2022-01-06 14:54:47

岁月快快快
回复: 3

用@xboot大佬的代码 https://whycan.com/t_6902.html ,想测试一下摄像头,编译出来的xboot.bin(工具链用的是gcc-arm-10.2-2020.11-x86_64-arm-none-eabi)烧进RAM进行测试,默认的打印串口应该是串口0,我板子上的是串口1,不知道到怎么把调试串口改成串口1,试着把设备树sast-kk131.json里面的   
"console-uart@0": {
        "uart-bus": "uart-16550.0"
}
改成
"console-uart@0": {
    "uart-bus": "uart-16550.1"
}
_20220106145038.png
串口还是没有输出,有知道怎么改的大佬吗

#52 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2021-12-31 17:22:16

换了个5.2版本的内核,有fb0了,但是在u-boot的bootargs参数里面 加上console=tty0 或者 console=fb0
,屏幕都没有输出串口信息,用cat /dev/urandom > /dev/fb0这个命令,屏幕也没有花屏;

启动log里面有很多drm相关的信息

U-Boot SPL 2018.01-05679-g013ca45-dirty (Dec 31 2021 - 17:05:20)
DRAM: 32 MiB
Trying to boot from MMC1


U-Boot 2018.01-05679-g013ca45-dirty (Dec 31 2021 - 17:05:20 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25400
Out:   serial@1c25400
Err:   serial@1c25400
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
3121136 bytes read in 165 ms (18 MiB/s)
reading suniv-f1c100s-licheepi-nano.dtb
8653 bytes read in 27 ms (312.5 KiB/s)
## Flattened Device Tree blob at 80c08000
   Booting using the fdt blob at 0x80c08000
   Loading Device Tree to 816fa000, end 816ff1cc ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.0-licheepi-nano (root@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #1 Fri Dec 31 16:23:23 CST 2021
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 8192
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=fb0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 drm.debug=0x1f debug earlyprintk rw
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 23752K/32768K available (5120K kernel code, 209K rwdata, 1304K rodata, 1024K init, 221K bss, 9016K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x254/0x42c with crng_init=0
[    0.000048] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000126] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000669] Console: colour dummy device 80x30
[    0.000762] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070245] pid_max: default: 32768 minimum: 301
[    0.070673] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070713] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072334] CPU: Testing write buffer coherency: ok
[    0.074322] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076550] devtmpfs: initialized
[    0.083393] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083455] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.083751] pinctrl core: initialized pinctrl subsystem
[    0.086595] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.088571] cpuidle: using governor menu
[    0.140774] SCSI subsystem initialized
[    0.141192] usbcore: registered new interface driver usbfs
[    0.141333] usbcore: registered new interface driver hub
[    0.141498] usbcore: registered new device driver usb
[    0.141949] pps_core: LinuxPPS API ver. 1 registered
[    0.141971] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.142477] Advanced Linux Sound Architecture Driver Initialized.
[    0.142963] clocksource: Switched to clocksource timer
[    0.172492] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.174601] Initialise system trusted keyrings
[    0.175144] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.192944] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.200465] Key type asymmetric registered
[    0.200505] Asymmetric key parser 'x509' registered
[    0.200665] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.200689] io scheduler mq-deadline registered
[    0.200705] io scheduler kyber registered
[    0.213136] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.393762] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.399311] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[    0.421211] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 24, base_baud = 6250000) is a 16550A
[    0.422311] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.444381] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 25, base_baud = 6250000) is a 16550A
[    0.813286] printk: console [ttyS1] enabled
[    0.819262] [drm:drm_core_init] Initialized
[    0.824044] [drm:sun4i_drv_probe] Adding component /soc/display-backend@1e60000
[    0.831519] [drm:sun4i_drv_probe] Adding component /soc/lcd-controller@1c0c000
[    0.838962] [drm:sun4i_drv_traverse_endpoints] Endpoint is our panel... skipping
[    0.848231] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    0.860888] [drm:compare_of] Comparing of node /soc/display-backend@1e60000 with /soc/display-backend@1e60000
[    0.870955] [drm:compare_of] Comparing of node /soc/display-backend@1e60000 with /soc/lcd-controller@1c0c000
[    0.887079] SCSI Media Changer driver v0.25
[    0.892714] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.905617] m25p80 spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    0.912830] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.919484] ehci-platform: EHCI generic platform driver
[    0.925072] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.931303] ohci-platform: OHCI generic platform driver
[    0.937080] usbcore: registered new interface driver usb-storage
[    0.943865] udc-core: couldn't find an available UDC - added [zero] to list of pending drivers
[    0.952737] i2c /dev entries driver
[    0.959904] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.997857] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.007126] usbcore: registered new interface driver usbhid
[    1.012701] usbhid: USB HID core driver
[    1.034735] Loading compiled-in X.509 certificates
[    1.049171] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[    1.060175] [drm:compare_of] Comparing of node /soc/display-backend@1e60000 with /soc/lcd-controller@1c0c000
[    1.070140] [drm:compare_of] Comparing of node /soc/lcd-controller@1c0c000 with /soc/lcd-controller@1c0c000
[    1.080461] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[    1.091262] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0637c54)
[    1.100335] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc06368ac)
[    1.108122] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.114781] [drm] No driver support for vblank timestamp query.
[    1.120748] [drm:drm_minor_register]
[    1.124476] [drm:drm_minor_register]
[    1.128975] [drm:drm_minor_register] new minor registered 0
[    1.135074] [drm:drm_sysfs_connector_add] adding "Unknown-1" to sysfs
[    1.141520] [drm:drm_sysfs_hotplug_event] generating hotplug event
[    1.147993] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.155885] [drm:drm_mode_object_get] OBJ ID: 48 (2)
[    1.160884] [drm:drm_setup_crtcs]
[    1.164406] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:48:Unknown-1]
[    1.171983] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:48:Unknown-1] status updated from unknown to connected
[    1.183223] [drm:sun4i_rgb_mode_valid] Validating modes...
[    1.188711] [drm:sun4i_rgb_mode_valid] Horizontal parameters OK
[    1.194704] [drm:sun4i_rgb_mode_valid] Vertical parameters OK
[    1.200451] [drm:sun4i_rgb_mode_valid] RGB panel used, skipping clock rate checks
[    1.200470] [drm:sun4i_rgb_mode_valid] Clock rate OK
[    1.213266] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:48:Unknown-1] probed modes :
[    1.222156] [drm:drm_mode_debug_printmodeline] Modeline "800x600": 60 40000 800 840 1056 1184 600 610 645 647 0x48 0x0
[    1.232929] [drm:drm_setup_crtcs] connector 48 enabled? yes
[    1.238582] [drm:drm_setup_crtcs] Not using firmware configuration
[    1.244826] [drm:drm_setup_crtcs] looking for cmdline mode on connector 48
[    1.251696] [drm:drm_setup_crtcs] looking for preferred mode on connector 48 0
[    1.258959] [drm:drm_setup_crtcs] found mode 800x600
[    1.263970] [drm:drm_setup_crtcs] picking CRTCs for 8192x8192 config
[    1.270344] [drm:drm_setup_crtcs] desired mode 800x600 set on crtc 46 (0,0)
[    1.277371] [drm:drm_mode_object_get] OBJ ID: 48 (2)
[    1.282355] [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane
[    1.290252] [drm:drm_fb_helper_generic_probe] surface width(800), height(600) and bpp(32)
[    1.304800] [drm:drm_mode_addfb2] [FB:49]
[    1.308860] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (2)
[    1.315572] [drm:drm_sysfs_hotplug_event] generating hotplug event
[    1.323181] [drm:drm_atomic_state_init] Allocated atomic state (ptrval)
[    1.323228] [drm:drm_atomic_get_plane_state] Added [PLANE:30:plane-0] (ptrval) state to (ptrval)
[    1.323255] [drm:drm_atomic_get_plane_state] Added [PLANE:34:plane-1] (ptrval) state to (ptrval)
[    1.323358] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:34:plane-1] state (ptrval)
[    1.323389] [drm:drm_atomic_get_plane_state] Added [PLANE:38:plane-2] (ptrval) state to (ptrval)
[    1.323413] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:38:plane-2] state (ptrval)
[    1.323437] [drm:drm_atomic_get_plane_state] Added [PLANE:42:plane-3] (ptrval) state to (ptrval)
[    1.323459] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:42:plane-3] state (ptrval)
[    1.323493] [drm:drm_atomic_get_crtc_state] Added [CRTC:46:crtc-0] (ptrval) state to (ptrval)
[    1.323549] [drm:drm_atomic_set_mode_for_crtc] Set [MODE:800x600] for [CRTC:46:crtc-0] state (ptrval)
[    1.323580] [drm:drm_atomic_set_crtc_for_plane] Link [PLANE:30:plane-0] state (ptrval) to [CRTC:46:crtc-0]
[    1.323607] [drm:drm_atomic_set_fb_for_plane] Set [FB:49] for [PLANE:30:plane-0] state (ptrval)
[    1.323642] [drm:drm_mode_object_get] OBJ ID: 49 (1)
[    1.323674] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:46:crtc-0] to (ptrval)
[    1.323716] [drm:drm_mode_object_get] OBJ ID: 48 (3)
[    1.323738] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:48:Unknown-1] (ptrval) state to (ptrval)
[    1.323758] [drm:drm_mode_object_get] OBJ ID: 48 (4)
[    1.323787] [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:48:Unknown-1] state (ptrval) to [CRTC:46:crtc-0]
[    1.323805] [drm:drm_atomic_check_only] checking (ptrval)
[    1.323842] [drm:drm_atomic_helper_check_modeset] [CRTC:46:crtc-0] mode changed
[    1.323859] [drm:drm_atomic_helper_check_modeset] [CRTC:46:crtc-0] enable changed
[    1.323874] [drm:drm_atomic_helper_check_modeset] [CRTC:46:crtc-0] active changed
[    1.323903] [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:48:Unknown-1]
[    1.323931] [drm:drm_atomic_helper_check_modeset] [CONNECTOR:48:Unknown-1] using [ENCODER:47:None-47] on [CRTC:46:crtc-0]
[    1.323952] [drm:drm_atomic_helper_check_modeset] [CRTC:46:crtc-0] needs all connectors, enable: y, active: y
[    1.323974] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:46:crtc-0] to (ptrval)
[    1.323996] [drm:drm_atomic_add_affected_planes] Adding all current planes for [CRTC:46:crtc-0] to (ptrval)
[    1.324032] [drm:sun4i_rgb_mode_valid] Validating modes...
[    1.324051] [drm:sun4i_rgb_mode_valid] Horizontal parameters OK
[    1.324069] [drm:sun4i_rgb_mode_valid] Vertical parameters OK
[    1.324087] [drm:sun4i_rgb_mode_valid] RGB panel used, skipping clock rate checks
[    1.324106] [drm:sun4i_rgb_mode_valid] Clock rate OK
[    1.324152] [drm:drm_atomic_normalize_zpos] [CRTC:46:crtc-0] calculating normalized zpos values
[    1.324183] [drm:drm_atomic_normalize_zpos] [PLANE:30:plane-0] processing zpos value 0
[    1.324207] [drm:drm_atomic_normalize_zpos] [PLANE:30:plane-0] normalized zpos value 0
[    1.324232] [drm:sun4i_backend_atomic_check] Starting checking our planes
[    1.324270] [drm:sun4i_backend_plane_uses_scaler] Input size 800x600, output size 800x600
[    1.324299] [drm:sun4i_backend_atomic_check] Plane FB format is XR24 little-endian (0x34325258)
[    1.324313] [drm:sun4i_backend_atomic_check] Plane zpos is 0
[    1.324334] [drm:sun4i_backend_atomic_check] State valid with 1 planes, 0 alpha, 0 video, 0 YUV
[    1.324353] [drm:drm_atomic_commit] committing (ptrval)
[    1.324425] [drm:drm_calc_timestamping_constants] crtc 46: hwmode: htotal 1184, vtotal 647, vdisplay 600
[    1.324448] [drm:drm_calc_timestamping_constants] crtc 46: clock 40000 kHz framedur 19151200 linedur 29600
[    1.324467] [drm:drm_atomic_helper_commit_modeset_disables] modeset on [CRTC:46:crtc-0]
[    1.328769] [drm:sun4i_tcon_get_clk_delay] TCON 0 clock delay 30
[    1.328857] [drm:sun4i_tcon_mode_set] Setting horizontal total 1184, backporch 344
[    1.328884] [drm:sun4i_tcon_mode_set] Setting vertical total 647, backporch 37
[    1.328907] [drm:sun4i_tcon_mode_set] Setting HSYNC 216, VSYNC 35
[    1.328939] [drm:sun4i_tcon_set_mux.constprop.5] Muxing encoder None-47 to CRTC crtc-0: -524
[    1.328963] [drm:drm_atomic_helper_commit_modeset_disables] modeset on [ENCODER:47:None-47]
[    1.328984] [drm:drm_atomic_helper_commit_modeset_enables] enabling [CRTC:46:crtc-0]
[    1.329003] [drm:sun4i_crtc_atomic_enable] Enabling the CRTC
[    1.329058] [drm:drm_atomic_helper_commit_modeset_enables] enabling [ENCODER:47:None-47]
[    1.329080] [drm:sun4i_rgb_encoder_enable] Enabling RGB output
[    1.329132] [drm:sun4i_crtc_enable_vblank] Enabling VBLANK on crtc (ptrval)
[    1.329153] [drm:sun4i_tcon_enable_vblank] Enabling VBLANK interrupt
[    1.329177] [drm:drm_vblank_enable] enabling vblank on crtc 0, ret: 0
[    1.329220] [drm:sun4i_backend_update_layer_formats] Switching display backend interlaced mode off
[    1.329245] [drm:sun4i_backend_update_layer_buffer] Layer line width: 25600 bits
[    1.329270] [drm:sun4i_backend_update_layer_buffer] Setting buffer address to 0x00c00000
[    1.329286] [drm:sun4i_backend_update_layer_buffer] Setting address lower bits to 0x6000000
[    1.329302] [drm:sun4i_backend_update_layer_buffer] Setting address high bits to 0x0
[    1.329319] [drm:sun4i_backend_update_layer_coord] Updating layer 0
[    1.329337] [drm:sun4i_backend_update_layer_coord] Primary layer, updating global size W: 800 H: 600
[    1.329353] [drm:sun4i_backend_update_layer_coord] Layer size W: 800 H: 600
[    1.329369] [drm:sun4i_backend_update_layer_coord] Layer coordinates X: 0 Y: 0
[    1.329388] [drm:sun4i_backend_update_layer_zpos] Setting layer 0's priority to 0 and pipe 0
[    1.329404] [drm:sun4i_backend_layer_enable] Enabling layer 0
[    1.329432] [drm:sun4i_crtc_atomic_flush] Committing plane changes
[    1.329455] [drm:sun4i_backend_commit] Committing changes
[    1.348346] [drm:drm_atomic_state_default_clear] Clearing atomic state (ptrval)
[    1.348404] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (5)
[    1.348440] [drm:__drm_atomic_state_free] Freeing atomic state (ptrval)
[    1.348762] [drm:drm_atomic_state_init] Allocated atomic state (ptrval)
[    1.348809] [drm:drm_mode_object_get] OBJ ID: 49 (2)
[    1.348834] [drm:drm_atomic_get_plane_state] Added [PLANE:30:plane-0] (ptrval) state to (ptrval)
[    1.348864] [drm:drm_mode_object_get] OBJ ID: 50 (1)
[    1.348886] [drm:drm_atomic_get_crtc_state] Added [CRTC:46:crtc-0] (ptrval) state to (ptrval)
[    1.348911] [drm:drm_atomic_get_plane_state] Added [PLANE:34:plane-1] (ptrval) state to (ptrval)
[    1.348946] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:34:plane-1] state (ptrval)
[    1.348980] [drm:drm_atomic_get_plane_state] Added [PLANE:38:plane-2] (ptrval) state to (ptrval)
[    1.349005] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:38:plane-2] state (ptrval)
[    1.349029] [drm:drm_atomic_get_plane_state] Added [PLANE:42:plane-3] (ptrval) state to (ptrval)
[    1.349049] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:42:plane-3] state (ptrval)
[    1.349095] [drm:drm_atomic_set_fb_for_plane] Set [FB:49] for [PLANE:30:plane-0] state (ptrval)
[    1.349118] [drm:drm_mode_object_get] OBJ ID: 49 (3)
[    1.349139] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (4)
[    1.349166] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:46:crtc-0] to (ptrval)
[    1.349201] [drm:drm_mode_object_get] OBJ ID: 48 (5)
[    1.349219] [drm:drm_mode_object_get] OBJ ID: 48 (6)
[    1.349240] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:48:Unknown-1] (ptrval) state to (ptrval)
[    1.349262] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (6)
[    1.349287] [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:48:Unknown-1] state (ptrval) to [NOCRTC]
[    1.349308] [drm:drm_mode_object_get] OBJ ID: 48 (5)
[    1.349334] [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:48:Unknown-1] state (ptrval) to [CRTC:46:crtc-0]
[    1.349350] [drm:drm_atomic_check_only] checking (ptrval)
[    1.349405] [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:48:Unknown-1]
[    1.349437] [drm:drm_atomic_helper_check_modeset] [CONNECTOR:48:Unknown-1] keeps [ENCODER:47:None-47], now on [CRTC:46:crtc-0]
[    1.349475] [drm:sun4i_backend_atomic_check] Starting checking our planes
[    1.349522] [drm:sun4i_backend_plane_uses_scaler] Input size 800x600, output size 800x600
[    1.349553] [drm:sun4i_backend_atomic_check] Plane FB format is XR24 little-endian (0x34325258)
[    1.349568] [drm:sun4i_backend_atomic_check] Plane zpos is 0
[    1.349591] [drm:sun4i_backend_atomic_check] State valid with 1 planes, 0 alpha, 0 video, 0 YUV
[    1.349611] [drm:drm_atomic_commit] committing (ptrval)
[    1.349698] [drm:drm_calc_timestamping_constants] crtc 46: hwmode: htotal 1184, vtotal 647, vdisplay 600
[    1.349724] [drm:drm_calc_timestamping_constants] crtc 46: clock 40000 kHz framedur 19151200 linedur 29600
[    1.349779] [drm:sun4i_backend_update_layer_formats] Switching display backend interlaced mode off
[    1.349806] [drm:sun4i_backend_update_layer_buffer] Layer line width: 25600 bits
[    1.349833] [drm:sun4i_backend_update_layer_buffer] Setting buffer address to 0x00c00000
[    1.349849] [drm:sun4i_backend_update_layer_buffer] Setting address lower bits to 0x6000000
[    1.349865] [drm:sun4i_backend_update_layer_buffer] Setting address high bits to 0x0
[    1.349883] [drm:sun4i_backend_update_layer_coord] Updating layer 0
[    1.349900] [drm:sun4i_backend_update_layer_coord] Primary layer, updating global size W: 800 H: 600
[    1.349918] [drm:sun4i_backend_update_layer_coord] Layer size W: 800 H: 600
[    1.349935] [drm:sun4i_backend_update_layer_coord] Layer coordinates X: 0 Y: 0
[    1.349954] [drm:sun4i_backend_update_layer_zpos] Setting layer 0's priority to 0 and pipe 0
[    1.349972] [drm:sun4i_backend_layer_enable] Enabling layer 0
[    1.350001] [drm:sun4i_crtc_atomic_flush] Committing plane changes
[    1.350025] [drm:sun4i_backend_commit] Committing changes
[    1.355161] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.357017] mmc0: Problem switching card into high-speed mode!
[    1.357470] mmc0: new SDHC card at address 0001
[    1.362622] mmcblk0: mmc0:0001 SD16G 7.44 GiB
[    1.366127]  mmcblk0: p1 p2
[    1.367798] [drm:drm_atomic_state_default_clear] Clearing atomic state (ptrval)
[    1.367852] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (6)
[    1.367882] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (5)
[    1.367905] [drm:drm_mode_object_put.part.0] OBJ ID: 50 (2)
[    1.367929] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (3)
[    1.367958] [drm:__drm_atomic_state_free] Freeing atomic state (ptrval)
[    1.395802] Console: switching to colour frame buffer device 100x37
[    1.395959] [drm:drm_atomic_state_init] Allocated atomic state (ptrval)
[    1.396020] [drm:drm_mode_object_get] OBJ ID: 49 (2)
[    1.396046] [drm:drm_atomic_get_plane_state] Added [PLANE:30:plane-0] (ptrval) state to (ptrval)
[    1.396081] [drm:drm_mode_object_get] OBJ ID: 50 (1)
[    1.396104] [drm:drm_atomic_get_crtc_state] Added [CRTC:46:crtc-0] (ptrval) state to (ptrval)
[    1.396131] [drm:drm_atomic_get_plane_state] Added [PLANE:34:plane-1] (ptrval) state to (ptrval)
[    1.396169] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:34:plane-1] state (ptrval)
[    1.396199] [drm:drm_atomic_get_plane_state] Added [PLANE:38:plane-2] (ptrval) state to (ptrval)
[    1.396223] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:38:plane-2] state (ptrval)
[    1.396249] [drm:drm_atomic_get_plane_state] Added [PLANE:42:plane-3] (ptrval) state to (ptrval)
[    1.396271] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:42:plane-3] state (ptrval)
[    1.396314] [drm:drm_atomic_set_fb_for_plane] Set [FB:49] for [PLANE:30:plane-0] state (ptrval)
[    1.396341] [drm:drm_mode_object_get] OBJ ID: 49 (3)
[    1.396362] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (4)
[    1.396392] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:46:crtc-0] to (ptrval)
[    1.396430] [drm:drm_mode_object_get] OBJ ID: 48 (5)
[    1.396448] [drm:drm_mode_object_get] OBJ ID: 48 (6)
[    1.396468] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:48:Unknown-1] (ptrval) state to (ptrval)
[    1.396492] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (6)
[    1.396517] [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:48:Unknown-1] state (ptrval) to [NOCRTC]
[    1.396539] [drm:drm_mode_object_get] OBJ ID: 48 (5)
[    1.396564] [drm:drm_atomic_set_crtc_for_connector] Link [CONNECTOR:48:Unknown-1] state (ptrval) to [CRTC:46:crtc-0]
[    1.396582] [drm:drm_atomic_check_only] checking (ptrval)
[    1.396642] [drm:drm_atomic_helper_check_modeset] Updating routing for [CONNECTOR:48:Unknown-1]
[    1.396675] [drm:drm_atomic_helper_check_modeset] [CONNECTOR:48:Unknown-1] keeps [ENCODER:47:None-47], now on [CRTC:46:crtc-0]
[    1.396721] [drm:sun4i_backend_atomic_check] Starting checking our planes
[    1.396772] [drm:sun4i_backend_plane_uses_scaler] Input size 800x600, output size 800x600
[    1.396803] [drm:sun4i_backend_atomic_check] Plane FB format is XR24 little-endian (0x34325258)
[    1.396817] [drm:sun4i_backend_atomic_check] Plane zpos is 0
[    1.396839] [drm:sun4i_backend_atomic_check] State valid with 1 planes, 0 alpha, 0 video, 0 YUV
[    1.396857] [drm:drm_atomic_commit] committing (ptrval)
[    1.396944] [drm:drm_calc_timestamping_constants] crtc 46: hwmode: htotal 1184, vtotal 647, vdisplay 600
[    1.396967] [drm:drm_calc_timestamping_constants] crtc 46: clock 40000 kHz framedur 19151200 linedur 29600
[    1.397025] [drm:sun4i_backend_update_layer_formats] Switching display backend interlaced mode off
[    1.397050] [drm:sun4i_backend_update_layer_buffer] Layer line width: 25600 bits
[    1.397076] [drm:sun4i_backend_update_layer_buffer] Setting buffer address to 0x00c00000
[    1.397091] [drm:sun4i_backend_update_layer_buffer] Setting address lower bits to 0x6000000
[    1.397107] [drm:sun4i_backend_update_layer_buffer] Setting address high bits to 0x0
[    1.397126] [drm:sun4i_backend_update_layer_coord] Updating layer 0
[    1.397144] [drm:sun4i_backend_update_layer_coord] Primary layer, updating global size W: 800 H: 600
[    1.397161] [drm:sun4i_backend_update_layer_coord] Layer size W: 800 H: 600
[    1.397178] [drm:sun4i_backend_update_layer_coord] Layer coordinates X: 0 Y: 0
[    1.397198] [drm:sun4i_backend_update_layer_zpos] Setting layer 0's priority to 0 and pipe 0
[    1.397215] [drm:sun4i_backend_layer_enable] Enabling layer 0
[    1.397245] [drm:sun4i_crtc_atomic_flush] Committing plane changes
[    1.397268] [drm:sun4i_backend_commit] Committing changes
[    1.405860] [drm:drm_atomic_state_default_clear] Clearing atomic state (ptrval)
[    1.405914] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (6)
[    1.405944] [drm:drm_mode_object_put.part.0] OBJ ID: 48 (5)
[    1.405968] [drm:drm_mode_object_put.part.0] OBJ ID: 50 (2)
[    1.405991] [drm:drm_mode_object_put.part.0] OBJ ID: 49 (3)
[    1.406020] [drm:__drm_atomic_state_free] Freeing atomic state (ptrval)
[    1.884689] random: fast init done
[    2.798510] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[    2.806602] vcc3v0: disabling
[    2.809601] vcc5v0: disabling
[    2.812568] ALSA device list:
[    2.815672]   #0: Loopback 1
[    2.906677] EXT4-fs (mmcblk0p2): recovery complete
[    2.914520] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.922837] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.932099] devtmpfs: mounted
[    2.941201] Freeing unused kernel memory: 1024K
[    2.945957] Run /sbin/init as init process
[    3.115649] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: [    3.623308] random: dd: uninitialized urandom read (512 bytes read)
OK
Starting network: ip: socket: Function not implemented
ip: socket: Function not implemented
FAIL

Welcome to Buildroot
buildroot login: root[    6.483045] [drm:vblank_disable_fn] disabling vblank on crtc 0
[    6.488934] [drm:sun4i_crtc_disable_vblank] Disabling VBLANK on crtc (ptrval)
[    6.496073] [drm:sun4i_tcon_enable_vblank] Disabling VBLANK interrupt

Password:
Jan  1 00:00:10 login[119]: root login on 'console'
[root@buildroot: ~]$cat /dev/urandom > /dev/fb0
[   15.583902] random: cat: uninitialized urandom read (4096 bytes read)
[   15.590873] random: cat: uninitialized urandom read (4096 bytes read)
[   15.598721] random: cat: uninitialized urandom read (4096 bytes read)
cat: write error: No space left on device
[root@buildroot: ~]$

#53 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2021-12-31 10:55:42

https://whycan.com/t_2896.html   _20211231105147.png按照晕哥说的,检查 panel 节点和驱动都没问题,在uboot的 bootargs 中加入 drm.debug=0x1f debug,还是没有打印drm相关的信息

启动后的log:

U-Boot 2018.01-05679-g013ca45-dirty (Dec 31 2021 - 10:41:49 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25400
Out:   serial@1c25400
Err:   serial@1c25400
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
4391272 bytes read in 227 ms (18.4 MiB/s)
reading suniv-f1c100s-licheepi-nano.dtb
7250 bytes read in 26 ms (271.5 KiB/s)
## Flattened Device Tree blob at 80c08000
   Booting using the fdt blob at 0x80c08000
   Loading Device Tree to 816fb000, end 816ffc51 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.7.1 (root@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11), GNU ld (Linaro_Binutils-2017.11) 2.28.2.20170706) #8 Thu Dec 30 19:47:33 CST 2021
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 8192
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 drm.debug=0x1f debug earlyprintk rw
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 21664K/32768K available (7168K kernel code, 226K rwdata, 1688K rodata, 1024K init, 246K bss, 11104K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2a0/0x498 with crng_init=0
[    0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000137] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000729] Console: colour dummy device 80x30
[    0.000817] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070254] pid_max: default: 32768 minimum: 301
[    0.070778] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070819] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.072651] CPU: Testing write buffer coherency: ok
[    0.074409] Setting up static identity map for 0x80100000 - 0x80100058
[    0.075645] devtmpfs: initialized
[    0.082250] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.082309] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.082604] pinctrl core: initialized pinctrl subsystem
[    0.084000] thermal_sys: Registered thermal governor 'step_wise'
[    0.085412] NET: Registered protocol family 16
[    0.086937] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.089146] cpuidle: using governor menu
[    0.142282] SCSI subsystem initialized
[    0.142673] usbcore: registered new interface driver usbfs
[    0.142844] usbcore: registered new interface driver hub
[    0.143028] usbcore: registered new device driver usb
[    0.143461] pps_core: LinuxPPS API ver. 1 registered
[    0.143484] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.143572] PTP clock support registered
[    0.144105] Advanced Linux Sound Architecture Driver Initialized.
[    0.146067] clocksource: Switched to clocksource timer
[    0.177724] NET: Registered protocol family 2
[    0.179283] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.179365] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.179424] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.179471] TCP: Hash tables configured (established 1024 bind 1024)
[    0.179748] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.179808] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.180342] NET: Registered protocol family 1
[    0.181869] RPC: Registered named UNIX socket transport module.
[    0.181908] RPC: Registered udp transport module.
[    0.181922] RPC: Registered tcp transport module.
[    0.181936] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.184360] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.186037] Initialise system trusted keyrings
[    0.186772] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.210572] NFS: Registering the id_resolver key type
[    0.210670] Key type id_resolver registered
[    0.210690] Key type id_legacy registered
[    0.320484] Key type asymmetric registered
[    0.320526] Asymmetric key parser 'x509' registered
[    0.320701] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.320728] io scheduler mq-deadline registered
[    0.320745] io scheduler kyber registered
[    0.332720] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.333873] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[    0.334202] pwm-backlight backlight: supply power not found, using dummy regulator
[    0.531357] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.537440] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[    0.539272] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 22, base_baud = 6250000) is a 16550A
[    0.540408] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[    0.542356] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 23, base_baud = 6250000) is a 16550A
[    1.031445] printk: console [ttyS1] enabled
[    1.037571] [drm:drm_core_init] Initialized
[    1.046750] panel_simple_platform_probe start match
[    1.051635] panel_simple_platform_probe matching!
[    1.059942] SCSI Media Changer driver v0.25
[    1.065624] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.072278] ehci-platform: EHCI generic platform driver
[    1.077870] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.084096] ohci-platform: OHCI generic platform driver
[    1.089885] usbcore: registered new interface driver usb-storage
[    1.096687] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    1.105661] i2c /dev entries driver
[    1.110827] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.147523] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.157271] usbcore: registered new interface driver usbhid
[    1.162845] usbhid: USB HID core driver
[    1.183454] NET: Registered protocol family 17
[    1.188269] Key type dns_resolver registered
[    1.193728] Loading compiled-in X.509 certificates
[    1.210820] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[    1.221253] pwm-backlight backlight: supply power not found, using dummy regulator
[    1.231310] panel_simple_platform_probe start match
[    1.236316] panel_simple_platform_probe matching!
[    1.242460] pwm-backlight backlight: supply power not found, using dummy regulator
[    1.252411] panel_simple_platform_probe start match
[    1.257412] panel_simple_platform_probe matching!
[    1.263547] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.282324] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.289175] ALSA device list:
[    1.292210]   #0: Loopback 1
[    1.296044] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.304764] cfg80211: failed to load regulatory.db
[    1.310542] Waiting for root device /dev/mmcblk0p2...
[    1.322488] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.332406] mmc0: Problem switching card into high-speed mode!
[    1.338797] mmc0: new SDHC card at address 0001
[    1.345193] mmcblk0: mmc0:0001 SD16G 7.44 GiB
[    1.354108]  mmcblk0: p1 p2
[    1.360383] pwm-backlight backlight: supply power not found, using dummy regulator
[    1.370384] panel_simple_platform_probe start match
[    1.375269] panel_simple_platform_probe matching!
[    1.426957] random: fast init done
[    1.468665] EXT4-fs (mmcblk0p2): recovery complete
[    1.475341] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.483676] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.492734] devtmpfs: mounted
[    1.500370] Freeing unused kernel memory: 1024K
[    1.505009] Run /sbin/init as init process
[    1.509186]   with arguments:
[    1.512157]     /sbin/init
[    1.514857]     earlyprintk
[    1.517693]   with environment:
[    1.520830]     HOME=/
[    1.523185]     TERM=linux
[    1.689426] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: [    2.225854] random: dd: uninitialized urandom read (512 bytes read)
OK
Starting network: OK

Welcome to Buildroot
buildroot login: [   31.846182] panel-power: disabling

Welcome to Buildroot
buildroot login: [  194.806228] random: crng init done

#54 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2021-12-30 21:08:54

哇酷小二 说:

背光不亮?要么先检查背光io/pwm配置,要么就飞线让背光常亮,继续下面的调试。

晕哥,修改了设备树,现在启动之后就白屏,但是在/dev 目录下面没有fb0设备,可能是什么原因呢

#55 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2021-12-28 18:28:37

哇酷小二 说:

现在是屏幕背光不亮?还是花屏?

屏幕没亮  没点起来

#56 Re: 全志 SOC » f1c100s驱动rgb屏求助 » 2021-12-28 15:21:03

用的屏是50pin的,分辨率是800*600

yikes

#57 全志 SOC » f1c100s驱动rgb屏求助 » 2021-12-28 15:15:22

岁月快快快
回复: 17

如题,最近在玩f1c100s,跟着@twzy大佬的帖子入坑 https://whycan.com/t_7275.html ,板子已经可以跑起来了,但是屏没有点起来,不知道uboot和内核设备树要配哪些地方,路过的大佬们指点指点;

启动后的log:

U-Boot 2018.01-05679-g013ca45-dirty (Dec 28 2021 - 13:36:17 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@1c25400
Out:   serial@1c25400
Err:   serial@1c25400
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
4391328 bytes read in 227 ms (18.4 MiB/s)
reading suniv-f1c100s-licheepi-nano.dtb
3719 bytes read in 31 ms (116.2 KiB/s)
## Flattened Device Tree blob at 80c08000
   Booting using the fdt blob at 0x80c08000
   Loading Device Tree to 816fc000, end 816ffe86 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.7.1 (root@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11), GNU ld (Linaro_Binutils-2017.11) 2.28.2.20170706) #6 Mon Dec 27 20:23:53 CST 2021
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 21676K/32768K available (7168K kernel code, 226K rwdata, 1688K rodata, 1024K init, 246K bss, 11092K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2a0/0x498 with crng_init=0
[    0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000136] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000635] Console: colour dummy device 80x30
[    0.000720] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070252] pid_max: default: 32768 minimum: 301
[    0.070777] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070820] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.072658] CPU: Testing write buffer coherency: ok
[    0.074445] Setting up static identity map for 0x80100000 - 0x80100058
[    0.075685] devtmpfs: initialized
[    0.080169] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.080340] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.080649] pinctrl core: initialized pinctrl subsystem
[    0.082028] thermal_sys: Registered thermal governor 'step_wise'
[    0.083401] NET: Registered protocol family 16
[    0.084877] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.087039] cpuidle: using governor menu
[    0.135806] SCSI subsystem initialized
[    0.136172] usbcore: registered new interface driver usbfs
[    0.136321] usbcore: registered new interface driver hub
[    0.136500] usbcore: registered new device driver usb
[    0.136890] pps_core: LinuxPPS API ver. 1 registered
[    0.136914] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.137000] PTP clock support registered
[    0.137526] Advanced Linux Sound Architecture Driver Initialized.
[    0.139436] clocksource: Switched to clocksource timer
[    0.170950] NET: Registered protocol family 2
[    0.172535] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.172615] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.172674] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.172721] TCP: Hash tables configured (established 1024 bind 1024)
[    0.172997] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.173057] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.173581] NET: Registered protocol family 1
[    0.175115] RPC: Registered named UNIX socket transport module.
[    0.175154] RPC: Registered udp transport module.
[    0.175168] RPC: Registered tcp transport module.
[    0.175182] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.177555] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.179207] Initialise system trusted keyrings
[    0.179960] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.203843] NFS: Registering the id_resolver key type
[    0.203933] Key type id_resolver registered
[    0.203952] Key type id_legacy registered
[    0.321228] Key type asymmetric registered
[    0.321270] Asymmetric key parser 'x509' registered
[    0.321442] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.321469] io scheduler mq-deadline registered
[    0.321485] io scheduler kyber registered
[    0.333091] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.528618] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.534672] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[    0.536502] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 21, base_baud = 6250000) is a 16550A
[    0.537707] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[    0.539804] 1c25400.serial: ttyS1 at MMIO 0x1c25400 (irq = 22, base_baud = 6250000) is a 16550A
[    0.984483] printk: console [ttyS1] enabled
[    0.995467] SCSI Media Changer driver v0.25
[    1.001250] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.007780] ehci-platform: EHCI generic platform driver
[    1.013356] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.019666] ohci-platform: OHCI generic platform driver
[    1.025258] usbcore: registered new interface driver usb-storage
[    1.031953] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    1.040998] i2c /dev entries driver
[    1.045844] suniv-f1c100s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.082498] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.091937] usbcore: registered new interface driver usbhid
[    1.097512] usbhid: USB HID core driver
[    1.117674] NET: Registered protocol family 17
[    1.122478] Key type dns_resolver registered
[    1.127867] Loading compiled-in X.509 certificates
[    1.144897] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.163574] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.170439] ALSA device list:
[    1.173428]   #0: Loopback 1
[    1.177425] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.186162] cfg80211: failed to load regulatory.db
[    1.192004] Waiting for root device /dev/mmcblk0p2...
[    1.217346] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.227302] mmc0: Problem switching card into high-speed mode!
[    1.233637] mmc0: new SDHC card at address 0001
[    1.240169] mmcblk0: mmc0:0001 SD16G 7.44 GiB
[    1.248948]  mmcblk0: p1 p2
[    1.311558] random: fast init done
[    1.365930] EXT4-fs (mmcblk0p2): recovery complete
[    1.372696] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.381027] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.389981] devtmpfs: mounted
[    1.397507] Freeing unused kernel memory: 1024K
[    1.402275] Run /sbin/init as init process
[    1.567342] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: [    2.092652] random: dd: uninitialized urandom read (512 bytes read)
OK
Starting network: OK

Welcome to Buildroot
buildroot login:

用的配置文件:
licheepi_nano_defconfig

CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_MACH_SUNIV=y
CONFIG_DRAM_CLK=156
CONFIG_DRAM_ZQ=0
# CONFIG_VIDEO_SUNXI is not set
CONFIG_DEFAULT_DEVICE_TREE="suniv-f1c100s-licheepi-nano"
CONFIG_SPL=y
CONFIG_CONS_INDEX=2

CONFIG_VIDEO_LCD_MODE="x:800,y:600,depth:18,pclk_khz:10000,hs:1,vs:1,le:42,ri:8,up:11,lo:4,sync:3,vmode:0"
CONFIG_VIDEO_LCD_DCLK_PHASE=0
CONFIG_VIDEO_LCD_POWER="PC0"
CONFIG_VIDEO_LCD_BL_EN="PD19"
CONFIG_VIDEO_LCD_BL_PWM="PE11"

# CONFIG_SPL_DM_SERIAL is not set

设备树:
suniv-f1c100s-licheepi-nano.dts

// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
 * Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
 */

/dts-v1/;
#include "suniv-f1c100s.dtsi"

#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Lichee Pi Nano";
	compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s",
		     "allwinner,suniv";

	aliases {
		serial0 = &uart0;
                serial1 = &uart1;
		spi0 = &spi0;
	};

	chosen {
		stdout-path = "serial1:115200n8";
	};
};

&otg_sram {
	status = "okay";
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins_a>;
	status = "okay";

	flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "winbond,w25q128", "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <40000000>;
	};
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins_a>;
	status = "okay";
};

&uart1 {
	pinctrl-0 = <&uart1_pins_a>;
	pinctrl-names = "default";
	status = "okay";
};

&usb_otg {
	dr_mode = "otg";
	status = "okay";
};

&usbphy {
	usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
	status = "okay";
};

suniv.dtsi:

// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
 * Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
 */

#include <dt-bindings/clock/suniv-ccu.h>
#include <dt-bindings/reset/suniv-ccu.h>

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	interrupt-parent = <&intc>;

	clocks {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		osc24M: clk-24M {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <24000000>;
			clock-output-names = "osc24M";
		};

		osc32k: clk-32k {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <32768>;
			clock-output-names = "osc32k";
		};

		fake100M: clk-100M {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <100000000>;
			clock-output-names = "fake-100M";
		};
	};

	cpus {
		#address-cells = <0>;
		#size-cells = <0>;

		cpu {
			compatible = "arm,arm926ej-s";
			device_type = "cpu";
		};
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		sram-controller@1c00000 {
			compatible = "allwinner,sun4i-a10-sram-controller";
			reg = <0x01c00000 0x30>;
			#address-cells = <1>;
			#size-cells = <1>;
			ranges;

			sram_d: sram@10000 {
				compatible = "mmio-sram";
				reg = <0x00010000 0x1000>;
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0 0x00010000 0x1000>;

				otg_sram: sram-section@0 {
					compatible = "allwinner,sun4i-a10-sram-d";
					reg = <0x0000 0x1000>;
					status = "disabled";
				};
			};
		};

		spi0: spi@1c05000 {
			compatible = "allwinner,suniv-spi",
				     "allwinner,sun8i-h3-spi";
			reg = <0x01c05000 0x1000>;
			interrupts = <10>;
			clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
			clock-names = "ahb", "mod";
			resets = <&ccu RST_BUS_SPI0>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		ccu: clock@1c20000 {
			compatible = "allwinner,suniv-ccu";
			reg = <0x01c20000 0x400>;
			clocks = <&osc24M>, <&osc32k>;
			clock-names = "hosc", "losc";
			#clock-cells = <1>;
			#reset-cells = <1>;
		};

		intc: interrupt-controller@1c20400 {
			compatible = "allwinner,suniv-ic";
			reg = <0x01c20400 0x400>;
			interrupt-controller;
			#interrupt-cells = <1>;
		};

		pio: pinctrl@1c20800 {
			compatible = "allwinner,suniv-pinctrl";
			reg = <0x01c20800 0x400>;
			interrupts = <38>, <39>, <40>;
			clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			interrupt-controller;
			#interrupt-cells = <3>;
			#gpio-cells = <3>;

			spi0_pins_a: spi0-pins-pc {
				pins = "PC0", "PC1", "PC2", "PC3";
				function = "spi0";
			};

			uart0_pins_a: uart-pins-pe {
				pins = "PE0", "PE1";
				function = "uart0";
			};
                       
                        uart1_pins_a: uart-pins-pa {
                                pins = "PA2", "PA3";
                                function = "uart1";
                        };

		};

		timer@1c20c00 {
			compatible = "allwinner,sun4i-a10-timer";
			reg = <0x01c20c00 0x90>;
			interrupts = <13>;
			clocks = <&osc24M>;
		};

		wdt: watchdog@1c20ca0 {
			compatible = "allwinner,sun6i-a31-wdt";
			reg = <0x01c20ca0 0x20>;
		};

		uart0: serial@1c25000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25000 0x400>;
			interrupts = <1>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART0>;
			resets = <&ccu RST_BUS_UART0>;
			status = "disabled";
		};

		uart1: serial@1c25400 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25400 0x400>;
			interrupts = <2>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART1>;
			resets = <&ccu RST_BUS_UART1>;
			status = "disabled";
		};

		uart2: serial@1c25800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25800 0x400>;
			interrupts = <3>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART2>;
			resets = <&ccu RST_BUS_UART2>;
			status = "disabled";
		};

		usb_otg: usb@1c13000 {
			compatible = "allwinner,suniv-musb";
			reg = <0x01c13000 0x0400>;
			clocks = <&ccu CLK_BUS_OTG>;
			resets = <&ccu RST_BUS_OTG>;
			interrupts = <26>;
			interrupt-names = "mc";
			phys = <&usbphy 0>;
			phy-names = "usb";
			extcon = <&usbphy 0>;
			allwinner,sram = <&otg_sram 1>;
			status = "disabled";
		};

		usbphy: phy@1c13400 {
			compatible = "allwinner,suniv-usb-phy";
			reg = <0x01c13400 0x10>;
			reg-names = "phy_ctrl";
			clocks = <&ccu CLK_USB_PHY0>;
			clock-names = "usb0_phy";
			resets = <&ccu RST_USB_PHY0>;
			reset-names = "usb0_reset";
			#phy-cells = <1>;
			status = "disabled";
		};
	};
};

@SdtElectronics大佬发表的帖子中 https://whycan.com/t_5873.html ,说到的设备树文件中tcon节点,在我的文件中没有,是要加上去吗?

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn