mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC 1/2] kirkwood: add support for booting via oftree probe
@ 2014-06-22 20:34 Alexander Aring
  2014-06-22 20:34 ` [RFC 2/2] dns325: initial support for D-Link DNS-325 Alexander Aring
  2014-06-22 21:45 ` [RFC 1/2] kirkwood: add support for booting via oftree probe Sebastian Hesselbarth
  0 siblings, 2 replies; 11+ messages in thread
From: Alexander Aring @ 2014-06-22 20:34 UTC (permalink / raw)
  To: barebox

This patch initialize memory only if we boot a kirkwood arch with
device-tree probing. Otherwise some devices like timer or uart will
be probed twice.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
I don't know if this is right. The guruplug is the other kirkwood platform
but don't have devictree support.

 arch/arm/mach-mvebu/kirkwood.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index c79d130..dd73ab0 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -86,6 +86,12 @@ static int kirkwood_init_soc(void)
 {
 	unsigned long phys_base, phys_size;
 
+	kirkwood_memory_find(&phys_base, &phys_size);
+	arm_add_mem_device("ram0", phys_base, phys_size);
+
+	if (IS_ENABLED(CONFIG_OFDEVICE))
+		return 0;
+
 	barebox_set_model("Marvell Kirkwood");
 	barebox_set_hostname("kirkwood");
 
@@ -94,8 +100,6 @@ static int kirkwood_init_soc(void)
 	add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
 			   (unsigned int)KIRKWOOD_TIMER_BASE, 0x30,
 			   IORESOURCE_MEM, NULL);
-	kirkwood_memory_find(&phys_base, &phys_size);
-	arm_add_mem_device("ram0", phys_base, phys_size);
 	kirkwood_add_uart();
 
 	return 0;
-- 
2.0.0


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

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

* [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-22 20:34 [RFC 1/2] kirkwood: add support for booting via oftree probe Alexander Aring
@ 2014-06-22 20:34 ` Alexander Aring
  2014-06-22 21:50   ` Sebastian Hesselbarth
  2014-06-24 11:54   ` Sebastian Hesselbarth
  2014-06-22 21:45 ` [RFC 1/2] kirkwood: add support for booting via oftree probe Sebastian Hesselbarth
  1 sibling, 2 replies; 11+ messages in thread
From: Alexander Aring @ 2014-06-22 20:34 UTC (permalink / raw)
  To: barebox

This patch add a basic support for the D-Link DNS-325.

Currently only booting via uart with kwboot is supported. The barebox
kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
instead.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
I got the kwbimage values from u-boot with change to work with the
barebox kwboot utility. There is also a bug in u-boot kwbimage file
which enables 256 MB on chip select 0 and 1. But the DNS-325 has 256
MB on chip select 0 only. This is fixed in this kwbimage file.

 arch/arm/Makefile                             |  1 +
 arch/arm/boards/dlink-dns325/Makefile         |  2 +
 arch/arm/boards/dlink-dns325/board.c          | 17 ++++++++
 arch/arm/boards/dlink-dns325/dlink-dns325.dox | 37 +++++++++++++++++
 arch/arm/boards/dlink-dns325/kwbimage.cfg     | 26 ++++++++++++
 arch/arm/boards/dlink-dns325/lowlevel.c       | 34 ++++++++++++++++
 arch/arm/configs/dlink_dns325_defconfig       | 58 +++++++++++++++++++++++++++
 arch/arm/dts/Makefile                         |  4 +-
 arch/arm/dts/kirkwood-dns325-bb.dts           | 19 +++++++++
 arch/arm/mach-mvebu/Kconfig                   |  4 ++
 10 files changed, 201 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boards/dlink-dns325/Makefile
 create mode 100644 arch/arm/boards/dlink-dns325/board.c
 create mode 100644 arch/arm/boards/dlink-dns325/dlink-dns325.dox
 create mode 100644 arch/arm/boards/dlink-dns325/kwbimage.cfg
 create mode 100644 arch/arm/boards/dlink-dns325/lowlevel.c
 create mode 100644 arch/arm/configs/dlink_dns325_defconfig
 create mode 100644 arch/arm/dts/kirkwood-dns325-bb.dts

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 64db73c..6c1e632 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -97,6 +97,7 @@ board-$(CONFIG_MACH_SOLIDRUN_CUBOX)		+= solidrun-cubox
 board-$(CONFIG_MACH_TINY210)			+= friendlyarm-tiny210
 board-$(CONFIG_MACH_TINY6410)			+= friendlyarm-tiny6410
 board-$(CONFIG_MACH_USI_TOPKICK)		+= usi-topkick
+board-$(CONFIG_MACH_DLINK_DNS325)		+= dlink-dns325
 
 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
 
diff --git a/arch/arm/boards/dlink-dns325/Makefile b/arch/arm/boards/dlink-dns325/Makefile
new file mode 100644
index 0000000..01c7a25
--- /dev/null
+++ b/arch/arm/boards/dlink-dns325/Makefile
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/dlink-dns325/board.c b/arch/arm/boards/dlink-dns325/board.c
new file mode 100644
index 0000000..759bbfb
--- /dev/null
+++ b/arch/arm/boards/dlink-dns325/board.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2014
+ * Author: Alexander Aring <aar@pengutronix.de>
+ *
+ * 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.
+ *
+ */
+
+/* empty */
diff --git a/arch/arm/boards/dlink-dns325/dlink-dns325.dox b/arch/arm/boards/dlink-dns325/dlink-dns325.dox
new file mode 100644
index 0000000..414b2e7
--- /dev/null
+++ b/arch/arm/boards/dlink-dns325/dlink-dns325.dox
@@ -0,0 +1,37 @@
+/** @page dlink-dns325 D-Link DNS-325 NAS
+
+The NAS has
+@li Kirkwood 88F6281-A1 SoC
+@li 256 MB SDRAM
+@li 128 MB NAND type SAMSUNG 946 K9F1G08U0B PCB0
+@li 2 SATA interfaces
+@li RS232 serial interface
+@li 1 USB interface
+@li 1 Gigabit Ethernet interface
+@li 1 Temp Sensor G751-2f
+@li 1 MCU Holtek HT48C06E for Power Managment
+@li LEDs & buttons
+
+The NAS doesn't support NAND right now.
+Only boot via uart with kwboot is supported.
+
+The kwboot utility of barebox doesn't work right now.
+Instead use the u-boot kwboot utility:
+
+@verbatim
+$UBOOT/tools/kwboot -p -b $BAREBOX/barebox.kwbuart -B115200 -t /dev/ttyUSB1
+@endverbatim
+
+You must change the "ttyUSB1" device with your correct serial device.
+
+Working devices are:
+@li RS232 serial interface
+@li Ethernet interface
+@li LEDs & buttons
+
+D-Link MR3020 links:
+@li http://www.dlink.com/de/de/home-solutions/share/network-attached-storage/dns-325-sharecenter-2-bay-network-storage-enclosure
+@li http://jamie.lentin.co.uk/devices/dlink-dns325/
+@li http://tsd.dlink.com.tw/gpl.asp
+
+*/
diff --git a/arch/arm/boards/dlink-dns325/kwbimage.cfg b/arch/arm/boards/dlink-dns325/kwbimage.cfg
new file mode 100644
index 0000000..627f3b2
--- /dev/null
+++ b/arch/arm/boards/dlink-dns325/kwbimage.cfg
@@ -0,0 +1,26 @@
+VERSION 0
+BOOT_FROM nand
+NAND_ECCMODE default
+NAND_PAGESZ 00000800
+DATA ffd100e0 1b1b1b9b
+DATA ffd01400 43000c30
+DATA ffd01404 39543000
+DATA ffd01408 22125451
+DATA ffd0140c 00000833
+DATA ffd01410 0000000c
+DATA ffd01414 00000000
+DATA ffd01418 00000000
+DATA ffd0141c 00000c52
+DATA ffd01420 00000040
+DATA ffd01424 0000f17f
+DATA ffd01428 00085520
+DATA ffd0147c 00008552
+DATA ffd01500 00000000
+DATA ffd01504 0ffffff1
+DATA ffd0150c 00000000
+DATA ffd01514 00000000
+DATA ffd0151c 00000000
+DATA ffd01494 00030000
+DATA ffd01498 00000000
+DATA ffd0149c 0000e803
+DATA ffd01480 00000001
diff --git a/arch/arm/boards/dlink-dns325/lowlevel.c b/arch/arm/boards/dlink-dns325/lowlevel.c
new file mode 100644
index 0000000..27c1feb
--- /dev/null
+++ b/arch/arm/boards/dlink-dns325/lowlevel.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2014
+ * Author: Alexander Aring <aar@pengutronix.de>
+ *
+ * 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.
+ *
+ */
+
+#include <common.h>
+#include <sizes.h>
+#include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+#include <mach/lowlevel.h>
+
+extern char __dtb_kirkwood_dns325_bb_start[];
+
+ENTRY_FUNCTION(start_dlink_dns325, r0, r1, r2)
+{
+	void *fdt;
+
+	arm_cpu_lowlevel_init();
+
+	fdt = __dtb_kirkwood_dns325_bb_start - get_runtime_offset();
+
+	mvebu_barebox_entry(fdt);
+}
diff --git a/arch/arm/configs/dlink_dns325_defconfig b/arch/arm/configs/dlink_dns325_defconfig
new file mode 100644
index 0000000..f299771
--- /dev/null
+++ b/arch/arm/configs/dlink_dns325_defconfig
@@ -0,0 +1,58 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="kirkwood-dns325-bb"
+CONFIG_ARCH_MVEBU=y
+CONFIG_ARCH_KIRKWOOD=y
+CONFIG_MACH_DLINK_DNS325=y
+CONFIG_AEABI=y
+CONFIG_MMU=y
+CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
+CONFIG_DEBUG_LL=y
+CONFIG_LONGHELP=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_HOST=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_2048=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OFTREE=y
+CONFIG_NET=y
+CONFIG_NET_NFS=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_DRIVER_SERIAL_NS16550=y
+CONFIG_DRIVER_NET_ORION=y
+# CONFIG_SPI is not set
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_GPIO_ORION=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_NFS=y
+CONFIG_FS_UIMAGEFS=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index bb6c622..832a943 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -31,7 +31,8 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \
 	imx6q-var-custom.dtb \
 	imx6s-riotboard.dtb \
 	imx6q-phytec-pbaa03.dtb
-dtb-$(CONFIG_ARCH_MVEBU) += dove-cubox-bb.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += dove-cubox-bb.dtb \
+	kirkwood-dns325-bb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3188-radxarock.dtb
 dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5_sockit.dtb \
 	socfpga_cyclone5_socrates.dtb
@@ -57,6 +58,7 @@ pbl-$(CONFIG_MACH_PCM051) += am335x-phytec-phycore.dtb.o
 pbl-$(CONFIG_MACH_PHYTEC_PFLA02) += imx6s-phytec-pbab01.dtb.o imx6dl-phytec-pbab01.dtb.o imx6q-phytec-pbab01.dtb.o
 pbl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o
 pbl-$(CONFIG_MACH_SOLIDRUN_CUBOX) += dove-cubox-bb.dtb.o
+pbl-$(CONFIG_MACH_DLINK_DNS325) += kirkwood-dns325-bb.dtb.o
 pbl-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o
 pbl-$(CONFIG_MACH_PCA100) += imx27-phytec-phycard-s-rdk-bb.dtb.o
 pbl-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += tegra20-colibri-iris.dtb.o
diff --git a/arch/arm/dts/kirkwood-dns325-bb.dts b/arch/arm/dts/kirkwood-dns325-bb.dts
new file mode 100644
index 0000000..bddff36
--- /dev/null
+++ b/arch/arm/dts/kirkwood-dns325-bb.dts
@@ -0,0 +1,19 @@
+/*
+ * Barebox specific DT overlay for D-Link DNS-325
+ */
+
+#include "arm/kirkwood-dns325.dts"
+
+/ {
+	gpio-leds {
+		white-power {
+			barebox,default-trigger = "heartbeat";
+		};
+		white-usb {
+			barebox,default-trigger = "net";
+		};
+		red-r_hdd {
+			barebox,default-trigger = "panic";
+		};
+	};
+};
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 70c49ec..a5a4647 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -6,6 +6,7 @@ config ARCH_TEXT_BASE
 	default 0x2000000 if MACH_GLOBALSCALE_MIRABOX
 	default 0x2000000 if MACH_GLOBALSCALE_GURUPLUG
 	default 0x2000000 if MACH_USI_TOPKICK
+	default 0x2000000 if MACH_DLINK_DNS325
 	default 0x2000000 if MACH_MARVELL_ARMADA_XP_GP
 	default 0x2000000 if MACH_SOLIDRUN_CUBOX
 
@@ -101,6 +102,9 @@ config MACH_GLOBALSCALE_GURUPLUG
 config MACH_USI_TOPKICK
 	bool "Topkick"
 
+config MACH_DLINK_DNS325
+	bool "DNS-325"
+
 endchoice
 
 endif # ARCH_KIRKWOOD
-- 
2.0.0


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

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

* Re: [RFC 1/2] kirkwood: add support for booting via oftree probe
  2014-06-22 20:34 [RFC 1/2] kirkwood: add support for booting via oftree probe Alexander Aring
  2014-06-22 20:34 ` [RFC 2/2] dns325: initial support for D-Link DNS-325 Alexander Aring
@ 2014-06-22 21:45 ` Sebastian Hesselbarth
  2014-06-23  6:51   ` Alexander Aring
  1 sibling, 1 reply; 11+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-22 21:45 UTC (permalink / raw)
  To: Alexander Aring, barebox

On 06/22/2014 10:34 PM, Alexander Aring wrote:
> This patch initialize memory only if we boot a kirkwood arch with
> device-tree probing. Otherwise some devices like timer or uart will
> be probed twice.
> 
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> I don't know if this is right. The guruplug is the other kirkwood platform
> but don't have devictree support.

Alexander,

I'd rather remove non-DT booting for kirkwood completely. I have patches
ready somewhere. Let me sort them out tomorrow.

Sebastian

>  arch/arm/mach-mvebu/kirkwood.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
> index c79d130..dd73ab0 100644
> --- a/arch/arm/mach-mvebu/kirkwood.c
> +++ b/arch/arm/mach-mvebu/kirkwood.c
> @@ -86,6 +86,12 @@ static int kirkwood_init_soc(void)
>  {
>  	unsigned long phys_base, phys_size;
>  
> +	kirkwood_memory_find(&phys_base, &phys_size);
> +	arm_add_mem_device("ram0", phys_base, phys_size);
> +
> +	if (IS_ENABLED(CONFIG_OFDEVICE))
> +		return 0;
> +
>  	barebox_set_model("Marvell Kirkwood");
>  	barebox_set_hostname("kirkwood");
>  
> @@ -94,8 +100,6 @@ static int kirkwood_init_soc(void)
>  	add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
>  			   (unsigned int)KIRKWOOD_TIMER_BASE, 0x30,
>  			   IORESOURCE_MEM, NULL);
> -	kirkwood_memory_find(&phys_base, &phys_size);
> -	arm_add_mem_device("ram0", phys_base, phys_size);
>  	kirkwood_add_uart();
>  
>  	return 0;
> 


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

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

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-22 20:34 ` [RFC 2/2] dns325: initial support for D-Link DNS-325 Alexander Aring
@ 2014-06-22 21:50   ` Sebastian Hesselbarth
  2014-06-23  6:48     ` Alexander Aring
  2014-06-26  4:27     ` Alexander Aring
  2014-06-24 11:54   ` Sebastian Hesselbarth
  1 sibling, 2 replies; 11+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-22 21:50 UTC (permalink / raw)
  To: Alexander Aring, barebox

On 06/22/2014 10:34 PM, Alexander Aring wrote:
> This patch add a basic support for the D-Link DNS-325.
> 
> Currently only booting via uart with kwboot is supported. The barebox
> kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
> instead.

Why does kwboot does not work? There is an issue with early Kirkwood's
BootROM and UART boot mode. Just try over and over again. I also recall
modifying the timeouts may help.

> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
[...]
> diff --git a/arch/arm/boards/dlink-dns325/dlink-dns325.dox b/arch/arm/boards/dlink-dns325/dlink-dns325.dox
> new file mode 100644
> index 0000000..414b2e7
> --- /dev/null
> +++ b/arch/arm/boards/dlink-dns325/dlink-dns325.dox
> @@ -0,0 +1,37 @@
> +/** @page dlink-dns325 D-Link DNS-325 NAS
> +
> +The NAS has
> +@li Kirkwood 88F6281-A1 SoC
> +@li 256 MB SDRAM
> +@li 128 MB NAND type SAMSUNG 946 K9F1G08U0B PCB0
> +@li 2 SATA interfaces
> +@li RS232 serial interface
> +@li 1 USB interface
> +@li 1 Gigabit Ethernet interface
> +@li 1 Temp Sensor G751-2f
> +@li 1 MCU Holtek HT48C06E for Power Managment
> +@li LEDs & buttons
> +
> +The NAS doesn't support NAND right now.
> +Only boot via uart with kwboot is supported.

Is it the NAS that doesn't support NAND or is it missing driver support
for barebox instead?

> +The kwboot utility of barebox doesn't work right now.
> +Instead use the u-boot kwboot utility:

See above, we should fix kwboot instead.

Sebastian


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

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

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-22 21:50   ` Sebastian Hesselbarth
@ 2014-06-23  6:48     ` Alexander Aring
  2014-06-26  4:27     ` Alexander Aring
  1 sibling, 0 replies; 11+ messages in thread
From: Alexander Aring @ 2014-06-23  6:48 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

On Sun, Jun 22, 2014 at 11:50:56PM +0200, Sebastian Hesselbarth wrote:
> On 06/22/2014 10:34 PM, Alexander Aring wrote:
> > This patch add a basic support for the D-Link DNS-325.
> > 
> > Currently only booting via uart with kwboot is supported. The barebox
> > kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
> > instead.
> 
> Why does kwboot does not work? There is an issue with early Kirkwood's
> BootROM and UART boot mode. Just try over and over again. I also recall
> modifying the timeouts may help.
> 

Ok, I will dig into this issue next weekend.

> > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > ---
> [...]
> > diff --git a/arch/arm/boards/dlink-dns325/dlink-dns325.dox b/arch/arm/boards/dlink-dns325/dlink-dns325.dox
> > new file mode 100644
> > index 0000000..414b2e7
> > --- /dev/null
> > +++ b/arch/arm/boards/dlink-dns325/dlink-dns325.dox
> > @@ -0,0 +1,37 @@
> > +/** @page dlink-dns325 D-Link DNS-325 NAS
> > +
> > +The NAS has
> > +@li Kirkwood 88F6281-A1 SoC
> > +@li 256 MB SDRAM
> > +@li 128 MB NAND type SAMSUNG 946 K9F1G08U0B PCB0
> > +@li 2 SATA interfaces
> > +@li RS232 serial interface
> > +@li 1 USB interface
> > +@li 1 Gigabit Ethernet interface
> > +@li 1 Temp Sensor G751-2f
> > +@li 1 MCU Holtek HT48C06E for Power Managment
> > +@li LEDs & buttons
> > +
> > +The NAS doesn't support NAND right now.
> > +Only boot via uart with kwboot is supported.
> 
> Is it the NAS that doesn't support NAND or is it missing driver support
> for barebox instead?

ehm yes, there is a missing driver in barebox. Thanks for pointing this
out.

Are there any suggestions to implement "8-bit NAND Flash Interface" for
the kirkwoods 88F6180/88F619x/88F6281?

This platform is "just for fun" currently, not very useful without mtd
support. :-)

The free kirkwoods sheets are well documented, maybe I could try this.
Or port some code from linux/u-boot.

But first I will fix the kwboot issue, of course.

> 
> > +The kwboot utility of barebox doesn't work right now.
> > +Instead use the u-boot kwboot utility:
> 
> See above, we should fix kwboot instead.
> 

Ok.


Thanks.

- Alex

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

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

* Re: [RFC 1/2] kirkwood: add support for booting via oftree probe
  2014-06-22 21:45 ` [RFC 1/2] kirkwood: add support for booting via oftree probe Sebastian Hesselbarth
@ 2014-06-23  6:51   ` Alexander Aring
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Aring @ 2014-06-23  6:51 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

On Sun, Jun 22, 2014 at 11:45:57PM +0200, Sebastian Hesselbarth wrote:
> On 06/22/2014 10:34 PM, Alexander Aring wrote:
> > This patch initialize memory only if we boot a kirkwood arch with
> > device-tree probing. Otherwise some devices like timer or uart will
> > be probed twice.
> > 
> > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > ---
> > I don't know if this is right. The guruplug is the other kirkwood platform
> > but don't have devictree support.
> 
> Alexander,
> 
> I'd rather remove non-DT booting for kirkwood completely. I have patches
> ready somewhere. Let me sort them out tomorrow.
> 

Ok, I'll be waiting. Thanks.

- Alex

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

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

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-22 20:34 ` [RFC 2/2] dns325: initial support for D-Link DNS-325 Alexander Aring
  2014-06-22 21:50   ` Sebastian Hesselbarth
@ 2014-06-24 11:54   ` Sebastian Hesselbarth
  2014-06-25  6:57     ` Sascha Hauer
  1 sibling, 1 reply; 11+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-24 11:54 UTC (permalink / raw)
  To: Alexander Aring, barebox

On 06/22/2014 10:34 PM, Alexander Aring wrote:
> This patch add a basic support for the D-Link DNS-325.
>
> Currently only booting via uart with kwboot is supported. The barebox
> kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
> instead.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> I got the kwbimage values from u-boot with change to work with the
> barebox kwboot utility. There is also a bug in u-boot kwbimage file
> which enables 256 MB on chip select 0 and 1. But the DNS-325 has 256
> MB on chip select 0 only. This is fixed in this kwbimage file.

Alexander,

I posted a bunch of MVEBU related patches I had in my private branches.
Can you respin your DNS-325 patch based on those?

Sascha already applied
  "Marvell MVEBU assorted fixes and cleanup" and
  "Convert MVEBU SoCs to DT and PBL_MULTI_IMAGE"
but they haven't appeared on barebox/next. You can wait a day or two
or apply above series yourself. The other 3 pending patch sets are
just more improvements but shouldn't (directly) influence your dns-325
support patches.

I also tried kwboot again on Kirkwood, Dove, and Armada 370 and wasn't
able to reproduce any issues. Can you re-evaluate and report back any
issues with details?

Sebastian


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

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

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-24 11:54   ` Sebastian Hesselbarth
@ 2014-06-25  6:57     ` Sascha Hauer
  0 siblings, 0 replies; 11+ messages in thread
From: Sascha Hauer @ 2014-06-25  6:57 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

On Tue, Jun 24, 2014 at 01:54:07PM +0200, Sebastian Hesselbarth wrote:
> On 06/22/2014 10:34 PM, Alexander Aring wrote:
> >This patch add a basic support for the D-Link DNS-325.
> >
> >Currently only booting via uart with kwboot is supported. The barebox
> >kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
> >instead.
> >
> >Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> >---
> >I got the kwbimage values from u-boot with change to work with the
> >barebox kwboot utility. There is also a bug in u-boot kwbimage file
> >which enables 256 MB on chip select 0 and 1. But the DNS-325 has 256
> >MB on chip select 0 only. This is fixed in this kwbimage file.
> 
> Alexander,
> 
> I posted a bunch of MVEBU related patches I had in my private branches.
> Can you respin your DNS-325 patch based on those?
> 
> Sascha already applied
>  "Marvell MVEBU assorted fixes and cleanup" and
>  "Convert MVEBU SoCs to DT and PBL_MULTI_IMAGE"
> but they haven't appeared on barebox/next. You can wait a day or two
> or apply above series yourself. The other 3 pending patch sets are
> just more improvements but shouldn't (directly) influence your dns-325
> support patches.

All mvebu patches should now be in -next.

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] 11+ messages in thread

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-22 21:50   ` Sebastian Hesselbarth
  2014-06-23  6:48     ` Alexander Aring
@ 2014-06-26  4:27     ` Alexander Aring
  2014-06-26  6:53       ` Sebastian Hesselbarth
  1 sibling, 1 reply; 11+ messages in thread
From: Alexander Aring @ 2014-06-26  4:27 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

Hi,

On Sun, Jun 22, 2014 at 11:50:56PM +0200, Sebastian Hesselbarth wrote:
> On 06/22/2014 10:34 PM, Alexander Aring wrote:
> > This patch add a basic support for the D-Link DNS-325.
> > 
> > Currently only booting via uart with kwboot is supported. The barebox
> > kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
> > instead.
> 
> Why does kwboot does not work? There is an issue with early Kirkwood's
> BootROM and UART boot mode. Just try over and over again. I also recall
> modifying the timeouts may help.
> 

I tried to change the timeouts and it works now. I take these timings from
u-boot. Is there any reason why these timings differs?

Datasheet says nothing about any delay while loop for sending bootmsg.


Here is my diff with the very small change:

diff --git a/scripts/kwboot.c b/scripts/kwboot.c
index e068660..bcb5972 100644
--- a/scripts/kwboot.c
+++ b/scripts/kwboot.c
@@ -34,8 +34,8 @@ static unsigned char kwboot_msg_debug[] = {
        0xDD, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77
 };
 
-#define KWBOOT_MSG_REQ_DELAY   1000 /* ms */
-#define KWBOOT_MSG_RSP_TIMEO   1000 /* ms */
+#define KWBOOT_MSG_REQ_DELAY   10 /* ms */
+#define KWBOOT_MSG_RSP_TIMEO   50 /* ms */
 
 /*
  * Xmodem Transfers



btw.:

Now I see that the internal ROM bootloader could also boot from SATA
device - this sounds interesting. I will try that next weekend.


Thanks for your great help Sebastian!

- Alex

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

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

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-26  4:27     ` Alexander Aring
@ 2014-06-26  6:53       ` Sebastian Hesselbarth
  2014-06-26  9:14         ` Alexander Aring
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-26  6:53 UTC (permalink / raw)
  To: Alexander Aring; +Cc: barebox

On 06/26/2014 06:27 AM, Alexander Aring wrote:
> On Sun, Jun 22, 2014 at 11:50:56PM +0200, Sebastian Hesselbarth wrote:
>> On 06/22/2014 10:34 PM, Alexander Aring wrote:
>>> This patch add a basic support for the D-Link DNS-325.
>>>
>>> Currently only booting via uart with kwboot is supported. The barebox
>>> kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
>>> instead.
>>
>> Why does kwboot does not work? There is an issue with early Kirkwood's
>> BootROM and UART boot mode. Just try over and over again. I also recall
>> modifying the timeouts may help.
>>
> 
> I tried to change the timeouts and it works now. I take these timings from
> u-boot. Is there any reason why these timings differs?

IIRC, timings differ because barebox kwboot was mainly tested on Armada
370 and that low timings break UART boot mode there. I remember some
discussion about it a while ago. I'll see if I can find the discussion
and if there are any hints for timeouts that suite both Kirkwood and
Armada 370/XP.

> Datasheet says nothing about any delay while loop for sending bootmsg.
> 
> 
> Here is my diff with the very small change:
> 
> diff --git a/scripts/kwboot.c b/scripts/kwboot.c
> index e068660..bcb5972 100644
> --- a/scripts/kwboot.c
> +++ b/scripts/kwboot.c
> @@ -34,8 +34,8 @@ static unsigned char kwboot_msg_debug[] = {
>         0xDD, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77
>  };
>  
> -#define KWBOOT_MSG_REQ_DELAY   1000 /* ms */
> -#define KWBOOT_MSG_RSP_TIMEO   1000 /* ms */
> +#define KWBOOT_MSG_REQ_DELAY   10 /* ms */
> +#define KWBOOT_MSG_RSP_TIMEO   50 /* ms */
>  
>  /*
>   * Xmodem Transfers
> 
> 
> 
> btw.:
> 
> Now I see that the internal ROM bootloader could also boot from SATA
> device - this sounds interesting. I will try that next weekend.

Boot source is determined by bootstrap pins, i.e. some pull-up/pull-down
resistors on board. UART boot mode check was added to BootROM in some
later Kirkwoods and _additionally_ checks for UART boot source.

You cannot just change the default boot source without soldering.

Sebastian


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

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

* Re: [RFC 2/2] dns325: initial support for D-Link DNS-325
  2014-06-26  6:53       ` Sebastian Hesselbarth
@ 2014-06-26  9:14         ` Alexander Aring
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Aring @ 2014-06-26  9:14 UTC (permalink / raw)
  To: Sebastian Hesselbarth; +Cc: barebox

Hi,

On Thu, Jun 26, 2014 at 08:53:02AM +0200, Sebastian Hesselbarth wrote:
> On 06/26/2014 06:27 AM, Alexander Aring wrote:
> > On Sun, Jun 22, 2014 at 11:50:56PM +0200, Sebastian Hesselbarth wrote:
> >> On 06/22/2014 10:34 PM, Alexander Aring wrote:
> >>> This patch add a basic support for the D-Link DNS-325.
> >>>
> >>> Currently only booting via uart with kwboot is supported. The barebox
> >>> kwboot utility doesn't work at the moment. Use kwboot utility from u-boot
> >>> instead.
> >>
> >> Why does kwboot does not work? There is an issue with early Kirkwood's
> >> BootROM and UART boot mode. Just try over and over again. I also recall
> >> modifying the timeouts may help.
> >>
> > 
> > I tried to change the timeouts and it works now. I take these timings from
> > u-boot. Is there any reason why these timings differs?
> 
> IIRC, timings differ because barebox kwboot was mainly tested on Armada
> 370 and that low timings break UART boot mode there. I remember some
> discussion about it a while ago. I'll see if I can find the discussion
> and if there are any hints for timeouts that suite both Kirkwood and
> Armada 370/XP.
> 

ok.

> > Datasheet says nothing about any delay while loop for sending bootmsg.
> > 
> > 
> > Here is my diff with the very small change:
> > 
> > diff --git a/scripts/kwboot.c b/scripts/kwboot.c
> > index e068660..bcb5972 100644
> > --- a/scripts/kwboot.c
> > +++ b/scripts/kwboot.c
> > @@ -34,8 +34,8 @@ static unsigned char kwboot_msg_debug[] = {
> >         0xDD, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77
> >  };
> >  
> > -#define KWBOOT_MSG_REQ_DELAY   1000 /* ms */
> > -#define KWBOOT_MSG_RSP_TIMEO   1000 /* ms */
> > +#define KWBOOT_MSG_REQ_DELAY   10 /* ms */
> > +#define KWBOOT_MSG_RSP_TIMEO   50 /* ms */
> >  
> >  /*
> >   * Xmodem Transfers
> > 
> > 
> > 
> > btw.:
> > 
> > Now I see that the internal ROM bootloader could also boot from SATA
> > device - this sounds interesting. I will try that next weekend.
> 
> Boot source is determined by bootstrap pins, i.e. some pull-up/pull-down
> resistors on board. UART boot mode check was added to BootROM in some
> later Kirkwoods and _additionally_ checks for UART boot source.
> 
> You cannot just change the default boot source without soldering.
> 

... and I don't have any schematics. Okay, maybe I will reverse engineer
the hardware layout one day. I know there are some other not soldered
pin headers, maybe I have luck.

Thanks for this information.

- Alex

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

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

end of thread, other threads:[~2014-06-26  9:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-22 20:34 [RFC 1/2] kirkwood: add support for booting via oftree probe Alexander Aring
2014-06-22 20:34 ` [RFC 2/2] dns325: initial support for D-Link DNS-325 Alexander Aring
2014-06-22 21:50   ` Sebastian Hesselbarth
2014-06-23  6:48     ` Alexander Aring
2014-06-26  4:27     ` Alexander Aring
2014-06-26  6:53       ` Sebastian Hesselbarth
2014-06-26  9:14         ` Alexander Aring
2014-06-24 11:54   ` Sebastian Hesselbarth
2014-06-25  6:57     ` Sascha Hauer
2014-06-22 21:45 ` [RFC 1/2] kirkwood: add support for booting via oftree probe Sebastian Hesselbarth
2014-06-23  6:51   ` Alexander Aring

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