]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx53/tx53.c
karo: merge with Ka-Ro specific tree for secure boot support
[karo-tx-uboot.git] / board / karo / tx53 / tx53.c
index 9df8126ad4ded00751ad26b2c6273b5fae393e4b..26caf9d6e1a58199d6ed723c5b554a6a3df1db4d 100644 (file)
@@ -105,10 +105,10 @@ static iomux_v3_cfg_t tx53_pads[] = {
 };
 
 static const struct gpio tx53_gpios[] = {
-       { TX53_RESET_OUT_GPIO, GPIOF_OUTPUT_INIT_HIGH, "#RESET_OUT", },
-       { TX53_FEC_PWR_GPIO, GPIOF_OUTPUT_INIT_HIGH, "FEC PHY PWR", },
-       { TX53_FEC_RST_GPIO, GPIOF_OUTPUT_INIT_LOW, "FEC PHY RESET", },
-       { TX53_FEC_INT_GPIO, GPIOF_INPUT, "FEC PHY INT", },
+       { TX53_RESET_OUT_GPIO, GPIOFLAG_OUTPUT_INIT_HIGH, "#RESET_OUT", },
+       { TX53_FEC_PWR_GPIO, GPIOFLAG_OUTPUT_INIT_HIGH, "FEC PHY PWR", },
+       { TX53_FEC_RST_GPIO, GPIOFLAG_OUTPUT_INIT_LOW, "FEC PHY RESET", },
+       { TX53_FEC_INT_GPIO, GPIOFLAG_INPUT, "FEC PHY INT", },
 };
 
 /*
@@ -628,7 +628,7 @@ int board_mmc_init(bd_t *bis)
                cfg->cfg.sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
 
                ret = gpio_request_one(cfg->cd_gpio,
-                               GPIOF_INPUT, "MMC CD");
+                               GPIOFLAG_INPUT, "MMC CD");
                if (ret) {
                        printf("Error %d requesting GPIO%d_%d\n",
                                ret, cfg->cd_gpio / 32, cfg->cd_gpio % 32);
@@ -747,12 +747,12 @@ static const iomux_v3_cfg_t stk5_pads[] = {
 };
 
 static const struct gpio stk5_gpios[] = {
-       { TX53_LED_GPIO, GPIOF_OUTPUT_INIT_LOW, "HEARTBEAT LED", },
+       { TX53_LED_GPIO, GPIOFLAG_OUTPUT_INIT_LOW, "HEARTBEAT LED", },
 
-       { IMX_GPIO_NR(1, 8), GPIOF_INPUT, "USBOTG OC", },
-       { IMX_GPIO_NR(1, 7), GPIOF_OUTPUT_INIT_LOW, "USBOTG VBUS enable", },
-       { IMX_GPIO_NR(3, 30), GPIOF_INPUT, "USBH1 OC", },
-       { IMX_GPIO_NR(3, 31), GPIOF_OUTPUT_INIT_LOW, "USBH1 VBUS enable", },
+       { IMX_GPIO_NR(1, 8), GPIOFLAG_INPUT, "USBOTG OC", },
+       { IMX_GPIO_NR(1, 7), GPIOFLAG_OUTPUT_INIT_LOW, "USBOTG VBUS enable", },
+       { IMX_GPIO_NR(3, 30), GPIOFLAG_INPUT, "USBH1 OC", },
+       { IMX_GPIO_NR(3, 31), GPIOFLAG_OUTPUT_INIT_LOW, "USBH1 VBUS enable", },
 };
 
 #ifdef CONFIG_LCD
@@ -762,7 +762,7 @@ vidinfo_t panel_info = {
        .vl_col = 1600,
        .vl_row = 1200,
 
-       .vl_bpix = LCD_COLOR24,    /* Bits per pixel, 0: 1bpp, 1: 2bpp, 2: 4bpp, 3: 8bpp ... */
+       .vl_bpix = LCD_COLOR32,    /* Bits per pixel, 0: 1bpp, 1: 2bpp, 2: 4bpp, 3: 8bpp ... */
        .cmap = tx53_cmap,
 };
 
@@ -1022,9 +1022,9 @@ static const iomux_v3_cfg_t stk5_lcd_pads[] = {
 };
 
 static const struct gpio stk5_lcd_gpios[] = {
-       { TX53_LCD_RST_GPIO, GPIOF_OUTPUT_INIT_LOW, "LCD RESET", },
-       { TX53_LCD_PWR_GPIO, GPIOF_OUTPUT_INIT_LOW, "LCD POWER", },
-       { TX53_LCD_BACKLIGHT_GPIO, GPIOF_OUTPUT_INIT_HIGH, "LCD BACKLIGHT", },
+       { TX53_LCD_RST_GPIO, GPIOFLAG_OUTPUT_INIT_LOW, "LCD RESET", },
+       { TX53_LCD_PWR_GPIO, GPIOFLAG_OUTPUT_INIT_LOW, "LCD POWER", },
+       { TX53_LCD_BACKLIGHT_GPIO, GPIOFLAG_OUTPUT_INIT_HIGH, "LCD BACKLIGHT", },
 };
 
 void lcd_ctrl_init(void *lcdbase)
@@ -1183,7 +1183,7 @@ void lcd_ctrl_init(void *lcdbase)
                panel_info.vl_bpix = LCD_COLOR16;
                break;
        default:
-               panel_info.vl_bpix = LCD_COLOR24;
+               panel_info.vl_bpix = LCD_COLOR32;
        }
 
        p->pixclock = KHZ2PICOS(refresh *
@@ -1283,7 +1283,7 @@ static void stk5v5_board_init(void)
 {
        stk5_board_init();
 
-       gpio_request_one(IMX_GPIO_NR(4, 21), GPIOF_OUTPUT_INIT_HIGH,
+       gpio_request_one(IMX_GPIO_NR(4, 21), GPIOFLAG_OUTPUT_INIT_HIGH,
                        "Flexcan Transceiver");
        imx_iomux_v3_setup_pad(MX53_PAD_DISP0_DAT0__GPIO4_21);
 }
@@ -1422,7 +1422,7 @@ static const char *tx53_touchpanels[] = {
        "eeti,egalax_ts",
 };
 
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
 {
        const char *baseboard = getenv("baseboard");
        int stk5_v5 = baseboard != NULL && (strcmp(baseboard, "stk5-v5") == 0);
@@ -1430,9 +1430,10 @@ void ft_board_setup(void *blob, bd_t *bd)
        int ret;
 
        ret = fdt_increase_size(blob, 4096);
-       if (ret)
+       if (ret) {
                printf("Failed to increase FDT size: %s\n", fdt_strerror(ret));
-
+               return ret;
+       }
        if (stk5_v5)
                karo_fdt_enable_node(blob, "stk5led", 0);
 
@@ -1445,5 +1446,7 @@ void ft_board_setup(void *blob, bd_t *bd)
        karo_fdt_fixup_flexcan(blob, stk5_v5);
        tx53_fixup_rtc(blob);
        karo_fdt_update_fb_mode(blob, video_mode);
+
+       return 0;
 }
 #endif /* CONFIG_OF_BOARD_SETUP */