[U-Boot] [PATCH 00/22] ARM: Allwinner sunXi (A10 & A13) SoC support

This patch series adds support for Allwinner sunxi (A10 & A13) SoC families, including SPL loader to boot u-boot directly from MMC/SD.
Aaron (1): ARM: sunxi: MMC driver
Henrik Nordstrom (14): ARM sunxi: I2C driver ARM: sunxi: watchdog support power: Add AXP209 Power Management controller (I2C) ARM sunxi: Basic GPIO driver tools: mksunixboot adding a Allwinner boot header sunxi: Add more network commands and netconsole support ARM: sunxi: U-Boot SPL capable of booting directly from MMC ARM sunxi: SPL support for Olimex A13-OLinuXino board ARM sunxi: SPL support for Mele A1000 board ARM sunxi: SPL support for Cubieboard board ARM sunxi: SPL support for Hackberry 1GB board ARM sunxi: SPL support for Mini-X board ARM sunxi: SPL support for hyundai A7HD board ARM sunxi: SPL support for Mele A3700 board
Jari Helaakoski (1): ARM sunxi: SPL support for a13_mid board
Sergey Lapin (1): ARM sunxi: SPL support for MK802 board
Stefan Roese (2): net: Add sunxi (Allwinner) wemac driver ARM: sun4i: Enable ethernet support (wemac) on A10 boards
Tom Cubie (1): ARM: sunxi: Basic Allwinner A10/A13 (sun4i/sun5i) support
hehopmajieh (1): ARM sunxi: SPL support for Olinuxino A13 Micro
j (1): ARM sunxi: SPL support for Rikomagic MK802II board
MAINTAINERS | 13 + Makefile | 12 + arch/arm/cpu/armv7/Makefile | 2 +- arch/arm/cpu/armv7/sunxi/Makefile | 51 ++ arch/arm/cpu/armv7/sunxi/board.c | 132 ++++++ arch/arm/cpu/armv7/sunxi/clock.c | 171 +++++++ arch/arm/cpu/armv7/sunxi/dram.c | 445 ++++++++++++++++++ arch/arm/cpu/armv7/sunxi/pinmux.c | 61 +++ arch/arm/cpu/armv7/sunxi/reset.S | 39 ++ arch/arm/cpu/armv7/sunxi/timer.c | 117 +++++ arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 63 +++ arch/arm/include/asm/arch-sunxi/clock.h | 179 +++++++ arch/arm/include/asm/arch-sunxi/cpu.h | 146 ++++++ arch/arm/include/asm/arch-sunxi/dram.h | 114 +++++ arch/arm/include/asm/arch-sunxi/gpio.h | 166 +++++++ arch/arm/include/asm/arch-sunxi/i2c.h | 185 ++++++++ arch/arm/include/asm/arch-sunxi/mmc.h | 64 +++ arch/arm/include/asm/arch-sunxi/spl.h | 34 ++ arch/arm/include/asm/arch-sunxi/sys_proto.h | 31 ++ arch/arm/include/asm/arch-sunxi/timer.h | 102 ++++ board/sunxi/Makefile | 58 +++ board/sunxi/board.c | 112 +++++ board/sunxi/dram_a13_mid.c | 31 ++ board/sunxi/dram_a13_oli_micro.c | 32 ++ board/sunxi/dram_a13_olinuxino.c | 31 ++ board/sunxi/dram_cubieboard.c | 31 ++ board/sunxi/dram_cubieboard_512.c | 31 ++ board/sunxi/dram_hackberry.c | 31 ++ board/sunxi/dram_hyundai_a7hd.c | 31 ++ board/sunxi/dram_mele_a1000.c | 24 + board/sunxi/dram_mele_a3700.c | 31 ++ board/sunxi/dram_mini_x.c | 31 ++ board/sunxi/dram_mk802.c | 24 + board/sunxi/dram_mk802ii.c | 31 ++ boards.cfg | 16 + drivers/gpio/Makefile | 1 + drivers/gpio/sunxi_gpio.c | 116 +++++ drivers/i2c/Makefile | 1 + drivers/i2c/sunxi_i2c.c | 278 +++++++++++ drivers/mmc/Makefile | 1 + drivers/mmc/sunxi_mmc.c | 674 +++++++++++++++++++++++++++ drivers/net/Makefile | 1 + drivers/net/sunxi_wemac.c | 533 +++++++++++++++++++++ drivers/power/Makefile | 1 + drivers/power/axp209.c | 183 ++++++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/sunxi_watchdog.c | 49 ++ include/axp209.h | 29 ++ include/configs/sun4i.h | 74 +++ include/configs/sun5i.h | 56 +++ include/configs/sunxi-common.h | 243 ++++++++++ include/netdev.h | 1 + spl/Makefile | 10 + tools/.gitignore | 1 + tools/Makefile | 6 + tools/mksunxiboot.README | 13 + tools/mksunxiboot.c | 162 +++++++ 57 files changed, 5105 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/Makefile create mode 100644 arch/arm/cpu/armv7/sunxi/board.c create mode 100644 arch/arm/cpu/armv7/sunxi/clock.c create mode 100644 arch/arm/cpu/armv7/sunxi/dram.c create mode 100644 arch/arm/cpu/armv7/sunxi/pinmux.c create mode 100644 arch/arm/cpu/armv7/sunxi/reset.S create mode 100644 arch/arm/cpu/armv7/sunxi/timer.c create mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl.lds create mode 100644 arch/arm/include/asm/arch-sunxi/clock.h create mode 100644 arch/arm/include/asm/arch-sunxi/cpu.h create mode 100644 arch/arm/include/asm/arch-sunxi/dram.h create mode 100644 arch/arm/include/asm/arch-sunxi/gpio.h create mode 100644 arch/arm/include/asm/arch-sunxi/i2c.h create mode 100644 arch/arm/include/asm/arch-sunxi/mmc.h create mode 100644 arch/arm/include/asm/arch-sunxi/spl.h create mode 100644 arch/arm/include/asm/arch-sunxi/sys_proto.h create mode 100644 arch/arm/include/asm/arch-sunxi/timer.h create mode 100644 board/sunxi/Makefile create mode 100644 board/sunxi/board.c create mode 100644 board/sunxi/dram_a13_mid.c create mode 100644 board/sunxi/dram_a13_oli_micro.c create mode 100644 board/sunxi/dram_a13_olinuxino.c create mode 100644 board/sunxi/dram_cubieboard.c create mode 100644 board/sunxi/dram_cubieboard_512.c create mode 100644 board/sunxi/dram_hackberry.c create mode 100644 board/sunxi/dram_hyundai_a7hd.c create mode 100644 board/sunxi/dram_mele_a1000.c create mode 100644 board/sunxi/dram_mele_a3700.c create mode 100644 board/sunxi/dram_mini_x.c create mode 100644 board/sunxi/dram_mk802.c create mode 100644 board/sunxi/dram_mk802ii.c create mode 100644 drivers/gpio/sunxi_gpio.c create mode 100644 drivers/i2c/sunxi_i2c.c create mode 100644 drivers/mmc/sunxi_mmc.c create mode 100644 drivers/net/sunxi_wemac.c create mode 100644 drivers/power/axp209.c create mode 100644 drivers/watchdog/sunxi_watchdog.c create mode 100644 include/axp209.h create mode 100644 include/configs/sun4i.h create mode 100644 include/configs/sun5i.h create mode 100644 include/configs/sunxi-common.h create mode 100644 tools/mksunxiboot.README create mode 100644 tools/mksunxiboot.c

Hi Henrik,
On Sun, Nov 25, 2012 at 12:36:52PM +0100, Henrik Nordström wrote:
This patch series adds support for Allwinner sunxi (A10 & A13) SoC families, including SPL loader to boot u-boot directly from MMC/SD.
I took a quick look at your patches...
I think you should add README file in doc directory. It should at least contain information how to add support for new boards and point to the tool used for generating images.
Do you have any plans for adding support so the boards can boot from SPI/NAND/NOR, anything else then MMC/SD ?
Luka

Thanks for your patch reviews. Will fix up your comments and submit a new batch of patches later tonight.
sön 2012-11-25 klockan 16:21 +0100 skrev Luka Perkov:
I think you should add README file in doc directory. It should at least contain information how to add support for new boards and point to the tool used for generating images.
There have long been thougts about moving the SPL DRAM controller parameters to a boot header added by mksunxiboot instead of wiring them into the source.
Which tool for generating images? mksunxiboot? The SPL image is built automatically.
But yes, a README explaining how to install the SPL would help. We do have a bit of a such README but I see now that it's slightly misplaced as tools/mksunxiboot.README, should move do doc/README.sunxi and expanded a bit.
Do you have any plans for adding support so the boards can boot from SPI/NAND/NOR, anything else then MMC/SD ?
NAND is coming once we get the NAND controller under reasonable control. It's a little too smart controller to fit nicely in mtd, and not exactly well documented. Plus that many boards are using NAND chips not recognised by u-boot mtd code.
Support for booting from MMC2 is also coming.
There is no known boards using SPI boot media so this probably will not get added in the near future.
NOR is not supported by the SoC other than in SPI package.
Regards Henrik

On Sun, Nov 25, 2012 at 05:02:57PM +0100, Henrik Nordström wrote:
Thanks for your patch reviews. Will fix up your comments and submit a new batch of patches later tonight.
You might want to wait a few days... Somebody else might have comments.
sön 2012-11-25 klockan 16:21 +0100 skrev Luka Perkov:
I think you should add README file in doc directory. It should at least contain information how to add support for new boards and point to the tool used for generating images.
There have long been thougts about moving the SPL DRAM controller parameters to a boot header added by mksunxiboot instead of wiring them into the source.
Which tool for generating images? mksunxiboot? The SPL image is built automatically.
Ah ok, I missed that. So the generated SPL image just needs to be copied on the card ? If yes please put that into README in doc directory.
But yes, a README explaining how to install the SPL would help. We do have a bit of a such README but I see now that it's slightly misplaced as tools/mksunxiboot.README, should move do doc/README.sunxi and expanded a bit.
We should have a short tools/mksunxiboot.README too, so don't delete that one.
Do you have any plans for adding support so the boards can boot from SPI/NAND/NOR, anything else then MMC/SD ?
NAND is coming once we get the NAND controller under reasonable control. It's a little too smart controller to fit nicely in mtd, and not exactly well documented. Plus that many boards are using NAND chips not recognised by u-boot mtd code.
Ok. Booting from NAND is something I would like to have ;)
Support for booting from MMC2 is also coming.
There is no known boards using SPI boot media so this probably will not get added in the near future.
NOR is not supported by the SoC other than in SPI package.
Ok. Thanks for the information.
Luka

Dear Henrik Nordström,
Thanks for your patch reviews. Will fix up your comments and submit a new batch of patches later tonight.
sön 2012-11-25 klockan 16:21 +0100 skrev Luka Perkov:
I think you should add README file in doc directory. It should at least contain information how to add support for new boards and point to the tool used for generating images.
There have long been thougts about moving the SPL DRAM controller parameters to a boot header added by mksunxiboot instead of wiring them into the source.
Which tool for generating images? mksunxiboot? The SPL image is built automatically.
But yes, a README explaining how to install the SPL would help. We do have a bit of a such README but I see now that it's slightly misplaced as tools/mksunxiboot.README, should move do doc/README.sunxi and expanded a bit.
[...]
The mkimage infrastructure won't work? I think it's much better than yet another tool (mksunxi...)
Best regards, Marek Vasut

sön 2012-11-25 klockan 18:58 +0100 skrev Marek Vasut:
The mkimage infrastructure won't work? I think it's much better than yet another tool (mksunxi...)
Suggestion how to fit adding an SPL header with these parameters in mkimage is welcome
http://lists.denx.de/pipermail/u-boot/2012-November/140772.html
Regards Henrik

sön 2012-11-25 klockan 19:16 +0100 skrev Henrik Nordström:
sön 2012-11-25 klockan 18:58 +0100 skrev Marek Vasut:
The mkimage infrastructure won't work? I think it's much better than yet another tool (mksunxi...)
Suggestion how to fit adding an SPL header with these parameters in mkimage is welcome
http://lists.denx.de/pipermail/u-boot/2012-November/140772.html
Got sent a bit premature.
Have not spent time in integrating this header mkimage because the tool is currently only used build-time. There is at this time no need to have a tool for adding this header outside of running make.
If the SPL parameters are "runtime" parameterized instead of wired into C code then it makes great sense to add this to mkimage. Just not entirely sure on what the proper usage parameters of mkimage is to supply the needed SPL parameters. Or where to keep those parameters in the tree if not in the source.
Regards Henrik

Dear Henrik Nordström,
In message 1353843412.17518.12.camel@home.hno.se you wrote:
This patch series adds support for Allwinner sunxi (A10 & A13) SoC families, including SPL loader to boot u-boot directly from MMC/SD.
Please run your patches through checpatch, and make sure to fix all messages like:
ERROR: Missing Signed-off-by: line(s) WARNING: Whitespace before semicolon WARNING: do not add new typedefs WARNING: line over 80 characters
Best regards,
Wolfgang Denk

Hi Henrik,
Thanks for your hard work - I did promise to help you through the patch submission process, but unfortunately a few personal issues took precedence.
It's good to see not only the core A10 support, but several boards right off the bat. With respect to the boards, is putting them all in the same board directory the right thing to do? The are each manufactured by different vendors, and as far as I can tell the board directory follows a style more like /board/<vendor>/<model> (or /board/<model> for vendors with only one board)
As Wolfgang mentioned, don't forget to run your patches through checkpatch.pl and make sure you properly prefix your next version v2
Regards,
Graeme
On Sun, Nov 25, 2012 at 10:36 PM, Henrik Nordström < henrik@henriknordstrom.net> wrote:
This patch series adds support for Allwinner sunxi (A10 & A13) SoC families, including SPL loader to boot u-boot directly from MMC/SD.
Aaron (1): ARM: sunxi: MMC driver
Henrik Nordstrom (14): ARM sunxi: I2C driver ARM: sunxi: watchdog support power: Add AXP209 Power Management controller (I2C) ARM sunxi: Basic GPIO driver tools: mksunixboot adding a Allwinner boot header sunxi: Add more network commands and netconsole support ARM: sunxi: U-Boot SPL capable of booting directly from MMC ARM sunxi: SPL support for Olimex A13-OLinuXino board ARM sunxi: SPL support for Mele A1000 board ARM sunxi: SPL support for Cubieboard board ARM sunxi: SPL support for Hackberry 1GB board ARM sunxi: SPL support for Mini-X board ARM sunxi: SPL support for hyundai A7HD board ARM sunxi: SPL support for Mele A3700 board
Jari Helaakoski (1): ARM sunxi: SPL support for a13_mid board
Sergey Lapin (1): ARM sunxi: SPL support for MK802 board
Stefan Roese (2): net: Add sunxi (Allwinner) wemac driver ARM: sun4i: Enable ethernet support (wemac) on A10 boards
Tom Cubie (1): ARM: sunxi: Basic Allwinner A10/A13 (sun4i/sun5i) support
hehopmajieh (1): ARM sunxi: SPL support for Olinuxino A13 Micro
j (1): ARM sunxi: SPL support for Rikomagic MK802II board
MAINTAINERS | 13 + Makefile | 12 + arch/arm/cpu/armv7/Makefile | 2 +- arch/arm/cpu/armv7/sunxi/Makefile | 51 ++ arch/arm/cpu/armv7/sunxi/board.c | 132 ++++++ arch/arm/cpu/armv7/sunxi/clock.c | 171 +++++++ arch/arm/cpu/armv7/sunxi/dram.c | 445 ++++++++++++++++++ arch/arm/cpu/armv7/sunxi/pinmux.c | 61 +++ arch/arm/cpu/armv7/sunxi/reset.S | 39 ++ arch/arm/cpu/armv7/sunxi/timer.c | 117 +++++ arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 63 +++ arch/arm/include/asm/arch-sunxi/clock.h | 179 +++++++ arch/arm/include/asm/arch-sunxi/cpu.h | 146 ++++++ arch/arm/include/asm/arch-sunxi/dram.h | 114 +++++ arch/arm/include/asm/arch-sunxi/gpio.h | 166 +++++++ arch/arm/include/asm/arch-sunxi/i2c.h | 185 ++++++++ arch/arm/include/asm/arch-sunxi/mmc.h | 64 +++ arch/arm/include/asm/arch-sunxi/spl.h | 34 ++ arch/arm/include/asm/arch-sunxi/sys_proto.h | 31 ++ arch/arm/include/asm/arch-sunxi/timer.h | 102 ++++ board/sunxi/Makefile | 58 +++ board/sunxi/board.c | 112 +++++ board/sunxi/dram_a13_mid.c | 31 ++ board/sunxi/dram_a13_oli_micro.c | 32 ++ board/sunxi/dram_a13_olinuxino.c | 31 ++ board/sunxi/dram_cubieboard.c | 31 ++ board/sunxi/dram_cubieboard_512.c | 31 ++ board/sunxi/dram_hackberry.c | 31 ++ board/sunxi/dram_hyundai_a7hd.c | 31 ++ board/sunxi/dram_mele_a1000.c | 24 + board/sunxi/dram_mele_a3700.c | 31 ++ board/sunxi/dram_mini_x.c | 31 ++ board/sunxi/dram_mk802.c | 24 + board/sunxi/dram_mk802ii.c | 31 ++ boards.cfg | 16 + drivers/gpio/Makefile | 1 + drivers/gpio/sunxi_gpio.c | 116 +++++ drivers/i2c/Makefile | 1 + drivers/i2c/sunxi_i2c.c | 278 +++++++++++ drivers/mmc/Makefile | 1 + drivers/mmc/sunxi_mmc.c | 674 +++++++++++++++++++++++++++ drivers/net/Makefile | 1 + drivers/net/sunxi_wemac.c | 533 +++++++++++++++++++++ drivers/power/Makefile | 1 + drivers/power/axp209.c | 183 ++++++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/sunxi_watchdog.c | 49 ++ include/axp209.h | 29 ++ include/configs/sun4i.h | 74 +++ include/configs/sun5i.h | 56 +++ include/configs/sunxi-common.h | 243 ++++++++++ include/netdev.h | 1 + spl/Makefile | 10 + tools/.gitignore | 1 + tools/Makefile | 6 + tools/mksunxiboot.README | 13 + tools/mksunxiboot.c | 162 +++++++ 57 files changed, 5105 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/armv7/sunxi/Makefile create mode 100644 arch/arm/cpu/armv7/sunxi/board.c create mode 100644 arch/arm/cpu/armv7/sunxi/clock.c create mode 100644 arch/arm/cpu/armv7/sunxi/dram.c create mode 100644 arch/arm/cpu/armv7/sunxi/pinmux.c create mode 100644 arch/arm/cpu/armv7/sunxi/reset.S create mode 100644 arch/arm/cpu/armv7/sunxi/timer.c create mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl.lds create mode 100644 arch/arm/include/asm/arch-sunxi/clock.h create mode 100644 arch/arm/include/asm/arch-sunxi/cpu.h create mode 100644 arch/arm/include/asm/arch-sunxi/dram.h create mode 100644 arch/arm/include/asm/arch-sunxi/gpio.h create mode 100644 arch/arm/include/asm/arch-sunxi/i2c.h create mode 100644 arch/arm/include/asm/arch-sunxi/mmc.h create mode 100644 arch/arm/include/asm/arch-sunxi/spl.h create mode 100644 arch/arm/include/asm/arch-sunxi/sys_proto.h create mode 100644 arch/arm/include/asm/arch-sunxi/timer.h create mode 100644 board/sunxi/Makefile create mode 100644 board/sunxi/board.c create mode 100644 board/sunxi/dram_a13_mid.c create mode 100644 board/sunxi/dram_a13_oli_micro.c create mode 100644 board/sunxi/dram_a13_olinuxino.c create mode 100644 board/sunxi/dram_cubieboard.c create mode 100644 board/sunxi/dram_cubieboard_512.c create mode 100644 board/sunxi/dram_hackberry.c create mode 100644 board/sunxi/dram_hyundai_a7hd.c create mode 100644 board/sunxi/dram_mele_a1000.c create mode 100644 board/sunxi/dram_mele_a3700.c create mode 100644 board/sunxi/dram_mini_x.c create mode 100644 board/sunxi/dram_mk802.c create mode 100644 board/sunxi/dram_mk802ii.c create mode 100644 drivers/gpio/sunxi_gpio.c create mode 100644 drivers/i2c/sunxi_i2c.c create mode 100644 drivers/mmc/sunxi_mmc.c create mode 100644 drivers/net/sunxi_wemac.c create mode 100644 drivers/power/axp209.c create mode 100644 drivers/watchdog/sunxi_watchdog.c create mode 100644 include/axp209.h create mode 100644 include/configs/sun4i.h create mode 100644 include/configs/sun5i.h create mode 100644 include/configs/sunxi-common.h create mode 100644 tools/mksunxiboot.README create mode 100644 tools/mksunxiboot.c
-- 1.7.7.6
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

mån 2012-11-26 klockan 13:43 +1100 skrev Graeme Russ:
It's good to see not only the core A10 support, but several boards right off the bat. With respect to the boards, is putting them all in the same board directory the right thing to do?
I don't know. Stefan suggested the current layout in lack of anthing that really is board unique.
These boards do not really have anything unique as far as main u-boot is concerned. They only differ in the DRAM parameters needed by SPL.
As Wolfgang mentioned, don't forget to run your patches through checkpatch.pl and make sure you properly prefix your next version v2
I thought I had fixed all checkpatch things that matters, but obviously missed some.
And better to get the patches looked at. Did not expect them to pass without comments.
Regards Henrik
participants (5)
-
Graeme Russ
-
Henrik Nordström
-
Luka Perkov
-
Marek Vasut
-
Wolfgang Denk