您尚未登录。

#1 全志 SOC » 做了一个V853多功能串口服务器开发板 » 2023-07-03 10:28:18

神棍地海棠
回复: 1

项目作者:小华的物联网嵌入式之旅
介绍:从事电气自动化行业,多次获得物联网设计竞赛,爱好嵌入式设计开发,物联网开发。
原文链接:elecfans.com/d/2071425.html

附件:多功能串口服务器PCB-Gerber.zip
多功能串口服务器BOM表.xlsx
多功能串口服务器PickAndPlace_PCB1_坐标文件.xlsx
基于V853多功能串口服务器-专业版.zip

设计方案思路的由来,是因为我们现在的开发板基本需要通过串口与WIFI模组或以太网模组连接以实现联网功能,如果多个开发板就要配多个模组,所以做一个类似路由器的功能,将多种串口协议集中连接到串口服务器上面,然后就可以实现通过一个以太网功能实现联网。

poYBAGQ_7fGAHQa8AA7IG9bUcas202.png

串口服务器网上也有相关的产品售卖,虽然不知他们的控制原理,但是对我来说只需要将串口数据发送到V853上,通过它进行数据解析后集中通过以太网接口发送出去就实现了串口服务器和路由功能。

该服务器因为具备了WIFI模组,所以也可以组成局域网,将所有无线设备都可以连接到模组接收数据,然后再通过以太网接口与其他网络设备进行交互。

主要功能及用途
实现的功能是基于官方提供的V853原理图和晕哥设计方案的基础上进行了功能扩展,新增了串口转换电路:

1、V853最小系统,运行linux操作系统,尽可能运行桌面系统,这样可以像操作电脑一样编辑串口数据。
2、WIFI模组实现联网功能。
3、显示屏LCD接口,用来显示操作界面。所以有了它就更像一台小电脑服务器。
4、摄像头接口,这是预留接口,用来实现摄像头监控,在数控机房里面特别适合。
5、”USB-HUB扩展4路USB接口,通过USB转串口芯片CP2102实现2路R232,2路RS485,4路TTL,总共实现8路串口功能。满足了我们多功能串口服务器。

pYYBAGOVc8yAHTOWAACfD5xHdTA302.png

软件设计
需要在linux系统上安装Node-Red软件,这个软件是一个图形化编程编辑界面,通过安装相对应的节点就可以实现想要的功能。

例如串口功能,MQTT功能,TCP功能等必要的组件都可以安装实现,只需要设置需要参数就可以完成相关功能,同时还可以进行数据解析,并通过Dashboard数据可视化界面做上位机显示到显示屏上面,摄像头的调用可以使用里面的组件去调用,可以说node-red可以轻松实现串口数据转以太网,实现任何一个串口设备都可以轻松连接到服务器。如下图就是各个节点功能的使用案例。

poYBAGOVh4GASAjIAAEbpGZxOlM956.pngpYYBAGOVh9WAQ1QFAAEzdHSqEdo355.pngpoYBAGOViHaAQ8QqAAEKeik1KrY050.pngpYYBAGOViNCAfFRxAACm2qbvkFs507.png

所以解决串口和无线有线的连接问题,就可以实现数据交互的服务器。外网如果想查看上位机界面,因为它是网页版,所以通过透传的方式就可以远程打开查看这个网页。

方案原理图

poYBAGPypbCARGSdAAM7F_buOCk274.pngpYYBAGPypdiAKfKDAAO5jYQsovE150.pngpYYBAGPyphmAJRq9AAIuhCF_M_o944.png_20230629094657.png
_20230629094700.png


PCB是基于Yuzuki大佬的“高性能异构边缘AI视觉开发板”PCB板上画的,让我节省了很多时间。我只需要扩展我的串口功能部分和修改了部分电路与布局。

WrVfb7jTAGVV6QFXfQl9guNiX2GeeEcMggyiz49y.png

开始我的板子有个小插曲,板子刚回来时发现上电后没有反应,检查好几天才发现没有焊接晶振,我还在硬件设计大赛的群里打扰各位大佬为什么我的板子不能工作,识别不到USB等等问题。还好发现了问题并解决了。现在给大家介绍如何烧录Tina Linux系统。

固件烧写及点灯
在全志在线开发者社区的资料下载页面下载红框所示的全部量产工具。

wKgZomQ_7mCAO-OIAAs679Xfyb0115.png

下载出厂固件。

wKgaomQ_7mmALzAYAAs3dvkb1PQ387.png

打开刷机软件:(该软件在全志资源下载里面都能找到)。

wKgaomQ_7nOAWfp6AA4QF6qMl6A767.png

这个时候按住开发板上FEL按键不松手,然后用Type-C数据线连接电脑和板子的OTG接口,这个时候会进入USB模式,刷机软件就会自动识别并烧录固件。如果没有进入USB模式,可以通过按住FEL按钮,然后点击一下RESET按钮,这时候如果你的电脑开了音量,就听到声音。此时刷机软件也会自动进入烧写模式。

wKgaomQ_7oaAcG_8AA4YwNVAQ4U620.png

显示烧录成功:

wKgZomQ_7qKALZwrAA4YwO8bfPo181.png

刷机软件也自动连接上板子,显示了如下信息:

wKgZomQ_7qKALZwrAA4YwO8bfPo181_20230703-1024.png

然后系统会自动运行,过了一会儿,我们会发现在设备管理中看到Tina ADB,刷机软件的首页也显示连接设备成功。

然后我们需要配置添加ADB到环境变量中:在win10系统中:

我的电脑-属性-高级系统设置-弹出“系统属性”窗口,选择高级栏中的环境变量,弹出的窗口中选择用户变量中的path路径,选择下载并解压的ADB。

wKgZomQ_7raAEZ2LAAN7IKr9TWY557.pngwKgaomQ_7suANOytAAbEQi4p9hk715.png


然后再win10开始栏中输入cmd,打开命令提示符窗口,我们输入adb shell就会看到如下内容,这样我们就进入了linux系统。

wKgaomQ_74uATFT5AB243yXmPkM130.pngwKgZomQ_75eAEnhtAAupO0t_QK0913.png

点亮LED灯,连接PH11引脚到LED灯就可以通过控制gpio235的值来点亮和熄灭LED灯。

echo 0 > value点亮LED灯
echo 1 > value熄灭LED灯

wKgaomRAACiAULNeAACtUK3-nb4080.png

如下图我板子的PH11引脚连接到串口的一个蓝色LED指示灯实现点亮LED灯功能。

wKgaomRAAMWARdJHABLaqWjkcsY152.jpg

#2 全志 SOC » 案遇到glibc库版本低以及编译报错的解决方法 » 2023-06-25 10:07:38

神棍地海棠
回复: 0

Glibc 包含了linux一些主要的C库,用于分配内存、搜索目录、打开关闭文件、读写文件、字串处理、模式匹配、数学计算等,在遇到glibc库版本低编译还报错的情况时,遵循以下步骤解决

make工具

注意由于AW服务器make版本为3.8.1,在编译glibc高版本时候不兼容,所以需要更新make工具。假如服务器make版本较高,可以不用更新make工具。

74adce60b8464885a5dd61ee74ba04ce.jpg


网址 http://ftp.gnu.org/pub/gnu/make ,下载最新版本4.3。解压后,对make工具进行安装。进入make-4.3源码目录,执行以下命令。

# prefix 后面路径为make工具安装路径,这里我们指定安装到out目录下。
./configure --prefix=${path}
make 
make install

9a2c99382e9f410f972896bb8d835d60.jpg


安装完成,我们看到make 4.3版本

76462bc8ce8843c18851fb1b53ae6006.jpg


# glibc源码下载

网址 http://ftp.gnu.org/pub/gnu/glibc/ ,下载所需的glibc版本,注意gcc工具链版本和glibc版本需要匹配。

如下图所示是准备好编译脚本env. sh,glibc各个版本源码。

723697d50e5f4f1cbdb57e159e694c80.jpg


**env.sh是把所有编译步骤整合在一起的脚本,可以根据具体情况单独执行每条指令。**

8b1ebd6d70be4655a7605128bee7fec2.jpg

打开脚本env.sh脚本。第4行是gcc位置,第5行是make工具位置(不需要安装高版本make可以去掉),第7行是glibc版本,第12行是glibc源码路径,第13行是glibc生成库文件路径,第14行是glibc编译过程产生中间文件存放路径,第16行是修改环境变量,使用我们自己的make和gcc工具。第30-33行,用于编译glibc。




其中31行 --host=arm-none-linux-gnueabihf ,host填入值要和gcc匹配 ,否则会出差。

5f2a16b347c3456080fa730db1f7da2d.jpg


03eea564b5674b67a048d0ee1cd5bee7.jpg



运行env.sh脚本


./env.sh

注意下信息,我们可以看到glibc生成准备环境时候,已经使用了我们指定gcc工具链,make工具。

98a88fec90ff4c018cf4421fae808ac2.jpg

b994e54444474d3997fb351db376c330.jpg


编译完成后,我们看到对应so库

7d8beda4939c4dcb94d694b343f93d5e.jpg


替换glibc,例如在我们测试demo,修改Makefile,指定到我们glibc版本路径即可

重新编译,查看对应执行文件,看到已经使用对应版本版本glibc库

strings main | grep glibc

4e72c23a5e7646189ca264b87f0ef8b4.jpg

# 版本匹配问题

1、gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi版本,glibc 2.29以下版本都可以编译通过

2、gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf版本,目前只在glibc 2.33编译通过,其他版本需测试。

#4 全志 SOC » 解决LicheeRV 86 Panel在tina2.0配置lcd GPIO引脚及colorbar闪屏的问题 » 2022-09-16 10:11:26

神棍地海棠
回复: 0

设备树修改如下:

project device/config/chips/d1-h/
diff --git a/configs/nezha/linux-5.4/board.dts b/configs/nezha/linux-5.4/board.dts
index 963aa17..fb8d344 100755
--- a/configs/nezha/linux-5.4/board.dts
+++ b/configs/nezha/linux-5.4/board.dts
@@ -6,7 +6,6 @@
 
 /dts-v1/;
 
-/memreserve/ 0x42000000 0x100000;  /* dsp used 1MB */
 #include "sun20iw1p1.dtsi"
 
 /{
@@ -15,7 +14,6 @@
 	aliases {
 		dsp0 = &dsp0;
 		dsp0_gpio_int= &dsp0_gpio_int;
-		gmac0 = &gmac0;
 	};
 
 	dsp0: dsp0 {
@@ -31,7 +29,7 @@
 
 	reg_vdd_cpu: vdd-cpu {
 		compatible = "sunxi-pwm-regulator";
-		pwms = <&pwm 0 5000 1>;
+		pwms = <&pwm 0 5000 0>;
 		regulator-name = "vdd_cpu";
 		regulator-min-microvolt = <810000>;
 		regulator-max-microvolt = <1160000>;
@@ -47,7 +45,15 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-enable-ramp-delay = <1000>;
-		gpio = <&pio PD 19 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	reg_3v3: vdd_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-enable-ramp-delay = <1000>;
 		enable-active-high;
 	};
 };
@@ -234,62 +240,42 @@
 
 	gmac_pins_a: gmac@0 {
 		pins = "PE0", "PE1", "PE2", "PE3",
-		       "PE4", "PE5", "PE6", "PE7",
-		       "PE8", "PE9", "PE10", "PE11",
-		       "PE12", "PE13", "PE14", "PE15";
+				"PE4", "PE5", "PE6", "PE7",
+				"PE8", "PE9";
 		function = "gmac0";
-		muxsel = <8>; /* for uboot driver */
 		drive-strength = <10>;
 	};
 
 	gmac_pins_b: gmac@1 {
 		pins = "PE0", "PE1", "PE2", "PE3",
-		       "PE4", "PE5", "PE6", "PE7",
-		       "PE8", "PE9", "PE10", "PE11",
-		       "PE12", "PE13", "PE14", "PE15";
+				"PE4", "PE5", "PE6", "PE7",
+				"PE8", "PE9";
 		function = "gpio_in";
 	};
 
 	dmic_pins_a: dmic@0 {
 		/* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */
-		pins = "PE17", "PB11", "PB10", "PD17";
+		pins = "PE17", "PB11";
 		function = "dmic";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
 	dmic_pins_b: dmic@1 {
-		pins = "PE17", "PB11", "PB10", "PD17";
+		pins = "PE17", "PB11";
 		function = "io_disabled";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
 	daudio0_pins_a: daudio0@0 {
-		/* MCLK, BCLK, LRCK */
-		pins = "PE17", "PE16", "PE15";
+		pins = "PE17", "PE16", "PE15", "PE14", "PE13";
 		function = "i2s0";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
-	daudio0_pins_b: daudio0@1 {
-		/* DIN0 */
-		pins = "PE14";
-		function = "i2s0_din";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio0_pins_c: daudio0@2 {
-		/* DOUT0 */
-		pins = "PE13";
-		function = "i2s0_dout";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio0_pins_d: daudio0_sleep@0 {
+	daudio0_pins_b: daudio0_sleep@0 {
 		pins = "PE17", "PE16", "PE15", "PE14", "PE13";
 		function = "io_disabled";
 		drive-strength = <20>;
@@ -297,30 +283,13 @@
 	};
 
 	daudio1_pins_a: daudio1@0 {
-		/* MCLK, LRCK, BCLK */
-		pins = "PG11", "PG12", "PG13";
+		pins = "PG11", "PG12", "PG13", "PG14", "PG15";
 		function = "i2s1";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
-	daudio1_pins_b: daudio1@1 {
-		/* DIN0 */
-		pins = "PG14";
-		function = "i2s1_din";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio1_pins_c: daudio1@2 {
-		/* DOUT0 */
-		pins = "PG15";
-		function = "i2s1_dout";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio1_pins_d: daudio1_sleep@0 {
+	daudio1_pins_b: daudio1_sleep@0 {
 		pins = "PG11", "PG12", "PG13", "PG14", "PG15";
 		function = "io_disabled";
 		drive-strength = <20>;
@@ -374,7 +343,7 @@
 	};
 
 	spi0_pins_a: spi0@0 {
-		pins = "PC2", "PC4", "PC5"; /* clk, mosi, miso */
+		pins = "PC2", "PC4", "PC5","PC7", "PC6"; /*clk mosi miso hold wp*/
 		function = "spi0";
 		muxsel = <2>;
 		drive-strength = <10>;
@@ -385,7 +354,7 @@
 		function = "spi0";
 		muxsel = <2>;
 		drive-strength = <10>;
-		bias-pull-up;   /* cs, hold, wp should be pulled up */
+		bias-pull-up;   /* only CS should be pulled up */
 	};
 
 	spi0_pins_c: spi0@2 {
@@ -396,16 +365,16 @@
 	};
 
 	spi1_pins_a: spi1@0 {
-		pins = "PD11", "PD12", "PD13"; /* clk, mosi, miso */
+		pins = "PD11", "PD12", "PD13","PD14", "PD15"; /*clk mosi miso hold wp*/
 		function = "spi1";
 		drive-strength = <10>;
 	};
 
 	spi1_pins_b: spi1@1 {
-		pins = "PD10", "PD14", "PD15";
+		pins = "PD10";
 		function = "spi1";
 		drive-strength = <10>;
-		bias-pull-up;   /* cs, hold, wp should be pulled up */
+		bias-pull-up;   // only CS should be pulled up
 	};
 
 	spi1_pins_c: spi1@2 {
@@ -447,9 +416,9 @@
 
 	pwm2_pin_b: pwm2@1 {
 		pins = "PD18";
-		function = "gpio_out";
+		function = "gpio_in";
 	};
-/*
+
 	pwm7_pin_a: pwm7@0 {
 		pins = "PD22";
 		function = "pwm7";
@@ -461,7 +430,6 @@
 		pins = "PD22";
 		function = "gpio_in";
 	};
-*/
 
 	s_cir0_pins_a: s_cir@0 {
 		pins = "PB12";
@@ -486,6 +454,45 @@
 		pins = "PB0";
 		function = "gpio_in";
 	};
+
+	rgb18_20_pins_a: rgb18_20@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 = <20>;
+		bias-disable;
+	};
+
+	rgb18_20_pins_b: rgb18_20@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;
+	};
+
+	rgb18_10_pins_a: rgb18_10@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 = <10>;
+		bias-disable;
+	};
+
+	rgb18_10_pins_b: rgb18_10@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;
+	};
+
 };
 
 &uart0 {
@@ -510,11 +517,11 @@
 };
 
 &uart3 {
-	compatible = "allwinner,sun20iw1-dsp-uart";
+	/*compatible = "allwinner,sun20iw1-dsp-uart";*/
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&uart3_pins_a>;
 	pinctrl-1 = <&uart3_pins_a>;
-	status = "okay";
+	status = "disabled";
 };
 
 &soc {
@@ -557,12 +564,12 @@
 		compatible    = "allwinner,sunxi-rfkill";
 		chip_en;
 		power_en;
-		pinctrl-0 = <&wlan_pins_a>;
-		pinctrl-names = "default";
 		status        = "okay";
 
 		wlan: wlan@0 {
 			compatible    = "allwinner,sunxi-wlan";
+			pinctrl-0 = <&wlan_pins_a>;
+			pinctrl-names = "default";
 			clock-names = "32k-fanout1";
 			clocks = <&ccu CLK_FANOUT1_OUT>;
 			wlan_busnum    = <0x1>;
@@ -578,6 +585,8 @@
 
 		bt: bt@0 {
 			compatible    = "allwinner,sunxi-bt";
+			pinctrl-0 = <&wlan_pins_a>;
+			pinctrl-names = "default";
 			clock-names = "32k-fanout1";
 			clocks = <&ccu CLK_FANOUT1_OUT>;
 			/*bt_power_num = <0x01>;*/
@@ -590,13 +599,13 @@
 		};
 	};
 
-	btlpm: btlpm@0 {
+	/*btlpm: btlpm@0 {
 		compatible  = "allwinner,sunxi-btlpm";
 		uart_index  = <0x1>;
 		bt_wake     = <&pio PG 16 GPIO_ACTIVE_HIGH>;
 		bt_hostwake = <&pio PG 17 GPIO_ACTIVE_HIGH>;
 		status      = "okay";
-	};
+	};*/
 
 	addr_mgt: addr_mgt@0 {
 		compatible     = "allwinner,sunxi-addr_mgt";
@@ -826,8 +835,8 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 	pcm_lrck_period = <0x80>;
 	slot_width_select = <0x20>;
 	pinctrl-names   = "default", "sleep";
-	pinctrl-0       = <&daudio0_pins_a &daudio0_pins_b &daudio0_pins_c>;
-	pinctrl-1       = <&daudio0_pins_d>;
+	pinctrl-0       = <&daudio0_pins_a>;
+	pinctrl-1       = <&daudio0_pins_b>;
 	pinctrl_used	= <0x0>;
 	status = "disabled";
 };
@@ -861,8 +870,8 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 	pcm_lrck_period = <0x80>;
 	slot_width_select = <0x20>;
 	pinctrl-names   = "default", "sleep";
-	pinctrl-0       = <&daudio1_pins_a &daudio1_pins_b &daudio1_pins_c>;
-	pinctrl-1       = <&daudio1_pins_d>;
+	pinctrl-0       = <&daudio1_pins_a>;
+	pinctrl-1       = <&daudio1_pins_b>;
 	pinctrl_used	= <0x0>;
 	status = "disabled";
 };
@@ -930,12 +939,10 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
  */
 &usbc0 {
 	device_type = "usbc0";
-	usb_port_type = <0x2>;
+	usb_port_type = <0x0>;
 	usb_detect_type = <0x1>;
 	usb_detect_mode = <0>;
-	usb_id_gpio = <&pio PD 21 GPIO_ACTIVE_HIGH>;
 	enable-active-high;
-	usb_det_vbus_gpio = <&pio PD 20 GPIO_ACTIVE_HIGH>;
 	usb_wakeup_suspend = <0>;
 	usb_serial_unique = <0>;
 	usb_serial_number = "20080411";
@@ -997,43 +1004,20 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 	dma-names = "tx", "rx";
 	status = "okay";
 
-	/* pcf8574-usage:
-	 * only use gpio0~7, 0 means PP0.
-	 * pin set:
-	 * gpios = <&pcf8574 0 GPIO_ACTIVE_LOW>;
-	 * interrupt set:
-	 * interrupt-parent = <&pcf8574>;
-	 * interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
-	 */
-	pcf8574: gpio@38 {
-		compatible = "nxp,pcf8574";
-		reg = <0x38>;
-		gpio_base = <2020>;
-		gpio-controller;
-		#gpio-cells = <2>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-		interrupt-parent = <&pio>;
-		interrupts = <PB 2 IRQ_TYPE_EDGE_FALLING>;
+	focaltech@48{
+		compatible = "focaltech,fts";    
 		status = "okay";
+		reg = <0x48>;
+		interrupt-parent = <&pio>;
+		interrupts = <PG 14 IRQ_TYPE_LEVEL_LOW>;
+		focaltech,reset-gpio = <&pio PG 15 GPIO_ACTIVE_HIGH>;
+		focaltech,irq-gpio = <&pio PG 14 IRQ_TYPE_LEVEL_LOW>;
+		focaltech,max-touch-number = <2>;
+		focaltech,display-coords =  <0 0 480 480>;     
+		focaltech,reg_vdd = <&reg_3v3>;
+		focaltech,reg_avdd = <&reg_3v3>;
 	};
 
-	ctp@14 {
-		compatible = "allwinner,goodix";
-		device_type = "ctp";
-		reg = <0x14>;
-		status = "disabled";
-		ctp_name = "gt9xxnew_ts";
-		ctp_twi_id = <0x2>;
-		ctp_twi_addr = <0x14>;
-		ctp_screen_max_x = <0x320>;
-		ctp_screen_max_y = <0x500>;
-		ctp_revert_x_flag = <0x0>;
-		ctp_revert_y_flag = <0x1>;
-		ctp_exchange_x_y_flag = <0x0>;
-		ctp_int_port = <&pio PG 14 GPIO_ACTIVE_HIGH>;
-		ctp_wakeup = <&pio PG 15 GPIO_ACTIVE_HIGH>;
-	};
 };
 
 &twi3 {
@@ -1045,14 +1029,12 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 };
 
 &gmac0 {
-	phy-mode = "rgmii";
+	phy-mode = "rmii";
 	use_ephy25m = <1>;
 	pinctrl-0 = <&gmac_pins_a>;
 	pinctrl-1 = <&gmac_pins_b>;
 	pinctrl-names = "default", "sleep";
 	phy-rst = <&pio PE 16 GPIO_ACTIVE_HIGH>;
-	tx-delay = <3>; /*2~4*/
-	rx-delay = <0>;
 	status = "okay";
 };
 
@@ -1064,7 +1046,7 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 	/*spi-supply = <&reg_dcdc1>;*/
 	spi_slave_mode = <0>;
 	spi0_cs_number = <1>;
-        spi0_cs_bitmap = <1>;
+	spi0_cs_bitmap = <1>;
 	status = "disabled";
 
 	spi-nand@0 {
@@ -1083,21 +1065,9 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 	pinctrl-1 = <&spi1_pins_c>;
 	pinctrl-names = "default", "sleep";
 	spi_slave_mode = <0>;
-	spi1_cs_number = <1>;
-	spi1_cs_bitmap = <1>;
-	spi_dbi_enable = <1>;
 	status = "disabled";
 
 	spi_board1@0 {
-		device_type = "spi-dbi";
-		compatible = "sunxi,spidbi";
-		spi-max-frequency = <0x5f5e100>;
-		reg = <0x0>;
-		spi-rx-bus-width = <0x4>;
-		spi-tx-bus-width = <0x4>;
-		status = "okay";
-	};
-	/* spi_board1@0 {
 		device_type = "spi_board1";
 		compatible = "rohm,dh2228fv";
 		spi-max-frequency = <0x5f5e100>;
@@ -1105,7 +1075,7 @@ tvd_row*tvd_column is the total tvd channel number to be used in multichannel mo
 		spi-rx-bus-width = <0x4>;
 		spi-tx-bus-width = <0x4>;
 		status = "disabled";
-	}; */
+	};
 };
 
 &ledc {
@@ -1279,57 +1249,50 @@ pull up or pull down(default 0), driver level(default 1), data>
 ;For lvds0: use lvds0_pins_a  and lvds0_pins_b instead
 ;----------------------------------------------------------------------------------*/
 &lcd0 {
-	lcd_used            = <1>;
-
-	lcd_driver_name     = "tft08006";
-	lcd_backlight       = <100>;
-	lcd_if              = <4>;
-
-	lcd_x               = <800>;
-	lcd_y               = <1280>;
-	lcd_width           = <52>;
-	lcd_height          = <52>;
-	lcd_dclk_freq       = <70>;
-
-	lcd_pwm_used        = <1>;
-	lcd_pwm_ch          = <2>;
-	lcd_pwm_freq        = <1000>;
-	lcd_pwm_pol         = <0>;
-	lcd_pwm_max_limit   = <255>;
-
-	lcd_hbp             = <32>;
-	lcd_ht              = <868>;
-	lcd_hspw            = <4>;
-	lcd_vbp             = <12>;
-	lcd_vt              = <1311>;
-	lcd_vspw            = <4>;
-
-	lcd_dsi_if          = <0>;
-	lcd_dsi_lane        = <4>;
-	lcd_lvds_if         = <0>;
-	lcd_lvds_colordepth = <0>;
-	lcd_lvds_mode       = <0>;
-	lcd_frm             = <0>;
-	lcd_hv_clk_phase    = <0>;
-	lcd_hv_sync_polarity= <0>;
-	lcd_io_phase        = <0x0000>;
-	lcd_gamma_en        = <0>;
+	lcd_used        = <1>;
+	lcd_driver_name = "st7701s_rgb";
+
+	lcd_if          = <0>;
+	lcd_hv_if       = <0>;
+
+	lcd_width       = <70>;
+	lcd_height      = <72>;
+	lcd_x           = <480>;
+	lcd_y           = <480>;
+	lcd_dclk_freq   = <19>;
+	lcd_hbp         = <60>;
+	lcd_ht          = <612>;
+	lcd_hspw        = <12>;
+	lcd_vbp         = <18>;
+	lcd_vt          = <520>;
+	lcd_vspw        = <4>;
+
+	lcd_backlight   = <50>;
+	lcd_pwm_used    = <1>;
+	lcd_pwm_ch      = <7>;
+	lcd_pwm_freq    = <20000>;
+	lcd_pwm_pol     = <1>;
 	lcd_bright_curve_en = <0>;
-	lcd_cmap_en         = <0>;
-	lcd_fsync_en        = <0>;
-	lcd_fsync_act_time  = <1000>;
-	lcd_fsync_dis_time  = <1000>;
-	lcd_fsync_pol       = <0>;
-
-	deu_mode            = <0>;
-	lcdgamma4iep        = <22>;
-	smart_color         = <90>;
-
-	lcd_gpio_0 =  <&pio PG 13 GPIO_ACTIVE_HIGH>;
-	pinctrl-0 = <&dsi4lane_pins_a>;
-	pinctrl-1 = <&dsi4lane_pins_b>;
+
+	lcd_frm         = <1>;
+	lcd_io_phase    = <0x0000>;
+	lcd_gamma_en    = <0>;
+	lcd_cmap_en     = <0>;
+	lcd_hv_clk_phase= <0>;
+	lcd_hv_sync_polarity= <0>;
+	lcd_rb_swap          = <0>;
+
+	lcd_power       = "vcc-lcd";
+	lcd_pin_power   = "vcc-pd";
+	lcd_gpio_0      = <&pio PG 13 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_1      = <&pio PE 14 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_2      = <&pio PE 12 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_3      = <&pio PE 15 GPIO_ACTIVE_HIGH>;
+	pinctrl-0       = <&rgb18_pins_a>;
+	pinctrl-1       = <&rgb18_pins_b>;
 };
 
+
 &hdmi {
 	hdmi_used = <1>;
 	hdmi_power_cnt = <0>;
@@ -1357,14 +1320,12 @@ pull up or pull down(default 0), driver level(default 1), data>
 	status = "okay";
 };
 
-/*
 &pwm7 {
 	pinctrl-names = "active", "sleep";
 	pinctrl-0 = <&pwm7_pin_a>;
 	pinctrl-1 = <&pwm7_pin_b>;
 	status = "okay";
 };
-*/
 
 &rtp {
 	allwinner,tp-sensitive-adjust = <0xf>;
@@ -1399,61 +1360,4 @@ pull up or pull down(default 0), driver level(default 1), data>
 	pinctrl-0 = <&ir1_pins_a>;
 	pinctrl-1 = <&ir1_pins_b>;
 	status = "disabled";
-};
-
-/* &lcd_fb0 {
-	lcd_used = <1>;
-	lcd_driver_name = "kld35512";
-	lcd_if = <1>;
-	lcd_dbi_if = <4>;
-	lcd_data_speed = <60>;
-	lcd_spi_bus_num = <1>;
-	lcd_x = <320>;
-	lcd_y = <480>;
-	lcd_pixel_fmt = <10>;
-	lcd_dbi_fmt = <2>;
-	lcd_rgb_order = <0>;
-	lcd_width = <60>;
-	lcd_height = <95>;
-	lcd_pwm_used = <1>;
-	lcd_pwm_ch = <7>;
-	lcd_pwm_freq = <5000>;
-	lcd_pwm_pol = <1>;
-	lcd_frm = <1>;
-	lcd_gamma_en = <1>;
-	fb_buffer_num = <2>;
-	lcd_backlight = <100>;
-	lcd_fps = <40>;
-	lcd_dbi_te = <1>;
-	lcd_dbi_clk_mode = <1>;
-	lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>;
-	status = "okay";
-}; */
-
-/* &lcd_fb0 {
-	lcd_used = <1>;
-	lcd_driver_name = "kld2844b";
-	lcd_if = <1>;
-	lcd_dbi_if = <4>;
-	lcd_data_speed = <60>;
-	lcd_spi_bus_num = <1>;
-	lcd_x = <240>;
-	lcd_y = <320>;
-	lcd_width = <60>;
-	lcd_height = <95>;
-	lcd_pwm_used = <1>;
-	lcd_pwm_ch = <7>;
-	lcd_pwm_freq = <5000>;
-	lcd_pwm_pol = <0>;
-	lcd_pixel_fmt = <0>;
-	lcd_dbi_fmt = <3>;
-	lcd_rgb_order = <0>;
-	lcd_frm = <1>;
-	lcd_gamma_en = <1>;
-	fb_buffer_num = <2>;
-	lcd_backlight = <100>;
-	lcd_dbi_te = <1>;
-	lcd_fps = <60>;
-	lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>;
-	status = "okay";
-}; */
+};
\ No newline at end of file
diff --git a/configs/nezha/linux-5.4/config-5.4 b/configs/nezha/linux-5.4/config-5.4
index 87ab49e..d91578d 100644
--- a/configs/nezha/linux-5.4/config-5.4
+++ b/configs/nezha/linux-5.4/config-5.4
@@ -1368,6 +1368,7 @@ CONFIG_XR829_WLAN=m
 # CONFIG_SPARD_WLAN_SUPPORT is not set
 # CONFIG_BCMDHD is not set
 # CONFIG_AIC_WLAN_SUPPORT is not set
+# CONFIG_RTL8723DS is not set
 # CONFIG_MAC80211_HWSIM is not set
 # CONFIG_USB_NET_RNDIS_WLAN is not set
 # CONFIG_VIRT_WIFI is not set
diff --git a/configs/nezha/sys_config.fex b/configs/nezha/sys_config.fex
index d52f3c1..a9b354e 100755
--- a/configs/nezha/sys_config.fex
+++ b/configs/nezha/sys_config.fex
@@ -23,7 +23,7 @@ debug_mode  = 8
 ;storage_type   = boot medium, 0-nand, 1-sd, 2-emmc, 3-nor, 4-emmc3, 5-spinand -1(defualt)auto scan
 ;----------------------------------------------------------------------------------
 [target]
-storage_type    = 5
+storage_type    = 1
 
 
 ;----------------------------------------------------------------------------------
diff --git a/configs/nezha/uboot-board.dts b/configs/nezha/uboot-board.dts
index 81a521e..1efc8a6 100644
--- a/configs/nezha/uboot-board.dts
+++ b/configs/nezha/uboot-board.dts
@@ -42,7 +42,7 @@
 &pwm2_pin_b {
 	pins = "PD18";
 	muxsel = <0>;
-	function = "gpio_out";
+	function = "gpio_in";
 };
 
 &pwm2 {
@@ -261,57 +261,49 @@
 };
 
 &lcd0 {
-	lcd_used            = <1>;
-
-	lcd_driver_name     = "tft08006";
-	lcd_backlight       = <100>;
-	lcd_if              = <4>;
-
-	lcd_x               = <800>;
-	lcd_y               = <1280>;
-	lcd_width           = <52>;
-	lcd_height          = <52>;
-	lcd_dclk_freq       = <70>;
-
-	lcd_pwm_used        = <1>;
-	lcd_pwm_ch          = <2>;
-	lcd_pwm_freq        = <1000>;
-	lcd_pwm_pol         = <0>;
-	lcd_pwm_max_limit   = <255>;
-
-	lcd_hbp             = <32>;
-	lcd_ht              = <868>;
-	lcd_hspw            = <4>;
-	lcd_vbp             = <12>;
-	lcd_vt              = <1311>;
-	lcd_vspw            = <4>;
-
-	lcd_dsi_if          = <0>;
-	lcd_dsi_lane        = <4>;
-	lcd_lvds_if         = <0>;
-	lcd_lvds_colordepth = <0>;
-	lcd_lvds_mode       = <0>;
-	lcd_frm             = <0>;
-	lcd_hv_clk_phase    = <0>;
-	lcd_hv_sync_polarity= <0>;
-	lcd_io_phase        = <0x0000>;
-	lcd_gamma_en        = <0>;
+	lcd_used        = <1>;
+	lcd_driver_name = "st7701s_rgb";
+
+	lcd_if          = <0>;
+	lcd_hv_if       = <0>;
+
+	lcd_width       = <70>;
+	lcd_height      = <72>;
+	lcd_x           = <480>;
+	lcd_y           = <480>;
+	lcd_dclk_freq   = <19>;
+	lcd_hbp         = <60>;
+	lcd_ht          = <612>;
+	lcd_hspw        = <12>;
+	lcd_vbp         = <18>;
+	lcd_vt          = <520>;
+	lcd_vspw        = <4>;
+
+	lcd_backlight   = <50>;
+	lcd_pwm_used    = <1>;
+	lcd_pwm_ch      = <7>;
+	lcd_pwm_freq    = <20000>;
+	lcd_pwm_pol     = <1>;
 	lcd_bright_curve_en = <0>;
-	lcd_cmap_en         = <0>;
-	lcd_fsync_en        = <0>;
-	lcd_fsync_act_time  = <1000>;
-	lcd_fsync_dis_time  = <1000>;
-	lcd_fsync_pol       = <0>;
-
-	deu_mode            = <0>;
-	lcdgamma4iep        = <22>;
-	smart_color         = <90>;
-
-	lcd_gpio_0 =  <&pio PG 13 GPIO_ACTIVE_HIGH>;
-	pinctrl-0 = <&dsi4lane_pins_a>;
-	pinctrl-1 = <&dsi4lane_pins_b>;
+
+	lcd_frm         = <1>;
+	lcd_io_phase    = <0x0000>;
+	lcd_gamma_en    = <0>;
+	lcd_cmap_en     = <0>;
+	lcd_hv_clk_phase= <0>;
+	lcd_hv_sync_polarity= <0>;
+
+	lcd_power       = "vcc-lcd";
+	lcd_pin_power   = "vcc-pd";
+	lcd_gpio_0      = <&pio PG 13 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_1      = <&pio PE 14 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_2      = <&pio PE 12 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_3      = <&pio PE 15 GPIO_ACTIVE_HIGH>;
+	pinctrl-0       = <&rgb18_pins_a>;
+	pinctrl-1       = <&rgb18_pins_b>;
 };
 
+
 &hdmi {
 	hdmi_used = <1>;
 	hdmi_power_cnt = <0>;
@@ -343,4 +335,4 @@
 	eink = &eink;
 	spi0 = &spi0;
 
-};
+};
\ No newline at end of file

project lichee/linux-5.4/
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 7e788946e..4c02b14b4 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -52,6 +52,8 @@ source "drivers/net/wireless/xr819s/Kconfig"
 source "drivers/net/wireless/uwe5622/Kconfig"
 source "drivers/net/wireless/bcmdhd/Kconfig"
 source "drivers/net/wireless/aic8800/Kconfig"
+source "drivers/net/wireless/rtl8723ds/Kconfig"
+# source "drivers/net/wireless/rtl8189fs/Kconfig"
 
 config PCMCIA_RAYCS
 	tristate "Aviator/Raytheon 2.4GHz wireless support"
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 269cb635d..644069b49 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -32,6 +32,8 @@ obj-$(CONFIG_VIRT_WIFI)	+= virt_wifi.o
 
 obj-$(CONFIG_XR829_WLAN)   += xr829/
 obj-$(CONFIG_XR819S_WLAN)   += xr819s/
+obj-$(CONFIG_RTL8723DS) += rtl8723ds/
+# obj-$(CONFIG_RTL8189FS) += rtl8189fs/
 obj-$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/
 obj-$(CONFIG_BCMDHD) += bcmdhd/
 obj-$(CONFIG_AIC_WLAN_SUPPORT) += aic8800/

设备树修改参考了https://github.com/Tina-Linux/tina-d1x-lichee-rv和sipeed提供的licheerv_d1_compile。

使用以下命令

shell
cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pinmux-pins

发现lcd的io均没有进行初始化

558e48c9-854c-4f5e-8a4c-a8f2cc4e260d-image.png

附上uboot的dts

/*
 * Allwinner Technology CO., Ltd. sun20iw1p1 soc board.
 *
 * soc board support.
 */

&platform {
	eraseflag   = <1>;
	next_work   = <3>;
	debug_mode  = <1>;
};

&target {
	boot_clock = <1008>;	/*CPU boot frequency, Unit: MHz*/
	storage_type = <0xffffffff>; /*boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan*/
	burn_key = <0>;		/*1:support burn key; 0:not support burn key*/
	dragonboard_test = <0>;	/*1:support card boot dragonboard; 0:not support card boot dragonboard*/
};


&charger0 {
	pmu_safe_vol = <3500>;
};


&twi6 {
	clock-frequency = <200000>;
	pinctrl-0 = <&s_twi0_pins_a>;
	no_suspend = <1>;
	twi_drv_used = <1>;
	status = "okay";
};

&pwm2_pin_a {
	pins = "PD18";
	function = "pwm2";
	muxsel = <5>;
	drive-strength = <10>;
	bias-pull-up;
};

&pwm2_pin_b {
	pins = "PD18";
	muxsel = <0>;
	function = "gpio_in";
};

&pwm2 {
	pinctrl-names = "active", "sleep";
	pinctrl-0 = <&pwm2_pin_a>;
	pinctrl-1 = <&pwm2_pin_b>;
	status = "okay";
};

&pwm7_pin_a {
	pins = "PD22";
	function = "pwm7";
	muxsel = <5>;
	drive-strength = <10>;
	bias-pull-up;
};

&pwm7_pin_b {
	pins = "PD22";
	muxsel = <0>;
	function = "gpio_in";
};

&pwm7 {
	pinctrl-names = "active", "sleep";
	pinctrl-0 = <&pwm7_pin_a>;
	pinctrl-1 = <&pwm7_pin_b>;
	status = "okay";
};

&sdc0_pins_a {
	allwinner,pins = "PF0", "PF1", "PF2",
			 "PF3", "PF4", "PF5";
	allwinner,function = "sdc0";
	allwinner,muxsel = <2>;
	allwinner,drive = <3>;
	allwinner,pull = <1>;
	pins = "PF0", "PF1", "PF2",
	       "PF3", "PF4", "PF5";
	function = "sdc0";
	drive-strength = <30>;
	bias-pull-up;
	power-source = <3300>;
};

&sdc0_pins_b {
	pins = "PF0", "PF1", "PF2",
	       "PF3", "PF4", "PF5";
	function = "sdc0";
	drive-strength = <30>;
	bias-pull-up;
	power-source = <1800>;
};

&sdc0_pins_c {
		pins = "PF0", "PF1", "PF2",
			"PF3", "PF4", "PF5";
		function = "gpio_in";

};


&sdc2_pins_a {
	allwinner,pins = "PC2", "PC3", "PC4",
			 "PC5", "PC6", "PC7";
	allwinner,function = "sdc2";
	allwinner,muxsel = <3>;
	allwinner,drive = <3>;
	allwinner,pull = <1>;
	pins = "PC2", "PC3", "PC4",
		"PC5", "PC6", "PC7";
	function = "sdc2";
	drive-strength = <30>;
	bias-pull-up;

};

&sdc2_pins_b {
	pins = "PC2", "PC3", "PC4",
	       "PC5", "PC6", "PC7";
	function = "gpio_in";
};



&nand0_pins_a {
	allwinner,pins = "PC0", "PC1", "PC2", "PC5",
			 "PC8", "PC9", "PC10", "PC11",
			 "PC12", "PC13", "PC14", "PC15",
			 "PC16";
	allwinner,pname= "nand0_we", "nand0_ale","nand0_cle", "nand0_nre",
			 "nand0_d0", "nand0_d1", "nand0_d2", "nand0_d3",
			 "nand0_d4", "nand0_d5", "nand0_d6", "nand0_d7",
			 "nand0_ndqs";
	allwinner,function = "nand0";
	allwinner,muxsel = <2>;
	allwinner,drive = <1>;
	allwinner,pull = <0>;
};

&nand0_pins_b {
	allwinner,pins = "PC4", "PC6", "PC03", "PC07";
	allwinner,pname= "nand0_ce0", "nand0_rb0", "nand0_ce1", "nand0_rb1";
	allwinner,function = "nand0";
	allwinner,muxsel = <2>;
	allwinner,drive = <1>;
	allwinner,pull = <1>;	/* only RB&CE should be pulled up */
};

&nand0_pins_c {
	allwinner,pins = "PC0", "PC1", "PC2", "PC3",
			 "PC4", "PC5", "PC6", "PC7",
			 "PC8", "PC9", "PC10", "PC11",
			 "PC12", "PC13", "PC14", "PC15",
			 "PC16";
	allwinner,function = "io_disabled";
	allwinner,muxsel = <7>;
	allwinner,drive = <1>;
	allwinner,pull = <0>;
};

&card0_boot_para {  /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
	/* reg = <0x0 0x2 0x0 0x0>;  [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */
	device_type = "card0_boot_para";
	card_ctrl = <0x0>;
	card_high_speed = <0x1>;
	card_line = <0x4>;
	pinctrl-0 = <&sdc0_pins_a>;
};

&card2_boot_para {  /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
	/* reg = <0x0 0x3 0x0 0x0>;  [> Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value <] */
	device_type = "card2_boot_para";
	card_ctrl = <0x2>;
	card_high_speed = <0x1>;
	card_line = <0x4>;
	pinctrl-0 = <&sdc2_pins_a>;
	sdc_ex_dly_used = <0x2>;
	sdc_tm4_hs200_max_freq = <150>;
	sdc_tm4_hs400_max_freq = <100>;
};
&gpio_bias {  /* Avoid dtc compiling warnings. @TODO: Developer should modify this to the actual value */
	device_type = "gpio_bias";
};

&nand0 {
	compatible = "allwinner,sun20iw1-nand";
	device_type = "nand0";
	//reg = <0x0 0x04011000 0x0 0x1000>;/* nand0 */
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&nand0_pins_a &nand0_pins_b>;
	pinctrl-1 = <&nand0_pins_c>;
	nand0_regulator1 = "vcc-nand";
	nand0_regulator2 = "none";
	nand0_cache_level = <0x55aaaa55>;
	nand0_flush_cache_num = <0x55aaaa55>;
	nand0_capacity_level = <0x55aaaa55>;
	nand0_id_number_ctl = <0x55aaaa55>;
	nand0_print_level = <0x55aaaa55>;
	nand0_p0 = <0x55aaaa55>;
	nand0_p1 = <0x55aaaa55>;
	nand0_p2 = <0x55aaaa55>;
	nand0_p3 = <0x55aaaa55>;
	chip_code = "sun20iw1";
	status = "disabled";
};

&disp {
	disp_init_enable         = <1>;
	disp_mode                = <0>;

	screen0_output_type      = <1>;
	screen0_output_mode      = <4>;

	screen1_output_type      = <3>;
	screen1_output_mode      = <10>;

	screen1_output_format    = <0>;
	screen1_output_bits      = <0>;
	screen1_output_eotf      = <4>;
	screen1_output_cs        = <257>;
	screen1_output_dvi_hdmi  = <2>;
	screen1_output_range     = <2>;
	screen1_output_scan      = <0>;
	screen1_output_aspect_ratio = <8>;

	dev0_output_type         = <1>;
	dev0_output_mode         = <4>;
	dev0_screen_id           = <0>;
	dev0_do_hpd              = <0>;

	dev1_output_type         = <4>;
	dev1_output_mode         = <10>;
	dev1_screen_id           = <1>;
	dev1_do_hpd              = <1>;

	def_output_dev           = <0>;
	hdmi_mode_check          = <1>;

	fb0_format               = <0>;
	fb0_width                = <0>;
	fb0_height               = <0>;

	fb1_format               = <0>;
	fb1_width                = <0>;
	fb1_height               = <0>;
	chn_cfg_mode             = <1>;

	disp_para_zone           = <1>;
	/*VCC-LCD*/
/*	dc1sw-supply = <&reg_dc1sw>;*/
	/*VCC-DSI*/
/*	eldo3-supply = <&reg_eldo3>;*/
	/*VCC-PD*/
/*	dcdc1-supply = <&reg_dcdc1>;*/
};

&lcd0 {
	lcd_used        = <1>;
	lcd_driver_name = "st7701s_rgb";

	lcd_if          = <0>;
	lcd_hv_if       = <0>;

	lcd_width       = <70>;
	lcd_height      = <72>;
	lcd_x           = <480>;
	lcd_y           = <480>;
	lcd_dclk_freq   = <19>;
	lcd_hbp         = <60>;
	lcd_ht          = <612>;
	lcd_hspw        = <12>;
	lcd_vbp         = <18>;
	lcd_vt          = <520>;
	lcd_vspw        = <4>;

	lcd_backlight   = <50>;
	lcd_pwm_used    = <1>;
	lcd_pwm_ch      = <7>;
	lcd_pwm_freq    = <20000>;
	lcd_pwm_pol     = <1>;
	lcd_bright_curve_en = <0>;

	lcd_frm         = <1>;
	lcd_io_phase    = <0x0000>;
	lcd_gamma_en    = <0>;
	lcd_cmap_en     = <0>;
	lcd_hv_clk_phase= <0>;
	lcd_hv_sync_polarity= <0>;

	lcd_power       = "vcc-lcd";
	lcd_pin_power   = "vcc-pd";
	lcd_gpio_0      = <&pio PG 13 GPIO_ACTIVE_HIGH>;
	lcd_gpio_1      = <&pio PE 14 GPIO_ACTIVE_HIGH>;
	lcd_gpio_2      = <&pio PE 12 GPIO_ACTIVE_HIGH>;
	lcd_gpio_3      = <&pio PE 15 GPIO_ACTIVE_HIGH>;
	pinctrl-0       = <&rgb18_pins_a>;
	pinctrl-1       = <&rgb18_pins_b>;
};


&hdmi {
	hdmi_used = <1>;
	hdmi_power_cnt = <0>;
	hdmi_hdcp_enable = <1>;
	hdmi_hdcp22_enable = <0>;
	hdmi_cec_support = <1>;
	hdmi_cec_super_standby = <0>;

	ddc_en_io_ctrl = <0>;
	power_io_ctrl = <0>;
};

&aliases {
	nand0 = &nand0;
	twi6 = &twi6;
	pwm = &pwm;
	pwm0 = &pwm0;
	pwm1 = &pwm1;
	pwm2 = &pwm2;
	pwm3 = &pwm3;
	pwm4 = &pwm4;
	pwm5 = &pwm5;
	pwm6 = &pwm6;
	pwm7 = &pwm7;
	disp = &disp;
	hdmi = &hdmi;
	lcd0 = &lcd0;
	lcd1 = &lcd1;
	eink = &eink;
	spi0 = &spi0;

};

附上log

[34]HELLO! BOOT0 is starting!
[37]BOOT0 commit : 88480af
[39]set pll start
[41]periph0 has been enabled
[44]set pll end
[45][pmu]: bus read error
[48]board init ok
[50]get_pmu_exist() = -1
[52]ddr_efuse_type: 0x0
[54]trefi:7.8ms
[56][AUTO DEBUG] single rank and full DQ!
[60]ddr_efuse_type: 0x0
[63]trefi:7.8ms
[65][AUTO DEBUG] rank 0 row = 15
[68][AUTO DEBUG] rank 0 bank = 8
[71][AUTO DEBUG] rank 0 page size = 2 KB
[75]DRAM BOOT DRIVE INFO: V0.33
[78]DRAM CLK = 792 MHz
[80]DRAM Type = 3 (2:DDR2,3:DDR3)
[83]DRAMC ZQ value: 0x7b7bfb
[86]DRAM ODT value: 0x42.
[88]ddr_efuse_type: 0x0
[91]DRAM SIZE =512 M
[93]dram_tpr4:0x0
[95]PLL_DDR_CTRL_REG:0xf8004100
[98]DRAM_CLK_REG:0xc0000000
[100][TIMING DEBUG] MR2= 0x18
[105]DRAM simple test OK.
[107]dram size =512
[109]card no is 0
[110]sdcard 0 line count 4
[113][mmc]: mmc driver ver 2021-04-2 16:45
[122][mmc]: Wrong media type 0x0
[125][mmc]: ***Try SD card 0***
[134][mmc]: HSSDR52/SDR25 4 bit
[137][mmc]: 50000000 Hz
[139][mmc]: 59638 MB
[141][mmc]: ***SD/MMC 0 init OK!!!***
[195]Loading boot-pkg Succeed(index=0).
[198]Entry_name        = opensbi
[201]Entry_name        = u-boot
[205]Entry_name        = dtb
[207]mmc not para
[209]Jump to second Boot.

OpenSBI auto-t113-linux-V0.8-2-g053d088
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name          : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs     : 1
Current Hart           : 0
Firmware Base          : 0x41fc0400
Firmware Size          : 75 KB
Runtime SBI Version    : 0.2

MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0    : 0x0000000041fc0000-0x0000000041fdffff (A)
PMP1    : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2    : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3    : 0x0000000000020000-0x0000000000027fff (A,?

U-Boot 2018.05-g24521d6-dirty-config-dirty (Jul 19 2022 - 14:31:38 +0800) Allwinner Technology

[00.296]DRAM:  512 MiB
[00.298]Relocation Offset is: 1dee7000
[00.302]secure enable bit: 0
[00.305]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.311]flash init start
[00.313]workmode = 0,storage type = 1
[00.317][mmc]: mmc driver ver uboot2018:2021-11-19 15:38:00
[00.322][mmc]: get sdc_type fail and use default host:tm1.
[00.328][mmc]: can't find node "mmc0",will add new node
[00.333][mmc]: fdt err returned <no error>
[00.337][mmc]: Using default timing para
[00.341][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.358][mmc]: card_caps:0x3000000a
[00.361][mmc]: host_caps:0x3000003f
[00.364]sunxi flash init ok
[00.367]line:703 init_clocks
[00.370]drv_disp_init
request pwm success, pwm7:pwm7:0x2000c00.
[00.386]drv_disp_init finish
[00.389]boot_gui_init:start
[00.392]set disp.dev2_output_type fail. using defval=0
[00.398]boot_gui_init:finish
[00.418]=====================LCD_panel_init
partno erro : can't find partition bootloader
54 bytes read in 3 ms (17.6 KiB/s)
[00.652]bmp_name=bootlogo.bmp size 3072054
[00.743]=====================LCD_bl_open
[00.747]LCD open finish
3072054 bytes read in 145 ms (20.2 MiB/s)
no support big size bmp[800x1280] on fb[480x480]
[00.813]show bmp on fb failed !-1
[00.849]Loading Environment from SUNXI_FLASH... OK
[00.871]out of usb burn from boot: not need burn key
[00.897]Item0 (Map) magic is bad
[00.900]the secure storage item0 copy0 magic is bad
[00.926]Item0 (Map) magic is bad
[00.929]the secure storage item0 copy1 magic is bad
[00.934]Item0 (Map) magic is bad
partno erro : can't find partition private
root_partition is rootfs
set root to /dev/mmcblk0p5
[00.951]update part info
[00.956]update bootcmd
[00.962]change working_fdt 0x5eaa6da0 to 0x5ea86da0
disable nand error: FDT_ERR_BADPATH
No reserved memory region found in source FDT
[00.993]update dts
noncached_alloc(): addr = 0x5ebf4080
noncached_alloc(): addr = 0x5ebf40c0
noncached_alloc(): addr = 0x5ebf4100
noncached_alloc(): addr = 0x5ebf4940
geth_sys_init:634: get node 'gmac0' error
geth_sys_init fail!
[01.013]Board Net Initialization Failed
[01.017]No ethernet found.
Hit any key to stop autoboot:  0
dsp0:uart config fail
dsp0:gpio init config fail
dsp0:sharespace config fail
dsp0 version is r528-tina-v1.0.0-release-37-g735b6b4-dirty
DSP0 start ok, img length 254860, booting from 0x400660
[01.311]no vendor_boot partition is found
Android's image name: d1-h-nezha
Detect comp gzip
[01.562]
Starting kernel ...

[01.564][mmc]: MMC Device 2 not found
[01.568][mmc]: mmc 2 not find, so not exit
[    0.000000] Linux version 5.4.61 (lewin@mint0) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #55 PREEMPT Tue Jul 19 06:40:47 UTC 2022
[    0.000000] cma: Reserved 8 MiB at 0x000000005f800000
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   DMA32 zone: 1792 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 131072 pages, LIFO batch:31
[    0.000000] elf_hwcap is 0x20112d
[    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: 129280
[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dsp0@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g24521d6-dirty-config-dirty(07/19/2022-14:31:38) mbr_offset=1556480
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 497212K/524288K available (6335K kernel code, 589K rwdata, 2134K rodata, 184K init, 260K bss, 18884K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[    0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts.
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000006] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000023] riscv_timer_clockevent depends on broadcast, but no broadcast function available
[    0.000315] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000933] Console: colour dummy device 80x25
[    0.000969] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000985] pid_max: default: 32768 minimum: 301
[    0.001155] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.001174] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.002739] ASID allocator initialised with 65536 entries
[    0.002892] rcu: Hierarchical SRCU implementation.
[    0.003500] devtmpfs: initialized
[    0.016833] random: get_random_u32 called from bucket_table_alloc.isra.31+0x4e/0x15e with crng_init=0
[    0.017708] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.017738] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
[    0.018119] pinctrl core: initialized pinctrl subsystem
[    0.019368] NET: Registered protocol family 16
[    0.021189] DMA: preallocated 256 KiB pool for atomic allocations
[    0.021790] cpuidle: using governor menu
[    0.064443] rtc_ccu: sunxi ccu init OK
[    0.070747] clock: sunxi ccu init OK
[    0.071591] clock: sunxi ccu init OK
[    0.103615] iommu: Default domain type: Translated
[    0.103782] sunxi iommu: irq = 4
[    0.104861] SCSI subsystem initialized
[    0.105199] usbcore: registered new interface driver usbfs
[    0.105277] usbcore: registered new interface driver hub
[    0.105378] usbcore: registered new device driver usb
[    0.105555] mc: Linux media interface: v0.10
[    0.105623] videodev: Linux video capture interface: v2.00
[    0.106649] sunxi-msgbox-amp 3003000.msgbox: invalid resource
[    0.107438] Advanced Linux Sound Architecture Driver Initialized.
[    0.108048] Bluetooth: Core ver 2.22
[    0.108155] NET: Registered protocol family 31
[    0.108165] Bluetooth: HCI device and connection manager initialized
[    0.108185] Bluetooth: HCI socket layer initialized
[    0.108200] Bluetooth: L2CAP socket layer initialized
[    0.108236] Bluetooth: SCO socket layer initialized
[    0.108521] pwm module init!
[    0.110061] g2d 5410000.g2d: Adding to iommu group 0
[    0.110613] G2D: rcq version initialized.major:250
[    0.111287] input: sunxi-keyboard as /devices/virtual/input/input0
[    0.112676] clocksource: Switched to clocksource riscv_clocksource
[    0.125220] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.140333] thermal_sys: Registered thermal governor 'user_space'
[    0.140338] thermal_sys: Registered thermal governor 'power_allocator'
[    0.140850] NET: Registered protocol family 2
[    0.141602] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.141642] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.141702] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.141749] TCP: Hash tables configured (established 4096 bind 4096)
[    0.141882] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.141921] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.142154] NET: Registered protocol family 1
[    0.144666] Initialise system trusted keyrings
[    0.144878] workingset: timestamp_bits=62 max_order=17 bucket_order=0
[    0.152646] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.173667] Key type asymmetric registered
[    0.173681] Asymmetric key parser 'x509' registered
[    0.173701] io scheduler mq-deadline registered
[    0.173711] io scheduler kyber registered
[    0.173730] atomic64_test: passed
[    0.174922] [DISP]disp_module_init
[    0.175459] disp 5000000.disp: Adding to iommu group 0
[    0.176070] [DISP] disp_init,line:2386:
[    0.176075] smooth display screen:0 type:1 mode:4
[    0.199450] disp 5000000.disp: 5000000.disp supply vcc-lcd not found, using dummy regulator
[    0.199713] disp 5000000.disp: 5000000.disp supply vcc-pd not found, using dummy regulator
[    0.210471] panel name: default_lcd
[    0.210486] panel name: st7701s
[    0.210493] panel name: st7701s_rgb
[    0.210509] panel name: tft08006
[    0.210516] panel name: super_lcd_driver
[    0.210546] display_fb_request,fb_id:0
[    0.219823] Freeing logo buffer memory: 900K
[    0.220267] disp_al_manager_apply ouput_type:1
[    0.220383] [DISP] lcd_clk_config,line:732:
[    0.220395] disp 0, clk: pll(114000000),clk(114000000),dclk(19000000) dsi_rate(114000000)
[    0.220395]      clk real:pll(288000000),clk(288000000),dclk(48000000) dsi_rate(0)
[    0.220774] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
[    0.221687] [DISP]disp_module_init finish
[    0.222541] sunxi_sid_init()551 - insmod ok
[    0.223182] pwm-regulator: supplied by regulator-dummy
[    0.230218] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
[    0.230603] uart uart0: get regulator failed
[    0.230630] uart uart0: uart0 supply uart not found, using dummy regulator
[    0.230986] uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
[    0.231012] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
[    1.032118] printk: console [ttyS0] enabled
[    1.037725] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
[    1.049176] uart uart1: get regulator failed
[    1.054043] uart uart1: uart1 supply uart not found, using dummy regulator
[    1.062088] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI
[    1.072007] misc dump reg init
[    1.076326] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[    1.083611] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed!
[    1.091210] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[    1.098557] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[    1.106001] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[    1.112528] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[    1.119490] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[    1.127257] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1
[    1.135153] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[    1.143326] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[    1.150956] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[    1.157763] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[    1.165332] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0
[    1.173601] [ADDR_MGT] addr_mgt_probe: module version: v1.0.10
[    1.181143] [ADDR_MGT] addr_mgt_probe: success.
[    1.187527] libphy: Fixed MDIO Bus: probed
[    1.192090] CAN device driver interface
[    1.197274] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
[    1.208574] sunxi gmac driver's version: 1.0.0
[    1.213793] gmac-power0: NULL
[    1.217102] gmac-power1: NULL
[    1.220434] gmac-power2: NULL
[    1.225067] Failed to alloc md5
[    1.228604] eth0: Use random mac address
[    1.233419] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.240730] sunxi-ehci: EHCI SUNXI driver
[    1.245834] get ehci0-controller wakeup-source is fail.
[    1.251762] sunxi ehci0-controller don't init wakeup source
[    1.258108] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe000935390, 0x:ffffffd004079000, irq_no:2e
[    1.271680] [sunxi-ehci0]: Not init ehci0
[    1.276576] get ehci1-controller wakeup-source is fail.
[    1.282534] sunxi ehci1-controller don't init wakeup source
[    1.288861] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe000935758, 0x:ffffffd00407d000, irq_no:31
[    1.302437] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
[    1.315015] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator
[    1.327263] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[    1.334571] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[    1.344427] sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
[    1.372722] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[    1.381431] hub 1-0:1.0: USB hub found
[    1.385761] hub 1-0:1.0: 1 port detected
[    1.390931] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.397948] sunxi-ohci: OHCI SUNXI driver
[    1.403045] get ohci0-controller wakeup-source is fail.
[    1.409009] sunxi ohci0-controller don't init wakeup source
[    1.415308] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe000935ee8
[    1.425743] [sunxi-ohci0]: Not init ohci0
[    1.430544] get ohci1-controller wakeup-source is fail.
[    1.436564] sunxi ohci1-controller don't init wakeup source
[    1.442857] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe0009362b0
[    1.453322] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
[    1.465860] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator
[    1.478175] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
[    1.485477] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
[    1.496300] sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400
[    1.577683] hub 2-0:1.0: USB hub found
[    1.581916] hub 2-0:1.0: 1 port detected
[    1.587419] usbcore: registered new interface driver uas
[    1.593632] usbcore: registered new interface driver usb-storage
[    1.600434] usbcore: registered new interface driver ums-alauda
[    1.607217] usbcore: registered new interface driver ums-cypress
[    1.614073] usbcore: registered new interface driver ums-datafab
[    1.620868] usbcore: registered new interface driver ums_eneub6250
[    1.627908] usbcore: registered new interface driver ums-freecom
[    1.634764] usbcore: registered new interface driver ums-isd200
[    1.641472] usbcore: registered new interface driver ums-jumpshot
[    1.648424] usbcore: registered new interface driver ums-karma
[    1.655083] usbcore: registered new interface driver ums-onetouch
[    1.661989] usbcore: registered new interface driver ums-realtek
[    1.668845] usbcore: registered new interface driver ums-sddr09
[    1.675603] usbcore: registered new interface driver ums-sddr55
[    1.682302] usbcore: registered new interface driver ums-usbat
[    1.689431] sunxi_gpadc_init,2151, success
[    1.696246] sunxi-rtc 7090000.rtc: registered as rtc0
[    1.702024] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T18:51:30 UTC (67890)
[    1.711365] sunxi-rtc 7090000.rtc: sunxi rtc probed
[    1.717356] i2c /dev entries driver
[    1.721340] IR NEC protocol handler initialized
[    1.727161] sunxi cedar version 1.1
[    1.731356] sunxi-cedar 1c0e000.ve: Adding to iommu group 0
[    1.737693] VE: install start!!!
[    1.737693]
[    1.743259] VE: cedar-ve the get irq is 6
[    1.743259]
[    1.749613] VE: ve_debug_proc_info:(____ptrval____), data:(____ptrval____), lock:(____ptrval____)
[    1.749613]
[    1.761235] VE: install end!!!
[    1.761235]
[    1.766339] VE: sunxi_cedar_probe
[    1.771641] sunxi-wdt 6011000.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.780833] Bluetooth: HCI UART driver ver 2.3
[    1.785876] Bluetooth: HCI UART protocol H4 registered
[    1.791622] Bluetooth: HCI UART protocol BCSP registered
[    1.797594] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10
[    1.807626] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
[    1.817633] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
[    1.823892] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
[    1.830224] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
[    1.836686] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
[    1.843149] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
[    1.849670] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
[    1.856223] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
[    1.862783] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
[    1.869722] sunxi-mmc 4020000.sdmmc: Got CD GPIO
[    1.875273] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail
[    1.881947] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.893124] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
[    1.913264] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.937668] sunxi-mmc 4020000.sdmmc: detmode:gpio irq
[    1.943421] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.955684] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.21 2021-11-18 10:02)
[    1.965790] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
[    1.972039] sunxi-mmc 4021000.sdmmc: No vmmc regulator found
[    1.978448] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
[    1.984922] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.996519] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
[    2.002984] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
[    2.009505] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
[    2.016158] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
[    2.022752] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
[    2.029353] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[    2.038413] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.050797] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.062011] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[    2.070947] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.082552] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.106920] sunxi-mmc 4021000.sdmmc: detmode:manually by software
[    2.114619] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[    2.121435] random: fast init done
[    2.125711] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator
[    2.136697] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[    2.143630] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.155468] sunxi_led_probe()1749 - start
[    2.160136] sunxi_get_str_of_property()1595 - failed to get the string of propname led_regulator!
[    2.170170] sunxi_register_led_classdev()1483 - led_classdev start
[    2.178459] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.191959] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.202488] sunxi_led_probe()1845 - finish
[    2.207771] usbcore: registered new interface driver usbhid
[    2.214108] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[    2.225714] usbhid: USB HID core driver
[    2.230167] rpmsg_client_dsp_standby 3003000.msgbox.sunxi,dsp-power-msgbox.512.256: new channel: 0x200 -> 0x100!
[    2.241531] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.248457] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[    2.260110] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.267756] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.274730] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[    2.286380] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.293224] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    2.305406] usbcore: registered new interface driver snd-usb-audio
[    2.316077] sunxi-daudio 2034000.daudio: regulator missing or invalid
[    2.323463] mmc0: new high speed SDXC card at address b368
[    2.330911] [AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:19, mic2gain:19 pa_msleep:120, pa_level:1, pa_pwr_level:1
[    2.330911]
[    2.348920] mmcblk0: mmc0:b368 NCard 58.2 GiB
[    2.355990] [AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0
[    2.367631] [AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished
[    2.376012]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8
[    2.382366] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present!
[    2.394883] [SNDCODEC][sunxi_card_init][583]:card init finished
[    2.403777] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
[    2.415084] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input1
[    2.427194] [SNDCODEC][sunxi_card_dev_probe][836]:register card finished
[    2.435461] sunxi-rpaf-dsp soc@3000000:rpaf-dsp@203034c: register device finished!
[    2.444011] sunxi-rpaf-dsp soc@3000000:rpaf-dsp@203034c: [rpaf_dsp0] probe finished!
[    2.453076] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: id:sunxi,dsp-msgbox new channel: 0x202 -> 0x102!
[    2.464658] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: rpmsg hifi[0] client driver is probed
[    2.476683] NET: Registered protocol family 10
[    2.483173] Segment Routing with IPv6
[    2.487465] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.495006] NET: Registered protocol family 17
[    2.500061] can: controller area network core (rev 20170425 abi 9)
[    2.507161] NET: Registered protocol family 29
[    2.512171] can: raw protocol (rev 20170425)
[    2.516974] can: broadcast manager protocol (rev 20170425 t)
[    2.523359] can: netlink gateway (rev 20190810) max_hops=1
[    2.529802] Bluetooth: RFCOMM TTY layer initialized
[    2.535385] Bluetooth: RFCOMM socket layer initialized
[    2.541192] Bluetooth: RFCOMM ver 1.11
[    2.546439] Loading compiled-in X.509 certificates
[    2.554161] HDMI 2.0 driver init start!
[    2.558496] boot_hdmi=false
[    2.561673] ERROR: pinctrl_get for HDMI2.0 DDC fail
[    2.568735] HDMI2.0 module init end
[    2.598596] sunxi-i2c sunxi-i2c2: sunxi-i2c2 supply twi not found, using dummy regulator
[    2.614460] sunxi-i2c sunxi-i2c2: probe success
[    2.623249] debugfs: Directory '2031000.dmic' with parent 'snddmic' already present!
[    2.633448] sunxi-audio-card 2031060.sounddmic: dmic-hifi <-> 2031000.dmic mapping ok
[    2.643639] debugfs: Directory '2034000.daudio' with parent 'sndhdmi' already present!
[    2.654320] sunxi-audio-card 20340a0.sounddaudio2: 20340a4.hdmiaudio <-> 2034000.daudio mapping ok
[    2.666120] get det_vbus is fail, -84
[    2.670204] get id is fail, -84
[    2.675067] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.685997] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.693628] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.703338] clk: Not disabling unused clocks
[    2.708125] ALSA device list:
[    2.711444]   #0: audiocodec
[    2.714786] cfg80211: failed to load regulatory.db
[    2.720224]   #1: snddmic
[    2.723211]   #2: sndhdmi
[    2.726163] alloc_fd: slot 0 not NULL!
[    2.738783] VFS: Mounted root (squashfs filesystem) readonly on device 179:5.
[    2.752289] devtmpfs: mounted
[    2.755883] Freeing unused kernel memory: 184K
[    2.760863] This architecture does not have kernel memory protection.
[    2.768162] Run /sbin/init as init process
[    3.173129] [SNDCODEC][sunxi_check_hs_detect_status][191]:plugin --> switch:3
[    3.463374] init: Console is alive
[    3.467475] init: - watchdog -
[    3.471019] init: - preinit -
[    3.764555]
[    3.764555] insmod_device_driver
[    3.764555]
[    3.850887] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
[    3.864648] device_chose finished 139!
[    3.901635] random: procd: uninitialized urandom read (4 bytes read)
formating /dev/by-name/UDISK to ext4
/etc/preinit: line 1: mkfs.ext4: not found
[    4.708354] mount_root: mounting /dev/root
[    4.714028] mount_root: loading kmods from internal overlay
[    4.847549] block: attempting to load /etc/config/fstab
[    4.874699] block: extroot: device not present, retrying in 5 seconds
[    6.462711] hdmi_hpd_sys_config_release
[    9.977010] block: extroot: cannot find device UDISK
[    9.994357] procd: - early -
[    9.997794] procd: - watchdog -
[   10.038017] random: procd: uninitialized urandom read (4 bytes read)
[   10.405018] procd: - watchdog -
[   10.408840] procd: - ubus -
[   10.412605] procd (1): /proc/115/oom_adj is deprecated, please use /proc/115/oom_score_adj instead.
[   10.492992] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.673319] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.711807] procd: - init -
Please press Enter to activate this console.
[   11.942826] fuse: init (API version 7.31)
[   12.103643] file system registered
[   12.269745] usbcore: registered new interface driver uvcvideo
[   12.283758] configfs-gadget 4100000.udc-controller: failed to start g1: -19
[   12.299687] USB Video Class driver (1.1.1)
[   12.672908] read descriptors
[   12.676160] read strings
[   14.928657] ======== XRADIO WIFI OPEN ========
[   14.934590] [XRADIO] Driver Label:XR_V02.16.85_P2P_HT40_01.31
[   14.941754] [XRADIO] Allocated hw_priv @ (____ptrval____)
[   14.949305] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1
[   14.966950] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success
[   15.236848] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[   15.250220] [XRADIO] Detect SDIO card 1
[   15.262866] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[   15.282783] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   15.313405] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   15.328617] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   15.352616] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[   15.364501] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[   15.376755] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[   15.389686] mmc1: new high speed SDIO card at address 0001
[   15.397062] [SBUS] XRadio Device:sdio clk=50000000
[   15.404282] [XRADIO] XRADIO_HW_REV 1.0 detected.
[   15.513467] [XRADIO] xradio_update_dpllctrl: DPLL_CTRL Sync=0x00c00000.
[   15.611083] [XRADIO] Bootloader complete
[   20.877195] [XRADIO_ERR] xradio_firmware: Timeout waiting for FIFO.
[   20.884324] [XRADIO_ERR] xradio_load_firmware: can't download firmware.
[   20.891736] [XRADIO_ERR] xradio_load_firmware failed(-110).
[   20.899256] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success
[   21.018853] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   21.025639] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   21.032389] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   21.039163] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   21.046188] mmc1: card 0001 removed
[   21.050241] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[   21.061591] [XRADIO] Remove SDIO card 1
[   21.077537] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[   21.088757] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[   21.103845] xradio_core_init failed (-110)!
[   21.108968] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   21.146303] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[   21.154041] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[   21.160876] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   21.179328] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   21.191051] xt_time: kernel timezone is -0000
[   21.204984] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   21.212543] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   21.220132] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   21.227718] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   21.234503] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[   21.246720] Error: Driver 'gt9xxnew_ts' is already registered, aborting...
[   22.527620] ======== XRADIO WIFI OPEN ========
[   22.533224] [XRADIO] Driver Label:XR_V02.16.85_P2P_HT40_01.31
[   22.540007] [XRADIO] Allocated hw_priv @ (____ptrval____)
[   22.552787] sunxi-rfkill soc@3000000:rfkill@0: bus_index: 1
[   22.575991] sunxi-rfkill soc@3000000:rfkill@0: wlan power on success
[   22.783256] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[   22.794387] [XRADIO] Detect SDIO card 1
[   22.802821] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[   22.822748] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   22.847646] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   22.862263] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   22.884874] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[   22.896490] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[   22.908375] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[   22.920908] mmc1: new high speed SDIO card at address 0001
[   22.927920] [SBUS] XRadio Device:sdio clk=50000000
[   22.942837] [XRADIO] XRADIO_HW_REV 1.0 detected.
[   22.993264] [XRADIO] xradio_update_dpllctrl: DPLL_CTRL Sync=0x00c00000.
[   23.032628] [XRADIO] Bootloader complete
[   28.041823] [XRADIO_ERR] xradio_firmware: Timeout waiting for FIFO.
[   28.048932] [XRADIO_ERR] xradio_load_firmware: can't download firmware.
[   28.056478] [XRADIO_ERR] xradio_load_firmware failed(-110).
[   28.064044] sunxi-rfkill soc@3000000:rfkill@0: wlan power off success
[   28.182833] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   28.189574] [XRADIO] Remove SDIO card 1
[   28.189590] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   28.200632] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   28.207411] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 7, RTO !!
[   28.214429] mmc1: card 0001 removed
[   28.218483] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[   28.241464] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[   28.252755] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[   28.263892] xradio_core_init failed (-110)!
[   28.272792] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   28.306349] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[   28.314154] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[   28.320990] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   28.336182] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   28.360200] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
kmodloader done
[   28.370678] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   28.378356] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   28.386394] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[   28.434655] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
Trying to connect to SWUpdate...
[   31.136964] [SNDCODEC][sunxi_card_hw_params][620]:stream_flag: 0
[   33.122757] usb1-vbus: disabling
[   33.126538] vdd_3v3: disabling
[   43.200273] random: crng init done
[   43.204070] random: 6 urandom warning(s) missed due to ratelimiting



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

 _____  _              __     _
|_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
  | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
  | |  | || | || _ |  |_____||_||_|_||___||_,_|
  |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
 ----------------------------------------------
 Tina Linux (Neptune, 61CC0487)
 ----------------------------------------------
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# cat /sys/class/d
devlink/  disp/     dma/
root@TinaLinux:/# cat /sys/kernel/debug/
asoc/               dma_buf/            mmc0/               sunxi_leds/
bdi/                enc_test/           mmc1/               suspend_stats
block/              extfrag/            mtd/                ubi/
bluetooth/          fault_around_bytes  pinctrl/            ubifs/
clear_warn_once     gpio                pm_qos/             usb/
clk/                hid/                pwm                 wakeup_sources
device_component/   ieee80211/          regmap/
devices_deferred    ion/                regulator/
dispdbg/            memblock/           sleep_time
root@TinaLinux:/# cat /sys/kernel/debug/p
pinctrl/  pm_qos/   pwm
root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pin
pinconf-groups    pingroups         pinmux-pins
pinconf-pins      pinmux-functions  pins
root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pin
pinconf-groups    pingroups         pinmux-pins
pinconf-pins      pinmux-functions  pins
root@TinaLinux:/# cat /sys/kernel/debug/pinctrl/2000000.pinctrl/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner|gpio_owner (strict) hog?
pin 32 (PB0): device 2502800.twi function gpio_in group PB0
pin 33 (PB1): device 2502800.twi function gpio_in group PB1
pin 34 (PB2): UNCLAIMED
pin 35 (PB3): UNCLAIMED
pin 36 (PB4): UNCLAIMED
pin 37 (PB5): UNCLAIMED
pin 38 (PB6): UNCLAIMED
pin 39 (PB7): UNCLAIMED
pin 40 (PB8): device 2500000.uart function uart0 group PB8
pin 41 (PB9): device 2500000.uart function uart0 group PB9
pin 42 (PB10): UNCLAIMED
pin 43 (PB11): device 2031000.dmic function io_disabled group PB11
pin 44 (PB12): UNCLAIMED
pin 64 (PC0): device 2008000.ledc function ledc group PC0
pin 65 (PC1): UNCLAIMED
pin 66 (PC2): UNCLAIMED
pin 67 (PC3): UNCLAIMED
pin 68 (PC4): UNCLAIMED
pin 69 (PC5): UNCLAIMED
pin 70 (PC6): UNCLAIMED
pin 71 (PC7): UNCLAIMED
pin 96 (PD0): UNCLAIMED
pin 97 (PD1): UNCLAIMED
pin 98 (PD2): UNCLAIMED
pin 99 (PD3): UNCLAIMED
pin 100 (PD4): UNCLAIMED
pin 101 (PD5): UNCLAIMED
pin 102 (PD6): UNCLAIMED
pin 103 (PD7): UNCLAIMED
pin 104 (PD8): UNCLAIMED
pin 105 (PD9): UNCLAIMED
pin 106 (PD10): UNCLAIMED
pin 107 (PD11): UNCLAIMED
pin 108 (PD12): UNCLAIMED
pin 109 (PD13): UNCLAIMED
pin 110 (PD14): UNCLAIMED
pin 111 (PD15): UNCLAIMED
pin 112 (PD16): UNCLAIMED
pin 113 (PD17): UNCLAIMED
pin 114 (PD18): UNCLAIMED
pin 115 (PD19): UNCLAIMED
pin 116 (PD20): UNCLAIMED
pin 117 (PD21): UNCLAIMED
pin 118 (PD22): UNCLAIMED
pin 128 (PE0): device 4500000.eth function gmac0 group PE0
pin 129 (PE1): device 4500000.eth function gmac0 group PE1
pin 130 (PE2): device 4500000.eth function gmac0 group PE2
pin 131 (PE3): device 4500000.eth function gmac0 group PE3
pin 132 (PE4): device 4500000.eth function gmac0 group PE4
pin 133 (PE5): device 4500000.eth function gmac0 group PE5
pin 134 (PE6): device 4500000.eth function gmac0 group PE6
pin 135 (PE7): device 4500000.eth function gmac0 group PE7
pin 136 (PE8): device 4500000.eth function gmac0 group PE8
pin 137 (PE9): device 4500000.eth function gmac0 group PE9
pin 138 (PE10): UNCLAIMED
pin 139 (PE11): UNCLAIMED
pin 140 (PE12): UNCLAIMED
pin 141 (PE13): UNCLAIMED
pin 142 (PE14): UNCLAIMED
pin 143 (PE15): UNCLAIMED
pin 144 (PE16): GPIO 2000000.pinctrl:144
pin 145 (PE17): device 2031000.dmic function io_disabled group PE17
pin 160 (PF0): device 4020000.sdmmc function sdc0 group PF0
pin 161 (PF1): device 4020000.sdmmc function sdc0 group PF1
pin 162 (PF2): device 4020000.sdmmc function sdc0 group PF2
pin 163 (PF3): device 4020000.sdmmc function sdc0 group PF3
pin 164 (PF4): device 4020000.sdmmc function sdc0 group PF4
pin 165 (PF5): device 4020000.sdmmc function sdc0 group PF5
pin 166 (PF6): GPIO 2000000.pinctrl:166
pin 192 (PG0): device 4021000.sdmmc function gpio_in group PG0
pin 193 (PG1): device 4021000.sdmmc function gpio_in group PG1
pin 194 (PG2): device 4021000.sdmmc function gpio_in group PG2
pin 195 (PG3): device 4021000.sdmmc function gpio_in group PG3
pin 196 (PG4): device 4021000.sdmmc function gpio_in group PG4
pin 197 (PG5): device 4021000.sdmmc function gpio_in group PG5
pin 198 (PG6): device 2500400.uart function uart1 group PG6
pin 199 (PG7): device 2500400.uart function uart1 group PG7
pin 200 (PG8): device 2500400.uart function uart1 group PG8
pin 201 (PG9): device 2500400.uart function uart1 group PG9
pin 202 (PG10): GPIO 2000000.pinctrl:202
pin 203 (PG11): UNCLAIMED
pin 204 (PG12): GPIO 2000000.pinctrl:204
pin 205 (PG13): UNCLAIMED
pin 206 (PG14): UNCLAIMED
pin 207 (PG15): UNCLAIMED
pin 208 (PG16): UNCLAIMED
pin 209 (PG17): UNCLAIMED
pin 210 (PG18): GPIO 2000000.pinctrl:210
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#

是否遗漏某些地方配置不当或者设备树修改错误了?

使用的是sun20iw1p1.dtsi里面的`rgb18_pins_a`

### 初步分析

好像是因为没在linux源码仓库添加st7701_rgb的驱动。

先试试加上st7701_rgb的驱动

即使改成了rgb18_20_pins_a ,也没能将io初始化

pin 140 (PE12): UNCLAIMED
pin 141 (PE13): UNCLAIMED
pin 142 (PE14): UNCLAIMED
pin 143 (PE15): UNCLAIMED

感觉 st7701s_rgb.c 没有编译,你看下

find . -name st7701s_rgb.o

实际上也编译进去了

45c7d4bc-7777-4061-81eb-3bffc7062537-image.png

### 再次尝试

使用仓库:https://github.com/Tina-Linux/tina-d1x-lichee-rv,编译依旧不通过

bf80dd23-02a5-4d68-b3b5-c7e2c4b670c3-image.png

也尝试针对你仓库的代码,修改以下文件

tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts
tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile
tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig
tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c
tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h
tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c
tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.h

结果 lcd的io也是没有初始化


###  再再尝试

看到有大佬分析:**lcd rgb gpio是在你们屏驱动st7701s_rgb中调用sunxi_lcd_pin_cfg(sel, 1);初始化的,可以跟下调用流程**,试一下发现连这个printk都没有打印,好像都没有进入probe

d2437efd-8cf4-4d10-b5ea-9a0bb16e4b4c-image.png

开机过程中在uboot初始化lcd后,kernel是不是走lcd初始化流程的,进入内核后,休眠唤醒一下lcd,看看pin脚状态有没有变化

mount -t debugfs none /sys/kernel/debug
cd /sys/kernel/debug/dispdbg
//休眠
echo suspend > command; echo disp0 > name; echo 1 > start
//唤醒
echo resume > command; echo disp0 > name; echo 1 > start

使用以上指令,lcd部分管脚配置成功了。lcd_gpio_0、lcd_gpio_1、lcd_gpio_2、lcd_gpio_3,这四个gpio没有初始化正常。


d2437efd-8cf4-4d10-b5ea-9a0bb16e4b4c-image_20220916-1007.png


以下是执行唤醒lcd的log

7cd47836-46d1-43b6-952c-bcbe7e722119-image.png

lcd的显示情况如下:


303eca0d-a73e-404d-9f84-5ec56973f8ef-微信图片_20220721100620.jpg

### 最终结果

1. 将uboot-board.dts的lcd注释掉,colorbar不在闪屏。

2. lcd_gpio_0、lcd_gpio_1、lcd_gpio_2、lcd_gpio_3,依旧没能初始化。原因未知。

目前显示效果如下:

ecf31478-8bf1-40a2-b8cc-6edeed978807-e9494f7258470325eb2c649386d3d20.jpg

以下是完整的patch, 在tina v2.0验证成功。

Index: tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts
===================================================================
--- tina-d1-h.orig/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts
+++ tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/board.dts
@@ -15,7 +15,6 @@
 	aliases {
 		dsp0 = &dsp0;
 		dsp0_gpio_int= &dsp0_gpio_int;
-		gmac0 = &gmac0;
 	};
 
 	dsp0: dsp0 {
@@ -31,7 +30,7 @@
 
 	reg_vdd_cpu: vdd-cpu {
 		compatible = "sunxi-pwm-regulator";
-		pwms = <&pwm 0 5000 1>;
+		pwms = <&pwm 0 5000 0>;
 		regulator-name = "vdd_cpu";
 		regulator-min-microvolt = <810000>;
 		regulator-max-microvolt = <1160000>;
@@ -47,7 +46,15 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-enable-ramp-delay = <1000>;
-		gpio = <&pio PD 19 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	reg_3v3: vdd_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-enable-ramp-delay = <1000>;
 		enable-active-high;
 	};
 };
@@ -58,8 +65,7 @@
 
 &pio {
 	sdc0_pins_a: sdc0@0 {
-		allwinner,pins = "PF0", "PF1", "PF2",
-				 "PF3", "PF4", "PF5";
+		allwinner,pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
 		allwinner,function = "sdc0";
 		allwinner,muxsel = <2>;
 		allwinner,drive = <3>;
@@ -74,8 +80,7 @@
 
 
 	sdc0_pins_b: sdc0@1 {
-		pins = "PF0", "PF1", "PF2",
-		       "PF3", "PF4", "PF5";
+		pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
 		function = "sdc0";
 		drive-strength = <30>;
 		bias-pull-up;
@@ -83,8 +88,7 @@
 	};
 
 	sdc0_pins_c: sdc0@2 {
-		pins = "PF0", "PF1", "PF2",
-			"PF3", "PF4", "PF5";
+		pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
 		function = "gpio_in";
 	};
 
@@ -97,8 +101,7 @@
 	};
 
 	sdc0_pins_e: sdc0@4 {
-		pins = "PF0", "PF1", "PF3",
-			"PF5";
+		pins = "PF0", "PF1", "PF3", "PF5";
 		function = "jtag";
 		drive-strength = <10>;
 		bias-pull-up;
@@ -106,36 +109,31 @@
 
 
 	sdc1_pins_a: sdc1@0 {
-		pins = "PG0", "PG1", "PG2",
-		       "PG3", "PG4", "PG5";
+		pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
 		function = "sdc1";
 		drive-strength = <30>;
 		bias-pull-up;
 	};
 
 	sdc1_pins_b: sdc1@1 {
-		pins = "PG0", "PG1", "PG2",
-		       "PG3", "PG4", "PG5";
+		pins = "PG0", "PG1", "PG2", "PG3", "PG4", "PG5";
 			function = "gpio_in";
 	};
 
 	sdc2_pins_a: sdc2@0 {
-		allwinner,pins = "PC2", "PC3", "PC4",
-				 "PC5", "PC6", "PC7";
+		allwinner,pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7";
 		allwinner,function = "sdc2";
 		allwinner,muxsel = <3>;
 		allwinner,drive = <3>;
 		allwinner,pull = <1>;
-		pins = "PC2", "PC3", "PC4",
-			"PC5", "PC6", "PC7";
+		pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7";
 		function = "sdc2";
 		drive-strength = <30>;
 		bias-pull-up;
 	};
 
 	sdc2_pins_b: sdc2@1 {
-		pins = "PC2", "PC3", "PC4",
-		       "PC5", "PC6", "PC7";
+		pins = "PC2", "PC3", "PC4", "PC5", "PC6", "PC7";
 		function = "gpio_in";
 	};
 
@@ -234,62 +232,42 @@
 
 	gmac_pins_a: gmac@0 {
 		pins = "PE0", "PE1", "PE2", "PE3",
-		       "PE4", "PE5", "PE6", "PE7",
-		       "PE8", "PE9", "PE10", "PE11",
-		       "PE12", "PE13", "PE14", "PE15";
+				"PE4", "PE5", "PE6", "PE7",
+				"PE8", "PE9";
 		function = "gmac0";
-		muxsel = <8>; /* for uboot driver */
 		drive-strength = <10>;
 	};
 
 	gmac_pins_b: gmac@1 {
 		pins = "PE0", "PE1", "PE2", "PE3",
-		       "PE4", "PE5", "PE6", "PE7",
-		       "PE8", "PE9", "PE10", "PE11",
-		       "PE12", "PE13", "PE14", "PE15";
+				"PE4", "PE5", "PE6", "PE7",
+				"PE8", "PE9";
 		function = "gpio_in";
 	};
 
 	dmic_pins_a: dmic@0 {
 		/* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */
-		pins = "PE17", "PB11", "PB10", "PD17";
+		pins = "PE17", "PB11";
 		function = "dmic";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
 	dmic_pins_b: dmic@1 {
-		pins = "PE17", "PB11", "PB10", "PD17";
+		pins = "PE17", "PB11";
 		function = "io_disabled";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
 	daudio0_pins_a: daudio0@0 {
-		/* MCLK, BCLK, LRCK */
-		pins = "PE17", "PE16", "PE15";
+		pins = "PE17", "PE16", "PE15", "PE14", "PE13";
 		function = "i2s0";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
-	daudio0_pins_b: daudio0@1 {
-		/* DIN0 */
-		pins = "PE14";
-		function = "i2s0_din";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio0_pins_c: daudio0@2 {
-		/* DOUT0 */
-		pins = "PE13";
-		function = "i2s0_dout";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio0_pins_d: daudio0_sleep@0 {
+	daudio0_pins_b: daudio0_sleep@0 {
 		pins = "PE17", "PE16", "PE15", "PE14", "PE13";
 		function = "io_disabled";
 		drive-strength = <20>;
@@ -297,30 +275,13 @@
 	};
 
 	daudio1_pins_a: daudio1@0 {
-		/* MCLK, LRCK, BCLK */
-		pins = "PG11", "PG12", "PG13";
+		pins = "PG11", "PG12", "PG13", "PG14", "PG15";
 		function = "i2s1";
 		drive-strength = <20>;
 		bias-disable;
 	};
 
-	daudio1_pins_b: daudio1@1 {
-		/* DIN0 */
-		pins = "PG14";
-		function = "i2s1_din";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio1_pins_c: daudio1@2 {
-		/* DOUT0 */
-		pins = "PG15";
-		function = "i2s1_dout";
-		drive-strength = <20>;
-		bias-disable;
-	};
-
-	daudio1_pins_d: daudio1_sleep@0 {
+	daudio1_pins_b: daudio1_sleep@0 {
 		pins = "PG11", "PG12", "PG13", "PG14", "PG15";
 		function = "io_disabled";
 		drive-strength = <20>;
@@ -374,7 +335,7 @@
 	};
 
 	spi0_pins_a: spi0@0 {
-		pins = "PC2", "PC4", "PC5"; /* clk, mosi, miso */
+		pins = "PC2", "PC4", "PC5","PC7", "PC6"; /*clk mosi miso hold wp*/
 		function = "spi0";
 		muxsel = <2>;
 		drive-strength = <10>;
@@ -385,7 +346,7 @@
 		function = "spi0";
 		muxsel = <2>;
 		drive-strength = <10>;
-		bias-pull-up;   /* cs, hold, wp should be pulled up */
+		bias-pull-up;   /* only CS should be pulled up */
 	};
 
 	spi0_pins_c: spi0@2 {
@@ -396,16 +357,16 @@
 	};
 
 	spi1_pins_a: spi1@0 {
-		pins = "PD11", "PD12", "PD13"; /* clk, mosi, miso */
+		pins = "PD11", "PD12", "PD13","PD14", "PD15"; /*clk mosi miso hold wp*/
 		function = "spi1";
 		drive-strength = <10>;
 	};
 
 	spi1_pins_b: spi1@1 {
-		pins = "PD10", "PD14", "PD15";
+		pins = "PD10";
 		function = "spi1";
 		drive-strength = <10>;
-		bias-pull-up;   /* cs, hold, wp should be pulled up */
+		bias-pull-up;   // only CS should be pulled up
 	};
 
 	spi1_pins_c: spi1@2 {
@@ -447,9 +408,9 @@
 
 	pwm2_pin_b: pwm2@1 {
 		pins = "PD18";
-		function = "gpio_out";
+		function = "gpio_in";
 	};
-/*
+
 	pwm7_pin_a: pwm7@0 {
 		pins = "PD22";
 		function = "pwm7";
@@ -461,7 +422,6 @@
 		pins = "PD22";
 		function = "gpio_in";
 	};
-*/
 
 	s_cir0_pins_a: s_cir@0 {
 		pins = "PB12";
@@ -486,6 +446,45 @@
 		pins = "PB0";
 		function = "gpio_in";
 	};
+
+	rgb18_20_pins_a: rgb18_20@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 = <20>;
+		bias-disable;
+	};
+
+	rgb18_20_pins_b: rgb18_20@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;
+	};
+
+	rgb18_10_pins_a: rgb18_10@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 = <10>;
+		bias-disable;
+	};
+
+	rgb18_10_pins_b: rgb18_10@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;
+	};
+
 };
 
 &uart0 {
@@ -510,11 +509,11 @@
 };
 
 &uart3 {
-	compatible = "allwinner,sun20iw1-dsp-uart";
+	/*compatible = "allwinner,sun20iw1-dsp-uart";*/
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&uart3_pins_a>;
 	pinctrl-1 = <&uart3_pins_a>;
-	status = "okay";
+	status = "disabled";
 };
 
 &soc {
@@ -557,12 +556,12 @@
 		compatible    = "allwinner,sunxi-rfkill";
 		chip_en;
 		power_en;
-		pinctrl-0 = <&wlan_pins_a>;
-		pinctrl-names = "default";
 		status        = "okay";
 
 		wlan: wlan@0 {
 			compatible    = "allwinner,sunxi-wlan";
+			pinctrl-0 = <&wlan_pins_a>;
+			pinctrl-names = "default";
 			clock-names = "32k-fanout1";
 			clocks = <&ccu CLK_FANOUT1_OUT>;
 			wlan_busnum    = <0x1>;
@@ -578,6 +577,8 @@
 
 		bt: bt@0 {
 			compatible    = "allwinner,sunxi-bt";
+			pinctrl-0 = <&wlan_pins_a>;
+			pinctrl-names = "default";
 			clock-names = "32k-fanout1";
 			clocks = <&ccu CLK_FANOUT1_OUT>;
 			/*bt_power_num = <0x01>;*/
@@ -590,13 +591,13 @@
 		};
 	};
 
-	btlpm: btlpm@0 {
+	/*btlpm: btlpm@0 {
 		compatible  = "allwinner,sunxi-btlpm";
 		uart_index  = <0x1>;
 		bt_wake     = <&pio PG 16 GPIO_ACTIVE_HIGH>;
 		bt_hostwake = <&pio PG 17 GPIO_ACTIVE_HIGH>;
 		status      = "okay";
-	};
+	};*/
 
 	addr_mgt: addr_mgt@0 {
 		compatible     = "allwinner,sunxi-addr_mgt";
@@ -750,7 +751,7 @@ tvd_row*tvd_column is the total tvd chan
 	mic2gain 	= <0x13>;
 	mic3gain 	= <0x13>;
 	/* ADC/DAC DRC/HPF func enabled */
-        /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */
+	/* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */
 	adcdrc_cfg 	= <0x0>;
 	adchpf_cfg 	= <0x1>;
 	dacdrc_cfg 	= <0x0>;
@@ -826,8 +827,8 @@ tvd_row*tvd_column is the total tvd chan
 	pcm_lrck_period = <0x80>;
 	slot_width_select = <0x20>;
 	pinctrl-names   = "default", "sleep";
-	pinctrl-0       = <&daudio0_pins_a &daudio0_pins_b &daudio0_pins_c>;
-	pinctrl-1       = <&daudio0_pins_d>;
+	pinctrl-0       = <&daudio0_pins_a>;
+	pinctrl-1       = <&daudio0_pins_b>;
 	pinctrl_used	= <0x0>;
 	status = "disabled";
 };
@@ -853,18 +854,18 @@ tvd_row*tvd_column is the total tvd chan
 };
 
 &daudio1 {
-	mclk_div 	= <0x01>;
-	frametype 	= <0x00>;
-	tdm_config 	= <0x01>;
-	sign_extend 	= <0x00>;
-	msb_lsb_first 	= <0x00>;
-	pcm_lrck_period = <0x80>;
+	mclk_div          = <0x01>;
+	frametype         = <0x00>;
+	tdm_config        = <0x01>;
+	sign_extend       = <0x00>;
+	msb_lsb_first     = <0x00>;
+	pcm_lrck_period   = <0x80>;
 	slot_width_select = <0x20>;
-	pinctrl-names   = "default", "sleep";
-	pinctrl-0       = <&daudio1_pins_a &daudio1_pins_b &daudio1_pins_c>;
-	pinctrl-1       = <&daudio1_pins_d>;
-	pinctrl_used	= <0x0>;
-	status = "disabled";
+	pinctrl-names     = "default", "sleep";
+	pinctrl-0         = <&daudio1_pins_a>;
+	pinctrl-1         = <&daudio1_pins_b>;
+	pinctrl_used      = <0x0>;
+	status            = "disabled";
 };
 
 &sounddaudio1 {
@@ -930,12 +931,10 @@ tvd_row*tvd_column is the total tvd chan
  */
 &usbc0 {
 	device_type = "usbc0";
-	usb_port_type = <0x2>;
+	usb_port_type = <0x0>;
 	usb_detect_type = <0x1>;
 	usb_detect_mode = <0>;
-	usb_id_gpio = <&pio PD 21 GPIO_ACTIVE_HIGH>;
 	enable-active-high;
-	usb_det_vbus_gpio = <&pio PD 20 GPIO_ACTIVE_HIGH>;
 	usb_wakeup_suspend = <0>;
 	usb_serial_unique = <0>;
 	usb_serial_number = "20080411";
@@ -997,43 +996,20 @@ tvd_row*tvd_column is the total tvd chan
 	dma-names = "tx", "rx";
 	status = "okay";
 
-	/* pcf8574-usage:
-	 * only use gpio0~7, 0 means PP0.
-	 * pin set:
-	 * gpios = <&pcf8574 0 GPIO_ACTIVE_LOW>;
-	 * interrupt set:
-	 * interrupt-parent = <&pcf8574>;
-	 * interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
-	 */
-	pcf8574: gpio@38 {
-		compatible = "nxp,pcf8574";
-		reg = <0x38>;
-		gpio_base = <2020>;
-		gpio-controller;
-		#gpio-cells = <2>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-		interrupt-parent = <&pio>;
-		interrupts = <PB 2 IRQ_TYPE_EDGE_FALLING>;
+	focaltech@48{
+		compatible = "focaltech,fts";
 		status = "okay";
+		reg = <0x48>;
+		interrupt-parent = <&pio>;
+		interrupts = <PG 14 IRQ_TYPE_LEVEL_LOW>;
+		focaltech,reset-gpio = <&pio PG 15 GPIO_ACTIVE_HIGH>;
+		focaltech,irq-gpio = <&pio PG 14 IRQ_TYPE_LEVEL_LOW>;
+		focaltech,max-touch-number = <2>;
+		focaltech,display-coords =  <0 0 480 480>;
+		focaltech,reg_vdd = <&reg_3v3>;
+		focaltech,reg_avdd = <&reg_3v3>;
 	};
 
-	ctp@14 {
-		compatible = "allwinner,goodix";
-		device_type = "ctp";
-		reg = <0x14>;
-		status = "disabled";
-		ctp_name = "gt9xxnew_ts";
-		ctp_twi_id = <0x2>;
-		ctp_twi_addr = <0x14>;
-		ctp_screen_max_x = <0x320>;
-		ctp_screen_max_y = <0x500>;
-		ctp_revert_x_flag = <0x0>;
-		ctp_revert_y_flag = <0x1>;
-		ctp_exchange_x_y_flag = <0x0>;
-		ctp_int_port = <&pio PG 14 GPIO_ACTIVE_HIGH>;
-		ctp_wakeup = <&pio PG 15 GPIO_ACTIVE_HIGH>;
-	};
 };
 
 &twi3 {
@@ -1045,14 +1021,12 @@ tvd_row*tvd_column is the total tvd chan
 };
 
 &gmac0 {
-	phy-mode = "rgmii";
+	phy-mode = "rmii";
 	use_ephy25m = <1>;
 	pinctrl-0 = <&gmac_pins_a>;
 	pinctrl-1 = <&gmac_pins_b>;
 	pinctrl-names = "default", "sleep";
 	phy-rst = <&pio PE 16 GPIO_ACTIVE_HIGH>;
-	tx-delay = <3>; /*2~4*/
-	rx-delay = <0>;
 	status = "okay";
 };
 
@@ -1064,7 +1038,7 @@ tvd_row*tvd_column is the total tvd chan
 	/*spi-supply = <&reg_dcdc1>;*/
 	spi_slave_mode = <0>;
 	spi0_cs_number = <1>;
-        spi0_cs_bitmap = <1>;
+	spi0_cs_bitmap = <1>;
 	status = "disabled";
 
 	spi-nand@0 {
@@ -1083,21 +1057,9 @@ tvd_row*tvd_column is the total tvd chan
 	pinctrl-1 = <&spi1_pins_c>;
 	pinctrl-names = "default", "sleep";
 	spi_slave_mode = <0>;
-	spi1_cs_number = <1>;
-	spi1_cs_bitmap = <1>;
-	spi_dbi_enable = <1>;
 	status = "disabled";
 
 	spi_board1@0 {
-		device_type = "spi-dbi";
-		compatible = "sunxi,spidbi";
-		spi-max-frequency = <0x5f5e100>;
-		reg = <0x0>;
-		spi-rx-bus-width = <0x4>;
-		spi-tx-bus-width = <0x4>;
-		status = "okay";
-	};
-	/* spi_board1@0 {
 		device_type = "spi_board1";
 		compatible = "rohm,dh2228fv";
 		spi-max-frequency = <0x5f5e100>;
@@ -1105,7 +1067,7 @@ tvd_row*tvd_column is the total tvd chan
 		spi-rx-bus-width = <0x4>;
 		spi-tx-bus-width = <0x4>;
 		status = "disabled";
-	}; */
+	};
 };
 
 &ledc {
@@ -1279,55 +1241,54 @@ pull up or pull down(default 0), driver
 ;For lvds0: use lvds0_pins_a  and lvds0_pins_b instead
 ;----------------------------------------------------------------------------------*/
 &lcd0 {
-	lcd_used            = <1>;
+	lcd_used             = <1>;
+	lcd_driver_name      = "st7701s_rgb";
+
+	lcd_if               = <0>;
+	lcd_hv_if            = <0>;
 
-	lcd_driver_name     = "tft08006";
-	lcd_backlight       = <100>;
-	lcd_if              = <4>;
-
-	lcd_x               = <800>;
-	lcd_y               = <1280>;
-	lcd_width           = <52>;
-	lcd_height          = <52>;
-	lcd_dclk_freq       = <70>;
-
-	lcd_pwm_used        = <1>;
-	lcd_pwm_ch          = <2>;
-	lcd_pwm_freq        = <1000>;
-	lcd_pwm_pol         = <0>;
-	lcd_pwm_max_limit   = <255>;
-
-	lcd_hbp             = <32>;
-	lcd_ht              = <868>;
-	lcd_hspw            = <4>;
-	lcd_vbp             = <12>;
-	lcd_vt              = <1311>;
-	lcd_vspw            = <4>;
-
-	lcd_dsi_if          = <0>;
-	lcd_dsi_lane        = <4>;
-	lcd_lvds_if         = <0>;
-	lcd_lvds_colordepth = <0>;
-	lcd_lvds_mode       = <0>;
-	lcd_frm             = <0>;
-	lcd_hv_clk_phase    = <0>;
-	lcd_hv_sync_polarity= <0>;
-	lcd_io_phase        = <0x0000>;
-	lcd_gamma_en        = <0>;
-	lcd_bright_curve_en = <0>;
-	lcd_cmap_en         = <0>;
-	lcd_fsync_en        = <0>;
-	lcd_fsync_act_time  = <1000>;
-	lcd_fsync_dis_time  = <1000>;
-	lcd_fsync_pol       = <0>;
-
-	deu_mode            = <0>;
-	lcdgamma4iep        = <22>;
-	smart_color         = <90>;
-
-	lcd_gpio_0 =  <&pio PG 13 GPIO_ACTIVE_HIGH>;
-	pinctrl-0 = <&dsi4lane_pins_a>;
-	pinctrl-1 = <&dsi4lane_pins_b>;
+	lcd_width            = <70>;
+	lcd_height           = <72>;
+	lcd_x                = <480>;
+	lcd_y                = <480>;
+	lcd_dclk_freq        = <19>;
+	lcd_hbp              = <60>;
+	lcd_ht               = <612>;
+	lcd_hspw             = <12>;
+	lcd_vbp              = <18>;
+	lcd_vt               = <520>;
+	lcd_vspw             = <4>;
+
+	lcd_backlight        = <50>;
+	lcd_pwm_used         = <1>;
+	lcd_pwm_ch           = <7>;
+	lcd_pwm_freq         = <20000>;
+	lcd_pwm_pol          = <1>;
+	lcd_bright_curve_en  = <0>;
+
+	lcd_frm              = <1>;
+	lcd_io_phase         = <0x0000>;
+	lcd_gamma_en         = <0>;
+	lcd_cmap_en          = <0>;
+	lcd_hv_clk_phase     = <0>;
+	lcd_hv_sync_polarity = <0>;
+	lcd_rb_swap          = <0>;
+
+	lcd_power            = "vcc-lcd";
+	lcd_pin_power        = "vcc-pd";
+	lcd_gpio_0           = <&pio PG 13 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_1           = <&pio PE 14 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_2           = <&pio PE 12 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_3           = <&pio PE 15 GPIO_ACTIVE_HIGH>;
+	/*
+	lcd_gpio_0           = <&pio PG 13 1 1 1 1>;
+	lcd_gpio_1           = <&pio PE 14 1 1 1 1>;
+	lcd_gpio_2           = <&pio PE 12 1 1 1 1>;
+	lcd_gpio_3           = <&pio PE 15 1 1 1 1>;
+	*/
+	pinctrl-0            = <&rgb18_pins_a>;
+	pinctrl-1            = <&rgb18_pins_b>;
+	status               = "okay";
 };
 
 &hdmi {
@@ -1357,14 +1318,12 @@ pull up or pull down(default 0), driver
 	status = "okay";
 };
 
-/*
 &pwm7 {
 	pinctrl-names = "active", "sleep";
 	pinctrl-0 = <&pwm7_pin_a>;
 	pinctrl-1 = <&pwm7_pin_b>;
 	status = "okay";
 };
-*/
 
 &rtp {
 	allwinner,tp-sensitive-adjust = <0xf>;
@@ -1400,60 +1359,3 @@ pull up or pull down(default 0), driver
 	pinctrl-1 = <&ir1_pins_b>;
 	status = "disabled";
 };
-
-/* &lcd_fb0 {
-	lcd_used = <1>;
-	lcd_driver_name = "kld35512";
-	lcd_if = <1>;
-	lcd_dbi_if = <4>;
-	lcd_data_speed = <60>;
-	lcd_spi_bus_num = <1>;
-	lcd_x = <320>;
-	lcd_y = <480>;
-	lcd_pixel_fmt = <10>;
-	lcd_dbi_fmt = <2>;
-	lcd_rgb_order = <0>;
-	lcd_width = <60>;
-	lcd_height = <95>;
-	lcd_pwm_used = <1>;
-	lcd_pwm_ch = <7>;
-	lcd_pwm_freq = <5000>;
-	lcd_pwm_pol = <1>;
-	lcd_frm = <1>;
-	lcd_gamma_en = <1>;
-	fb_buffer_num = <2>;
-	lcd_backlight = <100>;
-	lcd_fps = <40>;
-	lcd_dbi_te = <1>;
-	lcd_dbi_clk_mode = <1>;
-	lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>;
-	status = "okay";
-}; */
-
-/* &lcd_fb0 {
-	lcd_used = <1>;
-	lcd_driver_name = "kld2844b";
-	lcd_if = <1>;
-	lcd_dbi_if = <4>;
-	lcd_data_speed = <60>;
-	lcd_spi_bus_num = <1>;
-	lcd_x = <240>;
-	lcd_y = <320>;
-	lcd_width = <60>;
-	lcd_height = <95>;
-	lcd_pwm_used = <1>;
-	lcd_pwm_ch = <7>;
-	lcd_pwm_freq = <5000>;
-	lcd_pwm_pol = <0>;
-	lcd_pixel_fmt = <0>;
-	lcd_dbi_fmt = <3>;
-	lcd_rgb_order = <0>;
-	lcd_frm = <1>;
-	lcd_gamma_en = <1>;
-	fb_buffer_num = <2>;
-	lcd_backlight = <100>;
-	lcd_dbi_te = <1>;
-	lcd_fps = <60>;
-	lcd_gpio_0 = <&pio PC 0 GPIO_ACTIVE_HIGH>;
-	status = "okay";
-}; */
Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile
===================================================================
--- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile
+++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/Makefile
@@ -45,6 +45,7 @@ disp-$(CONFIG_LCD_SUPPORT_LH219WQ1) += l
 disp-$(CONFIG_LCD_SUPPORT_ST7789V) += lcd/st7789v.o
 disp-$(CONFIG_LCD_SUPPORT_ST7796S) += lcd/st7796s.o
 disp-$(CONFIG_LCD_SUPPORT_ST7701S) += lcd/st7701s.o
+disp-$(CONFIG_LCD_SUPPORT_ST7701S_RGB) += lcd/st7701s_rgb.o
 disp-$(CONFIG_LCD_SUPPORT_WTL096601G03) += lcd/wtl096601g03.o
 disp-$(CONFIG_LCD_SUPPORT_T30P106) += lcd/t30p106.o
 disp-$(CONFIG_LCD_SUPPORT_TO20T20000) += lcd/to20t20000.o
Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig
===================================================================
--- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig
+++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/Kconfig
@@ -103,6 +103,12 @@ config LCD_SUPPORT_ST7701S
 	---help---
 		If you want to support ST7701S panel for display driver, select it.
 
+config LCD_SUPPORT_ST7701S_RGB
+	bool "LCD support ST7701S RGB panel"
+	default n
+	---help---
+		If you want to support ST7701S_RGB panel for display driver, select it.
+
 config LCD_SUPPORT_T30P106
 	bool "LCD support T30P106 panel"
 	default n
@@ -210,4 +216,3 @@ config LCD_SUPPORT_K080_IM2HYL802R_800X1
 	default y
 	---help---
 		If you want to support K080_IM2HYL802R_800X1280 panel for display driver, select it.
-
Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c
===================================================================
--- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c
+++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.c
@@ -80,6 +80,9 @@ struct __lcd_panel *panel_array[] = {
 #ifdef CONFIG_LCD_SUPPORT_ST7701S
 	&st7701s_panel,
 #endif
+#ifdef CONFIG_LCD_SUPPORT_ST7701S_RGB
+	&st7701s_rgb_panel,
+#endif
 #ifdef CONFIG_LCD_SUPPORT_T30P106
 	&t30p106_panel,
 #endif
@@ -136,6 +139,7 @@ void lcd_set_panel_funs(void)
 	int i;
 
 	for (i = 0; panel_array[i] != NULL; i++) {
+		printk("panel name: %s\n", panel_array[i]->name);
 		sunxi_lcd_set_panel_funs(panel_array[i]->name,
 					 &panel_array[i]->func);
 	}
Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h
===================================================================
--- tina-d1-h.orig/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h
+++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/panels.h
@@ -125,6 +125,9 @@ extern struct __lcd_panel st7796s_panel;
 #ifdef CONFIG_LCD_SUPPORT_ST7701S
 extern struct __lcd_panel st7701s_panel;
 #endif
+#ifdef CONFIG_LCD_SUPPORT_ST7701S_RGB
+extern struct __lcd_panel st7701s_rgb_panel;
+#endif
 #ifdef CONFIG_LCD_SUPPORT_T30P106
 extern struct __lcd_panel t30p106_panel;
 #endif
Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c
===================================================================
--- /dev/null
+++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c
@@ -0,0 +1,517 @@
+/*
+ * drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.c
+ *
+ * Copyright (c) 2018-2021 Allwinnertech Co., Ltd.
+ * Author: zepan <zepan@sipeed.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+&lcd0 {
+	lcd_used            = <1>;
+
+	lcd_driver_name     = "st7701s_rgb";
+	lcd_backlight       = <100>;
+	lcd_if              = <2>;
+
+	lcd_x               = <480>;
+	lcd_y               = <480>;
+	lcd_width           = <70>;
+	lcd_height          = <72>;
+	lcd_dclk_freq       = <30>;
+
+	lcd_pwm_used        = <1>;
+	lcd_pwm_ch          = <7>;
+	lcd_pwm_freq        = <19000>;
+	lcd_pwm_pol         = <0>;
+	lcd_pwm_max_limit   = <255>;
+
+	lcd_hbp             = <60>;
+	lcd_ht              = <612>;
+	lcd_hspw            = <12>;
+	lcd_vbp             = <18>;
+	lcd_vt              = <520>;
+	lcd_vspw            = <4>;
+
+	lcd_dsi_if          = <0>;
+	lcd_dsi_lane        = <4>;
+	lcd_lvds_if         = <0>;
+	lcd_lvds_colordepth = <0>;
+	lcd_lvds_mode       = <0>;
+	lcd_frm             = <0>;
+	lcd_hv_clk_phase    = <0>;
+	lcd_hv_sync_polarity= <0>;
+	lcd_io_phase        = <0x0000>;
+	lcd_gamma_en        = <0>;
+	lcd_bright_curve_en = <0>;
+	lcd_cmap_en         = <0>;
+	lcd_fsync_en        = <0>;
+	lcd_fsync_act_time  = <1000>;
+	lcd_fsync_dis_time  = <1000>;
+	lcd_fsync_pol       = <0>;
+
+	deu_mode            = <0>;
+	lcdgamma4iep        = <22>;
+	smart_color         = <90>;
+
+	lcd_gpio_0 = <&pio PG 13 GPIO_ACTIVE_HIGH>;RST
+	lcd_gpio_1 = <&pio PE 14 GPIO_ACTIVE_HIGH>;CS
+	lcd_gpio_2 = <&pio PE 12 GPIO_ACTIVE_HIGH>;SDA
+	lcd_gpio_3 = <&pio PE 15 GPIO_ACTIVE_HIGH>;SCK
+	pinctrl-0 = <&rgb18_pins_a>;
+	pinctrl-1 = <&rgb18_pins_b>;
+};
+ */
+#include "st7701s_rgb.h"
+#include "default_panel.h"
+
+//s32 sunxi_lcd_gpio_set_value(u32 screen_id, u32 io_index, u32 value)
+
+#define st7701s_spi_scl_1   sunxi_lcd_gpio_set_value(0, 3, 1)
+#define st7701s_spi_scl_0   sunxi_lcd_gpio_set_value(0, 3, 0)
+#define st7701s_spi_sdi_1   sunxi_lcd_gpio_set_value(0, 2, 1)
+#define st7701s_spi_sdi_0   sunxi_lcd_gpio_set_value(0, 2, 0)
+#define st7701s_spi_cs_1    sunxi_lcd_gpio_set_value(0, 1, 1)
+#define st7701s_spi_cs_0    sunxi_lcd_gpio_set_value(0, 1, 0)
+#define st7701s_spi_reset_1 sunxi_lcd_gpio_set_value(0, 0, 1)
+#define st7701s_spi_reset_0 sunxi_lcd_gpio_set_value(0, 0, 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)
+{
+    printk("=====================LCD_open_flow\n");
+	/* open lcd power, and delay 50ms */
+	LCD_OPEN_FUNC(sel, LCD_power_on, 20);
+	/* open lcd power, than delay 200ms */
+	LCD_OPEN_FUNC(sel, LCD_panel_init, 20);
+	/* 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)
+{
+	printk("=====================LCD_power_on\n");
+	/* config lcd_power pin to open lcd power0 */
+	sunxi_lcd_power_enable(sel, 0);
+	sunxi_lcd_pin_cfg(sel, 1);
+
+}
+
+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)
+{
+	printk("=====================LCD_bl_open\n");
+	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);
+}
+
+//three line 9bit mode
+static void LCD_WRITE_DATA(u32 value)
+{
+	u32 i;
+	st7701s_spi_cs_0;
+	st7701s_spi_sdi_1;
+	st7701s_spi_scl_0;
+	sunxi_lcd_delay_us(10);
+	st7701s_spi_scl_1;
+	for (i = 0; i < 8; i++) {
+		sunxi_lcd_delay_us(10);
+		if (value & 0x80)
+			st7701s_spi_sdi_1;
+		else
+			st7701s_spi_sdi_0;
+		value <<= 1;
+		sunxi_lcd_delay_us(10);
+		st7701s_spi_scl_0;
+		st7701s_spi_scl_1;
+	}
+	sunxi_lcd_delay_us(10);
+	st7701s_spi_cs_1;
+}
+
+static void LCD_WRITE_COMMAND(u32 value)
+{
+	u32 i;
+	st7701s_spi_cs_0;
+	st7701s_spi_sdi_0;
+	st7701s_spi_scl_0;
+	sunxi_lcd_delay_us(10);
+	st7701s_spi_scl_1;
+	for (i = 0; i < 8; i++) {
+		sunxi_lcd_delay_us(10);
+		if (value & 0x80)
+			st7701s_spi_sdi_1;
+		else
+			st7701s_spi_sdi_0;
+		st7701s_spi_scl_0;
+		sunxi_lcd_delay_us(10);
+		st7701s_spi_scl_1;
+		value <<= 1;
+	}
+	sunxi_lcd_delay_us(10);
+	st7701s_spi_cs_1;
+}
+
+
+static void LCD_panel_init(u32 sel)
+{
+	printk("=====================LCD_panel_init\n");
+	LCD_WRITE_COMMAND(0xFF);
+	LCD_WRITE_DATA(0x77);
+	LCD_WRITE_DATA(0x01);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x10);
+
+	LCD_WRITE_COMMAND(0xC0);
+	LCD_WRITE_DATA(0x3B);
+	LCD_WRITE_DATA(0x00);
+
+	LCD_WRITE_COMMAND(0xC1);
+	LCD_WRITE_DATA(0x0D);
+	LCD_WRITE_DATA(0x02);
+
+	LCD_WRITE_COMMAND(0xC2);
+	LCD_WRITE_DATA(0x21);
+	LCD_WRITE_DATA(0x08);
+
+	// RGB Interface Setting
+	// LCD_WRITE_COMMAND(0xC3);
+	// LCD_WRITE_DATA(0x02);
+
+	LCD_WRITE_COMMAND(0xCD);
+	LCD_WRITE_DATA(0x18);//0F 08-OK  D0-D18
+
+	LCD_WRITE_COMMAND(0xB0);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x18);
+	LCD_WRITE_DATA(0x0E);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x06);
+	LCD_WRITE_DATA(0x07);
+	LCD_WRITE_DATA(0x08);
+	LCD_WRITE_DATA(0x07);
+	LCD_WRITE_DATA(0x22);
+	LCD_WRITE_DATA(0x04);
+	LCD_WRITE_DATA(0x12);
+	LCD_WRITE_DATA(0x0F);
+	LCD_WRITE_DATA(0xAA);
+	LCD_WRITE_DATA(0x31);
+	LCD_WRITE_DATA(0x18);
+
+	LCD_WRITE_COMMAND(0xB1);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x19);
+	LCD_WRITE_DATA(0x0E);
+	LCD_WRITE_DATA(0x12);
+	LCD_WRITE_DATA(0x07);
+	LCD_WRITE_DATA(0x08);
+	LCD_WRITE_DATA(0x08);
+	LCD_WRITE_DATA(0x08);
+	LCD_WRITE_DATA(0x22);
+	LCD_WRITE_DATA(0x04);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0xA9);
+	LCD_WRITE_DATA(0x32);
+	LCD_WRITE_DATA(0x18);
+
+	LCD_WRITE_COMMAND(0xFF);
+	LCD_WRITE_DATA(0x77);
+	LCD_WRITE_DATA(0x01);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x11);
+
+	LCD_WRITE_COMMAND(0xB0);
+	LCD_WRITE_DATA(0x60);
+
+	LCD_WRITE_COMMAND(0xB1);
+	LCD_WRITE_DATA(0x30);
+
+	LCD_WRITE_COMMAND(0xB2);
+	LCD_WRITE_DATA(0x87);
+
+	LCD_WRITE_COMMAND(0xB3);
+	LCD_WRITE_DATA(0x80);
+
+	LCD_WRITE_COMMAND(0xB5);
+	LCD_WRITE_DATA(0x49);
+
+	LCD_WRITE_COMMAND(0xB7);
+	LCD_WRITE_DATA(0x85);
+
+	LCD_WRITE_COMMAND(0xB8);
+	LCD_WRITE_DATA(0x21);
+
+	LCD_WRITE_COMMAND(0xC1);
+	LCD_WRITE_DATA(0x78);
+
+	LCD_WRITE_COMMAND(0xC2);
+	LCD_WRITE_DATA(0x78);
+	sunxi_lcd_delay_ms(20);
+
+	LCD_WRITE_COMMAND(0xE0);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x1B);
+	LCD_WRITE_DATA(0x02);
+
+	LCD_WRITE_COMMAND(0xE1);
+	LCD_WRITE_DATA(0x08);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x07);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x44);
+	LCD_WRITE_DATA(0x44);
+
+	LCD_WRITE_COMMAND(0xE2);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x44);
+	LCD_WRITE_DATA(0x44);
+	LCD_WRITE_DATA(0xED);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0xEC);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+
+	LCD_WRITE_COMMAND(0xE3);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x11);
+
+	LCD_WRITE_COMMAND(0xE4);
+	LCD_WRITE_DATA(0x44);
+	LCD_WRITE_DATA(0x44);
+
+	LCD_WRITE_COMMAND(0xE5);
+	LCD_WRITE_DATA(0x0A);
+	LCD_WRITE_DATA(0xE9);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x0C);
+	LCD_WRITE_DATA(0xEB);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x0E);
+	LCD_WRITE_DATA(0xED);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x10);
+	LCD_WRITE_DATA(0xEF);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+
+	LCD_WRITE_COMMAND(0xE6);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x11);
+	LCD_WRITE_DATA(0x11);
+
+	LCD_WRITE_COMMAND(0xE7);
+	LCD_WRITE_DATA(0x44);
+	LCD_WRITE_DATA(0x44);
+
+	LCD_WRITE_COMMAND(0xE8);
+	LCD_WRITE_DATA(0x09);
+	LCD_WRITE_DATA(0xE8);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x0B);
+	LCD_WRITE_DATA(0xEA);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x0D);
+	LCD_WRITE_DATA(0xEC);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+	LCD_WRITE_DATA(0x0F);
+	LCD_WRITE_DATA(0xEE);
+	LCD_WRITE_DATA(0xD8);
+	LCD_WRITE_DATA(0xA0);
+
+	LCD_WRITE_COMMAND(0xEB);
+	LCD_WRITE_DATA(0x02);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0xE4);
+	LCD_WRITE_DATA(0xE4);
+	LCD_WRITE_DATA(0x88);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x40);
+
+	LCD_WRITE_COMMAND(0xEC);
+	LCD_WRITE_DATA(0x3C);
+	LCD_WRITE_DATA(0x00);
+
+	LCD_WRITE_COMMAND(0xED);
+	LCD_WRITE_DATA(0xAB);
+	LCD_WRITE_DATA(0x89);
+	LCD_WRITE_DATA(0x76);
+	LCD_WRITE_DATA(0x54);
+	LCD_WRITE_DATA(0x02);
+	LCD_WRITE_DATA(0xFF);
+	LCD_WRITE_DATA(0xFF);
+	LCD_WRITE_DATA(0xFF);
+	LCD_WRITE_DATA(0xFF);
+	LCD_WRITE_DATA(0xFF);
+	LCD_WRITE_DATA(0xFF);
+	LCD_WRITE_DATA(0x20);
+	LCD_WRITE_DATA(0x45);
+	LCD_WRITE_DATA(0x67);
+	LCD_WRITE_DATA(0x98);
+	LCD_WRITE_DATA(0xBA);
+
+	LCD_WRITE_COMMAND(0xFF);
+	LCD_WRITE_DATA(0x77);
+	LCD_WRITE_DATA(0x01);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+	LCD_WRITE_DATA(0x00);
+
+	LCD_WRITE_COMMAND(0x3A);
+	LCD_WRITE_DATA(0x66);
+
+	LCD_WRITE_COMMAND(0x36);
+	LCD_WRITE_DATA(0x00);
+
+	LCD_WRITE_COMMAND(0x21);
+
+	LCD_WRITE_COMMAND(0x11);
+	sunxi_lcd_delay_ms(120);
+
+	LCD_WRITE_COMMAND(0x29);
+	sunxi_lcd_delay_ms(20);
+	return;
+}
+
+static void LCD_panel_exit(u32 sel)
+{
+	return;
+}
+
+/* sel: 0:lcd0; 1:lcd1 */
+static s32 LCD_user_defined_func(u32 sel, u32 para1, u32 para2, u32 para3)
+{
+	return 0;
+}
+
+struct __lcd_panel st7701s_rgb_panel = {
+	/* panel driver name, must mach the lcd_drv_name in sys_config.fex */
+	.name = "st7701s_rgb",
+	.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,
+	},
+};
\ No newline at end of file
Index: tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.h
===================================================================
--- /dev/null
+++ tina-d1-h/lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/lcd/st7701s_rgb.h
@@ -0,0 +1,18 @@
+/*
+ * Allwinner SoCs display driver.
+ *
+ * Copyright (C) 2021 Sipeed.
+ *
+ * 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.
+ */
+
+#ifndef __ST7701S_RGB_PANEL_H__
+#define __ST7701S_RGB_PANEL_H__
+
+#include "panels.h"
+
+extern struct __lcd_panel st7701s_rgb_panel;
+
+#endif
\ No newline at end of file
Index: tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/config-5.4
===================================================================
--- tina-d1-h.orig/device/config/chips/d1-h/configs/nezha/linux-5.4/config-5.4
+++ tina-d1-h/device/config/chips/d1-h/configs/nezha/linux-5.4/config-5.4
@@ -2517,6 +2517,7 @@ CONFIG_LCD_SUPPORT_HE0801A068=y
 # CONFIG_LCD_SUPPORT_ST7789V is not set
 # CONFIG_LCD_SUPPORT_ST7796S is not set
 # CONFIG_LCD_SUPPORT_ST7701S is not set
+CONFIG_LCD_SUPPORT_ST7701S_RGB=y
 # CONFIG_LCD_SUPPORT_T30P106 is not set
 # CONFIG_LCD_SUPPORT_TO20T20000 is not set
 # CONFIG_LCD_SUPPORT_FRD450H40014 is not set
Index: tina-d1-h/device/config/chips/d1-h/configs/nezha/uboot-board.dts
===================================================================
--- tina-d1-h.orig/device/config/chips/d1-h/configs/nezha/uboot-board.dts
+++ tina-d1-h/device/config/chips/d1-h/configs/nezha/uboot-board.dts
@@ -42,7 +42,7 @@
 &pwm2_pin_b {
 	pins = "PD18";
 	muxsel = <0>;
-	function = "gpio_out";
+	function = "gpio_in";
 };
 
 &pwm2 {
@@ -260,57 +260,50 @@
 /*	dcdc1-supply = <&reg_dcdc1>;*/
 };
 
+/*
 &lcd0 {
-	lcd_used            = <1>;
+	lcd_used        = <1>;
+	lcd_driver_name = "st7701s_rgb";
 
-	lcd_driver_name     = "tft08006";
-	lcd_backlight       = <100>;
-	lcd_if              = <4>;
-
-	lcd_x               = <800>;
-	lcd_y               = <1280>;
-	lcd_width           = <52>;
-	lcd_height          = <52>;
-	lcd_dclk_freq       = <70>;
-
-	lcd_pwm_used        = <1>;
-	lcd_pwm_ch          = <2>;
-	lcd_pwm_freq        = <1000>;
-	lcd_pwm_pol         = <0>;
-	lcd_pwm_max_limit   = <255>;
-
-	lcd_hbp             = <32>;
-	lcd_ht              = <868>;
-	lcd_hspw            = <4>;
-	lcd_vbp             = <12>;
-	lcd_vt              = <1311>;
-	lcd_vspw            = <4>;
-
-	lcd_dsi_if          = <0>;
-	lcd_dsi_lane        = <4>;
-	lcd_lvds_if         = <0>;
-	lcd_lvds_colordepth = <0>;
-	lcd_lvds_mode       = <0>;
-	lcd_frm             = <0>;
-	lcd_hv_clk_phase    = <0>;
-	lcd_hv_sync_polarity= <0>;
-	lcd_io_phase        = <0x0000>;
-	lcd_gamma_en        = <0>;
+	lcd_if          = <0>;
+	lcd_hv_if       = <0>;
+
+	lcd_width       = <70>;
+	lcd_height      = <72>;
+	lcd_x           = <480>;
+	lcd_y           = <480>;
+	lcd_dclk_freq   = <19>;
+	lcd_hbp         = <60>;
+	lcd_ht          = <612>;
+	lcd_hspw        = <12>;
+	lcd_vbp         = <18>;
+	lcd_vt          = <520>;
+	lcd_vspw        = <4>;
+
+	lcd_backlight   = <50>;
+	lcd_pwm_used    = <1>;
+	lcd_pwm_ch      = <7>;
+	lcd_pwm_freq    = <20000>;
+	lcd_pwm_pol     = <1>;
 	lcd_bright_curve_en = <0>;
-	lcd_cmap_en         = <0>;
-	lcd_fsync_en        = <0>;
-	lcd_fsync_act_time  = <1000>;
-	lcd_fsync_dis_time  = <1000>;
-	lcd_fsync_pol       = <0>;
-
-	deu_mode            = <0>;
-	lcdgamma4iep        = <22>;
-	smart_color         = <90>;
-
-	lcd_gpio_0 =  <&pio PG 13 GPIO_ACTIVE_HIGH>;
-	pinctrl-0 = <&dsi4lane_pins_a>;
-	pinctrl-1 = <&dsi4lane_pins_b>;
+
+	lcd_frm         = <1>;
+	lcd_io_phase    = <0x0000>;
+	lcd_gamma_en    = <0>;
+	lcd_cmap_en     = <0>;
+	lcd_hv_clk_phase= <0>;
+	lcd_hv_sync_polarity= <0>;
+
+	lcd_power       = "vcc-lcd";
+	lcd_pin_power   = "vcc-pd";
+	lcd_gpio_0      = <&pio PG 13 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_1      = <&pio PE 14 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_2      = <&pio PE 12 GPIO_ACTIVE_HIGH>;
+	lcd_gpio_3      = <&pio PE 15 GPIO_ACTIVE_HIGH>;
+	pinctrl-0       = <&rgb18_pins_a>;
+	pinctrl-1       = <&rgb18_pins_b>;
 };
+*/
 
 &hdmi {
 	hdmi_used = <1>;

> 请使用quilt应用该patch

#5 全志 SOC » 在V853开发板编译QT测试下 » 2022-09-13 12:16:11

神棍地海棠
回复: 0

记录一下自己交叉编译QT的过程,目前来说再体验了初次编译镜像之后,编译这个QT还是算比较快捷的,因为该有的库都安装完成了。

首先就是我需要找到我们的交叉编译器安装位置,这个在下载了Tina之后还是很好找的。

tina-v853-open/prebuilt/rootfsbuilt/arm/toolchain-sunxi-musl-gcc-830/toolchain/bin

如上路径。


c0b85329-e8ca-45c9-b046-c2a98b5dba15-image.png

我们用的一般就是这个,我们可以把其路径加到我们系统的环境中,这样在编译QT的时候就比较简单了。

4e051d9f-09fb-49e2-9ef0-d75d002a0c59-image.png

一般我是直接加到/etc/profile下的,这样重启后就有了。

62cfa564-9b63-4ed0-8f7e-f262e7ee15ce-image.png

敲一下arm-openwrt-linux-gcc -v这样就能出现如上提示就OK了。
接下来我们准备下编译QT前先编译tslib这个在底层使用触摸屏的时候比较方便。

43610a86-1438-41e1-a08f-bbb940a36c01-image.png

这里我选择的1.15版本的,这个都可以,本身Tina再构建的时候好像就带了tslib。

export STAGING_DIR=/home/v853/tina-v853-open/prebuilt/rootfsbuilt/arm/toolchain-sunxi-musl-gcc-830/toolchain/arm-openwrt-linux-muslgnueabi

这段要再配置前执行,这段是为了找交叉编译器的库文件,头文件的。

./configure --host=arm-openwrt-linux ac_cv_func_malloc_0_nonnull=yes--cache-file=arm-linux.cache -prefix=/home/v853/QT/tslib-1.15/arm-tslib

2a42c4f8-8cc5-4fdd-9a71-5fe63f89f9bb-image.png

进行配置生成makefile文件。


b03bb03e-b424-40dc-b056-76768f1b8c74-image.png

然后直接make,make结束之后就是make install,这样就会在我们配置的文件夹中生成我们的arm-tslib。

a913c65e-1ab4-4be8-ae42-110737377936-image.png

这里其实也只是为了QT交叉编译找一下头文件库这些。


24cb0fc8-da58-43ee-9686-1493a08ac1d6-image.png
然后我们选择一个QT5版本,这里我选择了QT5.12.6。然后新建一个装交叉编译完成的文件夹我命名为arm-qt。之后我们一般选择构建一个脚本。
b8a8a4ff-ee3d-4307-89e3-54a07bdf46fe-image.png
这里我建了一个叫make.sh的。这样在这里面我们完成所以QT的配置工作,具体如下:

#!/bin/sh
PWD=`pwd`
    mkdir arm-qt
    ./configure \
    -prefix $PWD/arm-qt \
    -release \
    -opensource \
    -shared \
    -xplatform linux-arm-gnueabi-g++ \
    -optimized-qmake \
    -pch \
    -qt-sqlite \
    -qt-libjpeg \
    -qt-libpng \
    -qt-zlib \
    -no-opengl \
    -skip qt3d \
    -skip qtcanvas3d \
    -skip qtpurchasing \
    -skip qtlocation \
    -skip qttools \
    -no-sse2 \
    -no-openssl \
    -no-cups \
    -no-glib \
    -no-dbus \
    -no-xcb \
    -no-iconv \
    -no-separate-debug-info \
    -no-fontconfig \
    -tslib \
    -I /home/v853/QT/tslib-1.15/arm-tslib/include \
    -L /home/v853/QT/tslib-1.15/arm-tslib/lib \
    -recheck-all \
    -make examples

    make -j16 
    make install

结尾就是直接构建然后安装。

-xplatform linux-arm-gnueabi-g++

中间我们注意这个配置,这个配置是要对应上我们交叉编译器的。

0a3fc40d-7416-43b3-b134-b31eb15ad0e1-image.pngfd911a34-13dc-445f-b191-6a474439a649-image.png

把上面文件里面内容全部替换成我们的交叉编译器的名字。然后执行脚本即可。

9dbf6215-1ea2-4623-b2a6-d61c67f7af67-image.png1d2175ae-a616-4d38-a4b4-8238cb370587-image.png

确定一下我们的是否同意其license。输入yes即可,中间无报错直接就会构建完安装完。


af0be0b0-a9c7-4855-a051-8773de3a9541-image.png

这是我们配置的一些组件,可以自己选择性的安装。也就是修改脚本即可。

9ad8e260-6903-4842-bcd4-247c714480ac-image.png

这里就是编译完成了,中间大概等了半小时,看个人虚拟机配置情况。

48aae576-69d5-40b4-be1b-f96e6f51da39-image.png

在路径下生成了很多文件,我们放到arm开发板上也就是lib,和plugins这里面还没有字体文件,可以自己添加。

0b54b788-f4d8-49a3-a387-63401a067fdb-image.png

来到底层,我们需要把文件放到底层,然后我居然发现我编译的系统没有tar指令,没办法我们只能对SD卡下手了,我给sd格式化成ext4格式了也就是支持linux系统的格式。

sudo apt install gparted

我在Ubuntu下安装了gparted工具。直接格式化卡就行。
这样我们可以直接挂载然后使用库。这个目的是因为有些。So文件无法解压的。

export QT_PLUGIN_PATH=/mnt/qt5.12.6/plugins
export QT_QPA_PLATFORM=linuxfb
export LD_LIBRARY_PATH=/mnt/qt5.12.6/lib

然后初始化一下我们的库路径,这样就能运行QT了,效果如下:

dbd794f4-c66f-4eea-9a95-922cbcb454e7-image.pngeafd34f3-13c1-4792-9a2c-2c1e94cb61ba-image.png

附件如下:

页脚

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

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