Skip to content

Commit 10c5964

Browse files
committed
i9300: don't pull down the power key
On reset, GPX2-7 is set to pull-down. This causes the PMIC to think that the power key is being pressed, and so causes the PMIC to reset the SoC after ~8 seconds (as would happen if you held the power key down normally). To fix this, we do what S-BOOT does: set the input to floating, and rely on the external pull-up to make the key work.
1 parent d0d2669 commit 10c5964

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

board/samsung/i9300/i9300.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77

88
#include <common.h>
9+
#include <asm/gpio.h>
10+
#include <asm/arch/gpio.h>
911

1012
DECLARE_GLOBAL_DATA_PTR;
1113

@@ -15,8 +17,17 @@ int get_board_rev(void)
1517
return 0;
1618
}
1719

20+
static void board_gpio_init(void)
21+
{
22+
/* GPX2[7] - power key */
23+
gpio_request(EXYNOS4X12_GPIO_X27, "nPOWER");
24+
gpio_cfg_pin(EXYNOS4X12_GPIO_X27, S5P_GPIO_INPUT);
25+
gpio_set_pull(EXYNOS4X12_GPIO_X27, S5P_GPIO_PULL_NONE);
26+
}
27+
1828
int exynos_init(void)
1929
{
20-
gd->ram_size = 0x4000000;
30+
board_gpio_init();
31+
2132
return 0;
2233
}

0 commit comments

Comments
 (0)