From 55a9334b0e98bc7434ba11785a359c1e90d9ce58 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Fri, 18 Jan 2019 12:12:16 +0100 Subject: platform-v7a: barebox 2018.12.0 → 2019.01.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rouven Czerwinski --- configs/platform-v7a/barebox-am335x-mlo.config | 7 +- configs/platform-v7a/barebox-am335x.config | 7 +- configs/platform-v7a/barebox-mx6.config | 7 +- configs/platform-v7a/barebox-rpi2.config | 7 +- configs/platform-v7a/barebox-vexpress.config | 7 +- ...001-ARM-imx-add-support-for-Udoo-Neo-full.patch | 320 -------------------- .../0101-ARM-rpi-fix-typo-in-rpi-common.c.patch | 31 -- ...-move-clks-into-board-specific-rpi-common.patch | 77 ----- ...rpi-retrieve-miniuart-clock-from-firmware.patch | 34 --- ...erial_ns16550-handle-default-reg-io-width.patch | 78 ----- ...6550-add-raspberry-pi-compatible-and-init.patch | 62 ---- .../0106-ARM-rpi-add-NS16550-support.patch | 24 -- .../0107-ARM-rpi-choose-miniuart-as-stdout.patch | 34 --- ...m283x-remove-miniuart-overlay-instruction.patch | 24 -- ...8.12.0-customers-pengutronix-multiv7-2018.patch | 21 -- .../platform-v7a/patches/barebox-2018.12.0/series | 22 -- .../0001-ARM-rpi-fix-typo-in-rpi-common.c.patch | 31 ++ ...-move-clks-into-board-specific-rpi-common.patch | 77 +++++ ...rpi-retrieve-miniuart-clock-from-firmware.patch | 34 +++ ...erial_ns16550-handle-default-reg-io-width.patch | 78 +++++ ...6550-add-raspberry-pi-compatible-and-init.patch | 65 ++++ .../0006-ARM-rpi-add-NS16550-support.patch | 24 ++ .../0007-ARM-rpi-choose-miniuart-as-stdout.patch | 34 +++ ...m283x-remove-miniuart-overlay-instruction.patch | 24 ++ .../0009-ARM-rpi-use-defines-for-uart-bases.patch | 46 +++ ...101-ARM-imx-add-support-for-Udoo-Neo-full.patch | 332 +++++++++++++++++++++ ...9.01.0-customers-pengutronix-multi_v7-201.patch | 21 ++ .../platform-v7a/patches/barebox-2019.01.0/series | 23 ++ configs/platform-v7a/rules/barebox-am335x-mlo.make | 4 +- configs/platform-v7a/rules/barebox-am335x.make | 4 +- configs/platform-v7a/rules/barebox-mx6.make | 4 +- configs/platform-v7a/rules/barebox-rpi2.make | 4 +- configs/platform-v7a/rules/barebox-vexpress.make | 4 +- 33 files changed, 829 insertions(+), 742 deletions(-) delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0001-ARM-imx-add-support-for-Udoo-Neo-full.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0101-ARM-rpi-fix-typo-in-rpi-common.c.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0102-ARM-rpi-move-clks-into-board-specific-rpi-common.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0103-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0104-serial_ns16550-handle-default-reg-io-width.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0105-serial_ns16550-add-raspberry-pi-compatible-and-init.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0106-ARM-rpi-add-NS16550-support.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0107-ARM-rpi-choose-miniuart-as-stdout.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0108-doc-bcm283x-remove-miniuart-overlay-instruction.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/0201-Release-2018.12.0-customers-pengutronix-multiv7-2018.patch delete mode 100644 configs/platform-v7a/patches/barebox-2018.12.0/series create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0001-ARM-rpi-fix-typo-in-rpi-common.c.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0002-ARM-rpi-move-clks-into-board-specific-rpi-common.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0003-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0004-serial_ns16550-handle-default-reg-io-width.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0005-serial_ns16550-add-raspberry-pi-compatible-and-init.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0006-ARM-rpi-add-NS16550-support.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0007-ARM-rpi-choose-miniuart-as-stdout.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0008-doc-bcm283x-remove-miniuart-overlay-instruction.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0009-ARM-rpi-use-defines-for-uart-bases.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/0201-Release-2019.01.0-customers-pengutronix-multi_v7-201.patch create mode 100644 configs/platform-v7a/patches/barebox-2019.01.0/series diff --git a/configs/platform-v7a/barebox-am335x-mlo.config b/configs/platform-v7a/barebox-am335x-mlo.config index cf62675..e333059 100644 --- a/configs/platform-v7a/barebox-am335x-mlo.config +++ b/configs/platform-v7a/barebox-am335x-mlo.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.12.0-20181213-1 Configuration +# Barebox/arm 2019.01.0-20190118-1 Configuration # CONFIG_ARM=y CONFIG_ARM_USE_COMPRESSED_DTB=y @@ -267,7 +267,12 @@ CONFIG_MCI=y # CONFIG_MCI_DW is not set CONFIG_MCI_OMAP_HSMMC=y # CONFIG_MCI_SPI is not set + +# +# Clocksource +# CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set # # MFD diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config index 8b34f06..21902fd 100644 --- a/configs/platform-v7a/barebox-am335x.config +++ b/configs/platform-v7a/barebox-am335x.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.12.0-20181213-1 Configuration +# Barebox/arm 2019.01.0-20190118-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -548,7 +548,12 @@ CONFIG_MCI_WRITE=y # CONFIG_MCI_DW is not set CONFIG_MCI_OMAP_HSMMC=y # CONFIG_MCI_SPI is not set + +# +# Clocksource +# CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set # # MFD diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config index 50f8402..e40e335 100644 --- a/configs/platform-v7a/barebox-mx6.config +++ b/configs/platform-v7a/barebox-mx6.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.12.0-20181213-1 Configuration +# Barebox/arm 2019.01.0-20190118-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -653,9 +653,14 @@ CONFIG_HAVE_CLK=y CONFIG_CLKDEV_LOOKUP=y CONFIG_COMMON_CLK=y CONFIG_COMMON_CLK_OF_PROVIDER=y + +# +# Clocksource +# CONFIG_ARCH_HAS_IMX_GPT=y CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 CONFIG_CLOCKSOURCE_IMX_GPT=y +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set # # MFD diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config index eee6ed4..13bf488 100644 --- a/configs/platform-v7a/barebox-rpi2.config +++ b/configs/platform-v7a/barebox-rpi2.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.12.0-20181213-1 Configuration +# Barebox/arm 2019.01.0-20190118-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -431,8 +431,13 @@ CONFIG_MCI_BCM283X=y CONFIG_HAVE_CLK=y CONFIG_CLKDEV_LOOKUP=y CONFIG_COMMON_CLK=y + +# +# Clocksource +# CONFIG_CLOCKSOURCE_BCM283X=y CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set # # MFD diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config index b8e02ff..71a9052 100644 --- a/configs/platform-v7a/barebox-vexpress.config +++ b/configs/platform-v7a/barebox-vexpress.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Barebox/arm 2018.12.0-20181213-1 Configuration +# Barebox/arm 2019.01.0-20190118-1 Configuration # CONFIG_ARM=y CONFIG_ARM_LINUX=y @@ -467,8 +467,13 @@ CONFIG_HAVE_CLK=y CONFIG_CLKDEV_LOOKUP=y CONFIG_COMMON_CLK=y CONFIG_COMMON_CLK_OF_PROVIDER=y + +# +# Clocksource +# CONFIG_AMBA_SP804=y CONFIG_CLOCKSOURCE_DUMMY_RATE=1000 +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set # # MFD diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0001-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0001-ARM-imx-add-support-for-Udoo-Neo-full.patch deleted file mode 100644 index b5b5f6f..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0001-ARM-imx-add-support-for-Udoo-Neo-full.patch +++ /dev/null @@ -1,320 +0,0 @@ -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -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 -Forwarded: id:20170627190317.19253-1-uwe@kleine-koenig.org ---- - 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 | 124 +++++++++++++++++++++ - 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, 208 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 3bf176b14dc2..953a6eec12e4 100644 ---- a/arch/arm/boards/Makefile -+++ b/arch/arm/boards/Makefile -@@ -139,6 +139,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 -+#include -+#include -+ -+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..176aff49b3ec ---- /dev/null -+++ b/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg -@@ -0,0 +1,124 @@ -+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 -+#include -+#include -+#include -+#include -+#include -+#include -+ -+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 503d9b18f9c1..eadffc7b7c44 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -98,6 +98,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o - pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o - pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.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_VEXPRESS) += vexpress-v2p-ca9.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 -+ -+/{ -+}; -diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig -index edfc85113880..6f86175b24e9 100644 ---- a/arch/arm/mach-imx/Kconfig -+++ b/arch/arm/mach-imx/Kconfig -@@ -392,6 +392,10 @@ config MACH_UDOO - bool "Freescale i.MX6 UDOO Board" - select ARCH_IMX6 - -+config MACH_UDOO_NEO -+ bool "i.MX6 UDOO Neo Board (full variant)" -+ 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 bc6c7339535e..18c4a2836007 100644 ---- a/arch/arm/mach-imx/include/mach/esdctl.h -+++ b/arch/arm/mach-imx/include/mach/esdctl.h -@@ -141,6 +141,7 @@ void __noreturn imx6ul_barebox_entry(void *boarddata); - void __noreturn vf610_barebox_entry(void *boarddata); - void __noreturn imx8mq_barebox_entry(void *boarddata); - void __noreturn imx7d_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 9b5cd577d285..257561464504 100644 ---- a/images/Makefile.imx -+++ b/images/Makefile.imx -@@ -271,6 +271,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-2018.12.0/0101-ARM-rpi-fix-typo-in-rpi-common.c.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0101-ARM-rpi-fix-typo-in-rpi-common.c.patch deleted file mode 100644 index 9473e9b..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0101-ARM-rpi-fix-typo-in-rpi-common.c.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Rouven Czerwinski -Date: Wed, 12 Dec 2018 16:43:06 +0100 -Subject: [PATCH] ARM: rpi: fix typo in rpi-common.c - -Signed-off-by: Rouven Czerwinski ---- - arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c -index b7ce0ad425e8..9f0531fd05d9 100644 ---- a/arch/arm/boards/raspberry-pi/rpi-common.c -+++ b/arch/arm/boards/raspberry-pi/rpi-common.c -@@ -73,7 +73,7 @@ static int rpi_get_arm_mem(u32 *size) - return 0; - } - --static struct clk *rpi_register_firmare_clock(u32 clock_id, const char *name) -+static struct clk *rpi_register_firmware_clock(u32 clock_id, const char *name) - { - BCM2835_MBOX_STACK_ALIGN(struct msg_get_clock_rate, msg); - int ret; -@@ -285,7 +285,7 @@ static int rpi_clock_init(void) - { - struct clk *clk; - -- clk = rpi_register_firmare_clock(BCM2835_MBOX_CLOCK_ID_EMMC, -+ clk = rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_EMMC, - "bcm2835_mci0"); - if (IS_ERR(clk)) - return PTR_ERR(clk); diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0102-ARM-rpi-move-clks-into-board-specific-rpi-common.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0102-ARM-rpi-move-clks-into-board-specific-rpi-common.patch deleted file mode 100644 index 38aa78e..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0102-ARM-rpi-move-clks-into-board-specific-rpi-common.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Rouven Czerwinski -Date: Wed, 12 Dec 2018 16:43:45 +0100 -Subject: [PATCH] ARM: rpi: move clks into board specific rpi-common - -We don't know if the firmware running on the raspberry pi is the same firmware -which is running on all bcm283x devices. -Therefore move the console clock initialization into the rpi-common.c board file. -A future commit will use this function to retrieve the miniuart clock from the -raspberry pi firmware. -No functional changes. - -Signed-off-by: Rouven Czerwinski ---- - arch/arm/boards/raspberry-pi/rpi-common.c | 19 +++++++++++++++++++ - arch/arm/mach-bcm283x/core.c | 19 ------------------- - 2 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c -index 9f0531fd05d9..490aeef12306 100644 ---- a/arch/arm/boards/raspberry-pi/rpi-common.c -+++ b/arch/arm/boards/raspberry-pi/rpi-common.c -@@ -297,6 +297,25 @@ static int rpi_clock_init(void) - } - postconsole_initcall(rpi_clock_init); - -+static int rpi_console_clock_init(void) -+{ -+ struct clk *clk; -+ -+ clk = clk_fixed("apb_pclk", 0); -+ clk_register_clkdev(clk, "apb_pclk", NULL); -+ -+ clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); -+ clk_register_clkdev(clk, NULL, "uart0-pl0110"); -+ clkdev_add_physbase(clk, 0x20201000, NULL); -+ clkdev_add_physbase(clk, 0x3f201000, NULL); -+ -+ clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); -+ clk_register_clkdev(clk, NULL, "bcm2835-cs"); -+ -+ return 0; -+} -+postcore_initcall(rpi_console_clock_init); -+ - static int rpi_env_init(void) - { - struct stat s; -diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c -index f1dcda86f7f0..f2528cf1f150 100644 ---- a/arch/arm/mach-bcm283x/core.c -+++ b/arch/arm/mach-bcm283x/core.c -@@ -31,25 +31,6 @@ - #include - #include - --static int bcm2835_clk_init(void) --{ -- struct clk *clk; -- -- clk = clk_fixed("apb_pclk", 0); -- clk_register_clkdev(clk, "apb_pclk", NULL); -- -- clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); -- clk_register_clkdev(clk, NULL, "uart0-pl0110"); -- clkdev_add_physbase(clk, 0x20201000, NULL); -- clkdev_add_physbase(clk, 0x3f201000, NULL); -- -- clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); -- clk_register_clkdev(clk, NULL, "bcm2835-cs"); -- -- return 0; --} --postcore_initcall(bcm2835_clk_init); -- - void bcm2835_add_device_sdram(u32 size) - { - if (!size) diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0103-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0103-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch deleted file mode 100644 index 95daa60..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0103-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Rouven Czerwinski -Date: Thu, 13 Dec 2018 07:23:37 +0100 -Subject: [PATCH] ARM: rpi: retrieve miniuart clock from firmware - -The miniuart uses the core clock as the clock source. This clock is fixed by the -firmware to 250Mhz if enable_uart=1 is set in the config.txt file. -However a user could still choose to overclock the core frequency, -which would result in wrong baudrates computed by barebox. -Retrieve the core clock frequency from the firmware to allow all potential -firmware configurations to work with barebox. - -Signed-off-by: Rouven Czerwinski ---- - arch/arm/boards/raspberry-pi/rpi-common.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c -index 490aeef12306..e29177d08e20 100644 ---- a/arch/arm/boards/raspberry-pi/rpi-common.c -+++ b/arch/arm/boards/raspberry-pi/rpi-common.c -@@ -309,6 +309,13 @@ static int rpi_console_clock_init(void) - clkdev_add_physbase(clk, 0x20201000, NULL); - clkdev_add_physbase(clk, 0x3f201000, NULL); - -+ clk = rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_CORE, -+ "uart1-8250"); -+ if (IS_ERR(clk)) -+ return PTR_ERR(clk); -+ -+ clkdev_add_physbase(clk, 0x3f215040, NULL); -+ - clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); - clk_register_clkdev(clk, NULL, "bcm2835-cs"); - diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0104-serial_ns16550-handle-default-reg-io-width.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0104-serial_ns16550-handle-default-reg-io-width.patch deleted file mode 100644 index 568d74d..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0104-serial_ns16550-handle-default-reg-io-width.patch +++ /dev/null @@ -1,78 +0,0 @@ -From: Rouven Czerwinski -Date: Tue, 11 Dec 2018 11:28:33 +0100 -Subject: [PATCH] serial_ns16550: handle default reg-io-width - -According to the device tree bindings for 8250, width is an optional property. -Default to 1 which is the same default value as used by the kernel. -Before this change the driver would not work for device trees which do not -include the optional binding. - -Signed-off-by: Rouven Czerwinski ---- - drivers/serial/serial_ns16550.c | 46 ++++++++++++++++++++--------------------- - 1 file changed, 23 insertions(+), 23 deletions(-) - -diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c -index 4d73ea8b8740..8ddcfdbefc1d 100644 ---- a/drivers/serial/serial_ns16550.c -+++ b/drivers/serial/serial_ns16550.c -@@ -297,36 +297,36 @@ static int ns16550_tstc(struct console_device *cdev) - static void ns16550_probe_dt(struct device_d *dev, struct ns16550_priv *priv) - { - struct device_node *np = dev->device_node; -- u32 width; -+ u32 width = 1; - - if (!IS_ENABLED(CONFIG_OFDEVICE)) - return; - - of_property_read_u32(np, "clock-frequency", &priv->plat.clock); - of_property_read_u32(np, "reg-shift", &priv->plat.shift); -- if (!of_property_read_u32(np, "reg-io-width", &width)) -- switch (width) { -- case 1: -- priv->read_reg = ns16550_read_reg_mmio_8; -- priv->write_reg = ns16550_write_reg_mmio_8; -- break; -- case 2: -- priv->read_reg = ns16550_read_reg_mmio_16; -- priv->write_reg = ns16550_write_reg_mmio_16; -- break; -- case 4: -- if (of_device_is_big_endian(np)) { -- priv->read_reg = ns16550_read_reg_mmio_32be; -- priv->write_reg = ns16550_write_reg_mmio_32be; -- } else { -- priv->read_reg = ns16550_read_reg_mmio_32; -- priv->write_reg = ns16550_write_reg_mmio_32; -- } -- break; -- default: -- dev_err(dev, "unsupported reg-io-width (%d)\n", -- width); -+ of_property_read_u32(np, "reg-io-width", &width); -+ switch (width) { -+ case 1: -+ priv->read_reg = ns16550_read_reg_mmio_8; -+ priv->write_reg = ns16550_write_reg_mmio_8; -+ break; -+ case 2: -+ priv->read_reg = ns16550_read_reg_mmio_16; -+ priv->write_reg = ns16550_write_reg_mmio_16; -+ break; -+ case 4: -+ if (of_device_is_big_endian(np)) { -+ priv->read_reg = ns16550_read_reg_mmio_32be; -+ priv->write_reg = ns16550_write_reg_mmio_32be; -+ } else { -+ priv->read_reg = ns16550_read_reg_mmio_32; -+ priv->write_reg = ns16550_write_reg_mmio_32; - } -+ break; -+ default: -+ dev_err(dev, "unsupported reg-io-width (%d)\n", -+ width); -+ } - } - - static struct ns16550_drvdata ns16450_drvdata = { diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0105-serial_ns16550-add-raspberry-pi-compatible-and-init.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0105-serial_ns16550-add-raspberry-pi-compatible-and-init.patch deleted file mode 100644 index 911a0e2..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0105-serial_ns16550-add-raspberry-pi-compatible-and-init.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Rouven Czerwinski -Date: Tue, 11 Dec 2018 10:50:44 +0100 -Subject: [PATCH] serial_ns16550: add raspberry pi compatible and init - -Add the compatible for the Raspberry Pi AUX UART and an init function which -enables it via the aux register and configures the correct shift value. - -Signed-off-by: Rouven Czerwinski ---- - drivers/serial/serial_ns16550.c | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c -index 8ddcfdbefc1d..7a4054a67e41 100644 ---- a/drivers/serial/serial_ns16550.c -+++ b/drivers/serial/serial_ns16550.c -@@ -253,6 +253,20 @@ static void ns16550_jz_init_port(struct console_device *cdev) - ns16550_serial_init_port(cdev); - } - -+static void rpi_init_port(struct console_device *cdev) -+{ -+ struct ns16550_priv *priv = to_ns16550_priv(cdev); -+ -+ writeb(0x01, 0x3f215004); -+ priv->plat.shift = 2; -+ /* -+ * We double the clock rate since the 16550 will divide by 16 -+ * (instead of 8 required by the BCM2835 peripheral manual) -+ */ -+ priv->plat.clock = priv->plat.clock*2; -+ ns16550_serial_init_port(cdev); -+} -+ - /*********** Exposed Functions **********************************/ - - /** -@@ -353,6 +367,11 @@ static __maybe_unused struct ns16550_drvdata tegra_drvdata = { - .linux_console_name = "ttyS", - }; - -+static struct ns16550_drvdata rpi_drvdata = { -+ .init_port = rpi_init_port, -+ .linux_console_name = "ttyS", -+}; -+ - static int ns16550_init_iomem(struct device_d *dev, struct ns16550_priv *priv) - { - struct resource *iores; -@@ -527,6 +546,12 @@ static struct of_device_id ns16550_serial_dt_ids[] = { - .compatible = "ingenic,jz4740-uart", - .data = &jz_drvdata, - }, -+#endif -+#if IS_ENABLED(CONFIG_MACH_RPI_COMMON) -+ { -+ .compatible = "brcm,bcm2835-aux-uart", -+ .data = &rpi_drvdata, -+ }, - #endif - { - /* sentinel */ diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0106-ARM-rpi-add-NS16550-support.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0106-ARM-rpi-add-NS16550-support.patch deleted file mode 100644 index 2e368cf..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0106-ARM-rpi-add-NS16550-support.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Rouven Czerwinski -Date: Wed, 12 Dec 2018 14:33:43 +0100 -Subject: [PATCH] ARM: rpi: add NS16550 support - -Since the 16550 driver now supports the RPI3 miniuart, enable it in the default -config. - -Signed-off-by: Rouven Czerwinski ---- - arch/arm/configs/rpi_defconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig -index 2bb615849324..dc5ab1fe17f6 100644 ---- a/arch/arm/configs/rpi_defconfig -+++ b/arch/arm/configs/rpi_defconfig -@@ -63,6 +63,7 @@ CONFIG_CMD_OF_PROPERTY=y - CONFIG_CMD_OFTREE=y - CONFIG_CMD_TIME=y - CONFIG_SERIAL_AMBA_PL011=y -+CONFIG_DRIVER_SERIAL_NS16550=y - CONFIG_MCI=y - CONFIG_MCI_BCM283X=y - CONFIG_LED=y diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0107-ARM-rpi-choose-miniuart-as-stdout.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0107-ARM-rpi-choose-miniuart-as-stdout.patch deleted file mode 100644 index 126fe01..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0107-ARM-rpi-choose-miniuart-as-stdout.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Rouven Czerwinski -Date: Tue, 11 Dec 2018 10:48:02 +0100 -Subject: [PATCH] ARM: rpi: choose miniuart as stdout - -Since we now support the miniuart, enable it as the default stdout port. -With this change the device tree overlay to switch the miniuart to bluetooth is -no longer necessary. - -Signed-off-by: Rouven Czerwinski ---- - arch/arm/dts/bcm2837-rpi-3.dts | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts -index d6ffc369122c..194b41c23b77 100644 ---- a/arch/arm/dts/bcm2837-rpi-3.dts -+++ b/arch/arm/dts/bcm2837-rpi-3.dts -@@ -2,15 +2,10 @@ - - / { - chosen { -- stdout-path = &uart0; -+ stdout-path = &uart1; - }; - - memory { - reg = <0x0 0x0>; - }; - }; -- --&uart0 { -- status = "okay"; -- /delete-node/ bluetooth; --}; diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0108-doc-bcm283x-remove-miniuart-overlay-instruction.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0108-doc-bcm283x-remove-miniuart-overlay-instruction.patch deleted file mode 100644 index 9d43761..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0108-doc-bcm283x-remove-miniuart-overlay-instruction.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Rouven Czerwinski -Date: Wed, 12 Dec 2018 15:06:49 +0100 -Subject: [PATCH] doc: bcm283x: remove miniuart overlay instruction - -Since we now use the miniuart on the raspberry pi 3, the miniuart overlay is no -longer needed. - -Signed-off-by: Rouven Czerwinski ---- - Documentation/boards/bcm2835.rst | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Documentation/boards/bcm2835.rst b/Documentation/boards/bcm2835.rst -index 79ea0ff7a78b..ea80d5834861 100644 ---- a/Documentation/boards/bcm2835.rst -+++ b/Documentation/boards/bcm2835.rst -@@ -22,7 +22,6 @@ Raspberry Pi - - kernel=barebox.img - enable_uart=1 -- dtoverlay=pi3-miniuart-bt - - (For more information, refer to the `documentation for config.txt`_.) - diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/0201-Release-2018.12.0-customers-pengutronix-multiv7-2018.patch b/configs/platform-v7a/patches/barebox-2018.12.0/0201-Release-2018.12.0-customers-pengutronix-multiv7-2018.patch deleted file mode 100644 index 38f2a36..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/0201-Release-2018.12.0-customers-pengutronix-multiv7-2018.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Rouven Czerwinski -Date: Thu, 13 Dec 2018 11:14:57 +0100 -Subject: [PATCH] Release 2018.12.0/customers/pengutronix/multiv7/20181213-1 - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 1ce50d025e47..f378f3dc7adf 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,7 +1,7 @@ - VERSION = 2018 - PATCHLEVEL = 12 - SUBLEVEL = 0 --EXTRAVERSION = -+EXTRAVERSION =-20181213-1 - NAME = None - - # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2018.12.0/series b/configs/platform-v7a/patches/barebox-2018.12.0/series deleted file mode 100644 index 64d799d..0000000 --- a/configs/platform-v7a/patches/barebox-2018.12.0/series +++ /dev/null @@ -1,22 +0,0 @@ -# umpf-base: v2018.12.0 -# umpf-name: 2018.12.0/customers/pengutronix/multiv7 -# umpf-version: 2018.12.0/customers/pengutronix/multiv7/20181213-1 -# umpf-topic: v2018.11.0/customers/pengutronix/udoo-neo -# umpf-hashinfo: c5f2e150d7e8d5439458df1a2cab71b25fc36e19 -# umpf-topic-range: 0b5361a328632e64c14a54306119093a0c7fecdf..6f54f9c6a2100a4c0fb8e9dff5250571de0c10b2 -0001-ARM-imx-add-support-for-Udoo-Neo-full.patch -# umpf-topic: v2018.12.0/topic/rpi3_miniuart -# umpf-hashinfo: 53f22789068554eaf5f42f32a662c4acd98d4b38 -# umpf-topic-range: 6f54f9c6a2100a4c0fb8e9dff5250571de0c10b2..883529b323acca020c42e7de342d00ff2d222fd8 -0101-ARM-rpi-fix-typo-in-rpi-common.c.patch -0102-ARM-rpi-move-clks-into-board-specific-rpi-common.patch -0103-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch -0104-serial_ns16550-handle-default-reg-io-width.patch -0105-serial_ns16550-add-raspberry-pi-compatible-and-init.patch -0106-ARM-rpi-add-NS16550-support.patch -0107-ARM-rpi-choose-miniuart-as-stdout.patch -0108-doc-bcm283x-remove-miniuart-overlay-instruction.patch -# umpf-release: 2018.12.0/customers/pengutronix/multiv7/20181213-1 -# umpf-topic-range: 883529b323acca020c42e7de342d00ff2d222fd8..806fa2b1b5f2491cefb2a76e6dc4c775874ad866 -0201-Release-2018.12.0-customers-pengutronix-multiv7-2018.patch -# umpf-end diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0001-ARM-rpi-fix-typo-in-rpi-common.c.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0001-ARM-rpi-fix-typo-in-rpi-common.c.patch new file mode 100644 index 0000000..b45621a --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0001-ARM-rpi-fix-typo-in-rpi-common.c.patch @@ -0,0 +1,31 @@ +From: Rouven Czerwinski +Date: Wed, 12 Dec 2018 16:43:06 +0100 +Subject: [PATCH] ARM: rpi: fix typo in rpi-common.c + +Signed-off-by: Rouven Czerwinski +--- + arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c +index 650b26ce7dcc..840f525bbbf6 100644 +--- a/arch/arm/boards/raspberry-pi/rpi-common.c ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c +@@ -73,7 +73,7 @@ static int rpi_get_arm_mem(u32 *size) + return 0; + } + +-static struct clk *rpi_register_firmare_clock(u32 clock_id, const char *name) ++static struct clk *rpi_register_firmware_clock(u32 clock_id, const char *name) + { + BCM2835_MBOX_STACK_ALIGN(struct msg_get_clock_rate, msg); + int ret; +@@ -286,7 +286,7 @@ static int rpi_clock_init(void) + { + struct clk *clk; + +- clk = rpi_register_firmare_clock(BCM2835_MBOX_CLOCK_ID_EMMC, ++ clk = rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_EMMC, + "bcm2835_mci0"); + if (IS_ERR(clk)) + return PTR_ERR(clk); diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0002-ARM-rpi-move-clks-into-board-specific-rpi-common.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0002-ARM-rpi-move-clks-into-board-specific-rpi-common.patch new file mode 100644 index 0000000..8e72b19 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0002-ARM-rpi-move-clks-into-board-specific-rpi-common.patch @@ -0,0 +1,77 @@ +From: Rouven Czerwinski +Date: Wed, 12 Dec 2018 16:43:45 +0100 +Subject: [PATCH] ARM: rpi: move clks into board specific rpi-common + +We don't know if the firmware running on the raspberry pi is the same firmware +which is running on all bcm283x devices. +Therefore move the console clock initialization into the rpi-common.c board file. +A future commit will use this function to retrieve the miniuart clock from the +raspberry pi firmware. +No functional changes. + +Signed-off-by: Rouven Czerwinski +--- + arch/arm/boards/raspberry-pi/rpi-common.c | 19 +++++++++++++++++++ + arch/arm/mach-bcm283x/core.c | 19 ------------------- + 2 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c +index 840f525bbbf6..887f096f7e4e 100644 +--- a/arch/arm/boards/raspberry-pi/rpi-common.c ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c +@@ -298,6 +298,25 @@ static int rpi_clock_init(void) + } + postconsole_initcall(rpi_clock_init); + ++static int rpi_console_clock_init(void) ++{ ++ struct clk *clk; ++ ++ clk = clk_fixed("apb_pclk", 0); ++ clk_register_clkdev(clk, "apb_pclk", NULL); ++ ++ clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); ++ clk_register_clkdev(clk, NULL, "uart0-pl0110"); ++ clkdev_add_physbase(clk, 0x20201000, NULL); ++ clkdev_add_physbase(clk, 0x3f201000, NULL); ++ ++ clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); ++ clk_register_clkdev(clk, NULL, "bcm2835-cs"); ++ ++ return 0; ++} ++postcore_initcall(rpi_console_clock_init); ++ + static int rpi_env_init(void) + { + struct stat s; +diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c +index f1dcda86f7f0..f2528cf1f150 100644 +--- a/arch/arm/mach-bcm283x/core.c ++++ b/arch/arm/mach-bcm283x/core.c +@@ -31,25 +31,6 @@ + #include + #include + +-static int bcm2835_clk_init(void) +-{ +- struct clk *clk; +- +- clk = clk_fixed("apb_pclk", 0); +- clk_register_clkdev(clk, "apb_pclk", NULL); +- +- clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); +- clk_register_clkdev(clk, NULL, "uart0-pl0110"); +- clkdev_add_physbase(clk, 0x20201000, NULL); +- clkdev_add_physbase(clk, 0x3f201000, NULL); +- +- clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); +- clk_register_clkdev(clk, NULL, "bcm2835-cs"); +- +- return 0; +-} +-postcore_initcall(bcm2835_clk_init); +- + void bcm2835_add_device_sdram(u32 size) + { + if (!size) diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0003-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0003-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch new file mode 100644 index 0000000..8c7a5f5 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0003-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch @@ -0,0 +1,34 @@ +From: Rouven Czerwinski +Date: Thu, 13 Dec 2018 07:23:37 +0100 +Subject: [PATCH] ARM: rpi: retrieve miniuart clock from firmware + +The miniuart uses the core clock as the clock source. This clock is fixed by the +firmware to 250Mhz if enable_uart=1 is set in the config.txt file. +However a user could still choose to overclock the core frequency, +which would result in wrong baudrates computed by barebox. +Retrieve the core clock frequency from the firmware to allow all potential +firmware configurations to work with barebox. + +Signed-off-by: Rouven Czerwinski +--- + arch/arm/boards/raspberry-pi/rpi-common.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c +index 887f096f7e4e..f22239c7ccb6 100644 +--- a/arch/arm/boards/raspberry-pi/rpi-common.c ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c +@@ -310,6 +310,13 @@ static int rpi_console_clock_init(void) + clkdev_add_physbase(clk, 0x20201000, NULL); + clkdev_add_physbase(clk, 0x3f201000, NULL); + ++ clk = rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_CORE, ++ "uart1-8250"); ++ if (IS_ERR(clk)) ++ return PTR_ERR(clk); ++ ++ clkdev_add_physbase(clk, 0x3f215040, NULL); ++ + clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "bcm2835-cs"); + diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0004-serial_ns16550-handle-default-reg-io-width.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0004-serial_ns16550-handle-default-reg-io-width.patch new file mode 100644 index 0000000..568d74d --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0004-serial_ns16550-handle-default-reg-io-width.patch @@ -0,0 +1,78 @@ +From: Rouven Czerwinski +Date: Tue, 11 Dec 2018 11:28:33 +0100 +Subject: [PATCH] serial_ns16550: handle default reg-io-width + +According to the device tree bindings for 8250, width is an optional property. +Default to 1 which is the same default value as used by the kernel. +Before this change the driver would not work for device trees which do not +include the optional binding. + +Signed-off-by: Rouven Czerwinski +--- + drivers/serial/serial_ns16550.c | 46 ++++++++++++++++++++--------------------- + 1 file changed, 23 insertions(+), 23 deletions(-) + +diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c +index 4d73ea8b8740..8ddcfdbefc1d 100644 +--- a/drivers/serial/serial_ns16550.c ++++ b/drivers/serial/serial_ns16550.c +@@ -297,36 +297,36 @@ static int ns16550_tstc(struct console_device *cdev) + static void ns16550_probe_dt(struct device_d *dev, struct ns16550_priv *priv) + { + struct device_node *np = dev->device_node; +- u32 width; ++ u32 width = 1; + + if (!IS_ENABLED(CONFIG_OFDEVICE)) + return; + + of_property_read_u32(np, "clock-frequency", &priv->plat.clock); + of_property_read_u32(np, "reg-shift", &priv->plat.shift); +- if (!of_property_read_u32(np, "reg-io-width", &width)) +- switch (width) { +- case 1: +- priv->read_reg = ns16550_read_reg_mmio_8; +- priv->write_reg = ns16550_write_reg_mmio_8; +- break; +- case 2: +- priv->read_reg = ns16550_read_reg_mmio_16; +- priv->write_reg = ns16550_write_reg_mmio_16; +- break; +- case 4: +- if (of_device_is_big_endian(np)) { +- priv->read_reg = ns16550_read_reg_mmio_32be; +- priv->write_reg = ns16550_write_reg_mmio_32be; +- } else { +- priv->read_reg = ns16550_read_reg_mmio_32; +- priv->write_reg = ns16550_write_reg_mmio_32; +- } +- break; +- default: +- dev_err(dev, "unsupported reg-io-width (%d)\n", +- width); ++ of_property_read_u32(np, "reg-io-width", &width); ++ switch (width) { ++ case 1: ++ priv->read_reg = ns16550_read_reg_mmio_8; ++ priv->write_reg = ns16550_write_reg_mmio_8; ++ break; ++ case 2: ++ priv->read_reg = ns16550_read_reg_mmio_16; ++ priv->write_reg = ns16550_write_reg_mmio_16; ++ break; ++ case 4: ++ if (of_device_is_big_endian(np)) { ++ priv->read_reg = ns16550_read_reg_mmio_32be; ++ priv->write_reg = ns16550_write_reg_mmio_32be; ++ } else { ++ priv->read_reg = ns16550_read_reg_mmio_32; ++ priv->write_reg = ns16550_write_reg_mmio_32; + } ++ break; ++ default: ++ dev_err(dev, "unsupported reg-io-width (%d)\n", ++ width); ++ } + } + + static struct ns16550_drvdata ns16450_drvdata = { diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0005-serial_ns16550-add-raspberry-pi-compatible-and-init.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0005-serial_ns16550-add-raspberry-pi-compatible-and-init.patch new file mode 100644 index 0000000..37a4df8 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0005-serial_ns16550-add-raspberry-pi-compatible-and-init.patch @@ -0,0 +1,65 @@ +From: Rouven Czerwinski +Date: Tue, 11 Dec 2018 10:50:44 +0100 +Subject: [PATCH] serial_ns16550: add raspberry pi compatible and init + +Add the compatible for the Raspberry Pi AUX UART and an init function which +enables it via the aux register and configures the correct shift value. + +Signed-off-by: Rouven Czerwinski +--- + drivers/serial/serial_ns16550.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c +index 8ddcfdbefc1d..ccd082e495c3 100644 +--- a/drivers/serial/serial_ns16550.c ++++ b/drivers/serial/serial_ns16550.c +@@ -253,6 +253,23 @@ static void ns16550_jz_init_port(struct console_device *cdev) + ns16550_serial_init_port(cdev); + } + ++#define BCM2836_AUX_CLOCK_ENB 0x3f215004 /* BCM2835 AUX Clock enable register */ ++#define BCM2836_AUX_CLOCK_EN_UART BIT(0) /* Bit 0 enables the Miniuart */ ++ ++static void rpi_init_port(struct console_device *cdev) ++{ ++ struct ns16550_priv *priv = to_ns16550_priv(cdev); ++ ++ writeb(BCM2836_AUX_CLOCK_EN_UART, BCM2836_AUX_CLOCK_ENB); ++ priv->plat.shift = 2; ++ /* ++ * We double the clock rate since the 16550 will divide by 16 ++ * (instead of 8 required by the BCM2835 peripheral manual) ++ */ ++ priv->plat.clock = priv->plat.clock*2; ++ ns16550_serial_init_port(cdev); ++} ++ + /*********** Exposed Functions **********************************/ + + /** +@@ -353,6 +370,11 @@ static __maybe_unused struct ns16550_drvdata tegra_drvdata = { + .linux_console_name = "ttyS", + }; + ++static __maybe_unused struct ns16550_drvdata rpi_drvdata = { ++ .init_port = rpi_init_port, ++ .linux_console_name = "ttyS", ++}; ++ + static int ns16550_init_iomem(struct device_d *dev, struct ns16550_priv *priv) + { + struct resource *iores; +@@ -527,6 +549,12 @@ static struct of_device_id ns16550_serial_dt_ids[] = { + .compatible = "ingenic,jz4740-uart", + .data = &jz_drvdata, + }, ++#endif ++#if IS_ENABLED(CONFIG_MACH_RPI_COMMON) ++ { ++ .compatible = "brcm,bcm2835-aux-uart", ++ .data = &rpi_drvdata, ++ }, + #endif + { + /* sentinel */ diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0006-ARM-rpi-add-NS16550-support.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0006-ARM-rpi-add-NS16550-support.patch new file mode 100644 index 0000000..fed00ac --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0006-ARM-rpi-add-NS16550-support.patch @@ -0,0 +1,24 @@ +From: Rouven Czerwinski +Date: Wed, 19 Dec 2018 12:09:23 +0100 +Subject: [PATCH] ARM: rpi: add NS16550 support + +Since the 16550 driver now supports the RPI3 miniuart, enable it in the default + config. + +Signed-off-by: Rouven Czerwinski +--- + arch/arm/configs/rpi_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/rpi_defconfig b/arch/arm/configs/rpi_defconfig +index 2bb615849324..dc5ab1fe17f6 100644 +--- a/arch/arm/configs/rpi_defconfig ++++ b/arch/arm/configs/rpi_defconfig +@@ -63,6 +63,7 @@ CONFIG_CMD_OF_PROPERTY=y + CONFIG_CMD_OFTREE=y + CONFIG_CMD_TIME=y + CONFIG_SERIAL_AMBA_PL011=y ++CONFIG_DRIVER_SERIAL_NS16550=y + CONFIG_MCI=y + CONFIG_MCI_BCM283X=y + CONFIG_LED=y diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0007-ARM-rpi-choose-miniuart-as-stdout.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0007-ARM-rpi-choose-miniuart-as-stdout.patch new file mode 100644 index 0000000..126fe01 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0007-ARM-rpi-choose-miniuart-as-stdout.patch @@ -0,0 +1,34 @@ +From: Rouven Czerwinski +Date: Tue, 11 Dec 2018 10:48:02 +0100 +Subject: [PATCH] ARM: rpi: choose miniuart as stdout + +Since we now support the miniuart, enable it as the default stdout port. +With this change the device tree overlay to switch the miniuart to bluetooth is +no longer necessary. + +Signed-off-by: Rouven Czerwinski +--- + arch/arm/dts/bcm2837-rpi-3.dts | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts +index d6ffc369122c..194b41c23b77 100644 +--- a/arch/arm/dts/bcm2837-rpi-3.dts ++++ b/arch/arm/dts/bcm2837-rpi-3.dts +@@ -2,15 +2,10 @@ + + / { + chosen { +- stdout-path = &uart0; ++ stdout-path = &uart1; + }; + + memory { + reg = <0x0 0x0>; + }; + }; +- +-&uart0 { +- status = "okay"; +- /delete-node/ bluetooth; +-}; diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0008-doc-bcm283x-remove-miniuart-overlay-instruction.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0008-doc-bcm283x-remove-miniuart-overlay-instruction.patch new file mode 100644 index 0000000..9d43761 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0008-doc-bcm283x-remove-miniuart-overlay-instruction.patch @@ -0,0 +1,24 @@ +From: Rouven Czerwinski +Date: Wed, 12 Dec 2018 15:06:49 +0100 +Subject: [PATCH] doc: bcm283x: remove miniuart overlay instruction + +Since we now use the miniuart on the raspberry pi 3, the miniuart overlay is no +longer needed. + +Signed-off-by: Rouven Czerwinski +--- + Documentation/boards/bcm2835.rst | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Documentation/boards/bcm2835.rst b/Documentation/boards/bcm2835.rst +index 79ea0ff7a78b..ea80d5834861 100644 +--- a/Documentation/boards/bcm2835.rst ++++ b/Documentation/boards/bcm2835.rst +@@ -22,7 +22,6 @@ Raspberry Pi + + kernel=barebox.img + enable_uart=1 +- dtoverlay=pi3-miniuart-bt + + (For more information, refer to the `documentation for config.txt`_.) + diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0009-ARM-rpi-use-defines-for-uart-bases.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0009-ARM-rpi-use-defines-for-uart-bases.patch new file mode 100644 index 0000000..e2b3607 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0009-ARM-rpi-use-defines-for-uart-bases.patch @@ -0,0 +1,46 @@ +From: Rouven Czerwinski +Date: Tue, 18 Dec 2018 11:41:38 +0100 +Subject: [PATCH] ARM: rpi: use defines for uart bases + +Previously the clkdev_add_phybase was called on magic register values, +add defines which clarify the device for which the phybase clkdev is created. + +Signed-off-by: Rouven Czerwinski +--- + arch/arm/boards/raspberry-pi/rpi-common.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c +index f22239c7ccb6..219c9c7d2b9e 100644 +--- a/arch/arm/boards/raspberry-pi/rpi-common.c ++++ b/arch/arm/boards/raspberry-pi/rpi-common.c +@@ -298,6 +298,10 @@ static int rpi_clock_init(void) + } + postconsole_initcall(rpi_clock_init); + ++#define BCM2835_PL011_BASE 0x20201000 ++#define BCM2836_PL011_BASE 0x3f201000 ++#define BCM2836_MINIUART_BASE 0x3f215040 ++ + static int rpi_console_clock_init(void) + { + struct clk *clk; +@@ -307,15 +311,15 @@ static int rpi_console_clock_init(void) + + clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "uart0-pl0110"); +- clkdev_add_physbase(clk, 0x20201000, NULL); +- clkdev_add_physbase(clk, 0x3f201000, NULL); ++ clkdev_add_physbase(clk, BCM2835_PL011_BASE, NULL); ++ clkdev_add_physbase(clk, BCM2836_PL011_BASE, NULL); + + clk = rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_CORE, + "uart1-8250"); + if (IS_ERR(clk)) + return PTR_ERR(clk); + +- clkdev_add_physbase(clk, 0x3f215040, NULL); ++ clkdev_add_physbase(clk, BCM2836_MINIUART_BASE, NULL); + + clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); + clk_register_clkdev(clk, NULL, "bcm2835-cs"); diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch new file mode 100644 index 0000000..293e09e --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0101-ARM-imx-add-support-for-Udoo-Neo-full.patch @@ -0,0 +1,332 @@ +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= +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 + +Original patch from Uwe Kleine-König, I fixed the +review comments and the imxcfg file to use the udoo neo values. + +I also tested the support on the udoo neo full board. + +Signed-off-by: Uwe Kleine-König +Signed-off-by: Rouven Czerwinski +--- + 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 | 131 +++++++++++++++++++++ + 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, 215 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 3bf176b14dc2..953a6eec12e4 100644 +--- a/arch/arm/boards/Makefile ++++ b/arch/arm/boards/Makefile +@@ -139,6 +139,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 ++#include ++#include ++ ++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..39f2a8a221f7 +--- /dev/null ++++ b/arch/arm/boards/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg +@@ -0,0 +1,131 @@ ++/* ++ * These values are taken from: ++ * repository: https://github.com/UDOOboard/uboot-imx ++ * branch: udoo/2015.04.imx ++ * file: board/udoo/udoo_neo/udoo_neo.cfg ++ */ ++ ++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 0x000E000B ++wm 32 0x021b0810 0x000E0010 ++/********************************************/ ++ ++/* DQS Read Gate */ ++wm 32 0x021b083c 0x41600158 ++wm 32 0x021b0840 0x01500140 ++/********************************************/ ++ ++/* Read/Write Delay */ ++wm 32 0x021b0848 0x3A383E3E ++wm 32 0x021b0850 0x3A383C38 ++/********************************************/ ++ ++/* 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..bb6b7d833278 +--- /dev/null ++++ b/arch/arm/boards/udoo-neo/lowlevel.c +@@ -0,0 +1,39 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++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 c08b35a10132..1c6bfd900b99 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -99,6 +99,7 @@ pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o + pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o + pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.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_VEXPRESS) += vexpress-v2p-ca9.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 ++ ++/{ ++}; +diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig +index d9b60053db03..53226c55944f 100644 +--- a/arch/arm/mach-imx/Kconfig ++++ b/arch/arm/mach-imx/Kconfig +@@ -384,6 +384,10 @@ config MACH_UDOO + bool "Freescale i.MX6 UDOO Board" + select ARCH_IMX6 + ++config MACH_UDOO_NEO ++ bool "i.MX6 UDOO Neo Board (full variant)" ++ 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 bc6c7339535e..18c4a2836007 100644 +--- a/arch/arm/mach-imx/include/mach/esdctl.h ++++ b/arch/arm/mach-imx/include/mach/esdctl.h +@@ -141,6 +141,7 @@ void __noreturn imx6ul_barebox_entry(void *boarddata); + void __noreturn vf610_barebox_entry(void *boarddata); + void __noreturn imx8mq_barebox_entry(void *boarddata); + void __noreturn imx7d_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 8b8a5452b770..4f6fd0489688 100644 +--- a/images/Makefile.imx ++++ b/images/Makefile.imx +@@ -254,6 +254,11 @@ CFG_start_imx6q_sabresd.pblb.imximg = $(board)/freescale-mx6-sabresd/flash-heade + FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblb.imximg + image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img + ++pblb-$(CONFIG_MACH_UDOO_NEO) += start_imx6sx_udoo_neo ++CFG_start_imx6sx_udoo_neo.pblb.imximg = $(board)/udoo-neo/flash-header-mx6sx-udoo-neo_full.imxcfg ++FILE_barebox-udoo-neo.img = start_imx6sx_udoo_neo.pblb.imximg ++image-$(CONFIG_MACH_UDOO_NEO) += barebox-udoo-neo.img ++ + pblb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += start_imx6sx_sabresdb + CFG_start_imx6sx_sabresdb.pblb.imximg = $(board)/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg + FILE_barebox-freescale-imx6sx-sabresdb.img = start_imx6sx_sabresdb.pblb.imximg diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/0201-Release-2019.01.0-customers-pengutronix-multi_v7-201.patch b/configs/platform-v7a/patches/barebox-2019.01.0/0201-Release-2019.01.0-customers-pengutronix-multi_v7-201.patch new file mode 100644 index 0000000..db1f38e --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/0201-Release-2019.01.0-customers-pengutronix-multi_v7-201.patch @@ -0,0 +1,21 @@ +From: Rouven Czerwinski +Date: Fri, 18 Jan 2019 11:36:33 +0100 +Subject: [PATCH] Release 2019.01.0/customers/pengutronix/multi_v7/20190118-1 + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d6423b84fef0..6617637ca045 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + VERSION = 2019 + PATCHLEVEL = 01 + SUBLEVEL = 0 +-EXTRAVERSION = ++EXTRAVERSION =-20190118-1 + NAME = None + + # *DOCUMENTATION* diff --git a/configs/platform-v7a/patches/barebox-2019.01.0/series b/configs/platform-v7a/patches/barebox-2019.01.0/series new file mode 100644 index 0000000..638a7d9 --- /dev/null +++ b/configs/platform-v7a/patches/barebox-2019.01.0/series @@ -0,0 +1,23 @@ +# umpf-base: v2019.01.0 +# umpf-name: 2019.01.0/customers/pengutronix/multi_v7 +# umpf-version: 2019.01.0/customers/pengutronix/multi_v7/20190118-1 +# umpf-topic: v2018.12.0/topic/rpi3_miniuart +# umpf-hashinfo: 9320eb666c0057ffb3b7475108a16c76623a527d +# umpf-topic-range: 60e12093cf3288086b62612bb3cf565a0b4320aa..d913f77a69b2fe9021c6b41266373e357aa1b598 +0001-ARM-rpi-fix-typo-in-rpi-common.c.patch +0002-ARM-rpi-move-clks-into-board-specific-rpi-common.patch +0003-ARM-rpi-retrieve-miniuart-clock-from-firmware.patch +0004-serial_ns16550-handle-default-reg-io-width.patch +0005-serial_ns16550-add-raspberry-pi-compatible-and-init.patch +0006-ARM-rpi-add-NS16550-support.patch +0007-ARM-rpi-choose-miniuart-as-stdout.patch +0008-doc-bcm283x-remove-miniuart-overlay-instruction.patch +0009-ARM-rpi-use-defines-for-uart-bases.patch +# umpf-topic: v2019.01.0/customers/pengutronix/udoo-neo +# umpf-hashinfo: 999a56255a0ddad3f9c5344b940987f63eec39b4 +# umpf-topic-range: d913f77a69b2fe9021c6b41266373e357aa1b598..69e5b7ada0621fe116216820ac4d1f04c3dad2c2 +0101-ARM-imx-add-support-for-Udoo-Neo-full.patch +# umpf-release: 2019.01.0/customers/pengutronix/multi_v7/20190118-1 +# umpf-topic-range: 69e5b7ada0621fe116216820ac4d1f04c3dad2c2..8bb76e29ee661a3dfb57117bb8fe8cfe5e3cc617 +0201-Release-2019.01.0-customers-pengutronix-multi_v7-201.patch +# umpf-end diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make b/configs/platform-v7a/rules/barebox-am335x-mlo.make index 62a3483..272d3df 100644 --- a/configs/platform-v7a/rules/barebox-am335x-mlo.make +++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X_MLO) += barebox-am335x-mlo # # Paths and names # -BAREBOX_AM335X_MLO_VERSION := 2018.12.0 -BAREBOX_AM335X_MLO_MD5 := f84d7d3562055c80c3eedce0b14d4a0d +BAREBOX_AM335X_MLO_VERSION := 2019.01.0 +BAREBOX_AM335X_MLO_MD5 := 51fae9592ee453535b9b21ffdd50f775 BAREBOX_AM335X_MLO := barebox-$(BAREBOX_AM335X_MLO_VERSION) BAREBOX_AM335X_MLO_SUFFIX := tar.bz2 BAREBOX_AM335X_MLO_DIR := $(BUILDDIR)/barebox-am335x-mlo-$(BAREBOX_AM335X_MLO_VERSION) diff --git a/configs/platform-v7a/rules/barebox-am335x.make b/configs/platform-v7a/rules/barebox-am335x.make index 2a38d3a..5114831 100644 --- a/configs/platform-v7a/rules/barebox-am335x.make +++ b/configs/platform-v7a/rules/barebox-am335x.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_AM335X) += barebox-am335x # # Paths and names # -BAREBOX_AM335X_VERSION := 2018.12.0 -BAREBOX_AM335X_MD5 := f84d7d3562055c80c3eedce0b14d4a0d +BAREBOX_AM335X_VERSION := 2019.01.0 +BAREBOX_AM335X_MD5 := 51fae9592ee453535b9b21ffdd50f775 BAREBOX_AM335X := barebox-$(BAREBOX_AM335X_VERSION) BAREBOX_AM335X_SUFFIX := tar.bz2 BAREBOX_AM335X_DIR := $(BUILDDIR)/barebox-am335x-$(BAREBOX_AM335X_VERSION) diff --git a/configs/platform-v7a/rules/barebox-mx6.make b/configs/platform-v7a/rules/barebox-mx6.make index 7cda132..44631b2 100644 --- a/configs/platform-v7a/rules/barebox-mx6.make +++ b/configs/platform-v7a/rules/barebox-mx6.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_MX6) += barebox-mx6 # # Paths and names # -BAREBOX_MX6_VERSION := 2018.12.0 -BAREBOX_MX6_MD5 := f84d7d3562055c80c3eedce0b14d4a0d +BAREBOX_MX6_VERSION := 2019.01.0 +BAREBOX_MX6_MD5 := 51fae9592ee453535b9b21ffdd50f775 BAREBOX_MX6 := barebox-$(BAREBOX_MX6_VERSION) BAREBOX_MX6_SUFFIX := tar.bz2 BAREBOX_MX6_DIR := $(BUILDDIR)/barebox-mx6-$(BAREBOX_MX6_VERSION) diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make index 47ad43b..c4f1816 100644 --- a/configs/platform-v7a/rules/barebox-rpi2.make +++ b/configs/platform-v7a/rules/barebox-rpi2.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_RPI2) += barebox-rpi2 # # Paths and names # -BAREBOX_RPI2_VERSION := 2018.12.0 -BAREBOX_RPI2_MD5 := f84d7d3562055c80c3eedce0b14d4a0d +BAREBOX_RPI2_VERSION := 2019.01.0 +BAREBOX_RPI2_MD5 := 51fae9592ee453535b9b21ffdd50f775 BAREBOX_RPI2 := barebox-$(BAREBOX_RPI2_VERSION) BAREBOX_RPI2_SUFFIX := tar.bz2 BAREBOX_RPI2_DIR := $(BUILDDIR)/barebox-rpi2-$(BAREBOX_RPI2_VERSION) diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make index afef7a9..6cd3246 100644 --- a/configs/platform-v7a/rules/barebox-vexpress.make +++ b/configs/platform-v7a/rules/barebox-vexpress.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_BAREBOX_VEXPRESS) += barebox-vexpress # # Paths and names # -BAREBOX_VEXPRESS_VERSION := 2018.12.0 -BAREBOX_VEXPRESS_MD5 := f84d7d3562055c80c3eedce0b14d4a0d +BAREBOX_VEXPRESS_VERSION := 2019.01.0 +BAREBOX_VEXPRESS_MD5 := 51fae9592ee453535b9b21ffdd50f775 BAREBOX_VEXPRESS := barebox-$(BAREBOX_VEXPRESS_VERSION) BAREBOX_VEXPRESS_SUFFIX := tar.bz2 BAREBOX_VEXPRESS_DIR := $(BUILDDIR)/barebox-vexpress-$(BAREBOX_VEXPRESS_VERSION) -- cgit v1.2.3