* [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition
@ 2012-05-11 1:07 Fabio Estevam
2012-05-11 1:07 ` [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init() Fabio Estevam
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Fabio Estevam @ 2012-05-11 1:07 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
The original definition of IPU_CTRL_BASE_ADDR does match the value stated
in the MX53 Reference Manual.
However, if using such value the IPU driver hangs when trying to access the IPU registers.
Looking for this definition in Freescale U-boot version shows that it is set as 0.
Set it as 0 here as well, so that we can have a working IPU driver for mx53.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/include/asm/arch-mx5/imx-regs.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
index cef4190..171c4ab 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -34,7 +34,7 @@
#define NFC_BASE_ADDR_AXI 0xCFFF0000
#define CS1_BASE_ADDR 0xB8000000
#elif defined(CONFIG_MX53)
-#define IPU_CTRL_BASE_ADDR 0x18000000
+#define IPU_CTRL_BASE_ADDR 0x00000000
#define SPBA0_BASE_ADDR 0x50000000
#define AIPS1_BASE_ADDR 0x53F00000
#define AIPS2_BASE_ADDR 0x63F00000
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init()
2012-05-11 1:07 [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Fabio Estevam
@ 2012-05-11 1:07 ` Fabio Estevam
2012-05-11 1:50 ` Liu Hui-R64343
2012-05-25 8:42 ` Anatolij Gustschin
2012-05-11 1:07 ` [U-Boot] [PATCH 3/3] mx53loco: Add LCD support Fabio Estevam
` (2 subsequent siblings)
3 siblings, 2 replies; 10+ messages in thread
From: Fabio Estevam @ 2012-05-11 1:07 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
The ipuv3 driver is currently only used on mx51, but it can be extended to work
on mx53 and mx6 as well.
Rename mx51_fb_init(), so that it can be used by other SoCs.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx51evk/mx51evk.c | 2 +-
board/ttcontrol/vision2/vision2.c | 2 +-
drivers/video/mxc_ipuv3_fb.c | 2 +-
include/ipu_pixfmt.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index bc7f057..514a7ac 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -502,7 +502,7 @@ void lcd_iomux(void)
void lcd_enable(void)
{
- int ret = mx51_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
+ int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
if (ret)
printf("LCD cannot be configured: %d\n", ret);
}
diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
index 282de95..d68bef7 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -604,7 +604,7 @@ void lcd_enable(void)
gpio_set_value(2, 1);
mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
- ret = mx51_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666);
+ ret = ipuv3_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666);
if (ret)
puts("LCD cannot be configured\n");
}
diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index 1bee54c..c38e22d 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -599,7 +599,7 @@ void video_set_lut(unsigned int index, /* color number */
return;
}
-int mx51_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt)
+int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt)
{
gmode = mode;
gdisp = disp;
diff --git a/include/ipu_pixfmt.h b/include/ipu_pixfmt.h
index 656f605..0019898 100644
--- a/include/ipu_pixfmt.h
+++ b/include/ipu_pixfmt.h
@@ -76,6 +76,6 @@
#define IPU_PIX_FMT_YVU422P fourcc('Y', 'V', '1', '6') /*< 16 YVU 4:2:2 */
#define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P') /*< 16 YUV 4:2:2 */
-int mx51_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt);
+int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt);
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/3] mx53loco: Add LCD support
2012-05-11 1:07 [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Fabio Estevam
2012-05-11 1:07 ` [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init() Fabio Estevam
@ 2012-05-11 1:07 ` Fabio Estevam
2012-05-11 1:50 ` Liu Hui-R64343
2012-05-25 8:43 ` Anatolij Gustschin
2012-05-11 1:49 ` [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Liu Hui-R64343
2012-05-11 10:46 ` Stefano Babic
3 siblings, 2 replies; 10+ messages in thread
From: Fabio Estevam @ 2012-05-11 1:07 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
Add support for CLAA07LC0ACW LCD that connects to the mx53loco board.
Configure the board to show the Linux logo on the LCD.
Also increase the size of CONFIG_SYS_MALLOC_LEN variable to take into account
the framebuffer usage.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx53loco/mx53loco.c | 72 +++++++++++++++++++++++++++++++++++
include/configs/mx53loco.h | 13 ++++++-
2 files changed, 84 insertions(+), 1 deletions(-)
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index dec966d..ad9e419 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -39,6 +39,10 @@
#include <pmic.h>
#include <dialog_pmic.h>
#include <fsl_pmic.h>
+#include <linux/fb.h>
+#include <ipu_pixfmt.h>
+
+#define MX53LOCO_LCD_POWER (2 * 32 + 24) /* GPIO3_24 */
DECLARE_GLOBAL_DATA_PTR;
@@ -402,10 +406,74 @@ static void clock_1GHz(void)
printf("CPU: Switch DDR clock to 400MHz failed\n");
}
+static struct fb_videomode claa_wvga = {
+ .name = "CLAA07LC0ACW",
+ .refresh = 57,
+ .xres = 800,
+ .yres = 480,
+ .pixclock = 37037,
+ .left_margin = 40,
+ .right_margin = 60,
+ .upper_margin = 10,
+ .lower_margin = 10,
+ .hsync_len = 20,
+ .vsync_len = 10,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED
+};
+
+void lcd_iomux(void)
+{
+ mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DI0_PIN15, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DI0_PIN2, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DI0_PIN3, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT0, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT1, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT2, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT3, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT4, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT5, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT6, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT7, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT8, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT9, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT10, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT11, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT12, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT13, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT14, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT15, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT16, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT17, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT18, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT19, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT20, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT21, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT22, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT23, IOMUX_CONFIG_ALT0);
+
+ /* Turn on GPIO backlight */
+ mxc_request_iomux(MX53_PIN_EIM_D24, IOMUX_CONFIG_ALT1);
+ gpio_direction_output(MX53LOCO_LCD_POWER, 1);
+
+ /* Turn on display contrast */
+ mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+ gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_GPIO_1), 1);
+}
+
+void lcd_enable(void)
+{
+ int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
+ if (ret)
+ printf("LCD cannot be configured: %d\n", ret);
+}
+
int board_early_init_f(void)
{
setup_iomux_uart();
setup_iomux_fec();
+ lcd_iomux();
return 0;
}
@@ -432,6 +500,8 @@ int board_late_init(void)
clock_1GHz();
print_cpuinfo();
+ setenv("stdout", "serial");
+
return 0;
}
#endif
@@ -441,6 +511,8 @@ int board_init(void)
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
mxc_set_sata_internal_clock();
+
+ lcd_enable();
return 0;
}
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index eab0e27..99daafb 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -38,7 +38,7 @@
#define CONFIG_INITRD_TAG
/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
+#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
#define CONFIG_BOARD_EARLY_INIT_F
#define CONFIG_BOARD_LATE_INIT
@@ -220,4 +220,15 @@
#define CONFIG_LIBATA
#endif
+/* Framebuffer and LCD */
+#define CONFIG_PREBOOT
+#define CONFIG_VIDEO
+#define CONFIG_VIDEO_MX5
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_BMP_16BPP
+#define CONFIG_VIDEO_LOGO
+
#endif /* __CONFIG_H */
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition
2012-05-11 1:07 [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Fabio Estevam
2012-05-11 1:07 ` [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init() Fabio Estevam
2012-05-11 1:07 ` [U-Boot] [PATCH 3/3] mx53loco: Add LCD support Fabio Estevam
@ 2012-05-11 1:49 ` Liu Hui-R64343
2012-05-11 10:46 ` Stefano Babic
3 siblings, 0 replies; 10+ messages in thread
From: Liu Hui-R64343 @ 2012-05-11 1:49 UTC (permalink / raw)
To: u-boot
>-----Original Message-----
>From: Fabio Estevam [mailto:festevam at gmail.com]
>Sent: Friday, May 11, 2012 9:08 AM
>To: u-boot at lists.denx.de
>Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
>Subject: [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition
>
>From: Fabio Estevam <fabio.estevam@freescale.com>
>
>The original definition of IPU_CTRL_BASE_ADDR does match the value stated
>in the MX53 Reference Manual.
>
>However, if using such value the IPU driver hangs when trying to access the
>IPU registers.
>
>Looking for this definition in Freescale U-boot version shows that it is set as 0.
>
>Set it as 0 here as well, so that we can have a working IPU driver for mx53.
>
>Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
>---
> arch/arm/include/asm/arch-mx5/imx-regs.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h
>b/arch/arm/include/asm/arch-mx5/imx-regs.h
>index cef4190..171c4ab 100644
>--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
>+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
>@@ -34,7 +34,7 @@
> #define NFC_BASE_ADDR_AXI 0xCFFF0000
> #define CS1_BASE_ADDR 0xB8000000
> #elif defined(CONFIG_MX53)
>-#define IPU_CTRL_BASE_ADDR 0x18000000
>+#define IPU_CTRL_BASE_ADDR 0x00000000
> #define SPBA0_BASE_ADDR 0x50000000
> #define AIPS1_BASE_ADDR 0x53F00000
> #define AIPS2_BASE_ADDR 0x63F00000
>--
>1.7.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init()
2012-05-11 1:07 ` [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init() Fabio Estevam
@ 2012-05-11 1:50 ` Liu Hui-R64343
2012-05-25 8:42 ` Anatolij Gustschin
1 sibling, 0 replies; 10+ messages in thread
From: Liu Hui-R64343 @ 2012-05-11 1:50 UTC (permalink / raw)
To: u-boot
>-----Original Message-----
>From: Fabio Estevam [mailto:festevam at gmail.com]
>Sent: Friday, May 11, 2012 9:08 AM
>To: u-boot at lists.denx.de
>Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
>Subject: [PATCH 2/3] mx5: Rename mx51_fb_init()
>
>From: Fabio Estevam <fabio.estevam@freescale.com>
>
>The ipuv3 driver is currently only used on mx51, but it can be extended to
>work on mx53 and mx6 as well.
>
>Rename mx51_fb_init(), so that it can be used by other SoCs.
>
>Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
>---
> board/freescale/mx51evk/mx51evk.c | 2 +-
> board/ttcontrol/vision2/vision2.c | 2 +-
> drivers/video/mxc_ipuv3_fb.c | 2 +-
> include/ipu_pixfmt.h | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/board/freescale/mx51evk/mx51evk.c
>b/board/freescale/mx51evk/mx51evk.c
>index bc7f057..514a7ac 100644
>--- a/board/freescale/mx51evk/mx51evk.c
>+++ b/board/freescale/mx51evk/mx51evk.c
>@@ -502,7 +502,7 @@ void lcd_iomux(void)
>
> void lcd_enable(void)
> {
>- int ret = mx51_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
>+ int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
> if (ret)
> printf("LCD cannot be configured: %d\n", ret); } diff --git
>a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
>index 282de95..d68bef7 100644
>--- a/board/ttcontrol/vision2/vision2.c
>+++ b/board/ttcontrol/vision2/vision2.c
>@@ -604,7 +604,7 @@ void lcd_enable(void)
> gpio_set_value(2, 1);
> mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
>
>- ret = mx51_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666);
>+ ret = ipuv3_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666);
> if (ret)
> puts("LCD cannot be configured\n");
> }
>diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
>index 1bee54c..c38e22d 100644
>--- a/drivers/video/mxc_ipuv3_fb.c
>+++ b/drivers/video/mxc_ipuv3_fb.c
>@@ -599,7 +599,7 @@ void video_set_lut(unsigned int index, /* color
>number */
> return;
> }
>
>-int mx51_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt)
>+int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t
>+pixfmt)
> {
> gmode = mode;
> gdisp = disp;
>diff --git a/include/ipu_pixfmt.h b/include/ipu_pixfmt.h index
>656f605..0019898 100644
>--- a/include/ipu_pixfmt.h
>+++ b/include/ipu_pixfmt.h
>@@ -76,6 +76,6 @@
> #define IPU_PIX_FMT_YVU422P fourcc('Y', 'V', '1', '6') /*< 16 YVU 4:2:2 */
> #define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P') /*< 16 YUV 4:2:2 */
>
>-int mx51_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt);
>+int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t
>+pixfmt);
>
> #endif
>--
>1.7.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/3] mx53loco: Add LCD support
2012-05-11 1:07 ` [U-Boot] [PATCH 3/3] mx53loco: Add LCD support Fabio Estevam
@ 2012-05-11 1:50 ` Liu Hui-R64343
2012-05-25 8:43 ` Anatolij Gustschin
1 sibling, 0 replies; 10+ messages in thread
From: Liu Hui-R64343 @ 2012-05-11 1:50 UTC (permalink / raw)
To: u-boot
>-----Original Message-----
>From: Fabio Estevam [mailto:festevam at gmail.com]
>Sent: Friday, May 11, 2012 9:08 AM
>To: u-boot at lists.denx.de
>Cc: sbabic at denx.de; Liu Hui-R64343; Estevam Fabio-R49496
>Subject: [PATCH 3/3] mx53loco: Add LCD support
>
>From: Fabio Estevam <fabio.estevam@freescale.com>
>
>Add support for CLAA07LC0ACW LCD that connects to the mx53loco board.
>
>Configure the board to show the Linux logo on the LCD.
>
>Also increase the size of CONFIG_SYS_MALLOC_LEN variable to take into
>account the framebuffer usage.
>
>Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
>---
> board/freescale/mx53loco/mx53loco.c | 72
>+++++++++++++++++++++++++++++++++++
> include/configs/mx53loco.h | 13 ++++++-
> 2 files changed, 84 insertions(+), 1 deletions(-)
>
>diff --git a/board/freescale/mx53loco/mx53loco.c
>b/board/freescale/mx53loco/mx53loco.c
>index dec966d..ad9e419 100644
>--- a/board/freescale/mx53loco/mx53loco.c
>+++ b/board/freescale/mx53loco/mx53loco.c
>@@ -39,6 +39,10 @@
> #include <pmic.h>
> #include <dialog_pmic.h>
> #include <fsl_pmic.h>
>+#include <linux/fb.h>
>+#include <ipu_pixfmt.h>
>+
>+#define MX53LOCO_LCD_POWER (2 * 32 + 24) /* GPIO3_24 */
>
> DECLARE_GLOBAL_DATA_PTR;
>
>@@ -402,10 +406,74 @@ static void clock_1GHz(void)
> printf("CPU: Switch DDR clock to 400MHz failed\n");
> }
>
>+static struct fb_videomode claa_wvga = {
>+ .name = "CLAA07LC0ACW",
>+ .refresh = 57,
>+ .xres = 800,
>+ .yres = 480,
>+ .pixclock = 37037,
>+ .left_margin = 40,
>+ .right_margin = 60,
>+ .upper_margin = 10,
>+ .lower_margin = 10,
>+ .hsync_len = 20,
>+ .vsync_len = 10,
>+ .sync = 0,
>+ .vmode = FB_VMODE_NONINTERLACED
>+};
>+
>+void lcd_iomux(void)
>+{
>+ mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DI0_PIN15, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DI0_PIN2, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DI0_PIN3, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT0, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT1, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT2, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT3, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT4, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT5, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT6, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT7, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT8, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT9, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT10, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT11, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT12, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT13, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT14, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT15, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT16, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT17, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT18, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT19, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT20, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT21, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT22, IOMUX_CONFIG_ALT0);
>+ mxc_request_iomux(MX53_PIN_DISP0_DAT23, IOMUX_CONFIG_ALT0);
>+
>+ /* Turn on GPIO backlight */
>+ mxc_request_iomux(MX53_PIN_EIM_D24, IOMUX_CONFIG_ALT1);
>+ gpio_direction_output(MX53LOCO_LCD_POWER, 1);
>+
>+ /* Turn on display contrast */
>+ mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
>+ gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_GPIO_1), 1); }
>+
>+void lcd_enable(void)
>+{
>+ int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
>+ if (ret)
>+ printf("LCD cannot be configured: %d\n", ret); }
>+
> int board_early_init_f(void)
> {
> setup_iomux_uart();
> setup_iomux_fec();
>+ lcd_iomux();
>
> return 0;
> }
>@@ -432,6 +500,8 @@ int board_late_init(void)
> clock_1GHz();
> print_cpuinfo();
>
>+ setenv("stdout", "serial");
>+
> return 0;
> }
> #endif
>@@ -441,6 +511,8 @@ int board_init(void)
> gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
>
> mxc_set_sata_internal_clock();
>+
>+ lcd_enable();
>
> return 0;
> }
>diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index
>eab0e27..99daafb 100644
>--- a/include/configs/mx53loco.h
>+++ b/include/configs/mx53loco.h
>@@ -38,7 +38,7 @@
> #define CONFIG_INITRD_TAG
>
> /* Size of malloc() pool */
>-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 *
>1024)
>+#define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
>
> #define CONFIG_BOARD_EARLY_INIT_F
> #define CONFIG_BOARD_LATE_INIT
>@@ -220,4 +220,15 @@
> #define CONFIG_LIBATA
> #endif
>
>+/* Framebuffer and LCD */
>+#define CONFIG_PREBOOT
>+#define CONFIG_VIDEO
>+#define CONFIG_VIDEO_MX5
>+#define CONFIG_CFB_CONSOLE
>+#define CONFIG_VGA_AS_SINGLE_DEVICE
>+#define CONFIG_VIDEO_BMP_RLE8
>+#define CONFIG_SPLASH_SCREEN
>+#define CONFIG_BMP_16BPP
>+#define CONFIG_VIDEO_LOGO
>+
> #endif /* __CONFIG_H */
>--
>1.7.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition
2012-05-11 1:07 [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Fabio Estevam
` (2 preceding siblings ...)
2012-05-11 1:49 ` [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Liu Hui-R64343
@ 2012-05-11 10:46 ` Stefano Babic
2012-05-11 18:31 ` Fabio Estevam
3 siblings, 1 reply; 10+ messages in thread
From: Stefano Babic @ 2012-05-11 10:46 UTC (permalink / raw)
To: u-boot
On 11/05/2012 03:07, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> The original definition of IPU_CTRL_BASE_ADDR does match the value stated
> in the MX53 Reference Manual.
>
> However, if using such value the IPU driver hangs when trying to access the IPU registers.
>
> Looking for this definition in Freescale U-boot version shows that it is set as 0.
>
> Set it as 0 here as well, so that we can have a working IPU driver for mx53.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Hi Fabio,
> arch/arm/include/asm/arch-mx5/imx-regs.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
> index cef4190..171c4ab 100644
> --- a/arch/arm/include/asm/arch-mx5/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
> @@ -34,7 +34,7 @@
> #define NFC_BASE_ADDR_AXI 0xCFFF0000
> #define CS1_BASE_ADDR 0xB8000000
> #elif defined(CONFIG_MX53)
> -#define IPU_CTRL_BASE_ADDR 0x18000000
> +#define IPU_CTRL_BASE_ADDR 0x00000000
> #define SPBA0_BASE_ADDR 0x50000000
> #define AIPS1_BASE_ADDR 0x53F00000
> #define AIPS2_BASE_ADDR 0x63F00000
Apart of the fact that it works, this chane appears really strange to
me. Maybe now it is not writing anymore in ipu, and the default values
are ok for mx53. It seems more a MX53 related issu in IPU3 driver, and
this change maybe hides the real problem. Do you have any additional
information to make this modification against the official Freescale's
reference manual ?
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition
2012-05-11 10:46 ` Stefano Babic
@ 2012-05-11 18:31 ` Fabio Estevam
0 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2012-05-11 18:31 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Fri, May 11, 2012 at 7:46 AM, Stefano Babic <sbabic@denx.de> wrote:
> Apart of the fact that it works, this chane appears really strange to
> me. Maybe now it is not writing anymore in ipu, and the default values
> are ok for mx53. It seems more a MX53 related issu in IPU3 driver, and
> this change maybe hides the real problem. Do you have any additional
> information to make this modification against the official Freescale's
> reference manual ?
I investigated this and I understand it better now.
I am working on a solution that will be flexible to handle mx51/mx53/mx6.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init()
2012-05-11 1:07 ` [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init() Fabio Estevam
2012-05-11 1:50 ` Liu Hui-R64343
@ 2012-05-25 8:42 ` Anatolij Gustschin
1 sibling, 0 replies; 10+ messages in thread
From: Anatolij Gustschin @ 2012-05-25 8:42 UTC (permalink / raw)
To: u-boot
Hi,
On Thu, 10 May 2012 22:07:34 -0300
Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> The ipuv3 driver is currently only used on mx51, but it can be extended to work
> on mx53 and mx6 as well.
>
> Rename mx51_fb_init(), so that it can be used by other SoCs.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> board/freescale/mx51evk/mx51evk.c | 2 +-
> board/ttcontrol/vision2/vision2.c | 2 +-
> drivers/video/mxc_ipuv3_fb.c | 2 +-
> include/ipu_pixfmt.h | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
Applied to u-boot-video/master, thanks!
Anatolij
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH 3/3] mx53loco: Add LCD support
2012-05-11 1:07 ` [U-Boot] [PATCH 3/3] mx53loco: Add LCD support Fabio Estevam
2012-05-11 1:50 ` Liu Hui-R64343
@ 2012-05-25 8:43 ` Anatolij Gustschin
1 sibling, 0 replies; 10+ messages in thread
From: Anatolij Gustschin @ 2012-05-25 8:43 UTC (permalink / raw)
To: u-boot
Hi,
On Thu, 10 May 2012 22:07:35 -0300
Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Add support for CLAA07LC0ACW LCD that connects to the mx53loco board.
>
> Configure the board to show the Linux logo on the LCD.
>
> Also increase the size of CONFIG_SYS_MALLOC_LEN variable to take into account
> the framebuffer usage.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> board/freescale/mx53loco/mx53loco.c | 72 +++++++++++++++++++++++++++++++++++
> include/configs/mx53loco.h | 13 ++++++-
> 2 files changed, 84 insertions(+), 1 deletions(-)
Applied to u-boot-video/master, thanks!
Anatolij
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-05-25 8:43 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 1:07 [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Fabio Estevam
2012-05-11 1:07 ` [U-Boot] [PATCH 2/3] mx5: Rename mx51_fb_init() Fabio Estevam
2012-05-11 1:50 ` Liu Hui-R64343
2012-05-25 8:42 ` Anatolij Gustschin
2012-05-11 1:07 ` [U-Boot] [PATCH 3/3] mx53loco: Add LCD support Fabio Estevam
2012-05-11 1:50 ` Liu Hui-R64343
2012-05-25 8:43 ` Anatolij Gustschin
2012-05-11 1:49 ` [U-Boot] [PATCH 1/3] mx53: Change IPU_CTRL_BASE_ADDR definition Liu Hui-R64343
2012-05-11 10:46 ` Stefano Babic
2012-05-11 18:31 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox