]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx6/tx6qdl.c
karo: prevent video_mode variable from being clobbered by karo_fdt_set_display()
[karo-tx-uboot.git] / board / karo / tx6 / tx6qdl.c
index 27c007ef1753a1b0a3130d5aa5e16e1fef84a4de..d60d868ebcb4153f2f508e82222699051673394f 100644 (file)
@@ -1,26 +1,19 @@
 /*
- * Copyright (C) 2012 Lothar Waßmann <LW@KARO-electronics.de>
+ * Copyright (C) 2012,2013 Lothar Waßmann <LW@KARO-electronics.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
  * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
  */
-#define DEBUG
-//#define TIMER_TEST
 
 #include <common.h>
 #include <errno.h>
 #include <fsl_esdhc.h>
 #include <video_fb.h>
 #include <ipu.h>
-#include <mx2fb.h>
-#include <linux/fb.h>
+#include <mxcfb.h>
 #include <i2c.h>
+#include <linux/fb.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
-#include <asm/arch/iomux-mx6.h>
+#include <asm/arch/mx6-pins.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
@@ -62,7 +55,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define MUX_CFG_SION                   IOMUX_PAD(0, 0, MUX_CONFIG_SION, 0, 0, 0)
+#define MUX_CFG_SION                   IOMUX_PAD(0, 0, IOMUX_CONFIG_SION, 0, 0, 0)
 
 static const iomux_v3_cfg_t tx6qdl_pads[] = {
        /* NAND flash pads */
@@ -202,7 +195,7 @@ static void print_reset_cause(void)
 int read_cpu_temperature(void);
 int check_cpu_temperature(int boot);
 
-static void print_cpuinfo(void)
+static void tx6qdl_print_cpuinfo(void)
 {
        u32 cpurev = get_cpu_rev();
        char *cpu_str = "?";
@@ -232,23 +225,54 @@ static void print_cpuinfo(void)
        check_cpu_temperature(1);
 }
 
+#define LTC3676_BUCK1          0x01
+#define LTC3676_BUCK2          0x02
+#define LTC3676_BUCK3          0x03
+#define LTC3676_BUCK4          0x04
 #define LTC3676_DVB2A          0x0C
 #define LTC3676_DVB2B          0x0D
 #define LTC3676_DVB4A          0x10
 #define LTC3676_DVB4B          0x11
+#define LTC3676_CLIRQ          0x1f
 
 #define VDD_SOC_mV             (1375 + 50)
 #define VDD_CORE_mV            (1375 + 50)
 
+#define LTC3676_BUCK_DVDT_FAST (1 << 0)
+#define LTC3676_BUCK_KEEP_ALIVE        (1 << 1)
+#define LTC3676_BUCK_CLK_RATE_LOW      (1 << 2)
+#define LTC3676_BUCK_PHASE_SEL (1 << 3)
+#define LTC3676_BUCK_ENABLE_300        (1 << 4)
+#define LTC3676_BUCK_PULSE_SKIP        (0 << 5)
+#define LTC3676_BUCK_BURST_MODE        (1 << 5)
+#define LTC3676_BUCK_CONTINUOUS        (2 << 5)
+#define LTC3676_BUCK_ENABLE    (1 << 7)
+
+#define LTC3676_PGOOD_MASK     (1 << 5)
+
 #define mV_to_regval(mV)       (((mV) * 360 / 330 - 825 + 1) / 25)
 #define regval_to_mV(v)                (((v) * 25 + 825) * 330 / 360)
 
+static struct pmic_regs {
+       u8 addr;
+       u8 val;
+} ltc3676_regs[] = {
+       { LTC3676_DVB2B, mV_to_regval(900) | LTC3676_PGOOD_MASK, },
+       { LTC3676_DVB4B, mV_to_regval(900) | LTC3676_PGOOD_MASK, },
+       { LTC3676_DVB2A, mV_to_regval(VDD_SOC_mV), },
+       { LTC3676_DVB4A, mV_to_regval(VDD_CORE_mV), },
+       { LTC3676_BUCK1, LTC3676_BUCK_BURST_MODE | LTC3676_BUCK_CLK_RATE_LOW, },
+       { LTC3676_BUCK2, LTC3676_BUCK_BURST_MODE | LTC3676_BUCK_CLK_RATE_LOW, },
+       { LTC3676_BUCK3, LTC3676_BUCK_BURST_MODE | LTC3676_BUCK_CLK_RATE_LOW, },
+       { LTC3676_BUCK4, LTC3676_BUCK_BURST_MODE | LTC3676_BUCK_CLK_RATE_LOW, },
+       { LTC3676_CLIRQ, 0, }, /* clear interrupt status */
+};
+
 static int setup_pmic_voltages(void)
 {
        int ret;
        unsigned char value;
-
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       int i;
 
        ret = i2c_probe(CONFIG_SYS_I2C_SLAVE);
        if (ret != 0) {
@@ -262,41 +286,17 @@ static int setup_pmic_voltages(void)
                return ret;
        }
 
-       /* VDDCORE/VDDSOC default 1.375V is not enough, considering
-          pfuze tolerance and IR drop and ripple, need increase
-          to 1.425V for SabreSD */
-
-       value = 0x39; /* VB default value & PGOOD not forced when slewing */
-       ret = i2c_write(CONFIG_SYS_I2C_SLAVE, LTC3676_DVB2B, 1, &value, 1);
-       if (ret) {
-               printf("%s: failed to write PMIC DVB2B register: %d\n",
-                       __func__, ret);
-               return ret;
-       }
-       ret = i2c_write(CONFIG_SYS_I2C_SLAVE, LTC3676_DVB4B, 1, &value, 1);
-       if (ret) {
-               printf("%s: failed to write PMIC DVB4B register: %d\n",
-                       __func__, ret);
-               return ret;
-       }
-
-       value = mV_to_regval(VDD_SOC_mV);
-       ret = i2c_write(CONFIG_SYS_I2C_SLAVE, LTC3676_DVB2A, 1, &value, 1);
-       if (ret) {
-               printf("%s: failed to write PMIC DVB2A register: %d\n",
-                       __func__, ret);
-               return ret;
-       }
-       printf("VDDSOC  set to %dmV\n", regval_to_mV(value));
-
-       value = mV_to_regval(VDD_CORE_mV);
-       ret = i2c_write(CONFIG_SYS_I2C_SLAVE, LTC3676_DVB4A, 1, &value, 1);
-       if (ret) {
-               printf("%s: failed to write PMIC DVB4A register: %d\n",
-                       __func__, ret);
-               return ret;
+       for (i = 0; i < ARRAY_SIZE(ltc3676_regs); i++) {
+               ret = i2c_write(CONFIG_SYS_I2C_SLAVE, ltc3676_regs[i].addr, 1,
+                               &ltc3676_regs[i].val, 1);
+               if (ret) {
+                       printf("%s: failed to write PMIC register %02x: %d\n",
+                               __func__, ltc3676_regs[i].addr, ret);
+                       return ret;
+               }
        }
-       printf("VDDCORE set to %dmV\n", regval_to_mV(value));
+       printf("VDDCORE set to %dmV\n", VDD_CORE_mV);
+       printf("VDDSOC  set to %dmV\n", VDD_SOC_mV);
        return 0;
 }
 
@@ -370,11 +370,12 @@ static const iomux_v3_cfg_t mmc1_pads[] = {
        MX6_PAD_SD3_CLK__GPIO_7_3,
 };
 
-static struct tx6q_esdhc_cfg {
+static struct tx6_esdhc_cfg {
        const iomux_v3_cfg_t *pads;
        int num_pads;
        enum mxc_clock clkid;
        struct fsl_esdhc_cfg cfg;
+       int cd_gpio;
 } tx6qdl_esdhc_cfg[] = {
        {
                .pads = mmc0_pads,
@@ -382,9 +383,9 @@ static struct tx6q_esdhc_cfg {
                .clkid = MXC_ESDHC_CLK,
                .cfg = {
                        .esdhc_base = (void __iomem *)USDHC1_BASE_ADDR,
-                       .cd_gpio = IMX_GPIO_NR(7, 2),
-                       .wp_gpio = -EINVAL,
+                       .max_bus_width = 4,
                },
+               .cd_gpio = IMX_GPIO_NR(7, 2),
        },
        {
                .pads = mmc1_pads,
@@ -392,28 +393,28 @@ static struct tx6q_esdhc_cfg {
                .clkid = MXC_ESDHC2_CLK,
                .cfg = {
                        .esdhc_base = (void __iomem *)USDHC2_BASE_ADDR,
-                       .cd_gpio = IMX_GPIO_NR(7, 3),
-                       .wp_gpio = -EINVAL,
+                       .max_bus_width = 4,
                },
+               .cd_gpio = IMX_GPIO_NR(7, 3),
        },
 };
 
-static inline struct tx6q_esdhc_cfg *to_tx6q_esdhc_cfg(struct fsl_esdhc_cfg *cfg)
+static inline struct tx6_esdhc_cfg *to_tx6_esdhc_cfg(struct fsl_esdhc_cfg *cfg)
 {
        void *p = cfg;
 
-       return p - offsetof(struct tx6q_esdhc_cfg, cfg);
+       return p - offsetof(struct tx6_esdhc_cfg, cfg);
 }
 
 int board_mmc_getcd(struct mmc *mmc)
 {
-       struct fsl_esdhc_cfg *cfg = mmc->priv;
+       struct tx6_esdhc_cfg *cfg = to_tx6_esdhc_cfg(mmc->priv);
 
        if (cfg->cd_gpio < 0)
                return cfg->cd_gpio;
 
        debug("SD card %d is %spresent\n",
-               to_tx6q_esdhc_cfg(cfg) - tx6qdl_esdhc_cfg,
+               cfg - tx6qdl_esdhc_cfg,
                gpio_get_value(cfg->cd_gpio) ? "NOT " : "");
        return !gpio_get_value(cfg->cd_gpio);
 }
@@ -424,17 +425,25 @@ int board_mmc_init(bd_t *bis)
 
        for (i = 0; i < ARRAY_SIZE(tx6qdl_esdhc_cfg); i++) {
                struct mmc *mmc;
-               struct fsl_esdhc_cfg *cfg = &tx6qdl_esdhc_cfg[i].cfg;
+               struct tx6_esdhc_cfg *cfg = &tx6qdl_esdhc_cfg[i];
+               int ret;
 
                if (i >= CONFIG_SYS_FSL_ESDHC_NUM)
                        break;
 
-               cfg->sdhc_clk = mxc_get_clock(tx6qdl_esdhc_cfg[i].clkid);
-               imx_iomux_v3_setup_multiple_pads(tx6qdl_esdhc_cfg[i].pads,
-                                               tx6qdl_esdhc_cfg[i].num_pads);
+               cfg->cfg.sdhc_clk = mxc_get_clock(cfg->clkid);
+               imx_iomux_v3_setup_multiple_pads(cfg->pads, cfg->num_pads);
+
+               ret = gpio_request_one(cfg->cd_gpio,
+                               GPIOF_INPUT, "MMC CD");
+               if (ret) {
+                       printf("Error %d requesting GPIO%d_%d\n",
+                               ret, cfg->cd_gpio / 32, cfg->cd_gpio % 32);
+                       continue;
+               }
 
                debug("%s: Initializing MMC slot %d\n", __func__, i);
-               fsl_esdhc_initialize(bis, cfg);
+               fsl_esdhc_initialize(bis, &cfg->cfg);
 
                mmc = find_mmc_device(i);
                if (mmc == NULL)
@@ -733,6 +742,7 @@ void lcd_enable(void)
        lcd_is_enabled = 0;
 
        karo_load_splashimage(1);
+
        if (lcd_enabled) {
                debug("Switching LCD on\n");
                gpio_set_value(TX6_LCD_PWR_GPIO, 1);
@@ -743,6 +753,24 @@ void lcd_enable(void)
        }
 }
 
+void lcd_disable(void)
+{
+       if (lcd_enabled) {
+               printf("Disabling LCD\n");
+               ipuv3_fb_shutdown();
+       }
+}
+
+void lcd_panel_disable(void)
+{
+       if (lcd_enabled) {
+               debug("Switching LCD off\n");
+               gpio_set_value(TX6_LCD_BACKLIGHT_GPIO, 1);
+               gpio_set_value(TX6_LCD_RST_GPIO, 0);
+               gpio_set_value(TX6_LCD_PWR_GPIO, 0);
+       }
+}
+
 static const iomux_v3_cfg_t stk5_lcd_pads[] = {
        /* LCD RESET */
        MX6_PAD_EIM_D29__GPIO_3_29,
@@ -791,7 +819,8 @@ static const struct gpio stk5_lcd_gpios[] = {
 void lcd_ctrl_init(void *lcdbase)
 {
        int color_depth = 24;
-       char *vm;
+       const char *video_mode = getenv("video_mode");
+       const char *vm;
        unsigned long val;
        int refresh = 60;
        struct fb_videomode *p = &tx6_fb_modes[0];
@@ -809,25 +838,31 @@ void lcd_ctrl_init(void *lcdbase)
        if (tstc() || (wrsr & WRSR_TOUT)) {
                debug("Disabling LCD\n");
                lcd_enabled = 0;
+               setenv("splashimage", NULL);
                return;
        }
 
        karo_fdt_move_fdt();
 
-       vm = getenv("video_mode");
+       vm = karo_fdt_set_display(video_mode, "", "/soc/aips-bus/ldb");
        if (vm == NULL) {
                debug("Disabling LCD\n");
                lcd_enabled = 0;
                return;
        }
+       video_mode = vm;
        if (karo_fdt_get_fb_mode(working_fdt, vm, &fb_mode) == 0) {
                p = &fb_mode;
                debug("Using video mode from FDT\n");
                vm += strlen(vm);
-               if (fb_mode.xres < panel_info.vl_col)
-                       panel_info.vl_col = fb_mode.xres;
-               if (fb_mode.yres < panel_info.vl_row)
-                       panel_info.vl_row = fb_mode.yres;
+               if (fb_mode.xres > panel_info.vl_col ||
+                       fb_mode.yres > panel_info.vl_row) {
+                       printf("video resolution from DT: %dx%d exceeds hardware limits: %dx%d\n",
+                               fb_mode.xres, fb_mode.yres,
+                               panel_info.vl_col, panel_info.vl_row);
+                       lcd_enabled = 0;
+                       return;
+               }
        }
        if (p->name != NULL)
                debug("Trying compiled-in video modes\n");
@@ -861,6 +896,7 @@ void lcd_ctrl_init(void *lcdbase)
                                        yres_set = 1;
                                } else if (!bpp_set) {
                                        switch (val) {
+                                       case 32:
                                        case 24:
                                                if (pix_fmt == IPU_PIX_FMT_LVDS666)
                                                        pix_fmt = IPU_PIX_FMT_LVDS888;
@@ -931,6 +967,25 @@ void lcd_ctrl_init(void *lcdbase)
                printf("\n");
                return;
        }
+       if (p->xres > panel_info.vl_col || p->yres > panel_info.vl_row) {
+               printf("video resolution: %dx%d exceeds hardware limits: %dx%d\n",
+                       p->xres, p->yres, panel_info.vl_col, panel_info.vl_row);
+               lcd_enabled = 0;
+               return;
+       }
+       panel_info.vl_col = p->xres;
+       panel_info.vl_row = p->yres;
+
+       switch (color_depth) {
+       case 8:
+               panel_info.vl_bpix = LCD_COLOR8;
+               break;
+       case 16:
+               panel_info.vl_bpix = LCD_COLOR16;
+               break;
+       default:
+               panel_info.vl_bpix = LCD_COLOR24;
+       }
 
        p->pixclock = KHZ2PICOS(refresh *
                (p->xres + p->left_margin + p->right_margin + p->hsync_len) *
@@ -940,6 +995,17 @@ void lcd_ctrl_init(void *lcdbase)
                PICOS2KHZ(p->pixclock) / 1000,
                PICOS2KHZ(p->pixclock) % 1000);
 
+       if (p != &fb_mode) {
+               int ret;
+
+               debug("Creating new display-timing node from '%s'\n",
+                       video_mode);
+               ret = karo_fdt_create_fb_mode(working_fdt, video_mode, p);
+               if (ret)
+                       printf("Failed to create new display-timing node from '%s': %d\n",
+                               video_mode, ret);
+       }
+
        gpio_request_array(stk5_lcd_gpios, ARRAY_SIZE(stk5_lcd_gpios));
        imx_iomux_v3_setup_multiple_pads(stk5_lcd_pads,
                                        ARRAY_SIZE(stk5_lcd_pads));
@@ -955,7 +1021,8 @@ void lcd_ctrl_init(void *lcdbase)
        if (pix_fmt != IPU_PIX_FMT_RGB24) {
                struct mxc_ccm_reg *ccm_regs = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
                /* enable LDB & DI0 clock */
-               writel(readl(&ccm_regs->CCGR3) | (3 << 12) | (3 << 2),
+               writel(readl(&ccm_regs->CCGR3) | MXC_CCM_CCGR3_LDB_DI0_MASK |
+                       MXC_CCM_CCGR3_IPU1_IPU_DI0_MASK,
                        &ccm_regs->CCGR3);
        }
 
@@ -1012,7 +1079,6 @@ static void tx6qdl_set_cpu_clock(void)
 static void tx6_init_mac(void)
 {
        u8 mac[ETH_ALEN];
-       char mac_str[ETH_ALEN * 3] = "";
 
        imx_get_mac_from_fuse(-1, mac);
        if (!is_valid_ether_addr(mac)) {
@@ -1020,11 +1086,8 @@ static void tx6_init_mac(void)
                return;
        }
 
-       snprintf(mac_str, sizeof(mac_str), "%02x:%02x:%02x:%02x:%02x:%02x",
-               mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
-       setenv("ethaddr", mac_str);
-       printf("MAC addr from fuse: %02x:%02x:%02x:%02x:%02x:%02x\n",
-               mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
+       eth_setenv_enetaddr("ethaddr", mac);
+       printf("MAC addr from fuse: %pM\n", mac);
 }
 
 int board_late_init(void)
@@ -1046,6 +1109,13 @@ int board_late_init(void)
                        strcmp(baseboard, "stk5-v3") == 0) {
                        stk5v3_board_init();
                } else if (strcmp(baseboard, "stk5-v5") == 0) {
+                       const char *otg_mode = getenv("otg_mode");
+
+                       if (otg_mode && strcmp(otg_mode, "host") == 0) {
+                               printf("otg_mode='%s' is incompatible with baseboard %s; setting to 'none'\n",
+                                       otg_mode, baseboard);
+                               setenv("otg_mode", "none");
+                       }
                        stk5v5_board_init();
                } else {
                        printf("WARNING: Unsupported STK5 board rev.: %s\n",
@@ -1066,64 +1136,24 @@ exit:
 
 int checkboard(void)
 {
-       print_cpuinfo();
-#if defined(CONFIG_MX6Q)
-       printf("Board: Ka-Ro TX6Q\n");
-#elif defined(CONFIG_MX6DL)
-       printf("Board: Ka-Ro TX6DL\n");
-#else
-#error Unsupported i.MX6 variant selected
-#endif
+       u32 cpurev = get_cpu_rev();
+       int cpu_variant = (cpurev >> 12) & 0xff;
+
+       tx6qdl_print_cpuinfo();
+
+       printf("Board: Ka-Ro TX6%c-%dxx%d\n",
+               cpu_variant == MXC_CPU_MX6Q ? 'Q' : 'U',
+               cpu_variant == MXC_CPU_MX6Q ? 1 : 8,
+               1 - PHYS_SDRAM_1_WIDTH / 64);
 
-#ifdef TIMER_TEST
-       {
-               struct mxc_gpt {
-                       unsigned int control;
-                       unsigned int prescaler;
-                       unsigned int status;
-                       unsigned int nouse[6];
-                       unsigned int counter;
-               };
-               const int us_delay = 10;
-               unsigned long start = get_timer(0);
-               unsigned long last = gd->arch.tbl;
-               unsigned long loop = 0;
-               unsigned long cnt = 0;
-               static struct mxc_gpt *timer_base = (struct mxc_gpt *)GPT1_BASE_ADDR;
-
-               printf("GPT prescaler=%u\n", readl(&timer_base->prescaler) + 1);
-               printf("clock tick rate: %lu.%03lukHz\n",
-                       gd->arch.timer_rate_hz / 1000, gd->arch.timer_rate_hz % 1000);
-               printf("ticks/us=%lu\n", gd->arch.timer_rate_hz / CONFIG_SYS_HZ / 1000);
-
-               while (!tstc()) {
-                       unsigned long elapsed = get_timer(start);
-                       unsigned long diff = gd->arch.tbl - last;
-
-                       loop++;
-                       last = gd->arch.tbl;
-
-                       printf("loop %4lu: t=%08lx diff=%08lx steps=%6lu elapsed time: %4lu",
-                               loop, gd->arch.tbl, diff, cnt, elapsed / CONFIG_SYS_HZ);
-                       cnt = 0;
-                       while (get_timer(elapsed + start) < CONFIG_SYS_HZ) {
-                               cnt++;
-                               udelay(us_delay);
-                       }
-                       printf(" counter=%08x udelay(%u)=%lu.%03luus\n",
-                               readl(&timer_base->counter), us_delay,
-                               1000000000 / cnt / 1000, 1000000000 / cnt % 1000);
-               }
-       }
-#endif
        return 0;
 }
 
 #ifdef CONFIG_SERIAL_TAG
 void get_board_serial(struct tag_serialnr *serialnr)
 {
-       struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
-       struct fuse_bank0_regs *fuse = (void *)iim->bank[0].fuse_regs;
+       struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
+       struct fuse_bank0_regs *fuse = (void *)ocotp->bank[0].fuse_regs;
 
        serialnr->low = readl(&fuse->cfg0);
        serialnr->high = readl(&fuse->cfg1);
@@ -1142,24 +1172,22 @@ struct node_info nodes[] = {
 #define fdt_fixup_mtdparts(b,n,c) do { } while (0)
 #endif
 
-static void tx6qdl_fixup_flexcan(void *blob)
+void ft_board_setup(void *blob, bd_t *bd)
 {
        const char *baseboard = getenv("baseboard");
+       int stk5_v5 = baseboard != NULL && (strcmp(baseboard, "stk5-v5") == 0);
+       const char *video_mode = getenv("video_mode");
 
-       if (baseboard && strcmp(baseboard, "stk5-v5") == 0)
-               return;
-
-       karo_fdt_del_prop(blob, "fsl,p1010-flexcan", 0x02090000, "transceiver-switch");
-       karo_fdt_del_prop(blob, "fsl,p1010-flexcan", 0x02094000, "transceiver-switch");
-}
+       karo_fdt_enable_node(blob, "stk5led", !stk5_v5);
 
-void ft_board_setup(void *blob, bd_t *bd)
-{
        fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
        fdt_fixup_ethernet(blob);
 
        karo_fdt_fixup_touchpanel(blob);
        karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy");
-       tx6qdl_fixup_flexcan(blob);
+       karo_fdt_fixup_flexcan(blob, stk5_v5);
+
+       video_mode = karo_fdt_set_display(video_mode, "", "/soc/aips-bus/ldb");
+       karo_fdt_update_fb_mode(blob, video_mode);
 }
-#endif
+#endif /* CONFIG_OF_BOARD_SETUP */