[PATCH v2] mkimage: Fix error message if write less data then expected

2020-07-08 Thread Mylène Josserand
Add a new error message in case the size of data written
are shorter than the one expected.

Currently, it will lead to the following error message:

"mkimage: Write error on uImage: Success"

This is not explicit when the error is because the device
doesn't have enough space. Let's use a more understandable message:

"mkimage: Write only 4202432/4682240 bytes, probably no space left on the 
device"

Signed-off-by: Mylène Josserand 
Reviewed-by: Walter Lozano 
---

Changes since v1:
Set the message to be more explicit and saying that it is probably a
"No space left on device"

 tools/mkimage.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index d2cd1917874..7cb666d4822 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -674,7 +674,7 @@ copy_file (int ifd, const char *datafile, int pad)
int zero = 0;
uint8_t zeros[4096];
int offset = 0;
-   int size;
+   int size, ret;
struct image_type_params *tparams = imagetool_get_type(params.type);
 
memset(zeros, 0, sizeof(zeros));
@@ -730,9 +730,16 @@ copy_file (int ifd, const char *datafile, int pad)
}
 
size = sbuf.st_size - offset;
-   if (write(ifd, ptr + offset, size) != size) {
-   fprintf (stderr, "%s: Write error on %s: %s\n",
-   params.cmdname, params.imagefile, strerror(errno));
+
+   ret = write(ifd, ptr + offset, size);
+   if (ret != size) {
+   if (ret < 0)
+   fprintf (stderr, "%s: Write error on %s: %s\n",
+params.cmdname, params.imagefile, 
strerror(errno));
+   else if (ret < size)
+   fprintf (stderr, "%s: Write only %d/%d bytes, "\
+"probably no space left on the device\n",
+params.cmdname, ret, size);
exit (EXIT_FAILURE);
}
 
-- 
2.27.0



[PATCH v1 1/1] mkimage: Fix error message if write less data then expected

2020-06-05 Thread Mylène Josserand
Add a new error message in case the size of data written
are shorter than the one expected.

Currently, it will lead to the following error message:
   "mkimage: Write error on uImage: Success"

This is not explicit when the error is because the device
doesn't have enough space. Let's use a "No space left on
the device" error message in that case.

Signed-off-by: Mylène Josserand 
---
 tools/mkimage.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index d2cd1917874..ef0cc889a92 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -674,7 +674,7 @@ copy_file (int ifd, const char *datafile, int pad)
int zero = 0;
uint8_t zeros[4096];
int offset = 0;
-   int size;
+   int size, ret;
struct image_type_params *tparams = imagetool_get_type(params.type);
 
memset(zeros, 0, sizeof(zeros));
@@ -730,9 +730,15 @@ copy_file (int ifd, const char *datafile, int pad)
}
 
size = sbuf.st_size - offset;
-   if (write(ifd, ptr + offset, size) != size) {
-   fprintf (stderr, "%s: Write error on %s: %s\n",
-   params.cmdname, params.imagefile, strerror(errno));
+
+   ret = write(ifd, ptr + offset, size);
+   if (ret != size) {
+   if (ret < 0)
+   fprintf (stderr, "%s: Write error on %s: %s\n",
+params.cmdname, params.imagefile, 
strerror(errno));
+   else if (ret < size)
+   fprintf (stderr, "%s: No space left on the device\n",
+params.cmdname);
exit (EXIT_FAILURE);
}
 
-- 
2.26.2



[PATCH v1 0/1] Fix mkimage error message

2020-06-05 Thread Mylène Josserand
Hello everyone,


While using mkimage with debos, I noticed a wierd error:
   "mkimage: Write error on uImage: Success"

After some investications, I found that this error is in fact
a "No space left" error.

This patch is updating mkimage's code to print a new error
message in case the size written is less than the expected size.
We can't write all the data probably because of of not enough space
on the device.

Thank you in advance,
Best regards
Mylène


Mylène Josserand (1):
  mkimage: Fix error message if write less data then expected

 tools/mkimage.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

-- 
2.26.2



[U-Boot] [PATCH 2/2] mtd: nand: sunxi: Return on set_feature only when not ENOTSUPP

2018-07-13 Thread Mylène Josserand
Return the error code of the set_features function only if
the error code is not ENOTSUPP. Otherwise, if this function
is not supported, it will return and fail to initialize the
NAND.

Signed-off-by: Mylène Josserand 
---
 drivers/mtd/nand/sunxi_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index bb87aca698..3ccb168d13 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1369,7 +1369,7 @@ static int sunxi_nand_chip_init_timings(struct 
sunxi_nand_chip *chip)
ONFI_FEATURE_ADDR_TIMING_MODE,
feature);
chip->nand.select_chip(mtd, -1);
-   if (ret)
+   if (ret && ret != -ENOTSUPP)
return ret;
}
}
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/2] mtd: nand: nand_base: Convert EINVAL into ENOTSUPP

2018-07-13 Thread Mylène Josserand
Convert the EINVAL error into ENOTSUPP when the GET/SET_FEATURES
is not supported.

Signed-off-by: Mylène Josserand 
---
 drivers/mtd/nand/nand_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 64e4621aaa..9094f857c1 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3041,7 +3041,7 @@ static int nand_onfi_set_features(struct mtd_info *mtd, 
struct nand_chip *chip,
if (!chip->onfi_version ||
!(le16_to_cpu(chip->onfi_params.opt_cmd)
  & ONFI_OPT_CMD_SET_GET_FEATURES))
-   return -EINVAL;
+   return -ENOTSUPP;
 #endif
 
chip->cmdfunc(mtd, NAND_CMD_SET_FEATURES, addr, -1);
@@ -3070,7 +3070,7 @@ static int nand_onfi_get_features(struct mtd_info *mtd, 
struct nand_chip *chip,
if (!chip->onfi_version ||
!(le16_to_cpu(chip->onfi_params.opt_cmd)
  & ONFI_OPT_CMD_SET_GET_FEATURES))
-   return -EINVAL;
+   return -ENOTSUPP;
 #endif
 
chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, addr, -1);
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/2] NAND: sunxi: Return ENOTSUPP on onfi functions

2018-07-13 Thread Mylène Josserand
Hello everyone,

This is a first version of this series that fix code for NAND chip that
does not have ONFI get/set features support.

Patch 01:
The current code returns an invalid error if it is not supported.
It should return ENOTSUPP instead.
Patch 02:
In sunxi_nand driver, we should return of sunxi_nand_chip_init_timings
function only when the ONFI is supported and we got a real error while
setting the timing. If the onfi_get/set_features is not supported, we
should continue the NAND intialization.

Let me kow what you think.

Thank you in advance,
Best regards,

Mylène Josserand (2):
  mtd: nand: nand_base: Convert EINVAL into ENOTSUPP
  mtd: nand: sunxi: Return on set_feature only when not ENOTSUPP

 drivers/mtd/nand/nand_base.c  | 4 ++--
 drivers/mtd/nand/sunxi_nand.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: improve SATAPWR and MACPWR

2018-04-09 Thread Mylène Josserand
Hi,

On Mon, 9 Apr 2018 13:42:28 +0200
Maxime Ripard  wrote:

> Hi,
> 
> On Mon, Apr 09, 2018 at 12:17:26PM +0200, Mylène Josserand wrote:
> > This commit adds a dependency on SATA for SATAPWR because
> > if we do not have SATA enabled, we will not have this pin
> > configured.
> > 
> > By default, these two configs (SATAPWR and MACPWR) are equals
> > to "". Because of that, they are always defined so we need to
> > check if the variables are not empty to perform the gpio request.
> > Otherwise, if SATA is enabled but SATAPWR is not configured, we will have
> > a mdelay of 500ms for nothing (because no pin requested).  
> 
> You should turn this commit log the other way around. First state what
> the issue is (you have a 500ms delay all the time, even when SATA is
> not present on the board), then why (because SATAPWR will be defined
> all the time to "", so the ifdef condition will always be evaluated to
> true), then what you're doing about it (adding a depends on and
> checking for strlen).
> 
> It's also not clear why you need both, and why just adding the depends
> on wouldn't be enough.

Okay, thank you for the review, I will try to be more precise in
my commit log.

> 
> > Signed-off-by: Mylène Josserand 
> > ---
> >  arch/arm/mach-sunxi/Kconfig |  1 +
> >  board/sunxi/board.c | 21 +
> >  2 files changed, 14 insertions(+), 8 deletions(-)
> > 
> > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> > index b868f0e350..7d36719700 100644
> > --- a/arch/arm/mach-sunxi/Kconfig
> > +++ b/arch/arm/mach-sunxi/Kconfig
> > @@ -911,6 +911,7 @@ endchoice
> >  config SATAPWR
> > string "SATA power pin"
> > default ""
> > +   depends on SATA
> > help
> >   Set the pins used to power the SATA. This takes a string in the
> >   format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
> > diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> > index 322dd9e23a..5b080607c1 100644
> > --- a/board/sunxi/board.c
> > +++ b/board/sunxi/board.c
> > @@ -230,16 +230,21 @@ int board_init(void)
> > return ret;
> >  
> >  #ifdef CONFIG_SATAPWR
> > -   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
> > -   gpio_request(satapwr_pin, "satapwr");
> > -   gpio_direction_output(satapwr_pin, 1);
> > -   /* Give attached sata device time to power-up to avoid link timeouts */
> > -   mdelay(500);
> > +   if (strlen(CONFIG_SATAPWR)) {  
> 
> What about if (IS_ENABLED(CONFIG_SATAPWR) && strlen(CONFIG_SATAPWR))

You already indicated me this (privately) and I tested it.
I finally did not use it because "IS_ENABLED" seems to work only for
boolean or tristate options. When I tested it, it fails to recognize
the configuration because it is a "string", I guess.
Here is the error I got:

error: pasting "__ARG_PLACEHOLDER_" and """" does not give a valid
preprocessing token

Moreover, in case CONFIG_SATA is not enabled, it leads also to an error
on "strlen" function because CONFIG_SATAPWR is not defined anymore.

That is why I kept the use of "#ifdef CONFIG_SATAPWR".

> 
> > +   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
> > +   gpio_request(satapwr_pin, "satapwr");
> > +   gpio_direction_output(satapwr_pin, 1);
> > +   /* Give attached sata device time to power-up to avoid link 
> > timeouts */
> > +   mdelay(500);
> > +   }
> >  #endif
> > +
> >  #ifdef CONFIG_MACPWR
> > -   macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);
> > -   gpio_request(macpwr_pin, "macpwr");
> > -   gpio_direction_output(macpwr_pin, 1);
> > +   if (strlen(CONFIG_MACPWR)) {
> > +   macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);
> > +   gpio_request(macpwr_pin, "macpwr");
> > +   gpio_direction_output(macpwr_pin, 1);
> > +   }  
> 
> You should split that part in a separate commit.

ack.

Best regards,

Mylène

-- 
Mylène Josserand, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] sunxi: improve SATAPWR and MACPWR

2018-04-09 Thread Mylène Josserand
This commit adds a dependency on SATA for SATAPWR because
if we do not have SATA enabled, we will not have this pin
configured.

By default, these two configs (SATAPWR and MACPWR) are equals
to "". Because of that, they are always defined so we need to
check if the variables are not empty to perform the gpio request.
Otherwise, if SATA is enabled but SATAPWR is not configured, we will have
a mdelay of 500ms for nothing (because no pin requested).

Signed-off-by: Mylène Josserand 
---
 arch/arm/mach-sunxi/Kconfig |  1 +
 board/sunxi/board.c | 21 +
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b868f0e350..7d36719700 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -911,6 +911,7 @@ endchoice
 config SATAPWR
string "SATA power pin"
default ""
+   depends on SATA
help
  Set the pins used to power the SATA. This takes a string in the
  format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 322dd9e23a..5b080607c1 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -230,16 +230,21 @@ int board_init(void)
return ret;
 
 #ifdef CONFIG_SATAPWR
-   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
-   gpio_request(satapwr_pin, "satapwr");
-   gpio_direction_output(satapwr_pin, 1);
-   /* Give attached sata device time to power-up to avoid link timeouts */
-   mdelay(500);
+   if (strlen(CONFIG_SATAPWR)) {
+   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
+   gpio_request(satapwr_pin, "satapwr");
+   gpio_direction_output(satapwr_pin, 1);
+   /* Give attached sata device time to power-up to avoid link 
timeouts */
+   mdelay(500);
+   }
 #endif
+
 #ifdef CONFIG_MACPWR
-   macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);
-   gpio_request(macpwr_pin, "macpwr");
-   gpio_direction_output(macpwr_pin, 1);
+   if (strlen(CONFIG_MACPWR)) {
+   macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);
+   gpio_request(macpwr_pin, "macpwr");
+   gpio_direction_output(macpwr_pin, 1);
+   }
 #endif
 
 #ifdef CONFIG_DM_I2C
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: improve throughput in the sunxi_mmc driver

2018-03-29 Thread Mylène Josserand
Hello,

On Wed, 21 Mar 2018 12:18:58 +0100
Maxime Ripard  wrote:

> From: Philipp Tomsich 
> 
> Throughput tests have shown the sunxi_mmc driver to take over 10s to
> read 10MB from a fast eMMC device due to excessive delays in polling
> loops.
> 
> This commit restructures the main polling loops to use get_timer(...)
> to determine whether a (millisecond) timeout has expired.  We choose
> not to use the wait_bit function, as we don't need interruptability
> with ctrl-c and have at least one case where two bits (one for an
> error condition and another one for completion) need to be read and
> using wait_bit would have not added to the clarity.
> 
> The observed speedup in testing on a A31 is greater than 10x (e.g. a
> 10MB write decreases from 9.302s to 0.884s).
> 
> Signed-off-by: Philipp Tomsich 
> Signed-off-by: Maxime Ripard 

Tested-by: Mylène Josserand 

Thanks,

-- 
Mylène Josserand, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 4/4] sunxi: Update NanoPi Neo Air to use dtsi

2017-05-09 Thread Mylène Josserand
Update the NanoPi Neo Air device tree to use the NanoPi dtsi.

Signed-off-by: Mylène Josserand 
---
 arch/arm/dts/sun8i-h3-nanopi-neo-air.dts | 51 +---
 1 file changed, 1 insertion(+), 50 deletions(-)

diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo-air.dts 
b/arch/arm/dts/sun8i-h3-nanopi-neo-air.dts
index 3ba081c1f5..1b269e88d8 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo-air.dts
@@ -40,58 +40,9 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/dts-v1/;
-#include "sun8i-h3.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include 
-#include 
+#include "sun8i-h3-nanopi.dtsi"
 
 / {
model = "FriendlyARM NanoPi NEO Air";
compatible = "friendlyarm,nanopi-neo-air", "allwinner,sun8i-h3";
-
-   aliases {
-   serial0 = &uart0;
-   };
-
-   chosen {
-   stdout-path = "serial0:115200n8";
-   };
-
-   leds {
-   compatible = "gpio-leds";
-
-   pwr {
-   label = "nanopi:green:pwr";
-   gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
-   default-state = "on";
-   };
-
-   status {
-   label = "nanopi:blue:status";
-   gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
-   };
-   };
-};
-
-&mmc0 {
-   pinctrl-names = "default";
-   pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
-   vmmc-supply = <®_vcc3v3>;
-   bus-width = <4>;
-   cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
-   cd-inverted;
-   status = "okay";
-};
-
-&uart0 {
-   pinctrl-names = "default";
-   pinctrl-0 = <&uart0_pins_a>;
-   status = "okay";
-};
-
-&usbphy {
-   /* USB VBUS is always on */
-   status = "okay";
 };
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 1/4] sunxi: Add support for NanoPi M1

2017-05-09 Thread Mylène Josserand
NanoPi M1 is a board based on Allwinner H3 CPU.

This commit adds the support for this platform with:
   - an include device tree which enables UART, LEDs, GPIO key switch,
   1 USB host ports and the SD-card as a dtsi file.
   - a device tree specific to this board that enables the
   2 additional USB ports
   - a defconfig file for minimal support
   - a section in MAINTAINERS (add myself)

Synchronized with the kernel device tree, from commits:
sun8i-nanopi.dtsi: 85d2913614d9ab899d23b7ab7d22d23cf45bd1de
sun8i-h3-nanopi-m1.dts: 10efbf5f16336b7540ad6a16aa1cb0b26bab033b

Signed-off-by: Mylène Josserand 
---
 arch/arm/dts/Makefile   |   1 +
 arch/arm/dts/sun8i-h3-nanopi-m1.dts |  64 +
 arch/arm/dts/sun8i-h3-nanopi.dtsi   | 137 
 board/sunxi/MAINTAINERS |   5 ++
 configs/nanopi_m1_defconfig |  16 +
 5 files changed, 223 insertions(+)
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi-m1.dts
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi.dtsi
 create mode 100644 configs/nanopi_m1_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 4d656ce4cc..9d41cde025 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -304,6 +304,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
sun8i-h3-orangepi-pc-plus.dtb \
sun8i-h3-orangepi-plus.dtb \
sun8i-h3-orangepi-plus2e.dtb \
+   sun8i-h3-nanopi-m1.dtb \
sun8i-h3-nanopi-neo.dtb \
sun8i-h3-nanopi-neo-air.dtb
 dtb-$(CONFIG_MACH_SUN8I_R40) += \
diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1.dts 
b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
new file mode 100644
index 00..ec63d104b4
--- /dev/null
+++ b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2016 Milo Kim 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sun8i-h3-nanopi.dtsi"
+
+/ {
+   model = "FriendlyArm NanoPi M1";
+   compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+};
+
+&ehci1 {
+   status = "okay";
+};
+
+&ehci2 {
+   status = "okay";
+};
+
+&ohci1 {
+   status = "okay";
+};
+
+&ohci2 {
+   status = "okay";
+};
diff --git a/arch/arm/dts/sun8i-h3-nanopi.dtsi 
b/arch/arm/dts/sun8i-h3-nanopi.dtsi
new file mode 100644
index 00..c6decee41a
--- /dev/null
+++ b/arch/arm/dts/sun8i-h3-nanopi.dtsi
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2016 James Pettigrew 
+ * Copyright (C) 2016 Milo Kim 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * Thi

[U-Boot] [PATCH v2 2/4] sunxi: Update NanoPi Neo to use dtsi

2017-05-09 Thread Mylène Josserand
Update the NanoPi Neo device tree file to use the NanoPi dtsi.

Signed-off-by: Mylène Josserand 
---
 arch/arm/dts/sun8i-h3-nanopi-neo.dts | 79 +---
 1 file changed, 1 insertion(+), 78 deletions(-)

diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts 
b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
index 096ff0b5a5..5113059098 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
@@ -40,88 +40,11 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/dts-v1/;
-#include "sun8i-h3.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include 
-#include 
+#include "sun8i-h3-nanopi.dtsi"
 
 / {
model = "FriendlyARM NanoPi NEO";
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
-
-   aliases {
-   serial0 = &uart0;
-   };
-
-   chosen {
-   stdout-path = "serial0:115200n8";
-   };
-
-   leds {
-   compatible = "gpio-leds";
-   pinctrl-names = "default";
-   pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
-
-   pwr {
-   label = "nanopi:green:pwr";
-   gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
-   default-state = "on";
-   };
-
-   status {
-   label = "nanopi:blue:status";
-   gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
-   };
-   };
-};
-
-&ehci3 {
-   status = "okay";
-};
-
-&mmc0 {
-   pinctrl-names = "default";
-   pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
-   vmmc-supply = <®_vcc3v3>;
-   bus-width = <4>;
-   cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
-   cd-inverted;
-   status = "okay";
-};
-
-&ohci3 {
-   status = "okay";
-};
-
-&pio {
-   leds_opc: led-pins {
-   allwinner,pins = "PA10";
-   allwinner,function = "gpio_out";
-   allwinner,drive = ;
-   allwinner,pull = ;
-   };
-};
-
-&r_pio {
-   leds_r_opc: led-pins {
-   allwinner,pins = "PL10";
-   allwinner,function = "gpio_out";
-   allwinner,drive = ;
-   allwinner,pull = ;
-   };
-};
-
-&uart0 {
-   pinctrl-names = "default";
-   pinctrl-0 = <&uart0_pins_a>;
-   status = "okay";
-};
-
-&usbphy {
-   /* USB VBUS is always on */
-   status = "okay";
 };
 
 &emac {
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 3/4] sunxi: Move gpio-keys from NanoPi dtsi to dts

2017-05-09 Thread Mylène Josserand
Move the gpio-keys node from the NanoPi dtsi to NanoPi
Neo and NanoPi M1 dts files. It allows to have a more generic
dtsi file to be able to use it for other NanoPi platforms.

Signed-off-by: Mylène Josserand 
---
 arch/arm/dts/sun8i-h3-nanopi-m1.dts  | 13 +
 arch/arm/dts/sun8i-h3-nanopi-neo.dts | 13 +
 arch/arm/dts/sun8i-h3-nanopi.dtsi| 13 -
 3 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1.dts 
b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
index ec63d104b4..5e1d756cf6 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-m1.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
@@ -45,6 +45,19 @@
 / {
model = "FriendlyArm NanoPi M1";
compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+   r_gpio_keys {
+   compatible = "gpio-keys";
+   input-name = "k1";
+   pinctrl-names = "default";
+   pinctrl-0 = <&sw_r_npi>;
+
+   k1@0 {
+   label = "k1";
+   linux,code = ;
+   gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+   };
+   };
 };
 
 &ehci1 {
diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts 
b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
index 5113059098..80a1b18a64 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
@@ -45,6 +45,19 @@
 / {
model = "FriendlyARM NanoPi NEO";
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+   r_gpio_keys {
+   compatible = "gpio-keys";
+   input-name = "k1";
+   pinctrl-names = "default";
+   pinctrl-0 = <&sw_r_npi>;
+
+   k1@0 {
+   label = "k1";
+   linux,code = ;
+   gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+   };
+   };
 };
 
 &emac {
diff --git a/arch/arm/dts/sun8i-h3-nanopi.dtsi 
b/arch/arm/dts/sun8i-h3-nanopi.dtsi
index c6decee41a..5b9a39aa55 100644
--- a/arch/arm/dts/sun8i-h3-nanopi.dtsi
+++ b/arch/arm/dts/sun8i-h3-nanopi.dtsi
@@ -74,19 +74,6 @@
default-state = "on";
};
};
-
-   r_gpio_keys {
-   compatible = "gpio-keys";
-   input-name = "k1";
-   pinctrl-names = "default";
-   pinctrl-0 = <&sw_r_npi>;
-
-   k1@0 {
-   label = "k1";
-   linux,code = ;
-   gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-   };
-   };
 };
 
 &ehci3 {
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 0/4] sunxi: Add support for NanoPi M1

2017-05-09 Thread Mylène Josserand
Hi everyone,

Here is a V2 of the support of the Sun8i NanoPi M1 platform.
I created a patch serie instead on a standalone patch
because the kernel device tree for Nanopi uses a dtsi file
that does not exist in u-boot. This dtsi will be added in
this serie.

Changes since V1:
- Added the NanoPi dtsi from the kernel device tree
- Updated the NanoPi Neo device tree to use the dtsi
- Updated the dtsi from the kernel reference to remove the
gpio-keys to be able to use this dtsi file for the
NanoPi Neo Air. I will send this patch to the kernel if this
modification make sense.
- Updated the NanoPi Neo Air to use the dtsi

Patch01: Add the support of the NanoPi M1 platform. Based from the kernel
device tree so the NanoPi dtsi file is also added.
Patch02: Update the NanoPi Neo to use the dtsi to be close to the one from
the kernel.
Patch03: Move the gpio-keys to the dts file to have a generic dtsi file and
be able to use it for the NanoPi Neo Air.
Patch04: Update the NanoPi Neo Air device tree file to use the dtsi one.

Thank you in advance for your reviews/comments.

Best regards,

Mylène Josserand (4):
  sunxi: Add support for NanoPi M1
  sunxi: Update NanoPi Neo to use dtsi
  sunxi: Move gpio-keys from NanoPi dtsi to dts
  sunxi: Update NanoPi Neo Air to use dtsi

 arch/arm/dts/Makefile|   1 +
 arch/arm/dts/sun8i-h3-nanopi-m1.dts  |  77 +++
 arch/arm/dts/sun8i-h3-nanopi-neo-air.dts |  51 +
 arch/arm/dts/sun8i-h3-nanopi-neo.dts |  82 +++-
 arch/arm/dts/sun8i-h3-nanopi.dtsi| 124 +++
 board/sunxi/MAINTAINERS  |   5 ++
 configs/nanopi_m1_defconfig  |  16 
 7 files changed, 233 insertions(+), 123 deletions(-)
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi-m1.dts
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi.dtsi
 create mode 100644 configs/nanopi_m1_defconfig

-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] sunxi: Add support for NanoPi M1 board

2017-04-19 Thread Mylène Josserand
NanoPi M1 is a board based on Allwinner H3 CPU.

This commit adds the support for this platform with:
   - a device tree which enables UART, LEDs, GPIO key switch,
   3 USB host ports and the SD-card
   - a defconfig file for minimal support
   - a section in MAINTAINERS (add myself)

Based on the orangepi-pc and the device tree from the kernel.

Signed-off-by: Mylène Josserand 
---
 arch/arm/dts/Makefile   |   1 +
 arch/arm/dts/sun8i-h3-nanopi-m1.dts | 163 
 board/sunxi/MAINTAINERS |   5 ++
 configs/nanopi_m1_defconfig |  18 
 4 files changed, 187 insertions(+)
 create mode 100644 arch/arm/dts/sun8i-h3-nanopi-m1.dts
 create mode 100644 configs/nanopi_m1_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index ce34e3eeff..a0d9c2724a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -302,6 +302,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
sun8i-h3-orangepi-pc-plus.dtb \
sun8i-h3-orangepi-plus.dtb \
sun8i-h3-orangepi-plus2e.dtb \
+   sun8i-h3-nanopi-m1.dtb \
sun8i-h3-nanopi-neo.dtb \
sun8i-h3-nanopi-neo-air.dtb
 dtb-$(CONFIG_MACH_SUN50I_H5) += \
diff --git a/arch/arm/dts/sun8i-h3-nanopi-m1.dts 
b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
new file mode 100644
index 00..05b533051c
--- /dev/null
+++ b/arch/arm/dts/sun8i-h3-nanopi-m1.dts
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2017 Mylène Josserand 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include 
+#include 
+#include 
+
+/ {
+   model = "FriendlyArm NanoPi M1";
+   compatible = "friendlyarm,nanopi-m1", "allwinner,sun8i-h3";
+
+   aliases {
+   serial0 = &uart0;
+   };
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   };
+
+   leds {
+   compatible = "gpio-leds";
+   pinctrl-names = "default";
+   pinctrl-0 = <&leds_npi>, <&leds_r_npi>;
+
+   status {
+   label = "nanopi:blue:status";
+   gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "heartbeat";
+   };
+
+   pwr {
+   label = "nanopi:green:pwr";
+   gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+   default-state = "on";
+   };
+   };
+
+   r_gpio_keys {
+   compatible = "gpio-keys";
+   input-name = "k1";
+   pinctrl-names = "default";
+   pinctrl-0 = <&sw_r_npi>;
+
+   k1@0 {
+   label = "k1";
+   linux,code = ;
+   gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW

[U-Boot] [PATCH v3 9/9] sunxi: Convert CONS_INDEX to Kconfig

2017-04-02 Thread Mylène Josserand
Convert the CONS_INDEX configuration to Kconfig.
Update sunxi's defconfigs to remove SYS_EXTRA_OPTIONS variable not
needed anymore.
Default value is 1 except for sun5i (equals 2) and sun8i (equals 5).

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/A13-OLinuXinoM_defconfig |  1 -
 configs/A13-OLinuXino_defconfig  |  1 -
 configs/Ampe_A76_defconfig   |  1 -
 configs/CHIP_defconfig   |  1 -
 configs/CHIP_pro_defconfig   |  2 +-
 configs/Empire_electronix_d709_defconfig |  1 -
 configs/Empire_electronix_m712_defconfig |  1 -
 configs/difrnce_dit4350_defconfig|  1 -
 configs/ga10h_v1_1_defconfig |  1 -
 configs/gt90h_v4_defconfig   |  1 -
 configs/iNet_D978_rev2_defconfig |  1 -
 configs/inet86dz_defconfig   |  1 -
 configs/inet98v_rev2_defconfig   |  1 -
 configs/polaroid_mid2407pxe03_defconfig  |  1 -
 configs/polaroid_mid2809pxe04_defconfig  |  1 -
 configs/q8_a13_tablet_defconfig  |  1 -
 configs/q8_a23_tablet_800x480_defconfig  |  1 -
 configs/q8_a33_tablet_1024x600_defconfig |  1 -
 configs/q8_a33_tablet_800x480_defconfig  |  1 -
 configs/sun8i_a23_evb_defconfig  |  1 -
 drivers/serial/Kconfig   | 10 ++
 include/configs/sunxi-common.h   |  4 
 22 files changed, 11 insertions(+), 24 deletions(-)

diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index 264135b271..530a60edbb 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -12,7 +12,6 @@ CONFIG_VIDEO_LCD_POWER="PB10"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 3c4ce1921f..d6062f8cf4 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig
index b7ff53532d..ea19592662 100644
--- a/configs/Ampe_A76_defconfig
+++ b/configs/Ampe_A76_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index 9d567e1e54..be0b0bacad 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -8,7 +8,6 @@ CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 CONFIG_USB0_VBUS_PIN="PB10"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_DFU=y
diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
index df43e5a12d..78fdb0e7d8 100644
--- a/configs/CHIP_pro_defconfig
+++ b/configs/CHIP_pro_defconfig
@@ -7,7 +7,7 @@ CONFIG_MACH_SUN5I=y
 CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 CONFIG_USB0_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-gr8-chip-pro"
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2,SYS_NAND_BLOCK_SIZE=0x4,SYS_NAND_PAGE_SIZE=4096,SYS_NAND_OOBSIZE=256"
+CONFIG_SYS_EXTRA_OPTIONS="SYS_NAND_BLOCK_SIZE=0x4,SYS_NAND_PAGE_SIZE=4096,SYS_NAND_OOBSIZE=256"
 CONFIG_ENV_IS_IN_UBI=y
 CONFIG_ENV_UBI_PART="UBI"
 CONFIG_ENV_UBI_VOLUME="uboot-env"
diff --git a/configs/Empire_electronix_d709_defconfig 
b/configs/Empire_electronix_d709_defconfig
index 93aeaf4047..bf6cd05111 100644
--- a/configs/Empire_electronix_d709_defconfig
+++ b/configs/Empire_electronix_d709_defconfig
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-d709"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Empire_electronix_m712_defconfig 
b/configs/Empire_electronix_m712_defconfig
index 160f8461a2..3111801b21 100644
--- a/configs/Empire_electronix_m712_defconfig
+++ b/configs/Empire_electronix_m712_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VID

[U-Boot] [PATCH v3 7/9] sunxi: Convert CONFIG_SATAPWR to Kconfig

2017-04-02 Thread Mylène Josserand
Convert the CONFIG_SATAPWR into kconfig.
Thanks to that, many SYS_EXTRA_OPTIONS can be removed from some
defconfigs.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 board/sunxi/Kconfig| 7 +++
 board/sunxi/board.c| 7 ---
 configs/A10-OLinuXino-Lime_defconfig   | 2 +-
 configs/A20-OLinuXino-Lime2_defconfig  | 2 +-
 configs/A20-OLinuXino-Lime_defconfig   | 2 +-
 configs/A20-OLinuXino_MICRO_defconfig  | 2 +-
 configs/A20-Olimex-SOM-EVB_defconfig   | 2 +-
 configs/Cubieboard2_defconfig  | 2 +-
 configs/Cubieboard_defconfig   | 2 +-
 configs/Cubietruck_defconfig   | 2 +-
 configs/Itead_Ibox_A20_defconfig   | 2 +-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 2 +-
 configs/Linksprite_pcDuino3_defconfig  | 2 +-
 configs/Sinovoip_BPI_M3_defconfig  | 2 +-
 configs/orangepi_plus_defconfig| 3 ++-
 16 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 3e0e262473..35328b6a93 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -704,6 +704,13 @@ config VIDEO_LCD_TL059WV5C0
 
 endchoice
 
+config SATAPWR
+   string "SATA power pin"
+   default ""
+   help
+ Set the pins used to power the SATA. This takes a string in the
+ format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
+ port H.
 
 config GMAC_TX_DELAY
int "GMAC Transmit Clock Delay Chain"
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index b9660128e5..8043a8dbac 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;
+   __maybe_unused int id_pfr1, ret, satapwr_pin;
 
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
 
@@ -118,8 +118,9 @@ int board_init(void)
return ret;
 
 #ifdef CONFIG_SATAPWR
-   gpio_request(CONFIG_SATAPWR, "satapwr");
-   gpio_direction_output(CONFIG_SATAPWR, 1);
+   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
+   gpio_request(satapwr_pin, "satapwr");
+   gpio_direction_output(satapwr_pin, 1);
 #endif
 #ifdef CONFIG_MACPWR
gpio_request(CONFIG_MACPWR, "macpwr");
diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index d24c357952..405bd3f2a8 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -6,10 +6,10 @@ CONFIG_DRAM_CLK=480
 CONFIG_DRAM_EMR1=4
 CONFIG_SYS_CLK_FREQ=91200
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SATAPWR="PC3"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 375f091149..a9c7566d12 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -6,10 +6,10 @@ CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SATAPWR="PC3"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime_defconfig 
b/configs/A20-OLinuXino-Lime_defconfig
index 8de1c1a635..b53441c748 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -4,10 +4,10 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SATAPWR="PC3"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino_MICRO_defconfig 
b/configs/A20-OLinuXino_MICRO_defconfig
index 3fa869a7ed..c1cd2dd05e 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -7,10 +7,10 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH11"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_VIDEO_VGA=y
+CONFIG_SATAPWR="PB8"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IM

[U-Boot] [PATCH v3 8/9] sunxi: Convert CONFIG_MACPWR to Kconfig

2017-04-02 Thread Mylène Josserand
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 
Acked-by: Maxime Ripard 
---
 board/sunxi/Kconfig   | 7 +++
 board/sunxi/board.c   | 7 ---
 configs/Bananapi_defconfig| 2 +-
 configs/Bananapro_defconfig   | 2 +-
 configs/Lamobo_R1_defconfig   | 2 +-
 configs/Mele_A1000_defconfig  | 2 +-
 configs/Orangepi_defconfig| 2 +-
 configs/Orangepi_mini_defconfig   | 2 +-
 configs/i12-tvbox_defconfig   | 2 +-
 configs/jesurun_q5_defconfig  | 2 +-
 configs/mixtile_loftq_defconfig   | 2 +-
 configs/orangepi_plus2e_defconfig | 2 +-
 configs/orangepi_plus_defconfig   | 2 +-
 13 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 35328b6a93..32b2e3e2c0 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -343,6 +343,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 8043a8dbac..e2bba9abde 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() */
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index d08cffe8e9..99c02a341e 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -3,12 +3,12 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index 42357e31c7..8fab56f91f 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=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
@@ -10,7 +11,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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
index 955be841e7..3c7e0a0eec 100644
--- a/configs/Lamobo_R1_defconfig
+++ b/configs/Lamobo_R1_defconfig
@@ -3,13 +3,13 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index a65198a42c..ee2362dd7b 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -2,12 +2,12 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=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_CMD_IMLS

[U-Boot] [PATCH v3 6/9] sunxi: Convert CONFIG_RGMII to Kconfig

2017-04-02 Thread Mylène Josserand
Convert CONFIG_RGMII to Kconfig. Thanks to that, it is possible to
update defconfig files of SYS_EXTRA_OPTIONS accordingly and
remove it when it is possible.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/A20-OLinuXino-Lime2_defconfig  | 3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   | 3 ++-
 configs/Bananapi_defconfig | 3 ++-
 configs/Bananapro_defconfig| 3 ++-
 configs/Colombus_defconfig | 2 +-
 configs/Cubietruck_defconfig   | 3 ++-
 configs/Hummingbird_A31_defconfig  | 2 +-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
 configs/Orangepi_defconfig | 3 ++-
 configs/Orangepi_mini_defconfig| 3 ++-
 configs/Sinovoip_BPI_M2_defconfig  | 2 +-
 configs/Wits_Pro_A20_DKT_defconfig | 2 +-
 configs/mixtile_loftq_defconfig| 3 ++-
 drivers/net/Kconfig| 6 ++
 15 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 33e552b133..375f091149 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -9,7 +9,7 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -22,6 +22,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_DFU_RAM=y
 CONFIG_RTL8211X_PHY_FORCE_MASTER=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig 
b/configs/A20-Olimex-SOM-EVB_defconfig
index 28c9781480..efd7f716c4 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -12,7 +12,7 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -22,6 +22,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_RTL8211X_PHY_FORCE_MASTER=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 926bb10d95..d08cffe8e9 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -8,7 +8,7 @@ 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="RGMII,MACPWR=SUNXI_GPH(23)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -18,5 +18,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index f8f7b458fa..42357e31c7 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -10,7 +10,7 @@ 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="RGMII,MACPWR=SUNXI_GPH(23)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -20,6 +20,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NETCONSOLE=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO4_VOLT=2500
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 1e7d4982c0..1359281ff4 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_PANEL_I2C_SCL="PA24"
 CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804=y
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-colombus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -25,6 +24,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index c06f1c90df..9c401025c6 100644
--- a/

[U-Boot] [PATCH v3 1/9] sunxi: Move SUNXI_GMAC to Kconfig

2017-04-02 Thread Mylène Josserand
Move the SUNXI_GMAC config option to Kconfig, remove it
from SYS_EXTRA_OPTIONS and rename it into SUN7I_GMAC.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/A20-OLinuXino-Lime2_defconfig  | 3 ++-
 configs/A20-OLinuXino-Lime_defconfig   | 3 ++-
 configs/A20-OLinuXino_MICRO_defconfig  | 3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   | 3 ++-
 configs/Bananapi_defconfig | 3 ++-
 configs/Bananapro_defconfig| 3 ++-
 configs/CSQ_CS908_defconfig| 2 +-
 configs/Colombus_defconfig | 3 ++-
 configs/Cubieboard2_defconfig  | 3 ++-
 configs/Cubietruck_defconfig   | 3 ++-
 configs/Hummingbird_A31_defconfig  | 3 ++-
 configs/Itead_Ibox_A20_defconfig   | 3 ++-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
 configs/Linksprite_pcDuino3_defconfig  | 3 ++-
 configs/Mele_A1000G_quad_defconfig | 2 +-
 configs/Mele_I7_defconfig  | 2 +-
 configs/Mele_M3_defconfig  | 2 +-
 configs/Mele_M5_defconfig  | 2 +-
 configs/Mele_M9_defconfig  | 2 +-
 configs/Orangepi_defconfig | 3 ++-
 configs/Orangepi_mini_defconfig| 3 ++-
 configs/Sinlinx_SinA31s_defconfig  | 2 +-
 configs/Sinovoip_BPI_M2_defconfig  | 3 ++-
 configs/Wits_Pro_A20_DKT_defconfig | 3 ++-
 configs/i12-tvbox_defconfig| 3 ++-
 configs/icnova-a20-swac_defconfig  | 3 ++-
 configs/mixtile_loftq_defconfig| 3 ++-
 drivers/net/Kconfig| 5 +
 29 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 0d38f65c50..33e552b133 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -9,7 +9,7 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -22,6 +22,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_DFU_RAM=y
 CONFIG_RTL8211X_PHY_FORCE_MASTER=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-OLinuXino-Lime_defconfig 
b/configs/A20-OLinuXino-Lime_defconfig
index dea2e6b6f2..8de1c1a635 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -7,7 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -16,6 +16,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig 
b/configs/A20-OLinuXino_MICRO_defconfig
index 703aee13c3..3fa869a7ed 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -10,7 +10,7 @@ CONFIG_VIDEO_VGA=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -19,6 +19,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig 
b/configs/A20-Olimex-SOM-EVB_defconfig
index fbc4fe0e52..28c9781480 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -12,7 +12,7 @@ CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -22,6 +22,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_RTL8211X_PHY_FORCE_MASTER=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_AL

[U-Boot] [PATCH v3 5/9] sunxi: Convert SUNXI_EMAC to Kconfig

2017-04-02 Thread Mylène Josserand
Convert the SUNXI_EMAC config to Kconfig. Remove it from SYS_EXTRA_OPTIONS
from many sunxi defconfig and renamed it into SUN4I_EMAC to not confuse it
with SUN8I_EMAC.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/A10-OLinuXino-Lime_defconfig | 3 ++-
 configs/A10s-OLinuXino-M_defconfig   | 2 +-
 configs/Cubieboard_defconfig | 3 ++-
 configs/Linksprite_pcDuino_defconfig | 2 +-
 configs/Marsboard_A10_defconfig  | 2 +-
 configs/Mele_A1000_defconfig | 3 ++-
 configs/ba10_tv_box_defconfig| 2 +-
 configs/jesurun_q5_defconfig | 3 ++-
 drivers/net/Kconfig  | 6 ++
 9 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index 9368c6d4b7..d24c357952 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -9,7 +9,7 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -17,6 +17,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A10s-OLinuXino-M_defconfig 
b/configs/A10s-OLinuXino-M_defconfig
index 6adb5bc9a4..f04fd5696d 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -9,7 +9,6 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -17,5 +16,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 0389d4c3c7..fadf201478 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -7,7 +7,7 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -15,4 +15,5 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino_defconfig 
b/configs/Linksprite_pcDuino_defconfig
index 8b310fa5c2..93f5b6e7e9 100644
--- a/configs/Linksprite_pcDuino_defconfig
+++ b/configs/Linksprite_pcDuino_defconfig
@@ -6,7 +6,6 @@ CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pcduino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -14,4 +13,5 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Marsboard_A10_defconfig b/configs/Marsboard_A10_defconfig
index 34e78f1e8c..6b8bd1ad20 100644
--- a/configs/Marsboard_A10_defconfig
+++ b/configs/Marsboard_A10_defconfig
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-marsboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -12,5 +11,6 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index 5047ba4b21..a65198a42c 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -7,7 +7,7 @@ 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="SUNXI_EMAC,MACPWR=SUNXI_GPH(15)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(15)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
@@ -15,4 +15

[U-Boot] [PATCH v3 3/9] sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from

2017-04-02 Thread Mylène Josserand
This configuration is not necessary in a defconfig file so
it is removed from the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/icnova-a20-swac_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index 4c9e4afd25..38636ddda8 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -13,7 +13,6 @@ CONFIG_VIDEO_LCD_POWER="PH22"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CMD_BMP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_UNZIP=y
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 2/9] sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER

2017-04-02 Thread Mylène Josserand
Remove the AXP209_POWER option from SYS_EXTRA_OPTIONS.
As this configuration already exists on Kconfig, we just need
to remove it from defconfig.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/icnova-a20-swac_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index e2fb111d0c..4c9e4afd25 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -13,7 +13,7 @@ CONFIG_VIDEO_LCD_POWER="PH22"
 CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,CMD_BMP"
+CONFIG_SYS_EXTRA_OPTIONS="CMD_BMP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_UNZIP=y
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 4/9] sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS

2017-04-02 Thread Mylène Josserand
The USB_EHCI configuration is already set in this defconfig
using kconfig's config. This configuration in SYS_EXTRA_OPTIONS
must be removed and so the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/mk802_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/mk802_defconfig b/configs/mk802_defconfig
index 0bd957b2d5..da9728ae9e 100644
--- a/configs/mk802_defconfig
+++ b/configs/mk802_defconfig
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y
 CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 0/9] sunxi: Remove SYS_EXTRA_OPTIONS

2017-04-02 Thread Mylène Josserand
Hello everyone,

This a V3 for my patchset that removes the SYS_EXTRA_OPTIONS from all
sunxi defconfigs.
The values in this variable are converted to Kconfig or simply removed.

Based on u-boot sunxi repository: git://git.denx.de/u-boot-sunxi.git
"master" branch, from last commit: 6f72a951cdd07e3f9d214b189762b978cd2acf45

* Changes since V2 *

- Patch 01: Rebased on master branch, add "Allwinner" in config
description.
- Patch 02-03: Rebased on master branch
- Patch 04: Removed this patch as CMD_UNZIP has been removed with
commit e9d33e7326 ('cmd: move CONFIG_CMD_UNZIP and CONFIG_CMD_ZIP to Kconfig')
- Patch 05-06-07-08: Rebased on master branch
- Patch 09: Move the CONS_INDEX definition in drivers/serial and convert CHIP 
pro
and A23 EVB defconfigs.

* Summary of patches *

Patch 1: Convert SUNXI_GMAC config to Kconfig and remove it from
all defconfig.
Patch 2: Remove AXP209_POWER configuration as this config is already
converted in Kconfig (drivers/power). It is automatically chosen when
the SoC is sun4i, sun5i or sun7i.
Patch 3: Remove CMD_BMP configs from SYS_EXTRA_OPTIONS.
Patch 4: Remove SYS_EXTRA_OPTIONS from mk802_defconfig as it contains
only USB_EHCI which is already converted to Kconfig.
Patch 5, 6: Convert SUNXI_EMAC and CONFIG_RGMII to Kconfig and remove it
from all SYS_EXTRA_OPTIONS entries.
Patch 7 and 8: Convert CONFIG_SATAPWR and CONFIG_MACPWR to Kconfig. It becomes
a string instead of the gpio number so the function sunxi_name_to_gpio
is used to do the conversion from string to int.
Patch 9: Convert console index (CONS_INDEX) to Kconfig. The default value is 1
except for sun5i which is 2 and sun8i which is 5.

Thank you in advance!
Best regards,
Mylène


Mylène Josserand (9):
  sunxi: Move SUNXI_GMAC to Kconfig
  sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER
  sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from
  sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS
  sunxi: Convert SUNXI_EMAC to Kconfig
  sunxi: Convert CONFIG_RGMII to Kconfig
  sunxi: Convert CONFIG_SATAPWR to Kconfig
  sunxi: Convert CONFIG_MACPWR to Kconfig
  sunxi: Convert CONS_INDEX to Kconfig

 board/sunxi/Kconfig| 14 ++
 board/sunxi/board.c| 12 +++-
 configs/A10-OLinuXino-Lime_defconfig   |  3 ++-
 configs/A10s-OLinuXino-M_defconfig |  2 +-
 configs/A13-OLinuXinoM_defconfig   |  1 -
 configs/A13-OLinuXino_defconfig|  1 -
 configs/A20-OLinuXino-Lime2_defconfig  |  4 +++-
 configs/A20-OLinuXino-Lime_defconfig   |  3 ++-
 configs/A20-OLinuXino_MICRO_defconfig  |  3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   |  4 +++-
 configs/Ampe_A76_defconfig |  1 -
 configs/Bananapi_defconfig |  4 +++-
 configs/Bananapro_defconfig|  4 +++-
 configs/CHIP_defconfig |  1 -
 configs/CHIP_pro_defconfig |  2 +-
 configs/CSQ_CS908_defconfig|  2 +-
 configs/Colombus_defconfig |  3 ++-
 configs/Cubieboard2_defconfig  |  3 ++-
 configs/Cubieboard_defconfig   |  3 ++-
 configs/Cubietruck_defconfig   |  4 +++-
 configs/Empire_electronix_d709_defconfig   |  1 -
 configs/Empire_electronix_m712_defconfig   |  1 -
 configs/Hummingbird_A31_defconfig  |  3 ++-
 configs/Itead_Ibox_A20_defconfig   |  3 ++-
 configs/Lamobo_R1_defconfig|  5 -
 configs/Linksprite_pcDuino3_Nano_defconfig |  4 +++-
 configs/Linksprite_pcDuino3_defconfig  |  3 ++-
 configs/Linksprite_pcDuino_defconfig   |  2 +-
 configs/Marsboard_A10_defconfig|  2 +-
 configs/Mele_A1000G_quad_defconfig |  2 +-
 configs/Mele_A1000_defconfig   |  3 ++-
 configs/Mele_I7_defconfig  |  2 +-
 configs/Mele_M3_defconfig  |  2 +-
 configs/Mele_M5_defconfig  |  2 +-
 configs/Mele_M9_defconfig  |  2 +-
 configs/Orangepi_defconfig |  4 +++-
 configs/Orangepi_mini_defconfig|  4 +++-
 configs/Sinlinx_SinA31s_defconfig  |  2 +-
 configs/Sinovoip_BPI_M2_defconfig  |  3 ++-
 configs/Sinovoip_BPI_M3_defconfig  |  2 +-
 configs/Wits_Pro_A20_DKT_defconfig |  3 ++-
 configs/ba10_tv_box_defconfig  |  2 +-
 configs/difrnce_dit4350_defconfig  |  1 -
 configs/ga10h_v1_1_defconfig   |  1 -
 configs/gt90h_v4_defconfig |  1 -
 configs/i12-tvbox_defconfig|  3 ++-
 configs/iNet_D978_rev2_defconfig   |  1 -
 configs/icnova-a20-swac_defconfig  |  2 +-
 configs/inet86dz_defconfig |  1 -
 configs/inet98v_rev2_defconfig |  1 -
 configs/jesurun_q5_defconfig   |  3 ++-
 configs/mixtile_loftq_defconfig|  4 +++-
 configs/mk802_defconfig|  1 -
 configs/orangepi_plus2e_defco

[U-Boot] [PATCH v2 06/10] sunxi: Convert SUNXI_EMAC to Kconfig

2017-03-29 Thread Mylène Josserand
Convert the SUNXI_EMAC config to Kconfig. Remove it from SYS_EXTRA_OPTIONS
from many sunxi defconfig and renamed it into SUN4I_EMAC to not confuse it
with SUN8I_EMAC.

Signed-off-by: Mylène Josserand 
---
 configs/A10-OLinuXino-Lime_defconfig | 3 ++-
 configs/A10s-OLinuXino-M_defconfig   | 2 +-
 configs/Cubieboard_defconfig | 3 ++-
 configs/Linksprite_pcDuino_defconfig | 2 +-
 configs/Marsboard_A10_defconfig  | 2 +-
 configs/Mele_A1000_defconfig | 3 ++-
 configs/ba10_tv_box_defconfig| 2 +-
 configs/jesurun_q5_defconfig | 3 ++-
 drivers/net/Kconfig  | 6 ++
 9 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index 50436a7a52..bc7220b78e 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -9,11 +9,12 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A10s-OLinuXino-M_defconfig 
b/configs/A10s-OLinuXino-M_defconfig
index e2bebf827c..11009a1566 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -9,10 +9,10 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 64aebed2f1..d55d0232b2 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -7,9 +7,10 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino_defconfig 
b/configs/Linksprite_pcDuino_defconfig
index ab094a6553..640a310159 100644
--- a/configs/Linksprite_pcDuino_defconfig
+++ b/configs/Linksprite_pcDuino_defconfig
@@ -6,9 +6,9 @@ CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pcduino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Marsboard_A10_defconfig b/configs/Marsboard_A10_defconfig
index 0d381ff1b8..bdf257a444 100644
--- a/configs/Marsboard_A10_defconfig
+++ b/configs/Marsboard_A10_defconfig
@@ -4,10 +4,10 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-marsboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index 820d5ed98e..bd10e535db 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -7,9 +7,10 @@ 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="SUNXI_EMAC,MACPWR=SUNXI_GPH(15)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(15)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index c60766ce3c..02f4f4f085 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -9,10 +9,10 @@ CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-ba10-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUN4I_EMAC=y
 CONFIG_US

[U-Boot] [PATCH v2 10/10] sunxi: Convert CONS_INDEX to Kconfig

2017-03-29 Thread Mylène Josserand
Convert the CONS_INDEX configuration to Kconfig.
Update sunxi's defconfigs to remove SYS_EXTRA_OPTIONS variable not
needed anymore.
Default value is 1 except for sun5i (equals 2) and sun8i (equals 5).

Signed-off-by: Mylène Josserand 
---
 board/sunxi/Kconfig  | 9 +
 configs/A13-OLinuXinoM_defconfig | 1 -
 configs/A13-OLinuXino_defconfig  | 1 -
 configs/Ampe_A76_defconfig   | 1 -
 configs/CHIP_defconfig   | 1 -
 configs/Empire_electronix_d709_defconfig | 1 -
 configs/Empire_electronix_m712_defconfig | 1 -
 configs/difrnce_dit4350_defconfig| 1 -
 configs/ga10h_v1_1_defconfig | 1 -
 configs/gt90h_v4_defconfig   | 1 -
 configs/iNet_D978_rev2_defconfig | 1 -
 configs/inet86dz_defconfig   | 1 -
 configs/inet98v_rev2_defconfig   | 1 -
 configs/polaroid_mid2407pxe03_defconfig  | 1 -
 configs/polaroid_mid2809pxe04_defconfig  | 1 -
 configs/q8_a13_tablet_defconfig  | 1 -
 configs/q8_a23_tablet_800x480_defconfig  | 1 -
 configs/q8_a33_tablet_1024x600_defconfig | 1 -
 configs/q8_a33_tablet_800x480_defconfig  | 1 -
 include/configs/sunxi-common.h   | 4 
 20 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 9963b6b5d8..706c62d233 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -157,6 +157,15 @@ config ARM_BOOT_HOOK_RMR
This allows both the SPL and the U-Boot proper to be entered in
either mode and switch to AArch64 if needed.
 
+config CONS_INDEX
+   int "UART used for console"
+   default 2 if MACH_SUN5I
+   default 5 if MACH_SUN8I
+   default 1
+   help
+ Configures the console index for Allwinner SoC. 2 for SUN5I, 5 for 
SUN8I
+ and 1 otherwise.
+
 config DRAM_TYPE
int "sunxi dram type"
depends on MACH_SUN8I_A83T
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index 361d90a701..1dbd671d01 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -12,7 +12,6 @@ CONFIG_VIDEO_LCD_POWER="PB10"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 3191098bf1..6aec11d594 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig
index 5020724aa8..59a66c1b9d 100644
--- a/configs/Ampe_A76_defconfig
+++ b/configs/Ampe_A76_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index 65d0c9847a..080f4718b2 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -8,7 +8,6 @@ CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 CONFIG_USB0_VBUS_PIN="PB10"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_DFU=y
diff --git a/configs/Empire_electronix_d709_defconfig 
b/configs/Empire_electronix_d709_defconfig
index 831949a08b..756636d41e 100644
--- a/configs/Empire_electronix_d709_defconfig
+++ b/configs/Empire_electronix_d709_defconfig
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-d709"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Empire_electronix_m712_defconfig 
b/configs/Empire_electronix_m712_defconfig
index 4b51380fc0..22d43785be 100644
--- a/configs/Empire_electronix_m712_defconfig
+++ b/configs/Empire_electronix_m712_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-m712"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CON

[U-Boot] [PATCH v2 03/10] sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from SYS_EXTRA_OPTIONS

2017-03-29 Thread Mylène Josserand
This configuration is not necessary in a defconfig file so
it is removed from the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/icnova-a20-swac_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index 37ef55f760..b20fc80cda 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -14,7 +14,7 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CMD_BMP,CMD_UNZIP"
+CONFIG_SYS_EXTRA_OPTIONS="CMD_UNZIP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 08/10] sunxi: Convert CONFIG_SATAPWR to Kconfig

2017-03-29 Thread Mylène Josserand
Convert the CONFIG_SATAPWR into kconfig.
Thanks to that, many SYS_EXTRA_OPTIONS can be removed from some
defconfigs.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 board/sunxi/Kconfig| 7 +++
 board/sunxi/board.c| 7 ---
 configs/A10-OLinuXino-Lime_defconfig   | 2 +-
 configs/A20-OLinuXino-Lime2_defconfig  | 2 +-
 configs/A20-OLinuXino-Lime_defconfig   | 2 +-
 configs/A20-OLinuXino_MICRO_defconfig  | 2 +-
 configs/A20-Olimex-SOM-EVB_defconfig   | 2 +-
 configs/Cubieboard2_defconfig  | 2 +-
 configs/Cubieboard_defconfig   | 2 +-
 configs/Cubietruck_defconfig   | 2 +-
 configs/Itead_Ibox_A20_defconfig   | 2 +-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 2 +-
 configs/Linksprite_pcDuino3_defconfig  | 2 +-
 configs/Sinovoip_BPI_M3_defconfig  | 2 +-
 configs/orangepi_plus_defconfig| 3 ++-
 16 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 00011331b9..6de59d36c7 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -683,6 +683,13 @@ config VIDEO_LCD_TL059WV5C0
 
 endchoice
 
+config SATAPWR
+   string "SATA power pin"
+   default ""
+   help
+ Set the pins used to power the SATA. This takes a string in the
+ format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
+ port H.
 
 config GMAC_TX_DELAY
int "GMAC Transmit Clock Delay Chain"
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 53656383d5..131986bd17 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;
+   __maybe_unused int id_pfr1, ret, satapwr_pin;
 
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
 
@@ -118,8 +118,9 @@ int board_init(void)
return ret;
 
 #ifdef CONFIG_SATAPWR
-   gpio_request(CONFIG_SATAPWR, "satapwr");
-   gpio_direction_output(CONFIG_SATAPWR, 1);
+   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
+   gpio_request(satapwr_pin, "satapwr");
+   gpio_direction_output(satapwr_pin, 1);
 #endif
 #ifdef CONFIG_MACPWR
gpio_request(CONFIG_MACPWR, "macpwr");
diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index bc7220b78e..1e7f34b89c 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -6,10 +6,10 @@ CONFIG_DRAM_CLK=480
 CONFIG_DRAM_EMR1=4
 CONFIG_SYS_CLK_FREQ=91200
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SATAPWR="PC3"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index e698fefb87..e171dd6194 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -7,11 +7,11 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_RGMII=y
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SATAPWR="PC3"
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime_defconfig 
b/configs/A20-OLinuXino-Lime_defconfig
index 9315efc884..6b675fd196 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -4,11 +4,11 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SATAPWR="PC3"
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino_MICRO_defconfig 
b/configs/A20-OLinuXino_MICRO_defconfig
index a1787f9438..e1d7b53bcb 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -7,11 +7,11 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH11"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_VIDEO_VGA=y
+CONFIG_SATAPWR="PB8"
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="

[U-Boot] [PATCH v2 09/10] sunxi: Convert CONFIG_MACPWR to Kconfig

2017-03-29 Thread Mylène Josserand
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 
Acked-by: Maxime Ripard 
---
 board/sunxi/Kconfig   | 7 +++
 board/sunxi/board.c   | 7 ---
 configs/Bananapi_defconfig| 2 +-
 configs/Bananapro_defconfig   | 2 +-
 configs/Lamobo_R1_defconfig   | 2 +-
 configs/Mele_A1000_defconfig  | 2 +-
 configs/Orangepi_defconfig| 2 +-
 configs/Orangepi_mini_defconfig   | 2 +-
 configs/i12-tvbox_defconfig   | 2 +-
 configs/jesurun_q5_defconfig  | 2 +-
 configs/mixtile_loftq_defconfig   | 2 +-
 configs/orangepi_plus2e_defconfig | 2 +-
 configs/orangepi_plus_defconfig   | 2 +-
 13 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 6de59d36c7..9963b6b5d8 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -318,6 +318,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 MMC
depends on !UART0_PORT_F
default y if ARCH_SUNXI
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 131986bd17..906a06d0d9 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() */
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 3b5678419a..4b7c7e4d20 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_RGMII=y
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_SUN7I_GMAC=y
@@ -10,7 +11,6 @@ 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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index cbdb980fc9..7736de9216 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_RGMII=y
 CONFIG_USB1_VBUS_PIN="PH0"
 CONFIG_USB2_VBUS_PIN="PH1"
@@ -12,7 +13,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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
index 6f3f08cb43..c3f4bdd85c 100644
--- a/configs/Lamobo_R1_defconfig
+++ b/configs/Lamobo_R1_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_MMC0_CD_PIN="PH10"
 CONFIG_RGMII=y
 CONFIG_SATAPWR="PB3"
@@ -11,7 +12,6 @@ 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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index bd10e535db..9532d75710 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -2,12 +2,12 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=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_CMD_IMLS is not set
 # 

[U-Boot] [PATCH v2 05/10] sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS

2017-03-29 Thread Mylène Josserand
The USB_EHCI configuration is already set in this defconfig
using kconfig's config. This configuration in SYS_EXTRA_OPTIONS
must be removed and so the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/mk802_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/mk802_defconfig b/configs/mk802_defconfig
index 47bbf62274..2f63320fb9 100644
--- a/configs/mk802_defconfig
+++ b/configs/mk802_defconfig
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y
 CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 02/10] sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER

2017-03-29 Thread Mylène Josserand
Remove the AXP209_POWER option from SYS_EXTRA_OPTIONS.
As this configuration already exists on Kconfig, we just need
to remove it from defconfig.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/icnova-a20-swac_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index 7ae4ccc01b..37ef55f760 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -14,7 +14,7 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,CMD_BMP,CMD_UNZIP"
+CONFIG_SYS_EXTRA_OPTIONS="CMD_BMP,CMD_UNZIP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 07/10] sunxi: Convert CONFIG_RGMII to Kconfig

2017-03-29 Thread Mylène Josserand
Convert CONFIG_RGMII to Kconfig. Thanks to that, it is possible to
update defconfig files of SYS_EXTRA_OPTIONS accordingly and
remove it when it is possible.

Signed-off-by: Mylène Josserand 
---
 configs/A20-OLinuXino-Lime2_defconfig  | 3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   | 3 ++-
 configs/Bananapi_defconfig | 3 ++-
 configs/Bananapro_defconfig| 3 ++-
 configs/Colombus_defconfig | 2 +-
 configs/Cubietruck_defconfig   | 3 ++-
 configs/Hummingbird_A31_defconfig  | 2 +-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
 configs/Orangepi_defconfig | 3 ++-
 configs/Orangepi_mini_defconfig| 3 ++-
 configs/Sinovoip_BPI_M2_defconfig  | 2 +-
 configs/Wits_Pro_A20_DKT_defconfig | 2 +-
 configs/mixtile_loftq_defconfig| 3 ++-
 drivers/net/Kconfig| 6 ++
 15 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 97df8596bc..e698fefb87 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -4,13 +4,14 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_RGMII=y
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig 
b/configs/A20-Olimex-SOM-EVB_defconfig
index 14ec877e73..c361798623 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -7,13 +7,14 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH0"
 CONFIG_MMC3_PINS="PH"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
+CONFIG_RGMII=y
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index eb47c4e848..3b5678419a 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -3,13 +3,14 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_RGMII=y
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_SUN7I_GMAC=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="RGMII,MACPWR=SUNXI_GPH(23)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index ba9ee61a00..cbdb980fc9 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_RGMII=y
 CONFIG_USB1_VBUS_PIN="PH0"
 CONFIG_USB2_VBUS_PIN="PH1"
 CONFIG_VIDEO_COMPOSITE=y
@@ -11,7 +12,7 @@ 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="RGMII,MACPWR=SUNXI_GPH(23)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 8a8c117719..4aaae91b6d 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_CLK=240
 CONFIG_DRAM_ZQ=251
+CONFIG_RGMII=y
 CONFIG_USB1_VBUS_PIN=""
 CONFIG_I2C0_ENABLE=y
 CONFIG_AXP_GPIO=y
@@ -17,7 +18,6 @@ CONFIG_VIDEO_LCD_PANEL_EDP_4_LANE_1620M_VIA_ANX9804=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-colombus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index f0c490c0f6..c6f7ae64d5 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -4,6 +4,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CON

[U-Boot] [PATCH v2 01/10] sunxi: Convert SUNXI_GMAC to Kconfig

2017-03-29 Thread Mylène Josserand
Move the SUNXI_GMAC config option to Kconfig, remove it
from SYS_EXTRA_OPTIONS and rename it into SUN7I_GMAC.

Signed-off-by: Mylène Josserand 
---
 configs/A20-OLinuXino-Lime2_defconfig  | 3 ++-
 configs/A20-OLinuXino-Lime_defconfig   | 3 ++-
 configs/A20-OLinuXino_MICRO_defconfig  | 3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   | 3 ++-
 configs/Bananapi_defconfig | 3 ++-
 configs/Bananapro_defconfig| 3 ++-
 configs/CSQ_CS908_defconfig| 2 +-
 configs/Colombus_defconfig | 3 ++-
 configs/Cubieboard2_defconfig  | 3 ++-
 configs/Cubietruck_defconfig   | 3 ++-
 configs/Hummingbird_A31_defconfig  | 3 ++-
 configs/Itead_Ibox_A20_defconfig   | 3 ++-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
 configs/Linksprite_pcDuino3_defconfig  | 3 ++-
 configs/Mele_A1000G_quad_defconfig | 2 +-
 configs/Mele_I7_defconfig  | 2 +-
 configs/Mele_M3_defconfig  | 2 +-
 configs/Mele_M5_defconfig  | 2 +-
 configs/Mele_M9_defconfig  | 2 +-
 configs/Orangepi_defconfig | 3 ++-
 configs/Orangepi_mini_defconfig| 3 ++-
 configs/Sinlinx_SinA31s_defconfig  | 2 +-
 configs/Sinovoip_BPI_M2_defconfig  | 3 ++-
 configs/Wits_Pro_A20_DKT_defconfig | 3 ++-
 configs/i12-tvbox_defconfig| 3 ++-
 configs/icnova-a20-swac_defconfig  | 3 ++-
 configs/mixtile_loftq_defconfig| 3 ++-
 drivers/net/Kconfig| 5 +
 29 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 8fd7c64e77..97df8596bc 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -6,10 +6,11 @@ CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime_defconfig 
b/configs/A20-OLinuXino-Lime_defconfig
index 26e6ace103..9315efc884 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -4,10 +4,11 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino_MICRO_defconfig 
b/configs/A20-OLinuXino_MICRO_defconfig
index d629eb1b36..a1787f9438 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -7,10 +7,11 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH11"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_VIDEO_VGA=y
+CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig 
b/configs/A20-Olimex-SOM-EVB_defconfig
index b5d52dba24..14ec877e73 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -9,10 +9,11 @@ CONFIG_MMC3_PINS="PH"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 0f2ef1b7ed..eb47c4e848 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -4,11 +4,12 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
 CONFIG_VIDEO_COMPOSITE=y
+CONFIG_SUN7I_GMAC=y
 CONFIG_GMAC_TX_DELAY=3
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT

[U-Boot] [PATCH v2 04/10] sunxi: icnova-a20-swac_defconfig: Remove CMD_UNZIP and SYS_EXTRA_OPTIONS

2017-03-29 Thread Mylène Josserand
Remove this command as it is not necessary in defconfig file.
As there is no more command/option in SYS_EXTRA_OPTIONS, it
can be removed from this defconfig file.

Signed-off-by: Mylène Josserand 
Acked-by: Maxime Ripard 
---
 configs/icnova-a20-swac_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index b20fc80cda..d164b17eec 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CMD_UNZIP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 00/10] sunxi: Remove SYS_EXTRA_OPTIONS

2017-03-29 Thread Mylène Josserand
Hello everyone,

This a V2 for my patchset that removes the SYS_EXTRA_OPTIONS from all
sunxi defconfigs.
The values in this variable are converted to Kconfig or simply removed.

Based on u-boot sunxi repository: git://git.denx.de/u-boot-sunxi.git
next branch, from last commit: 002d907da51fdf10a03d389852645675529c78e6

* Changes since V1 *

- Patch 01: Rename the config optino to SUN7I_GMAC and move
it in driver/net/Kconfig. Remove also the "default n" line
in the KConfig.
- Patch 02-03-04-05 : No modifications
- Patch 06: Rename the config SUNXI_EMAC to SUN4I_EMAC
- Patch 07: Move it to driver/net's Kconfig and remove "default n"
line.
- Patch 08-09: No modifications except the use of "help" instead of
"---help---" option in Kconfig.
- Patch 10: Remove the CONS_INDEX definition from sunxi-common header.

* Summary of patches *

Patch 1: Convert SUNXI_GMAC config to Kconfig and remove it from
all defconfig.
Patch 2: Remove AXP209_POWER configuration as this config is already
converted in Kconfig (drivers/power). It is automatically chosen when
the SoC is sun4i, sun5i or sun7i.
Patch 3 and 4: Remove CMD_BMP and CMD_ZIP configs from SYS_EXTRA_OPTIONS.
Patch 5: Remove SYS_EXTRA_OPTIONS from mk802_defconfig as it contains
only USB_EHCI which is already converted to Kconfig.
Patch 6, 7: Convert SUNXI_EMAC and CONFIG_RGMII to Kconfig and remove it
from all SYS_EXTRA_OPTIONS entries.
Patch 8 and 9: Convert CONFIG_SATAPWR and CONFIG_MACPWR to Kconfig. It becomes
a string instead of the gpio number so the function sunxi_name_to_gpio
is used to do the conversion from string to int.
Patch 10: Convert console index (CONS_INDEX) to Kconfig. The default value is 1
except for sun5i which is 2 and sun8i which is 5.

Thank you in advance!
Best regards,
Mylène

Mylène Josserand (10):
  sunxi: Convert SUNXI_GMAC to Kconfig
  sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER
  sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from
SYS_EXTRA_OPTIONS
  sunxi: icnova-a20-swac_defconfig: Remove CMD_UNZIP and
SYS_EXTRA_OPTIONS
  sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS
  sunxi: Convert SUNXI_EMAC to Kconfig
  sunxi: Convert CONFIG_RGMII to Kconfig
  sunxi: Convert CONFIG_SATAPWR to Kconfig
  sunxi: Convert CONFIG_MACPWR to Kconfig
  sunxi: Convert CONS_INDEX to Kconfig

 board/sunxi/Kconfig| 23 +++
 board/sunxi/board.c| 12 +++-
 configs/A10-OLinuXino-Lime_defconfig   |  3 ++-
 configs/A10s-OLinuXino-M_defconfig |  2 +-
 configs/A13-OLinuXinoM_defconfig   |  1 -
 configs/A13-OLinuXino_defconfig|  1 -
 configs/A20-OLinuXino-Lime2_defconfig  |  4 +++-
 configs/A20-OLinuXino-Lime_defconfig   |  3 ++-
 configs/A20-OLinuXino_MICRO_defconfig  |  3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   |  4 +++-
 configs/Ampe_A76_defconfig |  1 -
 configs/Bananapi_defconfig |  4 +++-
 configs/Bananapro_defconfig|  4 +++-
 configs/CHIP_defconfig |  1 -
 configs/CSQ_CS908_defconfig|  2 +-
 configs/Colombus_defconfig |  3 ++-
 configs/Cubieboard2_defconfig  |  3 ++-
 configs/Cubieboard_defconfig   |  3 ++-
 configs/Cubietruck_defconfig   |  4 +++-
 configs/Empire_electronix_d709_defconfig   |  1 -
 configs/Empire_electronix_m712_defconfig   |  1 -
 configs/Hummingbird_A31_defconfig  |  3 ++-
 configs/Itead_Ibox_A20_defconfig   |  3 ++-
 configs/Lamobo_R1_defconfig|  5 -
 configs/Linksprite_pcDuino3_Nano_defconfig |  4 +++-
 configs/Linksprite_pcDuino3_defconfig  |  3 ++-
 configs/Linksprite_pcDuino_defconfig   |  2 +-
 configs/Marsboard_A10_defconfig|  2 +-
 configs/Mele_A1000G_quad_defconfig |  2 +-
 configs/Mele_A1000_defconfig   |  3 ++-
 configs/Mele_I7_defconfig  |  2 +-
 configs/Mele_M3_defconfig  |  2 +-
 configs/Mele_M5_defconfig  |  2 +-
 configs/Mele_M9_defconfig  |  2 +-
 configs/Orangepi_defconfig |  4 +++-
 configs/Orangepi_mini_defconfig|  4 +++-
 configs/Sinlinx_SinA31s_defconfig  |  2 +-
 configs/Sinovoip_BPI_M2_defconfig  |  3 ++-
 configs/Sinovoip_BPI_M3_defconfig  |  2 +-
 configs/Wits_Pro_A20_DKT_defconfig |  3 ++-
 configs/ba10_tv_box_defconfig  |  2 +-
 configs/difrnce_dit4350_defconfig  |  1 -
 configs/ga10h_v1_1_defconfig   |  1 -
 configs/gt90h_v4_defconfig |  1 -
 configs/i12-tvbox_defconfig|  3 ++-
 configs/iNet_D978_rev2_defconfig   |  1 -
 configs/icnova-a20-swac_defconfig  |  2 +-
 configs/inet86dz_defconfig |  1 -
 configs/inet98v_rev2_defconfig |  1 -
 configs/jesurun_q5_defconfig   

[U-Boot] [PATCH 10/10] sunxi: Convert CONS_INDEX to Kconfig

2017-02-23 Thread Mylène Josserand
Convert the CONS_INDEX configuration to Kconfig.
Update sunxi's defconfigs to remove SYS_EXTRA_OPTIONS variable not
needed anymore.
Default value is 1 except for sun5i (equals 2) and sun8i (equals 5).

Signed-off-by: Mylène Josserand 
---
 board/sunxi/Kconfig  | 9 +
 configs/A13-OLinuXinoM_defconfig | 1 -
 configs/A13-OLinuXino_defconfig  | 1 -
 configs/Ampe_A76_defconfig   | 1 -
 configs/CHIP_defconfig   | 1 -
 configs/Empire_electronix_d709_defconfig | 1 -
 configs/Empire_electronix_m712_defconfig | 1 -
 configs/difrnce_dit4350_defconfig| 1 -
 configs/ga10h_v1_1_defconfig | 1 -
 configs/gt90h_v4_defconfig   | 1 -
 configs/iNet_D978_rev2_defconfig | 1 -
 configs/inet86dz_defconfig   | 1 -
 configs/inet98v_rev2_defconfig   | 1 -
 configs/polaroid_mid2407pxe03_defconfig  | 1 -
 configs/polaroid_mid2809pxe04_defconfig  | 1 -
 configs/q8_a13_tablet_defconfig  | 1 -
 configs/q8_a23_tablet_800x480_defconfig  | 1 -
 configs/q8_a33_tablet_1024x600_defconfig | 1 -
 configs/q8_a33_tablet_800x480_defconfig  | 1 -
 19 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 492bf14ae1..6a70ee26b3 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -157,6 +157,15 @@ config ARM_BOOT_HOOK_RMR
This allows both the SPL and the U-Boot proper to be entered in
either mode and switch to AArch64 if needed.
 
+config CONS_INDEX
+   int "UART used for console"
+   default 2 if MACH_SUN5I
+   default 5 if MACH_SUN8I
+   default 1
+   ---help---
+   Configures the console index for Allwinner SoC. 2 for SUN5I, 5 for SUN8I
+   and 1 otherwise.
+
 config DRAM_TYPE
int "sunxi dram type"
depends on MACH_SUN8I_A83T
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index 361d90a701..1dbd671d01 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -12,7 +12,6 @@ CONFIG_VIDEO_LCD_POWER="PB10"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 3191098bf1..6aec11d594 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_POWER="AXP0-0"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig
index 5020724aa8..59a66c1b9d 100644
--- a/configs/Ampe_A76_defconfig
+++ b/configs/Ampe_A76_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-ampe-a76"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index 65d0c9847a..080f4718b2 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -8,7 +8,6 @@ CONFIG_DRAM_TIMINGS_DDR3_800E_1066G_1333J=y
 CONFIG_USB0_VBUS_PIN="PB10"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-r8-chip"
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_DFU=y
diff --git a/configs/Empire_electronix_d709_defconfig 
b/configs/Empire_electronix_d709_defconfig
index 831949a08b..756636d41e 100644
--- a/configs/Empire_electronix_d709_defconfig
+++ b/configs/Empire_electronix_d709_defconfig
@@ -16,7 +16,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-d709"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Empire_electronix_m712_defconfig 
b/configs/Empire_electronix_m712_defconfig
index 4b51380fc0..22d43785be 100644
--- a/configs/Empire_electronix_m712_defconfig
+++ b/configs/Empire_electronix_m712_defconfig
@@ -15,7 +15,6 @@ CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
 CONFIG_VIDEO_LCD_BL_PWM="PB2"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-m712"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
 CONFIG_SPL=y
 # CO

[U-Boot] [PATCH 02/10] sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER from SYS_EXTRA_OPTIONS

2017-02-23 Thread Mylène Josserand
Remove the AXP209_POWER option from SYS_EXTRA_OPTIONS.
As this configuration already exists on Kconfig, we just need
to remove it from defconfig.

Signed-off-by: Mylène Josserand 
---
 configs/icnova-a20-swac_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index 85c4806a87..84ca843f1f 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -14,7 +14,7 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,CMD_BMP,CMD_UNZIP"
+CONFIG_SYS_EXTRA_OPTIONS="CMD_BMP,CMD_UNZIP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 09/10] sunxi: Convert CONFIG_MACPWR to Kconfig

2017-02-23 Thread Mylène Josserand
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 
---
 board/sunxi/Kconfig   | 7 +++
 board/sunxi/board.c   | 7 ---
 configs/Bananapi_defconfig| 2 +-
 configs/Bananapro_defconfig   | 2 +-
 configs/Lamobo_R1_defconfig   | 2 +-
 configs/Mele_A1000_defconfig  | 2 +-
 configs/Orangepi_defconfig| 2 +-
 configs/Orangepi_mini_defconfig   | 2 +-
 configs/i12-tvbox_defconfig   | 2 +-
 configs/jesurun_q5_defconfig  | 2 +-
 configs/mixtile_loftq_defconfig   | 2 +-
 configs/orangepi_plus2e_defconfig | 2 +-
 configs/orangepi_plus_defconfig   | 2 +-
 13 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 0ba8e86f05..492bf14ae1 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -318,6 +318,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 MMC
depends on !UART0_PORT_F
default y if ARCH_SUNXI
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 131986bd17..906a06d0d9 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() */
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 8751875d03..311cfdc2df 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_RGMII=y
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_SUNXI_GMAC=y
@@ -10,7 +11,6 @@ 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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index e70dbb8730..26f920c86a 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_RGMII=y
 CONFIG_USB1_VBUS_PIN="PH0"
 CONFIG_USB2_VBUS_PIN="PH1"
@@ -12,7 +13,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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
index 3029dc0ee0..c79b5c9d6d 100644
--- a/configs/Lamobo_R1_defconfig
+++ b/configs/Lamobo_R1_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_MACPWR="PH23"
 CONFIG_MMC0_CD_PIN="PH10"
 CONFIG_RGMII=y
 CONFIG_SATAPWR="PB3"
@@ -11,7 +12,6 @@ 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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index 1ff4364cd5..cde760051e 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -2,12 +2,12 @@ CONFIG_ARM=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=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_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not se

[U-Boot] [PATCH 01/10] sunxi: Convert SUNXI_GMAC to Kconfig

2017-02-23 Thread Mylène Josserand
Move the SUNXI_GMAC config option to Kconfig and remove it
from SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
---
 board/sunxi/Kconfig| 5 +
 configs/A20-OLinuXino-Lime2_defconfig  | 3 ++-
 configs/A20-OLinuXino-Lime_defconfig   | 3 ++-
 configs/A20-OLinuXino_MICRO_defconfig  | 3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   | 3 ++-
 configs/Bananapi_defconfig | 3 ++-
 configs/Bananapro_defconfig| 3 ++-
 configs/CSQ_CS908_defconfig| 2 +-
 configs/Colombus_defconfig | 3 ++-
 configs/Cubieboard2_defconfig  | 3 ++-
 configs/Cubietruck_defconfig   | 3 ++-
 configs/Hummingbird_A31_defconfig  | 3 ++-
 configs/Itead_Ibox_A20_defconfig   | 3 ++-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
 configs/Linksprite_pcDuino3_defconfig  | 3 ++-
 configs/Mele_A1000G_quad_defconfig | 2 +-
 configs/Mele_I7_defconfig  | 2 +-
 configs/Mele_M3_defconfig  | 2 +-
 configs/Mele_M5_defconfig  | 2 +-
 configs/Mele_M9_defconfig  | 2 +-
 configs/Orangepi_defconfig | 3 ++-
 configs/Orangepi_mini_defconfig| 3 ++-
 configs/Sinlinx_SinA31s_defconfig  | 2 +-
 configs/Sinovoip_BPI_M2_defconfig  | 3 ++-
 configs/Wits_Pro_A20_DKT_defconfig | 3 ++-
 configs/i12-tvbox_defconfig| 3 ++-
 configs/icnova-a20-swac_defconfig  | 3 ++-
 configs/mixtile_loftq_defconfig| 3 ++-
 29 files changed, 54 insertions(+), 28 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 00011331b9..ff11b98ddb 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -683,6 +683,11 @@ config VIDEO_LCD_TL059WV5C0
 
 endchoice
 
+config SUNXI_GMAC
+   bool "Enable GMAC Ethernet support"
+   default n
+   ---help---
+   Enable the support for the GMAC Ethernet controller
 
 config GMAC_TX_DELAY
int "GMAC Transmit Clock Delay Chain"
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 8fd7c64e77..47a876082a 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -6,10 +6,11 @@ CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime_defconfig 
b/configs/A20-OLinuXino-Lime_defconfig
index 26e6ace103..e84f1c760a 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -4,10 +4,11 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino_MICRO_defconfig 
b/configs/A20-OLinuXino_MICRO_defconfig
index d629eb1b36..b08708a9b9 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -7,10 +7,11 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH11"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_VIDEO_VGA=y
+CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig 
b/configs/A20-Olimex-SOM-EVB_defconfig
index b5d52dba24..dd7b1ac3e9 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -9,10 +9,11 @@ CONFIG_MMC3_PINS="PH"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff

[U-Boot] [PATCH 04/10] sunxi: icnova-a20-swac_defconfig: Remove CMD_UNZIP and SYS_EXTRA_OPTIONS

2017-02-23 Thread Mylène Josserand
Remove this command as it is not necessary in defconfig file.
As there is no more command/option in SYS_EXTRA_OPTIONS, it
can be removed from this defconfig file.

Signed-off-by: Mylène Josserand 
---
 configs/icnova-a20-swac_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index ccd4429d35..0bc2fbecfd 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CMD_UNZIP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 06/10] sunxi: Convert SUNXI_EMAC to Kconfig

2017-02-23 Thread Mylène Josserand
Convert the SUNXI_EMAC config to Kconfig. Remove it from SYS_EXTRA_OPTIONS
from many sunxi defconfig.

Signed-off-by: Mylène Josserand 
---
 configs/A10-OLinuXino-Lime_defconfig | 3 ++-
 configs/A10s-OLinuXino-M_defconfig   | 2 +-
 configs/Cubieboard_defconfig | 3 ++-
 configs/Linksprite_pcDuino_defconfig | 2 +-
 configs/Marsboard_A10_defconfig  | 2 +-
 configs/Mele_A1000_defconfig | 3 ++-
 configs/ba10_tv_box_defconfig| 2 +-
 configs/jesurun_q5_defconfig | 3 ++-
 drivers/net/Kconfig  | 6 ++
 9 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index 50436a7a52..74f6fc2d76 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -9,11 +9,12 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/A10s-OLinuXino-M_defconfig 
b/configs/A10s-OLinuXino-M_defconfig
index e2bebf827c..3f766244ee 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -9,10 +9,10 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=1
 CONFIG_USB1_VBUS_PIN="PB10"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-a10s-olinuxino-micro"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 64aebed2f1..2c16b0fc72 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -7,9 +7,10 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-cubieboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPB(8)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPB(8)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Linksprite_pcDuino_defconfig 
b/configs/Linksprite_pcDuino_defconfig
index ab094a6553..93a99af917 100644
--- a/configs/Linksprite_pcDuino_defconfig
+++ b/configs/Linksprite_pcDuino_defconfig
@@ -6,9 +6,9 @@ CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-pcduino"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Marsboard_A10_defconfig b/configs/Marsboard_A10_defconfig
index 0d381ff1b8..a1ddae76e0 100644
--- a/configs/Marsboard_A10_defconfig
+++ b/configs/Marsboard_A10_defconfig
@@ -4,10 +4,10 @@ CONFIG_MACH_SUN4I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-marsboard"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index 820d5ed98e..1ff4364cd5 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -7,9 +7,10 @@ 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="SUNXI_EMAC,MACPWR=SUNXI_GPH(15)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(15)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index c60766ce3c..7570cf3457 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -9,10 +9,10 @@ CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-ba10-tvbox"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
+CONFIG_SUNXI_EMAC=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
diff --git a/config

[U-Boot] [PATCH 08/10] sunxi: Convert CONFIG_SATAPWR to Kconfig

2017-02-23 Thread Mylène Josserand
Convert the CONFIG_SATAPWR into kconfig.
Thanks to that, many SYS_EXTRA_OPTIONS can be removed from some
defconfigs.

Signed-off-by: Mylène Josserand 
---
 board/sunxi/Kconfig| 8 
 board/sunxi/board.c| 7 ---
 configs/A10-OLinuXino-Lime_defconfig   | 2 +-
 configs/A20-OLinuXino-Lime2_defconfig  | 2 +-
 configs/A20-OLinuXino-Lime_defconfig   | 2 +-
 configs/A20-OLinuXino_MICRO_defconfig  | 2 +-
 configs/A20-Olimex-SOM-EVB_defconfig   | 2 +-
 configs/Cubieboard2_defconfig  | 2 +-
 configs/Cubieboard_defconfig   | 2 +-
 configs/Cubietruck_defconfig   | 2 +-
 configs/Itead_Ibox_A20_defconfig   | 2 +-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 2 +-
 configs/Linksprite_pcDuino3_defconfig  | 2 +-
 configs/Sinovoip_BPI_M3_defconfig  | 2 +-
 configs/orangepi_plus_defconfig| 3 ++-
 16 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index a51066f7c6..0ba8e86f05 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -690,6 +690,14 @@ config VIDEO_LCD_TL059WV5C0
 
 endchoice
 
+config SATAPWR
+   string "SATA power pin"
+   default ""
+   ---help---
+   Set the pins used to power the SATA. This takes a string in the
+   format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of
+   port H.
+
 config SUNXI_GMAC
bool "Enable GMAC Ethernet support"
default n
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 53656383d5..131986bd17 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;
+   __maybe_unused int id_pfr1, ret, satapwr_pin;
 
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
 
@@ -118,8 +118,9 @@ int board_init(void)
return ret;
 
 #ifdef CONFIG_SATAPWR
-   gpio_request(CONFIG_SATAPWR, "satapwr");
-   gpio_direction_output(CONFIG_SATAPWR, 1);
+   satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
+   gpio_request(satapwr_pin, "satapwr");
+   gpio_direction_output(satapwr_pin, 1);
 #endif
 #ifdef CONFIG_MACPWR
gpio_request(CONFIG_MACPWR, "macpwr");
diff --git a/configs/A10-OLinuXino-Lime_defconfig 
b/configs/A10-OLinuXino-Lime_defconfig
index 74f6fc2d76..8404d0f3dd 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -6,10 +6,10 @@ CONFIG_DRAM_CLK=480
 CONFIG_DRAM_EMR1=4
 CONFIG_SYS_CLK_FREQ=91200
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SATAPWR="PC3"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 40468f1394..92d15f7a35 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -7,11 +7,11 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_RGMII=y
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
+CONFIG_SATAPWR="PC3"
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino-Lime_defconfig 
b/configs/A20-OLinuXino-Lime_defconfig
index e84f1c760a..aa14c7232b 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -4,11 +4,11 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_SATAPWR="PC3"
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-OLinuXino_MICRO_defconfig 
b/configs/A20-OLinuXino_MICRO_defconfig
index b08708a9b9..7f78a3f625 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -7,11 +7,11 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH11"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_VIDEO_VGA=y
+CONFIG_SATAPWR="PC3"
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-micro"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_

[U-Boot] [PATCH 03/10] sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from SYS_EXTRA_OPTIONS

2017-02-23 Thread Mylène Josserand
This configuration is not necessary in a defconfig file so
it is removed from the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
---
 configs/icnova-a20-swac_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/icnova-a20-swac_defconfig 
b/configs/icnova-a20-swac_defconfig
index 84ca843f1f..ccd4429d35 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -14,7 +14,7 @@ CONFIG_VIDEO_LCD_PANEL_LVDS=y
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-icnova-swac"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="CMD_BMP,CMD_UNZIP"
+CONFIG_SYS_EXTRA_OPTIONS="CMD_UNZIP"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 00/10] sunxi: Remove SYS_EXTRA_OPTIONS

2017-02-23 Thread Mylène Josserand
Hello everyone,

This patchset removes the SYS_EXTRA_OPTIONS from all sunxi defconfigs.
The values in this variable are converted to Kconfig or simply removed.

Based on u-boot sunxi repository: git://git.denx.de/u-boot-sunxi.git
from last commit: 002d907da51fdf10a03d389852645675529c78e6

Patch 1: Convert SUNXI_GMAC config to Kconfig and remove it from
all defconfig.
Patch 2: Remove AXP209_POWER configuration as this config is already
converted in Kconfig (drivers/power). It is automatically chosen when
the SoC is sun4i, sun5i or sun7i.
Patch 3 and 4: Remove CMD_BMP and CMD_ZIP configs from SYS_EXTRA_OPTIONS.
Patch 5: Remove SYS_EXTRA_OPTIONS from mk802_defconfig as it contains
only USB_EHCI which is already converted to Kconfig.
Patch 6, 7: Convert SUNXI_EMAC and CONFIG_RGMII to Kconfig and remove it
from all SYS_EXTRA_OPTIONS entries.
Patch 8 and 9: Convert CONFIG_SATAPWR and CONFIG_MACPWR to Kconfig. It becomes
a string instead of the gpio number so the function sunxi_name_to_gpio
is used to do the conversion from string to int.
Patch 10: Convert console index (CONS_INDEX) to Kconfig. The default value is 1
except for sun5i which is 2 and sun8i which is 5.

Thank you in advance!
Best regards,

Mylène Josserand (10):
  sunxi: Convert SUNXI_GMAC to Kconfig
  sunxi: icnova-a20-swac_defconfig: Remove AXP209_POWER from
SYS_EXTRA_OPTIONS
  sunxi: icnova-a20-swac_defconfig: Remove CMD_BMP from
SYS_EXTRA_OPTIONS
  sunxi: icnova-a20-swac_defconfig: Remove CMD_UNZIP and
SYS_EXTRA_OPTIONS
  sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS
  sunxi: Convert SUNXI_EMAC to Kconfig
  sunxi: Convert CONFIG_RGMII to Kconfig
  sunxi: Convert CONFIG_SATAPWR to Kconfig
  sunxi: Convert CONFIG_MACPWR to Kconfig
  sunxi: Convert CONS_INDEX to Kconfig

 board/sunxi/Kconfig| 36 ++
 board/sunxi/board.c| 12 +-
 configs/A10-OLinuXino-Lime_defconfig   |  3 ++-
 configs/A10s-OLinuXino-M_defconfig |  2 +-
 configs/A13-OLinuXinoM_defconfig   |  1 -
 configs/A13-OLinuXino_defconfig|  1 -
 configs/A20-OLinuXino-Lime2_defconfig  |  4 +++-
 configs/A20-OLinuXino-Lime_defconfig   |  3 ++-
 configs/A20-OLinuXino_MICRO_defconfig  |  3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   |  4 +++-
 configs/Ampe_A76_defconfig |  1 -
 configs/Bananapi_defconfig |  4 +++-
 configs/Bananapro_defconfig|  4 +++-
 configs/CHIP_defconfig |  1 -
 configs/CSQ_CS908_defconfig|  2 +-
 configs/Colombus_defconfig |  3 ++-
 configs/Cubieboard2_defconfig  |  3 ++-
 configs/Cubieboard_defconfig   |  3 ++-
 configs/Cubietruck_defconfig   |  4 +++-
 configs/Empire_electronix_d709_defconfig   |  1 -
 configs/Empire_electronix_m712_defconfig   |  1 -
 configs/Hummingbird_A31_defconfig  |  3 ++-
 configs/Itead_Ibox_A20_defconfig   |  3 ++-
 configs/Lamobo_R1_defconfig|  5 -
 configs/Linksprite_pcDuino3_Nano_defconfig |  4 +++-
 configs/Linksprite_pcDuino3_defconfig  |  3 ++-
 configs/Linksprite_pcDuino_defconfig   |  2 +-
 configs/Marsboard_A10_defconfig|  2 +-
 configs/Mele_A1000G_quad_defconfig |  2 +-
 configs/Mele_A1000_defconfig   |  3 ++-
 configs/Mele_I7_defconfig  |  2 +-
 configs/Mele_M3_defconfig  |  2 +-
 configs/Mele_M5_defconfig  |  2 +-
 configs/Mele_M9_defconfig  |  2 +-
 configs/Orangepi_defconfig |  4 +++-
 configs/Orangepi_mini_defconfig|  4 +++-
 configs/Sinlinx_SinA31s_defconfig  |  2 +-
 configs/Sinovoip_BPI_M2_defconfig  |  3 ++-
 configs/Sinovoip_BPI_M3_defconfig  |  2 +-
 configs/Wits_Pro_A20_DKT_defconfig |  3 ++-
 configs/ba10_tv_box_defconfig  |  2 +-
 configs/difrnce_dit4350_defconfig  |  1 -
 configs/ga10h_v1_1_defconfig   |  1 -
 configs/gt90h_v4_defconfig |  1 -
 configs/i12-tvbox_defconfig|  3 ++-
 configs/iNet_D978_rev2_defconfig   |  1 -
 configs/icnova-a20-swac_defconfig  |  2 +-
 configs/inet86dz_defconfig |  1 -
 configs/inet98v_rev2_defconfig |  1 -
 configs/jesurun_q5_defconfig   |  3 ++-
 configs/mixtile_loftq_defconfig|  4 +++-
 configs/mk802_defconfig|  1 -
 configs/orangepi_plus2e_defconfig  |  2 +-
 configs/orangepi_plus_defconfig|  3 ++-
 configs/polaroid_mid2407pxe03_defconfig|  1 -
 configs/polaroid_mid2809pxe04_defconfig|  1 -
 configs/q8_a13_tablet_defconfig|  1 -
 configs/q8_a23_tablet_800x480_defconfig|  1 -
 configs/q8_a33_tablet_1024x600_defconfig   |  1 -
 configs/q8_a33_tablet_800x480_defconfig|  1 -
 drivers/net/Kconfig|  6

[U-Boot] [PATCH 05/10] sunxi: mk802_defconfig: Remove SYS_EXTRA_OPTIONS

2017-02-23 Thread Mylène Josserand
The USB_EHCI configuration is already set in this defconfig
using kconfig's config. This configuration in SYS_EXTRA_OPTIONS
must be removed and so the SYS_EXTRA_OPTIONS.

Signed-off-by: Mylène Josserand 
---
 configs/mk802_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/mk802_defconfig b/configs/mk802_defconfig
index 47bbf62274..2f63320fb9 100644
--- a/configs/mk802_defconfig
+++ b/configs/mk802_defconfig
@@ -4,7 +4,6 @@ CONFIG_MACH_SUN4I=y
 CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mk802"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-- 
2.11.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 07/10] sunxi: Convert CONFIG_RGMII to Kconfig

2017-02-23 Thread Mylène Josserand
Convert CONFIG_RGMII to Kconfig. Thanks to that, it is possible to
update defconfig files of SYS_EXTRA_OPTIONS accordingly and
remove it when it is possible.

Signed-off-by: Mylène Josserand 
---
 board/sunxi/Kconfig| 7 +++
 configs/A20-OLinuXino-Lime2_defconfig  | 3 ++-
 configs/A20-Olimex-SOM-EVB_defconfig   | 3 ++-
 configs/Bananapi_defconfig | 3 ++-
 configs/Bananapro_defconfig| 3 ++-
 configs/Colombus_defconfig | 2 +-
 configs/Cubietruck_defconfig   | 3 ++-
 configs/Hummingbird_A31_defconfig  | 2 +-
 configs/Lamobo_R1_defconfig| 3 ++-
 configs/Linksprite_pcDuino3_Nano_defconfig | 3 ++-
 configs/Orangepi_defconfig | 3 ++-
 configs/Orangepi_mini_defconfig| 3 ++-
 configs/Sinovoip_BPI_M2_defconfig  | 2 +-
 configs/Wits_Pro_A20_DKT_defconfig | 2 +-
 configs/mixtile_loftq_defconfig| 3 ++-
 15 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index ff11b98ddb..a51066f7c6 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -385,6 +385,13 @@ config INITIAL_USB_SCAN_DELAY
option to a non 0 value to add an extra delay before the first usb
bus scan.
 
+config RGMII
+   bool "Enable RGMII"
+   default n
+   ---help---
+   Enable the support of the Reduced Gigabit Media-Independent
+   Interface (RGMII).
+
 config USB0_VBUS_PIN
string "Vbus enable pin for usb0 (otg)"
default ""
diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index 47a876082a..40468f1394 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -4,13 +4,14 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=384
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_RGMII=y
 CONFIG_USB0_VBUS_PIN="PC17"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig 
b/configs/A20-Olimex-SOM-EVB_defconfig
index dd7b1ac3e9..03f99809ef 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -7,13 +7,14 @@ CONFIG_MMC0_CD_PIN="PH1"
 CONFIG_MMC3_CD_PIN="PH0"
 CONFIG_MMC3_PINS="PH"
 CONFIG_MMC_SUNXI_SLOT_EXTRA=3
+CONFIG_RGMII=y
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_SUNXI_GMAC=y
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
 CONFIG_AHCI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_SYS_EXTRA_OPTIONS="RGMII,SATAPWR=SUNXI_GPC(3)"
+CONFIG_SYS_EXTRA_OPTIONS="SATAPWR=SUNXI_GPC(3)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index c6a9e88351..8751875d03 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -3,13 +3,14 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_RGMII=y
 CONFIG_VIDEO_COMPOSITE=y
 CONFIG_SUNXI_GMAC=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="RGMII,MACPWR=SUNXI_GPH(23)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index 596eb2dd7a..e70dbb8730 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=432
+CONFIG_RGMII=y
 CONFIG_USB1_VBUS_PIN="PH0"
 CONFIG_USB2_VBUS_PIN="PH1"
 CONFIG_VIDEO_COMPOSITE=y
@@ -11,7 +12,7 @@ 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="RGMII,MACPWR=SUNXI_GPH(23)"
+CONFIG_SYS_EXTRA_OPTIONS="MACPWR=SUNXI_GPH(23)"
 CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index f9919558d4..6055a0d319 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN6I=y
 CONFIG_DRAM_CLK=240
 CONFIG_DRAM_ZQ=251
+CONFIG_RGMII=y
 CONFIG_USB1_VBUS_PIN=""
 CONFIG_I2C0_ENABLE=y
 CONFIG_AXP_GPIO=y
@