blob: 9ef11b8471caf3add95d847c6da5c866a8856d02 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +09002/*
3 * Copyright (C) 2010 Samsung Electronics
4 * Minkyu Kang <mk7.kang@samsung.com>
5 * Kyungmin Park <kyungmin.park@samsung.com>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +09006 */
7
8#include <common.h>
Simon Glass5e6201b2019-08-01 09:46:51 -06009#include <env.h>
Simon Glass0f2af882020-05-10 11:40:05 -060010#include <log.h>
Piotr Wilczeke372b552012-10-19 05:34:03 +000011#include <spi.h>
Piotr Wilczek461c5e52012-10-19 05:34:07 +000012#include <lcd.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060013#include <asm/global_data.h>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090014#include <asm/io.h>
Piotr Wilczeke372b552012-10-19 05:34:03 +000015#include <asm/gpio.h>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090016#include <asm/arch/adc.h>
Piotr Wilczek3b179142012-09-20 00:19:59 +000017#include <asm/arch/pinmux.h>
Piotr Wilczek6ce94c32012-09-20 00:20:00 +000018#include <asm/arch/watchdog.h>
Piotr Wilczek461c5e52012-10-19 05:34:07 +000019#include <ld9040.h>
Simon Glassdbd79542020-05-10 11:40:11 -060020#include <linux/delay.h>
Łukasz Majewski1c6dba12012-11-13 03:21:55 +000021#include <power/pmic.h>
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +010022#include <usb.h>
Marek Vasutf1be9cb2015-12-04 02:51:20 +010023#include <usb/dwc2_udc.h>
Lukasz Majewskibf731262011-12-15 10:32:12 +010024#include <asm/arch/cpu.h>
Łukasz Majewski1c6dba12012-11-13 03:21:55 +000025#include <power/max8998_pmic.h>
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +010026#include <libtizen.h>
Przemyslaw Marczak94df8012014-01-22 11:24:20 +010027#include <samsung/misc.h>
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +010028#include <usb_mass_storage.h>
Simon Glass0ffb9d62017-05-31 19:47:48 -060029#include <asm/mach-types.h>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090030
31DECLARE_GLOBAL_DATA_PTR;
32
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090033unsigned int board_rev;
Jaehoon Chung40195a22017-01-09 14:47:50 +090034static int init_pmic_lcd(void);
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090035
36u32 get_board_rev(void)
37{
38 return board_rev;
39}
40
Jaehoon Chung40195a22017-01-09 14:47:50 +090041int exynos_power_init(void)
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090042{
Jaehoon Chung40195a22017-01-09 14:47:50 +090043 return init_pmic_lcd();
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090044}
45
Jaehoon Chung40195a22017-01-09 14:47:50 +090046static int get_hwrev(void)
Łukasz Majewski11be2832012-11-13 03:22:17 +000047{
Jaehoon Chung40195a22017-01-09 14:47:50 +090048 return board_rev & 0xFF;
Łukasz Majewski11be2832012-11-13 03:22:17 +000049}
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090050
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090051static unsigned short get_adc_value(int channel)
52{
53 struct s5p_adc *adc = (struct s5p_adc *)samsung_get_base_adc();
54 unsigned short ret = 0;
55 unsigned int reg;
56 unsigned int loop = 0;
57
58 writel(channel & 0xF, &adc->adcmux);
59 writel((1 << 14) | (49 << 6), &adc->adccon);
60 writel(1000 & 0xffff, &adc->adcdly);
61 writel(readl(&adc->adccon) | (1 << 16), &adc->adccon); /* 12 bit */
62 udelay(10);
63 writel(readl(&adc->adccon) | (1 << 0), &adc->adccon); /* Enable */
64 udelay(10);
65
66 do {
67 udelay(1);
68 reg = readl(&adc->adccon);
69 } while (!(reg & (1 << 15)) && (loop++ < 1000));
70
71 ret = readl(&adc->adcdat0) & 0xFFF;
72
73 return ret;
74}
75
Łukasz Majewski61f8b402012-03-26 21:53:48 +000076static int adc_power_control(int on)
77{
Jaehoon Chung40195a22017-01-09 14:47:50 +090078 struct udevice *dev;
Łukasz Majewski61f8b402012-03-26 21:53:48 +000079 int ret;
Jaehoon Chung40195a22017-01-09 14:47:50 +090080 u8 reg;
Łukasz Majewski61f8b402012-03-26 21:53:48 +000081
Jaehoon Chung40195a22017-01-09 14:47:50 +090082 ret = pmic_get("max8998-pmic", &dev);
83 if (ret) {
84 puts("Failed to get MAX8998!\n");
85 return ret;
86 }
Łukasz Majewski61f8b402012-03-26 21:53:48 +000087
Jaehoon Chung40195a22017-01-09 14:47:50 +090088 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF1);
89 if (on)
90 reg |= MAX8998_LDO4;
91 else
92 reg &= ~MAX8998_LDO4;
Łukasz Majewski61f8b402012-03-26 21:53:48 +000093
Jaehoon Chung40195a22017-01-09 14:47:50 +090094 ret = pmic_reg_write(dev, MAX8998_REG_ONOFF1, reg);
95 if (ret) {
96 puts("MAX8998 LDO setting error\n");
97 return -EINVAL;
98 }
99
Simon Glass7bbb7d92016-11-23 06:34:40 -0700100 return 0;
Łukasz Majewski61f8b402012-03-26 21:53:48 +0000101}
102
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +0900103static unsigned int get_hw_revision(void)
104{
105 int hwrev, mode0, mode1;
106
Łukasz Majewski61f8b402012-03-26 21:53:48 +0000107 adc_power_control(1);
108
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +0900109 mode0 = get_adc_value(1); /* HWREV_MODE0 */
110 mode1 = get_adc_value(2); /* HWREV_MODE1 */
111
112 /*
113 * XXX Always set the default hwrev as the latest board
114 * ADC = (voltage) / 3.3 * 4096
115 */
116 hwrev = 3;
117
118#define IS_RANGE(x, min, max) ((x) > (min) && (x) < (max))
119 if (IS_RANGE(mode0, 80, 200) && IS_RANGE(mode1, 80, 200))
120 hwrev = 0x0; /* 0.01V 0.01V */
121 if (IS_RANGE(mode0, 750, 1000) && IS_RANGE(mode1, 80, 200))
122 hwrev = 0x1; /* 610mV 0.01V */
123 if (IS_RANGE(mode0, 1300, 1700) && IS_RANGE(mode1, 80, 200))
124 hwrev = 0x2; /* 1.16V 0.01V */
125 if (IS_RANGE(mode0, 2000, 2400) && IS_RANGE(mode1, 80, 200))
126 hwrev = 0x3; /* 1.79V 0.01V */
127#undef IS_RANGE
128
129 debug("mode0: %d, mode1: %d, hwrev 0x%x\n", mode0, mode1, hwrev);
130
Łukasz Majewski61f8b402012-03-26 21:53:48 +0000131 adc_power_control(0);
132
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +0900133 return hwrev;
134}
135
136static void check_hw_revision(void)
137{
138 int hwrev;
139
140 hwrev = get_hw_revision();
141
142 board_rev |= hwrev;
143}
144
Lukasz Majewskibf731262011-12-15 10:32:12 +0100145#ifdef CONFIG_USB_GADGET
146static int s5pc210_phy_control(int on)
147{
Jaehoon Chung40195a22017-01-09 14:47:50 +0900148 struct udevice *dev;
149 int ret;
150 u8 reg;
Lukasz Majewskibf731262011-12-15 10:32:12 +0100151
Jaehoon Chung40195a22017-01-09 14:47:50 +0900152 ret = pmic_get("max8998-pmic", &dev);
153 if (ret) {
154 puts("Failed to get MAX8998!\n");
155 return ret;
156 }
Lukasz Majewskibf731262011-12-15 10:32:12 +0100157
158 if (on) {
Jaehoon Chung40195a22017-01-09 14:47:50 +0900159 reg = pmic_reg_read(dev, MAX8998_REG_BUCK_ACTIVE_DISCHARGE3);
160 reg |= MAX8998_SAFEOUT1;
161 ret |= pmic_reg_write(dev,
162 MAX8998_REG_BUCK_ACTIVE_DISCHARGE3, reg);
163
164 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF1);
165 reg |= MAX8998_LDO3;
166 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF1, reg);
167
168 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF2);
169 reg |= MAX8998_LDO8;
170 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF2, reg);
Lukasz Majewskibf731262011-12-15 10:32:12 +0100171
172 } else {
Jaehoon Chung40195a22017-01-09 14:47:50 +0900173 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF2);
174 reg &= ~MAX8998_LDO8;
175 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF2, reg);
176
177 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF1);
178 reg &= ~MAX8998_LDO3;
179 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF1, reg);
180
181 reg = pmic_reg_read(dev, MAX8998_REG_BUCK_ACTIVE_DISCHARGE3);
182 reg &= ~MAX8998_SAFEOUT1;
183 ret |= pmic_reg_write(dev,
184 MAX8998_REG_BUCK_ACTIVE_DISCHARGE3, reg);
Lukasz Majewskibf731262011-12-15 10:32:12 +0100185 }
186
187 if (ret) {
188 puts("MAX8998 LDO setting error!\n");
Jaehoon Chung40195a22017-01-09 14:47:50 +0900189 return -EINVAL;
Lukasz Majewskibf731262011-12-15 10:32:12 +0100190 }
Jaehoon Chung40195a22017-01-09 14:47:50 +0900191
Lukasz Majewskibf731262011-12-15 10:32:12 +0100192 return 0;
193}
194
Marek Vasut6939aca2015-12-04 02:23:29 +0100195struct dwc2_plat_otg_data s5pc210_otg_data = {
Lukasz Majewskibf731262011-12-15 10:32:12 +0100196 .phy_control = s5pc210_phy_control,
197 .regs_phy = EXYNOS4_USBPHY_BASE,
198 .regs_otg = EXYNOS4_USBOTG_BASE,
199 .usb_phy_ctrl = EXYNOS4_USBPHY_CONTROL,
200 .usb_flags = PHY0_SLEEP,
201};
202#endif
Piotr Wilczek6ce94c32012-09-20 00:20:00 +0000203
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100204int board_usb_init(int index, enum usb_init_type init)
205{
206 debug("USB_udc_probe\n");
Marek Vasut01b61fa2015-12-04 02:26:33 +0100207 return dwc2_udc_probe(&s5pc210_otg_data);
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100208}
209
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100210int exynos_early_init_f(void)
Piotr Wilczek6ce94c32012-09-20 00:20:00 +0000211{
212 wdt_stop();
213
214 return 0;
215}
Piotr Wilczeke372b552012-10-19 05:34:03 +0000216
Jaehoon Chung40195a22017-01-09 14:47:50 +0900217static int init_pmic_lcd(void)
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000218{
Jaehoon Chung40195a22017-01-09 14:47:50 +0900219 struct udevice *dev;
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000220 unsigned char val;
221 int ret = 0;
222
Jaehoon Chung40195a22017-01-09 14:47:50 +0900223 ret = pmic_get("max8998-pmic", &dev);
224 if (ret) {
225 puts("Failed to get MAX8998 for init_pmic_lcd()!\n");
226 return ret;
227 }
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000228
229 /* LDO7 1.8V */
230 val = 0x02; /* (1800 - 1600) / 100; */
Jaehoon Chung40195a22017-01-09 14:47:50 +0900231 ret |= pmic_reg_write(dev, MAX8998_REG_LDO7, val);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000232
233 /* LDO17 3.0V */
234 val = 0xe; /* (3000 - 1600) / 100; */
Jaehoon Chung40195a22017-01-09 14:47:50 +0900235 ret |= pmic_reg_write(dev, MAX8998_REG_LDO17, val);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000236
237 /* Disable unneeded regulators */
238 /*
239 * ONOFF1
240 * Buck1 ON, Buck2 OFF, Buck3 ON, Buck4 ON
241 * LDO2 ON, LDO3 OFF, LDO4 OFF, LDO5 ON
242 */
243 val = 0xB9;
Jaehoon Chung40195a22017-01-09 14:47:50 +0900244 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF1, val);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000245
246 /* ONOFF2
247 * LDO6 OFF, LDO7 ON, LDO8 OFF, LDO9 ON,
248 * LDO10 OFF, LDO11 OFF, LDO12 OFF, LDO13 OFF
249 */
250 val = 0x50;
Jaehoon Chung40195a22017-01-09 14:47:50 +0900251 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF2, val);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000252
253 /* ONOFF3
254 * LDO14 OFF, LDO15 OFF, LGO16 OFF, LDO17 OFF
255 * EPWRHOLD OFF, EBATTMON OFF, ELBCNFG2 OFF, ELBCNFG1 OFF
256 */
257 val = 0x00;
Jaehoon Chung40195a22017-01-09 14:47:50 +0900258 ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF3, val);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000259
Jaehoon Chung40195a22017-01-09 14:47:50 +0900260 if (ret) {
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000261 puts("LCD pmic initialisation error!\n");
Jaehoon Chung40195a22017-01-09 14:47:50 +0900262 return -EINVAL;
263 }
264
265 return 0;
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000266}
267
Ajay Kumar41022a12013-02-21 23:52:57 +0000268void exynos_cfg_lcd_gpio(void)
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000269{
270 unsigned int i, f3_end = 4;
271
272 for (i = 0; i < 8; i++) {
273 /* set GPF0,1,2[0:7] for RGB Interface and Data lines (32bit) */
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530274 gpio_cfg_pin(EXYNOS4_GPIO_F00 + i, S5P_GPIO_FUNC(2));
275 gpio_cfg_pin(EXYNOS4_GPIO_F10 + i, S5P_GPIO_FUNC(2));
276 gpio_cfg_pin(EXYNOS4_GPIO_F20 + i, S5P_GPIO_FUNC(2));
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000277 /* pull-up/down disable */
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530278 gpio_set_pull(EXYNOS4_GPIO_F00 + i, S5P_GPIO_PULL_NONE);
279 gpio_set_pull(EXYNOS4_GPIO_F10 + i, S5P_GPIO_PULL_NONE);
280 gpio_set_pull(EXYNOS4_GPIO_F20 + i, S5P_GPIO_PULL_NONE);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000281
282 /* drive strength to max (24bit) */
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530283 gpio_set_drv(EXYNOS4_GPIO_F00 + i, S5P_GPIO_DRV_4X);
284 gpio_set_rate(EXYNOS4_GPIO_F00 + i, S5P_GPIO_DRV_SLOW);
285 gpio_set_drv(EXYNOS4_GPIO_F10 + i, S5P_GPIO_DRV_4X);
286 gpio_set_rate(EXYNOS4_GPIO_F10 + i, S5P_GPIO_DRV_SLOW);
287 gpio_set_drv(EXYNOS4_GPIO_F20 + i, S5P_GPIO_DRV_4X);
288 gpio_set_rate(EXYNOS4_GPIO_F00 + i, S5P_GPIO_DRV_SLOW);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000289 }
290
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530291 for (i = EXYNOS4_GPIO_F30; i < (EXYNOS4_GPIO_F30 + f3_end); i++) {
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000292 /* set GPF3[0:3] for RGB Interface and Data lines (32bit) */
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530293 gpio_cfg_pin(i, S5P_GPIO_FUNC(2));
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000294 /* pull-up/down disable */
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530295 gpio_set_pull(i, S5P_GPIO_PULL_NONE);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000296 /* drive strength to max (24bit) */
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530297 gpio_set_drv(i, S5P_GPIO_DRV_4X);
298 gpio_set_rate(i, S5P_GPIO_DRV_SLOW);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000299 }
300
301 /* gpio pad configuration for LCD reset. */
Simon Glass4f83d3d2014-10-20 19:48:39 -0600302 gpio_request(EXYNOS4_GPIO_Y45, "lcd_reset");
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530303 gpio_cfg_pin(EXYNOS4_GPIO_Y45, S5P_GPIO_OUTPUT);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000304}
305
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100306int mipi_power(void)
307{
308 return 0;
309}
310
Ajay Kumar41022a12013-02-21 23:52:57 +0000311void exynos_reset_lcd(void)
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000312{
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530313 gpio_set_value(EXYNOS4_GPIO_Y45, 1);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000314 udelay(10000);
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530315 gpio_set_value(EXYNOS4_GPIO_Y45, 0);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000316 udelay(10000);
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530317 gpio_set_value(EXYNOS4_GPIO_Y45, 1);
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000318 udelay(100);
319}
320
Ajay Kumar41022a12013-02-21 23:52:57 +0000321void exynos_lcd_power_on(void)
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000322{
Jaehoon Chung40195a22017-01-09 14:47:50 +0900323 struct udevice *dev;
324 int ret;
325 u8 reg;
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000326
Jaehoon Chung40195a22017-01-09 14:47:50 +0900327 ret = pmic_get("max8998-pmic", &dev);
328 if (ret) {
329 puts("Failed to get MAX8998!\n");
Minkyu Kang538f26b2012-12-10 22:43:57 +0900330 return;
Jaehoon Chung40195a22017-01-09 14:47:50 +0900331 }
Minkyu Kang538f26b2012-12-10 22:43:57 +0900332
Jaehoon Chung40195a22017-01-09 14:47:50 +0900333 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF3);
334 reg |= MAX8998_LDO17;
335 ret = pmic_reg_write(dev, MAX8998_REG_ONOFF3, reg);
336 if (ret) {
337 puts("MAX8998 LDO setting error\n");
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000338 return;
Jaehoon Chung40195a22017-01-09 14:47:50 +0900339 }
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000340
Jaehoon Chung40195a22017-01-09 14:47:50 +0900341 reg = pmic_reg_read(dev, MAX8998_REG_ONOFF2);
342 reg |= MAX8998_LDO7;
343 ret = pmic_reg_write(dev, MAX8998_REG_ONOFF2, reg);
344 if (ret) {
345 puts("MAX8998 LDO setting error\n");
346 return;
347 }
Piotr Wilczek461c5e52012-10-19 05:34:07 +0000348}
349
Ajay Kumar41022a12013-02-21 23:52:57 +0000350void exynos_cfg_ldo(void)
351{
352 ld9040_cfg_ldo();
353}
354
355void exynos_enable_ldo(unsigned int onoff)
356{
357 ld9040_enable_ldo(onoff);
358}
359
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100360int exynos_init(void)
Piotr Wilczeke372b552012-10-19 05:34:03 +0000361{
Piotr Wilczeke372b552012-10-19 05:34:03 +0000362 gd->bd->bi_arch_number = MACH_TYPE_UNIVERSAL_C210;
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100363
364 switch (get_hwrev()) {
365 case 0:
366 /*
367 * Set the low to enable LDO_EN
368 * But when you use the test board for eMMC booting
369 * you should set it HIGH since it removes the inverter
370 */
371 /* MASSMEMORY_EN: XMDMDATA_6: GPE3[6] */
Simon Glass4f83d3d2014-10-20 19:48:39 -0600372 gpio_request(EXYNOS4_GPIO_E36, "ldo_en");
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530373 gpio_direction_output(EXYNOS4_GPIO_E36, 0);
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100374 break;
375 default:
376 /*
377 * Default reset state is High and there's no inverter
378 * But set it as HIGH to ensure
379 */
380 /* MASSMEMORY_EN: XMDMADDR_3: GPE1[3] */
Simon Glass4f83d3d2014-10-20 19:48:39 -0600381 gpio_request(EXYNOS4_GPIO_E13, "massmemory_en");
Akshay Saraswat1376cdd2014-05-13 10:30:14 +0530382 gpio_direction_output(EXYNOS4_GPIO_E13, 1);
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100383 break;
384 }
Piotr Wilczeke372b552012-10-19 05:34:03 +0000385
Piotr Wilczeke372b552012-10-19 05:34:03 +0000386 check_hw_revision();
387 printf("HW Revision:\t0x%x\n", board_rev);
388
389 return 0;
390}
Przemyslaw Marczak283a3202014-01-22 11:24:12 +0100391
Simon Glassb4a967e2016-02-21 21:08:54 -0700392#ifdef CONFIG_LCD
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100393void exynos_lcd_misc_init(vidinfo_t *vid)
Przemyslaw Marczak283a3202014-01-22 11:24:12 +0100394{
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100395#ifdef CONFIG_TIZEN
396 get_tizen_logo_info(vid);
Przemyslaw Marczak283a3202014-01-22 11:24:12 +0100397#endif
Piotr Wilczek0ada4ad2014-03-07 14:59:47 +0100398
399 /* for LD9040. */
400 vid->pclk_name = 1; /* MPLL */
401 vid->sclk_div = 1;
402
Simon Glass6a38e412017-08-03 12:22:09 -0600403 env_set("lcdinfo", "lcd=ld9040");
Przemyslaw Marczak283a3202014-01-22 11:24:12 +0100404}
Simon Glassb4a967e2016-02-21 21:08:54 -0700405#endif