Skip to contentSkip to conversation

ARM: omap3: add Seagate Wireless Plus board

RFC PATCH New Jason Cooper 2 participants 11 messages May 8, 2013 – May 9, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

All,

This is a work in progress. All mistakes are mine. Seriously. I've never touched omap before. It should be obvious.

History:

The Wireless Plus is a portable, 1TB HD with an ~ 4 hour battery, and a wifi hotspot. It's only external connection is the SATA port (GoFlex connector).

The Wireless Plus is the successor to the GoFlex Wireless. Full source can be found here [1] (GoFlex Wireless). These appear to be exactly the same at the hardware level. The primary difference is drive capacity, and the Wireless Plus exposes uart1 to an unpopulated header in the corner of the board, so I chose to develop on it. :-)

Technical:

Both boards are using an AM3703 SoC and the tps6507x power regulator/battery charger. Both are using the Hynix h8kds0un0mer-4em RAM module.

Status:

The following patches are a work-in-progress and are based against v3.9. It basically boots (to rootfs panic) with patches 1 and 2. The gpmc patch oops out. I've included it in the hopes that someone can laugh at me and maybe give me a pointer. I need it to work in order to add the child node for the nand, and then the child nodes for the partitions.

Tony has been helping me out offline with this, and he suggested trying the gpmc against Linus' ToT. Which locks up before it even has a chance to get going. So this series is against v3.9.

The current state of the dts file has been to silence warnings/errors. I disabled a bunch of unused devices, and added the pinctrl nodes in order to remove the pins not found kind of errors. As for their correctness, I haven't been able to test yet.

I've done a liberal amount of copying from the provided sources for u-boot and the kernel. If you're motivated, grepping those sources for 'satellite|vavni' locates most of the changes made by Seagate.

Current Problem:

There are several gaps in my understanding of how far along TI's conversion to DT is. Should I be doing a separate board file for initializing the legacy items? I was hoping to do it all with DT.

Obviously, I don't expect anybody to run out and buy one of these, take it apart, and try to boot this code. But if the omap guys could take a look at this and give me a few pointers, I'd appreciate it. I'm kind of spinning my wheels at the moment.

Primarily, I'd like to get nand and usb working, so that I can read/write, mount a rootfs and do better testing.

thx,

Jason.

[1] http://www.seagate.com/support/downloads/item/satellite-gpl-fw-master-dl/

Jason Cooper (3):
ARM: omap3: Seagate Wireless Plus board
ARM: omap3: Seagate Wireless Plus DT entry
ARM: omap3: wireless plus gpmc wip

 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/omap3-wireless_plus.dts          | 331 +++++++++++++++++++++
 arch/arm/mach-omap2/board-generic.c                |  26 ++
 arch/arm/mach-omap2/sdram-hynix-h8kds0un0mer-4em.h |  30 ++
 4 files changed, 388 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-wireless_plus.dts
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8kds0un0mer-4em.h
Signature · 1 line
1.8.2.1
#1 lore raw

RFC PATCH 1/3 ARM: omap3: Seagate Wireless Plus board

Hynix include file copied from vendor supplied source code.

---
 arch/arm/mach-omap2/board-generic.c                | 26 +++++++++++++++++++
 arch/arm/mach-omap2/sdram-hynix-h8kds0un0mer-4em.h | 30 ++++++++++++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 arch/arm/mach-omap2/sdram-hynix-h8kds0un0mer-4em.h
arch/arm/mach-omap2/board-generic.c +26 -0
index e54a480..10b567c 100644
@@ -21,6 +21,7 @@
 #include "common.h"
 #include "common-board-devices.h"
 #include "dss-common.h"
+#include "sdram-hynix-h8kds0un0mer-4em.h"
 
 #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
 #define intc_of_init	NULL
@@ -51,6 +52,13 @@ static void __init omap_generic_init(void)
 		omap_4430sdp_display_init_of();
 }
 
+static void __init seagate_wireless_plus_init(void)
+{
+	omap_sdrc_init(h8kds0un0mer4em_sdrc_params, NULL);
+
+	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
+}
+
 #ifdef CONFIG_SOC_OMAP2420
 static const char *omap242x_boards_compat[] __initdata = {
 	"ti,omap2420",
@@ -90,6 +98,24 @@ MACHINE_END
 #endif
 
 #ifdef CONFIG_ARCH_OMAP3
+static const char *seagate_wireless_plus_compat[] __initdata = {
+	"seagate,wireless-plus",
+	NULL,
+};
+
+DT_MACHINE_START(SEAGATE_WIRELESS_PLUS_DT, "Seagate Wireless Plus (Flattened Device Tree)")
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= omap3430_init_early,
+	.init_irq	= omap_intc_of_init,
+	.handle_irq	= omap3_intc_handle_irq,
+	.init_machine	= seagate_wireless_plus_init,
+	.init_late	= omap3_init_late,
+	.init_time	= omap3_sync32k_timer_init,
+	.dt_compat	= seagate_wireless_plus_compat,
+	.restart	= omap3xxx_restart,
+MACHINE_END
+
 static const char *omap3_boards_compat[] __initdata = {
 	"ti,omap3",
 	NULL,
arch/arm/mach-omap2/sdram-hynix-h8kds0un0mer-4em.h new file +30 -0
new file mode 100644
index 0000000..82b58131
@@ -0,0 +1,30 @@
+/*
+ * SDRC register values for the Hynix H8KDS0UN0MER-4EM
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc.
+ *
+ * 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.
+ */
+
+#ifndef __ARCH_ARM_MACH_OMAP2_SDRAM_HYNIX_H8KDS0UN0MER4EM
+#define __ARCH_ARM_MACH_OMAP2_SDRAM_HYNIX_H8KDS0UN0MER4EM
+
+#include "sdrc.h"
+
+/* Hynix H8KDS0UN0MER-4EM */
+static struct omap_sdrc_params h8kds0un0mer4em_sdrc_params[] = {
+	[0] = {
+		.rate        = 200000000,
+		.actim_ctrla = 0x92e1c4c6,
+		.actim_ctrlb = 0x0002111c,
+		.rfr_ctrl    = 0x0004dc01,
+		.mr          = 0x00000032,
+	},
+	[1] = {
+		.rate        = 0
+	},
+};
+
+#endif
Signature · 1 line
1.8.2.1
#2 lore raw

RFC PATCH 2/3 ARM: omap3: Seagate Wireless Plus DT entry

In reply to Jason Cooper

---
NOTE: please see coverletter for details.

 arch/arm/boot/dts/Makefile                |   1 +
 arch/arm/boot/dts/omap3-wireless_plus.dts | 314 ++++++++++++++++++++++++++++++
 2 files changed, 315 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-wireless_plus.dts
arch/arm/boot/dts/Makefile +1 -0
index 9c62558..a022a42 100644
@@ -119,6 +119,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
 	omap3-beagle-xm.dtb \
 	omap3-evm.dtb \
 	omap3-tobi.dtb \
+	omap3-wireless_plus.dtb \
 	omap4-panda.dtb \
 	omap4-panda-a4.dtb \
 	omap4-panda-es.dtb \
arch/arm/boot/dts/omap3-wireless_plus.dts new file +314 -0

314 lines not on this page · raw message

Signature · 1 line
1.8.2.1
#3 lore raw

RFC PATCH 3/3 ARM: omap3: wireless plus gpmc wip

In reply to Jason Cooper

Need this in order to add the nand node and then the partitions.

in it's current state, crashes the system. :(

---
 arch/arm/boot/dts/omap3-wireless_plus.dts | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap3-wireless_plus.dts +18 -1
index 8a0acdf..6f33731 100644
@@ -17,6 +17,23 @@
 		device_type = "memory";
 		reg = <0x80000000 0x10000000>; /* 256 MB */
 	};
+
+	gpmc: gpmc at 6800A000 {
+		compatible = "ti,omap2430-gpmc";
+		ti,hwmods = "gpmc";
+		reg = <0x6800A000 0x2000>;
+		/* interrupts = <100>; */
+		pinctrl-names = "default";
+		pinctrl-0 = <&gpmc_pins>;
+
+		gpmc,num-cs = <8>;
+		gpmc,num-waitpins = <2>;
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 0x08000000 0x10000000>;
+
+		/* child nodes go here */
+	};
 };
 
 &omap3_pmx_core {
@@ -26,7 +43,7 @@
 	 * itself during the boot (or just set them up in the bootloader)
 	 */
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdrc_pins &gpmc_pins &hsusb1_pins>;
+	pinctrl-0 = <&sdrc_pins &hsusb1_pins>;
 
 	/* AM3703CUS pins for this board */
 	sdrc_pins: pinmux_sdrc_pins {
Signature · 1 line
1.8.2.1
maintainer
#4 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

In reply to Jason Cooper
Quoted 4 lines · Jason Cooper

Tony has been helping me out offline with this, and he suggested trying the gpmc against Linus' ToT. Which locks up before it even has a chance to get going. So this series is against v3.9.

You may have better luck with today's mainline treeand the following fix:

http://lkml.org/lkml/2013/5/8/374#

Regards,

Tony

maintainer
#8 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

In reply to Jason Cooper
Quoted 6 lines · Jason Cooper

Current Problem:

There are several gaps in my understanding of how far along TI's conversion to DT is. Should I be doing a separate board file for initializing the legacy items? I was hoping to do it all with DT.

Sorry forgot to reply to this.. No seprate board file should be needed, some devices may still need to be initialized with pdata based on the compatible flag.

Quoted 7 lines

Obviously, I don't expect anybody to run out and buy one of these, take it apart, and try to boot this code. But if the omap guys could take a look at this and give me a few pointers, I'd appreciate it. I'm kind of spinning my wheels at the moment.

Primarily, I'd like to get nand and usb working, so that I can read/write, mount a rootfs and do better testing.

The USB should be doable with device tree. At least both echi and musb are working properly on pandaboard. I think people have been using NAND with the gpmc DT patches, but I don't know the current status for sure.

Is the hard drive on the EHCI bus or how is it connected to omap?

Regards,

Tony

#9 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Jason Cooper

Current Problem:

There are several gaps in my understanding of how far along TI's conversion to DT is. Should I be doing a separate board file for initializing the legacy items? I was hoping to do it all with DT.

Sorry forgot to reply to this.. No seprate board file should be needed, some devices may still need to be initialized with pdata based on the compatible flag.

ti,hwmod, right?

Quoted 5 lines
Quoted 5 lines

Obviously, I don't expect anybody to run out and buy one of these, take it apart, and try to boot this code. But if the omap guys could take a look at this and give me a few pointers, I'd appreciate it. I'm kind of spinning my wheels at the moment.

Quoted 7 lines
Quoted 2 lines

Primarily, I'd like to get nand and usb working, so that I can read/write, mount a rootfs and do better testing.

The USB should be doable with device tree. At least both echi and musb are working properly on pandaboard. I think people have been using NAND with the gpmc DT patches, but I don't know the current status for sure.

I'll try your suggestion in your other email for ToT and see if I can get gpmc going.

Quoted 1 line

Is the hard drive on the EHCI bus or how is it connected to omap?

via ehci. They brutalized the tps driver to detect if the goflex cable was attached or not. Once I get something stable, I'll probably write a separate driver for that code. Or, push it out to userspace.

thx,

Jason.

maintainer
#10 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

Quoted 9 lines · Jason Cooper
Quoted 8 lines · Tony Lindgren
Quoted 6 lines · Jason Cooper

Current Problem:

There are several gaps in my understanding of how far along TI's conversion to DT is. Should I be doing a separate board file for initializing the legacy items? I was hoping to do it all with DT.

Quoted 5 lines
Quoted 3 lines

Sorry forgot to reply to this.. No seprate board file should be needed, some devices may still need to be initialized with pdata based on the compatible flag.

ti,hwmod, right?

Yes.. see mach-omap2/devices.c for the list that's still not initialized via DT.

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines

Obviously, I don't expect anybody to run out and buy one of these, take it apart, and try to boot this code. But if the omap guys could take a look at this and give me a few pointers, I'd appreciate it. I'm kind of spinning my wheels at the moment.

Quoted 7 lines
Quoted 2 lines

Primarily, I'd like to get nand and usb working, so that I can read/write, mount a rootfs and do better testing.

The USB should be doable with device tree. At least both echi and musb are working properly on pandaboard. I think people have been using NAND with the gpmc DT patches, but I don't know the current status for sure.

Quoted 8 lines

I'll try your suggestion in your other email for ToT and see if I can get gpmc going.

Quoted 1 line

Is the hard drive on the EHCI bus or how is it connected to omap?

via ehci. They brutalized the tps driver to detect if the goflex cable was attached or not. Once I get something stable, I'll probably write a separate driver for that code. Or, push it out to userspace.

OK. I guess you need to disconnect the drive from EHCI if the goflex is attached to avoid disk corruption?

Regards,

Tony

#5 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

In reply to Tony Lindgren
Quoted 9 lines · Tony Lindgren
Quoted 4 lines · Jason Cooper

Tony has been helping me out offline with this, and he suggested trying the gpmc against Linus' ToT. Which locks up before it even has a chance to get going. So this series is against v3.9.

You may have better luck with today's mainline treeand the following fix:

http://lkml.org/lkml/2013/5/8/374#

Ok, I'm attempting to do that, but got this for 'make dtbs':

ERROR (phandle_references): Reference to non-existent node or label "usb2_phy"

ERROR: Input tree has errors, aborting (use -f to force output) make[1]: *** [arch/arm/boot/dts/omap3-wireless_plus.dtb] Error 2 make[1]: *** Waiting for unfinished jobs....
make: *** [dtbs] Error 2

which was created by:

ad871c10 ARM: dts: OMAP: Add usb_otg and glue data to OMAP3+ boards

It assumes the board has twl4030 (and then includes it). Bootlogs from the vendor provided kernel don't show a single message from twl4030, so I've omitted it.

Assuming I did the correct thing by omitting the twl4030, I think the correct answer is to declare the phy in the dts files, like so:

---->8-----

commit c369d84600bd85b35d83807ce7ba893cea116fb4

Author: Jason Cooper <[email protected]>
Date:   Thu May 9 00:33:48 2013 +0000

ARM: omap3: dts: don't assume boards are using twl4030

If a board isn't using twl4030, then dtc will complain about the missing phandle (which is in twl4030.dtsi). Move the phy declaration to the dts files.

arch/arm/boot/dts/omap3-beagle-xm.dts +1 -0
index 5a31964..3046d1f 100644
@@ -122,6 +122,7 @@
 
 &usb_otg_hs {
 	interface-type = <0>;
+	usb-phy = <&usb2_phy>;
 	mode = <3>;
 	power = <50>;
 };
arch/arm/boot/dts/omap3-evm.dts +1 -0
index 05f51e1..96d1c20 100644
@@ -68,6 +68,7 @@
 
 &usb_otg_hs {
 	interface-type = <0>;
+	usb-phy = <&usb2_phy>;
 	mode = <3>;
 	power = <50>;
 };
arch/arm/boot/dts/omap3-overo.dtsi +1 -0
index d4a7280..a626c50 100644
@@ -73,6 +73,7 @@
 
 &usb_otg_hs {
 	interface-type = <0>;
+	usb-phy = <&usb2_phy>;
 	mode = <3>;
 	power = <50>;
 };
arch/arm/boot/dts/omap3.dtsi +0 -1
index 4ad03d9..82a404d 100644
@@ -519,7 +519,6 @@
 			interrupts = <0 92 0x4>, <0 93 0x4>;
 			interrupt-names = "mc", "dma";
 			ti,hwmods = "usb_otg_hs";
-			usb-phy = <&usb2_phy>;
 			multipoint = <1>;
 			num-eps = <16>;
 			ram-bits = <12>;
maintainer
#6 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

Quoted 22 lines · Jason Cooper
Quoted 9 lines · Tony Lindgren
Quoted 4 lines · Jason Cooper

Tony has been helping me out offline with this, and he suggested trying the gpmc against Linus' ToT. Which locks up before it even has a chance to get going. So this series is against v3.9.

You may have better luck with today's mainline treeand the following fix:

http://lkml.org/lkml/2013/5/8/374#

Ok, I'm attempting to do that, but got this for 'make dtbs':

ERROR (phandle_references): Reference to non-existent node or label "usb2_phy"

ERROR: Input tree has errors, aborting (use -f to force output) make[1]: *** [arch/arm/boot/dts/omap3-wireless_plus.dtb] Error 2 make[1]: *** Waiting for unfinished jobs....
make: *** [dtbs] Error 2

which was created by:

Quoted 8 lines

ad871c10 ARM: dts: OMAP: Add usb_otg and glue data to OMAP3+ boards

It assumes the board has twl4030 (and then includes it). Bootlogs from the vendor provided kernel don't show a single message from twl4030, so I've omitted it.

Assuming I did the correct thing by omitting the twl4030, I think the correct answer is to declare the phy in the dts files, like so:

Thanks, that is correct. We should not assume any PMIC with a processor as it can also be a custom chip. For example, Nokia n8x0 is using their retu + tahvo chips instead of tps chips.

I'll apply your patch into omap-for-v3.10/fixes.

Regards,

Tony

maintainer
#7 lore raw

cover ARM: omap3: add Seagate Wireless Plus board

Quoted 29 lines · Tony Lindgren
Quoted 28 lines · Jason Cooper
Quoted 9 lines · Tony Lindgren
Quoted 4 lines · Jason Cooper

Tony has been helping me out offline with this, and he suggested trying the gpmc against Linus' ToT. Which locks up before it even has a chance to get going. So this series is against v3.9.

You may have better luck with today's mainline treeand the following fix:

http://lkml.org/lkml/2013/5/8/374#

Ok, I'm attempting to do that, but got this for 'make dtbs':

ERROR (phandle_references): Reference to non-existent node or label "usb2_phy"

ERROR: Input tree has errors, aborting (use -f to force output) make[1]: *** [arch/arm/boot/dts/omap3-wireless_plus.dtb] Error 2 make[1]: *** Waiting for unfinished jobs....
make: *** [dtbs] Error 2

which was created by:

ad871c10 ARM: dts: OMAP: Add usb_otg and glue data to OMAP3+ boards

It assumes the board has twl4030 (and then includes it). Bootlogs from the vendor provided kernel don't show a single message from twl4030, so I've omitted it.

Quoted 8 lines
Quoted 2 lines

Assuming I did the correct thing by omitting the twl4030, I think the correct answer is to declare the phy in the dts files, like so:

Thanks, that is correct. We should not assume any PMIC with a processor as it can also be a custom chip. For example, Nokia n8x0 is using their retu + tahvo chips instead of tps chips.

I'll apply your patch into omap-for-v3.10/fixes.

I mean omap-for-v3.10/dt-fixes instead of fixes since it's .dts changes.

Quoted 9 lines

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel