ARM: dts: rockchip: fix timing configs of panel k350c4516t for rv1103/rv1106 evb

1. Modify mcu-timing configs according to panel datasheet.
2. Modify clock-frequency config sync with mcu-timing
   configs.
3. Add more comments for panel initialization sequence.
4. Add 10ms delay before sending initialization sequence
   to make sure the reset gpio output a low pulse.
5. Remove unused parameter reset-value.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ib0b5266de5612aa369be89c1c8edf1f4a5025c3f
This commit is contained in:
Damon Ding
2023-07-20 10:02:29 +08:00
parent dd2b9adc1a
commit 8cfd518aab
2 changed files with 72 additions and 36 deletions

View File

@@ -91,22 +91,30 @@
status = "okay";
rockchip,data-sync-bypass;
pinctrl-names = "default";
/*
* rgb3x8_pins for RGB3x8(8bit)
* rgb565_pins for RGB565(16bit)
*/
pinctrl-0 = <&rgb3x8_pins>;
/*
* 320x480 RGB/MCU screen K350C4516T
*/
mcu_panel: mcu-panel {
/*
* MEDIA_BUS_FMT_RGB888_3X8 for RGB3x8(8bit)
* MEDIA_BUS_FMT_RGB565_1X16 for RGB565(16bit)
*/
bus-format = <MEDIA_BUS_FMT_RGB888_3X8>;
backlight = <&backlight>;
enable-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>;
enable-delay-ms = <20>;
reset-gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
reset-value = <0>;
reset-delay-ms = <10>;
prepare-delay-ms = <20>;
unprepare-delay-ms = <20>;
disable-delay-ms = <20>;
init-delay-ms = <10>;
width-mm = <217>;
height-mm = <136>;
@@ -161,23 +169,31 @@
00 00 01 36
01 00 01 48
00 00 01 3a //interface pixel format
01 00 01 77 // bpp cfg
// 3 11
// 16 55
// 18 66
// 24 77
00 00 01 3a
01 00 01 66 /*
* interface pixel format:
* 66 for RGB3x8(8bit)
* 55 for RGB565(16bit)
*/
00 00 01 b0 //interface mode control
00 00 01 b0
01 00 01 00
00 00 01 b1 //frame rate 60hz
01 00 01 a0
00 00 01 b1
01 00 01 70 /*
* frame rate control:
* 70 (45hz) for RGB3x8(8bit)
* a0 (60hz) for RGB565(16bit)
*/
01 00 01 11
00 00 01 b4
01 00 01 02
00 00 01 B6
01 00 01 02
01 00 01 02 /*
* display function control:
* 32 for RGB
* 02 for MCU
*/
01 00 01 02
00 00 01 b7
@@ -211,7 +227,11 @@
native-mode = <&kd050fwfba002_timing>;
kd050fwfba002_timing: timing0 {
clock-frequency = <73174500>;
/*
* 7840125 for frame rate 45Hz
* 10453500 for frame rate 60Hz
*/
clock-frequency = <7840125>;
hactive = <320>;
vactive = <480>;
hback-porch = <10>;
@@ -280,15 +300,15 @@
* mcu-rw-pend = <5>;
* mcu-hold-mode = <0>; // default set to 0
*
* Ruduce all parameters because the max vop dclk
* is 74.25M in rv1106.
* To increase the frame rate, reduce all parameters because
* the max dclk rate of mcu is 150M in rv1103/rv1106.
*/
mcu-timing {
mcu-pix-total = <7>;
mcu-pix-total = <5>;
mcu-cs-pst = <1>;
mcu-cs-pend = <6>;
mcu-cs-pend = <4>;
mcu-rw-pst = <2>;
mcu-rw-pend = <5>;
mcu-rw-pend = <3>;
mcu-hold-mode = <0>; // default set to 0
};

View File

@@ -81,6 +81,10 @@
status = "okay";
rockchip,data-sync-bypass;
pinctrl-names = "default";
/*
* rgb3x8_pins for RGB3x8(8bit)
* rgb565_pins for RGB565(16bit)
*/
pinctrl-0 = <&rgb565_pins>;
/*
@@ -88,19 +92,19 @@
*/
mcu_panel: mcu-panel {
/*
* MEDIA_BUS_FMT_RGB888_3X8 for serial mcu
* MEDIA_BUS_FMT_RGB565_1X16 for parallel mcu
* MEDIA_BUS_FMT_RGB888_3X8 for RGB3x8(8bit)
* MEDIA_BUS_FMT_RGB565_1X16 for RGB565(16bit)
*/
bus-format = <MEDIA_BUS_FMT_RGB565_1X16>;
backlight = <&backlight>;
enable-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_LOW>;
enable-delay-ms = <20>;
reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
reset-value = <0>;
reset-delay-ms = <10>;
prepare-delay-ms = <20>;
unprepare-delay-ms = <20>;
disable-delay-ms = <20>;
init-delay-ms = <10>;
width-mm = <217>;
height-mm = <136>;
@@ -155,23 +159,31 @@
00 00 01 36
01 00 01 48
00 00 01 3a //interface pixel format
01 00 01 55 // bpp cfg
// 3 11
// 16 55
// 18 66
// 24 77
00 00 01 3a
01 00 01 55 /*
* interface pixel format:
* 66 for RGB3x8(8bit)
* 55 for RGB565(16bit)
*/
00 00 01 b0 //interface mode control
00 00 01 b0
01 00 01 00
00 00 01 b1 //frame rate 60hz
01 00 01 a0
00 00 01 b1
01 00 01 a0 /*
* frame rate control:
* 70 (45hz) for RGB3x8(8bit)
* a0 (60hz) for RGB565(16bit)
*/
01 00 01 11
00 00 01 b4
01 00 01 02
00 00 01 B6
01 00 01 02
01 00 01 02 /*
* display function control:
* 32 for RGB
* 02 for MCU
*/
01 00 01 02
00 00 01 b7
@@ -205,7 +217,11 @@
native-mode = <&kd050fwfba002_timing>;
kd050fwfba002_timing: timing0 {
clock-frequency = <73174500>;
/*
* 7840125 for frame rate 45Hz
* 10453500 for frame rate 60Hz
*/
clock-frequency = <10453500>;
hactive = <320>;
vactive = <480>;
hback-porch = <10>;
@@ -274,15 +290,15 @@
* mcu-rw-pend = <5>;
* mcu-hold-mode = <0>; // default set to 0
*
* Ruduce all parameters because the max vop dclk
* is 74.25M in rv1106.
* To increase the frame rate, reduce all parameters because
* the max dclk rate of mcu is 150M in rv1103/rv1106.
*/
mcu-timing {
mcu-pix-total = <7>;
mcu-pix-total = <5>;
mcu-cs-pst = <1>;
mcu-cs-pend = <6>;
mcu-cs-pend = <4>;
mcu-rw-pst = <2>;
mcu-rw-pend = <5>;
mcu-rw-pend = <3>;
mcu-hold-mode = <0>; // default set to 0
};