summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/Kconfig7
-rw-r--r--board/sunxi/board.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index aa6b84b..87f282a 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -345,6 +345,13 @@ config OLD_SUNXI_KERNEL_COMPAT
Set this to enable various workarounds for old kernels, this results in
sub-optimal settings for newer kernels, only enable if needed.
+config MACPWR
+ string "MAC power pin"
+ default ""
+ help
+ Set the pin used to power the MAC. This takes a string in the format
+ understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
+
config MMC0_CD_PIN
string "Card detect pin for mmc0"
default "PF6" if MACH_SUN8I_A83T || MACH_SUNXI_H3_H5 || MACH_SUN50I
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 8043a8d..e2bba9a 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -80,7 +80,7 @@ DECLARE_GLOBAL_DATA_PTR;
/* add board specific code here */
int board_init(void)
{
- __maybe_unused int id_pfr1, ret, satapwr_pin;
+ __maybe_unused int id_pfr1, ret, satapwr_pin, macpwr_pin;
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
@@ -123,8 +123,9 @@ int board_init(void)
gpio_direction_output(satapwr_pin, 1);
#endif
#ifdef CONFIG_MACPWR
- gpio_request(CONFIG_MACPWR, "macpwr");
- gpio_direction_output(CONFIG_MACPWR, 1);
+ macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);
+ gpio_request(macpwr_pin, "macpwr");
+ gpio_direction_output(macpwr_pin, 1);
#endif
/* Uses dm gpio code so do this here and not in i2c_init_board() */