]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx28/tx28.c
karo: tx28: add support for TX28-4033 (with 256MiB flash)
[karo-tx-uboot.git] / board / karo / tx28 / tx28.c
index 1afd4bb19feb257e7fb3c99b6e54fe0a009ebec4..8957b8c7db503476997ae6f0fff2b37531e24b70 100644 (file)
@@ -486,6 +486,12 @@ static struct fb_videomode tx28_fb_modes[] = {
 };
 
 static int lcd_enabled = 1;
+static int lcd_bl_polarity;
+
+static int lcd_backlight_polarity(void)
+{
+       return lcd_bl_polarity;
+}
 
 void lcd_enable(void)
 {
@@ -503,7 +509,8 @@ void lcd_enable(void)
                udelay(100);
                gpio_set_value(TX28_LCD_RST_GPIO, 1);
                udelay(300000);
-               gpio_set_value(TX28_LCD_BACKLIGHT_GPIO, 0);
+               gpio_set_value(TX28_LCD_BACKLIGHT_GPIO,
+                       lcd_backlight_polarity());
        }
 }
 
@@ -515,7 +522,8 @@ void lcd_panel_disable(void)
 {
        if (lcd_enabled) {
                debug("Switching LCD off\n");
-               gpio_set_value(TX28_LCD_BACKLIGHT_GPIO, 1);
+               gpio_set_value(TX28_LCD_BACKLIGHT_GPIO,
+                       !lcd_backlight_polarity());
                gpio_set_value(TX28_LCD_RST_GPIO, 0);
                gpio_set_value(TX28_LCD_PWR_GPIO, 0);
        }
@@ -558,9 +566,6 @@ static const iomux_cfg_t stk5_lcd_pads[] = {
        MX28_PAD_LCD_WR_RWN__LCD_HSYNC | MXS_PAD_CTRL,
        MX28_PAD_LCD_RS__LCD_DOTCLK | MXS_PAD_CTRL,
        MX28_PAD_LCD_CS__LCD_CS | MXS_PAD_CTRL,
-       MX28_PAD_LCD_VSYNC__LCD_VSYNC | MXS_PAD_CTRL,
-       MX28_PAD_LCD_HSYNC__LCD_HSYNC | MXS_PAD_CTRL,
-       MX28_PAD_LCD_DOTCLK__LCD_DOTCLK | MXS_PAD_CTRL,
 };
 
 static const struct gpio stk5_lcd_gpios[] = {
@@ -595,6 +600,7 @@ void lcd_ctrl_init(void *lcdbase)
        }
 
        karo_fdt_move_fdt();
+       lcd_bl_polarity = karo_fdt_get_backlight_polarity(working_fdt);
 
        if (video_mode == NULL) {
                debug("Disabling LCD\n");
@@ -888,7 +894,8 @@ int checkboard(void)
        const char *dlm = "";
 
        printf("Board: Ka-Ro TX28-4%sx%d\n", TX28_MOD_SUFFIX,
-               CONFIG_SDRAM_SIZE / SZ_128M);
+               CONFIG_SDRAM_SIZE / SZ_128M +
+               CONFIG_SYS_NAND_BLOCKS / 2048 * 2);
 
        printf("POWERUP Source: ");
        if (pwrup_src & (3 << 0)) {
@@ -987,7 +994,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        karo_fdt_fixup_touchpanel(blob, tx28_touchpanels,
                                ARRAY_SIZE(tx28_touchpanels));
-       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
+       karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
        karo_fdt_update_fb_mode(blob, video_mode);
 }