diff mbox

ARM: kirkwood: DT board setup for CloudBox

Message ID 1364555206-5870-1-git-send-email-simon.guinot@sequanux.org (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Guinot March 29, 2013, 11:06 a.m. UTC
This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
is a low cost NAS based on the Network Space v2.

Chipset list:
- CPU MARVELL 88F6702 1Ghz
- SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
- SPI flash, NOR 512KB
- 1 push button
- 2 LEDs (red and blue)

Note that there is no EEPROM and no USB ports embedded.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
---
 arch/arm/boot/dts/Makefile              |    3 +-
 arch/arm/boot/dts/kirkwood-cloudbox.dts |   89 +++++++++++++++++++++++++++++++
 arch/arm/configs/kirkwood_defconfig     |    1 +
 arch/arm/mach-kirkwood/Kconfig          |    7 +++
 arch/arm/mach-kirkwood/Makefile         |    1 +
 arch/arm/mach-kirkwood/board-dt.c       |    4 +-
 arch/arm/mach-kirkwood/board-ns2.c      |    3 +-
 arch/arm/mach-kirkwood/common.h         |    6 +++
 8 files changed, 111 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-cloudbox.dts

Comments

Jason Cooper March 29, 2013, 3:31 p.m. UTC | #1
Neat! another new board!

On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> is a low cost NAS based on the Network Space v2.
> 
> Chipset list:
> - CPU MARVELL 88F6702 1Ghz
> - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> - SPI flash, NOR 512KB
> - 1 push button
> - 2 LEDs (red and blue)
> 
> Note that there is no EEPROM and no USB ports embedded.
> 
> Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> ---
>  arch/arm/boot/dts/Makefile              |    3 +-
>  arch/arm/boot/dts/kirkwood-cloudbox.dts |   89 +++++++++++++++++++++++++++++++
>  arch/arm/configs/kirkwood_defconfig     |    1 +
>  arch/arm/mach-kirkwood/Kconfig          |    7 +++
>  arch/arm/mach-kirkwood/Makefile         |    1 +
>  arch/arm/mach-kirkwood/board-dt.c       |    4 +-
>  arch/arm/mach-kirkwood/board-ns2.c      |    3 +-
>  arch/arm/mach-kirkwood/common.h         |    6 +++
>  8 files changed, 111 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/boot/dts/kirkwood-cloudbox.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 9c62558..8b535ad 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -51,7 +51,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
>  dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
>  	integratorcp.dtb
>  dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
> -dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
> +dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
> +	kirkwood-dns320.dtb \
>  	kirkwood-dns325.dtb \
>  	kirkwood-dockstar.dtb \
>  	kirkwood-dreamplug.dtb \
> diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> new file mode 100644
> index 0000000..93024b7
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> @@ -0,0 +1,89 @@
> +/dts-v1/;
> +
> +/include/ "kirkwood.dtsi"
> +/include/ "kirkwood-6281.dtsi"
> +
> +/ {
> +	model = "LaCie CloudBox";
> +	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";

Is there a more specific string we can add here?  eg
"lacie,cloudbox-MODEL", "lacie,cloudbox", ...

> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x00000000 0x10000000>;
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200n8";
> +	};
> +
> +	ocp@f1000000 {
> +		pinctrl: pinctrl@10000 {
> +			pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0
> +					&pmx_cloudbox_sata0 >;
> +			pinctrl-names = "default";
> +
> +			pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
> +				marvell,pins = "mpp15";
> +				marvell,function = "sata0";
> +			};
> +		};
> +
> +		serial@12000 {
> +			clock-frequency = <166666667>;
> +			status = "okay";
> +		};
> +
> +		sata@80000 {
> +			status = "okay";
> +			nr-ports = <1>;
> +		};
> +
> +		spi@10600 {
> +			status = "okay";
> +
> +			flash@0 {
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				compatible = "mx25l4005a";
> +				reg = <0>;
> +				spi-max-frequency = <20000000>;
> +				mode = <0>;
> +
> +				partition@0 {
> +					reg = <0x0 0x80000>;
> +					label = "u-boot";
> +				};

Is there a u-boot environment block we should add here?  Would be nice
to be able to edit it from userspace.

> +			};
> +		};
> +	};
> +
> +	gpio_keys {
> +		compatible = "gpio-keys";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		button@1 {
> +			label = "Power push button";
> +			linux,code = <116>;
> +			gpios = <&gpio0 16 1>;
> +		};
> +	};
> +
> +	gpio-leds {
> +		compatible = "gpio-leds";
> +
> +		red-fail {
> +			label = "cloudbox:red:fail";
> +			gpios = <&gpio0 14 0>;
> +		};
> +		blue-sata {
> +			label = "cloudbox:blue:sata";
> +			gpios = <&gpio0 15 0>;
> +		};
> +	};
> +
> +	gpio_poweroff {
> +		compatible = "gpio-poweroff";
> +		gpios = <&gpio0 17 0>;
> +	};
> +};
> diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
> index 13482ea..94aff34 100644
> --- a/arch/arm/configs/kirkwood_defconfig
> +++ b/arch/arm/configs/kirkwood_defconfig
> @@ -35,6 +35,7 @@ CONFIG_MACH_NETSPACE_LITE_V2_DT=y
>  CONFIG_MACH_NETSPACE_MINI_V2_DT=y
>  CONFIG_MACH_OPENBLOCKS_A6_DT=y
>  CONFIG_MACH_TOPKICK_DT=y
> +CONFIG_MACH_CLOUDBOX_DT=y

Thanks for adding this.

>  CONFIG_MACH_TS219=y
>  CONFIG_MACH_TS41X=y
>  CONFIG_MACH_DOCKSTAR=y
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index 7b6a64b..c6ffbce 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -201,6 +201,13 @@ config MACH_TOPKICK_DT
>  	  Say 'Y' here if you want your kernel to support the
>  	  USI Topkick, using Flattened Device Tree
>  
> +config MACH_CLOUDBOX_DT
> +	bool "LaCie CloudBox NAS (Flattened Device Tree)"
> +	select ARCH_KIRKWOOD_DT
> +	help
> +	  Say 'Y' here if you want your kernel to support the LaCie
> +	  CloudBox NAS, using Flattened Device Tree.
> +

Could you please add this block alphabetically among the MACH_.*_DT
entries?  It reduces the number of merge conflicts for us.

>  config MACH_TS219
>  	bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
>  	help
> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> index 4cc4bee..c1b81d3 100644
> --- a/arch/arm/mach-kirkwood/Makefile
> +++ b/arch/arm/mach-kirkwood/Makefile
> @@ -40,3 +40,4 @@ obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT)	+= board-ns2.o
>  obj-$(CONFIG_MACH_NSA310_DT)		+= board-nsa310.o
>  obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)	+= board-openblocks_a6.o
>  obj-$(CONFIG_MACH_TOPKICK_DT)		+= board-usi_topkick.o
> +obj-$(CONFIG_MACH_CLOUDBOX_DT)		+= board-ns2.o
> diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> index d367aa6..fdaac4e 100644
> --- a/arch/arm/mach-kirkwood/board-dt.c
> +++ b/arch/arm/mach-kirkwood/board-dt.c
> @@ -143,7 +143,8 @@ static void __init kirkwood_dt_init(void)
>  	    of_machine_is_compatible("lacie,netspace_v2") ||
>  	    of_machine_is_compatible("lacie,netspace_max_v2") ||
>  	    of_machine_is_compatible("lacie,netspace_lite_v2") ||
> -	    of_machine_is_compatible("lacie,netspace_mini_v2"))
> +	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
> +	    of_machine_is_compatible("lacie,cloudbox"))

alphabetical here, too (I know, it's not perfect right now :) )

>  		ns2_init();
>  
>  	if (of_machine_is_compatible("mpl,cec4"))
> @@ -180,6 +181,7 @@ static const char * const kirkwood_dt_board_compat[] = {
>  	"plathome,openblocks-a6",
>  	"usi,topkick",
>  	"zyxel,nsa310",
> +	"lacie,cloudbox",

alpha...

thx,

Jason.

>  	NULL
>  };
>  
> diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
> index f2ea3b7..5be000d 100644
> --- a/arch/arm/mach-kirkwood/board-ns2.c
> +++ b/arch/arm/mach-kirkwood/board-ns2.c
> @@ -28,7 +28,8 @@ void __init ns2_init(void)
>  	 * Basic setup. Needs to be called early.
>  	 */
>  	if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
> -	    of_machine_is_compatible("lacie,netspace_mini_v2"))
> +	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
> +	    of_machine_is_compatible("lacie,cloudbox"))
>  		ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
>  	kirkwood_ge00_init(&ns2_ge00_data);
>  }
> diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
> index 5ed7056..2b6d16a 100644
> --- a/arch/arm/mach-kirkwood/common.h
> +++ b/arch/arm/mach-kirkwood/common.h
> @@ -147,6 +147,12 @@ void usi_topkick_init(void);
>  static inline void usi_topkick_init(void) {};
>  #endif
>  
> +#ifdef CONFIG_MACH_CLOUDBOX_DT
> +void cloudbox_init(void);
> +#else
> +static inline void cloudbox_init(void) {};
> +#endif
> +
>  /* early init functions not converted to fdt yet */
>  char *kirkwood_id(void);
>  void kirkwood_l2_init(void);
> -- 
> 1.7.10.4
>
Andrew Lunn March 29, 2013, 5:09 p.m. UTC | #2
On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> is a low cost NAS based on the Network Space v2.
> 
> Chipset list:
> - CPU MARVELL 88F6702 1Ghz
> - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> - SPI flash, NOR 512KB
> - 1 push button
> - 2 LEDs (red and blue)
> 
> Note that there is no EEPROM and no USB ports embedded.
> 
> Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> ---
>  arch/arm/boot/dts/Makefile              |    3 +-
>  arch/arm/boot/dts/kirkwood-cloudbox.dts |   89 +++++++++++++++++++++++++++++++
>  arch/arm/configs/kirkwood_defconfig     |    1 +
>  arch/arm/mach-kirkwood/Kconfig          |    7 +++
>  arch/arm/mach-kirkwood/Makefile         |    1 +
>  arch/arm/mach-kirkwood/board-dt.c       |    4 +-
>  arch/arm/mach-kirkwood/board-ns2.c      |    3 +-
>  arch/arm/mach-kirkwood/common.h         |    6 +++
>  8 files changed, 111 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/boot/dts/kirkwood-cloudbox.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 9c62558..8b535ad 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -51,7 +51,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
>  dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
>  	integratorcp.dtb
>  dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
> -dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
> +dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
> +	kirkwood-dns320.dtb \
>  	kirkwood-dns325.dtb \
>  	kirkwood-dockstar.dtb \
>  	kirkwood-dreamplug.dtb \
> diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> new file mode 100644
> index 0000000..93024b7
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> @@ -0,0 +1,89 @@
> +/dts-v1/;
> +
> +/include/ "kirkwood.dtsi"
> +/include/ "kirkwood-6281.dtsi"
> +
> +/ {
> +	model = "LaCie CloudBox";
> +	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x00000000 0x10000000>;
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200n8";
> +	};
> +
> +	ocp@f1000000 {
> +		pinctrl: pinctrl@10000 {
> +			pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0

Hi Simon

Is I2C used? You have pinctrl, but no nodes defined in DT.

> +					&pmx_cloudbox_sata0 >;
> +			pinctrl-names = "default";
> +
> +			pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
> +				marvell,pins = "mpp15";
> +				marvell,function = "sata0";
> +			};
> +		};
> +
> +		serial@12000 {
> +			clock-frequency = <166666667>;
> +			status = "okay";
> +		};
> +
> +		sata@80000 {
> +			status = "okay";
> +			nr-ports = <1>;
> +		};
> +
> +		spi@10600 {
> +			status = "okay";
> +
> +			flash@0 {
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				compatible = "mx25l4005a";
> +				reg = <0>;
> +				spi-max-frequency = <20000000>;
> +				mode = <0>;
> +
> +				partition@0 {
> +					reg = <0x0 0x80000>;
> +					label = "u-boot";
> +				};
> +			};
> +		};
> +	};
> +
> +	gpio_keys {
> +		compatible = "gpio-keys";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		button@1 {
> +			label = "Power push button";
> +			linux,code = <116>;
> +			gpios = <&gpio0 16 1>;
> +		};
> +	};
> +
> +	gpio-leds {
> +		compatible = "gpio-leds";
> +
> +		red-fail {
> +			label = "cloudbox:red:fail";
> +			gpios = <&gpio0 14 0>;
> +		};
> +		blue-sata {
> +			label = "cloudbox:blue:sata";
> +			gpios = <&gpio0 15 0>;
> +		};
> +	};
> +
> +	gpio_poweroff {
> +		compatible = "gpio-poweroff";
> +		gpios = <&gpio0 17 0>;
> +	};
> +};
> diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
> index 13482ea..94aff34 100644
> --- a/arch/arm/configs/kirkwood_defconfig
> +++ b/arch/arm/configs/kirkwood_defconfig
> @@ -35,6 +35,7 @@ CONFIG_MACH_NETSPACE_LITE_V2_DT=y
>  CONFIG_MACH_NETSPACE_MINI_V2_DT=y
>  CONFIG_MACH_OPENBLOCKS_A6_DT=y
>  CONFIG_MACH_TOPKICK_DT=y
> +CONFIG_MACH_CLOUDBOX_DT=y

Alphabetic order please. Same below for all other additions. Did Jason
already so that? Sorry, i did not read his reply yet.

Otherwise this looks good.

	  Andrew

>  CONFIG_MACH_TS219=y
>  CONFIG_MACH_TS41X=y
>  CONFIG_MACH_DOCKSTAR=y
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index 7b6a64b..c6ffbce 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -201,6 +201,13 @@ config MACH_TOPKICK_DT
>  	  Say 'Y' here if you want your kernel to support the
>  	  USI Topkick, using Flattened Device Tree
>  
> +config MACH_CLOUDBOX_DT
> +	bool "LaCie CloudBox NAS (Flattened Device Tree)"
> +	select ARCH_KIRKWOOD_DT
> +	help
> +	  Say 'Y' here if you want your kernel to support the LaCie
> +	  CloudBox NAS, using Flattened Device Tree.
> +
>  config MACH_TS219
>  	bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
>  	help
> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> index 4cc4bee..c1b81d3 100644
> --- a/arch/arm/mach-kirkwood/Makefile
> +++ b/arch/arm/mach-kirkwood/Makefile
> @@ -40,3 +40,4 @@ obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT)	+= board-ns2.o
>  obj-$(CONFIG_MACH_NSA310_DT)		+= board-nsa310.o
>  obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)	+= board-openblocks_a6.o
>  obj-$(CONFIG_MACH_TOPKICK_DT)		+= board-usi_topkick.o
> +obj-$(CONFIG_MACH_CLOUDBOX_DT)		+= board-ns2.o
> diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> index d367aa6..fdaac4e 100644
> --- a/arch/arm/mach-kirkwood/board-dt.c
> +++ b/arch/arm/mach-kirkwood/board-dt.c
> @@ -143,7 +143,8 @@ static void __init kirkwood_dt_init(void)
>  	    of_machine_is_compatible("lacie,netspace_v2") ||
>  	    of_machine_is_compatible("lacie,netspace_max_v2") ||
>  	    of_machine_is_compatible("lacie,netspace_lite_v2") ||
> -	    of_machine_is_compatible("lacie,netspace_mini_v2"))
> +	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
> +	    of_machine_is_compatible("lacie,cloudbox"))
>  		ns2_init();
>  
>  	if (of_machine_is_compatible("mpl,cec4"))
> @@ -180,6 +181,7 @@ static const char * const kirkwood_dt_board_compat[] = {
>  	"plathome,openblocks-a6",
>  	"usi,topkick",
>  	"zyxel,nsa310",
> +	"lacie,cloudbox",
>  	NULL
>  };
>  
> diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
> index f2ea3b7..5be000d 100644
> --- a/arch/arm/mach-kirkwood/board-ns2.c
> +++ b/arch/arm/mach-kirkwood/board-ns2.c
> @@ -28,7 +28,8 @@ void __init ns2_init(void)
>  	 * Basic setup. Needs to be called early.
>  	 */
>  	if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
> -	    of_machine_is_compatible("lacie,netspace_mini_v2"))
> +	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
> +	    of_machine_is_compatible("lacie,cloudbox"))
>  		ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
>  	kirkwood_ge00_init(&ns2_ge00_data);
>  }
> diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
> index 5ed7056..2b6d16a 100644
> --- a/arch/arm/mach-kirkwood/common.h
> +++ b/arch/arm/mach-kirkwood/common.h
> @@ -147,6 +147,12 @@ void usi_topkick_init(void);
>  static inline void usi_topkick_init(void) {};
>  #endif
>  
> +#ifdef CONFIG_MACH_CLOUDBOX_DT
> +void cloudbox_init(void);
> +#else
> +static inline void cloudbox_init(void) {};
> +#endif
> +
>  /* early init functions not converted to fdt yet */
>  char *kirkwood_id(void);
>  void kirkwood_l2_init(void);
> -- 
> 1.7.10.4
>
Simon Guinot March 29, 2013, 6:41 p.m. UTC | #3
On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote:
> Neat! another new board!

Others are coming :)

> 
> On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> > This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> > is a low cost NAS based on the Network Space v2.
> > 
> > Chipset list:
> > - CPU MARVELL 88F6702 1Ghz
> > - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> > - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> > - SPI flash, NOR 512KB
> > - 1 push button
> > - 2 LEDs (red and blue)
> > 
> > Note that there is no EEPROM and no USB ports embedded.
> > 
> > Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> > ---
> >  arch/arm/boot/dts/Makefile              |    3 +-
> >  arch/arm/boot/dts/kirkwood-cloudbox.dts |   89 +++++++++++++++++++++++++++++++
> >  arch/arm/configs/kirkwood_defconfig     |    1 +
> >  arch/arm/mach-kirkwood/Kconfig          |    7 +++
> >  arch/arm/mach-kirkwood/Makefile         |    1 +
> >  arch/arm/mach-kirkwood/board-dt.c       |    4 +-
> >  arch/arm/mach-kirkwood/board-ns2.c      |    3 +-
> >  arch/arm/mach-kirkwood/common.h         |    6 +++
> >  8 files changed, 111 insertions(+), 3 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/kirkwood-cloudbox.dts
> > 
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 9c62558..8b535ad 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -51,7 +51,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
> >  dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
> >  	integratorcp.dtb
> >  dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
> > -dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
> > +dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
> > +	kirkwood-dns320.dtb \
> >  	kirkwood-dns325.dtb \
> >  	kirkwood-dockstar.dtb \
> >  	kirkwood-dreamplug.dtb \
> > diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> > new file mode 100644
> > index 0000000..93024b7
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> > @@ -0,0 +1,89 @@
> > +/dts-v1/;
> > +
> > +/include/ "kirkwood.dtsi"
> > +/include/ "kirkwood-6281.dtsi"
> > +
> > +/ {
> > +	model = "LaCie CloudBox";
> > +	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> 
> Is there a more specific string we can add here?  eg
> "lacie,cloudbox-MODEL", "lacie,cloudbox", ...

Unfortunately no. CloudBox is a product name which is also used by LaCie
to name the board and the project.

> 
> > +
> > +	memory {
> > +		device_type = "memory";
> > +		reg = <0x00000000 0x10000000>;
> > +	};
> > +
> > +	chosen {
> > +		bootargs = "console=ttyS0,115200n8";
> > +	};
> > +
> > +	ocp@f1000000 {
> > +		pinctrl: pinctrl@10000 {
> > +			pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0
> > +					&pmx_cloudbox_sata0 >;
> > +			pinctrl-names = "default";
> > +
> > +			pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
> > +				marvell,pins = "mpp15";
> > +				marvell,function = "sata0";
> > +			};
> > +		};
> > +
> > +		serial@12000 {
> > +			clock-frequency = <166666667>;
> > +			status = "okay";
> > +		};
> > +
> > +		sata@80000 {
> > +			status = "okay";
> > +			nr-ports = <1>;
> > +		};
> > +
> > +		spi@10600 {
> > +			status = "okay";
> > +
> > +			flash@0 {
> > +				#address-cells = <1>;
> > +				#size-cells = <1>;
> > +				compatible = "mx25l4005a";
> > +				reg = <0>;
> > +				spi-max-frequency = <20000000>;
> > +				mode = <0>;
> > +
> > +				partition@0 {
> > +					reg = <0x0 0x80000>;
> > +					label = "u-boot";
> > +				};
> 
> Is there a u-boot environment block we should add here?  Would be nice
> to be able to edit it from userspace.

The environment position depends from the U-Boot version: mainline or
LaCie stock. I think it is more simple to have a single partition.

Note that this not prevent from editing the environment. One has just to
provide the correct offset for the u-boot tools fw_{printenv/saveenv},
via a configuration file: /etc/fw_env.config.
 
> 
> > +			};
> > +		};
> > +	};
> > +
> > +	gpio_keys {
> > +		compatible = "gpio-keys";
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		button@1 {
> > +			label = "Power push button";
> > +			linux,code = <116>;
> > +			gpios = <&gpio0 16 1>;
> > +		};
> > +	};
> > +
> > +	gpio-leds {
> > +		compatible = "gpio-leds";
> > +
> > +		red-fail {
> > +			label = "cloudbox:red:fail";
> > +			gpios = <&gpio0 14 0>;
> > +		};
> > +		blue-sata {
> > +			label = "cloudbox:blue:sata";
> > +			gpios = <&gpio0 15 0>;
> > +		};
> > +	};
> > +
> > +	gpio_poweroff {
> > +		compatible = "gpio-poweroff";
> > +		gpios = <&gpio0 17 0>;
> > +	};
> > +};
> > diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
> > index 13482ea..94aff34 100644
> > --- a/arch/arm/configs/kirkwood_defconfig
> > +++ b/arch/arm/configs/kirkwood_defconfig
> > @@ -35,6 +35,7 @@ CONFIG_MACH_NETSPACE_LITE_V2_DT=y
> >  CONFIG_MACH_NETSPACE_MINI_V2_DT=y
> >  CONFIG_MACH_OPENBLOCKS_A6_DT=y
> >  CONFIG_MACH_TOPKICK_DT=y
> > +CONFIG_MACH_CLOUDBOX_DT=y
> 
> Thanks for adding this.
> 
> >  CONFIG_MACH_TS219=y
> >  CONFIG_MACH_TS41X=y
> >  CONFIG_MACH_DOCKSTAR=y
> > diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> > index 7b6a64b..c6ffbce 100644
> > --- a/arch/arm/mach-kirkwood/Kconfig
> > +++ b/arch/arm/mach-kirkwood/Kconfig
> > @@ -201,6 +201,13 @@ config MACH_TOPKICK_DT
> >  	  Say 'Y' here if you want your kernel to support the
> >  	  USI Topkick, using Flattened Device Tree
> >  
> > +config MACH_CLOUDBOX_DT
> > +	bool "LaCie CloudBox NAS (Flattened Device Tree)"
> > +	select ARCH_KIRKWOOD_DT
> > +	help
> > +	  Say 'Y' here if you want your kernel to support the LaCie
> > +	  CloudBox NAS, using Flattened Device Tree.
> > +
> 
> Could you please add this block alphabetically among the MACH_.*_DT
> entries?  It reduces the number of merge conflicts for us.

Oh sorry, I missed that.

> 
> >  config MACH_TS219
> >  	bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
> >  	help
> > diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> > index 4cc4bee..c1b81d3 100644
> > --- a/arch/arm/mach-kirkwood/Makefile
> > +++ b/arch/arm/mach-kirkwood/Makefile
> > @@ -40,3 +40,4 @@ obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT)	+= board-ns2.o
> >  obj-$(CONFIG_MACH_NSA310_DT)		+= board-nsa310.o
> >  obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)	+= board-openblocks_a6.o
> >  obj-$(CONFIG_MACH_TOPKICK_DT)		+= board-usi_topkick.o
> > +obj-$(CONFIG_MACH_CLOUDBOX_DT)		+= board-ns2.o
> > diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> > index d367aa6..fdaac4e 100644
> > --- a/arch/arm/mach-kirkwood/board-dt.c
> > +++ b/arch/arm/mach-kirkwood/board-dt.c
> > @@ -143,7 +143,8 @@ static void __init kirkwood_dt_init(void)
> >  	    of_machine_is_compatible("lacie,netspace_v2") ||
> >  	    of_machine_is_compatible("lacie,netspace_max_v2") ||
> >  	    of_machine_is_compatible("lacie,netspace_lite_v2") ||
> > -	    of_machine_is_compatible("lacie,netspace_mini_v2"))
> > +	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
> > +	    of_machine_is_compatible("lacie,cloudbox"))
> 
> alphabetical here, too (I know, it's not perfect right now :) )

No problem.

> 
> >  		ns2_init();
> >  
> >  	if (of_machine_is_compatible("mpl,cec4"))
> > @@ -180,6 +181,7 @@ static const char * const kirkwood_dt_board_compat[] = {
> >  	"plathome,openblocks-a6",
> >  	"usi,topkick",
> >  	"zyxel,nsa310",
> > +	"lacie,cloudbox",
> 
> alpha...

OK again.

Thanks.

Simon
Simon Guinot March 29, 2013, 6:51 p.m. UTC | #4
On Fri, Mar 29, 2013 at 06:09:44PM +0100, Andrew Lunn wrote:
> On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> > This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> > is a low cost NAS based on the Network Space v2.
> > 
> > Chipset list:
> > - CPU MARVELL 88F6702 1Ghz
> > - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> > - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> > - SPI flash, NOR 512KB
> > - 1 push button
> > - 2 LEDs (red and blue)
> > 
> > Note that there is no EEPROM and no USB ports embedded.
> > 
> > Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
> > ---
> >  arch/arm/boot/dts/Makefile              |    3 +-
> >  arch/arm/boot/dts/kirkwood-cloudbox.dts |   89 +++++++++++++++++++++++++++++++
> >  arch/arm/configs/kirkwood_defconfig     |    1 +
> >  arch/arm/mach-kirkwood/Kconfig          |    7 +++
> >  arch/arm/mach-kirkwood/Makefile         |    1 +
> >  arch/arm/mach-kirkwood/board-dt.c       |    4 +-
> >  arch/arm/mach-kirkwood/board-ns2.c      |    3 +-
> >  arch/arm/mach-kirkwood/common.h         |    6 +++
> >  8 files changed, 111 insertions(+), 3 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/kirkwood-cloudbox.dts
> > 
> > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> > index 9c62558..8b535ad 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -51,7 +51,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
> >  dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
> >  	integratorcp.dtb
> >  dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
> > -dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
> > +dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
> > +	kirkwood-dns320.dtb \
> >  	kirkwood-dns325.dtb \
> >  	kirkwood-dockstar.dtb \
> >  	kirkwood-dreamplug.dtb \
> > diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> > new file mode 100644
> > index 0000000..93024b7
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
> > @@ -0,0 +1,89 @@
> > +/dts-v1/;
> > +
> > +/include/ "kirkwood.dtsi"
> > +/include/ "kirkwood-6281.dtsi"
> > +
> > +/ {
> > +	model = "LaCie CloudBox";
> > +	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> > +
> > +	memory {
> > +		device_type = "memory";
> > +		reg = <0x00000000 0x10000000>;
> > +	};
> > +
> > +	chosen {
> > +		bootargs = "console=ttyS0,115200n8";
> > +	};
> > +
> > +	ocp@f1000000 {
> > +		pinctrl: pinctrl@10000 {
> > +			pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0
> 
> Hi Simon
> 
> Is I2C used? You have pinctrl, but no nodes defined in DT.

No you are right. Good catch.

> 
> > +					&pmx_cloudbox_sata0 >;
> > +			pinctrl-names = "default";
> > +
> > +			pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
> > +				marvell,pins = "mpp15";
> > +				marvell,function = "sata0";
> > +			};
> > +		};
> > +
> > +		serial@12000 {
> > +			clock-frequency = <166666667>;
> > +			status = "okay";
> > +		};
> > +
> > +		sata@80000 {
> > +			status = "okay";
> > +			nr-ports = <1>;
> > +		};
> > +
> > +		spi@10600 {
> > +			status = "okay";
> > +
> > +			flash@0 {
> > +				#address-cells = <1>;
> > +				#size-cells = <1>;
> > +				compatible = "mx25l4005a";
> > +				reg = <0>;
> > +				spi-max-frequency = <20000000>;
> > +				mode = <0>;
> > +
> > +				partition@0 {
> > +					reg = <0x0 0x80000>;
> > +					label = "u-boot";
> > +				};
> > +			};
> > +		};
> > +	};
> > +
> > +	gpio_keys {
> > +		compatible = "gpio-keys";
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		button@1 {
> > +			label = "Power push button";
> > +			linux,code = <116>;
> > +			gpios = <&gpio0 16 1>;
> > +		};
> > +	};
> > +
> > +	gpio-leds {
> > +		compatible = "gpio-leds";
> > +
> > +		red-fail {
> > +			label = "cloudbox:red:fail";
> > +			gpios = <&gpio0 14 0>;
> > +		};
> > +		blue-sata {
> > +			label = "cloudbox:blue:sata";
> > +			gpios = <&gpio0 15 0>;
> > +		};
> > +	};
> > +
> > +	gpio_poweroff {
> > +		compatible = "gpio-poweroff";
> > +		gpios = <&gpio0 17 0>;
> > +	};
> > +};
> > diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
> > index 13482ea..94aff34 100644
> > --- a/arch/arm/configs/kirkwood_defconfig
> > +++ b/arch/arm/configs/kirkwood_defconfig
> > @@ -35,6 +35,7 @@ CONFIG_MACH_NETSPACE_LITE_V2_DT=y
> >  CONFIG_MACH_NETSPACE_MINI_V2_DT=y
> >  CONFIG_MACH_OPENBLOCKS_A6_DT=y
> >  CONFIG_MACH_TOPKICK_DT=y
> > +CONFIG_MACH_CLOUDBOX_DT=y
> 
> Alphabetic order please. Same below for all other additions. Did Jason
> already so that? Sorry, i did not read his reply yet.

Indirectly I guess. Jason asked me to move the Kconfig CloudBox entry.
As a side effect, the defconfig entry will move too :)

Thanks for the quick feedbacks.

Simon
Chris Moore March 30, 2013, 6:51 a.m. UTC | #5
Hi Simon et al.

Le 29/03/2013 19:41, Simon Guinot a écrit :
> On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote:
>> Neat! another new board!
> Others are coming :)

That's great, thank you.

>> On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
>>> This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
>>> is a low cost NAS based on the Network Space v2.
>>>
>>> Chipset list:
>>> - CPU MARVELL 88F6702 1Ghz
>>> - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
>>> - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
>>> - SPI flash, NOR 512KB
>>> - 1 push button
>>> - 2 LEDs (red and blue)
>>>
>>> +
>>> +/ {
>>> +	model = "LaCie CloudBox";
>>> +	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
>> Is there a more specific string we can add here?  eg
>> "lacie,cloudbox-MODEL", "lacie,cloudbox", ...
> Unfortunately no. CloudBox is a product name which is also used by LaCie
> to name the board and the project.
>

I think it really is necessary to have a more specific name.
I have two, very different, products corresponding to LaCie CloudBox:
- The first one was a small black one with a 2.5" disk reviewed here: 
http://www.smallnetbuilder.com/cloud/cloud-storage/462-lacie-cloudbox-reviewed
- The later one is a larger white one with a 3.5" disk described here: 
http://www.smallnetbuilder.com/nas/nas-news/31927-lacie-relaunches-its-cloud-connected-nas

IIRC the later one was originally called "CloudBox Family" although 
maybe Family was dropped when it was officially released.

Cheers,
Chris
Jason Cooper March 30, 2013, 3:08 p.m. UTC | #6
On Sat, Mar 30, 2013 at 07:51:53AM +0100, Chris Moore wrote:
> Hi Simon et al.
> 
> Le 29/03/2013 19:41, Simon Guinot a écrit :
> >On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote:
> >>Neat! another new board!
> >Others are coming :)
> 
> That's great, thank you.
> 
> >>On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> >>>This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> >>>is a low cost NAS based on the Network Space v2.
> >>>
> >>>Chipset list:
> >>>- CPU MARVELL 88F6702 1Ghz
> >>>- SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> >>>- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> >>>- SPI flash, NOR 512KB
> >>>- 1 push button
> >>>- 2 LEDs (red and blue)
> >>>
> >>>+
> >>>+/ {
> >>>+	model = "LaCie CloudBox";
> >>>+	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> >>Is there a more specific string we can add here?  eg
> >>"lacie,cloudbox-MODEL", "lacie,cloudbox", ...
> >Unfortunately no. CloudBox is a product name which is also used by LaCie
> >to name the board and the project.
> >
> 
> I think it really is necessary to have a more specific name.
> I have two, very different, products corresponding to LaCie CloudBox:
> - The first one was a small black one with a 2.5" disk reviewed
> here: http://www.smallnetbuilder.com/cloud/cloud-storage/462-lacie-cloudbox-reviewed
> - The later one is a larger white one with a 3.5" disk described
> here: http://www.smallnetbuilder.com/nas/nas-news/31927-lacie-relaunches-its-cloud-connected-nas

In this case, we usually look for a model number on the back and append
that to the compatible string.  There are three model numbers listed
here [1] under specifications, based on capacity.

thx,

Jason.

[1] http://www.lacie.com/products/product.htm?id=10597
Simon Guinot April 1, 2013, 4:33 p.m. UTC | #7
On Sat, Mar 30, 2013 at 07:51:53AM +0100, Chris Moore wrote:
> Hi Simon et al.
> 
> Le 29/03/2013 19:41, Simon Guinot a écrit :
> >On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote:
> >>Neat! another new board!
> >Others are coming :)
> 
> That's great, thank you.

Hi Chris,

It is nice to hear from you :)

> 
> >>On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> >>>This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> >>>is a low cost NAS based on the Network Space v2.
> >>>
> >>>Chipset list:
> >>>- CPU MARVELL 88F6702 1Ghz
> >>>- SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> >>>- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> >>>- SPI flash, NOR 512KB
> >>>- 1 push button
> >>>- 2 LEDs (red and blue)
> >>>
> >>>+
> >>>+/ {
> >>>+	model = "LaCie CloudBox";
> >>>+	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> >>Is there a more specific string we can add here?  eg
> >>"lacie,cloudbox-MODEL", "lacie,cloudbox", ...
> >Unfortunately no. CloudBox is a product name which is also used by LaCie
> >to name the board and the project.
> >
> 
> I think it really is necessary to have a more specific name.
> I have two, very different, products corresponding to LaCie CloudBox:
> - The first one was a small black one with a 2.5" disk reviewed
> here: http://www.smallnetbuilder.com/cloud/cloud-storage/462-lacie-cloudbox-reviewed
> - The later one is a larger white one with a 3.5" disk described
> here: http://www.smallnetbuilder.com/nas/nas-news/31927-lacie-relaunches-its-cloud-connected-nas
> 
> IIRC the later one was originally called "CloudBox Family" although
> maybe Family was dropped when it was officially released.

Indeed, there is two (or rather one and half) released products called
CloudBox.

The old one (the first smallnetbuilder link) has been first called
Network Space v2 mini, then SafeBox and finally released under the name
Cloudbox. Very very few products have been sold. I don't know any owner
and I suspect you got yours from the LaCie beta test program :)

The new CloudBox is a very different product which has been first named
FamilyBox and then released under the CloudBox name. Because the previous
CloudBox was a really confidential product, the marketing guys have
decided to reuse the name. This was a bad idea and despite the warnings
they did that even so.

Now, the fact is that the new CloudBox is a huge-selling LaCie product.
That's why I propose to keep the names just as they are.

Regards,

Simon
Simon Guinot April 1, 2013, 4:44 p.m. UTC | #8
On Sat, Mar 30, 2013 at 11:08:07AM -0400, Jason Cooper wrote:
> On Sat, Mar 30, 2013 at 07:51:53AM +0100, Chris Moore wrote:
> > Hi Simon et al.
> > 
> > Le 29/03/2013 19:41, Simon Guinot a écrit :
> > >On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote:
> > >>Neat! another new board!
> > >Others are coming :)
> > 
> > That's great, thank you.
> > 
> > >>On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> > >>>This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> > >>>is a low cost NAS based on the Network Space v2.
> > >>>
> > >>>Chipset list:
> > >>>- CPU MARVELL 88F6702 1Ghz
> > >>>- SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> > >>>- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> > >>>- SPI flash, NOR 512KB
> > >>>- 1 push button
> > >>>- 2 LEDs (red and blue)
> > >>>
> > >>>+
> > >>>+/ {
> > >>>+	model = "LaCie CloudBox";
> > >>>+	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> > >>Is there a more specific string we can add here?  eg
> > >>"lacie,cloudbox-MODEL", "lacie,cloudbox", ...
> > >Unfortunately no. CloudBox is a product name which is also used by LaCie
> > >to name the board and the project.
> > >
> > 
> > I think it really is necessary to have a more specific name.
> > I have two, very different, products corresponding to LaCie CloudBox:
> > - The first one was a small black one with a 2.5" disk reviewed
> > here: http://www.smallnetbuilder.com/cloud/cloud-storage/462-lacie-cloudbox-reviewed
> > - The later one is a larger white one with a 3.5" disk described
> > here: http://www.smallnetbuilder.com/nas/nas-news/31927-lacie-relaunches-its-cloud-connected-nas
> 
> In this case, we usually look for a model number on the back and append
> that to the compatible string.  There are three model numbers listed
> here [1] under specifications, based on capacity.

Hi Jason,

I don't believe this numbers are related with the board. I will check
but IMHO "lacie,cloudbox" is a correct compatible string.

Thanks,

Simon
Chris Moore April 2, 2013, 4:17 a.m. UTC | #9
Hi Simon,

Le 01/04/2013 18:33, Simon Guinot a écrit :
> On Sat, Mar 30, 2013 at 07:51:53AM +0100, Chris Moore wrote:
>
> Le 29/03/2013 19:41, Simon Guinot a écrit :
>>> On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote
>>>> On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
>>>>> This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
>>>>> is a low cost NAS based on the Network Space v2.
>>>>>
>>>>> Chipset list:
>>>>> - CPU MARVELL 88F6702 1Ghz
>>>>> - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
>>>>> - 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
>>>>> - SPI flash, NOR 512KB
>>>>> - 1 push button
>>>>> - 2 LEDs (red and blue)
>>>>>
>>>>> +
>>>>> +/ {
>>>>> +	model = "LaCie CloudBox";
>>>>> +	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
>>>> Is there a more specific string we can add here?  eg
>>>> "lacie,cloudbox-MODEL", "lacie,cloudbox", ...
>>> Unfortunately no. CloudBox is a product name which is also used by LaCie
>>> to name the board and the project.
>>>
>> I think it really is necessary to have a more specific name.
>> I have two, very different, products corresponding to LaCie CloudBox:
>> - The first one was a small black one with a 2.5" disk reviewed
>> here: http://www.smallnetbuilder.com/cloud/cloud-storage/462-lacie-cloudbox-reviewed
>> - The later one is a larger white one with a 3.5" disk described
>> here: http://www.smallnetbuilder.com/nas/nas-news/31927-lacie-relaunches-its-cloud-connected-nas
>>
>> IIRC the later one was originally called "CloudBox Family" although
>> maybe Family was dropped when it was officially released.
> Indeed, there is two (or rather one and half) released products called
> CloudBox.
>
> The old one (the first smallnetbuilder link) has been first called
> Network Space v2 mini, then SafeBox and finally released under the name
> Cloudbox. Very very few products have been sold. I don't know any owner
> and I suspect you got yours from the LaCie beta test program :)
>

Yes, in fact I was given both by LaCie for beta testing :)
Thank you, LaCie ;-)

> The new CloudBox is a very different product which has been first named
> FamilyBox and then released under the CloudBox name. Because the previous
> CloudBox was a really confidential product, the marketing guys have
> decided to reuse the name. This was a bad idea and despite the warnings
> they did that even so.
>
> Now, the fact is that the new CloudBox is a huge-selling LaCie product.
> That's why I propose to keep the names just as they are.
>

That is surprising: I greatly prefer the old black one, mainly because 
it uploads autonomously with the PC powered off.

Are all the new ones white and all the old ones black?
If so, can't we add white to the name or at least specify in Kconfig 
that it is the white version with a 3.5" disk?

Cheers,
Chris
Simon Guinot April 2, 2013, 11:04 a.m. UTC | #10
On Tue, Apr 02, 2013 at 06:17:10AM +0200, Chris Moore wrote:
> Hi Simon,
> 
> Le 01/04/2013 18:33, Simon Guinot a écrit :
> >On Sat, Mar 30, 2013 at 07:51:53AM +0100, Chris Moore wrote:
> >
> >Le 29/03/2013 19:41, Simon Guinot a écrit :
> >>>On Fri, Mar 29, 2013 at 11:31:32AM -0400, Jason Cooper wrote
> >>>>On Fri, Mar 29, 2013 at 12:06:46PM +0100, Simon Guinot wrote:
> >>>>>This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox
> >>>>>is a low cost NAS based on the Network Space v2.
> >>>>>
> >>>>>Chipset list:
> >>>>>- CPU MARVELL 88F6702 1Ghz
> >>>>>- SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz
> >>>>>- 1 Ethernet Gigabit port (PHY MARVELL 88E1318)
> >>>>>- SPI flash, NOR 512KB
> >>>>>- 1 push button
> >>>>>- 2 LEDs (red and blue)
> >>>>>
> >>>>>+
> >>>>>+/ {
> >>>>>+	model = "LaCie CloudBox";
> >>>>>+	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
> >>>>Is there a more specific string we can add here?  eg
> >>>>"lacie,cloudbox-MODEL", "lacie,cloudbox", ...
> >>>Unfortunately no. CloudBox is a product name which is also used by LaCie
> >>>to name the board and the project.
> >>>
> >>I think it really is necessary to have a more specific name.
> >>I have two, very different, products corresponding to LaCie CloudBox:
> >>- The first one was a small black one with a 2.5" disk reviewed
> >>here: http://www.smallnetbuilder.com/cloud/cloud-storage/462-lacie-cloudbox-reviewed
> >>- The later one is a larger white one with a 3.5" disk described
> >>here: http://www.smallnetbuilder.com/nas/nas-news/31927-lacie-relaunches-its-cloud-connected-nas
> >>
> >>IIRC the later one was originally called "CloudBox Family" although
> >>maybe Family was dropped when it was officially released.
> >Indeed, there is two (or rather one and half) released products called
> >CloudBox.
> >
> >The old one (the first smallnetbuilder link) has been first called
> >Network Space v2 mini, then SafeBox and finally released under the name
> >Cloudbox. Very very few products have been sold. I don't know any owner
> >and I suspect you got yours from the LaCie beta test program :)
> >
> 
> Yes, in fact I was given both by LaCie for beta testing :)
> Thank you, LaCie ;-)
> 
> >The new CloudBox is a very different product which has been first named
> >FamilyBox and then released under the CloudBox name. Because the previous
> >CloudBox was a really confidential product, the marketing guys have
> >decided to reuse the name. This was a bad idea and despite the warnings
> >they did that even so.
> >
> >Now, the fact is that the new CloudBox is a huge-selling LaCie product.
> >That's why I propose to keep the names just as they are.
> >
> 
> That is surprising: I greatly prefer the old black one, mainly
> because it uploads autonomously with the PC powered off.

I suspect the problem was the disk capacity, 200GB only. The product
price was the same as 1|2TB NASes. Despite the fashioned cloud effect,
maybe this was a little bit over expensive...

> 
> Are all the new ones white and all the old ones black?

Arf. I don't think we can trust the color case. Indeed, the old ones
are black but there is still no guarantee that the new ones will stay
white.

> If so, can't we add white to the name or at least specify in Kconfig
> that it is the white version with a 3.5" disk?

Maybe we could append some suffixes with version:
netspace_mini_v2 -> cloudbox_v1
cloudbox         -> cloudbox_v2

But again, I am quite reluctant to do this change. I think this would
be confusing for the users.

Simon
Jason Cooper April 2, 2013, 11:45 a.m. UTC | #11
On Tue, Apr 02, 2013 at 06:17:10AM +0200, Chris Moore wrote:
> Le 01/04/2013 18:33, Simon Guinot a écrit :
...
> >The new CloudBox is a very different product which has been first named
> >FamilyBox and then released under the CloudBox name.

The question really comes down to, are there *any* differences on the
_board_?

If there are hardware differences, we need two dts files and two
compatibility strings.  Preferably appending the baseline model number
to each.  If they unwisely chose the same model number, we should append
'-db' or '-dev-board' to the compatibility string of the first board.

Although, in this case, there is a netspace_mini_v2 already in the
kernel (kirkwood-ns2mini.dts).  Is this the development version you were
speaking of?

> Are all the new ones white and all the old ones black?
> If so, can't we add white to the name or at least specify in Kconfig
> that it is the white version with a 3.5" disk?

No.  Colors don't tell us squat about the hardware differences.  Colors
change at the whim of marketing/management/region/time-of-year.  Model
numbers also aren't perfect, but they're much more reliable for
determining which board you have.

Also, the individual Kconfig board entries are going away.  So I
wouldn't encode anything in there you want kept around for the life of
the board.  A comment in the dts file would be better.

thx,

Jason.
Simon Guinot April 2, 2013, 12:54 p.m. UTC | #12
On Tue, Apr 02, 2013 at 07:45:35AM -0400, Jason Cooper wrote:
> On Tue, Apr 02, 2013 at 06:17:10AM +0200, Chris Moore wrote:
> > Le 01/04/2013 18:33, Simon Guinot a écrit :
> ...
> > >The new CloudBox is a very different product which has been first named
> > >FamilyBox and then released under the CloudBox name.
> 
> The question really comes down to, are there *any* differences on the
> _board_?
> 
> If there are hardware differences, we need two dts files and two
> compatibility strings.  Preferably appending the baseline model number
> to each.  If they unwisely chose the same model number, we should append
> '-db' or '-dev-board' to the compatibility string of the first board.
> 
> Although, in this case, there is a netspace_mini_v2 already in the
> kernel (kirkwood-ns2mini.dts).  Is this the development version you were
> speaking of?

I think that I am not clear in my explanations :)

There is two different LaCie boards. There is no relations between this
boards except their final product name (which is quite silly).

From a LaCie point, there is no board but only product naming. Here are
the different names used by LaCie for this two boards/products:

1: netspace_mini_v2 -> SafeBox -> CloudBox
2: FamilyBox -> CloudBox

"1" is the oldest board.

Under Linux, with my patch we are using the following names:

1: netspace_mini_v2
2: cloudbox

The problem raised by Chris is that the cloudbox name could be
confusing because one could try a "cloudbox" dtb on the board "1". For
my part I don't think it is an issue because "1" is rather confidential
(and it is an euphemism). It would be more confusing for users if the
kernel name for "2" is not cloudbox but cloudbox_{color,number,...} or
even familybox. Moreover netspace_mini_v2 is a correct name for "1".

IMHO, we could let things as they are. Additionally, I could either
extend the Kconfig description and add a some comments in the dts files,
in order to to prevent any misunderstanding...

Let me know if you agree or not.

Thanks.

Simon
Jason Cooper April 2, 2013, 5:24 p.m. UTC | #13
On Tue, Apr 02, 2013 at 02:54:11PM +0200, Simon Guinot wrote:
> On Tue, Apr 02, 2013 at 07:45:35AM -0400, Jason Cooper wrote:
> > On Tue, Apr 02, 2013 at 06:17:10AM +0200, Chris Moore wrote:
> > > Le 01/04/2013 18:33, Simon Guinot a écrit :
> > ...
> > > >The new CloudBox is a very different product which has been first named
> > > >FamilyBox and then released under the CloudBox name.
> > 
> > The question really comes down to, are there *any* differences on the
> > _board_?
> > 
> > If there are hardware differences, we need two dts files and two
> > compatibility strings.  Preferably appending the baseline model number
> > to each.  If they unwisely chose the same model number, we should append
> > '-db' or '-dev-board' to the compatibility string of the first board.
> > 
> > Although, in this case, there is a netspace_mini_v2 already in the
> > kernel (kirkwood-ns2mini.dts).  Is this the development version you were
> > speaking of?
> 
> I think that I am not clear in my explanations :)

Nope, I'm just a little dense this week. ;-)

> There is two different LaCie boards. There is no relations between this
> boards except their final product name (which is quite silly).
> 
> From a LaCie point, there is no board but only product naming. Here are
> the different names used by LaCie for this two boards/products:
> 
> 1: netspace_mini_v2 -> SafeBox -> CloudBox
> 2: FamilyBox -> CloudBox
> 
> "1" is the oldest board.

Got it.

> Under Linux, with my patch we are using the following names:
> 
> 1: netspace_mini_v2
> 2: cloudbox
> 
> The problem raised by Chris is that the cloudbox name could be
> confusing because one could try a "cloudbox" dtb on the board "1". For
> my part I don't think it is an issue because "1" is rather confidential
> (and it is an euphemism). 

Agreed.

> It would be more confusing for users if the kernel name for "2" is not
> cloudbox but cloudbox_{color,number,...} or even familybox. Moreover
> netspace_mini_v2 is a correct name for "1".
> 
> IMHO, we could let things as they are. Additionally, I could either
> extend the Kconfig description and add a some comments in the dts files,
> in order to to prevent any misunderstanding...
> 
> Let me know if you agree or not.

Yes, that makes more sense.  Thanks for clearing it up.  Please add the
clarifying remarks to the dts.

As for the model number for the public board (#2), why can't we append
"-90003xx"?  See [1], Specifications tab.

thx,

Jason.

[1] http://www.lacie.com/us/products/product.htm?id=10597
Chris Moore April 4, 2013, 4:54 a.m. UTC | #14
Hi,

Le 02/04/2013 19:24, Jason Cooper a écrit :
> On Tue, Apr 02, 2013 at 02:54:11PM +0200, Simon Guinot wrote:
>
...

>> There is two different LaCie boards. There is no relations between this
>> boards except their final product name (which is quite silly).
>>
>>  From a LaCie point, there is no board but only product naming. Here are
>> the different names used by LaCie for this two boards/products:
>>
>> 1: netspace_mini_v2 ->  SafeBox ->  CloudBox
>> 2: FamilyBox ->  CloudBox
>>
>> "1" is the oldest board.
> Got it.

I may be thick but I didn't realise that my old black CloudBox was 
already supported under the name netspace_mini_v2 :(
There is no reference to CloudBox anywhere in the kernel; only the 
SafeBox alias (of which I was also unaware) is given in Kconfig.

>> Under Linux, with my patch we are using the following names:
>>
>> 1: netspace_mini_v2
>> 2: cloudbox
>>
>> The problem raised by Chris is that the cloudbox name could be
>> confusing because one could try a "cloudbox" dtb on the board "1". For
>> my part I don't think it is an issue because "1" is rather confidential
>> (and it is an euphemism).
> Agreed.

I wasn't aware that the original CloudBox was so confidential.
I even saw them for sale in my local FNAC (a hi-tech and media shop 
present in most large French shopping centres).

>> It would be more confusing for users if the kernel name for "2" is not
>> cloudbox but cloudbox_{color,number,...} or even familybox. Moreover
>> netspace_mini_v2 is a correct name for "1".
>>
>> IMHO, we could let things as they are. Additionally, I could either
>> extend the Kconfig description and add a some comments in the dts files,
>> in order to to prevent any misunderstanding...
>>
>> Let me know if you agree or not.
> Yes, that makes more sense.  Thanks for clearing it up.  Please add the
> clarifying remarks to the dts.

I agree that it would be confusing to change the netspace_mini_v2 name now.

In view of all the above, please disregard my objection.
Sorry for the noise :(

> As for the model number for the public board (#2), why can't we append
> "-90003xx"?  See [1], Specifications tab.
>
> [1] http://www.lacie.com/us/products/product.htm?id=10597

This seems like a good idea to me but I don't think Simon favoured 
adding a model number.
In any case Simon would know better than me whether this covers the 
models correctly.
What do you think, Simon?

Cheers,
Chris
Simon Guinot April 4, 2013, 8 a.m. UTC | #15
On Thu, Apr 04, 2013 at 06:54:14AM +0200, Chris Moore wrote:
> Hi,
> 
> Le 02/04/2013 19:24, Jason Cooper a écrit :
> >On Tue, Apr 02, 2013 at 02:54:11PM +0200, Simon Guinot wrote:
> >
> ...
> 
> >>There is two different LaCie boards. There is no relations between this
> >>boards except their final product name (which is quite silly).
> >>
> >> From a LaCie point, there is no board but only product naming. Here are
> >>the different names used by LaCie for this two boards/products:
> >>
> >>1: netspace_mini_v2 ->  SafeBox ->  CloudBox
> >>2: FamilyBox ->  CloudBox
> >>
> >>"1" is the oldest board.
> >Got it.
> 
> I may be thick but I didn't realise that my old black CloudBox was
> already supported under the name netspace_mini_v2 :(
> There is no reference to CloudBox anywhere in the kernel; only the
> SafeBox alias (of which I was also unaware) is given in Kconfig.

Yes we will fix that.

> 
> >>Under Linux, with my patch we are using the following names:
> >>
> >>1: netspace_mini_v2
> >>2: cloudbox
> >>
> >>The problem raised by Chris is that the cloudbox name could be
> >>confusing because one could try a "cloudbox" dtb on the board "1". For
> >>my part I don't think it is an issue because "1" is rather confidential
> >>(and it is an euphemism).
> >Agreed.
> 
> I wasn't aware that the original CloudBox was so confidential.
> I even saw them for sale in my local FNAC (a hi-tech and media shop
> present in most large French shopping centres).

Yes they were available but only few of them have been sold. From a
LaCie point this product simply doesn't have existed. That's why the
name have been reused.

> 
> >>It would be more confusing for users if the kernel name for "2" is not
> >>cloudbox but cloudbox_{color,number,...} or even familybox. Moreover
> >>netspace_mini_v2 is a correct name for "1".
> >>
> >>IMHO, we could let things as they are. Additionally, I could either
> >>extend the Kconfig description and add a some comments in the dts files,
> >>in order to to prevent any misunderstanding...
> >>
> >>Let me know if you agree or not.
> >Yes, that makes more sense.  Thanks for clearing it up.  Please add the
> >clarifying remarks to the dts.
> 
> I agree that it would be confusing to change the netspace_mini_v2 name now.
> 
> In view of all the above, please disregard my objection.
> Sorry for the noise :(

No problems, this needs to be clarified.

> 
> >As for the model number for the public board (#2), why can't we append
> >"-90003xx"?  See [1], Specifications tab.
> >
> >[1] http://www.lacie.com/us/products/product.htm?id=10597
> 
> This seems like a good idea to me but I don't think Simon favoured
> adding a model number.
> In any case Simon would know better than me whether this covers the
> models correctly.
> What do you think, Simon?

I am currently working on this numbers. It _could_ work. Apparently the
product ID is encoded in the numbers... as well as the case color and
size. Today I should meet someone with more informations about the model
number format.

Regards,

Simon
Simon Guinot April 4, 2013, 9:34 a.m. UTC | #16
On Thu, Apr 04, 2013 at 10:00:58AM +0200, Simon Guinot wrote:
> On Thu, Apr 04, 2013 at 06:54:14AM +0200, Chris Moore wrote:
> > Hi,
> > 
> > Le 02/04/2013 19:24, Jason Cooper a écrit :
> > >On Tue, Apr 02, 2013 at 02:54:11PM +0200, Simon Guinot wrote:
> > >
> > ...
> > 
> > >>There is two different LaCie boards. There is no relations between this
> > >>boards except their final product name (which is quite silly).
> > >>
> > >> From a LaCie point, there is no board but only product naming. Here are
> > >>the different names used by LaCie for this two boards/products:
> > >>
> > >>1: netspace_mini_v2 ->  SafeBox ->  CloudBox
> > >>2: FamilyBox ->  CloudBox
> > >>
> > >>"1" is the oldest board.
> > >Got it.
> > 
> > I may be thick but I didn't realise that my old black CloudBox was
> > already supported under the name netspace_mini_v2 :(
> > There is no reference to CloudBox anywhere in the kernel; only the
> > SafeBox alias (of which I was also unaware) is given in Kconfig.
> 
> Yes we will fix that.
> 
> > 
> > >>Under Linux, with my patch we are using the following names:
> > >>
> > >>1: netspace_mini_v2
> > >>2: cloudbox
> > >>
> > >>The problem raised by Chris is that the cloudbox name could be
> > >>confusing because one could try a "cloudbox" dtb on the board "1". For
> > >>my part I don't think it is an issue because "1" is rather confidential
> > >>(and it is an euphemism).
> > >Agreed.
> > 
> > I wasn't aware that the original CloudBox was so confidential.
> > I even saw them for sale in my local FNAC (a hi-tech and media shop
> > present in most large French shopping centres).
> 
> Yes they were available but only few of them have been sold. From a
> LaCie point this product simply doesn't have existed. That's why the
> name have been reused.
> 
> > 
> > >>It would be more confusing for users if the kernel name for "2" is not
> > >>cloudbox but cloudbox_{color,number,...} or even familybox. Moreover
> > >>netspace_mini_v2 is a correct name for "1".
> > >>
> > >>IMHO, we could let things as they are. Additionally, I could either
> > >>extend the Kconfig description and add a some comments in the dts files,
> > >>in order to to prevent any misunderstanding...
> > >>
> > >>Let me know if you agree or not.
> > >Yes, that makes more sense.  Thanks for clearing it up.  Please add the
> > >clarifying remarks to the dts.
> > 
> > I agree that it would be confusing to change the netspace_mini_v2 name now.
> > 
> > In view of all the above, please disregard my objection.
> > Sorry for the noise :(
> 
> No problems, this needs to be clarified.
> 
> > 
> > >As for the model number for the public board (#2), why can't we append
> > >"-90003xx"?  See [1], Specifications tab.
> > >
> > >[1] http://www.lacie.com/us/products/product.htm?id=10597
> > 
> > This seems like a good idea to me but I don't think Simon favoured
> > adding a model number.
> > In any case Simon would know better than me whether this covers the
> > models correctly.
> > What do you think, Simon?
> 
> I am currently working on this numbers. It _could_ work. Apparently the
> product ID is encoded in the numbers... as well as the case color and
> size. Today I should meet someone with more informations about the model
> number format.

Finally, the model number pattern "-90003xx" can't be used to match the
CloudBox product. The number is indeed unique. It encodes product ID,
storage capacity, case color and case size. But the pattern is not
usable. If tomorrow a red CloudBox is released, the first digits could
be completely different.

To illustrate that, have a look at:
http://www.lacie.com/products/product.htm?id=10584.

The item numbers are 2000345, 9000225 and 9000226.

Then we are back to the initial problem...

Maybe we could append some suffixes based on the version:

1: cloudbox-v1
2: cloudbox-v2

Or better, suffix based on the other code names:

1: cloudbox-ns2mini
2: cloudbox-familybox

Or even let the things as they are:

1: netspace_v2_mini
2: cloudbox

I agree with all this possibilities (and maybe others). Let me know your
preferences.

Simon
Jason Cooper April 5, 2013, 1:11 a.m. UTC | #17
On Thu, Apr 04, 2013 at 11:34:35AM +0200, Simon Guinot wrote:
> On Thu, Apr 04, 2013 at 10:00:58AM +0200, Simon Guinot wrote:
> > On Thu, Apr 04, 2013 at 06:54:14AM +0200, Chris Moore wrote:
> > > Le 02/04/2013 19:24, Jason Cooper a écrit :
> > > >On Tue, Apr 02, 2013 at 02:54:11PM +0200, Simon Guinot wrote:
...
> > > >As for the model number for the public board (#2), why can't we append
> > > >"-90003xx"?  See [1], Specifications tab.
> > > >
> > > >[1] http://www.lacie.com/us/products/product.htm?id=10597
> > > 
> > > This seems like a good idea to me but I don't think Simon favoured
> > > adding a model number.
> > > In any case Simon would know better than me whether this covers the
> > > models correctly.
> > > What do you think, Simon?
> > 
> > I am currently working on this numbers. It _could_ work. Apparently the
> > product ID is encoded in the numbers... as well as the case color and
> > size. Today I should meet someone with more informations about the model
> > number format.
> 
> Finally, the model number pattern "-90003xx" can't be used to match the
> CloudBox product. The number is indeed unique. It encodes product ID,
> storage capacity, case color and case size. But the pattern is not
> usable. If tomorrow a red CloudBox is released, the first digits could
> be completely different.
> 
> To illustrate that, have a look at:
> http://www.lacie.com/products/product.htm?id=10584.
> 
> The item numbers are 2000345, 9000225 and 9000226.

Thank for digging into this.

> Then we are back to the initial problem...
> 
> Maybe we could append some suffixes based on the version:
> 
> 1: cloudbox-v1
> 2: cloudbox-v2
> 
> Or better, suffix based on the other code names:
> 
> 1: cloudbox-ns2mini
> 2: cloudbox-familybox
> 
> Or even let the things as they are:
> 
> 1: netspace_v2_mini
> 2: cloudbox

In light of the above info, let's got with the third option.  If we
discover a different LaCie Cloudbox board down the road, we can add an
appropriately more specific compatible string to differentiate.  As you
can tell, I'd prefer to have something more specific in the original
commit, but we can only work with what we're given. :(

thx,

Jason.
Chris Moore April 5, 2013, 5:14 a.m. UTC | #18
Le 05/04/2013 03:11, Jason Cooper a écrit :
> On Thu, Apr 04, 2013 at 11:34:35AM +0200, Simon Guinot wrote:
>>
...

>> Then we are back to the initial problem...
>>
>> Maybe we could append some suffixes based on the version:
>>
>> 1: cloudbox-v1
>> 2: cloudbox-v2
>>
>> Or better, suffix based on the other code names:
>>
>> 1: cloudbox-ns2mini
>> 2: cloudbox-familybox
>>
>> Or even let the things as they are:
>>
>> 1: netspace_v2_mini
>> 2: cloudbox
> In light of the above info, let's got with the third option.  If we
> discover a different LaCie Cloudbox board down the road, we can add an
> appropriately more specific compatible string to differentiate.  As you
> can tell, I'd prefer to have something more specific in the original
> commit, but we can only work with what we're given. :(
>

This is now OK with me.
However I would like to have a more precise description somewhere; 
probably either in the Kconfig or, if this is obsolescent, in whatever 
replaces it.
I think that someone grepping the kernel sources for the commercial name 
"CloudBox" should find both versions and be able to decide which one he has.

Cheers,
Chris
Jason Cooper April 8, 2013, 5 p.m. UTC | #19
On Fri, Apr 05, 2013 at 07:14:17AM +0200, Chris Moore wrote:
> Le 05/04/2013 03:11, Jason Cooper a écrit :
> >On Thu, Apr 04, 2013 at 11:34:35AM +0200, Simon Guinot wrote:
> >>
> ...
> 
> >>Then we are back to the initial problem...
> >>
> >>Maybe we could append some suffixes based on the version:
> >>
> >>1: cloudbox-v1
> >>2: cloudbox-v2
> >>
> >>Or better, suffix based on the other code names:
> >>
> >>1: cloudbox-ns2mini
> >>2: cloudbox-familybox
> >>
> >>Or even let the things as they are:
> >>
> >>1: netspace_v2_mini
> >>2: cloudbox
> >In light of the above info, let's got with the third option.  If we
> >discover a different LaCie Cloudbox board down the road, we can add an
> >appropriately more specific compatible string to differentiate.  As you
> >can tell, I'd prefer to have something more specific in the original
> >commit, but we can only work with what we're given. :(
> >
> 
> This is now OK with me.
> However I would like to have a more precise description somewhere;
> probably either in the Kconfig or, if this is obsolescent, in
> whatever replaces it.
> I think that someone grepping the kernel sources for the commercial
> name "CloudBox" should find both versions and be able to decide
> which one he has.

A one line comment in netspace_v2_mini dts file should suffice.

thx,

Jason.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 9c62558..8b535ad 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -51,7 +51,8 @@  dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
 dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
 	integratorcp.dtb
 dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
-dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
+dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
+	kirkwood-dns320.dtb \
 	kirkwood-dns325.dtb \
 	kirkwood-dockstar.dtb \
 	kirkwood-dreamplug.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
new file mode 100644
index 0000000..93024b7
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
@@ -0,0 +1,89 @@ 
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
+
+/ {
+	model = "LaCie CloudBox";
+	compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8";
+	};
+
+	ocp@f1000000 {
+		pinctrl: pinctrl@10000 {
+			pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0
+					&pmx_cloudbox_sata0 >;
+			pinctrl-names = "default";
+
+			pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
+				marvell,pins = "mpp15";
+				marvell,function = "sata0";
+			};
+		};
+
+		serial@12000 {
+			clock-frequency = <166666667>;
+			status = "okay";
+		};
+
+		sata@80000 {
+			status = "okay";
+			nr-ports = <1>;
+		};
+
+		spi@10600 {
+			status = "okay";
+
+			flash@0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l4005a";
+				reg = <0>;
+				spi-max-frequency = <20000000>;
+				mode = <0>;
+
+				partition@0 {
+					reg = <0x0 0x80000>;
+					label = "u-boot";
+				};
+			};
+		};
+	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		button@1 {
+			label = "Power push button";
+			linux,code = <116>;
+			gpios = <&gpio0 16 1>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		red-fail {
+			label = "cloudbox:red:fail";
+			gpios = <&gpio0 14 0>;
+		};
+		blue-sata {
+			label = "cloudbox:blue:sata";
+			gpios = <&gpio0 15 0>;
+		};
+	};
+
+	gpio_poweroff {
+		compatible = "gpio-poweroff";
+		gpios = <&gpio0 17 0>;
+	};
+};
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 13482ea..94aff34 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -35,6 +35,7 @@  CONFIG_MACH_NETSPACE_LITE_V2_DT=y
 CONFIG_MACH_NETSPACE_MINI_V2_DT=y
 CONFIG_MACH_OPENBLOCKS_A6_DT=y
 CONFIG_MACH_TOPKICK_DT=y
+CONFIG_MACH_CLOUDBOX_DT=y
 CONFIG_MACH_TS219=y
 CONFIG_MACH_TS41X=y
 CONFIG_MACH_DOCKSTAR=y
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 7b6a64b..c6ffbce 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -201,6 +201,13 @@  config MACH_TOPKICK_DT
 	  Say 'Y' here if you want your kernel to support the
 	  USI Topkick, using Flattened Device Tree
 
+config MACH_CLOUDBOX_DT
+	bool "LaCie CloudBox NAS (Flattened Device Tree)"
+	select ARCH_KIRKWOOD_DT
+	help
+	  Say 'Y' here if you want your kernel to support the LaCie
+	  CloudBox NAS, using Flattened Device Tree.
+
 config MACH_TS219
 	bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
 	help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 4cc4bee..c1b81d3 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -40,3 +40,4 @@  obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT)	+= board-ns2.o
 obj-$(CONFIG_MACH_NSA310_DT)		+= board-nsa310.o
 obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)	+= board-openblocks_a6.o
 obj-$(CONFIG_MACH_TOPKICK_DT)		+= board-usi_topkick.o
+obj-$(CONFIG_MACH_CLOUDBOX_DT)		+= board-ns2.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index d367aa6..fdaac4e 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -143,7 +143,8 @@  static void __init kirkwood_dt_init(void)
 	    of_machine_is_compatible("lacie,netspace_v2") ||
 	    of_machine_is_compatible("lacie,netspace_max_v2") ||
 	    of_machine_is_compatible("lacie,netspace_lite_v2") ||
-	    of_machine_is_compatible("lacie,netspace_mini_v2"))
+	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
+	    of_machine_is_compatible("lacie,cloudbox"))
 		ns2_init();
 
 	if (of_machine_is_compatible("mpl,cec4"))
@@ -180,6 +181,7 @@  static const char * const kirkwood_dt_board_compat[] = {
 	"plathome,openblocks-a6",
 	"usi,topkick",
 	"zyxel,nsa310",
+	"lacie,cloudbox",
 	NULL
 };
 
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
index f2ea3b7..5be000d 100644
--- a/arch/arm/mach-kirkwood/board-ns2.c
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -28,7 +28,8 @@  void __init ns2_init(void)
 	 * Basic setup. Needs to be called early.
 	 */
 	if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
-	    of_machine_is_compatible("lacie,netspace_mini_v2"))
+	    of_machine_is_compatible("lacie,netspace_mini_v2") ||
+	    of_machine_is_compatible("lacie,cloudbox"))
 		ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
 	kirkwood_ge00_init(&ns2_ge00_data);
 }
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 5ed7056..2b6d16a 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -147,6 +147,12 @@  void usi_topkick_init(void);
 static inline void usi_topkick_init(void) {};
 #endif
 
+#ifdef CONFIG_MACH_CLOUDBOX_DT
+void cloudbox_init(void);
+#else
+static inline void cloudbox_init(void) {};
+#endif
+
 /* early init functions not converted to fdt yet */
 char *kirkwood_id(void);
 void kirkwood_l2_init(void);