Commit Graph

34 Commits

Author SHA1 Message Date
Nobuhiro Iwamatsu f17073a3ae ARM: kirkwood: Add Plat'Home OpenBlocks A6 support
Add support for Plat'Home OpenBlocks A6 using the device tree
where possible.
This commit supports SATA, USB, ether and serial console.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-22 07:01:51 +00:00
Stefan Peter 5492a1108b ARM: kirkwood: Add support for the MPL CEC4
Signed-off-by: Stefan Peter <s.peter@mpl.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-21 21:00:23 +00:00
Tero Jaasko afcad88425 arm: kirkwood: add support for ZyXEL NSA310
Hello, Andrew

> > +#define NSA310_GPIO_LED_ESATA_GREEN	12
> > <..>
> > +#define NSA310_GPIO_POWER_OFF		48
>
> It looks like most of these are not used. Please remove them.

True. Fixed.

> > +static struct mtd_partition nsa310_mtd_parts[] = {
> > +	{
> > +		.name	= "uboot",
> > +		.offset	= 0,
> > +		.size	= 0x100000,
> > +		.mask_flags = MTD_WRITEABLE,
> > +	}, {
> > <..>
> You should be able to put all that into DT. Take a look at

Correct. I did the conversion and tested that the partitions
can be read with dd and produce exactly the same data before and
after conversion. So, the partition offsets at least should be fine.

> > +static struct i2c_board_info __initdata nsa310_i2c_info[] = {
> > +	{ I2C_BOARD_INFO("adt7476", 0x2e) },
> > +};
>
> You can also do this in DT as well. kirkwood-ts219.dtsi has
>
>                 i2c@11000 {
>                         status = "okay";
>                         clock-frequency = <400000>;

Ok, I did convert the i2c definition to use the devicetree.
The adt7476 device itself is not at reach of device tree,
AFAIK and requires more work at there?

Thanks for your valuable comments. Following is a new patch that
should address the problems and mistakes you pointed and also
some of the pointed by Jason Cooper. The nand and i2c are now
defined at DT and I also removed the pointless defines and
ARM_APPENDED_DTB. It is based against the Linus' official
3.6 version.

Best regards,
Tero

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-21 20:59:30 +00:00
Jason Cooper 767fc1ea92 ARM: Kirkwood: new board USI Topkick
This is a new kirkwood box made by Universal Scientific Industrial, Inc.
The product description is here:

http://www.usish.com/english/products_topkick1281p2.php

It is very similar to the dreamplug and other plug devices, with the
exception that it has room for a 2.5" SATA HDD internally.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2012-11-21 20:59:22 +00:00
Simon Guinot 7f9871d9d3 ARM: kirkwood: DT board setup for Network Space Mini v2
This patch adds DT board setup for the LaCie NAS Network Space Mini v2
(aka SafeBox). The hardware characteristics are very close to those of
the Network Space Lite v2. The main difference are:
- A GPIO fan which is only available on the NS2 Mini.
- A single USB host port is wired on the NS2 Mini. The NS2 Lite provides
  an additional dual-mode USB port (host/device).

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-21 20:58:49 +00:00
Simon Guinot ca7d94524a ARM: kirkwood: DT board setup for Network Space Lite v2
This patch adds DT board setup for the LaCie NAS Network Space Lite v2.
This board is derived from the Network Space v2 and a lot of hardware
characteristics are shared.

- CPU: Marvell 88F6192 800Mhz
- SDRAM memory: 128MB DDR2 200Mhz
- 1 SATA port: internal
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- i2c EEPROM: 512 bytes (24C04 type)
- 2 USB2 ports: host and host/device
- 1 push button
- 1 SATA LED (bi-color, blue and red)

Note that the SATA LED is not compatible with the driver leds-ns2. The
LED behaviour ("on", "off" or "SATA activity blink") is controlled via
a single MPP (21).

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-21 20:58:43 +00:00
Simon Guinot ecee1e47ab ARM: kirkwood: DT board setup for Network Space v2 and parents
This patch adds DT board setup for LaCie Network Space v2 and parents,
based on the Marvell Kirkwood 6281 SoC. This includes Network Space v2
(Max) and Internet Space v2.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-21 20:58:35 +00:00
Jason Gunthorpe bff0844513 ARM: Kirkwood: Enable the second I2C bus
mv64xxx_of_config requires that the tclk frequency be found
through the clk stuff rather than through device tree, so add
another override for the 2nd controller.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-11-21 20:58:18 +00:00
Jason Gunthorpe 1e9c06fb2b ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2
Move the CACHE_FEROCEON_L2 test to kirkwood_l2_init, since linking
fails on the reference to feroceon_l2_init.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-10-18 17:04:24 +00:00
Olof Johansson d6a93ceb3f Merge branch 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux into late/kirkwood
From Jason Cooper:

New bindings:
  - iconnect nand and keys
  - mv_cesa
  - gpio-fan

* 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux:
  ARM: kirkwood: Use devicetree to define DNS-32[05] fan
  hwmon: Add devicetree bindings to gpio-fan
  Crypto: CESA: Add support for DT based instantiation.
  ARM: Kirkwood: Describe iconnect nand in DT.
  ARM: Kirkwood: Describe iconnect keys in DT.
2012-09-22 13:24:09 -07:00
Andrew Lunn f37fbd36c5 Crypto: CESA: Add support for DT based instantiation.
Based on work by Michael Walle and Jason Cooper.

Added support for getting the interrupt number and address of SRAM
from DT.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>

Conflicts:

	arch/arm/mach-kirkwood/board-dt.c
2012-09-22 14:40:00 +00:00
Valentin Longchamp 0510c8a014 ARM: initial DTS support for km_kirkwood
This is a first attempt to support the km_kirkwood reference design with
a device tree. This km_kirkwood design is present in many Keymile
products. It is based on the Marvell Bobcat SOC which integrates a
Kirkwood CPU next to a big L2 Ethernet Switch. The Kirkwood in the SOC
is very similar to the "normal" one, but there are a few differences.

This initial support is minimal: the kernel can boot with network
(ge0), serial port and NAND functional.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-09-21 17:07:17 +00:00
Sebastian Hesselbarth dd88db78da ARM: kirkwood: DT board setup for Seagate FreeAgent Dockstar
This add a DT compatible board specific setup for the Seagate
FreeAgent Dockstar.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-09-21 15:12:59 +00:00
Alan M Butler 4f48b7fc5a ARM: Kirkwood: Iomega ix2-200 DT support
Add support for the Iomega ix2-200.
Led's and buttons working as of kernel 3.6-rc2

the 3 lines in the network interface do seem to be required as
removing either causes the network card to not be able to reach
the network (at least on my device).

Product page:
http://go.iomega.com/en/products/network-storage-desktop/storcenter-network-storage-solution/network-hard-drive-ix2-200-cloud/?partner=4735#tech_specsItem_tab

Signed-off-by: Alan M Butler <alanbutty12@gmail.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-09-21 15:12:48 +00:00
Andrew Lunn f39c1101dd ARM: Kirkwood: Replace mrvl with marvell
It has been decided to use marvell, not mrvl, in the compatibility
property. Search & replace.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
2012-07-27 16:50:57 +02:00
Michael Walle 4aff38a3db ARM: kirkwood: Add LS-XHL and LS-CHLv2 support
Add support for Buffalo Linkstation LS-XHL and LS-CHLv2 using the device
tree where possible.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
2012-07-27 16:49:10 +02:00
Josh Coombs 5136b2aa62 ARM: Kirkwood: Initial DTS support for Kirkwood GoFlex Net
This patch supplies the necessary DTS and supporting files to boot up
a Seagate GoFlex Net with 3.5.0-rc3.

Signed-off-by: Joshua Coombs <josh.coombs@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
2012-07-27 16:49:01 +02:00
Andrew Lunn 9eb61f4736 ARM: Kirkwood: Add basic device tree support for QNAP TS219.
The two different variants of QNAP TS devices, varying by SoC, put the
GPIO keys on different GPIO lines. Hence we need two different DT
board descriptions, which share the same board-ts219.c file.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
2012-07-27 16:48:52 +02:00
Andrew Lunn 97b414e119 ATA: sata_mv: Add device tree support
Add support for instantiating this driver from device tree, and add
the necassary DT information to the kirkwood.dtsi file.

This is based on previous work by Michael Walle and Jason Cooper.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Josh Coombs <josh.coombs@gmail.com>
2012-07-27 16:48:45 +02:00
Andrew Lunn 1e7bad0f5b ARM: Orion: DTify the watchdog timer.
Add device tree support to the Orion watchdog timer, and enable its
use in the kirkwood devices using device tree.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
Tested-by: Simon Baatz <gmbnomis@gmail.com>
2012-07-27 16:48:38 +02:00
Andrew Lunn e91cac0a77 ARM: Orion: Add arch support needed for I2C via DT.
The MV64XXX I2C driver needs a clock in order to calculate the baud
rate factors. So add an clk to the clk tree. Also add the base DT
properties for kirkwood devices.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Conflicts:
	arch/arm/mach-kirkwood/common.c
2012-07-27 16:48:29 +02:00
Michael Walle 763721205e ARM: kirkwood: use devicetree for orion-spi
Populate the devices with auxdata to set the device names which are used by
clkdev to lookup the clocks.

Signed-off-by: Michael Walle <micheal@walle.cc>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
v2: Add interrupts properties, although not used.
2012-07-27 16:48:22 +02:00
Andrew Lunn 278b45b06b ARM: Orion: DT support for IRQ and GPIO Controllers
Both IRQ and GPIO controllers can now be represented in DT.  The IRQ
controllers are setup first, and then the GPIO controllers. Interrupts
for GPIO lines are placed directly after the main interrupts in the
interrupt space.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Josh Coombs <josh.coombs@gmail.com>
Tested-by: Simon Baatz <gmbnomis@gmail.com>
2012-07-27 16:48:14 +02:00
Linus Torvalds 2795343705 arm-soc: clock driver changes
The new clock subsystem was merged in linux-3.4 without any users, this
 now moves the first three platforms over to it: imx, mxs and spear.
 
 The series also contains the changes for the clock subsystem itself,
 since Mike preferred to have it together with the platforms that require
 these changes, in order to avoid interdependencies and conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuexPAAoJEIwa5zzehBx3YBsP/0nFhXjb5t1PdLfFzGKtcZVB
 j4zXWXMHQ1fA7wIfEpZF3Nnco6MQkufF5wJPoPdn1+wmkzCn3D6IwNVWVtW4U5i9
 VGyShSbgusAAYXUe/9yYj8eN+bbRQSvdN4eWYWU6+rRXShGZ5dZZmp+IPNl54dnW
 6F8uCnHX0cnIMCpGqV+41zZgZ/4wL2k9gdqu0LO6pi07o4tGd0Z4gcySgUFAnn1R
 kofNHueYIP4UgOg8DREoBzVKlpRqMou3S2kSZUfMeb3Q9ryF7UIvaGqIILyi7PKL
 kWd3nptg0EPavfL21SwXHiGpnDpB/Gj/F70kcPLus5RYujB24C9bvBmc26z68NZx
 Sz9mbElkkIU5duZsl1nxBWJ8IZ/tSWdtmC2xQMznmV7gHyGgVwr4j47f4Uv5sBvM
 14JHDO7mqN6E6FnTFZu/oPAN5pDjgL+TVNK5BU6Wkq0zitrA6eyKDqCvBCqkO6Nn
 tNzOuyRDzMOwM7HzqXhxqtzJWXylO1Mldc4bM8X4Cocf4pnLna/X6uP6dgE6A+JY
 azVYx4I/0NdEPerDTzIcEhBDgZeBVROhUQr+kHxc4rf6WzUUbu/wEo1UKXWV66oW
 1jb1yAFFWqYjkQuQc2PD4JSx35sFJaoSaoneRtmzBzRDfzSr5KjKj1E0e1skyMFq
 7ZVLCqZD0cB9DhmMDkWP
 =rwFF
 -----END PGP SIGNATURE-----

Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc clock driver changes from Olof Johansson:
 "The new clock subsystem was merged in linux-3.4 without any users,
  this now moves the first three platforms over to it: imx, mxs and
  spear.

  The series also contains the changes for the clock subsystem itself,
  since Mike preferred to have it together with the platforms that
  require these changes, in order to avoid interdependencies and
  conflicts."

Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
removed in one branch, added OF support in another) and
drivers/dma/imx-sdma.c (independent changes next to each other).

* tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  SPEAr: Update defconfigs
  SPEAr: Add SMI NOR partition info in dts files
  SPEAr: Switch to common clock framework
  SPEAr: Call clk_prepare() before calling clk_enable
  SPEAr: clk: Add General Purpose Timer Synthesizer clock
  SPEAr: clk: Add Fractional Synthesizer clock
  SPEAr: clk: Add Auxiliary Synthesizer clock
  SPEAr: clk: Add VCO-PLL Synthesizer clock
  SPEAr: Add DT bindings for SPEAr's timer
  ARM i.MX: remove now unused clock files
  ARM: i.MX6: implement clocks using common clock framework
  ARM i.MX35: implement clocks using common clock framework
  ARM i.MX5: implement clocks using common clock framework
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ...
2012-05-26 12:42:29 -07:00
Simon Baatz f552036353 ARM: kirkwood: Add support for RaidSonic IB-NAS6210/6220 using devicetree
Add support for the IB-NAS6210 and IB-NAS 6220. Describe as much as
currently possible in the devicetree files, including the NAND partitions.
Use the partition scheme of the original firmware by default.

Create a board-ib62x0.c for everything else.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-15 03:18:49 +00:00
Arnaud Patard (Rtp) c06cd9bfca kirkwood: Add iconnect support
Add support for Iomega Iconnect system.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Tested-By: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-15 03:12:27 +00:00
Jamie Lentin 9007d10073 ARM: kirkwood: Basic support for DNS-320 and DNS-325
Add support for the DNS-320 and DNS-325. Describe as much as currently possible
in the devicetree files, create a board-dnskw.c for everything else.

Changes since last submission (V3) [Addressing comments by]:-

* One MACH_DLINK_KIRKWOOD_DT for all dtb files [Grant Likely, Jason Cooper]
* Drop brain-dead select "select CONFIG_MTD_OF_PARTS" [Grant Likely]
* Don't add NAND support then throw it away immediately after [Grant Likely]
* Describe purpose of MPP 41, 42 & 49

Changes since last submission (V2):-

* Use IEEE-compliant "okay", rather than "ok" [Scott Wood]

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-15 02:28:01 +00:00
Andrew Lunn 2f129bf4aa ARM: Orion: Add clocks using the generic clk infrastructure.
Add tclk as a fixed rate clock for all platforms. In addition, on
kirkwood, add a gated clock for most of the clocks which can be gated.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Jamie Lentin <jm@lentin.co.uk>
[mturquette@linaro.org: removed redundant CLKDEV_LOOKUP from Kconfig]
[mturquette@linaro.org: removed redundant clk.h from mach-dove/common.c]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-05-08 16:33:39 -07:00
Ian Campbell a7ac56de83 ARM: kirkwood: add missing kexec.h include
Fixes the following build error when CONFIG_KEXEC is enabled:
  CC      arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function)
arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
[v4, rebase onto recent Linus for repost]
[v3, speak actual English in the commit message, thanks Sergei Shtylyov]
[v2, using linux/kexec.h not asm/kexec.h]
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-08 18:43:25 +00:00
Jason Cooper e871b87a1e ARM: kirkwood: use devicetree for rtc-mv
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-03-16 04:28:43 +00:00
Jason Cooper 6fa6b8781f ARM: kirkwood: fdt: facilitate new boards during fdt migration
Move all dreamplug-specific code out of board-dt.c and into
board-dreamplug.c.  This way new boards that are added during the
conversion to fdt don't clutter up board-dt.c.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-03-16 04:28:42 +00:00
Jason Cooper 2b45e05f51 ARM: kirkwood: fdt: absorb kirkwood_init()
We need to absorb kirkwood_init() into kirkwood_dt_init() so that as we
convert drivers, we can remove the platform call, eg
kirkwood_rtc_init().  This maintains compatibility with non-fdt
configurations because they still call kirkwood_init() in common.c.

As drivers are converted, we will reinstate the 'static' qualifier in
common.c.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-03-16 04:28:41 +00:00
Jason Cooper 759a45185a ARM: kirkwood: convert uart0 to devicetree.
This uart is the primary console for the dreamplug.  Removed
kirkwood_uart0_init() call from board-dt.c.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-02-27 16:21:44 +00:00
Jason Cooper 3d468b6d60 ARM: kirkwood: add dreamplug (fdt) support.
Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g.
Then, switched to SPI based NOR flash.

After talking to Arnd Bergman, chose an incremental approach to adding
devicetree support.  First, we use the dtb to tell us we are on the
dreamplug, then we gradually port over drivers.

Driver porting will start with the uart (see next patch), and progress
from there.  Possibly, spi/flash/partitions will be next.

When done, board-dt.c will no longer be dreamplug specific, and dt's can
be made for the other kirkwood boards.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-02-27 16:21:40 +00:00