author | Evoke Zhang <evoke.zhang@amlogic.com> | 2019-11-05 10:55:11 (GMT) |
---|---|---|
committer | Xindong Xu <xindong.xu@amlogic.com> | 2019-11-28 02:30:44 (GMT) |
commit | 28adaa47c88578d98eccf93ca5a31f38d92cf9a8 (patch) | |
tree | 356b52faa0685c5faf90d8d4d5e27d6132146f44 | |
parent | b3859464d14917b0d5dd51e721428a598995710c (diff) | |
download | uboot-28adaa47c88578d98eccf93ca5a31f38d92cf9a8.zip uboot-28adaa47c88578d98eccf93ca5a31f38d92cf9a8.tar.gz uboot-28adaa47c88578d98eccf93ca5a31f38d92cf9a8.tar.bz2 |
lcd: support port_swap, lane_reverse for tl1 lvds [1/2]
PD#TV-11766
Problem:
lvds need port_swap function for tl1
Solution:
add port_swap, lane_reverse function support
Verify:
x301,ab301
Change-Id: I4f81d3192e59afcb0f5112c893d51ad6cf3206f6
Signed-off-by: Evoke Zhang <evoke.zhang@amlogic.com>
-rw-r--r-- | drivers/display/lcd/lcd_tablet/lcd_drv.c | 32 | ||||
-rw-r--r-- | drivers/display/lcd/lcd_tv/lcd_drv.c | 32 |
2 files changed, 60 insertions, 4 deletions
diff --git a/drivers/display/lcd/lcd_tablet/lcd_drv.c b/drivers/display/lcd/lcd_tablet/lcd_drv.c index 1e42b4c..caed6ce 100644 --- a/drivers/display/lcd/lcd_tablet/lcd_drv.c +++ b/drivers/display/lcd/lcd_tablet/lcd_drv.c @@ -353,8 +353,36 @@ static void lcd_lvds_control_set(struct lcd_config_s *pconf) break; case LCD_CHIP_TL1: case LCD_CHIP_TM2: - lcd_vcbus_write(P2P_CH_SWAP0, 0x76543210); - lcd_vcbus_write(P2P_CH_SWAP1, 0xba98); + /* lvds channel: //tx 12 channels + * 0: d0_a + * 1: d1_a + * 2: d2_a + * 3: clk_a + * 4: d3_a + * 5: d4_a + * 6: d0_b + * 7: d1_b + * 8: d2_b + * 9: clk_b + * a: d3_b + * b: d4_b */ + if (port_swap) { + if (lane_reverse) { + lcd_vcbus_write(P2P_CH_SWAP0, 0x456789ab); + lcd_vcbus_write(P2P_CH_SWAP1, 0x0123); + } else { + lcd_vcbus_write(P2P_CH_SWAP0, 0x10ba9876); + lcd_vcbus_write(P2P_CH_SWAP1, 0x5432); + } + } else { + if (lane_reverse) { + lcd_vcbus_write(P2P_CH_SWAP0, 0xab012345); + lcd_vcbus_write(P2P_CH_SWAP1, 0x6789); + } else { + lcd_vcbus_write(P2P_CH_SWAP0, 0x76543210); + lcd_vcbus_write(P2P_CH_SWAP1, 0xba98); + } + } break; default: lcd_vcbus_setb(LCD_PORT_SWAP, port_swap, 12, 1); diff --git a/drivers/display/lcd/lcd_tv/lcd_drv.c b/drivers/display/lcd/lcd_tv/lcd_drv.c index 49f2b2b..a17e766 100644 --- a/drivers/display/lcd/lcd_tv/lcd_drv.c +++ b/drivers/display/lcd/lcd_tv/lcd_drv.c @@ -297,8 +297,36 @@ static void lcd_lvds_control_set(struct lcd_config_s *pconf) break; case LCD_CHIP_TL1: case LCD_CHIP_TM2: - lcd_vcbus_write(P2P_CH_SWAP0, 0x76543210); - lcd_vcbus_write(P2P_CH_SWAP1, 0xba98); + /* lvds channel: //tx 12 channels + * 0: d0_a + * 1: d1_a + * 2: d2_a + * 3: clk_a + * 4: d3_a + * 5: d4_a + * 6: d0_b + * 7: d1_b + * 8: d2_b + * 9: clk_b + * a: d3_b + * b: d4_b */ + if (port_swap) { + if (lane_reverse) { + lcd_vcbus_write(P2P_CH_SWAP0, 0x456789ab); + lcd_vcbus_write(P2P_CH_SWAP1, 0x0123); + } else { + lcd_vcbus_write(P2P_CH_SWAP0, 0x10ba9876); + lcd_vcbus_write(P2P_CH_SWAP1, 0x5432); + } + } else { + if (lane_reverse) { + lcd_vcbus_write(P2P_CH_SWAP0, 0xab012345); + lcd_vcbus_write(P2P_CH_SWAP1, 0x6789); + } else { + lcd_vcbus_write(P2P_CH_SWAP0, 0x76543210); + lcd_vcbus_write(P2P_CH_SWAP1, 0xba98); + } + } break; default: lcd_vcbus_setb(LCD_PORT_SWAP, port_swap, 12, 1); |