Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2010 Samsung Electronics |
| 4 | * Minkyu Kang <mk7.kang@samsung.com> |
| 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
Simon Glass | 5e6201b | 2019-08-01 09:46:51 -0600 | [diff] [blame] | 9 | #include <env.h> |
Simon Glass | 0f2af88 | 2020-05-10 11:40:05 -0600 | [diff] [blame] | 10 | #include <log.h> |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 11 | #include <spi.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 12 | #include <asm/global_data.h> |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 13 | #include <asm/io.h> |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 14 | #include <asm/gpio.h> |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 15 | #include <asm/arch/adc.h> |
Piotr Wilczek | 3b17914 | 2012-09-20 00:19:59 +0000 | [diff] [blame] | 16 | #include <asm/arch/pinmux.h> |
Piotr Wilczek | 6ce94c3 | 2012-09-20 00:20:00 +0000 | [diff] [blame] | 17 | #include <asm/arch/watchdog.h> |
Simon Glass | dbd7954 | 2020-05-10 11:40:11 -0600 | [diff] [blame] | 18 | #include <linux/delay.h> |
Łukasz Majewski | 1c6dba1 | 2012-11-13 03:21:55 +0000 | [diff] [blame] | 19 | #include <power/pmic.h> |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 20 | #include <usb.h> |
Marek Vasut | f1be9cb | 2015-12-04 02:51:20 +0100 | [diff] [blame] | 21 | #include <usb/dwc2_udc.h> |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 22 | #include <asm/arch/cpu.h> |
Łukasz Majewski | 1c6dba1 | 2012-11-13 03:21:55 +0000 | [diff] [blame] | 23 | #include <power/max8998_pmic.h> |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 24 | #include <libtizen.h> |
Przemyslaw Marczak | 94df801 | 2014-01-22 11:24:20 +0100 | [diff] [blame] | 25 | #include <samsung/misc.h> |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 26 | #include <usb_mass_storage.h> |
Simon Glass | 0ffb9d6 | 2017-05-31 19:47:48 -0600 | [diff] [blame] | 27 | #include <asm/mach-types.h> |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 28 | |
| 29 | DECLARE_GLOBAL_DATA_PTR; |
| 30 | |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 31 | unsigned int board_rev; |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 32 | static int init_pmic_lcd(void); |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 33 | |
Tom Rini | 4cc3885 | 2021-08-30 09:16:30 -0400 | [diff] [blame] | 34 | #ifdef CONFIG_REVISION_TAG |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 35 | u32 get_board_rev(void) |
| 36 | { |
| 37 | return board_rev; |
| 38 | } |
Tom Rini | 4cc3885 | 2021-08-30 09:16:30 -0400 | [diff] [blame] | 39 | #endif |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 40 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 41 | int exynos_power_init(void) |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 42 | { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 43 | return init_pmic_lcd(); |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 44 | } |
| 45 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 46 | static int get_hwrev(void) |
Łukasz Majewski | 11be283 | 2012-11-13 03:22:17 +0000 | [diff] [blame] | 47 | { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 48 | return board_rev & 0xFF; |
Łukasz Majewski | 11be283 | 2012-11-13 03:22:17 +0000 | [diff] [blame] | 49 | } |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 50 | |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 51 | static 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 Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 76 | static int adc_power_control(int on) |
| 77 | { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 78 | struct udevice *dev; |
Łukasz Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 79 | int ret; |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 80 | u8 reg; |
Łukasz Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 81 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 82 | ret = pmic_get("max8998-pmic", &dev); |
| 83 | if (ret) { |
| 84 | puts("Failed to get MAX8998!\n"); |
| 85 | return ret; |
| 86 | } |
Łukasz Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 87 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 88 | reg = pmic_reg_read(dev, MAX8998_REG_ONOFF1); |
| 89 | if (on) |
| 90 | reg |= MAX8998_LDO4; |
| 91 | else |
| 92 | reg &= ~MAX8998_LDO4; |
Łukasz Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 93 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 94 | 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 Glass | 7bbb7d9 | 2016-11-23 06:34:40 -0700 | [diff] [blame] | 100 | return 0; |
Łukasz Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 101 | } |
| 102 | |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 103 | static unsigned int get_hw_revision(void) |
| 104 | { |
| 105 | int hwrev, mode0, mode1; |
| 106 | |
Łukasz Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 107 | adc_power_control(1); |
| 108 | |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 109 | 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 Majewski | 61f8b40 | 2012-03-26 21:53:48 +0000 | [diff] [blame] | 131 | adc_power_control(0); |
| 132 | |
Minkyu Kang | 0aa1a6b | 2011-01-24 15:33:50 +0900 | [diff] [blame] | 133 | return hwrev; |
| 134 | } |
| 135 | |
| 136 | static void check_hw_revision(void) |
| 137 | { |
| 138 | int hwrev; |
| 139 | |
| 140 | hwrev = get_hw_revision(); |
| 141 | |
| 142 | board_rev |= hwrev; |
| 143 | } |
| 144 | |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 145 | #ifdef CONFIG_USB_GADGET |
| 146 | static int s5pc210_phy_control(int on) |
| 147 | { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 148 | struct udevice *dev; |
| 149 | int ret; |
| 150 | u8 reg; |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 151 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 152 | ret = pmic_get("max8998-pmic", &dev); |
| 153 | if (ret) { |
| 154 | puts("Failed to get MAX8998!\n"); |
| 155 | return ret; |
| 156 | } |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 157 | |
| 158 | if (on) { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 159 | 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 Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 171 | |
| 172 | } else { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 173 | 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 Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | if (ret) { |
| 188 | puts("MAX8998 LDO setting error!\n"); |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 189 | return -EINVAL; |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 190 | } |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 191 | |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 192 | return 0; |
| 193 | } |
| 194 | |
Marek Vasut | 6939aca | 2015-12-04 02:23:29 +0100 | [diff] [blame] | 195 | struct dwc2_plat_otg_data s5pc210_otg_data = { |
Lukasz Majewski | bf73126 | 2011-12-15 10:32:12 +0100 | [diff] [blame] | 196 | .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 Wilczek | 6ce94c3 | 2012-09-20 00:20:00 +0000 | [diff] [blame] | 203 | |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 204 | int board_usb_init(int index, enum usb_init_type init) |
| 205 | { |
| 206 | debug("USB_udc_probe\n"); |
Marek Vasut | 01b61fa | 2015-12-04 02:26:33 +0100 | [diff] [blame] | 207 | return dwc2_udc_probe(&s5pc210_otg_data); |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 208 | } |
| 209 | |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 210 | int exynos_early_init_f(void) |
Piotr Wilczek | 6ce94c3 | 2012-09-20 00:20:00 +0000 | [diff] [blame] | 211 | { |
| 212 | wdt_stop(); |
| 213 | |
| 214 | return 0; |
| 215 | } |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 216 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 217 | static int init_pmic_lcd(void) |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 218 | { |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 219 | struct udevice *dev; |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 220 | unsigned char val; |
| 221 | int ret = 0; |
| 222 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 223 | 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 Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 228 | |
| 229 | /* LDO7 1.8V */ |
| 230 | val = 0x02; /* (1800 - 1600) / 100; */ |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 231 | ret |= pmic_reg_write(dev, MAX8998_REG_LDO7, val); |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 232 | |
| 233 | /* LDO17 3.0V */ |
| 234 | val = 0xe; /* (3000 - 1600) / 100; */ |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 235 | ret |= pmic_reg_write(dev, MAX8998_REG_LDO17, val); |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 236 | |
| 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 Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 244 | ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF1, val); |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 245 | |
| 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 Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 251 | ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF2, val); |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 252 | |
| 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 Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 258 | ret |= pmic_reg_write(dev, MAX8998_REG_ONOFF3, val); |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 259 | |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 260 | if (ret) { |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 261 | puts("LCD pmic initialisation error!\n"); |
Jaehoon Chung | 40195a2 | 2017-01-09 14:47:50 +0900 | [diff] [blame] | 262 | return -EINVAL; |
| 263 | } |
| 264 | |
| 265 | return 0; |
Piotr Wilczek | 461c5e5 | 2012-10-19 05:34:07 +0000 | [diff] [blame] | 266 | } |
| 267 | |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 268 | int exynos_init(void) |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 269 | { |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 270 | gd->bd->bi_arch_number = MACH_TYPE_UNIVERSAL_C210; |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 271 | |
| 272 | switch (get_hwrev()) { |
| 273 | case 0: |
| 274 | /* |
| 275 | * Set the low to enable LDO_EN |
| 276 | * But when you use the test board for eMMC booting |
| 277 | * you should set it HIGH since it removes the inverter |
| 278 | */ |
| 279 | /* MASSMEMORY_EN: XMDMDATA_6: GPE3[6] */ |
Simon Glass | 4f83d3d | 2014-10-20 19:48:39 -0600 | [diff] [blame] | 280 | gpio_request(EXYNOS4_GPIO_E36, "ldo_en"); |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 281 | gpio_direction_output(EXYNOS4_GPIO_E36, 0); |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 282 | break; |
| 283 | default: |
| 284 | /* |
| 285 | * Default reset state is High and there's no inverter |
| 286 | * But set it as HIGH to ensure |
| 287 | */ |
| 288 | /* MASSMEMORY_EN: XMDMADDR_3: GPE1[3] */ |
Simon Glass | 4f83d3d | 2014-10-20 19:48:39 -0600 | [diff] [blame] | 289 | gpio_request(EXYNOS4_GPIO_E13, "massmemory_en"); |
Akshay Saraswat | 1376cdd | 2014-05-13 10:30:14 +0530 | [diff] [blame] | 290 | gpio_direction_output(EXYNOS4_GPIO_E13, 1); |
Piotr Wilczek | 0ada4ad | 2014-03-07 14:59:47 +0100 | [diff] [blame] | 291 | break; |
| 292 | } |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 293 | |
Piotr Wilczek | e372b55 | 2012-10-19 05:34:03 +0000 | [diff] [blame] | 294 | check_hw_revision(); |
| 295 | printf("HW Revision:\t0x%x\n", board_rev); |
| 296 | |
| 297 | return 0; |
| 298 | } |