All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
@ 2016-05-04 21:15 Andre Przywara
  2016-05-04 21:15 ` [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header Andre Przywara
                   ` (7 more replies)
  0 siblings, 8 replies; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

This series improves the Pine64 support.
The first patch fixes a build break, see details in the commit message.
Patch 2/6 reverts a no longer needed memory reservation, as the firmware
bits that used to live in DRAM now can reside in SRAM.
To allow U-Boot to be easily loaded by Allwinner's boot0 loader, patch
3/6 reserves some space at the beginning of the image to (optionally)
fit in a header required by boot0.
Patch 4/6 adjusts the default load addresses in the environment to
meet the arm64 requirements (especially the kernel load address).
The device tree files included in the original Pine64 commit are
outdated, so patch 5/6 replaces some with more mature versions and also
adjusts the naming to match other sunxi boards.
The final patch renames the _defconfig file to get rid of the _plus_
insert.

Please review, comment and apply, if possible.

Cheers,
Andre.

P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
Bananapi compilation. If someone with a working buildman setup could
test this for build regressions, I'd be grateful.

Andre Przywara (6):
  arm/arm64: Move barrier instructions into separate header
  Revert "sunxi: Reserve ATF memory space on A64"
  arm64: sunxi: reserve space for boot0 header
  arm64: sunxi: adjust default load addresses
  arm64: Pine64: update FDT files
  Pine64: rename defconfig

 arch/arm/cpu/armv8/start.S                 |   3 +
 arch/arm/dts/Makefile                      |   3 +-
 arch/arm/dts/a64.dtsi                      | 564 --------------------------
 arch/arm/dts/pine64.dts                    |  62 ---
 arch/arm/dts/pine64_common.dtsi            |  76 ----
 arch/arm/dts/pine64_plus.dts               |  63 ---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
 arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
 arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
 arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
 arch/arm/include/asm/armv7.h               |  21 +-
 arch/arm/include/asm/barriers.h            |  44 ++
 arch/arm/mach-sunxi/dram_helpers.c         |   2 +-
 board/sunxi/board.c                        |   9 -
 configs/pine64_defconfig                   |  20 +
 configs/pine64_plus_defconfig              |  20 -
 include/configs/sunxi-common.h             |  18 +
 17 files changed, 910 insertions(+), 816 deletions(-)
 delete mode 100644 arch/arm/dts/a64.dtsi
 delete mode 100644 arch/arm/dts/pine64.dts
 delete mode 100644 arch/arm/dts/pine64_common.dtsi
 delete mode 100644 arch/arm/dts/pine64_plus.dts
 create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
 create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
 create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
 create mode 100644 arch/arm/dts/sun50i-a64.dtsi
 create mode 100644 arch/arm/include/asm/barriers.h
 create mode 100644 configs/pine64_defconfig
 delete mode 100644 configs/pine64_plus_defconfig

-- 
2.7.3

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
@ 2016-05-04 21:15 ` Andre Przywara
  2016-05-08  0:36   ` André Przywara
  2016-05-04 21:15 ` [U-Boot] [PATCH 2/6] Revert "sunxi: Reserve ATF memory space on A64" Andre Przywara
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

Commit bfb33f0bc45b ("sunxi: mctl_mem_matches: Add missing memory
barrier") broke compilation for the Pine64, as dram_helper.c now
includes <asm/armv7.h>, which does not compile on arm64.

Fix this by moving all barrier instructions into a separate header
file, which can easily be shared between arm and arm64.
Also extend the inline assembly to take the "sy" argument, which is
optional for ARMv7, but mandatory for v8.

This fixes compilation for 64-bit sunxi boards (Pine64).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/include/asm/armv7.h       | 21 +-----------------
 arch/arm/include/asm/barriers.h    | 44 ++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-sunxi/dram_helpers.c |  2 +-
 3 files changed, 46 insertions(+), 21 deletions(-)
 create mode 100644 arch/arm/include/asm/barriers.h

diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h
index 30e7939..423fc70 100644
--- a/arch/arm/include/asm/armv7.h
+++ b/arch/arm/include/asm/armv7.h
@@ -59,26 +59,7 @@
 #ifndef __ASSEMBLY__
 #include <linux/types.h>
 #include <asm/io.h>
-
-/*
- * CP15 Barrier instructions
- * Please note that we have separate barrier instructions in ARMv7
- * However, we use the CP15 based instructtions because we use
- * -march=armv5 in U-Boot
- */
-#define CP15ISB	asm volatile ("mcr     p15, 0, %0, c7, c5, 4" : : "r" (0))
-#define CP15DSB	asm volatile ("mcr     p15, 0, %0, c7, c10, 4" : : "r" (0))
-#define CP15DMB	asm volatile ("mcr     p15, 0, %0, c7, c10, 5" : : "r" (0))
-
-#ifdef __ARM_ARCH_7A__
-#define ISB	asm volatile ("isb" : : : "memory")
-#define DSB	asm volatile ("dsb" : : : "memory")
-#define DMB	asm volatile ("dmb" : : : "memory")
-#else
-#define ISB	CP15ISB
-#define DSB	CP15DSB
-#define DMB	CP15DMB
-#endif
+#include <asm/barriers.h>
 
 /*
  * Workaround for ARM errata # 798870
diff --git a/arch/arm/include/asm/barriers.h b/arch/arm/include/asm/barriers.h
new file mode 100644
index 0000000..37870f9
--- /dev/null
+++ b/arch/arm/include/asm/barriers.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 ARM Ltd.
+ *
+ * ARM and ARM64 barrier instructions
+ * split from armv7.h to allow sharing between ARM and ARM64
+ *
+ * Original copyright in armv7.h was:
+ * (C) Copyright 2010 Texas Instruments, <www.ti.com> Aneesh V <aneesh@ti.com>
+ *
+ * Much of the original barrier code was contributed by:
+ *   Valentine Barshak <valentine.barshak@cogentembedded.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef __BARRIERS_H__
+#define __BARRIERS_H__
+
+#ifndef __ASSEMBLY__
+
+#ifndef CONFIG_ARM64
+/*
+ * CP15 Barrier instructions
+ * Please note that we have separate barrier instructions in ARMv7
+ * However, we use the CP15 based instructtions because we use
+ * -march=armv5 in U-Boot
+ */
+#define CP15ISB	asm volatile ("mcr     p15, 0, %0, c7, c5, 4" : : "r" (0))
+#define CP15DSB	asm volatile ("mcr     p15, 0, %0, c7, c10, 4" : : "r" (0))
+#define CP15DMB	asm volatile ("mcr     p15, 0, %0, c7, c10, 5" : : "r" (0))
+
+#endif /* !CONFIG_ARM64 */
+
+#if defined(__ARM_ARCH_7A__) || defined(CONFIG_ARM64)
+#define ISB	asm volatile ("isb sy" : : : "memory")
+#define DSB	asm volatile ("dsb sy" : : : "memory")
+#define DMB	asm volatile ("dmb sy" : : : "memory")
+#else
+#define ISB	CP15ISB
+#define DSB	CP15DSB
+#define DMB	CP15DMB
+#endif
+
+#endif	/* __ASSEMBLY__ */
+#endif	/* __BARRIERS_H__ */
diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c
index e0c823a..20b430f 100644
--- a/arch/arm/mach-sunxi/dram_helpers.c
+++ b/arch/arm/mach-sunxi/dram_helpers.c
@@ -7,7 +7,7 @@
  */
 
 #include <common.h>
-#include <asm/armv7.h>
+#include <asm/barriers.h>
 #include <asm/io.h>
 #include <asm/arch/dram.h>
 
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 2/6] Revert "sunxi: Reserve ATF memory space on A64"
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
  2016-05-04 21:15 ` [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header Andre Przywara
@ 2016-05-04 21:15 ` Andre Przywara
  2016-05-15 10:12   ` [U-Boot] [U-Boot, " Hans de Goede
  2016-05-04 21:15 ` [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header Andre Przywara
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

The ARM Trusted Firmware (ATF) code now lives in SRAM on the Pine64/A64,
so we can claim the whole of DRAM for OS use.

This reverts commit 3ffe39ed2b66af71c7271d0cef2a248b5bf7dfdb.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 board/sunxi/board.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 3cf3614..ccf4129 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -133,15 +133,6 @@ int dram_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_MACH_SUN50I
-void dram_init_banksize(void)
-{
-	/* We need to reserve the first 16MB of RAM for ATF */
-	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + (16 * 1024 * 1024);
-	gd->bd->bi_dram[0].size = get_effective_memsize() - (16 * 1024 * 1024);
-}
-#endif
-
 #if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
 static void nand_pinmux_setup(void)
 {
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
  2016-05-04 21:15 ` [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header Andre Przywara
  2016-05-04 21:15 ` [U-Boot] [PATCH 2/6] Revert "sunxi: Reserve ATF memory space on A64" Andre Przywara
@ 2016-05-04 21:15 ` Andre Przywara
  2016-05-06 21:15   ` Steve Rae
  2016-05-15 10:13   ` [U-Boot] [U-Boot, " Hans de Goede
  2016-05-04 21:15 ` [U-Boot] [PATCH 4/6] arm64: sunxi: adjust default load addresses Andre Przywara
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

The Allwinner provided boot0 boot loader requires a header before the
U-Boot binary to both check its validity and to find other blobs to
load. There is a tool called boot0img which fills the header
appropriately.
Reserve some space at the beginning of the binary to later hold the
header if needed.
Please note that the header is jumped over already by U-Boot anyway,
so filling the header is optional and can be skipped if for instance
boot0 is not used.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/cpu/armv8/start.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index deb44a8..b4c4867 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -21,6 +21,9 @@
 _start:
 	b	reset
 
+#ifdef CONFIG_ARCH_SUNXI
+	.space 0x5fc	/* can be filled with a boot0 header if needed */
+#endif
 	.align 3
 
 .globl	_TEXT_BASE
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 4/6] arm64: sunxi: adjust default load addresses
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
                   ` (2 preceding siblings ...)
  2016-05-04 21:15 ` [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header Andre Przywara
@ 2016-05-04 21:15 ` Andre Przywara
  2016-05-15 10:12   ` [U-Boot] [U-Boot, " Hans de Goede
  2016-05-04 21:15 ` [U-Boot] [PATCH 5/6] arm64: Pine64: update FDT files Andre Przywara
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

As arm64 has slightly different expectations about load addresses, lets
use a different set of default addresses for things like the kernel.
As arm64 kernels don't come with a decompressor right now, reserve some
more space for really big uncompressed kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 include/configs/sunxi-common.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 2406115..16f1a2c 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -390,6 +390,23 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_PRE_CONSOLE_BUFFER
 #define CONFIG_PRE_CON_BUF_SZ		4096 /* Aprox 2 80*25 screens */
 
+#ifdef CONFIG_ARM64
+/*
+ * Boards seem to come with at least 512MB of DRAM.
+ * The kernel should go at 512K, which is the default text offset (that will
+ * be adjusted at runtime if needed).
+ * There is no compression for arm64 kernels (yet), so leave some space
+ * for really big kernels, say 256MB for now.
+ * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd.
+ * Align the initrd to a 2MB page.
+ */
+#define KERNEL_ADDR_R	__stringify(SDRAM_OFFSET(0080000))
+#define FDT_ADDR_R	__stringify(SDRAM_OFFSET(FA00000))
+#define SCRIPT_ADDR_R	__stringify(SDRAM_OFFSET(FC00000))
+#define PXEFILE_ADDR_R	__stringify(SDRAM_OFFSET(FD00000))
+#define RAMDISK_ADDR_R	__stringify(SDRAM_OFFSET(FE00000))
+
+#else
 /*
  * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc.
  * 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
@@ -401,6 +418,7 @@ extern int soft_i2c_gpio_scl;
 #define SCRIPT_ADDR_R  __stringify(SDRAM_OFFSET(3100000))
 #define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000))
 #define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000))
+#endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"bootm_size=0xa000000\0" \
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 5/6] arm64: Pine64: update FDT files
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
                   ` (3 preceding siblings ...)
  2016-05-04 21:15 ` [U-Boot] [PATCH 4/6] arm64: sunxi: adjust default load addresses Andre Przywara
@ 2016-05-04 21:15 ` Andre Przywara
  2016-05-15 10:13   ` [U-Boot] [U-Boot,5/6] " Hans de Goede
  2016-05-04 21:15 ` [U-Boot] [PATCH 6/6] Pine64: rename defconfig Andre Przywara
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

The originally committed .dts files for the Pine64 were from an early
proof-of-concept version and should have never been committed upstream.
Replace them with much more mature versions, which also use a different
naming scheme.
Please note that at this point there is at least one binding which has
not been agreed upon, so this is subject to change.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/dts/Makefile                      |   3 +-
 arch/arm/dts/a64.dtsi                      | 564 --------------------------
 arch/arm/dts/pine64.dts                    |  62 ---
 arch/arm/dts/pine64_common.dtsi            |  76 ----
 arch/arm/dts/pine64_plus.dts               |  63 ---
 arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
 arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
 arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
 arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
 configs/pine64_plus_defconfig              |   2 +-
 10 files changed, 824 insertions(+), 767 deletions(-)
 delete mode 100644 arch/arm/dts/a64.dtsi
 delete mode 100644 arch/arm/dts/pine64.dts
 delete mode 100644 arch/arm/dts/pine64_common.dtsi
 delete mode 100644 arch/arm/dts/pine64_plus.dts
 create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
 create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
 create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
 create mode 100644 arch/arm/dts/sun50i-a64.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index d1f8e22..bd68698 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -218,7 +218,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
 	sun8i-h3-orangepi-pc.dtb \
 	sun8i-h3-orangepi-plus.dtb
 dtb-$(CONFIG_MACH_SUN50I) += \
-	pine64_plus.dtb
+	sun50i-a64-pine64-plus.dtb \
+	sun50i-a64-pine64.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
 	sun9i-a80-optimus.dtb \
 	sun9i-a80-cubieboard4.dtb
diff --git a/arch/arm/dts/a64.dtsi b/arch/arm/dts/a64.dtsi
deleted file mode 100644
index f3ad000..0000000
--- a/arch/arm/dts/a64.dtsi
+++ /dev/null
@@ -1,564 +0,0 @@
-/*
- * Copyright (C) 2016 ARM Ltd.
- * based on the Allwinner H3 dtsi:
- * 	Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
- *
- * 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 <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/pinctrl/sun4i-a10.h>
-
-/ {
-	compatible = "allwinner,a64";
-	interrupt-parent = <&gic>;
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	aliases {
-		serial0 = &uart0;
-		serial1 = &uart1;
-		serial2 = &uart2;
-		serial3 = &uart3;
-		serial4 = &uart4;
-	};
-
-	cpus {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		cpu at 0 {
-			compatible = "arm,cortex-a53", "arm,armv8";
-			device_type = "cpu";
-			reg = <0>;
-			enable-method = "psci";
-		};
-
-		cpu at 1 {
-			compatible = "arm,cortex-a53", "arm,armv8";
-			device_type = "cpu";
-			reg = <1>;
-			enable-method = "psci";
-		};
-
-		cpu at 2 {
-			compatible = "arm,cortex-a53", "arm,armv8";
-			device_type = "cpu";
-			reg = <2>;
-			enable-method = "psci";
-		};
-
-		cpu at 3 {
-			compatible = "arm,cortex-a53", "arm,armv8";
-			device_type = "cpu";
-			reg = <3>;
-			enable-method = "psci";
-		};
-	};
-
-	psci {
-		compatible = "arm,psci-0.2", "arm,psci";
-		method = "smc";
-		cpu_suspend = <0xc4000001>;
-		cpu_off = <0x84000002>;
-		cpu_on = <0xc4000003>;
-	};
-
-        memory {
-		device_type = "memory";
-		reg = <0x40000000 0>;
-	};
-
-	timer {
-		compatible = "arm,armv8-timer";
-		interrupts = <GIC_PPI 13
-			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-			     <GIC_PPI 14
-			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-			     <GIC_PPI 11
-			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-			     <GIC_PPI 10
-			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-	};
-
-	clocks {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		osc24M: osc24M_clk {
-			#clock-cells = <0>;
-			compatible = "fixed-clock";
-			clock-frequency = <24000000>;
-			clock-output-names = "osc24M";
-		};
-
-		osc32k: osc32k_clk {
-			#clock-cells = <0>;
-			compatible = "fixed-clock";
-			clock-frequency = <32768>;
-			clock-output-names = "osc32k";
-		};
-
-		pll1: clk at 01c20000 {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun8i-a23-pll1-clk";
-			reg = <0x01c20000 0x4>;
-			clocks = <&osc24M>;
-			clock-output-names = "pll1";
-		};
-
-		pll6: clk at 01c20028 {
-			#clock-cells = <1>;
-			compatible = "allwinner,sun6i-a31-pll6-clk";
-			reg = <0x01c20028 0x4>;
-			clocks = <&osc24M>;
-			clock-output-names = "pll6", "pll6x2";
-		};
-
-		pll6d2: pll6d2_clk {
-			#clock-cells = <0>;
-			compatible = "fixed-factor-clock";
-			clock-div = <2>;
-			clock-mult = <1>;
-			clocks = <&pll6 0>;
-			clock-output-names = "pll6d2";
-		};
-
-		/* dummy clock until pll6 can be reused */
-		pll8: pll8_clk {
-			#clock-cells = <0>;
-			compatible = "fixed-clock";
-			clock-frequency = <1>;
-			clock-output-names = "pll8";
-		};
-
-		cpu: cpu_clk at 01c20050 {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun4i-a10-cpu-clk";
-			reg = <0x01c20050 0x4>;
-			clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
-			clock-output-names = "cpu";
-		};
-
-		axi: axi_clk at 01c20050 {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun4i-a10-axi-clk";
-			reg = <0x01c20050 0x4>;
-			clocks = <&cpu>;
-			clock-output-names = "axi";
-		};
-
-		ahb1: ahb1_clk at 01c20054 {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun6i-a31-ahb1-clk";
-			reg = <0x01c20054 0x4>;
-			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
-			clock-output-names = "ahb1";
-		};
-
-		ahb2: ahb2_clk at 01c2005c {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun8i-h3-ahb2-clk";
-			reg = <0x01c2005c 0x4>;
-			clocks = <&ahb1>, <&pll6d2>;
-			clock-output-names = "ahb2";
-		};
-
-		apb1: apb1_clk at 01c20054 {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun4i-a10-apb0-clk";
-			reg = <0x01c20054 0x4>;
-			clocks = <&ahb1>;
-			clock-output-names = "apb1";
-		};
-
-		apb2: apb2_clk at 01c20058 {
-			#clock-cells = <0>;
-			compatible = "allwinner,sun4i-a10-apb1-clk";
-			reg = <0x01c20058 0x4>;
-			clocks = <&osc32k>, <&osc24M>, <&pll6 1>, <&pll6 1>;
-			clock-output-names = "apb2";
-		};
-
-		bus_gates: clk at 01c20060 {
-			#clock-cells = <1>;
-			compatible = "allwinner,a64-bus-gates-clk",
-				     "allwinner,sun8i-h3-bus-gates-clk";
-			reg = <0x01c20060 0x14>;
-			clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
-			clock-names = "ahb1", "ahb2", "apb1", "apb2";
-			clock-indices = <1>,
-					<5>, <6>, <8>,
-					<9>, <10>, <13>,
-					<14>, <17>, <18>,
-					<19>, <20>,
-					<21>, <23>,
-					<24>, <25>,
-					<28>, <29>,
-					<32>, <35>,
-					<36>, <37>,
-					<40>, <43>,
-					<44>, <52>, <53>,
-					<54>, <64>,
-					<65>, <69>, <72>,
-					<76>, <77>, <78>,
-					<96>, <97>, <98>,
-					<101>,
-					<112>, <113>,
-					<114>, <115>,
-					<116>, <135>;
-			clock-output-names = "bus_mipidsi",
-					     "bus_ce", "bus_dma", "bus_mmc0",
-					     "bus_mmc1", "bus_mmc2", "bus_nand",
-					     "bus_sdram", "bus_gmac", "bus_ts",
-					     "bus_hstimer", "bus_spi0",
-					     "bus_spi1", "bus_otg",
-					     "bus_otg_ehci0", "bus_ehci0",
-					     "bus_otg_ohci0", "bus_ohci0",
-					     "bus_ve", "bus_lcd0",
-					     "bus_lcd1", "bus_deint",
-					     "bus_csi", "bus_hdmi",
-					     "bus_de", "bus_gpu", "bus_msgbox",
-					     "bus_spinlock", "bus_codec",
-					     "bus_spdif", "bus_pio", "bus_ths",
-					     "bus_i2s0", "bus_i2s1", "bus_i2s2",
-					     "bus_i2c0", "bus_i2c1", "bus_i2c2",
-					     "bus_scr",
-					     "bus_uart0", "bus_uart1",
-					     "bus_uart2", "bus_uart3",
-					     "bus_uart4", "bus_dbg";
-		};
-
-		mmc0_clk: clk at 01c20088 {
-			#clock-cells = <1>;
-			compatible = "allwinner,sun4i-a10-mmc-clk";
-			reg = <0x01c20088 0x4>;
-			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
-			clock-output-names = "mmc0",
-					     "mmc0_output",
-					     "mmc0_sample";
-		};
-
-		mmc1_clk: clk at 01c2008c {
-			#clock-cells = <1>;
-			compatible = "allwinner,sun4i-a10-mmc-clk";
-			reg = <0x01c2008c 0x4>;
-			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
-			clock-output-names = "mmc1",
-					     "mmc1_output",
-					     "mmc1_sample";
-		};
-
-		mmc2_clk: clk at 01c20090 {
-			#clock-cells = <1>;
-			compatible = "allwinner,sun4i-a10-mmc-clk";
-			reg = <0x01c20090 0x4>;
-			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
-			clock-output-names = "mmc2",
-					     "mmc2_output",
-					     "mmc2_sample";
-		};
-	};
-
-	regulators {
-		reg_vcc3v3: vcc3v3 {
-			compatible = "regulator-fixed";
-			regulator-name = "vcc3v3";
-			regulator-min-microvolt = <3300000>;
-			regulator-max-microvolt = <3300000>;
-		};
-	};
-
-	soc {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-
-		mmc0: mmc at 01c0f000 {
-			compatible = "allwinner,sun5i-a13-mmc";
-			reg = <0x01c0f000 0x1000>;
-			clocks = <&bus_gates 8>,
-				 <&mmc0_clk 0>,
-				 <&mmc0_clk 1>,
-				 <&mmc0_clk 2>;
-			clock-names = "ahb",
-				      "mmc",
-				      "output",
-				      "sample";
-			resets = <&ahb_rst 8>;
-			reset-names = "ahb";
-			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
-			status = "disabled";
-			#address-cells = <1>;
-			#size-cells = <0>;
-		};
-
-		mmc1: mmc at 01c10000 {
-			compatible = "allwinner,sun5i-a13-mmc";
-			reg = <0x01c10000 0x1000>;
-			clocks = <&bus_gates 9>,
-				 <&mmc1_clk 0>,
-				 <&mmc1_clk 1>,
-				 <&mmc1_clk 2>;
-			clock-names = "ahb",
-				      "mmc",
-				      "output",
-				      "sample";
-			resets = <&ahb_rst 9>;
-			reset-names = "ahb";
-			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
-			status = "disabled";
-			#address-cells = <1>;
-			#size-cells = <0>;
-		};
-
-		mmc2: mmc at 01c11000 {
-			compatible = "allwinner,sun5i-a13-mmc";
-			reg = <0x01c11000 0x1000>;
-			clocks = <&bus_gates 10>,
-				 <&mmc2_clk 0>,
-				 <&mmc2_clk 1>,
-				 <&mmc2_clk 2>;
-			clock-names = "ahb",
-				      "mmc",
-				      "output",
-				      "sample";
-			resets = <&ahb_rst 10>;
-			reset-names = "ahb";
-			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
-			status = "disabled";
-			#address-cells = <1>;
-			#size-cells = <0>;
-		};
-
-		pio: pinctrl at 01c20800 {
-			compatible = "allwinner,a64-pinctrl";
-			reg = <0x01c20800 0x400>;
-			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&bus_gates 69>;
-			gpio-controller;
-			#gpio-cells = <3>;
-			interrupt-controller;
-			#interrupt-cells = <2>;
-
-			uart0_pins_a: uart0 at 0 {
-				allwinner,pins = "PB8", "PB9";
-				allwinner,function = "uart0";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			uart0_pins_b: uart0 at 1 {
-				allwinner,pins = "PF2", "PF3";
-				allwinner,function = "uart0";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			uart1_pins: uart1 at 0 {
-				allwinner,pins = "PG6", "PG7", "PG8", "PG9";
-				allwinner,function = "uart1";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			uart2_pins: uart2 at 0 {
-				allwinner,pins = "PB0", "PB1", "PB2", "PB3";
-				allwinner,function = "uart2";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			uart3_pins_a: uart3 at 0 {
-				allwinner,pins = "PD0", "PD1";
-				allwinner,function = "uart3";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			uart3_pins_b: uart3 at 1 {
-				allwinner,pins = "PH4", "PH5", "PH6", "PH7";
-				allwinner,function = "uart3";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			uart4_pins: uart4 at 0 {
-				allwinner,pins = "PD2", "PD3", "PD4", "PD5";
-				allwinner,function = "uart4";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			mmc0_pins: mmc0 at 0 {
-				allwinner,pins = "PF0", "PF1", "PF2", "PF3",
-						 "PF4", "PF5";
-				allwinner,function = "mmc0";
-				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			mmc0_default_cd_pin: mmc0_cd_pin at 0 {
-				allwinner,pins = "PF6";
-				allwinner,function = "gpio_in";
-				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
-			};
-
-			mmc1_pins: mmc1 at 0 {
-				allwinner,pins = "PG0", "PG1", "PG2", "PG3",
-						 "PG4", "PG5";
-				allwinner,function = "mmc1";
-				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-
-			mmc2_pins: mmc2 at 0 {
-				allwinner,pins = "PC1", "PC5", "PC6", "PC8",
-						 "PC9", "PC10";
-				allwinner,function = "mmc2";
-				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
-				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
-			};
-		};
-
-		ahb_rst: reset at 01c202c0 {
-			#reset-cells = <1>;
-			compatible = "allwinner,sun6i-a31-ahb1-reset";
-			reg = <0x01c202c0 0xc>;
-		};
-
-		apb1_rst: reset at 01c202d0 {
-			#reset-cells = <1>;
-			compatible = "allwinner,sun6i-a31-clock-reset";
-			reg = <0x01c202d0 0x4>;
-		};
-
-		apb2_rst: reset at 01c202d8 {
-			#reset-cells = <1>;
-			compatible = "allwinner,sun6i-a31-clock-reset";
-			reg = <0x01c202d8 0x4>;
-		};
-
-		uart0: serial at 01c28000 {
-			compatible = "snps,dw-apb-uart";
-			reg = <0x01c28000 0x400>;
-			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
-			reg-shift = <2>;
-			reg-io-width = <4>;
-			clocks = <&bus_gates 112>;
-			resets = <&apb2_rst 16>;
-			reset-names = "apb2";
-			status = "disabled";
-		};
-
-		uart1: serial at 01c28400 {
-			compatible = "snps,dw-apb-uart";
-			reg = <0x01c28400 0x400>;
-			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
-			reg-shift = <2>;
-			reg-io-width = <4>;
-			clocks = <&bus_gates 113>;
-			resets = <&apb2_rst 17>;
-			reset-names = "apb2";
-			status = "disabled";
-		};
-
-		uart2: serial at 01c28800 {
-			compatible = "snps,dw-apb-uart";
-			reg = <0x01c28800 0x400>;
-			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-			reg-shift = <2>;
-			reg-io-width = <4>;
-			clocks = <&bus_gates 114>;
-			resets = <&apb2_rst 18>;
-			reset-names = "apb2";
-			status = "disabled";
-		};
-
-		uart3: serial at 01c28c00 {
-			compatible = "snps,dw-apb-uart";
-			reg = <0x01c28c00 0x400>;
-			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
-			reg-shift = <2>;
-			reg-io-width = <4>;
-			clocks = <&bus_gates 115>;
-			resets = <&apb2_rst 19>;
-			reset-names = "apb2";
-			status = "disabled";
-		};
-
-		uart4: serial at 01c29000 {
-			compatible = "snps,dw-apb-uart";
-			reg = <0x01c29000 0x400>;
-			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
-			reg-shift = <2>;
-			reg-io-width = <4>;
-			clocks = <&bus_gates 116>;
-			resets = <&apb2_rst 20>;
-			reset-names = "apb2";
-			status = "disabled";
-		};
-
-		rtc: rtc at 01f00000 {
-			compatible = "allwinner,sun6i-a31-rtc";
-			reg = <0x01f00000 0x54>;
-			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
-				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-		};
-	};
-
-	gic: interrupt-controller@{
-		compatible = "arm,gic-400";
-		interrupt-controller;
-		#interrupt-cells = <3>;
-		#address-cells = <0>;
-
-		reg = <0x01C81000 0x1000>,
-		      <0x01C82000 0x2000>,
-		      <0x01C84000 0x2000>,
-		      <0x01C86000 0x2000>;
-		interrupts = <GIC_PPI 9
-		      (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-	};
-};
diff --git a/arch/arm/dts/pine64.dts b/arch/arm/dts/pine64.dts
deleted file mode 100644
index dcc998f..0000000
--- a/arch/arm/dts/pine64.dts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2016 ARM Ltd.
- *
- * 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 library 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 library 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/;
-
-/memreserve/ 0x45000000 0x00200000;
-/memreserve/ 0x41010000 0x00010800;
-/memreserve/ 0x40100000 0x00006000;
-
-#include "pine64_common.dtsi"
-
-/ {
-	model = "Pine64";
-	compatible = "pine64,pine64", "allwinner,a64";
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	memory {
-		reg = <0x40000000 0x20000000>;
-	};
-};
diff --git a/arch/arm/dts/pine64_common.dtsi b/arch/arm/dts/pine64_common.dtsi
deleted file mode 100644
index d968d76..0000000
--- a/arch/arm/dts/pine64_common.dtsi
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2016 ARM Ltd.
- *
- * 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 library 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 library 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 "a64.dtsi"
-
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
-	vmmc-supply = <&reg_vcc3v3>;
-	cd-gpios = <&pio 5 6 0>;
-	cd-inverted;
-	status = "okay";
-};
-
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
-	status = "okay";
-};
-
-&uart2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_pins>;
-	status = "okay";
-};
-
-&uart3 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart3_pins_a>;
-	status = "okay";
-};
-
-&uart4 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart4_pins>;
-	status = "okay";
-};
diff --git a/arch/arm/dts/pine64_plus.dts b/arch/arm/dts/pine64_plus.dts
deleted file mode 100644
index 5daff51..0000000
--- a/arch/arm/dts/pine64_plus.dts
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2016 ARM Ltd.
- *
- * 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 library 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 library 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/;
-
-/memreserve/ 0x45000000 0x00200000;
-/memreserve/ 0x41010000 0x00010800;
-/memreserve/ 0x40100000 0x00006000;
-
-#include "pine64_common.dtsi"
-
-/ {
-	model = "Pine64+";
-	compatible = "pine64,pine64_plus", "allwinner,a64";
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	/* There is a model with 2GB of DRAM, but U-Boot fixes this for us. */
-	memory {
-		reg = <0x40000000 0x40000000>;
-	};
-};
diff --git a/arch/arm/dts/sun50i-a64-pine64-common.dtsi b/arch/arm/dts/sun50i-a64-pine64-common.dtsi
new file mode 100644
index 0000000..d5a7249
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-pine64-common.dtsi
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * 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 library 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 library 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 "sun50i-a64.dtsi"
+
+/ {
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	soc {
+		reg_vcc3v3: vcc3v3 {
+			compatible = "regulator-fixed";
+			regulator-name = "vcc3v3";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
+	vmmc-supply = <&reg_vcc3v3>;
+	cd-gpios = <&pio 5 6 0>;
+	cd-inverted;
+	status = "okay";
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins_a>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+};
diff --git a/arch/arm/dts/sun50i-a64-pine64-plus.dts b/arch/arm/dts/sun50i-a64-pine64-plus.dts
new file mode 100644
index 0000000..549dc15
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-pine64-plus.dts
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * 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 library 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 library 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 "sun50i-a64-pine64-common.dtsi"
+
+/ {
+	model = "Pine64+";
+	compatible = "pine64,pine64-plus", "allwinner,sun50i-a64";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	/* There is a model with 2GB of DRAM, but U-Boot fixes this for us. */
+	memory {
+		reg = <0x40000000 0x40000000>;
+	};
+};
diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts
new file mode 100644
index 0000000..ebe029e
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-pine64.dts
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2016 ARM Ltd.
+ *
+ * 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 library 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 library 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 "sun50i-a64-pine64-common.dtsi"
+
+/ {
+	model = "Pine64";
+	compatible = "pine64,pine64", "allwinner,sun50i-a64";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory {
+		reg = <0x40000000 0x20000000>;
+	};
+};
diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi
new file mode 100644
index 0000000..1bd436f
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64.dtsi
@@ -0,0 +1,624 @@
+/*
+ * Copyright (C) 2016 ARM Ltd.
+ * based on the Allwinner H3 dtsi:
+ *    Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
+ *
+ * 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 <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 0 {
+			compatible = "arm,cortex-a53", "arm,armv8";
+			device_type = "cpu";
+			reg = <0>;
+			enable-method = "psci";
+		};
+
+		cpu at 1 {
+			compatible = "arm,cortex-a53", "arm,armv8";
+			device_type = "cpu";
+			reg = <1>;
+			enable-method = "psci";
+		};
+
+		cpu at 2 {
+			compatible = "arm,cortex-a53", "arm,armv8";
+			device_type = "cpu";
+			reg = <2>;
+			enable-method = "psci";
+		};
+
+		cpu at 3 {
+			compatible = "arm,cortex-a53", "arm,armv8";
+			device_type = "cpu";
+			reg = <3>;
+			enable-method = "psci";
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x40000000 0>;
+	};
+
+	gic: interrupt-controller at 1c81000 {
+		compatible = "arm,gic-400";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		#address-cells = <0>;
+
+		reg = <0x01c81000 0x1000>,
+		      <0x01c82000 0x2000>,
+		      <0x01c84000 0x2000>,
+		      <0x01c86000 0x2000>;
+		interrupts = <GIC_PPI 9
+		      (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13
+			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+			     <GIC_PPI 14
+			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+			     <GIC_PPI 11
+			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+			     <GIC_PPI 10
+			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+	};
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		osc24M: osc24M_clk {
+			#clock-cells = <0>;
+			compatible = "fixed-clock";
+			clock-frequency = <24000000>;
+			clock-output-names = "osc24M";
+		};
+
+		osc32k: osc32k_clk {
+			#clock-cells = <0>;
+			compatible = "fixed-clock";
+			clock-frequency = <32768>;
+			clock-output-names = "osc32k";
+		};
+
+		pll1: pll1_clk at 1c20000 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun8i-a23-pll1-clk";
+			reg = <0x01c20000 0x4>;
+			clocks = <&osc24M>;
+			clock-output-names = "pll1";
+		};
+
+		pll6: pll6_clk at 1c20028 {
+			#clock-cells = <1>;
+			compatible = "allwinner,sun6i-a31-pll6-clk";
+			reg = <0x01c20028 0x4>;
+			clocks = <&osc24M>;
+			clock-output-names = "pll6", "pll6x2";
+		};
+
+		pll6d2: pll6d2_clk {
+			#clock-cells = <0>;
+			compatible = "fixed-factor-clock";
+			clock-div = <2>;
+			clock-mult = <1>;
+			clocks = <&pll6 0>;
+			clock-output-names = "pll6d2";
+		};
+
+		pll7: pll7_clk at 1c2002c {
+			#clock-cells = <1>;
+			compatible = "allwinner,sun6i-a31-pll6-clk";
+			reg = <0x01c2002c 0x4>;
+			clocks = <&osc24M>;
+			clock-output-names = "pll7", "pll7x2";
+		};
+
+		cpu: cpu_clk at 1c20050 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-cpu-clk";
+			reg = <0x01c20050 0x4>;
+			clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
+			clock-output-names = "cpu";
+			critical-clocks = <0>;
+		};
+
+		axi: axi_clk at 1c20050 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-axi-clk";
+			reg = <0x01c20050 0x4>;
+			clocks = <&cpu>;
+			clock-output-names = "axi";
+		};
+
+		ahb1: ahb1_clk at 1c20054 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun6i-a31-ahb1-clk";
+			reg = <0x01c20054 0x4>;
+			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
+			clock-output-names = "ahb1";
+		};
+
+		ahb2: ahb2_clk at 1c2005c {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun8i-h3-ahb2-clk";
+			reg = <0x01c2005c 0x4>;
+			clocks = <&ahb1>, <&pll6d2>;
+			clock-output-names = "ahb2";
+		};
+
+		apb1: apb1_clk at 1c20054 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-apb0-clk";
+			reg = <0x01c20054 0x4>;
+			clocks = <&ahb1>;
+			clock-output-names = "apb1";
+		};
+
+		apb2: apb2_clk at 1c20058 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-apb1-clk";
+			reg = <0x01c20058 0x4>;
+			clocks = <&osc32k>, <&osc24M>, <&pll6 1>, <&pll6 1>;
+			clock-output-names = "apb2";
+		};
+
+		bus_gates: bus_gates_clk at 1c20060 {
+			#clock-cells = <1>;
+			compatible = "allwinner,sun50i-a64-bus-gates-clk",
+				     "allwinner,sunxi-multi-bus-gates-clk";
+			reg = <0x01c20060 0x14>;
+			ahb1_parent {
+				clocks = <&ahb1>;
+				clock-indices = <1>, <5>,
+						<6>, <8>,
+						<9>, <10>,
+						<13>, <14>,
+						<18>, <19>,
+						<20>, <21>,
+						<23>, <24>,
+						<25>, <28>,
+						<32>, <35>,
+						<36>, <37>,
+						<40>, <43>,
+						<44>, <52>,
+						<53>, <54>,
+						<135>;
+				clock-output-names = "bus_mipidsi", "bus_ce",
+						"bus_dma", "bus_mmc0",
+						"bus_mmc1", "bus_mmc2",
+						"bus_nand", "bus_sdram",
+						"bus_ts", "bus_hstimer",
+						"bus_spi0", "bus_spi1",
+						"bus_otg", "bus_otg_ehci0",
+						"bus_ehci0", "bus_otg_ohci0",
+						"bus_ve", "bus_lcd0",
+						"bus_lcd1", "bus_deint",
+						"bus_csi", "bus_hdmi",
+						"bus_de", "bus_gpu",
+						"bus_msgbox", "bus_spinlock",
+						"bus_dbg";
+			};
+			ahb2_parent {
+				clocks = <&ahb2>;
+				clock-indices = <17>, <29>;
+				clock-output-names = "bus_gmac", "bus_ohci0";
+			};
+			apb1_parent {
+				clocks = <&apb1>;
+				clock-indices = <64>, <65>,
+						<69>, <72>,
+						<76>, <77>,
+						<78>;
+				clock-output-names = "bus_codec", "bus_spdif",
+						"bus_pio", "bus_ths",
+						"bus_i2s0", "bus_i2s1",
+						"bus_i2s2";
+			};
+			abp2_parent {
+				clocks = <&apb2>;
+				clock-indices = <96>, <97>,
+						<98>, <101>,
+						<112>, <113>,
+						<114>, <115>,
+						<116>;
+				clock-output-names = "bus_i2c0", "bus_i2c1",
+						"bus_i2c2", "bus_scr",
+						"bus_uart0", "bus_uart1",
+						"bus_uart2", "bus_uart3",
+						"bus_uart4";
+			};
+		};
+
+		mmc0_clk: mmc0_clk at 1c20088 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-mod0-clk";
+			reg = <0x01c20088 0x4>;
+			clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
+			clock-output-names = "mmc0";
+                };
+
+		mmc1_clk: mmc1_clk at 1c2008c {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-mod0-clk";
+			reg = <0x01c2008c 0x4>;
+			clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
+			clock-output-names = "mmc1";
+		};
+
+		mmc2_clk: mmc2_clk at 1c20090 {
+			#clock-cells = <0>;
+			compatible = "allwinner,sun4i-a10-mod0-clk";
+			reg = <0x01c20090 0x4>;
+			clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
+			clock-output-names = "mmc2";
+		};
+	};
+
+	soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		mmc0: mmc at 1c0f000 {
+			compatible = "allwinner,sun50i-a64-mmc",
+				     "allwinner,sun5i-a13-mmc";
+			reg = <0x01c0f000 0x1000>;
+			clocks = <&bus_gates 8>, <&mmc0_clk>,
+				 <&mmc0_clk>, <&mmc0_clk>;
+			clock-names = "ahb", "mmc",
+				      "output", "sample";
+			resets = <&ahb_rst 8>;
+			reset-names = "ahb";
+			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		mmc1: mmc at 1c10000 {
+			compatible = "allwinner,sun50i-a64-mmc",
+				     "allwinner,sun5i-a13-mmc";
+			reg = <0x01c10000 0x1000>;
+			clocks = <&bus_gates 9>, <&mmc1_clk>,
+				 <&mmc1_clk>, <&mmc1_clk>;
+			clock-names = "ahb", "mmc",
+				      "output", "sample";
+			resets = <&ahb_rst 9>;
+			reset-names = "ahb";
+			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		mmc2: mmc at 1c11000 {
+			compatible = "allwinner,sun50i-a64-mmc",
+				     "allwinner,sun5i-a13-mmc";
+			reg = <0x01c11000 0x1000>;
+			clocks = <&bus_gates 10>, <&mmc2_clk>,
+				 <&mmc2_clk>, <&mmc2_clk>;
+			clock-names = "ahb", "mmc",
+				      "output", "sample";
+			resets = <&ahb_rst 10>;
+			reset-names = "ahb";
+			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		pio: pinctrl at 1c20800 {
+			compatible = "allwinner,sun50i-a64-pinctrl";
+			reg = <0x01c20800 0x400>;
+			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&bus_gates 69>;
+			gpio-controller;
+			#gpio-cells = <3>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+
+			uart0_pins_a: uart0 at 0 {
+				allwinner,pins = "PB8", "PB9";
+				allwinner,function = "uart0";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart0_pins_b: uart0 at 1 {
+				allwinner,pins = "PF2", "PF3";
+				allwinner,function = "uart0";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart1_2pins: uart1_2 at 0 {
+				allwinner,pins = "PG6", "PG7";
+				allwinner,function = "uart1";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart1_4pins: uart1_4 at 0 {
+				allwinner,pins = "PG6", "PG7", "PG8", "PG9";
+				allwinner,function = "uart1";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart2_2pins: uart2_2 at 0 {
+				allwinner,pins = "PB0", "PB1";
+				allwinner,function = "uart2";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart2_4pins: uart2_4 at 0 {
+				allwinner,pins = "PB0", "PB1", "PB2", "PB3";
+				allwinner,function = "uart2";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart3_pins_a: uart3 at 0 {
+				allwinner,pins = "PD0", "PD1";
+				allwinner,function = "uart3";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart3_2pins_b: uart3_2 at 1 {
+				allwinner,pins = "PH4", "PH5";
+				allwinner,function = "uart3";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart3_4pins_b: uart3_4 at 1 {
+				allwinner,pins = "PH4", "PH5", "PH6", "PH7";
+				allwinner,function = "uart3";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart4_2pins: uart4_2 at 0 {
+				allwinner,pins = "PD2", "PD3";
+				allwinner,function = "uart4";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			uart4_4pins: uart4_4 at 0 {
+				allwinner,pins = "PD2", "PD3", "PD4", "PD5";
+				allwinner,function = "uart4";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			mmc0_pins: mmc0 at 0 {
+				allwinner,pins = "PF0", "PF1", "PF2", "PF3",
+						 "PF4", "PF5";
+				allwinner,function = "mmc0";
+				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			mmc0_default_cd_pin: mmc0_cd_pin at 0 {
+				allwinner,pins = "PF6";
+				allwinner,function = "gpio_in";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+			};
+
+			mmc1_pins: mmc1 at 0 {
+				allwinner,pins = "PG0", "PG1", "PG2", "PG3",
+						 "PG4", "PG5";
+				allwinner,function = "mmc1";
+				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			mmc2_pins: mmc2 at 0 {
+				allwinner,pins = "PC1", "PC5", "PC6", "PC8",
+						 "PC9", "PC10";
+				allwinner,function = "mmc2";
+				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			i2c0_pins: i2c0_pins {
+				allwinner,pins = "PH0", "PH1";
+				allwinner,function = "i2c0";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			i2c1_pins: i2c1_pins {
+				allwinner,pins = "PH2", "PH3";
+				allwinner,function = "i2c1";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
+			i2c2_pins: i2c2_pins {
+				allwinner,pins = "PE14", "PE15";
+				allwinner,function = "i2c2";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+		};
+
+		ahb_rst: reset at 1c202c0 {
+			#reset-cells = <1>;
+			compatible = "allwinner,sun6i-a31-clock-reset";
+			reg = <0x01c202c0 0xc>;
+		};
+
+		apb1_rst: reset at 1c202d0 {
+			#reset-cells = <1>;
+			compatible = "allwinner,sun6i-a31-clock-reset";
+			reg = <0x01c202d0 0x4>;
+		};
+
+		apb2_rst: reset at 1c202d8 {
+			#reset-cells = <1>;
+			compatible = "allwinner,sun6i-a31-clock-reset";
+			reg = <0x01c202d8 0x4>;
+		};
+
+		uart0: serial at 1c28000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x01c28000 0x400>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&bus_gates 112>;
+			resets = <&apb2_rst 16>;
+			status = "disabled";
+		};
+
+		uart1: serial at 1c28400 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x01c28400 0x400>;
+			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&bus_gates 113>;
+			resets = <&apb2_rst 17>;
+			status = "disabled";
+		};
+
+		uart2: serial at 1c28800 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x01c28800 0x400>;
+			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&bus_gates 114>;
+			resets = <&apb2_rst 18>;
+			status = "disabled";
+		};
+
+		uart3: serial at 1c28c00 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x01c28c00 0x400>;
+			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&bus_gates 115>;
+			resets = <&apb2_rst 19>;
+			status = "disabled";
+		};
+
+		uart4: serial at 1c29000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x01c29000 0x400>;
+			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+			reg-shift = <2>;
+			reg-io-width = <4>;
+			clocks = <&bus_gates 116>;
+			resets = <&apb2_rst 20>;
+			status = "disabled";
+		};
+
+		rtc: rtc at 1f00000 {
+			compatible = "allwinner,sun6i-a31-rtc";
+			reg = <0x01f00000 0x54>;
+			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
+		i2c0: i2c at 1c2ac00 {
+			compatible = "allwinner,sun6i-a31-i2c";
+			reg = <0x01c2ac00 0x400>;
+			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&bus_gates 96>;
+			resets = <&apb2_rst 0>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		i2c1: i2c at 1c2b000 {
+			compatible = "allwinner,sun6i-a31-i2c";
+			reg = <0x01c2b000 0x400>;
+			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&bus_gates 97>;
+			resets = <&apb2_rst 1>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		i2c2: i2c at 1c2b400 {
+			compatible = "allwinner,sun6i-a31-i2c";
+			reg = <0x01c2b400 0x400>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&bus_gates 98>;
+			resets = <&apb2_rst 2>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+	};
+};
diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
index 0494a9f..0977334 100644
--- a/configs/pine64_plus_defconfig
+++ b/configs/pine64_plus_defconfig
@@ -4,7 +4,7 @@ CONFIG_MACH_SUN50I=y
 CONFIG_DRAM_CLK=672
 CONFIG_DRAM_ZQ=3881915
 # CONFIG_VIDEO is not set
-CONFIG_DEFAULT_DEVICE_TREE="pine64_plus"
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_IMLS is not set
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 6/6] Pine64: rename defconfig
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
                   ` (4 preceding siblings ...)
  2016-05-04 21:15 ` [U-Boot] [PATCH 5/6] arm64: Pine64: update FDT files Andre Przywara
@ 2016-05-04 21:15 ` Andre Przywara
  2016-05-04 21:46   ` Peter Robinson
  2016-05-15 10:30   ` [U-Boot] [U-Boot,6/6] " Hans de Goede
  2016-05-04 21:53 ` [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Peter Robinson
  2016-05-06 15:09 ` Tom Rini
  7 siblings, 2 replies; 33+ messages in thread
From: Andre Przywara @ 2016-05-04 21:15 UTC (permalink / raw)
  To: u-boot

Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
pine64_defconfig.
The differences between the two versions (more RAM and a different
Ethernet PHY) don't justify two board versions, so lets stick with the
generic name and try to differentiate between the versions at runtime
if this is needed later.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 configs/pine64_defconfig      | 20 ++++++++++++++++++++
 configs/pine64_plus_defconfig | 20 --------------------
 2 files changed, 20 insertions(+), 20 deletions(-)
 create mode 100644 configs/pine64_defconfig
 delete mode 100644 configs/pine64_plus_defconfig

diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
new file mode 100644
index 0000000..0977334
--- /dev/null
+++ b/configs/pine64_defconfig
@@ -0,0 +1,20 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881915
+# CONFIG_VIDEO is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
deleted file mode 100644
index 0977334..0000000
--- a/configs/pine64_plus_defconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SUNXI=y
-CONFIG_MACH_SUN50I=y
-CONFIG_DRAM_CLK=672
-CONFIG_DRAM_ZQ=3881915
-# CONFIG_VIDEO is not set
-CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
-# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_IMLS is not set
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 6/6] Pine64: rename defconfig
  2016-05-04 21:15 ` [U-Boot] [PATCH 6/6] Pine64: rename defconfig Andre Przywara
@ 2016-05-04 21:46   ` Peter Robinson
  2016-05-04 22:14     ` André Przywara
  2016-05-15 10:30   ` [U-Boot] [U-Boot,6/6] " Hans de Goede
  1 sibling, 1 reply; 33+ messages in thread
From: Peter Robinson @ 2016-05-04 21:46 UTC (permalink / raw)
  To: u-boot

On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
> pine64_defconfig.
> The differences between the two versions (more RAM and a different
> Ethernet PHY) don't justify two board versions, so lets stick with the
> generic name and try to differentiate between the versions at runtime
> if this is needed later.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
>  configs/pine64_plus_defconfig | 20 --------------------
>  2 files changed, 20 insertions(+), 20 deletions(-)
>  create mode 100644 configs/pine64_defconfig
>  delete mode 100644 configs/pine64_plus_defconfig
>
> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
> new file mode 100644
> index 0000000..0977334
> --- /dev/null
> +++ b/configs/pine64_defconfig
> @@ -0,0 +1,20 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_MACH_SUN50I=y
> +CONFIG_DRAM_CLK=672
> +CONFIG_DRAM_ZQ=3881915
> +# CONFIG_VIDEO is not set
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"

If you're building a single u-boot for all variants of Pine64,
something which I'd prefer, I don't think we can just set a default
but rather need some logic to specify the DT name based on which board
is booting. This is done for example in the BeagleBone config to
detect the various variants of the BeagleBones.

Peter

> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_HUSH_PARSER=y
> +# CONFIG_CMD_IMLS is not set
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_MMC=y
> +# CONFIG_CMD_FPGA is not set
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_MII=y
> +CONFIG_CMD_PING=y
> +CONFIG_CMD_EXT2=y
> +CONFIG_CMD_EXT4=y
> +CONFIG_CMD_FAT=y
> +CONFIG_CMD_FS_GENERIC=y
> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
> deleted file mode 100644
> index 0977334..0000000
> --- a/configs/pine64_plus_defconfig
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -CONFIG_ARM=y
> -CONFIG_ARCH_SUNXI=y
> -CONFIG_MACH_SUN50I=y
> -CONFIG_DRAM_CLK=672
> -CONFIG_DRAM_ZQ=3881915
> -# CONFIG_VIDEO is not set
> -CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> -# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> -CONFIG_HUSH_PARSER=y
> -# CONFIG_CMD_IMLS is not set
> -# CONFIG_CMD_FLASH is not set
> -CONFIG_CMD_MMC=y
> -# CONFIG_CMD_FPGA is not set
> -CONFIG_CMD_DHCP=y
> -CONFIG_CMD_MII=y
> -CONFIG_CMD_PING=y
> -CONFIG_CMD_EXT2=y
> -CONFIG_CMD_EXT4=y
> -CONFIG_CMD_FAT=y
> -CONFIG_CMD_FS_GENERIC=y
> --
> 2.7.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
                   ` (5 preceding siblings ...)
  2016-05-04 21:15 ` [U-Boot] [PATCH 6/6] Pine64: rename defconfig Andre Przywara
@ 2016-05-04 21:53 ` Peter Robinson
  2016-05-04 22:05   ` André Przywara
  2016-05-06 15:09 ` Tom Rini
  7 siblings, 1 reply; 33+ messages in thread
From: Peter Robinson @ 2016-05-04 21:53 UTC (permalink / raw)
  To: u-boot

On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> This series improves the Pine64 support.
> The first patch fixes a build break, see details in the commit message.
> Patch 2/6 reverts a no longer needed memory reservation, as the firmware
> bits that used to live in DRAM now can reside in SRAM.
> To allow U-Boot to be easily loaded by Allwinner's boot0 loader, patch
> 3/6 reserves some space at the beginning of the image to (optionally)
> fit in a header required by boot0.
> Patch 4/6 adjusts the default load addresses in the environment to
> meet the arm64 requirements (especially the kernel load address).
> The device tree files included in the original Pine64 commit are
> outdated, so patch 5/6 replaces some with more mature versions and also
> adjusts the naming to match other sunxi boards.
> The final patch renames the _defconfig file to get rid of the _plus_
> insert.
>
> Please review, comment and apply, if possible.

I'll test this tomorrow on my 1Gb Plus board, it would be good to have
a README.pine64 with details about where to get the ATF firmware from
and how to use it with this u-boot to get a booted device something
similar to README.odroid

Peter

> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
> Bananapi compilation. If someone with a working buildman setup could
> test this for build regressions, I'd be grateful.
>
> Andre Przywara (6):
>   arm/arm64: Move barrier instructions into separate header
>   Revert "sunxi: Reserve ATF memory space on A64"
>   arm64: sunxi: reserve space for boot0 header
>   arm64: sunxi: adjust default load addresses
>   arm64: Pine64: update FDT files
>   Pine64: rename defconfig
>
>  arch/arm/cpu/armv8/start.S                 |   3 +
>  arch/arm/dts/Makefile                      |   3 +-
>  arch/arm/dts/a64.dtsi                      | 564 --------------------------
>  arch/arm/dts/pine64.dts                    |  62 ---
>  arch/arm/dts/pine64_common.dtsi            |  76 ----
>  arch/arm/dts/pine64_plus.dts               |  63 ---
>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
>  arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
>  arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
>  arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
>  arch/arm/include/asm/armv7.h               |  21 +-
>  arch/arm/include/asm/barriers.h            |  44 ++
>  arch/arm/mach-sunxi/dram_helpers.c         |   2 +-
>  board/sunxi/board.c                        |   9 -
>  configs/pine64_defconfig                   |  20 +
>  configs/pine64_plus_defconfig              |  20 -
>  include/configs/sunxi-common.h             |  18 +
>  17 files changed, 910 insertions(+), 816 deletions(-)
>  delete mode 100644 arch/arm/dts/a64.dtsi
>  delete mode 100644 arch/arm/dts/pine64.dts
>  delete mode 100644 arch/arm/dts/pine64_common.dtsi
>  delete mode 100644 arch/arm/dts/pine64_plus.dts
>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
>  create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
>  create mode 100644 arch/arm/dts/sun50i-a64.dtsi
>  create mode 100644 arch/arm/include/asm/barriers.h
>  create mode 100644 configs/pine64_defconfig
>  delete mode 100644 configs/pine64_plus_defconfig
>
> --
> 2.7.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-04 21:53 ` [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Peter Robinson
@ 2016-05-04 22:05   ` André Przywara
  2016-05-04 22:15     ` Peter Robinson
  0 siblings, 1 reply; 33+ messages in thread
From: André Przywara @ 2016-05-04 22:05 UTC (permalink / raw)
  To: u-boot

On 04/05/16 22:53, Peter Robinson wrote:
> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>> This series improves the Pine64 support.
>> The first patch fixes a build break, see details in the commit message.
>> Patch 2/6 reverts a no longer needed memory reservation, as the firmware
>> bits that used to live in DRAM now can reside in SRAM.
>> To allow U-Boot to be easily loaded by Allwinner's boot0 loader, patch
>> 3/6 reserves some space at the beginning of the image to (optionally)
>> fit in a header required by boot0.
>> Patch 4/6 adjusts the default load addresses in the environment to
>> meet the arm64 requirements (especially the kernel load address).
>> The device tree files included in the original Pine64 commit are
>> outdated, so patch 5/6 replaces some with more mature versions and also
>> adjusts the naming to match other sunxi boards.
>> The final patch renames the _defconfig file to get rid of the _plus_
>> insert.
>>
>> Please review, comment and apply, if possible.
> 
> I'll test this tomorrow on my 1Gb Plus board,

Thanks!

> it would be good to have
> a README.pine64 with details about where to get the ATF firmware from
> and how to use it with this u-boot to get a booted device something
> similar to README.odroid

Yes, I am on the documentation.
As we lack DRAM initialization at the moment, I use a tool to assemble
all the firmware bits together with boot0 into an image.
This should supersede Alex' pine64_image tool.
Shall this tool (written in C) also be part of U-Boot, say in the tools
directory? Or is this better pushed into the sunxi-tools repository?
Eventually with a proper SPL we will not need it anymore, so I refrained
from pushing it into U-Boot for now.

Cheers,
Andre.

> 
> Peter
> 
>> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
>> Bananapi compilation. If someone with a working buildman setup could
>> test this for build regressions, I'd be grateful.
>>
>> Andre Przywara (6):
>>   arm/arm64: Move barrier instructions into separate header
>>   Revert "sunxi: Reserve ATF memory space on A64"
>>   arm64: sunxi: reserve space for boot0 header
>>   arm64: sunxi: adjust default load addresses
>>   arm64: Pine64: update FDT files
>>   Pine64: rename defconfig
>>
>>  arch/arm/cpu/armv8/start.S                 |   3 +
>>  arch/arm/dts/Makefile                      |   3 +-
>>  arch/arm/dts/a64.dtsi                      | 564 --------------------------
>>  arch/arm/dts/pine64.dts                    |  62 ---
>>  arch/arm/dts/pine64_common.dtsi            |  76 ----
>>  arch/arm/dts/pine64_plus.dts               |  63 ---
>>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
>>  arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
>>  arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
>>  arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
>>  arch/arm/include/asm/armv7.h               |  21 +-
>>  arch/arm/include/asm/barriers.h            |  44 ++
>>  arch/arm/mach-sunxi/dram_helpers.c         |   2 +-
>>  board/sunxi/board.c                        |   9 -
>>  configs/pine64_defconfig                   |  20 +
>>  configs/pine64_plus_defconfig              |  20 -
>>  include/configs/sunxi-common.h             |  18 +
>>  17 files changed, 910 insertions(+), 816 deletions(-)
>>  delete mode 100644 arch/arm/dts/a64.dtsi
>>  delete mode 100644 arch/arm/dts/pine64.dts
>>  delete mode 100644 arch/arm/dts/pine64_common.dtsi
>>  delete mode 100644 arch/arm/dts/pine64_plus.dts
>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
>>  create mode 100644 arch/arm/dts/sun50i-a64.dtsi
>>  create mode 100644 arch/arm/include/asm/barriers.h
>>  create mode 100644 configs/pine64_defconfig
>>  delete mode 100644 configs/pine64_plus_defconfig
>>
>> --
>> 2.7.3
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 6/6] Pine64: rename defconfig
  2016-05-04 21:46   ` Peter Robinson
@ 2016-05-04 22:14     ` André Przywara
  2016-05-06 15:11       ` Tom Rini
  0 siblings, 1 reply; 33+ messages in thread
From: André Przywara @ 2016-05-04 22:14 UTC (permalink / raw)
  To: u-boot

On 04/05/16 22:46, Peter Robinson wrote:
> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
>> pine64_defconfig.
>> The differences between the two versions (more RAM and a different
>> Ethernet PHY) don't justify two board versions, so lets stick with the
>> generic name and try to differentiate between the versions at runtime
>> if this is needed later.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
>>  configs/pine64_plus_defconfig | 20 --------------------
>>  2 files changed, 20 insertions(+), 20 deletions(-)
>>  create mode 100644 configs/pine64_defconfig
>>  delete mode 100644 configs/pine64_plus_defconfig
>>
>> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
>> new file mode 100644
>> index 0000000..0977334
>> --- /dev/null
>> +++ b/configs/pine64_defconfig
>> @@ -0,0 +1,20 @@
>> +CONFIG_ARM=y
>> +CONFIG_ARCH_SUNXI=y
>> +CONFIG_MACH_SUN50I=y
>> +CONFIG_DRAM_CLK=672
>> +CONFIG_DRAM_ZQ=3881915
>> +# CONFIG_VIDEO is not set
>> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> 
> If you're building a single u-boot for all variants of Pine64,

Yes!

> something which I'd prefer, I don't think we can just set a default
> but rather need some logic to specify the DT name based on which board
> is booting. This is done for example in the BeagleBone config to
> detect the various variants of the BeagleBones.

OK, I will look at this.

I wonder if we can just use the plus .dts and then remove the parts that
the non-plus is missing and push that through to the kernel.
U-Boot already takes care of one difference: the DRAM size.
I think we could also detect the different Ethernet PHY (or deduce this
from the DRAM size?) and fix that up.
For the third difference - camera and LCD connectors - U-Boot itself
doesn't even care. But it would be nice if having a 512 MB board would
result in the respective DT nodes to be deleted.
This way we would have _one_ DT source - the U-Boot repository - and
automatically deliver a fixed up version to every OS.

What do you think?

Cheers,
Andre.

>> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>> +CONFIG_HUSH_PARSER=y
>> +# CONFIG_CMD_IMLS is not set
>> +# CONFIG_CMD_FLASH is not set
>> +CONFIG_CMD_MMC=y
>> +# CONFIG_CMD_FPGA is not set
>> +CONFIG_CMD_DHCP=y
>> +CONFIG_CMD_MII=y
>> +CONFIG_CMD_PING=y
>> +CONFIG_CMD_EXT2=y
>> +CONFIG_CMD_EXT4=y
>> +CONFIG_CMD_FAT=y
>> +CONFIG_CMD_FS_GENERIC=y
>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
>> deleted file mode 100644
>> index 0977334..0000000
>> --- a/configs/pine64_plus_defconfig
>> +++ /dev/null
>> @@ -1,20 +0,0 @@
>> -CONFIG_ARM=y
>> -CONFIG_ARCH_SUNXI=y
>> -CONFIG_MACH_SUN50I=y
>> -CONFIG_DRAM_CLK=672
>> -CONFIG_DRAM_ZQ=3881915
>> -# CONFIG_VIDEO is not set
>> -CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
>> -# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>> -CONFIG_HUSH_PARSER=y
>> -# CONFIG_CMD_IMLS is not set
>> -# CONFIG_CMD_FLASH is not set
>> -CONFIG_CMD_MMC=y
>> -# CONFIG_CMD_FPGA is not set
>> -CONFIG_CMD_DHCP=y
>> -CONFIG_CMD_MII=y
>> -CONFIG_CMD_PING=y
>> -CONFIG_CMD_EXT2=y
>> -CONFIG_CMD_EXT4=y
>> -CONFIG_CMD_FAT=y
>> -CONFIG_CMD_FS_GENERIC=y
>> --
>> 2.7.3
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-04 22:05   ` André Przywara
@ 2016-05-04 22:15     ` Peter Robinson
  2016-05-04 22:36       ` André Przywara
  0 siblings, 1 reply; 33+ messages in thread
From: Peter Robinson @ 2016-05-04 22:15 UTC (permalink / raw)
  To: u-boot

On Wed, May 4, 2016 at 11:05 PM, Andr? Przywara <andre.przywara@arm.com> wrote:
> On 04/05/16 22:53, Peter Robinson wrote:
>> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>>> This series improves the Pine64 support.
>>> The first patch fixes a build break, see details in the commit message.
>>> Patch 2/6 reverts a no longer needed memory reservation, as the firmware
>>> bits that used to live in DRAM now can reside in SRAM.
>>> To allow U-Boot to be easily loaded by Allwinner's boot0 loader, patch
>>> 3/6 reserves some space at the beginning of the image to (optionally)
>>> fit in a header required by boot0.
>>> Patch 4/6 adjusts the default load addresses in the environment to
>>> meet the arm64 requirements (especially the kernel load address).
>>> The device tree files included in the original Pine64 commit are
>>> outdated, so patch 5/6 replaces some with more mature versions and also
>>> adjusts the naming to match other sunxi boards.
>>> The final patch renames the _defconfig file to get rid of the _plus_
>>> insert.
>>>
>>> Please review, comment and apply, if possible.
>>
>> I'll test this tomorrow on my 1Gb Plus board,
>
> Thanks!
>
>> it would be good to have
>> a README.pine64 with details about where to get the ATF firmware from
>> and how to use it with this u-boot to get a booted device something
>> similar to README.odroid
>
> Yes, I am on the documentation.

Cool, btw what's the redistribution license on the ATF firmware, is it
redistributable by distributions (like other firmware), is it usable
on all devices with a AllWinner A64? Will it be needed with the proper
SPL you mention below?

> As we lack DRAM initialization at the moment, I use a tool to assemble
> all the firmware bits together with boot0 into an image.
> This should supersede Alex' pine64_image tool.

OK, I've been using Alex's tool to date.

> Shall this tool (written in C) also be part of U-Boot, say in the tools
> directory? Or is this better pushed into the sunxi-tools repository?
> Eventually with a proper SPL we will not need it anymore, so I refrained
> from pushing it into U-Boot for now.

TBH I've no idea what's best here, I suppose it depends on timeframes,
it might just be useful to put it in a git repo somewhere and
reference it in a readme, once there's patches that have the proper
SPL update the readme as part of it.

Peter

> Cheers,
> Andre.
>
>>
>> Peter
>>
>>> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
>>> Bananapi compilation. If someone with a working buildman setup could
>>> test this for build regressions, I'd be grateful.
>>>
>>> Andre Przywara (6):
>>>   arm/arm64: Move barrier instructions into separate header
>>>   Revert "sunxi: Reserve ATF memory space on A64"
>>>   arm64: sunxi: reserve space for boot0 header
>>>   arm64: sunxi: adjust default load addresses
>>>   arm64: Pine64: update FDT files
>>>   Pine64: rename defconfig
>>>
>>>  arch/arm/cpu/armv8/start.S                 |   3 +
>>>  arch/arm/dts/Makefile                      |   3 +-
>>>  arch/arm/dts/a64.dtsi                      | 564 --------------------------
>>>  arch/arm/dts/pine64.dts                    |  62 ---
>>>  arch/arm/dts/pine64_common.dtsi            |  76 ----
>>>  arch/arm/dts/pine64_plus.dts               |  63 ---
>>>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
>>>  arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
>>>  arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
>>>  arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
>>>  arch/arm/include/asm/armv7.h               |  21 +-
>>>  arch/arm/include/asm/barriers.h            |  44 ++
>>>  arch/arm/mach-sunxi/dram_helpers.c         |   2 +-
>>>  board/sunxi/board.c                        |   9 -
>>>  configs/pine64_defconfig                   |  20 +
>>>  configs/pine64_plus_defconfig              |  20 -
>>>  include/configs/sunxi-common.h             |  18 +
>>>  17 files changed, 910 insertions(+), 816 deletions(-)
>>>  delete mode 100644 arch/arm/dts/a64.dtsi
>>>  delete mode 100644 arch/arm/dts/pine64.dts
>>>  delete mode 100644 arch/arm/dts/pine64_common.dtsi
>>>  delete mode 100644 arch/arm/dts/pine64_plus.dts
>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
>>>  create mode 100644 arch/arm/dts/sun50i-a64.dtsi
>>>  create mode 100644 arch/arm/include/asm/barriers.h
>>>  create mode 100644 configs/pine64_defconfig
>>>  delete mode 100644 configs/pine64_plus_defconfig
>>>
>>> --
>>> 2.7.3
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-04 22:15     ` Peter Robinson
@ 2016-05-04 22:36       ` André Przywara
  2016-05-05  1:03         ` Chen-Yu Tsai
  0 siblings, 1 reply; 33+ messages in thread
From: André Przywara @ 2016-05-04 22:36 UTC (permalink / raw)
  To: u-boot

On 04/05/16 23:15, Peter Robinson wrote:
> On Wed, May 4, 2016 at 11:05 PM, Andr? Przywara <andre.przywara@arm.com> wrote:
>> On 04/05/16 22:53, Peter Robinson wrote:
>>> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>>>> This series improves the Pine64 support.
>>>> The first patch fixes a build break, see details in the commit message.
>>>> Patch 2/6 reverts a no longer needed memory reservation, as the firmware
>>>> bits that used to live in DRAM now can reside in SRAM.
>>>> To allow U-Boot to be easily loaded by Allwinner's boot0 loader, patch
>>>> 3/6 reserves some space at the beginning of the image to (optionally)
>>>> fit in a header required by boot0.
>>>> Patch 4/6 adjusts the default load addresses in the environment to
>>>> meet the arm64 requirements (especially the kernel load address).
>>>> The device tree files included in the original Pine64 commit are
>>>> outdated, so patch 5/6 replaces some with more mature versions and also
>>>> adjusts the naming to match other sunxi boards.
>>>> The final patch renames the _defconfig file to get rid of the _plus_
>>>> insert.
>>>>
>>>> Please review, comment and apply, if possible.
>>>
>>> I'll test this tomorrow on my 1Gb Plus board,
>>
>> Thanks!
>>
>>> it would be good to have
>>> a README.pine64 with details about where to get the ATF firmware from
>>> and how to use it with this u-boot to get a booted device something
>>> similar to README.odroid
>>
>> Yes, I am on the documentation.
> 
> Cool, btw what's the redistribution license on the ATF firmware, is it
> redistributable by distributions (like other firmware),

ATF is the "ARM Trusted Firmware", which is a proper OpenSource project
under a BSD license. The home is on github [1].
In the moment I am working with an Allwinner provided codebase and
having fixes on top, but I removed quite some useless code already and
started with a proper upstream port.
I will push the repository onto my github fork [2] (once I manage to get
off mail and IRC ;-)

> is it usable on all devices with a AllWinner A64?

I would think so. A good part of the code in there is about the cores
and the GIC: so pretty generic. In the moment all power management is on
a SoC level - but in the future we might drive the PMIC from ATF as
well, which would potentially differ between boards.

> Will it be needed with the proper SPL you mention below?

Yes, the most prominent feature that ATF provides on the Pine64 is the
PSCI service. ATF is actually the PSCI reference implementation, so it
does the right thing and is more advanced than what U-Boot provides, for
instance.
Also ATF cares about some errata fixups for various cores, some of them
can only be provided by firmware (in EL3).

So I think ATF should take over the actual firmware load that U-Boot
carried in the past for various boards as well.
For the Pine64 I would very much like U-Boot to be just a boot loader.

>> As we lack DRAM initialization at the moment, I use a tool to assemble
>> all the firmware bits together with boot0 into an image.
>> This should supersede Alex' pine64_image tool.
> 
> OK, I've been using Alex's tool to date.
> 
>> Shall this tool (written in C) also be part of U-Boot, say in the tools
>> directory? Or is this better pushed into the sunxi-tools repository?
>> Eventually with a proper SPL we will not need it anymore, so I refrained
>> from pushing it into U-Boot for now.
> 
> TBH I've no idea what's best here, I suppose it depends on timeframes,
> it might just be useful to put it in a git repo somewhere and
> reference it in a readme, once there's patches that have the proper
> SPL update the readme as part of it.

Yes, expect it to appear on [3] anytime soon.

Cheers,
Andre.

[1] https://github.com/ARM-software/arm-trusted-firmware
[2] https://github.com/apritzel/arm-trusted-firmware
[3] https://github.com/apritzel/pine64

>>>
>>>> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
>>>> Bananapi compilation. If someone with a working buildman setup could
>>>> test this for build regressions, I'd be grateful.
>>>>
>>>> Andre Przywara (6):
>>>>   arm/arm64: Move barrier instructions into separate header
>>>>   Revert "sunxi: Reserve ATF memory space on A64"
>>>>   arm64: sunxi: reserve space for boot0 header
>>>>   arm64: sunxi: adjust default load addresses
>>>>   arm64: Pine64: update FDT files
>>>>   Pine64: rename defconfig
>>>>
>>>>  arch/arm/cpu/armv8/start.S                 |   3 +
>>>>  arch/arm/dts/Makefile                      |   3 +-
>>>>  arch/arm/dts/a64.dtsi                      | 564 --------------------------
>>>>  arch/arm/dts/pine64.dts                    |  62 ---
>>>>  arch/arm/dts/pine64_common.dtsi            |  76 ----
>>>>  arch/arm/dts/pine64_plus.dts               |  63 ---
>>>>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
>>>>  arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
>>>>  arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
>>>>  arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
>>>>  arch/arm/include/asm/armv7.h               |  21 +-
>>>>  arch/arm/include/asm/barriers.h            |  44 ++
>>>>  arch/arm/mach-sunxi/dram_helpers.c         |   2 +-
>>>>  board/sunxi/board.c                        |   9 -
>>>>  configs/pine64_defconfig                   |  20 +
>>>>  configs/pine64_plus_defconfig              |  20 -
>>>>  include/configs/sunxi-common.h             |  18 +
>>>>  17 files changed, 910 insertions(+), 816 deletions(-)
>>>>  delete mode 100644 arch/arm/dts/a64.dtsi
>>>>  delete mode 100644 arch/arm/dts/pine64.dts
>>>>  delete mode 100644 arch/arm/dts/pine64_common.dtsi
>>>>  delete mode 100644 arch/arm/dts/pine64_plus.dts
>>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
>>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
>>>>  create mode 100644 arch/arm/dts/sun50i-a64.dtsi
>>>>  create mode 100644 arch/arm/include/asm/barriers.h
>>>>  create mode 100644 configs/pine64_defconfig
>>>>  delete mode 100644 configs/pine64_plus_defconfig
>>>>
>>>> --
>>>> 2.7.3
>>>>
>>>> _______________________________________________
>>>> U-Boot mailing list
>>>> U-Boot at lists.denx.de
>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>
>>
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-04 22:36       ` André Przywara
@ 2016-05-05  1:03         ` Chen-Yu Tsai
  0 siblings, 0 replies; 33+ messages in thread
From: Chen-Yu Tsai @ 2016-05-05  1:03 UTC (permalink / raw)
  To: u-boot

On Thu, May 5, 2016 at 6:36 AM, Andr? Przywara <andre.przywara@arm.com> wrote:
> On 04/05/16 23:15, Peter Robinson wrote:
>> On Wed, May 4, 2016 at 11:05 PM, Andr? Przywara <andre.przywara@arm.com> wrote:
>>> On 04/05/16 22:53, Peter Robinson wrote:
>>>> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>>>>> This series improves the Pine64 support.
>>>>> The first patch fixes a build break, see details in the commit message.
>>>>> Patch 2/6 reverts a no longer needed memory reservation, as the firmware
>>>>> bits that used to live in DRAM now can reside in SRAM.
>>>>> To allow U-Boot to be easily loaded by Allwinner's boot0 loader, patch
>>>>> 3/6 reserves some space at the beginning of the image to (optionally)
>>>>> fit in a header required by boot0.
>>>>> Patch 4/6 adjusts the default load addresses in the environment to
>>>>> meet the arm64 requirements (especially the kernel load address).
>>>>> The device tree files included in the original Pine64 commit are
>>>>> outdated, so patch 5/6 replaces some with more mature versions and also
>>>>> adjusts the naming to match other sunxi boards.
>>>>> The final patch renames the _defconfig file to get rid of the _plus_
>>>>> insert.
>>>>>
>>>>> Please review, comment and apply, if possible.
>>>>
>>>> I'll test this tomorrow on my 1Gb Plus board,
>>>
>>> Thanks!
>>>
>>>> it would be good to have
>>>> a README.pine64 with details about where to get the ATF firmware from
>>>> and how to use it with this u-boot to get a booted device something
>>>> similar to README.odroid
>>>
>>> Yes, I am on the documentation.
>>
>> Cool, btw what's the redistribution license on the ATF firmware, is it
>> redistributable by distributions (like other firmware),
>
> ATF is the "ARM Trusted Firmware", which is a proper OpenSource project
> under a BSD license. The home is on github [1].
> In the moment I am working with an Allwinner provided codebase and
> having fixes on top, but I removed quite some useless code already and
> started with a proper upstream port.
> I will push the repository onto my github fork [2] (once I manage to get
> off mail and IRC ;-)
>
>> is it usable on all devices with a AllWinner A64?
>
> I would think so. A good part of the code in there is about the cores
> and the GIC: so pretty generic. In the moment all power management is on
> a SoC level - but in the future we might drive the PMIC from ATF as
> well, which would potentially differ between boards.

Unlikely, unless the board vendor has awesome hardware design skills.
The SoC and PMIC are sold as a packaged set. One does not go without
the other.

If you look at the PMIC datasheets, you'll see the application design
example and default settings match perfectly with the SoC.

ChenYu

>
>> Will it be needed with the proper SPL you mention below?
>
> Yes, the most prominent feature that ATF provides on the Pine64 is the
> PSCI service. ATF is actually the PSCI reference implementation, so it
> does the right thing and is more advanced than what U-Boot provides, for
> instance.
> Also ATF cares about some errata fixups for various cores, some of them
> can only be provided by firmware (in EL3).
>
> So I think ATF should take over the actual firmware load that U-Boot
> carried in the past for various boards as well.
> For the Pine64 I would very much like U-Boot to be just a boot loader.
>
>>> As we lack DRAM initialization at the moment, I use a tool to assemble
>>> all the firmware bits together with boot0 into an image.
>>> This should supersede Alex' pine64_image tool.
>>
>> OK, I've been using Alex's tool to date.
>>
>>> Shall this tool (written in C) also be part of U-Boot, say in the tools
>>> directory? Or is this better pushed into the sunxi-tools repository?
>>> Eventually with a proper SPL we will not need it anymore, so I refrained
>>> from pushing it into U-Boot for now.
>>
>> TBH I've no idea what's best here, I suppose it depends on timeframes,
>> it might just be useful to put it in a git repo somewhere and
>> reference it in a readme, once there's patches that have the proper
>> SPL update the readme as part of it.
>
> Yes, expect it to appear on [3] anytime soon.
>
> Cheers,
> Andre.
>
> [1] https://github.com/ARM-software/arm-trusted-firmware
> [2] https://github.com/apritzel/arm-trusted-firmware
> [3] https://github.com/apritzel/pine64
>
>>>>
>>>>> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
>>>>> Bananapi compilation. If someone with a working buildman setup could
>>>>> test this for build regressions, I'd be grateful.
>>>>>
>>>>> Andre Przywara (6):
>>>>>   arm/arm64: Move barrier instructions into separate header
>>>>>   Revert "sunxi: Reserve ATF memory space on A64"
>>>>>   arm64: sunxi: reserve space for boot0 header
>>>>>   arm64: sunxi: adjust default load addresses
>>>>>   arm64: Pine64: update FDT files
>>>>>   Pine64: rename defconfig
>>>>>
>>>>>  arch/arm/cpu/armv8/start.S                 |   3 +
>>>>>  arch/arm/dts/Makefile                      |   3 +-
>>>>>  arch/arm/dts/a64.dtsi                      | 564 --------------------------
>>>>>  arch/arm/dts/pine64.dts                    |  62 ---
>>>>>  arch/arm/dts/pine64_common.dtsi            |  76 ----
>>>>>  arch/arm/dts/pine64_plus.dts               |  63 ---
>>>>>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
>>>>>  arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
>>>>>  arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
>>>>>  arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
>>>>>  arch/arm/include/asm/armv7.h               |  21 +-
>>>>>  arch/arm/include/asm/barriers.h            |  44 ++
>>>>>  arch/arm/mach-sunxi/dram_helpers.c         |   2 +-
>>>>>  board/sunxi/board.c                        |   9 -
>>>>>  configs/pine64_defconfig                   |  20 +
>>>>>  configs/pine64_plus_defconfig              |  20 -
>>>>>  include/configs/sunxi-common.h             |  18 +
>>>>>  17 files changed, 910 insertions(+), 816 deletions(-)
>>>>>  delete mode 100644 arch/arm/dts/a64.dtsi
>>>>>  delete mode 100644 arch/arm/dts/pine64.dts
>>>>>  delete mode 100644 arch/arm/dts/pine64_common.dtsi
>>>>>  delete mode 100644 arch/arm/dts/pine64_plus.dts
>>>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>>>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
>>>>>  create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
>>>>>  create mode 100644 arch/arm/dts/sun50i-a64.dtsi
>>>>>  create mode 100644 arch/arm/include/asm/barriers.h
>>>>>  create mode 100644 configs/pine64_defconfig
>>>>>  delete mode 100644 configs/pine64_plus_defconfig
>>>>>
>>>>> --
>>>>> 2.7.3
>>>>>
>>>>> _______________________________________________
>>>>> U-Boot mailing list
>>>>> U-Boot at lists.denx.de
>>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>>
>>>
>>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
                   ` (6 preceding siblings ...)
  2016-05-04 21:53 ` [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Peter Robinson
@ 2016-05-06 15:09 ` Tom Rini
  2016-05-06 17:03   ` Andre Przywara
  7 siblings, 1 reply; 33+ messages in thread
From: Tom Rini @ 2016-05-06 15:09 UTC (permalink / raw)
  To: u-boot

On Wed, May 04, 2016 at 10:15:28PM +0100, Andre Przywara wrote:

[snip]
> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
> Bananapi compilation. If someone with a working buildman setup could
> test this for build regressions, I'd be grateful.

This is good feedback.  FWIW, you can just do ./tools/buildman/buildman
-p /path/to/toolchain-prefix- 

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160506/28ccbb40/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 6/6] Pine64: rename defconfig
  2016-05-04 22:14     ` André Przywara
@ 2016-05-06 15:11       ` Tom Rini
  2016-05-06 15:20         ` Andre Przywara
  0 siblings, 1 reply; 33+ messages in thread
From: Tom Rini @ 2016-05-06 15:11 UTC (permalink / raw)
  To: u-boot

On Wed, May 04, 2016 at 11:14:39PM +0100, Andr? Przywara wrote:
> On 04/05/16 22:46, Peter Robinson wrote:
> > On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> >> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
> >> pine64_defconfig.
> >> The differences between the two versions (more RAM and a different
> >> Ethernet PHY) don't justify two board versions, so lets stick with the
> >> generic name and try to differentiate between the versions at runtime
> >> if this is needed later.
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
> >>  configs/pine64_plus_defconfig | 20 --------------------
> >>  2 files changed, 20 insertions(+), 20 deletions(-)
> >>  create mode 100644 configs/pine64_defconfig
> >>  delete mode 100644 configs/pine64_plus_defconfig
> >>
> >> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
> >> new file mode 100644
> >> index 0000000..0977334
> >> --- /dev/null
> >> +++ b/configs/pine64_defconfig
> >> @@ -0,0 +1,20 @@
> >> +CONFIG_ARM=y
> >> +CONFIG_ARCH_SUNXI=y
> >> +CONFIG_MACH_SUN50I=y
> >> +CONFIG_DRAM_CLK=672
> >> +CONFIG_DRAM_ZQ=3881915
> >> +# CONFIG_VIDEO is not set
> >> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> > 
> > If you're building a single u-boot for all variants of Pine64,
> 
> Yes!
> 
> > something which I'd prefer, I don't think we can just set a default
> > but rather need some logic to specify the DT name based on which board
> > is booting. This is done for example in the BeagleBone config to
> > detect the various variants of the BeagleBones.
> 
> OK, I will look at this.
> 
> I wonder if we can just use the plus .dts and then remove the parts that
> the non-plus is missing and push that through to the kernel.
> U-Boot already takes care of one difference: the DRAM size.
> I think we could also detect the different Ethernet PHY (or deduce this
> from the DRAM size?) and fix that up.
> For the third difference - camera and LCD connectors - U-Boot itself
> doesn't even care. But it would be nice if having a 512 MB board would
> result in the respective DT nodes to be deleted.
> This way we would have _one_ DT source - the U-Boot repository - and
> automatically deliver a fixed up version to every OS.
> 
> What do you think?

How well can you at run time determine which variant of pine we're on?
What's coming after v2016.05 is a whole bunch of examples of supporting
N similar but different boards that we can runtime detect and picking
the appropriate DT to use.  That however is at the SPL level.  We need
to I suppose think about how to do something similar at the U-Boot level
itself.

In terms of trying to "fixup" things, if you don't want to handle them
at the kernel level as overlays, there's examples today of using 'fdt
...' to whack nodes as needed I'm fairly certain.  It does depend on
being able to tell at runtime what you're on of course.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160506/d3e771ab/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 6/6] Pine64: rename defconfig
  2016-05-06 15:11       ` Tom Rini
@ 2016-05-06 15:20         ` Andre Przywara
  2016-05-06 15:31           ` Tom Rini
  0 siblings, 1 reply; 33+ messages in thread
From: Andre Przywara @ 2016-05-06 15:20 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 06/05/16 16:11, Tom Rini wrote:
> On Wed, May 04, 2016 at 11:14:39PM +0100, Andr? Przywara wrote:
>> On 04/05/16 22:46, Peter Robinson wrote:
>>> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>>>> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
>>>> pine64_defconfig.
>>>> The differences between the two versions (more RAM and a different
>>>> Ethernet PHY) don't justify two board versions, so lets stick with the
>>>> generic name and try to differentiate between the versions at runtime
>>>> if this is needed later.
>>>>
>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>>> ---
>>>>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
>>>>  configs/pine64_plus_defconfig | 20 --------------------
>>>>  2 files changed, 20 insertions(+), 20 deletions(-)
>>>>  create mode 100644 configs/pine64_defconfig
>>>>  delete mode 100644 configs/pine64_plus_defconfig
>>>>
>>>> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
>>>> new file mode 100644
>>>> index 0000000..0977334
>>>> --- /dev/null
>>>> +++ b/configs/pine64_defconfig
>>>> @@ -0,0 +1,20 @@
>>>> +CONFIG_ARM=y
>>>> +CONFIG_ARCH_SUNXI=y
>>>> +CONFIG_MACH_SUN50I=y
>>>> +CONFIG_DRAM_CLK=672
>>>> +CONFIG_DRAM_ZQ=3881915
>>>> +# CONFIG_VIDEO is not set
>>>> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
>>>
>>> If you're building a single u-boot for all variants of Pine64,
>>
>> Yes!
>>
>>> something which I'd prefer, I don't think we can just set a default
>>> but rather need some logic to specify the DT name based on which board
>>> is booting. This is done for example in the BeagleBone config to
>>> detect the various variants of the BeagleBones.
>>
>> OK, I will look at this.
>>
>> I wonder if we can just use the plus .dts and then remove the parts that
>> the non-plus is missing and push that through to the kernel.
>> U-Boot already takes care of one difference: the DRAM size.
>> I think we could also detect the different Ethernet PHY (or deduce this
>> from the DRAM size?) and fix that up.
>> For the third difference - camera and LCD connectors - U-Boot itself
>> doesn't even care. But it would be nice if having a 512 MB board would
>> result in the respective DT nodes to be deleted.
>> This way we would have _one_ DT source - the U-Boot repository - and
>> automatically deliver a fixed up version to every OS.
>>
>> What do you think?
> 
> How well can you at run time determine which variant of pine we're on?

So for the Pine64 there are three models at the moment, each with a
different size of DRAM. U-Boot detects this already, so for the time
being we could just tell them apart easily - be it at SPL or U-Boot level.
There is a good chance that community feedback will be heard on future
boards (at least from Pine64.com), so we can make sure that even new
boards are somehow distinguishable.

> What's coming after v2016.05 is a whole bunch of examples of supporting
> N similar but different boards that we can runtime detect and picking
> the appropriate DT to use.  That however is at the SPL level.  We need
> to I suppose think about how to do something similar at the U-Boot level
> itself.

Is the following a feasible approach?
- use the plus model DT as a base
- detect RAM size
- if RAM == 512MB
	change Ethernet PHY property from RGMII to MII
	nuke (potential) CSI, camera, touchscreen nodes
- push this DT by default to any kernel loaded
- be done.

Sounds like easily coded, if one allows either board specific hooks or a
generic framework for such rules.

Does that make sense?

Cheers,
Andre.

>  In terms of trying to "fixup" things, if you don't want to handle them
> at the kernel level as overlays, there's examples today of using 'fdt
> ...' to whack nodes as needed I'm fairly certain.  It does depend on
> being able to tell at runtime what you're on of course.
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 6/6] Pine64: rename defconfig
  2016-05-06 15:20         ` Andre Przywara
@ 2016-05-06 15:31           ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2016-05-06 15:31 UTC (permalink / raw)
  To: u-boot

On Fri, May 06, 2016 at 04:20:57PM +0100, Andre Przywara wrote:
> Hi Tom,
> 
> On 06/05/16 16:11, Tom Rini wrote:
> > On Wed, May 04, 2016 at 11:14:39PM +0100, Andr? Przywara wrote:
> >> On 04/05/16 22:46, Peter Robinson wrote:
> >>> On Wed, May 4, 2016 at 10:15 PM, Andre Przywara <andre.przywara@arm.com> wrote:
> >>>> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
> >>>> pine64_defconfig.
> >>>> The differences between the two versions (more RAM and a different
> >>>> Ethernet PHY) don't justify two board versions, so lets stick with the
> >>>> generic name and try to differentiate between the versions at runtime
> >>>> if this is needed later.
> >>>>
> >>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >>>> ---
> >>>>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
> >>>>  configs/pine64_plus_defconfig | 20 --------------------
> >>>>  2 files changed, 20 insertions(+), 20 deletions(-)
> >>>>  create mode 100644 configs/pine64_defconfig
> >>>>  delete mode 100644 configs/pine64_plus_defconfig
> >>>>
> >>>> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
> >>>> new file mode 100644
> >>>> index 0000000..0977334
> >>>> --- /dev/null
> >>>> +++ b/configs/pine64_defconfig
> >>>> @@ -0,0 +1,20 @@
> >>>> +CONFIG_ARM=y
> >>>> +CONFIG_ARCH_SUNXI=y
> >>>> +CONFIG_MACH_SUN50I=y
> >>>> +CONFIG_DRAM_CLK=672
> >>>> +CONFIG_DRAM_ZQ=3881915
> >>>> +# CONFIG_VIDEO is not set
> >>>> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> >>>
> >>> If you're building a single u-boot for all variants of Pine64,
> >>
> >> Yes!
> >>
> >>> something which I'd prefer, I don't think we can just set a default
> >>> but rather need some logic to specify the DT name based on which board
> >>> is booting. This is done for example in the BeagleBone config to
> >>> detect the various variants of the BeagleBones.
> >>
> >> OK, I will look at this.
> >>
> >> I wonder if we can just use the plus .dts and then remove the parts that
> >> the non-plus is missing and push that through to the kernel.
> >> U-Boot already takes care of one difference: the DRAM size.
> >> I think we could also detect the different Ethernet PHY (or deduce this
> >> from the DRAM size?) and fix that up.
> >> For the third difference - camera and LCD connectors - U-Boot itself
> >> doesn't even care. But it would be nice if having a 512 MB board would
> >> result in the respective DT nodes to be deleted.
> >> This way we would have _one_ DT source - the U-Boot repository - and
> >> automatically deliver a fixed up version to every OS.
> >>
> >> What do you think?
> > 
> > How well can you at run time determine which variant of pine we're on?
> 
> So for the Pine64 there are three models at the moment, each with a
> different size of DRAM. U-Boot detects this already, so for the time
> being we could just tell them apart easily - be it at SPL or U-Boot level.
> There is a good chance that community feedback will be heard on future
> boards (at least from Pine64.com), so we can make sure that even new
> boards are somehow distinguishable.
> 
> > What's coming after v2016.05 is a whole bunch of examples of supporting
> > N similar but different boards that we can runtime detect and picking
> > the appropriate DT to use.  That however is at the SPL level.  We need
> > to I suppose think about how to do something similar at the U-Boot level
> > itself.
> 
> Is the following a feasible approach?
> - use the plus model DT as a base
> - detect RAM size
> - if RAM == 512MB
> 	change Ethernet PHY property from RGMII to MII
> 	nuke (potential) CSI, camera, touchscreen nodes
> - push this DT by default to any kernel loaded
> - be done.
> 
> Sounds like easily coded, if one allows either board specific hooks or a
> generic framework for such rules.
> 
> Does that make sense?

Yes, this makes sense.  The only problem I see here is that if the board
isn't designed with some form of reliable runtime detection you can have
conflicts later on if you can't probe for a given device or whatever.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160506/b7845d35/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-06 15:09 ` Tom Rini
@ 2016-05-06 17:03   ` Andre Przywara
  2016-05-06 17:22     ` Tom Rini
  0 siblings, 1 reply; 33+ messages in thread
From: Andre Przywara @ 2016-05-06 17:03 UTC (permalink / raw)
  To: u-boot

Hi,

On 06/05/16 16:09, Tom Rini wrote:
> On Wed, May 04, 2016 at 10:15:28PM +0100, Andre Przywara wrote:
> 
> [snip]
>> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
>> Bananapi compilation. If someone with a working buildman setup could
>> test this for build regressions, I'd be grateful.
> 
> This is good feedback.  FWIW, you can just do ./tools/buildman/buildman
> -p /path/to/toolchain-prefix- 

Mmmh, not sure how is this supposed to work in my case, where I simply
have all the toolchains under /usr/bin.
Every kind of parameter to -p I could come up with didn't find any of my
toolchains, though having just:
=============
[toolchain]
root: /
=============
in ~/.buildman did the trick and it really found all of my toolchains.

Letting it build for all architectures now, but so far arm and arm64
seemed to looked good.

Cheers,
Andre.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates
  2016-05-06 17:03   ` Andre Przywara
@ 2016-05-06 17:22     ` Tom Rini
  0 siblings, 0 replies; 33+ messages in thread
From: Tom Rini @ 2016-05-06 17:22 UTC (permalink / raw)
  To: u-boot

On Fri, May 06, 2016 at 06:03:11PM +0100, Andre Przywara wrote:
> Hi,
> 
> On 06/05/16 16:09, Tom Rini wrote:
> > On Wed, May 04, 2016 at 10:15:28PM +0100, Andre Przywara wrote:
> > 
> > [snip]
> >> P.S. tools/buildman/README was TL;DR, so I just tested Pine64 and
> >> Bananapi compilation. If someone with a working buildman setup could
> >> test this for build regressions, I'd be grateful.
> > 
> > This is good feedback.  FWIW, you can just do ./tools/buildman/buildman
> > -p /path/to/toolchain-prefix- 
> 
> Mmmh, not sure how is this supposed to work in my case, where I simply
> have all the toolchains under /usr/bin.
> Every kind of parameter to -p I could come up with didn't find any of my
> toolchains, though having just:
> =============
> [toolchain]
> root: /
> =============
> in ~/.buildman did the trick and it really found all of my toolchains.

So yes, -p is intended for the case of "just use this one toolchain I
know I have" ie -p /usr/bin/arm-none-eabi- and we should better document
that you can do:
$ cat .buildman.host-tools 
[toolchain]
host = /usr

for the case of having many (or, any) system wide cross toolchains.
That's my .buildman for using all of the debian system cross compilers.

> Letting it build for all architectures now, but so far arm and arm64
> seemed to looked good.

Great, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160506/0f7e26cd/attachment.sig>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header
  2016-05-04 21:15 ` [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header Andre Przywara
@ 2016-05-06 21:15   ` Steve Rae
  2016-05-06 21:27     ` André Przywara
  2016-05-15 10:13   ` [U-Boot] [U-Boot, " Hans de Goede
  1 sibling, 1 reply; 33+ messages in thread
From: Steve Rae @ 2016-05-06 21:15 UTC (permalink / raw)
  To: u-boot

Hi Andre,

On Wed, May 4, 2016 at 2:15 PM, Andre Przywara <andre.przywara@arm.com>
wrote:

> The Allwinner provided boot0 boot loader requires a header before the
> U-Boot binary to both check its validity and to find other blobs to
> load. There is a tool called boot0img which fills the header
> appropriately.
> Reserve some space at the beginning of the binary to later hold the
> header if needed.
> Please note that the header is jumped over already by U-Boot anyway,
> so filling the header is optional and can be skipped if for instance
> boot0 is not used.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  arch/arm/cpu/armv8/start.S | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index deb44a8..b4c4867 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -21,6 +21,9 @@
>  _start:
>         b       reset
>
> +#ifdef CONFIG_ARCH_SUNXI
> +       .space 0x5fc    /* can be filled with a boot0 header if needed */
> +#endif
>

NAK !
this is NOT the _only_ board that would need this, so I propose:

#ifdef CONFIG_RESERVE_SPACE_BOOT0
        .space  CONFIG_RESERVE_SPACE_BOOT0
#endif

Thanks, Steve

        .align 3
>
>  .globl _TEXT_BASE
> --
> 2.7.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header
  2016-05-06 21:15   ` Steve Rae
@ 2016-05-06 21:27     ` André Przywara
  2016-05-06 21:35       ` Steve Rae
  0 siblings, 1 reply; 33+ messages in thread
From: André Przywara @ 2016-05-06 21:27 UTC (permalink / raw)
  To: u-boot

On 06/05/16 22:15, Steve Rae wrote:
> Hi Andre,
> 
> On Wed, May 4, 2016 at 2:15 PM, Andre Przywara <andre.przywara@arm.com
> <mailto:andre.przywara@arm.com>> wrote:
> 
>     The Allwinner provided boot0 boot loader requires a header before the
>     U-Boot binary to both check its validity and to find other blobs to
>     load. There is a tool called boot0img which fills the header
>     appropriately.
>     Reserve some space at the beginning of the binary to later hold the
>     header if needed.
>     Please note that the header is jumped over already by U-Boot anyway,
>     so filling the header is optional and can be skipped if for instance
>     boot0 is not used.
> 
>     Signed-off-by: Andre Przywara <andre.przywara@arm.com
>     <mailto:andre.przywara@arm.com>>
>     ---
>      arch/arm/cpu/armv8/start.S | 3 +++
>      1 file changed, 3 insertions(+)
> 
>     diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
>     index deb44a8..b4c4867 100644
>     --- a/arch/arm/cpu/armv8/start.S
>     +++ b/arch/arm/cpu/armv8/start.S
>     @@ -21,6 +21,9 @@
>      _start:
>             b       reset
> 
>     +#ifdef CONFIG_ARCH_SUNXI
>     +       .space 0x5fc    /* can be filled with a boot0 header if
>     needed */
>     +#endif
> 
> 
> NAK !
> this is NOT the _only_ board that would need this, so I propose:

Well, I was thinking about this as well, but wondered why nobody has
ever come up with something like this before.

So I am happy indeed with a more generic solution.

> 
> #ifdef CONFIG_RESERVE_SPACE_BOOT0
>         .space  CONFIG_RESERVE_SPACE_BOOT0
> #endif

If you don't mind, I will put these three lines as your patch in a new
post. Feel free to send it yourself if you prefer this.
And it seems that boot0 is an Allwinner term, so maybe some more generic
naming like CONFIG_RESERVED_HEADER_SPACE or the like?

Cheers,
Andre.

>  
> Thanks, Steve
> 
>             .align 3
> 
>      .globl _TEXT_BASE
>     --
>     2.7.3
> 
>     _______________________________________________
>     U-Boot mailing list
>     U-Boot at lists.denx.de <mailto:U-Boot@lists.denx.de>
>     http://lists.denx.de/mailman/listinfo/u-boot
> 
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header
  2016-05-06 21:27     ` André Przywara
@ 2016-05-06 21:35       ` Steve Rae
  0 siblings, 0 replies; 33+ messages in thread
From: Steve Rae @ 2016-05-06 21:35 UTC (permalink / raw)
  To: u-boot

On Fri, May 6, 2016 at 2:27 PM, Andr? Przywara <andre.przywara@arm.com>
wrote:

> On 06/05/16 22:15, Steve Rae wrote:
> > Hi Andre,
> >
> > On Wed, May 4, 2016 at 2:15 PM, Andre Przywara <andre.przywara@arm.com
> > <mailto:andre.przywara@arm.com>> wrote:
> >
> >     The Allwinner provided boot0 boot loader requires a header before the
> >     U-Boot binary to both check its validity and to find other blobs to
> >     load. There is a tool called boot0img which fills the header
> >     appropriately.
> >     Reserve some space at the beginning of the binary to later hold the
> >     header if needed.
> >     Please note that the header is jumped over already by U-Boot anyway,
> >     so filling the header is optional and can be skipped if for instance
> >     boot0 is not used.
> >
> >     Signed-off-by: Andre Przywara <andre.przywara@arm.com
> >     <mailto:andre.przywara@arm.com>>
> >     ---
> >      arch/arm/cpu/armv8/start.S | 3 +++
> >      1 file changed, 3 insertions(+)
> >
> >     diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> >     index deb44a8..b4c4867 100644
> >     --- a/arch/arm/cpu/armv8/start.S
> >     +++ b/arch/arm/cpu/armv8/start.S
> >     @@ -21,6 +21,9 @@
> >      _start:
> >             b       reset
> >
> >     +#ifdef CONFIG_ARCH_SUNXI
> >     +       .space 0x5fc    /* can be filled with a boot0 header if
> >     needed */
> >     +#endif
> >
> >
> > NAK !
> > this is NOT the _only_ board that would need this, so I propose:
>
> Well, I was thinking about this as well, but wondered why nobody has
> ever come up with something like this before.
>
> So I am happy indeed with a more generic solution.
>
> >
> > #ifdef CONFIG_RESERVE_SPACE_BOOT0
> >         .space  CONFIG_RESERVE_SPACE_BOOT0
> > #endif
>
> If you don't mind, I will put these three lines as your patch in a new
> post. Feel free to send it yourself if you prefer this.
> And it seems that boot0 is an Allwinner term, so maybe some more generic
> naming like CONFIG_RESERVED_HEADER_SPACE or the like?
>

I'm OK with your "v2" - thanks!
And Broadcom uses the term "boot0" -- but your define is fine if "boot0" is
too vendor specific!
PS. would you add it the "arm" as well - thanks!

diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index 49238ed..f0d0bb1 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -60,6 +60,10 @@ _start:
        ldr     pc, _irq
        ldr     pc, _fiq

+#ifdef CONFIG_RESERVE_SPACE_BOOT0
+       .space  CONFIG_RESERVE_SPACE_BOOT0
+#endif
+




> Cheers,
> Andre.
>
> >
> > Thanks, Steve
> >
> >             .align 3
> >
> >      .globl _TEXT_BASE
> >     --
> >     2.7.3
> >
> >     _______________________________________________
> >     U-Boot mailing list
> >     U-Boot at lists.denx.de <mailto:U-Boot@lists.denx.de>
> >     http://lists.denx.de/mailman/listinfo/u-boot
> >
> >
>
>

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header
  2016-05-04 21:15 ` [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header Andre Przywara
@ 2016-05-08  0:36   ` André Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: André Przywara @ 2016-05-08  0:36 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On 04/05/16 22:15, Andre Przywara wrote:
> Commit bfb33f0bc45b ("sunxi: mctl_mem_matches: Add missing memory
> barrier") broke compilation for the Pine64, as dram_helper.c now
> includes <asm/armv7.h>, which does not compile on arm64.

I just realized that the 2016.05 release is due anytime now.
Can we at least take this single patch still?
The current HEAD is broken for Pine64 (as buildman armv8 easily proves).
It worked before the above mentioned patch - so with 2016.05-rc3.
This patch fixes it. I ran "buildman arm armv8" on HEAD + this fix and
didn't spot any regressions (I don't have a softfp toolchain, though).

Taking this one should prevent the new board support for Pine64 to be
broken on release.

Cheers,
Andre.

> Fix this by moving all barrier instructions into a separate header
> file, which can easily be shared between arm and arm64.
> Also extend the inline assembly to take the "sy" argument, which is
> optional for ARMv7, but mandatory for v8.
> 
> This fixes compilation for 64-bit sunxi boards (Pine64).
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  arch/arm/include/asm/armv7.h       | 21 +-----------------
>  arch/arm/include/asm/barriers.h    | 44 ++++++++++++++++++++++++++++++++++++++
>  arch/arm/mach-sunxi/dram_helpers.c |  2 +-
>  3 files changed, 46 insertions(+), 21 deletions(-)
>  create mode 100644 arch/arm/include/asm/barriers.h
> 
> diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h
> index 30e7939..423fc70 100644
> --- a/arch/arm/include/asm/armv7.h
> +++ b/arch/arm/include/asm/armv7.h
> @@ -59,26 +59,7 @@
>  #ifndef __ASSEMBLY__
>  #include <linux/types.h>
>  #include <asm/io.h>
> -
> -/*
> - * CP15 Barrier instructions
> - * Please note that we have separate barrier instructions in ARMv7
> - * However, we use the CP15 based instructtions because we use
> - * -march=armv5 in U-Boot
> - */
> -#define CP15ISB	asm volatile ("mcr     p15, 0, %0, c7, c5, 4" : : "r" (0))
> -#define CP15DSB	asm volatile ("mcr     p15, 0, %0, c7, c10, 4" : : "r" (0))
> -#define CP15DMB	asm volatile ("mcr     p15, 0, %0, c7, c10, 5" : : "r" (0))
> -
> -#ifdef __ARM_ARCH_7A__
> -#define ISB	asm volatile ("isb" : : : "memory")
> -#define DSB	asm volatile ("dsb" : : : "memory")
> -#define DMB	asm volatile ("dmb" : : : "memory")
> -#else
> -#define ISB	CP15ISB
> -#define DSB	CP15DSB
> -#define DMB	CP15DMB
> -#endif
> +#include <asm/barriers.h>
>  
>  /*
>   * Workaround for ARM errata # 798870
> diff --git a/arch/arm/include/asm/barriers.h b/arch/arm/include/asm/barriers.h
> new file mode 100644
> index 0000000..37870f9
> --- /dev/null
> +++ b/arch/arm/include/asm/barriers.h
> @@ -0,0 +1,44 @@
> +/*
> + * Copyright (C) 2016 ARM Ltd.
> + *
> + * ARM and ARM64 barrier instructions
> + * split from armv7.h to allow sharing between ARM and ARM64
> + *
> + * Original copyright in armv7.h was:
> + * (C) Copyright 2010 Texas Instruments, <www.ti.com> Aneesh V <aneesh@ti.com>
> + *
> + * Much of the original barrier code was contributed by:
> + *   Valentine Barshak <valentine.barshak@cogentembedded.com>
> + *
> + * SPDX-License-Identifier:	GPL-2.0+
> + */
> +#ifndef __BARRIERS_H__
> +#define __BARRIERS_H__
> +
> +#ifndef __ASSEMBLY__
> +
> +#ifndef CONFIG_ARM64
> +/*
> + * CP15 Barrier instructions
> + * Please note that we have separate barrier instructions in ARMv7
> + * However, we use the CP15 based instructtions because we use
> + * -march=armv5 in U-Boot
> + */
> +#define CP15ISB	asm volatile ("mcr     p15, 0, %0, c7, c5, 4" : : "r" (0))
> +#define CP15DSB	asm volatile ("mcr     p15, 0, %0, c7, c10, 4" : : "r" (0))
> +#define CP15DMB	asm volatile ("mcr     p15, 0, %0, c7, c10, 5" : : "r" (0))
> +
> +#endif /* !CONFIG_ARM64 */
> +
> +#if defined(__ARM_ARCH_7A__) || defined(CONFIG_ARM64)
> +#define ISB	asm volatile ("isb sy" : : : "memory")
> +#define DSB	asm volatile ("dsb sy" : : : "memory")
> +#define DMB	asm volatile ("dmb sy" : : : "memory")
> +#else
> +#define ISB	CP15ISB
> +#define DSB	CP15DSB
> +#define DMB	CP15DMB
> +#endif
> +
> +#endif	/* __ASSEMBLY__ */
> +#endif	/* __BARRIERS_H__ */
> diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c
> index e0c823a..20b430f 100644
> --- a/arch/arm/mach-sunxi/dram_helpers.c
> +++ b/arch/arm/mach-sunxi/dram_helpers.c
> @@ -7,7 +7,7 @@
>   */
>  
>  #include <common.h>
> -#include <asm/armv7.h>
> +#include <asm/barriers.h>
>  #include <asm/io.h>
>  #include <asm/arch/dram.h>
>  
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot, 2/6] Revert "sunxi: Reserve ATF memory space on A64"
  2016-05-04 21:15 ` [U-Boot] [PATCH 2/6] Revert "sunxi: Reserve ATF memory space on A64" Andre Przywara
@ 2016-05-15 10:12   ` Hans de Goede
  0 siblings, 0 replies; 33+ messages in thread
From: Hans de Goede @ 2016-05-15 10:12 UTC (permalink / raw)
  To: u-boot

Hi,

On 04-05-16 23:15, Andre Przywara wrote:
> The ARM Trusted Firmware (ATF) code now lives in SRAM on the Pine64/A64,
> so we can claim the whole of DRAM for OS use.
>
> This reverts commit 3ffe39ed2b66af71c7271d0cef2a248b5bf7dfdb.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Thanks, looks good to me applied to:

http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=shortlog;h=refs/heads/next

This will be part of my first pull-req for u-boot v2016.07.

Regards,

Hans


> ---
>  board/sunxi/board.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 3cf3614..ccf4129 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -133,15 +133,6 @@ int dram_init(void)
>  	return 0;
>  }
>
> -#ifdef CONFIG_MACH_SUN50I
> -void dram_init_banksize(void)
> -{
> -	/* We need to reserve the first 16MB of RAM for ATF */
> -	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + (16 * 1024 * 1024);
> -	gd->bd->bi_dram[0].size = get_effective_memsize() - (16 * 1024 * 1024);
> -}
> -#endif
> -
>  #if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>  static void nand_pinmux_setup(void)
>  {
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot, 4/6] arm64: sunxi: adjust default load addresses
  2016-05-04 21:15 ` [U-Boot] [PATCH 4/6] arm64: sunxi: adjust default load addresses Andre Przywara
@ 2016-05-15 10:12   ` Hans de Goede
  0 siblings, 0 replies; 33+ messages in thread
From: Hans de Goede @ 2016-05-15 10:12 UTC (permalink / raw)
  To: u-boot

Hi,

On 04-05-16 23:15, Andre Przywara wrote:
> As arm64 has slightly different expectations about load addresses, lets
> use a different set of default addresses for things like the kernel.
> As arm64 kernels don't come with a decompressor right now, reserve some
> more space for really big uncompressed kernels.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Thanks, looks good to me applied to:

http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=shortlog;h=refs/heads/next

This will be part of my first pull-req for u-boot v2016.07.

Regards,

Hans


> ---
>  include/configs/sunxi-common.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 2406115..16f1a2c 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -390,6 +390,23 @@ extern int soft_i2c_gpio_scl;
>  #define CONFIG_PRE_CONSOLE_BUFFER
>  #define CONFIG_PRE_CON_BUF_SZ		4096 /* Aprox 2 80*25 screens */
>
> +#ifdef CONFIG_ARM64
> +/*
> + * Boards seem to come with at least 512MB of DRAM.
> + * The kernel should go at 512K, which is the default text offset (that will
> + * be adjusted at runtime if needed).
> + * There is no compression for arm64 kernels (yet), so leave some space
> + * for really big kernels, say 256MB for now.
> + * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd.
> + * Align the initrd to a 2MB page.
> + */
> +#define KERNEL_ADDR_R	__stringify(SDRAM_OFFSET(0080000))
> +#define FDT_ADDR_R	__stringify(SDRAM_OFFSET(FA00000))
> +#define SCRIPT_ADDR_R	__stringify(SDRAM_OFFSET(FC00000))
> +#define PXEFILE_ADDR_R	__stringify(SDRAM_OFFSET(FD00000))
> +#define RAMDISK_ADDR_R	__stringify(SDRAM_OFFSET(FE00000))
> +
> +#else
>  /*
>   * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc.
>   * 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
> @@ -401,6 +418,7 @@ extern int soft_i2c_gpio_scl;
>  #define SCRIPT_ADDR_R  __stringify(SDRAM_OFFSET(3100000))
>  #define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000))
>  #define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000))
> +#endif
>
>  #define MEM_LAYOUT_ENV_SETTINGS \
>  	"bootm_size=0xa000000\0" \
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot,5/6] arm64: Pine64: update FDT files
  2016-05-04 21:15 ` [U-Boot] [PATCH 5/6] arm64: Pine64: update FDT files Andre Przywara
@ 2016-05-15 10:13   ` Hans de Goede
  2016-05-15 12:48     ` André Przywara
  0 siblings, 1 reply; 33+ messages in thread
From: Hans de Goede @ 2016-05-15 10:13 UTC (permalink / raw)
  To: u-boot

Hi,

On 04-05-16 23:15, Andre Przywara wrote:
> The originally committed .dts files for the Pine64 were from an early
> proof-of-concept version and should have never been committed upstream.
> Replace them with much more mature versions, which also use a different
> naming scheme.
> Please note that at this point there is at least one binding which has
> not been agreed upon, so this is subject to change.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Thanks, looks good to me applied to:

http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=shortlog;h=refs/heads/next

This will be part of my first pull-req for u-boot v2016.07.

Regards,

Hans



> ---
>  arch/arm/dts/Makefile                      |   3 +-
>  arch/arm/dts/a64.dtsi                      | 564 --------------------------
>  arch/arm/dts/pine64.dts                    |  62 ---
>  arch/arm/dts/pine64_common.dtsi            |  76 ----
>  arch/arm/dts/pine64_plus.dts               |  63 ---
>  arch/arm/dts/sun50i-a64-pine64-common.dtsi |  80 ++++
>  arch/arm/dts/sun50i-a64-pine64-plus.dts    |  59 +++
>  arch/arm/dts/sun50i-a64-pine64.dts         |  58 +++
>  arch/arm/dts/sun50i-a64.dtsi               | 624 +++++++++++++++++++++++++++++
>  configs/pine64_plus_defconfig              |   2 +-
>  10 files changed, 824 insertions(+), 767 deletions(-)
>  delete mode 100644 arch/arm/dts/a64.dtsi
>  delete mode 100644 arch/arm/dts/pine64.dts
>  delete mode 100644 arch/arm/dts/pine64_common.dtsi
>  delete mode 100644 arch/arm/dts/pine64_plus.dts
>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-common.dtsi
>  create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus.dts
>  create mode 100644 arch/arm/dts/sun50i-a64-pine64.dts
>  create mode 100644 arch/arm/dts/sun50i-a64.dtsi
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index d1f8e22..bd68698 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -218,7 +218,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
>  	sun8i-h3-orangepi-pc.dtb \
>  	sun8i-h3-orangepi-plus.dtb
>  dtb-$(CONFIG_MACH_SUN50I) += \
> -	pine64_plus.dtb
> +	sun50i-a64-pine64-plus.dtb \
> +	sun50i-a64-pine64.dtb
>  dtb-$(CONFIG_MACH_SUN9I) += \
>  	sun9i-a80-optimus.dtb \
>  	sun9i-a80-cubieboard4.dtb
> diff --git a/arch/arm/dts/a64.dtsi b/arch/arm/dts/a64.dtsi
> deleted file mode 100644
> index f3ad000..0000000
> --- a/arch/arm/dts/a64.dtsi
> +++ /dev/null
> @@ -1,564 +0,0 @@
> -/*
> - * Copyright (C) 2016 ARM Ltd.
> - * based on the Allwinner H3 dtsi:
> - * 	Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
> - *
> - * 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 <dt-bindings/interrupt-controller/arm-gic.h>
> -#include <dt-bindings/pinctrl/sun4i-a10.h>
> -
> -/ {
> -	compatible = "allwinner,a64";
> -	interrupt-parent = <&gic>;
> -	#address-cells = <1>;
> -	#size-cells = <1>;
> -
> -	aliases {
> -		serial0 = &uart0;
> -		serial1 = &uart1;
> -		serial2 = &uart2;
> -		serial3 = &uart3;
> -		serial4 = &uart4;
> -	};
> -
> -	cpus {
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		cpu at 0 {
> -			compatible = "arm,cortex-a53", "arm,armv8";
> -			device_type = "cpu";
> -			reg = <0>;
> -			enable-method = "psci";
> -		};
> -
> -		cpu at 1 {
> -			compatible = "arm,cortex-a53", "arm,armv8";
> -			device_type = "cpu";
> -			reg = <1>;
> -			enable-method = "psci";
> -		};
> -
> -		cpu at 2 {
> -			compatible = "arm,cortex-a53", "arm,armv8";
> -			device_type = "cpu";
> -			reg = <2>;
> -			enable-method = "psci";
> -		};
> -
> -		cpu at 3 {
> -			compatible = "arm,cortex-a53", "arm,armv8";
> -			device_type = "cpu";
> -			reg = <3>;
> -			enable-method = "psci";
> -		};
> -	};
> -
> -	psci {
> -		compatible = "arm,psci-0.2", "arm,psci";
> -		method = "smc";
> -		cpu_suspend = <0xc4000001>;
> -		cpu_off = <0x84000002>;
> -		cpu_on = <0xc4000003>;
> -	};
> -
> -        memory {
> -		device_type = "memory";
> -		reg = <0x40000000 0>;
> -	};
> -
> -	timer {
> -		compatible = "arm,armv8-timer";
> -		interrupts = <GIC_PPI 13
> -			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> -			     <GIC_PPI 14
> -			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> -			     <GIC_PPI 11
> -			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> -			     <GIC_PPI 10
> -			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> -	};
> -
> -	clocks {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		ranges;
> -
> -		osc24M: osc24M_clk {
> -			#clock-cells = <0>;
> -			compatible = "fixed-clock";
> -			clock-frequency = <24000000>;
> -			clock-output-names = "osc24M";
> -		};
> -
> -		osc32k: osc32k_clk {
> -			#clock-cells = <0>;
> -			compatible = "fixed-clock";
> -			clock-frequency = <32768>;
> -			clock-output-names = "osc32k";
> -		};
> -
> -		pll1: clk at 01c20000 {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun8i-a23-pll1-clk";
> -			reg = <0x01c20000 0x4>;
> -			clocks = <&osc24M>;
> -			clock-output-names = "pll1";
> -		};
> -
> -		pll6: clk at 01c20028 {
> -			#clock-cells = <1>;
> -			compatible = "allwinner,sun6i-a31-pll6-clk";
> -			reg = <0x01c20028 0x4>;
> -			clocks = <&osc24M>;
> -			clock-output-names = "pll6", "pll6x2";
> -		};
> -
> -		pll6d2: pll6d2_clk {
> -			#clock-cells = <0>;
> -			compatible = "fixed-factor-clock";
> -			clock-div = <2>;
> -			clock-mult = <1>;
> -			clocks = <&pll6 0>;
> -			clock-output-names = "pll6d2";
> -		};
> -
> -		/* dummy clock until pll6 can be reused */
> -		pll8: pll8_clk {
> -			#clock-cells = <0>;
> -			compatible = "fixed-clock";
> -			clock-frequency = <1>;
> -			clock-output-names = "pll8";
> -		};
> -
> -		cpu: cpu_clk at 01c20050 {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun4i-a10-cpu-clk";
> -			reg = <0x01c20050 0x4>;
> -			clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
> -			clock-output-names = "cpu";
> -		};
> -
> -		axi: axi_clk at 01c20050 {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun4i-a10-axi-clk";
> -			reg = <0x01c20050 0x4>;
> -			clocks = <&cpu>;
> -			clock-output-names = "axi";
> -		};
> -
> -		ahb1: ahb1_clk at 01c20054 {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun6i-a31-ahb1-clk";
> -			reg = <0x01c20054 0x4>;
> -			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
> -			clock-output-names = "ahb1";
> -		};
> -
> -		ahb2: ahb2_clk at 01c2005c {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun8i-h3-ahb2-clk";
> -			reg = <0x01c2005c 0x4>;
> -			clocks = <&ahb1>, <&pll6d2>;
> -			clock-output-names = "ahb2";
> -		};
> -
> -		apb1: apb1_clk at 01c20054 {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun4i-a10-apb0-clk";
> -			reg = <0x01c20054 0x4>;
> -			clocks = <&ahb1>;
> -			clock-output-names = "apb1";
> -		};
> -
> -		apb2: apb2_clk at 01c20058 {
> -			#clock-cells = <0>;
> -			compatible = "allwinner,sun4i-a10-apb1-clk";
> -			reg = <0x01c20058 0x4>;
> -			clocks = <&osc32k>, <&osc24M>, <&pll6 1>, <&pll6 1>;
> -			clock-output-names = "apb2";
> -		};
> -
> -		bus_gates: clk at 01c20060 {
> -			#clock-cells = <1>;
> -			compatible = "allwinner,a64-bus-gates-clk",
> -				     "allwinner,sun8i-h3-bus-gates-clk";
> -			reg = <0x01c20060 0x14>;
> -			clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
> -			clock-names = "ahb1", "ahb2", "apb1", "apb2";
> -			clock-indices = <1>,
> -					<5>, <6>, <8>,
> -					<9>, <10>, <13>,
> -					<14>, <17>, <18>,
> -					<19>, <20>,
> -					<21>, <23>,
> -					<24>, <25>,
> -					<28>, <29>,
> -					<32>, <35>,
> -					<36>, <37>,
> -					<40>, <43>,
> -					<44>, <52>, <53>,
> -					<54>, <64>,
> -					<65>, <69>, <72>,
> -					<76>, <77>, <78>,
> -					<96>, <97>, <98>,
> -					<101>,
> -					<112>, <113>,
> -					<114>, <115>,
> -					<116>, <135>;
> -			clock-output-names = "bus_mipidsi",
> -					     "bus_ce", "bus_dma", "bus_mmc0",
> -					     "bus_mmc1", "bus_mmc2", "bus_nand",
> -					     "bus_sdram", "bus_gmac", "bus_ts",
> -					     "bus_hstimer", "bus_spi0",
> -					     "bus_spi1", "bus_otg",
> -					     "bus_otg_ehci0", "bus_ehci0",
> -					     "bus_otg_ohci0", "bus_ohci0",
> -					     "bus_ve", "bus_lcd0",
> -					     "bus_lcd1", "bus_deint",
> -					     "bus_csi", "bus_hdmi",
> -					     "bus_de", "bus_gpu", "bus_msgbox",
> -					     "bus_spinlock", "bus_codec",
> -					     "bus_spdif", "bus_pio", "bus_ths",
> -					     "bus_i2s0", "bus_i2s1", "bus_i2s2",
> -					     "bus_i2c0", "bus_i2c1", "bus_i2c2",
> -					     "bus_scr",
> -					     "bus_uart0", "bus_uart1",
> -					     "bus_uart2", "bus_uart3",
> -					     "bus_uart4", "bus_dbg";
> -		};
> -
> -		mmc0_clk: clk at 01c20088 {
> -			#clock-cells = <1>;
> -			compatible = "allwinner,sun4i-a10-mmc-clk";
> -			reg = <0x01c20088 0x4>;
> -			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
> -			clock-output-names = "mmc0",
> -					     "mmc0_output",
> -					     "mmc0_sample";
> -		};
> -
> -		mmc1_clk: clk at 01c2008c {
> -			#clock-cells = <1>;
> -			compatible = "allwinner,sun4i-a10-mmc-clk";
> -			reg = <0x01c2008c 0x4>;
> -			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
> -			clock-output-names = "mmc1",
> -					     "mmc1_output",
> -					     "mmc1_sample";
> -		};
> -
> -		mmc2_clk: clk at 01c20090 {
> -			#clock-cells = <1>;
> -			compatible = "allwinner,sun4i-a10-mmc-clk";
> -			reg = <0x01c20090 0x4>;
> -			clocks = <&osc24M>, <&pll6 0>, <&pll8>;
> -			clock-output-names = "mmc2",
> -					     "mmc2_output",
> -					     "mmc2_sample";
> -		};
> -	};
> -
> -	regulators {
> -		reg_vcc3v3: vcc3v3 {
> -			compatible = "regulator-fixed";
> -			regulator-name = "vcc3v3";
> -			regulator-min-microvolt = <3300000>;
> -			regulator-max-microvolt = <3300000>;
> -		};
> -	};
> -
> -	soc {
> -		compatible = "simple-bus";
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		ranges;
> -
> -		mmc0: mmc at 01c0f000 {
> -			compatible = "allwinner,sun5i-a13-mmc";
> -			reg = <0x01c0f000 0x1000>;
> -			clocks = <&bus_gates 8>,
> -				 <&mmc0_clk 0>,
> -				 <&mmc0_clk 1>,
> -				 <&mmc0_clk 2>;
> -			clock-names = "ahb",
> -				      "mmc",
> -				      "output",
> -				      "sample";
> -			resets = <&ahb_rst 8>;
> -			reset-names = "ahb";
> -			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
> -			status = "disabled";
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -		};
> -
> -		mmc1: mmc at 01c10000 {
> -			compatible = "allwinner,sun5i-a13-mmc";
> -			reg = <0x01c10000 0x1000>;
> -			clocks = <&bus_gates 9>,
> -				 <&mmc1_clk 0>,
> -				 <&mmc1_clk 1>,
> -				 <&mmc1_clk 2>;
> -			clock-names = "ahb",
> -				      "mmc",
> -				      "output",
> -				      "sample";
> -			resets = <&ahb_rst 9>;
> -			reset-names = "ahb";
> -			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
> -			status = "disabled";
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -		};
> -
> -		mmc2: mmc at 01c11000 {
> -			compatible = "allwinner,sun5i-a13-mmc";
> -			reg = <0x01c11000 0x1000>;
> -			clocks = <&bus_gates 10>,
> -				 <&mmc2_clk 0>,
> -				 <&mmc2_clk 1>,
> -				 <&mmc2_clk 2>;
> -			clock-names = "ahb",
> -				      "mmc",
> -				      "output",
> -				      "sample";
> -			resets = <&ahb_rst 10>;
> -			reset-names = "ahb";
> -			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
> -			status = "disabled";
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -		};
> -
> -		pio: pinctrl at 01c20800 {
> -			compatible = "allwinner,a64-pinctrl";
> -			reg = <0x01c20800 0x400>;
> -			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
> -				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
> -				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> -			clocks = <&bus_gates 69>;
> -			gpio-controller;
> -			#gpio-cells = <3>;
> -			interrupt-controller;
> -			#interrupt-cells = <2>;
> -
> -			uart0_pins_a: uart0 at 0 {
> -				allwinner,pins = "PB8", "PB9";
> -				allwinner,function = "uart0";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			uart0_pins_b: uart0 at 1 {
> -				allwinner,pins = "PF2", "PF3";
> -				allwinner,function = "uart0";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			uart1_pins: uart1 at 0 {
> -				allwinner,pins = "PG6", "PG7", "PG8", "PG9";
> -				allwinner,function = "uart1";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			uart2_pins: uart2 at 0 {
> -				allwinner,pins = "PB0", "PB1", "PB2", "PB3";
> -				allwinner,function = "uart2";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			uart3_pins_a: uart3 at 0 {
> -				allwinner,pins = "PD0", "PD1";
> -				allwinner,function = "uart3";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			uart3_pins_b: uart3 at 1 {
> -				allwinner,pins = "PH4", "PH5", "PH6", "PH7";
> -				allwinner,function = "uart3";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			uart4_pins: uart4 at 0 {
> -				allwinner,pins = "PD2", "PD3", "PD4", "PD5";
> -				allwinner,function = "uart4";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			mmc0_pins: mmc0 at 0 {
> -				allwinner,pins = "PF0", "PF1", "PF2", "PF3",
> -						 "PF4", "PF5";
> -				allwinner,function = "mmc0";
> -				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			mmc0_default_cd_pin: mmc0_cd_pin at 0 {
> -				allwinner,pins = "PF6";
> -				allwinner,function = "gpio_in";
> -				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> -			};
> -
> -			mmc1_pins: mmc1 at 0 {
> -				allwinner,pins = "PG0", "PG1", "PG2", "PG3",
> -						 "PG4", "PG5";
> -				allwinner,function = "mmc1";
> -				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -
> -			mmc2_pins: mmc2 at 0 {
> -				allwinner,pins = "PC1", "PC5", "PC6", "PC8",
> -						 "PC9", "PC10";
> -				allwinner,function = "mmc2";
> -				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> -				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> -			};
> -		};
> -
> -		ahb_rst: reset at 01c202c0 {
> -			#reset-cells = <1>;
> -			compatible = "allwinner,sun6i-a31-ahb1-reset";
> -			reg = <0x01c202c0 0xc>;
> -		};
> -
> -		apb1_rst: reset at 01c202d0 {
> -			#reset-cells = <1>;
> -			compatible = "allwinner,sun6i-a31-clock-reset";
> -			reg = <0x01c202d0 0x4>;
> -		};
> -
> -		apb2_rst: reset at 01c202d8 {
> -			#reset-cells = <1>;
> -			compatible = "allwinner,sun6i-a31-clock-reset";
> -			reg = <0x01c202d8 0x4>;
> -		};
> -
> -		uart0: serial at 01c28000 {
> -			compatible = "snps,dw-apb-uart";
> -			reg = <0x01c28000 0x400>;
> -			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
> -			reg-shift = <2>;
> -			reg-io-width = <4>;
> -			clocks = <&bus_gates 112>;
> -			resets = <&apb2_rst 16>;
> -			reset-names = "apb2";
> -			status = "disabled";
> -		};
> -
> -		uart1: serial at 01c28400 {
> -			compatible = "snps,dw-apb-uart";
> -			reg = <0x01c28400 0x400>;
> -			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
> -			reg-shift = <2>;
> -			reg-io-width = <4>;
> -			clocks = <&bus_gates 113>;
> -			resets = <&apb2_rst 17>;
> -			reset-names = "apb2";
> -			status = "disabled";
> -		};
> -
> -		uart2: serial at 01c28800 {
> -			compatible = "snps,dw-apb-uart";
> -			reg = <0x01c28800 0x400>;
> -			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
> -			reg-shift = <2>;
> -			reg-io-width = <4>;
> -			clocks = <&bus_gates 114>;
> -			resets = <&apb2_rst 18>;
> -			reset-names = "apb2";
> -			status = "disabled";
> -		};
> -
> -		uart3: serial at 01c28c00 {
> -			compatible = "snps,dw-apb-uart";
> -			reg = <0x01c28c00 0x400>;
> -			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> -			reg-shift = <2>;
> -			reg-io-width = <4>;
> -			clocks = <&bus_gates 115>;
> -			resets = <&apb2_rst 19>;
> -			reset-names = "apb2";
> -			status = "disabled";
> -		};
> -
> -		uart4: serial at 01c29000 {
> -			compatible = "snps,dw-apb-uart";
> -			reg = <0x01c29000 0x400>;
> -			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
> -			reg-shift = <2>;
> -			reg-io-width = <4>;
> -			clocks = <&bus_gates 116>;
> -			resets = <&apb2_rst 20>;
> -			reset-names = "apb2";
> -			status = "disabled";
> -		};
> -
> -		rtc: rtc at 01f00000 {
> -			compatible = "allwinner,sun6i-a31-rtc";
> -			reg = <0x01f00000 0x54>;
> -			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
> -				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
> -		};
> -	};
> -
> -	gic: interrupt-controller@{
> -		compatible = "arm,gic-400";
> -		interrupt-controller;
> -		#interrupt-cells = <3>;
> -		#address-cells = <0>;
> -
> -		reg = <0x01C81000 0x1000>,
> -		      <0x01C82000 0x2000>,
> -		      <0x01C84000 0x2000>,
> -		      <0x01C86000 0x2000>;
> -		interrupts = <GIC_PPI 9
> -		      (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> -	};
> -};
> diff --git a/arch/arm/dts/pine64.dts b/arch/arm/dts/pine64.dts
> deleted file mode 100644
> index dcc998f..0000000
> --- a/arch/arm/dts/pine64.dts
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -/*
> - * Copyright (c) 2016 ARM Ltd.
> - *
> - * 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 library 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 library 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/;
> -
> -/memreserve/ 0x45000000 0x00200000;
> -/memreserve/ 0x41010000 0x00010800;
> -/memreserve/ 0x40100000 0x00006000;
> -
> -#include "pine64_common.dtsi"
> -
> -/ {
> -	model = "Pine64";
> -	compatible = "pine64,pine64", "allwinner,a64";
> -
> -	chosen {
> -		stdout-path = "serial0:115200n8";
> -	};
> -
> -	memory {
> -		reg = <0x40000000 0x20000000>;
> -	};
> -};
> diff --git a/arch/arm/dts/pine64_common.dtsi b/arch/arm/dts/pine64_common.dtsi
> deleted file mode 100644
> index d968d76..0000000
> --- a/arch/arm/dts/pine64_common.dtsi
> +++ /dev/null
> @@ -1,76 +0,0 @@
> -/*
> - * Copyright (c) 2016 ARM Ltd.
> - *
> - * 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 library 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 library 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 "a64.dtsi"
> -
> -&mmc0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
> -	vmmc-supply = <&reg_vcc3v3>;
> -	cd-gpios = <&pio 5 6 0>;
> -	cd-inverted;
> -	status = "okay";
> -};
> -
> -&uart0 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&uart0_pins_a>;
> -	status = "okay";
> -};
> -
> -&uart2 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&uart2_pins>;
> -	status = "okay";
> -};
> -
> -&uart3 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&uart3_pins_a>;
> -	status = "okay";
> -};
> -
> -&uart4 {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&uart4_pins>;
> -	status = "okay";
> -};
> diff --git a/arch/arm/dts/pine64_plus.dts b/arch/arm/dts/pine64_plus.dts
> deleted file mode 100644
> index 5daff51..0000000
> --- a/arch/arm/dts/pine64_plus.dts
> +++ /dev/null
> @@ -1,63 +0,0 @@
> -/*
> - * Copyright (c) 2016 ARM Ltd.
> - *
> - * 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 library 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 library 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/;
> -
> -/memreserve/ 0x45000000 0x00200000;
> -/memreserve/ 0x41010000 0x00010800;
> -/memreserve/ 0x40100000 0x00006000;
> -
> -#include "pine64_common.dtsi"
> -
> -/ {
> -	model = "Pine64+";
> -	compatible = "pine64,pine64_plus", "allwinner,a64";
> -
> -	chosen {
> -		stdout-path = "serial0:115200n8";
> -	};
> -
> -	/* There is a model with 2GB of DRAM, but U-Boot fixes this for us. */
> -	memory {
> -		reg = <0x40000000 0x40000000>;
> -	};
> -};
> diff --git a/arch/arm/dts/sun50i-a64-pine64-common.dtsi b/arch/arm/dts/sun50i-a64-pine64-common.dtsi
> new file mode 100644
> index 0000000..d5a7249
> --- /dev/null
> +++ b/arch/arm/dts/sun50i-a64-pine64-common.dtsi
> @@ -0,0 +1,80 @@
> +/*
> + * Copyright (c) 2016 ARM Ltd.
> + *
> + * 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 library 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 library 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 "sun50i-a64.dtsi"
> +
> +/ {
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	soc {
> +		reg_vcc3v3: vcc3v3 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "vcc3v3";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +		};
> +	};
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	cd-gpios = <&pio 5 6 0>;
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pins_a>;
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c1_pins>;
> +	status = "okay";
> +};
> diff --git a/arch/arm/dts/sun50i-a64-pine64-plus.dts b/arch/arm/dts/sun50i-a64-pine64-plus.dts
> new file mode 100644
> index 0000000..549dc15
> --- /dev/null
> +++ b/arch/arm/dts/sun50i-a64-pine64-plus.dts
> @@ -0,0 +1,59 @@
> +/*
> + * Copyright (c) 2016 ARM Ltd.
> + *
> + * 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 library 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 library 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 "sun50i-a64-pine64-common.dtsi"
> +
> +/ {
> +	model = "Pine64+";
> +	compatible = "pine64,pine64-plus", "allwinner,sun50i-a64";
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	/* There is a model with 2GB of DRAM, but U-Boot fixes this for us. */
> +	memory {
> +		reg = <0x40000000 0x40000000>;
> +	};
> +};
> diff --git a/arch/arm/dts/sun50i-a64-pine64.dts b/arch/arm/dts/sun50i-a64-pine64.dts
> new file mode 100644
> index 0000000..ebe029e
> --- /dev/null
> +++ b/arch/arm/dts/sun50i-a64-pine64.dts
> @@ -0,0 +1,58 @@
> +/*
> + * Copyright (c) 2016 ARM Ltd.
> + *
> + * 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 library 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 library 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 "sun50i-a64-pine64-common.dtsi"
> +
> +/ {
> +	model = "Pine64";
> +	compatible = "pine64,pine64", "allwinner,sun50i-a64";
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	memory {
> +		reg = <0x40000000 0x20000000>;
> +	};
> +};
> diff --git a/arch/arm/dts/sun50i-a64.dtsi b/arch/arm/dts/sun50i-a64.dtsi
> new file mode 100644
> index 0000000..1bd436f
> --- /dev/null
> +++ b/arch/arm/dts/sun50i-a64.dtsi
> @@ -0,0 +1,624 @@
> +/*
> + * Copyright (C) 2016 ARM Ltd.
> + * based on the Allwinner H3 dtsi:
> + *    Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
> + *
> + * 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 <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/pinctrl/sun4i-a10.h>
> +
> +/ {
> +	interrupt-parent = <&gic>;
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu at 0 {
> +			compatible = "arm,cortex-a53", "arm,armv8";
> +			device_type = "cpu";
> +			reg = <0>;
> +			enable-method = "psci";
> +		};
> +
> +		cpu at 1 {
> +			compatible = "arm,cortex-a53", "arm,armv8";
> +			device_type = "cpu";
> +			reg = <1>;
> +			enable-method = "psci";
> +		};
> +
> +		cpu at 2 {
> +			compatible = "arm,cortex-a53", "arm,armv8";
> +			device_type = "cpu";
> +			reg = <2>;
> +			enable-method = "psci";
> +		};
> +
> +		cpu at 3 {
> +			compatible = "arm,cortex-a53", "arm,armv8";
> +			device_type = "cpu";
> +			reg = <3>;
> +			enable-method = "psci";
> +		};
> +	};
> +
> +	psci {
> +		compatible = "arm,psci-0.2";
> +		method = "smc";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x40000000 0>;
> +	};
> +
> +	gic: interrupt-controller at 1c81000 {
> +		compatible = "arm,gic-400";
> +		interrupt-controller;
> +		#interrupt-cells = <3>;
> +		#address-cells = <0>;
> +
> +		reg = <0x01c81000 0x1000>,
> +		      <0x01c82000 0x2000>,
> +		      <0x01c84000 0x2000>,
> +		      <0x01c86000 0x2000>;
> +		interrupts = <GIC_PPI 9
> +		      (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> +	};
> +
> +	timer {
> +		compatible = "arm,armv8-timer";
> +		interrupts = <GIC_PPI 13
> +			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> +			     <GIC_PPI 14
> +			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> +			     <GIC_PPI 11
> +			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
> +			     <GIC_PPI 10
> +			(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
> +	};
> +
> +	clocks {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		osc24M: osc24M_clk {
> +			#clock-cells = <0>;
> +			compatible = "fixed-clock";
> +			clock-frequency = <24000000>;
> +			clock-output-names = "osc24M";
> +		};
> +
> +		osc32k: osc32k_clk {
> +			#clock-cells = <0>;
> +			compatible = "fixed-clock";
> +			clock-frequency = <32768>;
> +			clock-output-names = "osc32k";
> +		};
> +
> +		pll1: pll1_clk at 1c20000 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun8i-a23-pll1-clk";
> +			reg = <0x01c20000 0x4>;
> +			clocks = <&osc24M>;
> +			clock-output-names = "pll1";
> +		};
> +
> +		pll6: pll6_clk at 1c20028 {
> +			#clock-cells = <1>;
> +			compatible = "allwinner,sun6i-a31-pll6-clk";
> +			reg = <0x01c20028 0x4>;
> +			clocks = <&osc24M>;
> +			clock-output-names = "pll6", "pll6x2";
> +		};
> +
> +		pll6d2: pll6d2_clk {
> +			#clock-cells = <0>;
> +			compatible = "fixed-factor-clock";
> +			clock-div = <2>;
> +			clock-mult = <1>;
> +			clocks = <&pll6 0>;
> +			clock-output-names = "pll6d2";
> +		};
> +
> +		pll7: pll7_clk at 1c2002c {
> +			#clock-cells = <1>;
> +			compatible = "allwinner,sun6i-a31-pll6-clk";
> +			reg = <0x01c2002c 0x4>;
> +			clocks = <&osc24M>;
> +			clock-output-names = "pll7", "pll7x2";
> +		};
> +
> +		cpu: cpu_clk at 1c20050 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-cpu-clk";
> +			reg = <0x01c20050 0x4>;
> +			clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
> +			clock-output-names = "cpu";
> +			critical-clocks = <0>;
> +		};
> +
> +		axi: axi_clk at 1c20050 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-axi-clk";
> +			reg = <0x01c20050 0x4>;
> +			clocks = <&cpu>;
> +			clock-output-names = "axi";
> +		};
> +
> +		ahb1: ahb1_clk at 1c20054 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun6i-a31-ahb1-clk";
> +			reg = <0x01c20054 0x4>;
> +			clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
> +			clock-output-names = "ahb1";
> +		};
> +
> +		ahb2: ahb2_clk at 1c2005c {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun8i-h3-ahb2-clk";
> +			reg = <0x01c2005c 0x4>;
> +			clocks = <&ahb1>, <&pll6d2>;
> +			clock-output-names = "ahb2";
> +		};
> +
> +		apb1: apb1_clk at 1c20054 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-apb0-clk";
> +			reg = <0x01c20054 0x4>;
> +			clocks = <&ahb1>;
> +			clock-output-names = "apb1";
> +		};
> +
> +		apb2: apb2_clk at 1c20058 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-apb1-clk";
> +			reg = <0x01c20058 0x4>;
> +			clocks = <&osc32k>, <&osc24M>, <&pll6 1>, <&pll6 1>;
> +			clock-output-names = "apb2";
> +		};
> +
> +		bus_gates: bus_gates_clk at 1c20060 {
> +			#clock-cells = <1>;
> +			compatible = "allwinner,sun50i-a64-bus-gates-clk",
> +				     "allwinner,sunxi-multi-bus-gates-clk";
> +			reg = <0x01c20060 0x14>;
> +			ahb1_parent {
> +				clocks = <&ahb1>;
> +				clock-indices = <1>, <5>,
> +						<6>, <8>,
> +						<9>, <10>,
> +						<13>, <14>,
> +						<18>, <19>,
> +						<20>, <21>,
> +						<23>, <24>,
> +						<25>, <28>,
> +						<32>, <35>,
> +						<36>, <37>,
> +						<40>, <43>,
> +						<44>, <52>,
> +						<53>, <54>,
> +						<135>;
> +				clock-output-names = "bus_mipidsi", "bus_ce",
> +						"bus_dma", "bus_mmc0",
> +						"bus_mmc1", "bus_mmc2",
> +						"bus_nand", "bus_sdram",
> +						"bus_ts", "bus_hstimer",
> +						"bus_spi0", "bus_spi1",
> +						"bus_otg", "bus_otg_ehci0",
> +						"bus_ehci0", "bus_otg_ohci0",
> +						"bus_ve", "bus_lcd0",
> +						"bus_lcd1", "bus_deint",
> +						"bus_csi", "bus_hdmi",
> +						"bus_de", "bus_gpu",
> +						"bus_msgbox", "bus_spinlock",
> +						"bus_dbg";
> +			};
> +			ahb2_parent {
> +				clocks = <&ahb2>;
> +				clock-indices = <17>, <29>;
> +				clock-output-names = "bus_gmac", "bus_ohci0";
> +			};
> +			apb1_parent {
> +				clocks = <&apb1>;
> +				clock-indices = <64>, <65>,
> +						<69>, <72>,
> +						<76>, <77>,
> +						<78>;
> +				clock-output-names = "bus_codec", "bus_spdif",
> +						"bus_pio", "bus_ths",
> +						"bus_i2s0", "bus_i2s1",
> +						"bus_i2s2";
> +			};
> +			abp2_parent {
> +				clocks = <&apb2>;
> +				clock-indices = <96>, <97>,
> +						<98>, <101>,
> +						<112>, <113>,
> +						<114>, <115>,
> +						<116>;
> +				clock-output-names = "bus_i2c0", "bus_i2c1",
> +						"bus_i2c2", "bus_scr",
> +						"bus_uart0", "bus_uart1",
> +						"bus_uart2", "bus_uart3",
> +						"bus_uart4";
> +			};
> +		};
> +
> +		mmc0_clk: mmc0_clk at 1c20088 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-mod0-clk";
> +			reg = <0x01c20088 0x4>;
> +			clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
> +			clock-output-names = "mmc0";
> +                };
> +
> +		mmc1_clk: mmc1_clk at 1c2008c {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-mod0-clk";
> +			reg = <0x01c2008c 0x4>;
> +			clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
> +			clock-output-names = "mmc1";
> +		};
> +
> +		mmc2_clk: mmc2_clk at 1c20090 {
> +			#clock-cells = <0>;
> +			compatible = "allwinner,sun4i-a10-mod0-clk";
> +			reg = <0x01c20090 0x4>;
> +			clocks = <&osc24M>, <&pll6 1>, <&pll7 1>;
> +			clock-output-names = "mmc2";
> +		};
> +	};
> +
> +	soc {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		mmc0: mmc at 1c0f000 {
> +			compatible = "allwinner,sun50i-a64-mmc",
> +				     "allwinner,sun5i-a13-mmc";
> +			reg = <0x01c0f000 0x1000>;
> +			clocks = <&bus_gates 8>, <&mmc0_clk>,
> +				 <&mmc0_clk>, <&mmc0_clk>;
> +			clock-names = "ahb", "mmc",
> +				      "output", "sample";
> +			resets = <&ahb_rst 8>;
> +			reset-names = "ahb";
> +			interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		mmc1: mmc at 1c10000 {
> +			compatible = "allwinner,sun50i-a64-mmc",
> +				     "allwinner,sun5i-a13-mmc";
> +			reg = <0x01c10000 0x1000>;
> +			clocks = <&bus_gates 9>, <&mmc1_clk>,
> +				 <&mmc1_clk>, <&mmc1_clk>;
> +			clock-names = "ahb", "mmc",
> +				      "output", "sample";
> +			resets = <&ahb_rst 9>;
> +			reset-names = "ahb";
> +			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		mmc2: mmc at 1c11000 {
> +			compatible = "allwinner,sun50i-a64-mmc",
> +				     "allwinner,sun5i-a13-mmc";
> +			reg = <0x01c11000 0x1000>;
> +			clocks = <&bus_gates 10>, <&mmc2_clk>,
> +				 <&mmc2_clk>, <&mmc2_clk>;
> +			clock-names = "ahb", "mmc",
> +				      "output", "sample";
> +			resets = <&ahb_rst 10>;
> +			reset-names = "ahb";
> +			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		pio: pinctrl at 1c20800 {
> +			compatible = "allwinner,sun50i-a64-pinctrl";
> +			reg = <0x01c20800 0x400>;
> +			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&bus_gates 69>;
> +			gpio-controller;
> +			#gpio-cells = <3>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +
> +			uart0_pins_a: uart0 at 0 {
> +				allwinner,pins = "PB8", "PB9";
> +				allwinner,function = "uart0";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart0_pins_b: uart0 at 1 {
> +				allwinner,pins = "PF2", "PF3";
> +				allwinner,function = "uart0";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart1_2pins: uart1_2 at 0 {
> +				allwinner,pins = "PG6", "PG7";
> +				allwinner,function = "uart1";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart1_4pins: uart1_4 at 0 {
> +				allwinner,pins = "PG6", "PG7", "PG8", "PG9";
> +				allwinner,function = "uart1";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart2_2pins: uart2_2 at 0 {
> +				allwinner,pins = "PB0", "PB1";
> +				allwinner,function = "uart2";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart2_4pins: uart2_4 at 0 {
> +				allwinner,pins = "PB0", "PB1", "PB2", "PB3";
> +				allwinner,function = "uart2";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart3_pins_a: uart3 at 0 {
> +				allwinner,pins = "PD0", "PD1";
> +				allwinner,function = "uart3";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart3_2pins_b: uart3_2 at 1 {
> +				allwinner,pins = "PH4", "PH5";
> +				allwinner,function = "uart3";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart3_4pins_b: uart3_4 at 1 {
> +				allwinner,pins = "PH4", "PH5", "PH6", "PH7";
> +				allwinner,function = "uart3";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart4_2pins: uart4_2 at 0 {
> +				allwinner,pins = "PD2", "PD3";
> +				allwinner,function = "uart4";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			uart4_4pins: uart4_4 at 0 {
> +				allwinner,pins = "PD2", "PD3", "PD4", "PD5";
> +				allwinner,function = "uart4";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			mmc0_pins: mmc0 at 0 {
> +				allwinner,pins = "PF0", "PF1", "PF2", "PF3",
> +						 "PF4", "PF5";
> +				allwinner,function = "mmc0";
> +				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			mmc0_default_cd_pin: mmc0_cd_pin at 0 {
> +				allwinner,pins = "PF6";
> +				allwinner,function = "gpio_in";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> +			};
> +
> +			mmc1_pins: mmc1 at 0 {
> +				allwinner,pins = "PG0", "PG1", "PG2", "PG3",
> +						 "PG4", "PG5";
> +				allwinner,function = "mmc1";
> +				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			mmc2_pins: mmc2 at 0 {
> +				allwinner,pins = "PC1", "PC5", "PC6", "PC8",
> +						 "PC9", "PC10";
> +				allwinner,function = "mmc2";
> +				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			i2c0_pins: i2c0_pins {
> +				allwinner,pins = "PH0", "PH1";
> +				allwinner,function = "i2c0";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			i2c1_pins: i2c1_pins {
> +				allwinner,pins = "PH2", "PH3";
> +				allwinner,function = "i2c1";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
> +			i2c2_pins: i2c2_pins {
> +				allwinner,pins = "PE14", "PE15";
> +				allwinner,function = "i2c2";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +		};
> +
> +		ahb_rst: reset at 1c202c0 {
> +			#reset-cells = <1>;
> +			compatible = "allwinner,sun6i-a31-clock-reset";
> +			reg = <0x01c202c0 0xc>;
> +		};
> +
> +		apb1_rst: reset at 1c202d0 {
> +			#reset-cells = <1>;
> +			compatible = "allwinner,sun6i-a31-clock-reset";
> +			reg = <0x01c202d0 0x4>;
> +		};
> +
> +		apb2_rst: reset at 1c202d8 {
> +			#reset-cells = <1>;
> +			compatible = "allwinner,sun6i-a31-clock-reset";
> +			reg = <0x01c202d8 0x4>;
> +		};
> +
> +		uart0: serial at 1c28000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x01c28000 0x400>;
> +			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			clocks = <&bus_gates 112>;
> +			resets = <&apb2_rst 16>;
> +			status = "disabled";
> +		};
> +
> +		uart1: serial at 1c28400 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x01c28400 0x400>;
> +			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			clocks = <&bus_gates 113>;
> +			resets = <&apb2_rst 17>;
> +			status = "disabled";
> +		};
> +
> +		uart2: serial at 1c28800 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x01c28800 0x400>;
> +			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			clocks = <&bus_gates 114>;
> +			resets = <&apb2_rst 18>;
> +			status = "disabled";
> +		};
> +
> +		uart3: serial at 1c28c00 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x01c28c00 0x400>;
> +			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			clocks = <&bus_gates 115>;
> +			resets = <&apb2_rst 19>;
> +			status = "disabled";
> +		};
> +
> +		uart4: serial at 1c29000 {
> +			compatible = "snps,dw-apb-uart";
> +			reg = <0x01c29000 0x400>;
> +			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
> +			reg-shift = <2>;
> +			reg-io-width = <4>;
> +			clocks = <&bus_gates 116>;
> +			resets = <&apb2_rst 20>;
> +			status = "disabled";
> +		};
> +
> +		rtc: rtc at 1f00000 {
> +			compatible = "allwinner,sun6i-a31-rtc";
> +			reg = <0x01f00000 0x54>;
> +			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
> +		};
> +
> +		i2c0: i2c at 1c2ac00 {
> +			compatible = "allwinner,sun6i-a31-i2c";
> +			reg = <0x01c2ac00 0x400>;
> +			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&bus_gates 96>;
> +			resets = <&apb2_rst 0>;
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c1: i2c at 1c2b000 {
> +			compatible = "allwinner,sun6i-a31-i2c";
> +			reg = <0x01c2b000 0x400>;
> +			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&bus_gates 97>;
> +			resets = <&apb2_rst 1>;
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +
> +		i2c2: i2c at 1c2b400 {
> +			compatible = "allwinner,sun6i-a31-i2c";
> +			reg = <0x01c2b400 0x400>;
> +			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&bus_gates 98>;
> +			resets = <&apb2_rst 2>;
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
> +	};
> +};
> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
> index 0494a9f..0977334 100644
> --- a/configs/pine64_plus_defconfig
> +++ b/configs/pine64_plus_defconfig
> @@ -4,7 +4,7 @@ CONFIG_MACH_SUN50I=y
>  CONFIG_DRAM_CLK=672
>  CONFIG_DRAM_ZQ=3881915
>  # CONFIG_VIDEO is not set
> -CONFIG_DEFAULT_DEVICE_TREE="pine64_plus"
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
>  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>  CONFIG_HUSH_PARSER=y
>  # CONFIG_CMD_IMLS is not set
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot, 3/6] arm64: sunxi: reserve space for boot0 header
  2016-05-04 21:15 ` [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header Andre Przywara
  2016-05-06 21:15   ` Steve Rae
@ 2016-05-15 10:13   ` Hans de Goede
  1 sibling, 0 replies; 33+ messages in thread
From: Hans de Goede @ 2016-05-15 10:13 UTC (permalink / raw)
  To: u-boot

Hi,

On 04-05-16 23:15, Andre Przywara wrote:
> The Allwinner provided boot0 boot loader requires a header before the
> U-Boot binary to both check its validity and to find other blobs to
> load. There is a tool called boot0img which fills the header
> appropriately.
> Reserve some space at the beginning of the binary to later hold the
> header if needed.
> Please note that the header is jumped over already by U-Boot anyway,
> so filling the header is optional and can be skipped if for instance
> boot0 is not used.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Further down the thread you said you would do a v2 of this one,
so I'm dropping it.

Regards,

Hans


> ---
>  arch/arm/cpu/armv8/start.S | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index deb44a8..b4c4867 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -21,6 +21,9 @@
>  _start:
>  	b	reset
>
> +#ifdef CONFIG_ARCH_SUNXI
> +	.space 0x5fc	/* can be filled with a boot0 header if needed */
> +#endif
>  	.align 3
>
>  .globl	_TEXT_BASE
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot,6/6] Pine64: rename defconfig
  2016-05-04 21:15 ` [U-Boot] [PATCH 6/6] Pine64: rename defconfig Andre Przywara
  2016-05-04 21:46   ` Peter Robinson
@ 2016-05-15 10:30   ` Hans de Goede
  2016-05-15 12:49     ` André Przywara
  1 sibling, 1 reply; 33+ messages in thread
From: Hans de Goede @ 2016-05-15 10:30 UTC (permalink / raw)
  To: u-boot

Hi,

On 04-05-16 23:15, Andre Przywara wrote:
> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
> pine64_defconfig.
> The differences between the two versions (more RAM and a different
> Ethernet PHY) don't justify two board versions, so lets stick with the
> generic name and try to differentiate between the versions at runtime
> if this is needed later.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

So further down the thread there is some good discussion on
autodetection.

I would prefer to keep the name as is (and matching the dts name)
for now until this is sorted out.

As for the auto-detect discussion I'm all in favor of doing
auto-detect and having only one pine64 target in u-boot.

But I'm against the idea to pass the u-boot dtb into the kernel.

People will typically only install u-boot once and then get
kernel upgrades, including major version updates (Fedora does
this within a release, Debian on dist-upgrade) from their
distro, so we really want to stick with using the
dtb from the fdtdir entry in extlinux.conf

The way this sofar works for sunxi boards is that the chosen
entry in extlinux.conf sets the fdtdir and then u-boot determines
the dtb name to use, since it knows which board it is booting
from.

So when we do autodetection, the thing todo would be for the
autodetect code to update the fdtfile environment variable
to be one of: "sun50i-a64-pine64-plus", "sun50i-a64-pine64",
"sun50i-a64-pine64-other-variant" (*).

And then upon booting u-boot will load $fdtdir/$fdtfile.

Let me give one example where this will be beneficial over
using a u-boot supplied dtb:

1) User installs u-boot today, using boot0 and other closed
bits + say Fedora 24.
2) In the future we add support for the csi camera
3) User gets newer kernel from Fedora, this comes with
an updated "sun50i-a64-pine64-plus.dtb" which includes the
necessary changes to enable the csi interface, csi interface
just works.

If u-boot where to supply the dtb, then the user would also
need to update u-boot, which is not part of the standard
yum / dnf / apt-get update process. Same for later enabling
hdmi output support, audio in/out, etc.

Note I'm not advocating to have different dtb-s, all sunxi
boards use the same dts files in u-boot and the kernel,
but the _kernel_ is considered the canonical source, and
for u-boot we simply sync the included dts files with the
kernel every now and then.

As an added advantage this keeps the ABI part of the dtb
between u-boot and the kernel really small, it basically
is just the $fdtfile name. Which means that if we mess up
some bindings we can chose to change them, we try to avoid
this but always using the dtb file bundled with the kernel
allows this.

The main argument for always using the dtb file bundled with
the kernel is to always get the latest new features (think
extended hw support) and bugfixes, without the user needing
to update the bootlader (which is something which is not
done automatically by the distro, unlike the kernel).

Regards,

Hans


*) Note we will likely need something more then just that, since
e.g. some variants have an emmc and others do not and this is
relevant for u-boot itself

> ---
>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
>  configs/pine64_plus_defconfig | 20 --------------------
>  2 files changed, 20 insertions(+), 20 deletions(-)
>  create mode 100644 configs/pine64_defconfig
>  delete mode 100644 configs/pine64_plus_defconfig
>
> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
> new file mode 100644
> index 0000000..0977334
> --- /dev/null
> +++ b/configs/pine64_defconfig
> @@ -0,0 +1,20 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_MACH_SUN50I=y
> +CONFIG_DRAM_CLK=672
> +CONFIG_DRAM_ZQ=3881915
> +# CONFIG_VIDEO is not set
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_HUSH_PARSER=y
> +# CONFIG_CMD_IMLS is not set
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_MMC=y
> +# CONFIG_CMD_FPGA is not set
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_MII=y
> +CONFIG_CMD_PING=y
> +CONFIG_CMD_EXT2=y
> +CONFIG_CMD_EXT4=y
> +CONFIG_CMD_FAT=y
> +CONFIG_CMD_FS_GENERIC=y
> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
> deleted file mode 100644
> index 0977334..0000000
> --- a/configs/pine64_plus_defconfig
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -CONFIG_ARM=y
> -CONFIG_ARCH_SUNXI=y
> -CONFIG_MACH_SUN50I=y
> -CONFIG_DRAM_CLK=672
> -CONFIG_DRAM_ZQ=3881915
> -# CONFIG_VIDEO is not set
> -CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> -# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> -CONFIG_HUSH_PARSER=y
> -# CONFIG_CMD_IMLS is not set
> -# CONFIG_CMD_FLASH is not set
> -CONFIG_CMD_MMC=y
> -# CONFIG_CMD_FPGA is not set
> -CONFIG_CMD_DHCP=y
> -CONFIG_CMD_MII=y
> -CONFIG_CMD_PING=y
> -CONFIG_CMD_EXT2=y
> -CONFIG_CMD_EXT4=y
> -CONFIG_CMD_FAT=y
> -CONFIG_CMD_FS_GENERIC=y
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot,5/6] arm64: Pine64: update FDT files
  2016-05-15 10:13   ` [U-Boot] [U-Boot,5/6] " Hans de Goede
@ 2016-05-15 12:48     ` André Przywara
  0 siblings, 0 replies; 33+ messages in thread
From: André Przywara @ 2016-05-15 12:48 UTC (permalink / raw)
  To: u-boot

On 15/05/16 11:13, Hans de Goede wrote:

Hi Hans,

> On 04-05-16 23:15, Andre Przywara wrote:
>> The originally committed .dts files for the Pine64 were from an early
>> proof-of-concept version and should have never been committed upstream.
>> Replace them with much more mature versions, which also use a different
>> naming scheme.
>> Please note that at this point there is at least one binding which has
>> not been agreed upon, so this is subject to change.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> 
> Thanks, looks good to me applied to:
> 
> http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=shortlog;h=refs/heads/next
> 
> This will be part of my first pull-req for u-boot v2016.07.

thank you very much for merging those patches!
The first patches in this series were the ones I really care about, so I
am happy to have a discussion about the other ones.

Cheers,
Andre.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot,6/6] Pine64: rename defconfig
  2016-05-15 10:30   ` [U-Boot] [U-Boot,6/6] " Hans de Goede
@ 2016-05-15 12:49     ` André Przywara
  2016-05-15 13:28       ` Hans de Goede
  2016-05-15 20:19       ` Alexander Graf
  0 siblings, 2 replies; 33+ messages in thread
From: André Przywara @ 2016-05-15 12:49 UTC (permalink / raw)
  To: u-boot

On 15/05/16 11:30, Hans de Goede wrote:
> Hi,
> 
> On 04-05-16 23:15, Andre Przywara wrote:
>> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
>> pine64_defconfig.
>> The differences between the two versions (more RAM and a different
>> Ethernet PHY) don't justify two board versions, so lets stick with the
>> generic name and try to differentiate between the versions at runtime
>> if this is needed later.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> 
> So further down the thread there is some good discussion on
> autodetection.
> 
> I would prefer to keep the name as is (and matching the dts name)
> for now until this is sorted out.
> 
> As for the auto-detect discussion I'm all in favor of doing
> auto-detect and having only one pine64 target in u-boot.

I fully agree. Hence I was proposing a more generic name (Pine64), as
this is what people usually say, implying the plus variants of it as well.
I found this several times when I was typing "make pine64_defconfig" and
wondering why it didn't work. Typing pine64_plus_defconfig when everyone
talks about those "Pine64" boards is just a bit counterintuitive - an
also this pine64_plus config would cover the none-plus boards as well -
which is just confusing.
So my proposal was really about just a name change.
But then again it's just a configuration name, so I don't have a strong
opinion on this.

> But I'm against the idea to pass the u-boot dtb into the kernel.
> 
> People will typically only install u-boot once and then get
> kernel upgrades, including major version updates (Fedora does
> this within a release, Debian on dist-upgrade) from their
> distro, so we really want to stick with using the
> dtb from the fdtdir entry in extlinux.conf
> 
> The way this sofar works for sunxi boards is that the chosen
> entry in extlinux.conf sets the fdtdir and then u-boot determines
> the dtb name to use, since it knows which board it is booting
> from.
> 
> So when we do autodetection, the thing todo would be for the
> autodetect code to update the fdtfile environment variable
> to be one of: "sun50i-a64-pine64-plus", "sun50i-a64-pine64",
> "sun50i-a64-pine64-other-variant" (*).
> 
> And then upon booting u-boot will load $fdtdir/$fdtfile.
> 
> Let me give one example where this will be beneficial over
> using a u-boot supplied dtb:
> 
> 1) User installs u-boot today, using boot0 and other closed
> bits + say Fedora 24.
> 2) In the future we add support for the csi camera
> 3) User gets newer kernel from Fedora, this comes with
> an updated "sun50i-a64-pine64-plus.dtb" which includes the
> necessary changes to enable the csi interface, csi interface
> just works.
> 
> If u-boot where to supply the dtb, then the user would also
> need to update u-boot, which is not part of the standard
> yum / dnf / apt-get update process. Same for later enabling
> hdmi output support, audio in/out, etc.

I understand and support all of these arguments (and hope you didn't
spend too much time in writing this down ;-)

My idea was to have some kind of fallback DT in case there is none
provided by the distribution. For many cases it would be good enough to
just use U-Boot's DT, so I am looking for an easy way to set U-Boot's
"externally-facing" DT addr to the internal one - something like "fdt
internal" or having the internal DT address in a variable or just making
it the default unless the user or boot script loads a custom one.
So from a technical side this is probably not a challenging request and
orthogonal to the rest of the DT discussion.
I see that one of the beauties of the DT is to be easily "hackable", so
I fully support the option of loading a new DT and passing that on to
the kernel.

But: on ARM64 most boards I am aware of provide a DT as part of the
firmware and it sits in some kind of onboard storage - so distributions
don't need to care about shipping DTs.
I see that those SBCs are different here, but frankly - in contrast to
ARM(32) boards - there are not the majority. It may even be that DT
boards (in contrast to ones using ACPI only) become a niche in the
mid-term future (not that I am happy about that).
I am not sure those SBCs have a strong enough audience to push
distributions to deviate from that single-kernel-file-only approach for
arm64. Also all those boards - and their firmware - are in their early
infancy, so why not rather push for a unified approach here, possibly
deviating from the (legacy) ARM one (explicitly supporting certain
boards and shipping DTs for it)?

So: the DT becomes part of the firmware. In the beginning of the support
era (and I calculate with something like a year here) I expect firmware
to improve significantly - even U-Boot, for that matter (USB, Ethernet,
EFI support, you name it ...). So there is a strong incentive to upgrade
your firmware anyway.
But also I see that the kernel support evolves quickly, so putting a new
DT in your /boot directory is probably a good idea - at least for a start.
But when the board support has matured - say to a level the A20 SoC sees
today - I would expect the DT to become very stable and only minor
features requiring an update, something that many people just may not
care about. Those new DTs could then come as part of a firmware update -
which may fix other issues as well. So for instance ARM Trusted Firmware
is part of the Pine64 firmware stack, which gets regular updates with
new features and security fixes (for silicon erratas, for instance). As
part of such an update, a DT update would be included.

To compare this: if I don't miss anything and I don't have issues, I
wouldn't upgrade my Thinkpad firmware either - definitely not for
something like added IR support, which I just don't need (just an example).

> Note I'm not advocating to have different dtb-s, all sunxi
> boards use the same dts files in u-boot and the kernel,
> but the _kernel_ is considered the canonical source, and
> for u-boot we simply sync the included dts files with the
> kernel every now and then.

Yes, that makes sense and I support this.

> As an added advantage this keeps the ABI part of the dtb
> between u-boot and the kernel really small, it basically
> is just the $fdtfile name. Which means that if we mess up
> some bindings we can chose to change them, we try to avoid
> this but always using the dtb file bundled with the kernel
> allows this.

But U-Boot does not use the DT from the disk (or from PXE), instead it
will always use the one embedded in the binary, won't it?
So every time there is a DT issue and/or we update U-Boot's DT, we could
just adjust U-Boot's _drivers_ to cope with that new reference DT
(whether that comes from the kernel or from the vendor). So for U-Boot
itself we don't need to provide backward compatibility of say older
U-Boot binaries with newer DTs. At least this is my perception, please
correct me if I miss something here.

> The main argument for always using the dtb file bundled with
> the kernel is to always get the latest new features (think
> extended hw support) and bugfixes, without the user needing
> to update the bootlader (which is something which is not
> done automatically by the distro, unlike the kernel).

I see that - and that makes some sense especially during the beginning
of the board support.

But also I would like to see a bit beyond Linux - there are other OSes,
think the BSDs, for instance.
So everything that forces people to agree on _one_ single DT for a board
is helpful - the fact that we currently get away with changing the DT
_just for Linux_ is not a good argument to drag on with this in the future.

And frankly, the support level required for those ARM SBCs is quite high
at the moment. Everything that pushes people - board vendors and kernel
hackers - into a simpler approach - more towards providing better
firmware, which helps abstracting things and for shipping one "golden"
DT with the board - is helpful and we should look into this.
Frankly I don't see why a distribution would need to ship support files
for certain boards when there would be one canonical firmware source -
be that the vendor or a community like linux-sunxi.

Cheers,
Andre.

> 
> *) Note we will likely need something more then just that, since
> e.g. some variants have an emmc and others do not and this is
> relevant for u-boot itself
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot,6/6] Pine64: rename defconfig
  2016-05-15 12:49     ` André Przywara
@ 2016-05-15 13:28       ` Hans de Goede
  2016-05-15 20:19       ` Alexander Graf
  1 sibling, 0 replies; 33+ messages in thread
From: Hans de Goede @ 2016-05-15 13:28 UTC (permalink / raw)
  To: u-boot

Hi,

On 15-05-16 14:49, Andr? Przywara wrote:
> On 15/05/16 11:30, Hans de Goede wrote:
>> Hi,
>>
>> On 04-05-16 23:15, Andre Przywara wrote:
>>> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
>>> pine64_defconfig.
>>> The differences between the two versions (more RAM and a different
>>> Ethernet PHY) don't justify two board versions, so lets stick with the
>>> generic name and try to differentiate between the versions at runtime
>>> if this is needed later.
>>>
>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>
>> So further down the thread there is some good discussion on
>> autodetection.
>>
>> I would prefer to keep the name as is (and matching the dts name)
>> for now until this is sorted out.
>>
>> As for the auto-detect discussion I'm all in favor of doing
>> auto-detect and having only one pine64 target in u-boot.
>
> I fully agree. Hence I was proposing a more generic name (Pine64), as
> this is what people usually say, implying the plus variants of it as well.
> I found this several times when I was typing "make pine64_defconfig" and
> wondering why it didn't work. Typing pine64_plus_defconfig when everyone
> talks about those "Pine64" boards is just a bit counterintuitive - an
> also this pine64_plus config would cover the none-plus boards as well -
> which is just confusing.
> So my proposal was really about just a name change.
> But then again it's just a configuration name, so I don't have a strong
> opinion on this.

I understand, but I would like to keep the dts/dtb and defconfig names
matched (the dts has plus in it too) until we've autoconfig.

>> But I'm against the idea to pass the u-boot dtb into the kernel.
>>
>> People will typically only install u-boot once and then get
>> kernel upgrades, including major version updates (Fedora does
>> this within a release, Debian on dist-upgrade) from their
>> distro, so we really want to stick with using the
>> dtb from the fdtdir entry in extlinux.conf
>>
>> The way this sofar works for sunxi boards is that the chosen
>> entry in extlinux.conf sets the fdtdir and then u-boot determines
>> the dtb name to use, since it knows which board it is booting
>> from.
>>
>> So when we do autodetection, the thing todo would be for the
>> autodetect code to update the fdtfile environment variable
>> to be one of: "sun50i-a64-pine64-plus", "sun50i-a64-pine64",
>> "sun50i-a64-pine64-other-variant" (*).
>>
>> And then upon booting u-boot will load $fdtdir/$fdtfile.
>>
>> Let me give one example where this will be beneficial over
>> using a u-boot supplied dtb:
>>
>> 1) User installs u-boot today, using boot0 and other closed
>> bits + say Fedora 24.
>> 2) In the future we add support for the csi camera
>> 3) User gets newer kernel from Fedora, this comes with
>> an updated "sun50i-a64-pine64-plus.dtb" which includes the
>> necessary changes to enable the csi interface, csi interface
>> just works.
>>
>> If u-boot where to supply the dtb, then the user would also
>> need to update u-boot, which is not part of the standard
>> yum / dnf / apt-get update process. Same for later enabling
>> hdmi output support, audio in/out, etc.
>
> I understand and support all of these arguments (and hope you didn't
> spend too much time in writing this down ;-)

No not too much time :)

> My idea was to have some kind of fallback DT in case there is none
> provided by the distribution. For many cases it would be good enough to
> just use U-Boot's DT, so I am looking for an easy way to set U-Boot's
> "externally-facing" DT addr to the internal one - something like "fdt
> internal" or having the internal DT address in a variable or just making
> it the default unless the user or boot script loads a custom one.
> So from a technical side this is probably not a challenging request and
> orthogonal to the rest of the DT discussion.
> I see that one of the beauties of the DT is to be easily "hackable", so
> I fully support the option of loading a new DT and passing that on to
> the kernel.
>
> But: on ARM64 most boards I am aware of provide a DT as part of the
> firmware and it sits in some kind of onboard storage - so distributions
> don't need to care about shipping DTs.
> I see that those SBCs are different here, but frankly - in contrast to
> ARM(32) boards - there are not the majority. It may even be that DT
> boards (in contrast to ones using ACPI only) become a niche in the
> mid-term future (not that I am happy about that).
> I am not sure those SBCs have a strong enough audience to push
> distributions to deviate from that single-kernel-file-only approach for
> arm64. Also all those boards - and their firmware - are in their early
> infancy, so why not rather push for a unified approach here, possibly
> deviating from the (legacy) ARM one (explicitly supporting certain
> boards and shipping DTs for it)?
>
> So: the DT becomes part of the firmware. In the beginning of the support
> era (and I calculate with something like a year here) I expect firmware
> to improve significantly - even U-Boot, for that matter (USB, Ethernet,
> EFI support, you name it ...). So there is a strong incentive to upgrade
> your firmware anyway.
> But also I see that the kernel support evolves quickly, so putting a new
> DT in your /boot directory is probably a good idea - at least for a start.
> But when the board support has matured - say to a level the A20 SoC sees
> today - I would expect the DT to become very stable and only minor
> features requiring an update, something that many people just may not
> care about. Those new DTs could then come as part of a firmware update -
> which may fix other issues as well. So for instance ARM Trusted Firmware
> is part of the Pine64 firmware stack, which gets regular updates with
> new features and security fixes (for silicon erratas, for instance). As
> part of such an update, a DT update would be included.
>
> To compare this: if I don't miss anything and I don't have issues, I
> wouldn't upgrade my Thinkpad firmware either - definitely not for
> something like added IR support, which I just don't need (just an example).
>
>> Note I'm not advocating to have different dtb-s, all sunxi
>> boards use the same dts files in u-boot and the kernel,
>> but the _kernel_ is considered the canonical source, and
>> for u-boot we simply sync the included dts files with the
>> kernel every now and then.
>
> Yes, that makes sense and I support this.
>
>> As an added advantage this keeps the ABI part of the dtb
>> between u-boot and the kernel really small, it basically
>> is just the $fdtfile name. Which means that if we mess up
>> some bindings we can chose to change them, we try to avoid
>> this but always using the dtb file bundled with the kernel
>> allows this.
>
> But U-Boot does not use the DT from the disk (or from PXE), instead it
> will always use the one embedded in the binary, won't it?

Correct, u-boot (currently) always uses its embedded DT, at least
for sunxi it does, I'm not 100% sure about other SoCs.

> So every time there is a DT issue and/or we update U-Boot's DT, we could
> just adjust U-Boot's _drivers_ to cope with that new reference DT
> (whether that comes from the kernel or from the vendor). So for U-Boot
> itself we don't need to provide backward compatibility of say older
> U-Boot binaries with newer DTs. At least this is my perception, please
> correct me if I miss something here.

Right, this is also why I often allow dt-enabled drivers in u-boot
before the binding is set in the upstream kernel, since we bundle
u-boot with its own dt we can always break the binding from u-boot's
pov.

Note I do not want to get in a situation where u-boot's dt and the kernels
diverge as we've seen with other SoCs though, so once the kernel dt
binding is stable I expect the u-boot code to be fixed to use it and
the bundled dt to be synced with the final one from the kernel.

>> The main argument for always using the dtb file bundled with
>> the kernel is to always get the latest new features (think
>> extended hw support) and bugfixes, without the user needing
>> to update the bootlader (which is something which is not
>> done automatically by the distro, unlike the kernel).
>
> I see that - and that makes some sense especially during the beginning
> of the board support.
>
> But also I would like to see a bit beyond Linux - there are other OSes,
> think the BSDs, for instance.
> So everything that forces people to agree on _one_ single DT for a board
> is helpful - the fact that we currently get away with changing the DT
> _just for Linux_ is not a good argument to drag on with this in the future.

Agreed, as said above I at least want to always see u-boot and the kernel
in sync wrt dt consumption, unlike some other SoCs which have different
dt bindings for u-boot and the kernel (this is mostly a historical
thing but still).

> And frankly, the support level required for those ARM SBCs is quite high
> at the moment. Everything that pushes people - board vendors and kernel
> hackers - into a simpler approach - more towards providing better
> firmware, which helps abstracting things and for shipping one "golden"
> DT with the board - is helpful and we should look into this.
> Frankly I don't see why a distribution would need to ship support files
> for certain boards when there would be one canonical firmware source -
> be that the vendor or a community like linux-sunxi.

I also agree with this, my dream is to have the SBCs as easy to use /
install Linux on as a PC, unfortunately we still have a long way to go.

I can see how a firmware provided dtb can be helpful for a more
plug and play experience, I'm afraid though that we will always
be playing catch-up by the time we've a full set of bindings for
the A64, so that a newer A64 based SBC could in theory ship with
a dtb on board which enables all desirable functionality, chances
are the A64 has been obsoleted by something new, so what we really
need here is for the SoC vendors to start doing hardware enablement
directly upstream, rather then with some questionable quality BSP.

Regards,

Hans

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [U-Boot] [U-Boot,6/6] Pine64: rename defconfig
  2016-05-15 12:49     ` André Przywara
  2016-05-15 13:28       ` Hans de Goede
@ 2016-05-15 20:19       ` Alexander Graf
  1 sibling, 0 replies; 33+ messages in thread
From: Alexander Graf @ 2016-05-15 20:19 UTC (permalink / raw)
  To: u-boot



On 15.05.16 14:49, Andr? Przywara wrote:
> On 15/05/16 11:30, Hans de Goede wrote:
>> Hi,
>>
>> On 04-05-16 23:15, Andre Przywara wrote:
>>> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
>>> pine64_defconfig.
>>> The differences between the two versions (more RAM and a different
>>> Ethernet PHY) don't justify two board versions, so lets stick with the
>>> generic name and try to differentiate between the versions at runtime
>>> if this is needed later.
>>>
>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>
>> So further down the thread there is some good discussion on
>> autodetection.
>>
>> I would prefer to keep the name as is (and matching the dts name)
>> for now until this is sorted out.
>>
>> As for the auto-detect discussion I'm all in favor of doing
>> auto-detect and having only one pine64 target in u-boot.
> 
> I fully agree. Hence I was proposing a more generic name (Pine64), as
> this is what people usually say, implying the plus variants of it as well.
> I found this several times when I was typing "make pine64_defconfig" and
> wondering why it didn't work. Typing pine64_plus_defconfig when everyone
> talks about those "Pine64" boards is just a bit counterintuitive - an
> also this pine64_plus config would cover the none-plus boards as well -
> which is just confusing.
> So my proposal was really about just a name change.
> But then again it's just a configuration name, so I don't have a strong
> opinion on this.
> 
>> But I'm against the idea to pass the u-boot dtb into the kernel.
>>
>> People will typically only install u-boot once and then get
>> kernel upgrades, including major version updates (Fedora does
>> this within a release, Debian on dist-upgrade) from their
>> distro, so we really want to stick with using the
>> dtb from the fdtdir entry in extlinux.conf
>>
>> The way this sofar works for sunxi boards is that the chosen
>> entry in extlinux.conf sets the fdtdir and then u-boot determines
>> the dtb name to use, since it knows which board it is booting
>> from.
>>
>> So when we do autodetection, the thing todo would be for the
>> autodetect code to update the fdtfile environment variable
>> to be one of: "sun50i-a64-pine64-plus", "sun50i-a64-pine64",
>> "sun50i-a64-pine64-other-variant" (*).
>>
>> And then upon booting u-boot will load $fdtdir/$fdtfile.
>>
>> Let me give one example where this will be beneficial over
>> using a u-boot supplied dtb:
>>
>> 1) User installs u-boot today, using boot0 and other closed
>> bits + say Fedora 24.
>> 2) In the future we add support for the csi camera
>> 3) User gets newer kernel from Fedora, this comes with
>> an updated "sun50i-a64-pine64-plus.dtb" which includes the
>> necessary changes to enable the csi interface, csi interface
>> just works.
>>
>> If u-boot where to supply the dtb, then the user would also
>> need to update u-boot, which is not part of the standard
>> yum / dnf / apt-get update process. Same for later enabling
>> hdmi output support, audio in/out, etc.
> 
> I understand and support all of these arguments (and hope you didn't
> spend too much time in writing this down ;-)
> 
> My idea was to have some kind of fallback DT in case there is none
> provided by the distribution. For many cases it would be good enough to
> just use U-Boot's DT, so I am looking for an easy way to set U-Boot's
> "externally-facing" DT addr to the internal one - something like "fdt
> internal" or having the internal DT address in a variable or just making

It's already in a variable today, so you can access (and copy) it if you
want :).

> it the default unless the user or boot script loads a custom one.

In the EFI case, we fall back to the internal fdt if we can't find a
matching file name on the boot media. That way users / distros can
provide newer dtb files while we still maintain compatibility with
distros / OSs that choose not to.

Other than those 2 points, I fully agree with you :). We should try to
provide a "known good" device tree on all systems we care about, so that
an OS can just consume it. Whether it's the internal dt or an
additionally bundled dt is an implementation detail imho.


Alex

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2016-05-15 20:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-04 21:15 [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Andre Przywara
2016-05-04 21:15 ` [U-Boot] [PATCH 1/6] arm/arm64: Move barrier instructions into separate header Andre Przywara
2016-05-08  0:36   ` André Przywara
2016-05-04 21:15 ` [U-Boot] [PATCH 2/6] Revert "sunxi: Reserve ATF memory space on A64" Andre Przywara
2016-05-15 10:12   ` [U-Boot] [U-Boot, " Hans de Goede
2016-05-04 21:15 ` [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header Andre Przywara
2016-05-06 21:15   ` Steve Rae
2016-05-06 21:27     ` André Przywara
2016-05-06 21:35       ` Steve Rae
2016-05-15 10:13   ` [U-Boot] [U-Boot, " Hans de Goede
2016-05-04 21:15 ` [U-Boot] [PATCH 4/6] arm64: sunxi: adjust default load addresses Andre Przywara
2016-05-15 10:12   ` [U-Boot] [U-Boot, " Hans de Goede
2016-05-04 21:15 ` [U-Boot] [PATCH 5/6] arm64: Pine64: update FDT files Andre Przywara
2016-05-15 10:13   ` [U-Boot] [U-Boot,5/6] " Hans de Goede
2016-05-15 12:48     ` André Przywara
2016-05-04 21:15 ` [U-Boot] [PATCH 6/6] Pine64: rename defconfig Andre Przywara
2016-05-04 21:46   ` Peter Robinson
2016-05-04 22:14     ` André Przywara
2016-05-06 15:11       ` Tom Rini
2016-05-06 15:20         ` Andre Przywara
2016-05-06 15:31           ` Tom Rini
2016-05-15 10:30   ` [U-Boot] [U-Boot,6/6] " Hans de Goede
2016-05-15 12:49     ` André Przywara
2016-05-15 13:28       ` Hans de Goede
2016-05-15 20:19       ` Alexander Graf
2016-05-04 21:53 ` [U-Boot] [PATCH 0/6] arm64: Pine64 fixes and updates Peter Robinson
2016-05-04 22:05   ` André Przywara
2016-05-04 22:15     ` Peter Robinson
2016-05-04 22:36       ` André Przywara
2016-05-05  1:03         ` Chen-Yu Tsai
2016-05-06 15:09 ` Tom Rini
2016-05-06 17:03   ` Andre Przywara
2016-05-06 17:22     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.