]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: Convert CONFIG_MACPWR to Kconfig
authorMylène Josserand <mylene.josserand@free-electrons.com>
Sun, 2 Apr 2017 10:59:10 +0000 (12:59 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 20 Apr 2017 11:20:31 +0000 (13:20 +0200)
Convert the CONFIG_MACPWR to Kconfig and update all the sunxi defconfigs
that used it in SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
13 files changed:
board/sunxi/Kconfig
board/sunxi/board.c
configs/Bananapi_defconfig
configs/Bananapro_defconfig
configs/Lamobo_R1_defconfig
configs/Mele_A1000_defconfig
configs/Orangepi_defconfig
configs/Orangepi_mini_defconfig
configs/i12-tvbox_defconfig
configs/jesurun_q5_defconfig
configs/mixtile_loftq_defconfig
configs/orangepi_plus2e_defconfig
configs/orangepi_plus_defconfig

index aa6b84bbbb52c6f0fe73959482c75050088266ba..87f282a49337c93fb556717609300f7ed8b7d969 100644 (file)
@@ -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
index 8043a8dbacd1fe1427237e1ee5af76013ecc0c36..e2bba9abdeedd8da828b2f7c719fa99e4af17aea 100644 (file)
@@ -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() */
index 29e7f700f2e59e808d57677de3720ad3447f4582..fe75eef513569942736f53f12432b8fb0473fa88 100644 (file)
@@ -2,12 +2,12 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index bb25dec2a9864bb7783e27748748c927088d1347..df65922e83f4425232e4997623504c97f9c35fa2 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_USB1_VBUS_PIN="PH0"
 CONFIG_USB2_VBUS_PIN="PH1"
 CONFIG_VIDEO_COMPOSITE=y
@@ -9,7 +10,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index 38eea97000c16dbf37050f3969e85fd7dcb7387f..cc29d606a9dd2c1a1d00bfd940741053138dc473 100644 (file)
@@ -2,13 +2,13 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_MMC0_CD_PIN="PH10"
 CONFIG_SATAPWR="PB3"
 CONFIG_GMAC_TX_DELAY=4
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-lamobo-r1"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index 4bd81a262cd7e75ee4367e88a779922cb9c369da..0442360a5cf2df9145f84e9a71443d67c09700ee 100644 (file)
@@ -1,12 +1,12 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN4I=y
+CONFIG_MACPWR="PH15"
 CONFIG_VIDEO_VGA=y
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-a1000"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(15)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index e9781554f858d2257db1747227e995397060e353..b8c1ea4d7cdfac571b6f0c0763672691ab2b8bde 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_USB1_VBUS_PIN="PH26"
 CONFIG_USB2_VBUS_PIN="PH22"
 CONFIG_VIDEO_VGA=y
@@ -10,7 +11,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index 508b4aca765a15b34c7cdd147bda4a205ae735a6..19c35ef10394ca34876c700f25417b690fea385e 100644 (file)
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_MMC0_CD_PIN="PH10"
 CONFIG_MMC3_CD_PIN="PH11"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
@@ -12,7 +13,6 @@ CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-orangepi-mini"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index d7dc703981b3335ba4d7c9935c9159c5334f0b64..4245491b6afcf116bc89bd8e5c7b6b9bb5acedf8 100644 (file)
@@ -2,10 +2,10 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
+CONFIG_MACPWR="PH21"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-i12-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(21)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index 608e523e4c02f973e64c4e6863fc1fe0b760973a..822d56b9965a1e64903c9c0e9b5b80b5b5b0f039 100644 (file)
@@ -2,11 +2,11 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN4I=y
 CONFIG_DRAM_CLK=312
+CONFIG_MACPWR="PH19"
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-jesurun-q5"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(19)"
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_IMLS is not set
index 591f48169dffc6c8a9bdf81a76afd855662c2dd6..6264b3a1517424a62cb88d82b208437da19860ce 100644 (file)
@@ -2,12 +2,12 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_ZQ=251
+CONFIG_MACPWR="PA21"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB1_VBUS_PIN="PH24"
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-mixtile-loftq"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPA(21)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
index 366b804b494f5554b7e207f43d3c694b053a5de9..52ec86a4bf82fec431509de03c24f2302a2b2e66 100644 (file)
@@ -4,10 +4,10 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_MACPWR="PD6"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus2e"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPD(6)"
 CONFIG_CONSOLE_MUX=y
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y
index a14c7c75f0858d986592665ac27982abd594b91e..5e028691c185b3eac75b4dd9ddf6a253d2798830 100644 (file)
@@ -4,12 +4,12 @@ CONFIG_MACH_SUN8I_H3=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881979
 CONFIG_DRAM_ODT_EN=y
+CONFIG_MACPWR="PD6"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_USB1_VBUS_PIN="PG13"
 CONFIG_SATAPWR="PG11"
 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPD(6)"
 CONFIG_CONSOLE_MUX=y
 CONFIG_SPL=y
 CONFIG_SPL_I2C_SUPPORT=y