mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/3] imx6ul: add Technexion Pico Hobbit support
@ 2017-06-02 13:18 Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 1/3] ARM: i.MX: setup ENET_TX_CLK_DIR in imx6_init for every imx6ul Michael Grzeschik
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Grzeschik @ 2017-06-02 13:18 UTC (permalink / raw)
  To: barebox

This series adds support for the Technexion Pico Hobbit. It also
prepares the TX_CLK_DIR pins for imx6ul platforms. This way it
will not be needed in every imx6ul based board files.

Michael Grzeschik (3):
  ARM: i.MX: setup ENET_TX_CLK_DIR in imx6_init for every imx6ul
  ARM: phytec-som-imx6: remove needles enet refclk setup
  ARM: i.MX6: add Technexion Pico Hobbit support

 arch/arm/boards/Makefile                           |  1 +
 arch/arm/boards/phytec-som-imx6/board.c            | 23 ++-----
 arch/arm/boards/technexion-pico-hobbit/Makefile    |  7 ++
 arch/arm/boards/technexion-pico-hobbit/board.c     | 63 +++++++++++++++++
 .../defaultenv-pico-hobbit/init/automount          | 11 +++
 .../defaultenv-pico-hobbit/network/eth1            | 18 +++++
 .../flash-header-imx6ul-pico-hobbit-256.imxcfg     | 64 ++++++++++++++++++
 .../flash-header-imx6ul-pico-hobbit-512.imxcfg     | 65 ++++++++++++++++++
 arch/arm/boards/technexion-pico-hobbit/lowlevel.c  | 78 ++++++++++++++++++++++
 arch/arm/configs/imx_v7_defconfig                  |  1 +
 arch/arm/dts/Makefile                              |  1 +
 arch/arm/dts/imx6ul-pico-hobbit.dts                | 44 ++++++++++++
 arch/arm/mach-imx/Kconfig                          |  6 ++
 arch/arm/mach-imx/imx6.c                           | 11 +++
 images/Makefile.imx                                | 10 +++
 15 files changed, 384 insertions(+), 19 deletions(-)
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/Makefile
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/board.c
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/init/automount
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/network/eth1
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/lowlevel.c
 create mode 100644 arch/arm/dts/imx6ul-pico-hobbit.dts

-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 1/3] ARM: i.MX: setup ENET_TX_CLK_DIR in imx6_init for every imx6ul
  2017-06-02 13:18 [PATCH v2 0/3] imx6ul: add Technexion Pico Hobbit support Michael Grzeschik
@ 2017-06-02 13:18 ` Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 2/3] ARM: phytec-som-imx6: remove needles enet refclk setup Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support Michael Grzeschik
  2 siblings, 0 replies; 7+ messages in thread
From: Michael Grzeschik @ 2017-06-02 13:18 UTC (permalink / raw)
  To: barebox

We generically enable the output of ENET_TX_CLK.
It will be output if ENET_REF_CLK is selected.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 arch/arm/mach-imx/imx6.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 7b3fc1da27..5afbf6b30f 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -121,6 +121,16 @@ void imx6_setup_ipu_qos(void)
 	}
 }
 
+void imx6ul_enet_clk_init(void)
+{
+	void __iomem *gprbase = IOMEM(MX6_IOMUXC_BASE_ADDR) + 0x4000;
+	uint32_t val;
+
+	val = readl(gprbase + IOMUXC_GPR1);
+	val |= (0x3 << 17);
+	writel(val, gprbase + IOMUXC_GPR1);
+}
+
 int imx6_init(void)
 {
 	const char *cputypestr;
@@ -159,6 +169,7 @@ int imx6_init(void)
 		break;
 	case IMX6_CPUTYPE_IMX6UL:
 		cputypestr = "i.MX6 UltraLite";
+		imx6ul_enet_clk_init();
 		break;
 	case IMX6_CPUTYPE_IMX6ULL:
 		cputypestr = "i.MX6 ULL";
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 2/3] ARM: phytec-som-imx6: remove needles enet refclk setup
  2017-06-02 13:18 [PATCH v2 0/3] imx6ul: add Technexion Pico Hobbit support Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 1/3] ARM: i.MX: setup ENET_TX_CLK_DIR in imx6_init for every imx6ul Michael Grzeschik
@ 2017-06-02 13:18 ` Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support Michael Grzeschik
  2 siblings, 0 replies; 7+ messages in thread
From: Michael Grzeschik @ 2017-06-02 13:18 UTC (permalink / raw)
  To: barebox

All REF_CLK output setup now is generically prepared for imx6ul. The
handling of the ENET_CLK_SEL (gpr[13]|gpr[14]) bits is not necessary, as
0 is their reset value.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 arch/arm/boards/phytec-som-imx6/board.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index b93fd1be60..cb397779c4 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -96,24 +96,6 @@ int ksz8081_phy_fixup(struct phy_device *phydev)
 	return 0;
 }
 
-static void imx6ul_setup_fec(void)
-{
-	void __iomem *gprbase = IOMEM(MX6_IOMUXC_BASE_ADDR) + 0x4000;
-	uint32_t val;
-
-	phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK,
-			ksz8081_phy_fixup);
-
-	val = readl(gprbase + IOMUXC_GPR1);
-	/* Use 50M anatop loopback REF_CLK1 for ENET1, clear gpr1[13], set gpr1[17]*/
-	val &= ~(1 << 13);
-	val |= (1 << 17);
-	/* Use 50M anatop loopback REF_CLK1 for ENET2, clear gpr1[14], set gpr1[18]*/
-	val &= ~(1 << 14);
-	val |= (1 << 18);
-	writel(val, gprbase + IOMUXC_GPR1);
-}
-
 static int physom_imx6_devices_init(void)
 {
 	int ret;
@@ -153,7 +135,10 @@ static int physom_imx6_devices_init(void)
 		barebox_set_hostname("phyCORE-i.MX6UL");
 		default_environment_path = "/chosen/environment-nand";
 		default_envdev = "NAND flash";
-		imx6ul_setup_fec();
+
+		phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK,
+				ksz8081_phy_fixup);
+
 	} else
 		return 0;
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support
  2017-06-02 13:18 [PATCH v2 0/3] imx6ul: add Technexion Pico Hobbit support Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 1/3] ARM: i.MX: setup ENET_TX_CLK_DIR in imx6_init for every imx6ul Michael Grzeschik
  2017-06-02 13:18 ` [PATCH v2 2/3] ARM: phytec-som-imx6: remove needles enet refclk setup Michael Grzeschik
@ 2017-06-02 13:18 ` Michael Grzeschik
  2017-06-06  6:18   ` Sascha Hauer
  2 siblings, 1 reply; 7+ messages in thread
From: Michael Grzeschik @ 2017-06-02 13:18 UTC (permalink / raw)
  To: barebox

This adds support support for the i.MX6UL Technexion Pico Hobbit.
The board comes with different amounts of RAM. We create one image
for the 256MB and one for the 512MB variant.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - removed already prepared clock setup

 arch/arm/boards/Makefile                           |  1 +
 arch/arm/boards/technexion-pico-hobbit/Makefile    |  7 ++
 arch/arm/boards/technexion-pico-hobbit/board.c     | 63 +++++++++++++++++
 .../defaultenv-pico-hobbit/init/automount          | 11 +++
 .../defaultenv-pico-hobbit/network/eth1            | 18 +++++
 .../flash-header-imx6ul-pico-hobbit-256.imxcfg     | 64 ++++++++++++++++++
 .../flash-header-imx6ul-pico-hobbit-512.imxcfg     | 65 ++++++++++++++++++
 arch/arm/boards/technexion-pico-hobbit/lowlevel.c  | 78 ++++++++++++++++++++++
 arch/arm/configs/imx_v7_defconfig                  |  1 +
 arch/arm/dts/Makefile                              |  1 +
 arch/arm/dts/imx6ul-pico-hobbit.dts                | 44 ++++++++++++
 arch/arm/mach-imx/Kconfig                          |  6 ++
 images/Makefile.imx                                | 10 +++
 13 files changed, 369 insertions(+)
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/Makefile
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/board.c
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/init/automount
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/network/eth1
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
 create mode 100644 arch/arm/boards/technexion-pico-hobbit/lowlevel.c
 create mode 100644 arch/arm/dts/imx6ul-pico-hobbit.dts

diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 0ecfb3e4b3..f2d4d38785 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -115,6 +115,7 @@ obj-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC)	+= terasic-de0-nano-soc/
 obj-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT)	+= terasic-sockit/
 obj-$(CONFIG_MACH_SOLIDRUN_CUBOX)		+= solidrun-cubox/
 obj-$(CONFIG_MACH_SOLIDRUN_MICROSOM)		+= solidrun-microsom/
+obj-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT)	+= technexion-pico-hobbit/
 obj-$(CONFIG_MACH_TECHNEXION_WANDBOARD)		+= technexion-wandboard/
 obj-$(CONFIG_MACH_TNY_A9260)			+= tny-a926x/
 obj-$(CONFIG_MACH_TNY_A9263)			+= tny-a926x/
diff --git a/arch/arm/boards/technexion-pico-hobbit/Makefile b/arch/arm/boards/technexion-pico-hobbit/Makefile
new file mode 100644
index 0000000000..b60dcd2bc1
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/Makefile
@@ -0,0 +1,7 @@
+obj-y += board.o
+lwl-y += lowlevel.o
+extra-y += flash-header-imx6ul-pico-hobbit-256.dcd.S \
+           flash-header-imx6ul-pico-hobbit-256.dcd \
+           flash-header-imx6ul-pico-hobbit-512.dcd.S \
+           flash-header-imx6ul-pico-hobbit-512.dcd
+bbenv-y += defaultenv-pico-hobbit
diff --git a/arch/arm/boards/technexion-pico-hobbit/board.c b/arch/arm/boards/technexion-pico-hobbit/board.c
new file mode 100644
index 0000000000..d3109fc390
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/board.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2017 Michael Grzeschik, Pengutronix
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation.
+ *
+ */
+
+#include <asm/armlinux.h>
+#include <asm/io.h>
+#include <bootsource.h>
+#include <common.h>
+#include <environment.h>
+#include <envfs.h>
+#include <gpio.h>
+#include <init.h>
+#include <mach/generic.h>
+#include <mach/imx6-regs.h>
+#include <mach/imx6.h>
+#include <mach/bbu.h>
+#include <linux/sizes.h>
+#include <linux/phy.h>
+#include <mfd/imx6q-iomuxc-gpr.h>
+
+#include <linux/micrel_phy.h>
+
+static int ksz8081_phy_fixup(struct phy_device *dev)
+{
+	phy_write(dev, 0x1f, 0x8190);
+	phy_write(dev, 0x16, 0x202);
+
+	return 0;
+}
+
+static int pico_hobbit_device_init(void)
+{
+	if (!of_machine_is_compatible("technexion,imx6ul-pico-hobbit"))
+		return 0;
+
+	phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK,
+			ksz8081_phy_fixup);
+
+	imx6_bbu_internal_mmc_register_handler("emmc", "/dev/mmc0.barebox",
+			BBU_HANDLER_FLAG_DEFAULT);
+
+	barebox_set_hostname("pico-hobbit");
+
+	defaultenv_append_directory(defaultenv_pico_hobbit);
+
+	return 0;
+}
+device_initcall(pico_hobbit_device_init);
diff --git a/arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/init/automount b/arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/init/automount
new file mode 100644
index 0000000000..fdcfa36045
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/init/automount
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# automount tftp server based on $eth1.serverip
+
+mkdir -p /mnt/tftp
+automount /mnt/tftp 'ifup eth1 && mount -t tftp $eth1.serverip /mnt/tftp'
+
+# automount nfs server's nfsroot
+
+mkdir -p /mnt/nfs
+automount /mnt/nfs 'ifup eth1 && mount -t nfs ${eth1.serverip}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs'
diff --git a/arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/network/eth1 b/arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/network/eth1
new file mode 100644
index 0000000000..dfe63971df
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/defaultenv-pico-hobbit/network/eth1
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# ip setting (static/dhcp)
+ip=dhcp
+global.dhcp.vendor_id=barebox-${global.hostname}
+
+# static setup used if ip=static
+ipaddr=
+netmask=
+gateway=
+serverip=
+
+# MAC address if needed
+#ethaddr=xx:xx:xx:xx:xx:xx
+
+# put code to discover eth1 (i.e. 'usb') to /env/network/eth1-discover
+
+exit 0
diff --git a/arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg b/arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
new file mode 100644
index 0000000000..12cda04e60
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
@@ -0,0 +1,64 @@
+loadaddr 0x80000000
+soc imx6
+dcdofs 0x400
+
+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 0x020E04B4 0x000C0000
+wm 32 0x020E04AC 0x00000000
+wm 32 0x020E027C 0x00000030
+wm 32 0x020E0250 0x00000030
+wm 32 0x020E024C 0x00000030
+wm 32 0x020E0490 0x00000030
+wm 32 0x020E0288 0x00000030
+wm 32 0x020E0270 0x00000000
+wm 32 0x020E0260 0x00000030
+wm 32 0x020E0264 0x00000030
+wm 32 0x020E04A0 0x00000030
+wm 32 0x020E0494 0x00020000
+wm 32 0x020E0280 0x00000030
+wm 32 0x020E0284 0x00000030
+wm 32 0x020E04B0 0x00020000
+wm 32 0x020E0498 0x00000030
+wm 32 0x020E04A4 0x00000030
+wm 32 0x020E0244 0x00000030
+wm 32 0x020E0248 0x00000030
+wm 32 0x021B001C 0x00008000
+wm 32 0x021B0800 0xA1390003
+wm 32 0x021B080C 0x00000000
+wm 32 0x021B083C 0x01380134
+wm 32 0x021B0848 0x40404244
+wm 32 0x021B0850 0x40405050
+wm 32 0x021B081C 0x33333333
+wm 32 0x021B0820 0x33333333
+wm 32 0x021B082C 0xf3333333
+wm 32 0x021B0830 0xf3333333
+wm 32 0x021B08C0 0x00921012
+wm 32 0x021B08b8 0x00000800
+wm 32 0x021B0004 0x0002002D
+wm 32 0x021B0008 0x00333030
+wm 32 0x021B000C 0x676B52F3
+wm 32 0x021B0010 0xB66D8B63
+wm 32 0x021B0014 0x01FF00DB
+wm 32 0x021B0018 0x00201740
+wm 32 0x021B001C 0x00008000
+wm 32 0x021B002C 0x000026D2
+wm 32 0x021B0030 0x006B1023
+wm 32 0x021B0040 0x00000047
+wm 32 0x021B0000 0x83180000
+wm 32 0x021B001C 0x02008032
+wm 32 0x021B001C 0x00008033
+wm 32 0x021B001C 0x00048031
+wm 32 0x021B001C 0x15208030
+wm 32 0x021B001C 0x04008040
+wm 32 0x021B0020 0x00000800
+wm 32 0x021B0818 0x00000227
+wm 32 0x021B0004 0x0002552D
+wm 32 0x021B0404 0x00011006
+wm 32 0x021B001C 0x00000000
diff --git a/arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg b/arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
new file mode 100644
index 0000000000..0a1915b982
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
@@ -0,0 +1,65 @@
+loadaddr 0x80000000
+soc imx6
+dcdofs 0x400
+
+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 0x020E04B4 0x000C0000
+wm 32 0x020E04AC 0x00000000
+wm 32 0x020E027C 0x00000030
+wm 32 0x020E0250 0x00000030
+wm 32 0x020E024C 0x00000030
+wm 32 0x020E0490 0x00000030
+wm 32 0x020E0288 0x00000030
+wm 32 0x020E0270 0x00000000
+wm 32 0x020E0260 0x00000030
+wm 32 0x020E0264 0x00000030
+wm 32 0x020E04A0 0x00000030
+wm 32 0x020E0494 0x00020000
+wm 32 0x020E0280 0x00000030
+wm 32 0x020E0284 0x00000030
+wm 32 0x020E04B0 0x00020000
+wm 32 0x020E0498 0x00000030
+wm 32 0x020E04A4 0x00000030
+wm 32 0x020E0244 0x00000030
+wm 32 0x020E0248 0x00000030
+wm 32 0x021B001C 0x00008000
+wm 32 0x021B0800 0xA1390003
+wm 32 0x021B080C 0x00000000
+wm 32 0x021B083C 0x41570155
+wm 32 0x021B0848 0x4040474A
+wm 32 0x021B0850 0x40405550
+wm 32 0x021B081C 0x33333333
+wm 32 0x021B0820 0x33333333
+wm 32 0x021B082C 0xf3333333
+wm 32 0x021B0830 0xf3333333
+wm 32 0x021B08C0 0x00921012
+wm 32 0x021B08b8 0x00000800
+wm 32 0x021B0004 0x0002002D
+wm 32 0x021B0008 0x1b333030
+wm 32 0x021B000C 0x676B52F3
+wm 32 0x021B0010 0xB66D0B63
+wm 32 0x021B0014 0x01FF00DB
+wm 32 0x021B0018 0x00201740
+wm 32 0x021B001C 0x00008000
+wm 32 0x021B002C 0x000026D2
+wm 32 0x021B0030 0x006B1023
+wm 32 0x021B0040 0x0000004f
+wm 32 0x021B0000 0x84180000
+wm 32 0x021B0890 0x23400a38
+wm 32 0x021B001C 0x02008032
+wm 32 0x021B001C 0x00008033
+wm 32 0x021B001C 0x00048031
+wm 32 0x021B001C 0x15208030
+wm 32 0x021B001C 0x04008040
+wm 32 0x021B0020 0x00000800
+wm 32 0x021B0818 0x00000227
+wm 32 0x021B0004 0x0002552D
+wm 32 0x021B0404 0x00011006
+wm 32 0x021B001C 0x00000000
diff --git a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
new file mode 100644
index 0000000000..aad55127bf
--- /dev/null
+++ b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
@@ -0,0 +1,78 @@
+#include <common.h>
+#include <linux/sizes.h>
+#include <mach/generic.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+#include <mach/imx6-regs.h>
+#include <io.h>
+#include <debug_ll.h>
+#include <mach/esdctl.h>
+#include <asm/cache.h>
+#include <asm/sections.h>
+#include <image-metadata.h>
+
+#define MX6_UART6_BASE_ADDR             (MX6_AIPS2_OFF_BASE_ADDR + 0x7C000)
+
+static inline void setup_uart(void)
+{
+	void __iomem *iomuxbase = IOMEM(MX6_IOMUXC_BASE_ADDR);
+	void __iomem *uart = IOMEM(MX6_UART6_BASE_ADDR);
+
+	imx6_ungate_all_peripherals();
+
+	writel(0x8, iomuxbase + 0x1d4);
+	writel(0x1b0b1, iomuxbase + 0x0460);
+	writel(0x8, iomuxbase + 0x1d8);
+	writel(0x1b0b1, iomuxbase + 0x0460);
+
+	imx6_uart_setup(uart);
+	pbl_set_putc(imx_uart_putc, uart);
+
+	putc_ll('>');
+}
+
+static void __noreturn start_imx6_pico_hobbit_common(uint32_t size,
+						bool do_early_uart_config,
+						void *fdt_blob_fixed_offset)
+{
+	void *fdt;
+
+	arm_cpu_lowlevel_init();
+
+	arm_setup_stack(0x00910000 - 8);
+
+	arm_early_mmu_cache_invalidate();
+
+	relocate_to_current_adr();
+	setup_c();
+	barrier();
+
+	if (do_early_uart_config && IS_ENABLED(CONFIG_DEBUG_LL))
+		setup_uart();
+
+	/* disable all watchdog powerdown counters */
+	writew(0x0, 0x020bc008);
+	writew(0x0, 0x020c0008);
+	writew(0x0, 0x021e4008);
+
+	fdt = fdt_blob_fixed_offset - get_runtime_offset();
+
+	imx6ul_barebox_entry(fdt);
+}
+
+BAREBOX_IMD_TAG_STRING(pico_hobbit_mx6_memsize_SZ_256M, IMD_TYPE_PARAMETER, "memsize=256", 0);
+BAREBOX_IMD_TAG_STRING(pico_hobbit_mx6_memsize_SZ_512M, IMD_TYPE_PARAMETER, "memsize=512", 0);
+
+#define EDM1_ENTRY(name, fdt_name, memory_size, do_early_uart_config)	\
+	ENTRY_FUNCTION(name, r0, r1, r2)				\
+	{								\
+		extern char __dtb_##fdt_name##_start[];			\
+									\
+		IMD_USED(pico_hobbit_mx6_memsize_##memory_size);		\
+									\
+		start_imx6_pico_hobbit_common(memory_size, do_early_uart_config, \
+					 __dtb_##fdt_name##_start);	\
+	}
+
+EDM1_ENTRY(start_imx6ul_pico_hobbit_256mb, imx6ul_pico_hobbit, SZ_256M, true);
+EDM1_ENTRY(start_imx6ul_pico_hobbit_512mb, imx6ul_pico_hobbit, SZ_512M, true);
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index ab837cc55f..7bbd93240d 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -23,6 +23,7 @@ CONFIG_MACH_SABRESD=y
 CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB=y
 CONFIG_MACH_NITROGEN6=y
 CONFIG_MACH_SOLIDRUN_MICROSOM=y
+CONFIG_MACH_TECHNEXION_PICO_HOBBIT=y
 CONFIG_MACH_TECHNEXION_WANDBOARD=y
 CONFIG_MACH_EMBEST_RIOTBOARD=y
 CONFIG_MACH_UDOO=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index ec291ce6bf..806d386001 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -75,6 +75,7 @@ pbl-dtb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += imx6dl-hummingboard.dtb.o imx6q-humm
 				imx6dl-hummingboard2.dtb.o imx6q-hummingboard2.dtb.o \
 				imx6q-h100.dtb.o
 pbl-dtb-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += imx6q-wandboard.dtb.o imx6dl-wandboard.dtb.o
+pbl-dtb-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += imx6ul-pico-hobbit.dtb.o
 pbl-dtb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += tegra20-colibri-iris.dtb.o
 pbl-dtb-$(CONFIG_MACH_TOSHIBA_AC100) += tegra20-paz00.dtb.o
 pbl-dtb-$(CONFIG_MACH_TQMA53) += imx53-mba53.dtb.o
diff --git a/arch/arm/dts/imx6ul-pico-hobbit.dts b/arch/arm/dts/imx6ul-pico-hobbit.dts
new file mode 100644
index 0000000000..dd6f9da0a5
--- /dev/null
+++ b/arch/arm/dts/imx6ul-pico-hobbit.dts
@@ -0,0 +1,44 @@
+#include <arm/imx6ul-pico-hobbit.dts>
+
+/ {
+	chosen {
+		linux,stdout-path = &uart1;
+
+		environment@0 {
+			compatible = "barebox,environment";
+			device-path = &environment_usdhc1;
+		};
+	};
+
+	memory {
+		/delete-property/ device_type;
+	};
+};
+
+&usdhc1 {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	partition@0 {
+		label = "barebox";
+		reg = <0x0 0xc0000>;
+	};
+
+	environment_usdhc1: partition@c0000 {
+		label = "barebox-environment";
+		reg = <0xc0000 0x40000>;
+	};
+};
+
+&fec2 {
+	/*
+	  There are two possible ways to start the phy. Let the hardware
+	  reset it properly or reset it a second time in software.
+	  Unfortunetly the phy needs some microseconds after reset to
+	  settle down. As there is no property like
+	  phy-post-reset-delay, we better leave the reset to the
+	  hardware.
+	*/
+	/delete-property/ phy-reset-gpios;
+	/delete-property/ phy-reset-duration;
+};
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 80f53ce124..6110924af6 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -343,6 +343,12 @@ config MACH_SOLIDRUN_MICROSOM
 	bool "SolidRun MicroSOM based devices"
 	select ARCH_IMX6
 
+config MACH_TECHNEXION_PICO_HOBBIT
+	bool "Technexion Pico Hobbit"
+	select ARCH_IMX6
+	select ARCH_IMX6UL
+	select ARM_USE_COMPRESSED_DTB
+
 config MACH_TECHNEXION_WANDBOARD
 	bool "Technexion Wandboard"
 	select ARCH_IMX6
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 6ee44f2e90..88d3e5e339 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -315,6 +315,16 @@ CFG_start_h100_microsom_i2ex.pblx.imximg = $(board)/solidrun-microsom/flash-head
 FILE_barebox-auvidea-h100-microsom-i2eX.img = start_h100_microsom_i2ex.pblx.imximg
 image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-auvidea-h100-microsom-i2eX.img
 
+pblx-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += start_imx6ul_pico_hobbit_256mb
+CFG_start_imx6ul_pico_hobbit_256mb.pblx.imximg = $(board)/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
+FILE_barebox-imx6ul-pico-hobbit-256mb.img = start_imx6ul_pico_hobbit_256mb.pblx.imximg
+image-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += barebox-imx6ul-pico-hobbit-256mb.img
+
+pblx-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += start_imx6ul_pico_hobbit_512mb
+CFG_start_imx6ul_pico_hobbit_512mb.pblx.imximg = $(board)/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
+FILE_barebox-imx6ul-pico-hobbit-512mb.img = start_imx6ul_pico_hobbit_512mb.pblx.imximg
+image-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += barebox-imx6ul-pico-hobbit-512mb.img
+
 pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_1g
 CFG_start_imx6q_nitrogen6x_1g.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg
 FILE_barebox-boundarydevices-imx6q-nitrogen6x-1g.img = start_imx6q_nitrogen6x_1g.pblx.imximg
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support
  2017-06-02 13:18 ` [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support Michael Grzeschik
@ 2017-06-06  6:18   ` Sascha Hauer
  2017-06-06 11:03     ` Michael Grzeschik
  0 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2017-06-06  6:18 UTC (permalink / raw)
  To: Michael Grzeschik; +Cc: barebox

On Fri, Jun 02, 2017 at 03:18:08PM +0200, Michael Grzeschik wrote:
> This adds support support for the i.MX6UL Technexion Pico Hobbit.
> The board comes with different amounts of RAM. We create one image
> for the 256MB and one for the 512MB variant.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> v1 -> v2: - removed already prepared clock setup
> 
> +
> +&usdhc1 {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	partition@0 {
> +		label = "barebox";
> +		reg = <0x0 0xc0000>;
> +	};
> +
> +	environment_usdhc1: partition@c0000 {
> +		label = "barebox-environment";
> +		reg = <0xc0000 0x40000>;
> +	};
> +};
> +
> +&fec2 {
> +	/*
> +	  There are two possible ways to start the phy. Let the hardware
> +	  reset it properly or reset it a second time in software.
> +	  Unfortunetly the phy needs some microseconds after reset to
> +	  settle down. As there is no property like
> +	  phy-post-reset-delay, we better leave the reset to the
> +	  hardware.
> +	*/
> +	/delete-property/ phy-reset-gpios;
> +	/delete-property/ phy-reset-duration;

Recent Kernels support phy-reset-post-delay. Can we just add support for
it in barebox aswell?

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support
  2017-06-06  6:18   ` Sascha Hauer
@ 2017-06-06 11:03     ` Michael Grzeschik
  2017-06-07  7:40       ` Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Grzeschik @ 2017-06-06 11:03 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Tue, Jun 06, 2017 at 08:18:40AM +0200, Sascha Hauer wrote:
> On Fri, Jun 02, 2017 at 03:18:08PM +0200, Michael Grzeschik wrote:
> > This adds support support for the i.MX6UL Technexion Pico Hobbit.
> > The board comes with different amounts of RAM. We create one image
> > for the 256MB and one for the 512MB variant.
> > 
> > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > ---
> > v1 -> v2: - removed already prepared clock setup
> > 
> > +
> > +&usdhc1 {
> > +	#address-cells = <1>;
> > +	#size-cells = <1>;
> > +
> > +	partition@0 {
> > +		label = "barebox";
> > +		reg = <0x0 0xc0000>;
> > +	};
> > +
> > +	environment_usdhc1: partition@c0000 {
> > +		label = "barebox-environment";
> > +		reg = <0xc0000 0x40000>;
> > +	};
> > +};
> > +
> > +&fec2 {
> > +	/*
> > +	  There are two possible ways to start the phy. Let the hardware
> > +	  reset it properly or reset it a second time in software.
> > +	  Unfortunetly the phy needs some microseconds after reset to
> > +	  settle down. As there is no property like
> > +	  phy-post-reset-delay, we better leave the reset to the
> > +	  hardware.
> > +	*/
> > +	/delete-property/ phy-reset-gpios;
> > +	/delete-property/ phy-reset-duration;
> 
> Recent Kernels support phy-reset-post-delay. Can we just add support for
> it in barebox aswell?

Could we for now stick with this? When I write the phy-reset-post-delay
patches I will then adopt this node in the regarding series. This gives
me some time, as I can not test the post-delay patch in the next two
weeks.

Thanks,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support
  2017-06-06 11:03     ` Michael Grzeschik
@ 2017-06-07  7:40       ` Sascha Hauer
  0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2017-06-07  7:40 UTC (permalink / raw)
  To: Michael Grzeschik; +Cc: barebox

On Tue, Jun 06, 2017 at 01:03:48PM +0200, Michael Grzeschik wrote:
> On Tue, Jun 06, 2017 at 08:18:40AM +0200, Sascha Hauer wrote:
> > On Fri, Jun 02, 2017 at 03:18:08PM +0200, Michael Grzeschik wrote:
> > > This adds support support for the i.MX6UL Technexion Pico Hobbit.
> > > The board comes with different amounts of RAM. We create one image
> > > for the 256MB and one for the 512MB variant.
> > > 
> > > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > > ---
> > > v1 -> v2: - removed already prepared clock setup
> > > 
> > > +
> > > +&usdhc1 {
> > > +	#address-cells = <1>;
> > > +	#size-cells = <1>;
> > > +
> > > +	partition@0 {
> > > +		label = "barebox";
> > > +		reg = <0x0 0xc0000>;
> > > +	};
> > > +
> > > +	environment_usdhc1: partition@c0000 {
> > > +		label = "barebox-environment";
> > > +		reg = <0xc0000 0x40000>;
> > > +	};
> > > +};
> > > +
> > > +&fec2 {
> > > +	/*
> > > +	  There are two possible ways to start the phy. Let the hardware
> > > +	  reset it properly or reset it a second time in software.
> > > +	  Unfortunetly the phy needs some microseconds after reset to
> > > +	  settle down. As there is no property like
> > > +	  phy-post-reset-delay, we better leave the reset to the
> > > +	  hardware.
> > > +	*/
> > > +	/delete-property/ phy-reset-gpios;
> > > +	/delete-property/ phy-reset-duration;
> > 
> > Recent Kernels support phy-reset-post-delay. Can we just add support for
> > it in barebox aswell?
> 
> Could we for now stick with this? When I write the phy-reset-post-delay
> patches I will then adopt this node in the regarding series. This gives
> me some time, as I can not test the post-delay patch in the next two
> weeks.

Ok, I reworded the comment to:

	/*
	 * There are two possible ways to start the phy. Let the hardware
	 * reset it properly or reset it a second time in software.
	 * Unfortunetly the phy needs some microseconds after reset to
	 * settle down.
	 * FIXME: Port support for the "phy-reset-post-delay" property to
	 *        barebox.
	 */

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2017-06-07  7:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 13:18 [PATCH v2 0/3] imx6ul: add Technexion Pico Hobbit support Michael Grzeschik
2017-06-02 13:18 ` [PATCH v2 1/3] ARM: i.MX: setup ENET_TX_CLK_DIR in imx6_init for every imx6ul Michael Grzeschik
2017-06-02 13:18 ` [PATCH v2 2/3] ARM: phytec-som-imx6: remove needles enet refclk setup Michael Grzeschik
2017-06-02 13:18 ` [PATCH v2 3/3] ARM: i.MX6: add Technexion Pico Hobbit support Michael Grzeschik
2017-06-06  6:18   ` Sascha Hauer
2017-06-06 11:03     ` Michael Grzeschik
2017-06-07  7:40       ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox