增加fd272屏配置
authorpenglei <1624952103@qq.com>
Thu, 6 Nov 2025 09:34:59 +0000 (17:34 +0800)
committerpenglei <1624952103@qq.com>
Thu, 6 Nov 2025 09:34:59 +0000 (17:34 +0800)
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_fd272.config
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_fd272_r.config [new file with mode: 0644]
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_fd272_ssb.config
code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_ssb_native_js_fd272.config
code/sdk/drivers/drivers/driver/lcd/lcd_config.c
code/sdk/drivers/drivers/driver/lcd/lcd_private.c
code/sdk/middleware/services/gpu/drv/dpu/hal/dpu_hal_crg.c

diff --git a/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_fd272_r.config b/code/sdk/build/config/target_config/brandy/menuconfig/acore/brandy_native_js_fd272_r.config
new file mode 100644 (file)
index 0000000..76919b3
--- /dev/null
@@ -0,0 +1,18 @@
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=16
+# end of Product
index 416089d..32dc108 100644 (file)
@@ -11,7 +11,7 @@
 
 #define LCD_EDO_502X410_SCREEN_ID  0xFFFF //CH13613
 #define LCD_EDO_466X466_SCREEN_ID   0x1133
-#define LCD_FD272_466X466_SCREEN_ID  0x20
+#define LCD_FD272_466X466_SCREEN_ID  0x113
 #define LCD_JD_360X360_SCREEN_ID   0x5598
 #define LCD_EDO_454X454_SCREEN_ID  0xf00
 #define LCD_BOE_454X454_SCREEN_ID  0x500
@@ -106,8 +106,8 @@ const combo_dev_cfg_t g_fd272_466x466_60_config = {
         .vact_lines   = 466,  // vact 454 lines
         .vfp_lines    = 6,   // vfp 10 lines
     },
-    .phy_data_rate = 396,     // 480Mbps
-    .pixel_clk = 16485,       // 20000KHz
+    .phy_data_rate = 480,     // 480Mbps
+    .pixel_clk = 20000,       // 20000KHz
 };
 
 
@@ -126,8 +126,8 @@ const combo_dev_cfg_t g_panel_360x360_60_config = {
         .vact_lines   = 360,  // vact 454 lines
         .vfp_lines    = 16,   // vfp 10 lines
     },
-    .phy_data_rate = 288,     // 480Mbps
-    .pixel_clk = 12000,       // 20000KHz
+    .phy_data_rate = 480,     // 480Mbps
+    .pixel_clk = 20000,       // 20000KHz
 };
 
 const combo_dev_cfg_t g_panel_454x454_60_config = {
@@ -393,13 +393,13 @@ const lcd_cmd_sequ g_fd272_466x466_screen_init_on[] = {
 {1, 2, {0x73,0x08}, 0},                
                
 // // ===  AOD setting===              
-// {1, 2, {0xFE,0x40}, 0},             
-// {1, 2, {0x5D,0x24}, 0},             
-// {1, 2, {0x60,0x08}, 0},             
-// {1, 2, {0x61,0x05}, 0},             
-// {1, 2, {0x62,0xA5}, 0},             
-// {1, 2, {0x0C,0xD7}, 0},             
-// {1, 2, {0x0D,0xF0}, 0},             
+{1, 2, {0xFE,0x40}, 0},                
+{1, 2, {0x5D,0x24}, 0},                
+{1, 2, {0x60,0x08}, 0},                
+{1, 2, {0x61,0x05}, 0},                
+{1, 2, {0x62,0xA5}, 0},                
+{1, 2, {0x0C,0xD7}, 0},                
+{1, 2, {0x0D,0xF0}, 0},                
                
 // ===  PoweMIPI_WR(0x39,0x Settings  ===              
 {1, 2, {0xFE,0xE0}, 0}, 
@@ -647,17 +647,28 @@ const lcd_cmd_sequ g_fd272_466x466_screen_init_on[] = {
 {1, 2, {0x35,0x81}, 0},        
                
 // === gamma setting  ===              
-{1, 3, {0x39,0xFE,0x40}, 0},           
-{1, 3, {0x39,0x33,0x10}, 0},           
-{1, 3, {0x39,0x34,0xC1}, 0},           
-{1, 3, {0x39,0xFE,0x50}, 0}, 
-{1, 3, {0x39,0xA9,0x58}, 0}, 
-{1, 3, {0x39,0xAA,0x58}, 0}, 
-{1, 3, {0x39,0xAB,0x01}, 0},  
-{1, 3, {0x39,0xFE,0x60}, 0}, 
-{1, 3, {0x39,0xA9,0x58}, 0}, 
-{1, 3, {0x39,0xAA,0x48}, 0}, 
-{1, 3, {0x39,0xAB,0x01}, 0}, 
+// {1, 3, {0x39,0xFE,0x40}, 0},                
+// {1, 3, {0x39,0x33,0x10}, 0},                
+// {1, 3, {0x39,0x34,0xC1}, 0},                
+// {1, 3, {0x39,0xFE,0x50}, 0}, 
+// {1, 3, {0x39,0xA9,0x58}, 0}, 
+// {1, 3, {0x39,0xAA,0x58}, 0}, 
+// {1, 3, {0x39,0xAB,0x01}, 0},  
+// {1, 3, {0x39,0xFE,0x60}, 0}, 
+// {1, 3, {0x39,0xA9,0x58}, 0}, 
+// {1, 3, {0x39,0xAA,0x48}, 0}, 
+// {1, 3, {0x39,0xAB,0x01}, 0}, 
+{1, 2, {0xFE,0x40}, 0},                
+{1, 2, {0x33,0x10}, 0},                
+{1, 2, {0x34,0xC1}, 0},                
+{1, 2, {0xFE,0x50}, 0}, 
+{1, 2, {0xA9,0x58}, 0}, 
+{1, 2, {0xAA,0x58}, 0}, 
+{1, 2, {0xAB,0x01}, 0},  
+{1, 2, {0xFE,0x60}, 0}, 
+{1, 2, {0xA9,0x58}, 0}, 
+{1, 2, {0xAA,0x48}, 0}, 
+{1, 2, {0xAB,0x01}, 0}, 
                                          
 //=== Watchedge ===            
 {1, 2, {0xFE,0x90}, 0}, 
@@ -788,25 +799,42 @@ const lcd_cmd_sequ g_fd272_466x466_screen_init_on[] = {
 {1, 2, {0x55,0xA0}, 0},                
 {1, 2, {0x48,0xAA}, 0},                                                
 {1, 2, {0xFE,0x90}, 0},                
-{1, 2, {0x31,0x08}, 0},                
-               
+{1, 2, {0x31,0x08}, 0},        
+
+//add bist code
+// {1, 2, {0xFE,0x20}, 0},             
+// {1, 2, {0xF4,0x5A}, 0},             
+// {1, 2, {0xF5,0x59}, 0},
+               
+// {1, 2, {0xFE,0xD0}, 0},                                             
+// {1, 2, {0x4D,0x7F}, 0},             
+// {1, 2, {0x4E,0x80}, 0},     
+// {1, 2, {0xFE,0x40}, 0},                                             
+// {1, 2, {0x54,0xAF}, 0},
+
+// {1, 2, {0xFE,0x20}, 0},             
+// {1, 2, {0xF4,0x5A}, 0},             
+// {1, 2, {0xF5,0x59}, 0},
+// {1, 2, {0xFE,0x40}, 0},             
+// {1, 2, {0x08,0x0A}, 0},
+
+
+{1, 2, {0xFE,0x00}, 0},        
+// {1, 2, {0x39,0x0e}, 0},
+// {1, 2, {0xC4,0x80}, 0},                                             
+// {1, 2, {0x3A,0x77}, 0},
+
 //=== CMD1 setting ===         
 // MIPI_WR(0x39,0xFE,0x00);
-//MIPI_WR(0x39,0xC4,0x80); //SPI setting, mipi MIPI_WR(0x39,0xemove
-//MIPI_WR(0x39,0x3A,0x55); //55 MIPI_WR(0x39,0xGB565, 77 MIPI_WR(0x39,0xGB888          
+// MIPI_WR(0x39,0xC4,0x80); //SPI setting, mipi MIPI_WR(0x39,0xemove
+// MIPI_WR(0x39,0x3A,0x55); //55 MIPI_WR(0x39,0xGB565, 77 MIPI_WR(0x39,0xGB888         
 {1, 2, {0x35,0x00}, 0},                        
 {1, 2, {0x53,0x20}, 0},                        
 {1, 2, {0x51,0xFF}, 0},                        
 {1, 2, {0x63,0xFF}, 0},                        
 {1, 5, {0x2A,0x00,0x08,0x01,0xD9}, 0},                         // paMIPI_WR(0x39,0xitial update
 {1, 5, {0x2B,0x00,0x00,0x01,0xD1}, 0},                         // paMIPI_WR(0x39,0xtial update
-{1, 1, {0x11}, 120}, 
-
-{1, 2, {0xFE,0x20}, 0}, 
-{1, 2, {0xF4,0x5A}, 0}, 
-{1, 2, {0xF5,0x59}, 0}, 
-{1, 2, {0xFE,0x40}, 0}, 
-{1, 2, {0x08,0x0A}, 0},                        
+{1, 1, {0x11}, 120},           
 
 {1, 1, {0x29}, 0},     
 };
@@ -1097,7 +1125,7 @@ const lcd_drv_cfg g_lcd_driver_ops[] = {
     {
         .bus_type             = BUS_DISPLAY_MIPI,
         .bus_cfg              = &g_fd272_466x466_60_config,
-        .x_start              = 0x6,
+        .x_start              = 0x8,
         .y_start              = 0,
         .fps                  = 60,
         .lcd_id               = LCD_FD272_466X466_SCREEN_ID,
index 23e8c47..c6ebe9d 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: penglei 1624952103@qq.com\r
  * @Date: 2025-07-29 09:33:56\r
  * @LastEditors: penglei 1624952103@qq.com\r
- * @LastEditTime: 2025-07-30 11:37:00\r
+ * @LastEditTime: 2025-11-06 16:07:32\r
  * @FilePath: /FD230/code/sdk/drivers/drivers/driver/lcd/lcd_private.c\r
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\r
  */\r
 #include "product.h"\r
 #include "debug_print.h"\r
 #include "pinctrl.h"\r
+\r
+#ifdef BOARD_FD272\r
+#define LCD_VDD_EN  S_AGPIO_L18\r
+#endif\r
+\r
 static void lcd_drv_power_on(void)\r
 {\r
+\r
+#ifdef BOARD_FD272\r
+    uapi_gpio_set_dir(LCD_VDD_EN, GPIO_DIRECTION_OUTPUT);\r
+\r
+    uapi_gpio_set_val(LCD_VDD_EN, GPIO_LEVEL_HIGH);\r
+    uapi_tcxo_delay_ms(10); /* delay 10 ms */\r
+#endif\r
+\r
 #ifndef QSPI_DISPLAY\r
     uapi_gpio_set_dir(VCI_LCD_GPIO, GPIO_DIRECTION_OUTPUT);\r
     uapi_gpio_set_val(VCI_LCD_GPIO, GPIO_LEVEL_HIGH);\r
@@ -64,6 +77,14 @@ static void lcd_drv_power_off(void)
 #if defined(BOARD_FD230)\r
     uapi_tcxo_delay_ms(10); /* delay 10 ms */\r
 #endif\r
+\r
+#ifdef BOARD_FD272\r
+    uapi_gpio_set_dir(LCD_VDD_EN, GPIO_DIRECTION_OUTPUT);\r
+\r
+    uapi_gpio_set_val(LCD_VDD_EN, GPIO_LEVEL_LOW);\r
+    uapi_tcxo_delay_ms(10); /* delay 10 ms */\r
+#endif\r
+\r
     int resetvalue = uapi_gpio_get_output_val(RESET_LCD_GPIO);\r
     int lcd_envalue = uapi_gpio_get_output_val(VCI_LCD_GPIO);\r
     printf("Output RESET_LCD_GPIO %d , VCI_LCD_GPIO %d\r\n",resetvalue,lcd_envalue);\r
index d253f4f..a589fe9 100644 (file)
@@ -70,11 +70,9 @@ td_void dpu_crg_set_vedio_mclk_div_ctl(td_bool mclk_cken)
 #ifdef GPU_SUPPORT_VIDEO_MODE
     mclk_div_ctl.bits.dpu_mclk_div  = 0x412600C; /* 147M * 12/147 = 12M */
 #else
-#ifdef LCD_JD9885
-    mclk_div_ctl.bits.dpu_mclk_div  = 0x412600C; /* 147M * 20/147 = 20M */
-#else
-    mclk_div_ctl.bits.dpu_mclk_div  = 0x4126014;
-#endif    
+
+    mclk_div_ctl.bits.dpu_mclk_div  = 0x4126014;/* 147M * 20/147 = 20M */
+    
 #endif
     mclk_div_ctl.bits.dpu_mclk_cken = mclk_cken;
     uapi_reg_write(CRG_VEDIO_CRG_MCLK_DIV_CTL, mclk_div_ctl.u32);