Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 Samsung Electronics |
| 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 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 | |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 27 | #ifdef CONFIG_SOUND_MAX98095 |
Rajeshwari Birje | 71ebb33 | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 28 | static void board_enable_audio_codec(void) |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 29 | { |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 30 | /* Enable MAX98095 Codec */ |
Akshay Saraswat | f6ae1ca | 2014-05-13 10:30:14 +0530 | [diff] [blame^] | 31 | gpio_direction_output(EXYNOS5_GPIO_X17, 1); |
| 32 | gpio_set_pull(EXYNOS5_GPIO_X17, S5P_GPIO_PULL_NONE); |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 33 | } |
| 34 | #endif |
| 35 | |
Rajeshwari Birje | 71ebb33 | 2013-12-26 09:44:17 +0530 | [diff] [blame] | 36 | int exynos_init(void) |
Hung-ying Tyan | eb28fda | 2013-05-15 18:27:34 +0800 | [diff] [blame] | 37 | { |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 38 | #ifdef CONFIG_SOUND_MAX98095 |
| 39 | board_enable_audio_codec(); |
| 40 | #endif |
| 41 | return 0; |
| 42 | } |
| 43 | |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 44 | #ifdef CONFIG_LCD |
| 45 | void exynos_cfg_lcd_gpio(void) |
| 46 | { |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 47 | /* For Backlight */ |
Akshay Saraswat | f6ae1ca | 2014-05-13 10:30:14 +0530 | [diff] [blame^] | 48 | gpio_cfg_pin(EXYNOS5_GPIO_B20, S5P_GPIO_OUTPUT); |
| 49 | gpio_set_value(EXYNOS5_GPIO_B20, 1); |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 50 | |
| 51 | /* LCD power on */ |
Akshay Saraswat | f6ae1ca | 2014-05-13 10:30:14 +0530 | [diff] [blame^] | 52 | gpio_cfg_pin(EXYNOS5_GPIO_X15, S5P_GPIO_OUTPUT); |
| 53 | gpio_set_value(EXYNOS5_GPIO_X15, 1); |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 54 | |
| 55 | /* Set Hotplug detect for DP */ |
Akshay Saraswat | f6ae1ca | 2014-05-13 10:30:14 +0530 | [diff] [blame^] | 56 | gpio_cfg_pin(EXYNOS5_GPIO_X07, S5P_GPIO_FUNC(0x3)); |
Amar | 752f4c4 | 2013-04-27 11:42:57 +0530 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | void exynos_set_dp_phy(unsigned int onoff) |
| 60 | { |
| 61 | set_dp_phy_ctrl(onoff); |
| 62 | } |
| 63 | #endif |