[U-Boot] [PATCH v2] wandboard: add Future Eletronics 7" WVGA LCD extension board
Fabio Estevam
festevam at gmail.com
Thu May 1 23:48:24 CEST 2014
On Thu, May 1, 2014 at 6:35 PM, Otavio Salvador <otavio at ossystems.com.br> wrote:
> static void setup_display(void)
> {
> struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
> + struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
> int reg;
>
> enable_ipu_clock();
> @@ -254,6 +343,28 @@ static void setup_display(void)
> reg |= (CHSCCDR_CLK_SEL_LDB_DI0
> << MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
> writel(reg, &mxc_ccm->chsccdr);
> +
> + reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES
> + | IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_LOW
> + | IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW
> + | IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG
> + | IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT
> + | IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG
> + | IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT
> + | IOMUXC_GPR2_LVDS_CH0_MODE_DISABLED
> + | IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0;
> + writel(reg, &iomux->gpr[2]);
This is all LVDS related and the LCD you are adding is not a LVDS.
> +
> + reg = readl(&iomux->gpr[3]);
> + reg = (reg & ~(IOMUXC_GPR3_LVDS1_MUX_CTL_MASK
> + | IOMUXC_GPR3_HDMI_MUX_CTL_MASK))
> + | (IOMUXC_GPR3_MUX_SRC_IPU1_DI0
> + << IOMUXC_GPR3_LVDS1_MUX_CTL_OFFSET);
> + writel(reg, &iomux->gpr[3]);
Same here.
> #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
> #define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
> @@ -152,7 +160,33 @@
> "fi; " \
> "fi\0" \
> "mmcargs=setenv bootargs console=${console},${baudrate} " \
> - "root=${mmcroot}\0" \
> + "root=${mmcroot}; run videoargs\0" \
> + "videoargs=" \
> + "setenv nextcon 0; " \
> + "if hdmidet; then " \
> + "setenv bootargs ${bootargs} " \
> + "video=mxcfb${nextcon}:dev=hdmi,1280x720M at 60," \
> + "if=RGB24; " \
This is unrelated to adding a LVDS display and would be better handled
on a separate patch.
> + "setenv fbmen fbmem=28M; " \
> + "setexpr nextcon ${nextcon} + 1; " \
> + "else " \
> + "echo - no HDMI monitor;" \
> + "fi; " \
> + "i2c dev 1; " \
> + "if i2c probe 0x10; then " \
> + "setenv bootargs ${bootargs} " \
> + "video=mxcfb${nextcon}:dev=lcd,800x480 at 60," \
> + "if=RGB666; " \
> + "if test 0 -eq ${nextcon}; then " \
> + "setenv fbmem fbmem=10M; " \
> + "else " \
> + "setenv fbmem ${fbmem},10M; " \
> + "fi; " \
> + "setexpr nextcon ${nextcon} + 1; " \
> + "else " \
> + "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
> + "fi; " \
> + "setenv bootargs ${bootargs} ${fbmem}\0" \
Changing the environment variables would be more appropriate on a
separate patch, but still don't like the idea of hardcoding the video
argument specific to a FSL kernel version.
More information about the U-Boot
mailing list