1.1 适配mipi屏幕触摸
gt9xx_lvds: gt9xx-lvds@5d {compatible = "goodix,gt9xx";reg = <0x5d>;pinctrl-names = "default";pinctrl-0 = <&touch_gpio>;touch-gpio = <&gpio1 RK_PA4 IRQ_TYPE_LEVEL_LOW>;reset-gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;max-x = <1280>;max-y = <800>;tp-size = <970>;status = "okay";};
1.2 触摸常见问题
触摸有报点但是没有触摸到屏幕边缘,但鼠标指针已经到了屏幕边缘。对调以下参数。
touchscreen-size-x = <800>;
touchscreen-size-y = <1280>;
2.1 初始化序列命令介绍
举例:13 00 02 01 00
说明:数据类型 延时 数据个数(包含寄存器) 寄存器 寄存器数据
举例:39 00 04 FF 98 81 03
说明:数据类型 延时 数据个数(包含寄存器) 寄存器 寄存器数据 寄存器数据 寄存器数据
//初始化序列常见数据类型:Generic Write0x03:没有寄存器数据0x13:1个寄存器数据0x23:2个寄存器数据0x29:多个寄存器数据
//初始化序列常见数据类型:DCS Write0x05:没有寄存器数据0x15:1个寄存器数据0x07:1个寄存器数据,DSC EN0x0a:DCS long WRITE, PPS, 128 bytes0x39:多个寄存器数据
2.2 适配mipi屏幕显示
dsi0_backlight: dsi0-backlight {compatible = "pwm-backlight";pwms = <&pwm3 0 20000 0>;brightness-levels = <0 20 20 21 21 22 22 2323 24 24 25 25 26 26 2727 28 28 29 29 30 30 3131 32 32 33 33 34 34 3535 36 36 37 37 38 38 3940 41 42 43 44 45 46 4748 49 50 51 52 53 54 5556 57 58 59 60 61 62 6364 65 66 67 68 69 70 7172 73 74 75 76 77 78 7980 81 82 83 84 85 86 8788 89 90 91 92 93 94 9596 97 98 99 100 101 102 103104 105 106 107 108 109 110 111112 113 114 115 116 117 118 119120 121 122 123 124 125 126 127128 129 130 131 132 133 134 135136 137 138 139 140 141 142 143144 145 146 147 148 149 150 151152 153 154 155 156 157 158 159160 161 162 163 164 165 166 167168 169 170 171 172 173 174 175176 177 178 179 180 181 182 183184 185 186 187 188 189 190 191192 193 194 195 196 197 198 199200 201 202 203 204 205 206 207208 209 210 211 212 213 214 215216 217 218 219 220 221 222 223224 225 226 227 228 229 230 231232 233 234 235 236 237 238 239240 241 242 243 244 245 246 247248 249 250 251 252 253 254 255>;default-brightness-level = <200>;
};&dsi0 {status = "okay";//rockchip,lane-rate = <1000>;dsi0_panel: panel@0 {status = "okay";compatible = "simple-panel-dsi";reg = <0>;reset-delay-ms = <60>;enable-delay-ms = <60>;prepare-delay-ms = <60>;unprepare-delay-ms = <60>;disable-delay-ms = <60>;dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;dsi,format = <MIPI_DSI_FMT_RGB888>;dsi,lanes = <4>;panel-init-sequence = [ ];panel-exit-sequence = [];panel-width-mm = <68>;panel-height-mm = <121>;backlight = <&dsi0_backlight>;enable-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;display-timings {native-mode = <&panel10_1280x800>;panel10_1280x800: timings {hback-porch = <40>;hfront-porch = <40>;hactive = <800>;hsync-len = <20>;vback-porch = <20>;vfront-porch = <20>;vactive = <1280>;vsync-len = <10>;clock-frequency = <72000000>;vsync-active = <0>;hsync-active = <0>;de-active = <0>;pixelclk-active = <0>;};};ports {#address-cells = <1>;#size-cells = <0>;port@0 {reg = <0>;panel_in_dsi0: endpoint {remote-endpoint = <&dsi0_out_panel>;};};};};ports {#address-cells = <1>;#size-cells = <0>;port@1 {reg = <1>;dsi0_out_panel: endpoint {remote-endpoint = <&panel_in_dsi0>;};};};
};//开启uboot和内核logo
&route_dsi0 {status = "okay";connect = <&vp0_out_dsi0>;
};&dsi0_in_vp0 {status = "okay";
};&dsi0_in_vp1 {status = "disabled";
};&pwm3 {status = "okay";
};