@@ -16,18 +16,22 @@ jobs:
1616 - name : 安装dtc工具
1717 run : sudo apt-get update && sudo apt-get install -y device-tree-compiler
1818
19- # 关键修改:创建独立板级dts,避免修改原有dtsi
20- - name : 创建读书郎G60专属板级dts
19+ - name : 创建读书郎G60专属板级dts(修正语法)
2120 run : |
2221 cd linux/kernel/arch/arm64/boot/dts
23- # 新建独立dts文件,继承sun50iw1p1.dtsi
2422 cat > sun50iw1p1-readboy-g60.dts << 'EOF'
2523 /dts-v1/;
26- #include "sun50iw1p1.dtsi" // 继承芯片通用配置
24+ #include "sun50iw1p1.dtsi"
25+ #include <dt-bindings/interrupt-controller/irq.h> // 补充中断相关头文件
26+ #include <dt-bindings/gpio/gpio.h> // 补充GPIO相关头文件
2727
28- /* 读书郎G60 - 屏幕配置(800x1280) */
28+ / {
29+ model = "Readboy G60 (sun50iw1p1)"; // 设备型号(必填)
30+ compatible = "readboy,g60", "allwinner,sun50iw1p1"; // 兼容属性(必填)
31+ };
32+
33+ /* 屏幕配置(修正属性格式) */
2934 &display {
30- compatible = "allwinner,sun50iw1p1-display";
3135 status = "okay";
3236 display-timings {
3337 native-mode = <&timing0>;
@@ -63,42 +67,65 @@ jobs:
6367 lcd_pwm_pol = <1>;
6468 };
6569
66- /* 读书郎G60 - 存储分区配置 */
70+ /* 存储分区配置(修正reg格式) */
6771 &mmc0 {
6872 status = "okay";
6973 bus-width = <8>;
7074 cap-mmc-highspeed;
7175 mmc-hs200-1_8v;
7276 max-frequency = <150000000>;
7377 non-removable;
74- partition@0 { label = "bootloader"; reg = <0x0 0x400000>; };
75- partition@400000 { label = "env"; reg = <0x400000 0x100000>; };
76- partition@500000 { label = "boot"; reg = <0x500000 0x800000>; };
77- partition@d00000 { label = "system"; reg = <0xd00000 0x40000000>; };
78- partition@40d00000 { label = "data"; reg = <0x40d00000 0x7f300000>; };
78+
79+ partitions {
80+ compatible = "fixed-partitions";
81+ #address-cells = <2>;
82+ #size-cells = <2>;
83+
84+ partition@0 {
85+ label = "bootloader";
86+ reg = <0x0 0x0 0x0 0x400000>; // 修正reg格式(64位地址:高32位 低32位)
87+ };
88+ partition@400000 {
89+ label = "env";
90+ reg = <0x0 0x400000 0x0 0x100000>;
91+ };
92+ partition@500000 {
93+ label = "boot";
94+ reg = <0x0 0x500000 0x0 0x800000>;
95+ };
96+ partition@d00000 {
97+ label = "system";
98+ reg = <0x0 0xd00000 0x0 0x40000000>;
99+ };
100+ partition@40d00000 {
101+ label = "data";
102+ reg = <0x0 0x40d00000 0x0 0x7f300000>;
103+ };
104+ };
79105 };
80106
81- /* 读书郎G60 - 触控配置(GT911 ) */
107+ /* 触控配置(修正中断和GPIO格式 ) */
82108 &i2c0 {
83109 status = "okay";
84110 clock-frequency = <400000>;
111+
85112 gt911@14 {
86113 compatible = "goodix,gt911";
87114 reg = <0x14>;
88115 interrupt-parent = <&pio>;
89- interrupts = <4 10 IRQ_TYPE_EDGE_FALLING>;
90- reset-gpios = <&pio 4 9 GPIO_ACTIVE_LOW>;
116+ interrupts = <4 10 IRQ_TYPE_EDGE_FALLING>; // 依赖irq.h头文件
117+ reset-gpios = <&pio 4 9 GPIO_ACTIVE_LOW>; // 依赖gpio.h头文件
91118 touchscreen-size-x = <800>;
92119 touchscreen-size-y = <1280>;
93120 };
94121 };
95122 EOF
96123
97- # 编译独立板级dts(避免冲突)
98- - name : 编译G60专属dtb
124+ - name : 编译G60专属dtb(添加调试输出)
99125 run : |
100126 cd linux/kernel/arch/arm64/boot/dts
101- dtc -I dts -O dtb -o g60-readboy.dtb sun50iw1p1-readboy-g60.dts
127+ # 用verbose模式编译,便于排查剩余错误
128+ dtc -v -I dts -O dtb -o g60-readboy.dtb sun50iw1p1-readboy-g60.dts
102129
103130 - name : 上传G60 dtb文件
104131 uses : actions/upload-artifact@v4
0 commit comments