fsl/diu: ch7301 encoder split off from t1040qds/diu.c
PATCH 1/2 fsl/diu: ch7301 encoder split off from t1040qds/diu.c
From: Wang Dongsheng <[email protected]>
The ch7301 encoder not only used in t1040qds platform, so we split it for t1042rdb and LSx platform.
board/freescale/common/Makefile +2 -0
@@ -34,6 +34,8 @@ ifndef CONFIG_RAMBOOT_PBL obj-$(CONFIG_FSL_FIXED_MMC_LOCATION) += sdhc_boot.o endif +obj-$(CONFIG_FSL_DIU_CH7301) += diu_ch7301.o + obj-$(CONFIG_MPC8541CDS) += cds_pci_ft.o obj-$(CONFIG_MPC8548CDS) += cds_pci_ft.o obj-$(CONFIG_MPC8555CDS) += cds_pci_ft.o
board/freescale/common/diu_ch7301.c new file +136 -0
136 lines not on this page · raw message
board/freescale/common/diu_ch7301.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright 2014 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __DIU_HDMI_CH7301__ +#define __DIU_HDMI_CH7301__ + +/* Programming of HDMI Chrontel CH7301 connector */ +int diu_set_dvi_encoder (unsigned int pixclock); + +#endif
board/freescale/t1040qds/diu.c +8 -126
160 lines not on this page · raw message
include/configs/T1040QDS.h +1 -0
@@ -404,6 +404,7 @@ unsigned long get_board_ddr_clk(void);/* Video */ #define CONFIG_FSL_DIU_FB #ifdef CONFIG_FSL_DIU_FB +#define CONFIG_FSL_DIU_CH7301 #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x180000)#define CONFIG_VIDEO #define CONFIG_CMD_BMP
Signature · 1 line
1.8.5
PATCH 2/2 powerpc/t1042RDB: Add Video - HDMI support
From: Jason Jin <[email protected]>
T1042 has internal display interface unit (DIU) for driving video. T1042RDB supports video mode via
-LCD using TI enconder
-HDMI type interface via HDMI encoder
Chrontel, CH7301C encoder which is I2C programmable is used as HDMI connector on T1042RDB.
This patch add support to
-enable Video interface for T1042RDB
-route qixis multiplexing to enable DIU-HDMI interface on board -program DIU pixel clock gerenartor for T1042 -program HDMI encoder via I2C on board
This patch refer to the upstream diu patch (337b0c52b3296f371d04aef71a833e09110e0e6b) for T1040qds.
---
This patch depends on CPLD.
Ozlab link: http://patchwork.ozlabs.org/patch/328180/
board/freescale/t104xrdb/Makefile +1 -0
@@ -12,3 +12,4 @@ obj-$(CONFIG_PCI) += pci.o obj-y += law.o obj-y += tlb.o obj-y += cpld.o +obj-$(CONFIG_FSL_DIU_FB) += diu.o
board/freescale/t104xrdb/diu.c new file +82 -0
82 lines not on this page · raw message
include/configs/T1042RDB_PI.h +24 -2
@@ -203,6 +203,7 @@#define CPLD_LBMAP_DFLTBANK 0x40/* BANK OR | BANK0 */ #define CPLD_LBMAP_RESET 0xFF#define CPLD_LBMAP_SHIFT 0x03 +#define CPLD_DIU_SEL_DFP 0x80#define CONFIG_SYS_CPLD_BASE 0xffdf0000#define CONFIG_SYS_CPLD_BASE_PHYS (0xf00000000ull | CONFIG_SYS_CPLD_BASE)
@@ -332,7 +333,8 @@#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET#define CONFIG_SYS_MONITOR_LEN (512 * 1024) -#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) +/*When DIU is enabled, more malloc memory needed for fb*/ +#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)/* Serial Port - controlled on board with jumper J8 * open - index 2
@@ -352,12 +354,27 @@#define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)#define CONFIG_SERIAL_MULTI /* Enable both serial ports */ -#define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */ /* Use the HUSH parser */ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " +/* Video */ +#define CONFIG_FSL_DIU_FB + +#ifdef CONFIG_FSL_DIU_FB +#define CONFIG_FSL_DIU_CH7301 +#define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x180000) +#define CONFIG_VIDEO +#define CONFIG_CMD_BMP +#define CONFIG_CFB_CONSOLE +#define CONFIG_CFB_CONSOLE_ANSI +#define CONFIG_VIDEO_SW_CURSOR +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO +#endif +/* pass open firmware flat tree */ #define CONFIG_OF_LIBFDT #define CONFIG_OF_BOARD_SETUP
@@ -380,6 +397,10 @@/* I2C bus multiplexer */ #define I2C_MUX_PCA_ADDR 0x70 +/* LDI/DVI Encoder for display */ +#define CONFIG_SYS_I2C_LDI_ADDR 0x38 +#define CONFIG_SYS_I2C_DVI_ADDR 0x75 +/* * RTC configuration */
@@ -646,6 +667,7 @@ "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) ";"\ "usb2:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\"netdev=eth0\0" \ +"video-mode=fslfb:1024x768-32 at 60,monitor=dvi\0" \ "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \"tftpflash=tftpboot $loadaddr $uboot && " \
Signature · 1 line
1.8.5
PATCH 2/2 powerpc/t1042RDB: Add Video - HDMI support
Dear Dongsheng Wang,
Quoted 2 lines · In message <[email protected]>…
From: Jason Jin <[email protected]>
...
board/freescale/t104xrdb/diu.c line 47
Quoted 9 lines
board/freescale/t104xrdb/diu.c new file +9
-0+void diu_set_pixel_clock (unsigned int pixclock) +{ +unsigned long speed_ccb, temp; +u32 pixval; +int ret; + speed_ccb =get_bus_freq (0 ); + temp =1000000000 / pixclock; + temp *=1000 ; + pixval = speed_ccb / temp;
Please always separate declarations and code by a blank line.
include/configs/T1042RDB_PI.h line 337
Quoted 4 lines
#define
CONFIG_SYS_MONITOR_LEN(512 * 1024)include/configs/T1042RDB_PI.h +2
-1-#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) +/*When DIU is enabled, more malloc memory needed for fb*/ +#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
This looks wrong to me. The FB should not be allocated using malloc(). Instead, it is supposed to be located at the end of the RAM - search for "reserve memory for LCD display" in "arch/arm/lib/board.c". Yes, I am aware that you don;t use a LCD here, but the appraoch should be the same in any case.
include/configs/T1042RDB_PI.h line 355
Quoted 5 lines
include/configs/T1042RDB_PI.h +0
-1@@ -352,12 +354,27 @@#define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)#define CONFIG_SERIAL_MULTI /* Enable both serial ports */ -#define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */
This appears to be an unrelated change?
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The net result is a system that is not only binary compatible with 4.3 BSD, but is even bug for bug compatible in almost all features." - Avadit Tevanian, Jr., "Architecture-Independent Virtual Memory Management for Parallel and Distributed Environments: The Mach Approach"
A message that is not in the archive (sent off-list or not yet received): 0439833dfb0d4822adb75892e8d16cd7@BN1PR03MB188.namprd03.prod.outlook.com
PATCH 2/2 powerpc/t1042RDB: Add Video - HDMI support
Dear "Dongsheng.Wang at freescale.com",
Quoted 10 lines · In message <0439833dfb0d4822adb75892e8d16cd7@BN1PR03MB188.namprd03.prod.outlook…
Quoted 8 lines
include/configs/T1042RDB_PI.h line 355
Quoted 6 lines
include/configs/T1042RDB_PI.h +0
-1@@ -352,12 +354,27 @@#define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)#define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_CCSRBAR+0x11D600)#define CONFIG_SERIAL_MULTI /* Enable both serial ports */ -#define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */ This appears to be an unrelated change?
If we get this MARCO, the console will not display on VIDEO. So we need to remove this MARCO.
Removing this macros has actually other effects, too. Please read the doc in the README.
Quoted 1 line
Of course we can also through the environment variable to change.
I think you actually only want to change your environment settings, but leave this macro in place.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Computers are not intelligent. They only think they are.