]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx53/tx53.c
board: karo: add support for using Linux simple-panel LCD driver
[karo-tx-uboot.git] / board / karo / tx53 / tx53.c
index 299a647b1690588f0a55965eaab76ad9122cf6c1..3a80a2873018958590d161f1aae4f1c79be043d0 100644 (file)
@@ -496,7 +496,7 @@ int board_init(void)
                        printf("WDOG RESET detected; Skipping PMIC setup\n");
                else
                        printf("<CTRL-C> detected; safeboot enabled\n");
-               return 1;
+               return 0;
        }
 
        ret = setup_pmic_voltages();
@@ -762,14 +762,12 @@ static const struct gpio stk5_gpios[] = {
 };
 
 #ifdef CONFIG_LCD
-static u16 tx53_cmap[256];
 vidinfo_t panel_info = {
        /* set to max. size supported by SoC */
        .vl_col = 1600,
        .vl_row = 1200,
 
        .vl_bpix = LCD_COLOR32,    /* Bits per pixel, 0: 1bpp, 1: 2bpp, 2: 4bpp, 3: 8bpp ... */
-       .cmap = tx53_cmap,
 };
 
 static struct fb_videomode tx53_fb_modes[] = {
@@ -1321,7 +1319,7 @@ static void tx53_init_mac(void)
        u8 mac[ETH_ALEN];
 
        imx_get_mac_from_fuse(0, mac);
-       if (!is_valid_ether_addr(mac)) {
+       if (!is_valid_ethaddr(mac)) {
                printf("No valid MAC address programmed\n");
                return;
        }
@@ -1332,7 +1330,6 @@ static void tx53_init_mac(void)
 
 int board_late_init(void)
 {
-       int ret = 0;
        const char *baseboard;
 
        env_cleanup();
@@ -1372,7 +1369,8 @@ int board_late_init(void)
        } else {
                printf("WARNING: Unsupported baseboard: '%s'\n",
                        baseboard);
-               ret = -EINVAL;
+               if (!had_ctrlc())
+                       return -EINVAL;
        }
 
 exit:
@@ -1383,7 +1381,7 @@ exit:
 
        get_hab_status();
 
-       return ret;
+       return 0;
 }
 
 int checkboard(void)
@@ -1447,15 +1445,18 @@ int ft_board_setup(void *blob, bd_t *bd)
                karo_fdt_enable_node(blob, "stk5led", 0);
 
        fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
-       fdt_fixup_ethernet(blob);
 
        karo_fdt_fixup_touchpanel(blob, tx53_touchpanels,
                                ARRAY_SIZE(tx53_touchpanels));
        karo_fdt_fixup_usb_otg(blob, "usbotg", "fsl,usbphy", "vbus-supply");
        karo_fdt_fixup_flexcan(blob, stk5_v5);
        tx53_fixup_rtc(blob);
-       karo_fdt_update_fb_mode(blob, video_mode);
-
+#ifdef CONFIG_SYS_LVDS_IF
+       karo_fdt_update_fb_mode(blob, video_mode, "/lvds0-panel");
+       karo_fdt_update_fb_mode(blob, video_mode, "/lvds1-panel");
+#else
+       karo_fdt_update_fb_mode(blob, video_mode, "/lcd-panel");
+#endif
        return 0;
 }
 #endif /* CONFIG_OF_BOARD_SETUP */