X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Ftoradex%2Fcolibri_t20%2Fcolibri_t20.c;h=e0b27e92f8e339e7ab99d29337fb1d6b20cfbca8;hb=a3c9021771608f5b514c75874fa0d8fbee2873d6;hp=42b293d81ec33dd884a0e10828ac3eea7fdfc770;hpb=10ef82d398e2789af57e01a4f8e5eed74a876f32;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c index 42b293d..e0b27e9 100644 --- a/board/toradex/colibri_t20/colibri_t20.c +++ b/board/toradex/colibri_t20/colibri_t20.c @@ -1,7 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2012 Lucas Stach - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -14,6 +13,10 @@ #include #include #include +#include +#include "../common/tdx-common.h" + +DECLARE_GLOBAL_DATA_PTR; #define PMU_I2C_ADDRESS 0x34 #define MAX_I2C_RETRY 3 @@ -51,6 +54,9 @@ int arch_misc_init(void) return err; } + /* make sure SODIMM pin 87 nRESET_OUT is released properly */ + pinmux_set_func(PMUX_PINGRP_ATA, PMUX_FUNC_GMI); + if (readl(NV_PA_BASE_SRAM + NVBOOTINFOTABLE_BOOTTYPE) == NVBOOTTYPE_RECOVERY) printf("USB recovery mode\n"); @@ -58,7 +64,24 @@ int arch_misc_init(void) return 0; } -#ifdef CONFIG_TEGRA_MMC +int checkboard(void) +{ + printf("Model: Toradex Colibri T20 %dMB V%s\n", + (gd->ram_size == 0x10000000) ? 256 : 512, + (get_nand_dev_by_index(0)->erasesize >> 10 == 512) ? + ((gd->ram_size == 0x10000000) ? "1.1B" : "1.1C") : "1.2A"); + + return 0; +} + +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) +int ft_board_setup(void *blob, bd_t *bd) +{ + return ft_common_board_setup(blob, bd); +} +#endif + +#ifdef CONFIG_MMC_SDHCI_TEGRA /* * Routine: pin_mux_mmc * Description: setup the pin muxes/tristate values for the SDMMC(s) @@ -100,18 +123,18 @@ void pin_mux_usb(void) pinmux_tristate_disable(PMUX_PINGRP_DTE); /* Reset ASIX using LAN_RESET */ - gpio_request(GPIO_PV4, "LAN_RESET"); - gpio_direction_output(GPIO_PV4, 0); + gpio_request(TEGRA_GPIO(V, 4), "LAN_RESET"); + gpio_direction_output(TEGRA_GPIO(V, 4), 0); pinmux_tristate_disable(PMUX_PINGRP_GPV); udelay(5); - gpio_set_value(GPIO_PV4, 1); + gpio_set_value(TEGRA_GPIO(V, 4), 1); /* USBH_PEN: USB 1 aka Tegra USB port 3 VBus */ pinmux_tristate_disable(PMUX_PINGRP_SPIG); } #endif -#ifdef CONFIG_VIDEO_TEGRA +#ifdef CONFIG_VIDEO_TEGRA20 /* * Routine: pin_mux_display * Description: setup the pin muxes/tristate values for the LCD interface) @@ -127,4 +150,13 @@ void pin_mux_display(void) pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM); pinmux_tristate_disable(PMUX_PINGRP_SDC); } + +/* + * Backlight off before OS handover + */ +void board_preboot_os(void) +{ + gpio_request(TEGRA_GPIO(T, 4), "BL_ON"); + gpio_direction_output(TEGRA_GPIO(T, 4), 0); +} #endif