]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/samsung/smdk5250/exynos5-dt.c
ARM: at91sam9m10g45ek: add mmc environment configuration support
[karo-tx-uboot.git] / board / samsung / smdk5250 / exynos5-dt.c
1 /*
2  * Copyright (C) 2012 Samsung Electronics
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <fdtdec.h>
9 #include <asm/io.h>
10 #include <errno.h>
11 #include <i2c.h>
12 #include <netdev.h>
13 #include <spi.h>
14 #include <asm/arch/cpu.h>
15 #include <asm/arch/dwmmc.h>
16 #include <asm/arch/gpio.h>
17 #include <asm/arch/mmc.h>
18 #include <asm/arch/pinmux.h>
19 #include <asm/arch/power.h>
20 #include <asm/arch/sromc.h>
21 #include <power/pmic.h>
22 #include <power/max77686_pmic.h>
23 #include <tmu.h>
24
25 DECLARE_GLOBAL_DATA_PTR;
26
27 #ifdef CONFIG_SOUND_MAX98095
28 static void board_enable_audio_codec(void)
29 {
30         /* Enable MAX98095 Codec */
31         gpio_direction_output(EXYNOS5_GPIO_X17, 1);
32         gpio_set_pull(EXYNOS5_GPIO_X17, S5P_GPIO_PULL_NONE);
33 }
34 #endif
35
36 int exynos_init(void)
37 {
38 #ifdef CONFIG_SOUND_MAX98095
39         board_enable_audio_codec();
40 #endif
41         return 0;
42 }
43
44 #ifdef CONFIG_LCD
45 void exynos_cfg_lcd_gpio(void)
46 {
47         /* For Backlight */
48         gpio_cfg_pin(EXYNOS5_GPIO_B20, S5P_GPIO_OUTPUT);
49         gpio_set_value(EXYNOS5_GPIO_B20, 1);
50
51         /* LCD power on */
52         gpio_cfg_pin(EXYNOS5_GPIO_X15, S5P_GPIO_OUTPUT);
53         gpio_set_value(EXYNOS5_GPIO_X15, 1);
54
55         /* Set Hotplug detect for DP */
56         gpio_cfg_pin(EXYNOS5_GPIO_X07, S5P_GPIO_FUNC(0x3));
57 }
58
59 void exynos_set_dp_phy(unsigned int onoff)
60 {
61         set_dp_phy_ctrl(onoff);
62 }
63 #endif