【WhyCan YuzukiHD联合出品】R11 86 面板
-
-
原理图:SCH_R11_86_Panel_2022-05-10.pdf
Gerber:4509cffe-4971-4f8b-bbf7-65970f8d6d11-Gerber_PCB1_2022-06-18.zip
立创EDA专业版工程文件:cf5cf19a-e977-4e9f-be5b-988c5bbf3709-ProProject_R11+86Panel_2022-06-18.zip适配了 Kernel: 5.4.180 U-Boot 2022.01
SDK: https://github.com/YuzukiHD/Buildroot-YuzukiSBC
SDK开发文档:https://yuzukihd.gloomyghost.com/Buildroot-YuzukiSBC/#/选择
yuzukihd_r11_86panel_defconfig
-
坐等原理图PCB和SDK
-
那么问题来了,屏幕从哪来呢
-
测试驱动屏幕
-
屏幕是在UBOOT进行初始化的,初始化代码:
#ifndef _LCD_PANEL_INIT_H_ #define _LCD_PANEL_INIT_H_ #include <asm/gpio.h> #include <asm/arch/gpio.h> #define DELAYBIT 10 #define YS_LOG(fmt, arg...) \ do { \ printf(fmt, ##arg); \ } while (0) #define YS_DBG(fmt, arg...) YS_LOG("[Yuzuki LCD sSPI] " fmt, ##arg) #define st7701s_spi_sdi_0 gpio_direction_output(LCD_MOSI, 0) #define st7701s_spi_sdi_1 gpio_direction_output(LCD_MOSI, 1) #define st7701s_spi_scl_0 gpio_direction_output(LCD_CLK, 0) #define st7701s_spi_scl_1 gpio_direction_output(LCD_CLK, 1) int LCD_RST; // PG10 int LCD_MOSI; // PG11 int LCD_CLK; // PG12 int LCD_BL; // PG12 void lcd_delay_ms(int ms) { unsigned long long delay = ms * 1000 * 20; while (delay--) asm volatile("nop"); } void sunxi_lcd_delay_us(int us) { unsigned long long delay = 100 * us; while (delay--) asm volatile("nop"); } int SPI_Init(void) { int ret; LCD_RST = sunxi_name_to_gpio("PG10"); if (LCD_RST < 0) { YS_DBG("Error invalid LCD RST pin: PG, err %d\n", LCD_RST); return LCD_RST; } ret = gpio_request(LCD_RST, "LCD_RST"); if (ret) { YS_DBG("Error invalid LCD_RST pin: PG, err %d\n", LCD_RST); return ret; } YS_DBG("PG10 --> LCD_RST request OK\n"); LCD_MOSI = sunxi_name_to_gpio("PG11"); if (LCD_MOSI < 0) { YS_DBG("Error invalid LCD_MOSI pin: PG, err %d\n", LCD_MOSI); return LCD_MOSI; } ret = gpio_request(LCD_MOSI, "LCD_MOSI"); if (ret) { YS_DBG("Error invalid LCD_MOSI pin: PG, err %d\n", LCD_MOSI); return ret; } YS_DBG("PG11 --> LCD_MOSI request OK\n"); LCD_CLK = sunxi_name_to_gpio("PG12"); if (LCD_CLK < 0) { YS_DBG("Error invalid LCD_CLK pin: PG, err %d\n", LCD_CLK); return LCD_CLK; } ret = gpio_request(LCD_CLK, "LCD_CLK"); if (ret) { YS_DBG("Error invalid LCD_CLK pin: PG, err %d\n", LCD_CLK); return ret; } YS_DBG("PG12 --> LCD_CLK request OK\n"); LCD_BL = sunxi_name_to_gpio("PB4"); if (LCD_BL < 0) { YS_DBG("Error invalid LCD_CLK pin: PG, err %d\n", LCD_BL); return LCD_BL; } ret = gpio_request(LCD_BL, "LCD_BL"); if (ret) { YS_DBG("Error invalid LCD_BL pin: PG, err %d\n", LCD_BL); return ret; } YS_DBG("PB4 --> LCD_BL request OK\n"); gpio_direction_output(LCD_RST, 1); gpio_direction_output(LCD_MOSI, 1); gpio_direction_output(LCD_CLK, 1); return 0; } void LCD_WRITE_DATA(unsigned int value) { unsigned int i; 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); } void LCD_WRITE_COMMAND(unsigned int value) { unsigned int i; 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); } void LCD_Init(void) { YS_DBG("LCD Panel ST7701s init\n"); SPI_Init(); lcd_delay_ms(1000); gpio_direction_output(LCD_RST, 0); lcd_delay_ms(120); gpio_direction_output(LCD_RST, 1); lcd_delay_ms(120); 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); 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); 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); lcd_delay_ms(120); LCD_WRITE_COMMAND(0x29); lcd_delay_ms(120); } #endif // _LCD_PANEL_INIT_H_
-
@yuzukitsuru SPI刷屏 FPS能到多少
-
@gregrgr SPI初始化屏幕,设置屏幕参数模式,然后让屏幕进入RGB模式,使用RGB666刷屏.当然你也可以让屏幕进MIPI模式用MIPI刷。不是SPI刷屏,那不得慢死。测试刷720p的屏幕可以到60fps
-
终于等到了你!
-
@whycan 壳子哪里买的
-
@whycan 有多余的板子吗?我也想玩
-
@douzi
目前我手里没有多余的,您可以自己打板焊接。 -
@whycan 打板和焊接都没问题,问题是就只有原理图我还得画板子,太慢了。
你那有PCB制板文件吗? -
接上电源,显示屏正常,可是CP2104串口居然没有显示,折腾半天发现R67直接改成0R终于正常了.
-
@whycan 这个uboot初始化spi的代码要在uboot的哪个文件调用呢
-
-
@yuzukitsuru 发下屏的购买连接
-
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号