diff options
Diffstat (limited to 'configs/platform-v7a/patches/barebox-2017.06.0')
11 files changed, 770 insertions, 0 deletions
diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch new file mode 100644 index 0000000..a5fdc9c --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch @@ -0,0 +1,43 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Sat, 10 Sep 2016 17:40:56 +0200 +Subject: [PATCH] vexpress: use device tree provided by QEMU if available + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + arch/arm/boards/vexpress/lowlevel.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boards/vexpress/lowlevel.c b/arch/arm/boards/vexpress/lowlevel.c +index 204d29d8f098..7ed07a1e4134 100644 +--- a/arch/arm/boards/vexpress/lowlevel.c ++++ b/arch/arm/boards/vexpress/lowlevel.c +@@ -9,14 +9,27 @@ + #include <asm/barebox-arm-head.h> + #include <asm/barebox-arm.h> + #include <asm/system_info.h> ++#include <asm/unaligned.h> + #include <linux/amba/sp804.h> + + void __naked barebox_arm_reset_vector(void) + { ++ unsigned long membase; ++ void *boarddata; ++ + arm_cpu_lowlevel_init(); + + if (amba_is_arm_sp804(IOMEM(0x10011000))) +- barebox_arm_entry(0x60000000, SZ_512M, NULL); ++ membase = 0x60000000; ++ else ++ membase = 0x80000000; ++ ++ /* QEMU may put a dtb at the bare address */ ++ if (IS_ENABLED(CONFIG_OFDEVICE) && ++ get_unaligned_be32((void*)membase) == FDT_MAGIC) ++ boarddata = (void*)membase; + else +- barebox_arm_entry(0x80000000, SZ_512M, NULL); ++ boarddata = NULL; ++ ++ barebox_arm_entry(membase, SZ_512M, boarddata); + } diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0002-vexpress-device-tree-support.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0002-vexpress-device-tree-support.patch new file mode 100644 index 0000000..7f709fc --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0002-vexpress-device-tree-support.patch @@ -0,0 +1,78 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Sat, 10 Sep 2016 17:51:36 +0200 +Subject: [PATCH] vexpress: device tree support + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + arch/arm/boards/vexpress/init.c | 16 ++++++++++------ + arch/arm/dts/vexpress-v2p-ca9.dts | 27 +++++++++++++++++++++++++++ + 2 files changed, 37 insertions(+), 6 deletions(-) + create mode 100644 arch/arm/dts/vexpress-v2p-ca9.dts + +diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c +index f89dff939231..68ebbfab2633 100644 +--- a/arch/arm/boards/vexpress/init.c ++++ b/arch/arm/boards/vexpress/init.c +@@ -71,10 +71,12 @@ static void vexpress_a9_legacy_mem_init(void) + + static void vexpress_a9_legacy_devices_init(void) + { +- add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); +- add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); +- add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, +- 64 * 1024, IORESOURCE_MEM, NULL); ++ if (!IS_ENABLED(CONFIG_OFDEVICE)) { ++ add_cfi_flash_device(0, 0x40000000, SZ_64M, 0); ++ add_cfi_flash_device(1, 0x44000000, SZ_64M, 0); ++ add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000, ++ 64 * 1024, IORESOURCE_MEM, NULL); ++ } + vexpress_a9_legacy_register_mmc(&mmci_plat); + armlinux_set_architecture(MACH_TYPE_VEXPRESS); + } +@@ -107,8 +109,10 @@ static int vexpress_devices_init(void) + writel(1, v2m_sysreg_base + V2M_SYS_FLASH); + v2m_init->devices_init(); + +- devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); +- devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); ++ if (!IS_ENABLED(CONFIG_OFDEVICE)) { ++ devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); ++ devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); ++ } + + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_vexpress); +diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts +new file mode 100644 +index 000000000000..aadcb3a70377 +--- /dev/null ++++ b/arch/arm/dts/vexpress-v2p-ca9.dts +@@ -0,0 +1,27 @@ ++#include <arm/vexpress-v2p-ca9.dts> ++ ++/ { ++ barebox_environment { ++ compatible = "barebox,environment"; ++ device-path = &barebox_env; ++ }; ++ ++ smb@04000000 { ++ motherboard { ++ flash@0,00000000 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "barebox"; ++ reg = <0x0 0x80000>; ++ }; ++ ++ barebox_env: partition@80000 { ++ label = "barebox-environment"; ++ reg = <0x80000 0x80000>; ++ }; ++ }; ++ }; ++ }; ++}; diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0003-of-base-add-funtion-to-copy-a-device-tree-node.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0003-of-base-add-funtion-to-copy-a-device-tree-node.patch new file mode 100644 index 0000000..31b90c3 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0003-of-base-add-funtion-to-copy-a-device-tree-node.patch @@ -0,0 +1,50 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Tue, 13 Sep 2016 21:17:12 +0200 +Subject: [PATCH] of: base: add funtion to copy a device tree node + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + drivers/of/base.c | 16 ++++++++++++++++ + include/of.h | 2 ++ + 2 files changed, 18 insertions(+) + +diff --git a/drivers/of/base.c b/drivers/of/base.c +index c9bdd91810f2..e93ba687fafc 100644 +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -1963,6 +1963,22 @@ out: + return dn; + } + ++struct device_node *of_copy_node(struct device_node *parent, const struct device_node *other) ++{ ++ struct device_node *np, *child; ++ struct property *pp; ++ ++ np = of_new_node(parent, other->name); ++ ++ list_for_each_entry(pp, &other->properties, list) ++ of_new_property(np, pp->name, pp->value, pp->length); ++ ++ for_each_child_of_node(other, child) ++ of_copy_node(np, child); ++ ++ return np; ++} ++ + void of_delete_node(struct device_node *node) + { + struct device_node *n, *nt; +diff --git a/include/of.h b/include/of.h +index 0ba73f197f28..c1136708ce6c 100644 +--- a/include/of.h ++++ b/include/of.h +@@ -144,6 +144,8 @@ extern struct device_node *of_new_node(struct device_node *parent, + const char *name); + extern struct device_node *of_create_node(struct device_node *root, + const char *path); ++extern struct device_node *of_copy_node(struct device_node *parent, ++ const struct device_node *other); + extern void of_delete_node(struct device_node *node); + + extern int of_machine_is_compatible(const char *compat); diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0004-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0004-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch new file mode 100644 index 0000000..8dc2da3 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0004-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch @@ -0,0 +1,34 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Tue, 13 Sep 2016 21:18:15 +0200 +Subject: [PATCH] commands: of_dump: don't use flatten/unflatten to copy the + device tree + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + commands/of_dump.c | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/commands/of_dump.c b/commands/of_dump.c +index 7bec0b925eee..ac5014e1fff8 100644 +--- a/commands/of_dump.c ++++ b/commands/of_dump.c +@@ -97,18 +97,7 @@ static int do_of_dump(int argc, char *argv[]) + + if (fix) { + /* create a copy of internal devicetree */ +- void *fdt; +- fdt = of_flatten_dtb(root); +- root = of_unflatten_dtb(fdt); +- +- free(fdt); +- +- if (IS_ERR(root)) { +- ret = PTR_ERR(root); +- goto out; +- } +- +- of_free = root; ++ of_free = root = of_copy_node(NULL, root); + } + } + diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0005-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0005-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch new file mode 100644 index 0000000..8b64d2f --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0005-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch @@ -0,0 +1,62 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Tue, 13 Sep 2016 21:20:10 +0200 +Subject: [PATCH] common: oftree: add fixup handler for 'virtio,mmio' devices + +Qemu adds 'virtio,mmio' nodes to the device tree. Before passing it to the +bootloader or the Linux kernel. This fixup handler copies these nodes to +the new device tree. + +v2: +- move from general to platform specific init + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> +--- + arch/arm/boards/vexpress/init.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c +index 68ebbfab2633..8655b7e17c97 100644 +--- a/arch/arm/boards/vexpress/init.c ++++ b/arch/arm/boards/vexpress/init.c +@@ -18,6 +18,7 @@ + #include <globalvar.h> + #include <linux/amba/sp804.h> + #include <mci.h> ++#include <of.h> + + struct vexpress_init { + void (*core_init)(void); +@@ -156,3 +157,32 @@ static int vexpress_core_init(void) + return 0; + } + postcore_initcall(vexpress_core_init); ++ ++static int of_fixup_virtio_mmio(struct device_node *root, void *unused) ++{ ++ struct device_node *barebox_root, *np, *parent; ++ ++ barebox_root = of_get_root_node(); ++ if (root == barebox_root) ++ return 0; ++ ++ for_each_compatible_node_from(np, barebox_root, NULL, "virtio,mmio") { ++ if (of_get_parent(np) == barebox_root) ++ parent = root; ++ else ++ parent = of_find_node_by_path_from(root, ++ of_get_parent(np)->full_name); ++ if (!parent) ++ return -EINVAL; ++ ++ of_copy_node(parent, np); ++ } ++ ++ return 0; ++} ++ ++static int of_register_virtio_mmio_fixup(void) ++{ ++ return of_register_fixup(of_fixup_virtio_mmio, NULL); ++} ++late_initcall(of_register_virtio_mmio_fixup); diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch new file mode 100644 index 0000000..a26a282 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch @@ -0,0 +1,35 @@ +From: Michael Grzeschik <m.grzeschik@pengutronix.de> +Date: Fri, 10 Jun 2016 14:02:30 +0200 +Subject: [PATCH] beaglebone: add state entrie for mmc0 and mmc1 + +Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> +--- + arch/arm/dts/am335x-bone-common.dtsi | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi +index ef97d906616c..d14c6ded6a55 100644 +--- a/arch/arm/dts/am335x-bone-common.dtsi ++++ b/arch/arm/dts/am335x-bone-common.dtsi +@@ -11,6 +11,21 @@ + linux,stdout-path = &uart0; + }; + ++ bootstate: bootstate { ++ compatible = "barebox,bootstate"; ++ backend-type = "nv"; ++ ++ system0 { ++ default_attempts = <3>; ++ boot = "mmc0"; ++ }; ++ ++ system1 { ++ default_attempts = <3>; ++ boot = "mmc1"; ++ }; ++ }; ++ + cpus { + cpu@0 { + cpu0-supply = <&dcdc2_reg>; diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0201-of_device_is_stdout_path-simplify.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0201-of_device_is_stdout_path-simplify.patch new file mode 100644 index 0000000..47feb45 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0201-of_device_is_stdout_path-simplify.patch @@ -0,0 +1,45 @@ +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> +Date: Wed, 14 Jun 2017 13:26:30 +0200 +Subject: [PATCH] of_device_is_stdout_path: simplify +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Test for dev->device_node being NULL earlier which at the end of the +function allows to simplify the calculation of the return value + +Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> +Forwarded: id:20170614113110.21604-1-u.kleine-koenig@pengutronix.de +--- + drivers/of/base.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/drivers/of/base.c b/drivers/of/base.c +index e93ba687fafc..94e4c6b7b4f8 100644 +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -2016,6 +2016,9 @@ int of_device_is_stdout_path(struct device_d *dev) + struct device_node *dn; + const char *name; + ++ if (!dev->device_node) ++ return 0; ++ + name = of_get_property(of_chosen, "stdout-path", NULL); + if (!name) + name = of_get_property(of_chosen, "linux,stdout-path", NULL); +@@ -2024,13 +2027,8 @@ int of_device_is_stdout_path(struct device_d *dev) + return 0; + + dn = of_find_node_by_path(name); +- if (!dn) +- return 0; + +- if (dn == dev->device_node) +- return 1; +- +- return 0; ++ return dn == dev->device_node; + } + + /** diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch new file mode 100644 index 0000000..674294d --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0202-of_device_is_stdout_path-split-off-options-and-suppo.patch @@ -0,0 +1,53 @@ +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> +Date: Wed, 14 Jun 2017 13:30:54 +0200 +Subject: [PATCH] of_device_is_stdout_path: split off options and support + aliases +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Several device trees use something like: + + stdout-path = "serial0:115200n8"; + +Currently of_device_is_stdout_path fails to do the right thing here +because it expects an absolute node path and no options. So split off +options (everything after the colon) and resolve aliases. + +Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> +Forwarded: id:20170614180249.12644-1-u.kleine-koenig@pengutronix.de (v2) +--- + drivers/of/base.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/of/base.c b/drivers/of/base.c +index 94e4c6b7b4f8..a1ae8073931d 100644 +--- a/drivers/of/base.c ++++ b/drivers/of/base.c +@@ -2015,6 +2015,8 @@ int of_device_is_stdout_path(struct device_d *dev) + { + struct device_node *dn; + const char *name; ++ const char *p; ++ char *q; + + if (!dev->device_node) + return 0; +@@ -2026,7 +2028,16 @@ int of_device_is_stdout_path(struct device_d *dev) + if (!name) + return 0; + +- dn = of_find_node_by_path(name); ++ /* This could make use of strchrnul if it were available */ ++ p = strchr(name, ':'); ++ if (!p) ++ p = name + strlen(name); ++ ++ q = xstrndup(name, p - name); ++ ++ dn = of_find_node_by_path_or_alias(NULL, q); ++ ++ free(q); + + return dn == dev->device_node; + } diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch new file mode 100644 index 0000000..c9854a7 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0203-ARM-imx-add-support-for-Udoo-Neo-full.patch @@ -0,0 +1,320 @@ +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> +Date: Wed, 14 Jun 2017 18:32:15 +0200 +Subject: [PATCH] ARM: imx: add support for Udoo Neo full +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> +--- + arch/arm/boards/Makefile | 1 + + arch/arm/boards/udoo-neo/Makefile | 2 + + arch/arm/boards/udoo-neo/board.c | 27 +++++ + .../flash-header-mx6sx-udoo-neo_full.imxcfg | 125 +++++++++++++++++++++ + arch/arm/boards/udoo-neo/lowlevel.c | 39 +++++++ + arch/arm/dts/Makefile | 1 + + arch/arm/dts/imx6sx-udoo-neo-full.dts | 4 + + arch/arm/mach-imx/Kconfig | 4 + + arch/arm/mach-imx/include/mach/esdctl.h | 1 + + images/Makefile.imx | 5 + + 10 files changed, 209 insertions(+) + create mode 100644 arch/arm/boards/udoo-neo/Makefile + create mode 100644 arch/arm/boards/udoo-neo/board.c + create mode 100644 arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg + create mode 100644 arch/arm/boards/udoo-neo/lowlevel.c + create mode 100644 arch/arm/dts/imx6sx-udoo-neo-full.dts + +diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile +index 0ecfb3e4b398..98f923a134a0 100644 +--- a/arch/arm/boards/Makefile ++++ b/arch/arm/boards/Makefile +@@ -130,6 +130,7 @@ obj-$(CONFIG_MACH_TX51) += karo-tx51/ + obj-$(CONFIG_MACH_TX53) += karo-tx53/ + obj-$(CONFIG_MACH_TX6X) += karo-tx6x/ + obj-$(CONFIG_MACH_UDOO) += udoo/ ++obj-$(CONFIG_MACH_UDOO_NEO) += udoo-neo/ + obj-$(CONFIG_MACH_USB_A9260) += usb-a926x/ + obj-$(CONFIG_MACH_USB_A9263) += usb-a926x/ + obj-$(CONFIG_MACH_USB_A9G20) += usb-a926x/ +diff --git a/arch/arm/boards/udoo-neo/Makefile b/arch/arm/boards/udoo-neo/Makefile +new file mode 100644 +index 000000000000..01c7a259e9a5 +--- /dev/null ++++ b/arch/arm/boards/udoo-neo/Makefile +@@ -0,0 +1,2 @@ ++obj-y += board.o ++lwl-y += lowlevel.o +diff --git a/arch/arm/boards/udoo-neo/board.c b/arch/arm/boards/udoo-neo/board.c +new file mode 100644 +index 000000000000..9bf480305d70 +--- /dev/null ++++ b/arch/arm/boards/udoo-neo/board.c +@@ -0,0 +1,27 @@ ++/* ++ * Copyright (C) 2014 Pengutronix, Sascha Hauer ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2, as published by the Free Software Foundation. ++ * ++ * This program 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. ++ */ ++ ++#include <common.h> ++#include <init.h> ++#include <linux/clk.h> ++ ++static int imx6sx_udoneo_coredevices_init(void) ++{ ++ if (!of_machine_is_compatible("fsl,imx6sx-udoo-neo")) ++ return 0; ++ ++ barebox_set_hostname("mx6sx-udooneo"); ++ ++ return 0; ++} ++coredevice_initcall(imx6sx_udoneo_coredevices_init); +diff --git a/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg b/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg +new file mode 100644 +index 000000000000..d91de992fa6a +--- /dev/null ++++ b/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg +@@ -0,0 +1,125 @@ ++loadaddr 0x80000000 ++soc imx6 ++dcdofs 0x400 ++ ++/* Enable all clocks */ ++wm 32 0x020c4068 0xffffffff ++wm 32 0x020c406c 0xffffffff ++wm 32 0x020c4070 0xffffffff ++wm 32 0x020c4074 0xffffffff ++wm 32 0x020c4078 0xffffffff ++wm 32 0x020c407c 0xffffffff ++wm 32 0x020c4080 0xffffffff ++wm 32 0x020c4084 0xffffffff ++/********************************************/ ++ ++/* IOMUX */ ++/* DDR IO TYPE */ ++wm 32 0x020e0618 0x000c0000 ++wm 32 0x020e05fc 0x00000000 ++/********************************************/ ++ ++/* CLOCK */ ++wm 32 0x020e032c 0x00000030 ++/********************************************/ ++ ++/* ADDRESS */ ++wm 32 0x020e0300 0x00000020 ++wm 32 0x020e02fc 0x00000020 ++wm 32 0x020e05f4 0x00000020 ++/********************************************/ ++ ++/* CONTROL */ ++wm 32 0x020e0340 0x00000020 ++ ++wm 32 0x020e0320 0x00000000 ++wm 32 0x020e0310 0x00000020 ++wm 32 0x020e0314 0x00000020 ++wm 32 0x020e0614 0x00000020 ++/********************************************/ ++ ++/* DATA STROBE */ ++wm 32 0x020e05f8 0x00020000 ++wm 32 0x020e0330 0x00000028 ++wm 32 0x020e0334 0x00000028 ++wm 32 0x020e0338 0x00000028 ++wm 32 0x020e033c 0x00000028 ++/********************************************/ ++ ++/* DATA */ ++wm 32 0x020e0608 0x00020000 ++wm 32 0x020e060c 0x00000028 ++wm 32 0x020e0610 0x00000028 ++wm 32 0x020e061c 0x00000028 ++wm 32 0x020e0620 0x00000028 ++wm 32 0x020e02ec 0x00000028 ++wm 32 0x020e02f0 0x00000028 ++wm 32 0x020e02f4 0x00000028 ++wm 32 0x020e02f8 0x00000028 ++/********************************************/ ++ ++/* Calibrations */ ++/* ZQ */ ++wm 32 0x021b0800 0xa1390003 ++/********************************************/ ++ ++/* write leveling */ ++wm 32 0x021b080c 0x001E0022 ++wm 32 0x021b0810 0x001C0019 ++/********************************************/ ++ ++/* DQS Read Gate */ ++wm 32 0x021b083c 0x41540150 ++wm 32 0x021b0840 0x01440138 ++/********************************************/ ++ ++/* Read/Write Delay */ ++wm 32 0x021b0848 0x403E4644 ++wm 32 0x021b0850 0x3C3A4038 ++/********************************************/ ++ ++/* read data bit delay */ ++wm 32 0x021b081c 0x33333333 ++wm 32 0x021b0820 0x33333333 ++wm 32 0x021b0824 0x33333333 ++wm 32 0x021b0828 0x33333333 ++/********************************************/ ++ ++/* Complete calibration by forced measurment */ ++wm 32 0x021b08b8 0x00000800 ++/********************************************/ ++ ++/* MMDC init */ ++/* in DDR3, 64-bit mode, only MMDC0 is initiated */ ++wm 32 0x021b0004 0x0002002d ++wm 32 0x021b0008 0x00333030 ++wm 32 0x021b000c 0x676b52f3 ++wm 32 0x021b0010 0xb66d8b63 ++wm 32 0x021b0014 0x01ff00db ++wm 32 0x021b0018 0x00011740 ++wm 32 0x021b001c 0x00008000 ++wm 32 0x021b002c 0x000026d2 ++wm 32 0x021b0030 0x006b1023 ++wm 32 0x021b0040 0x0000005f ++wm 32 0x021b0000 0x83190000 ++/********************************************/ ++ ++/* Initialize MT41K256M16HA-125 */ ++/* MR2 */ ++wm 32 0x021b001c 0x04008032 ++/* MR3 */ ++wm 32 0x021b001c 0x00008033 ++/* MR1 */ ++wm 32 0x021b001c 0x00048031 ++/* MR0 */ ++wm 32 0x021b001c 0x05208030 ++/* DDR device ZQ calibration */ ++wm 32 0x021b001c 0x04008040 ++/********************************************/ ++ ++/* final DDR setup, before operation start */ ++wm 32 0x021b0020 0x00000800 ++wm 32 0x021b0818 0x00011117 ++wm 32 0x021b001c 0x00000000 ++/********************************************/ ++ +diff --git a/arch/arm/boards/udoo-neo/lowlevel.c b/arch/arm/boards/udoo-neo/lowlevel.c +new file mode 100644 +index 000000000000..e78c2685fd78 +--- /dev/null ++++ b/arch/arm/boards/udoo-neo/lowlevel.c +@@ -0,0 +1,39 @@ ++#include <debug_ll.h> ++#include <common.h> ++#include <linux/sizes.h> ++#include <mach/generic.h> ++#include <asm/barebox-arm-head.h> ++#include <asm/barebox-arm.h> ++#include <mach/esdctl.h> ++ ++static inline void setup_uart(void) ++{ ++ void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR; ++ ++ imx6_ungate_all_peripherals(); ++ ++ writel(0x0, iomuxbase + 0x24); ++ writel(0x1b0b1, iomuxbase + 0x036C); ++ writel(0x0, iomuxbase + 0x28); ++ writel(0x1b0b1, iomuxbase + 0x0370); ++ ++ imx6_uart_setup_ll(); ++ ++ putc_ll('>'); ++} ++ ++extern char __dtb_imx6sx_udoo_neo_full_start[]; ++ ++ENTRY_FUNCTION(start_imx6sx_udoo_neo, r0, r1, r2) ++{ ++ void *fdt; ++ ++ imx6_cpu_lowlevel_init(); ++ ++ if (IS_ENABLED(CONFIG_DEBUG_LL)) ++ setup_uart(); ++ ++ fdt = __dtb_imx6sx_udoo_neo_full_start - get_runtime_offset(); ++ ++ imx6sx_barebox_entry(fdt); ++} +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 2342d35a4bd1..3129a7dfbce1 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -82,6 +82,7 @@ pbl-dtb-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o + pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o + pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o + pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o ++pbl-dtb-$(CONFIG_MACH_UDOO_NEO) += imx6sx-udoo-neo-full.dtb.o + pbl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o + pbl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o + pbl-dtb-$(CONFIG_MACH_VSCOM_BALTOS) += am335x-baltos-minimal.dtb.o +diff --git a/arch/arm/dts/imx6sx-udoo-neo-full.dts b/arch/arm/dts/imx6sx-udoo-neo-full.dts +new file mode 100644 +index 000000000000..9203d40207c5 +--- /dev/null ++++ b/arch/arm/dts/imx6sx-udoo-neo-full.dts +@@ -0,0 +1,4 @@ ++#include <arm/imx6sx-udoo-neo-full.dts> ++ ++/{ ++}; +diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig +index 80f53ce124c1..a682030faf2e 100644 +--- a/arch/arm/mach-imx/Kconfig ++++ b/arch/arm/mach-imx/Kconfig +@@ -356,6 +356,10 @@ config MACH_UDOO + bool "Freescale i.MX6 UDOO Board" + select ARCH_IMX6 + ++config MACH_UDOO_NEO ++ bool "Freescale i.MX6 UDOO Board" ++ select ARCH_IMX6SX ++ + config MACH_VARISCITE_MX6 + bool "Variscite i.MX6 Quad SOM" + select ARCH_IMX6 +diff --git a/arch/arm/mach-imx/include/mach/esdctl.h b/arch/arm/mach-imx/include/mach/esdctl.h +index 66dcc8974cfb..bd6092febca4 100644 +--- a/arch/arm/mach-imx/include/mach/esdctl.h ++++ b/arch/arm/mach-imx/include/mach/esdctl.h +@@ -137,6 +137,7 @@ void __noreturn imx51_barebox_entry(void *boarddata); + void __noreturn imx53_barebox_entry(void *boarddata); + void __noreturn imx6q_barebox_entry(void *boarddata); + void __noreturn imx6ul_barebox_entry(void *boarddata); ++#define imx6sx_barebox_entry(boarddata) imx6ul_barebox_entry(boarddata) + void imx_esdctl_disable(void); + #endif + +diff --git a/images/Makefile.imx b/images/Makefile.imx +index cdad2e0b8826..867ff5f6a564 100644 +--- a/images/Makefile.imx ++++ b/images/Makefile.imx +@@ -260,6 +260,11 @@ CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-heade + FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg + image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img + ++pblx-$(CONFIG_MACH_UDOO_NEO) += start_imx6sx_udoo_neo ++CFG_start_imx6sx_udoo_neo.pblx.imximg = $(board)/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg ++FILE_barebox-udoo-neo.img = start_imx6sx_udoo_neo.pblx.imximg ++image-$(CONFIG_MACH_UDOO_NEO) += barebox-udoo-neo.img ++ + pblx-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += start_imx6sx_sabresdb + CFG_start_imx6sx_sabresdb.pblx.imximg = $(board)/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg + FILE_barebox-freescale-imx6sx-sabresdb.img = start_imx6sx_sabresdb.pblx.imximg diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/0301-Release-2017.06.0-pengutronix-multi_v7-20170614-1.patch b/configs/platform-v7a/patches/barebox-2017.06.0/0301-Release-2017.06.0-pengutronix-multi_v7-20170614-1.patch new file mode 100644 index 0000000..e6f74d5 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/0301-Release-2017.06.0-pengutronix-multi_v7-20170614-1.patch @@ -0,0 +1,25 @@ +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> +Date: Wed, 14 Jun 2017 22:22:27 +0200 +Subject: [PATCH] Release 2017.06.0/pengutronix/multi_v7/20170614-1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 42948fafa33f..284a039e61db 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + VERSION = 2017 + PATCHLEVEL = 06 + SUBLEVEL = 0 +-EXTRAVERSION = ++EXTRAVERSION =-20170614-1 + NAME = None + + # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2017.06.0/series b/configs/platform-v7a/patches/barebox-2017.06.0/series new file mode 100644 index 0000000..9843d20 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2017.06.0/series @@ -0,0 +1,25 @@ +# umpf-base: v2017.06.0 +# umpf-name: 2017.06.0/pengutronix/multi_v7 +# umpf-version: 2017.06.0/pengutronix/multi_v7/20170614-1 +# umpf-topic: v2017.06.0/topic/vexpress +# umpf-hashinfo: abc9e46ec6ffeae46efe678469a086dc89c83e1f +# umpf-topic-range: 2974d53a3b3a2f56d96c56acf26501735a4e41cd..abc9e46ec6ffeae46efe678469a086dc89c83e1f +0001-vexpress-use-device-tree-provided-by-QEMU-if-availab.patch +0002-vexpress-device-tree-support.patch +0003-of-base-add-funtion-to-copy-a-device-tree-node.patch +0004-commands-of_dump-don-t-use-flatten-unflatten-to-copy.patch +0005-common-oftree-add-fixup-handler-for-virtio-mmio-devi.patch +# umpf-topic: v2016.05.0/customers/pengutronix/beaglebone +# umpf-hashinfo: 9cbaeb8cfaa8b5e7837725df242aacccbbc5fa53 +# umpf-topic-range: abc9e46ec6ffeae46efe678469a086dc89c83e1f..4cb671a6a6dacc8f15dc4ecd830dddca7d20bc27 +0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch +# umpf-topic: v2017.06.0/customers/pengutronix/udoo-neo +# umpf-hashinfo: 1f1ee410d983400c88b875f234709d9b280e2278 +# umpf-topic-range: 4cb671a6a6dacc8f15dc4ecd830dddca7d20bc27..d2e52d64a4ec16ce261bcebbf10503aa37fbf856 +0201-of_device_is_stdout_path-simplify.patch +0202-of_device_is_stdout_path-split-off-options-and-suppo.patch +0203-ARM-imx-add-support-for-Udoo-Neo-full.patch +# umpf-release: 2017.06.0/pengutronix/multi_v7/20170614-1 +# umpf-topic-range: d2e52d64a4ec16ce261bcebbf10503aa37fbf856..715b60b1436d4e880847311415c9a31a7ba7f5b8 +0301-Release-2017.06.0-pengutronix-multi_v7-20170614-1.patch +# umpf-end |