Commit graph

53 commits

Author SHA1 Message Date
Gregory CLEMENT
b6dda00cdd ARM: mvebu: use the virtual CPU registers to access coherency registers
The Armada XP provides a mechanism called "virtual CPU registers" or
"per-CPU register banking", to access the per-CPU registers of the
current CPU, without having to worry about finding on which CPU we're
running. CPU0 has its registers at 0x21800, CPU1 at 0x21900, CPU2 at
0x21A00 and CPU3 at 0x21B00. The virtual registers accessing the
current CPU registers are at 0x21000.

However, in the Device Tree node that provides the register addresses
for the coherency unit (which is responsible for ensuring coherency
between processors, and I/O coherency between processors and the
DMA-capable devices), a mistake was made: the CPU0-specific registers
were specified instead of the virtual CPU registers. This means that
the coherency barrier needed for I/O coherency was not behaving
properly when executed from a CPU different from CPU0. This patch
fixes that by using the virtual CPU registers.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.8+
Fixes: e60304f8cb "arm: mvebu: Add hardware I/O Coherency support"
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-11-25 18:22:10 +00:00
Ezequiel Garcia
f039dfb51b ARM: mvebu: Add the core-divider clock to Armada 370/XP
The Armada 370/XP SoC has a clock provider called "Core Divider",
that is derived from a fixed 2 GHz PLL clock.

Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-10-23 11:04:31 +00:00
Ezequiel Garcia
4675cf577e ARM: mvebu: Add a 2 GHz fixed-clock Armada 370/XP
Armada 370/XP SoCs have a 2 GHz fixed PLL that is used to feed
other clocks. This commit adds a DT representation of this clock
through a fixed-clock compatible node.

Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-10-23 11:04:30 +00:00
Thomas Petazzoni
86178f862d ARM: mvebu: the MPIC now provides MSI controller features
Adds the 'msi-controller' property to the main interrupt controller
Device Tree node, to indicate that it can now behave as a MSI
controller.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Tested-by: Daniel Price <daniel.price@gmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-09-30 15:00:22 +00:00
Gregory CLEMENT
238493e34d ARM: dts: mvebu: Update with the new compatible string for mv64xxx-i2c
The mv64xxx-i2c embedded in the Armada XP have a new feature to
offload i2c transaction. This new version of the IP come also with
some errata. This lead to the introduction to a another compatible
string.

This commit split the i2c information into armada-370.dtsi and
armada-xp.dtsi. Most of the data remains the same and stay in the
common file Armada-370-xp.dtsi. With this new feature the size of the
registers are bigger for Armada XP and the new compatible string is
used.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-09-17 18:38:53 +00:00
Olof Johansson
6cbe0e1fea mvebu dt changes for v3.12
- kirkwood
     - add ZyXEL NSA310 board, fan for ReadyNAS Duo v2
 
  - mvebu
     - add ReadyNAS 102 board
 
  - misc dts updates and changes.
 
 v2:
  - dropped mv64xxx-i2c change
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQEcBAABAgAGBQJSDiMPAAoJEAi3KVZQDZAenzYH+QEhluZYpiGjeo60RchyzYzx
 sKcNiGiUgZs1KAcONFIaKpTYoKjm8SSKiboegJhIYSN3NxYIm0Rlogjdl012p1zw
 vAR1dphum+xeTrvZLtiOZjfXA8XtSq+EBwkP4+CunAFXMPcyaqUW7MsxleIqCgGG
 GhSyT0APhsMBhIuvzsrBILZWPpriReiunM4rclU629xyzzrwHMxh7hrTpsw4qIgD
 ynZFRN5qJMLcFrRQ0nJVmhSyFMllYeAou5y8rXyUrde/sTI6ycMSG112ti2X3qQe
 pWEkiTnMSUajV4Adv3ljATMokDv2eMuNAEaq57k7w4njcYzNskfuhzTURy38xM0=
 =T/Dr
 -----END PGP SIGNATURE-----

Merge tag 'dt-3.12' of git://git.infradead.org/linux-mvebu into next/soc

From Jason Cooper:
mvebu dt changes for v3.12
 - kirkwood
    - add ZyXEL NSA310 board, fan for ReadyNAS Duo v2
 - mvebu
    - add ReadyNAS 102 board
 - misc dts updates and changes.

v2:
 - dropped mv64xxx-i2c change

* tag 'dt-3.12' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Fix the Armada 370/XP timer compatible strings
  ARM: mvebu: use dts pre-processor for readynas 102
  ARM: kirkwood: use dts pre-processor for nsa310 boards
  ARM: mvebu: use correct #interrupt-cells instead of #interrupts-cells
  ARM: Kirkwood: Add support for another ZyXEL NSA310 variant
  ARM: mvebu: Add Netgear ReadyNAS 102 board
  arm: kirkwood: readynas duo v2: Add GMT G762 Fan Controller

Signed-off-by: Olof Johansson <olof@lixom.net>

Conflicts:
	arch/arm/boot/dts/kirkwood-nsa310.dts
2013-08-29 10:01:40 -07:00
Ezequiel Garcia
5d3b883071 ARM: mvebu: Fix the Armada 370/XP timer compatible strings
The "marvell,armada-370-xp-timer" compatible string, together with
the "marvell,timer-25Mhz" property are deprecated and should be
removed from current DT.

Instead, the timer DT nodes are now required to have an appropriate
compatible string, which should be either "marvell,armada-370-timer"
or "marvell,armada-xp-timer", depending on SoC.

The clock property is now required only for Armada 370 so move it accordingly.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-08-16 13:02:11 +00:00
Ezequiel Garcia
14fd8ed0a7 ARM: mvebu: Relocate Armada 370/XP PCIe device tree nodes
Now that mbus has been added to the device tree, it's possible to
move the PCIe nodes out of internal registers, placing it directly
below the mbus. This is a more accurate representation of the
hardware.

Moving the PCIe nodes, we now need to introduce an extra cell to
encode the window target ID and attribute. Since this depends on
the PCIe port, we split the ranges translation entries, to correspond
to each MBus window.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-08-06 14:11:27 +00:00
Ezequiel Garcia
de1af8d486 ARM: mvebu: Relocate Armada 370/XP DeviceBus device tree nodes
Now that mbus has been added to the device tree, it's possible to
move the DeviceBus out of internal registers, placing it directly
below the mbus. This is a more accurate representation of the hardware.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-08-06 14:11:23 +00:00
Ezequiel Garcia
5e12a613ce ARM: mvebu: Add MBus to Armada 370/XP device tree
The Armada 370/XP SoC family has a completely configurable address
space handled by the MBus controller.

This patch introduces the device tree layout of MBus, making the
'soc' node as mbus-compatible.
Since every peripheral/controller is a child of this 'soc' node,
this makes all of them sit behind the mbus, thus describing the
hardware accurately.

A translation entry has been added for the internal-regs mapping.
This can't be done in the common armada-370-xp.dtsi because A370
and AXP have different addressing width.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-08-06 14:11:16 +00:00
Linus Torvalds
ee1a8d402e ARM SoC device tree changes
These changes from 30 individual branches for the most part update device
 tree files, but there are also a few source code changes that have crept
 in this time, usually in order to atomically move over a driver from
 using hardcoded data to DT probing.
 
 A number of platforms change their DT files to use the C preprocessor,
 which is causing a bit of churn, but that is hopefully only this once.
 
 There are a few conflicts with the other branches unfortunately:
 
 * in exynos5440.dtsi and kirkwood-6281.dtsi, device nodes are added
   from multiple branches. Need to be careful to have the right
   set of closing braces as git gets this one wrong.
 
 * In kirkwood.dtsi, one 'ranges' line got split into two lines, while
   another line got added. Order of the lines does not matter.
 
 * in sama5d3.dtsi, some cleanup was merged the wrong way, causing
   a bogus conflict. We want the 'dmas' and 'dma-names' properties
   to get added here.
 
 * Two lines got removed independently in arch/arm/mach-mxs/mach-mxs.c
 
 * Contents get added independently in arch/arm/mach-omap2/cclock33xx_data.c
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUdLnpGCrR//JCVInAQI50RAAsXbH1SGvjKJemXhRkFloPDYpCbgdDUFr
 ChUbjNV1xsY/jaNCfMa5/Qo7lgz/Ot7BpJef9fZn7ret+dc7nchqe/4iIkAokAUh
 E4ao9D1dP5aAA0ihdbSQHCZtR/0SUR81h6BoOVuo/1mvEiBaFbWAeYe8/6LJd9II
 OU1w9bDmjfZWYFUXs+j2VF76ueZQ+kz69XDKZUGtkqN76m1AL8lGDurj5jxvyllF
 VJns8d9q2nr2q9PferfajK6rkOIPaTpwKblxZHUgobCyOitZaiZM0NgF733TsNM6
 HXmhDhkcn7T81+SiHVfigJ/nxo9UgU4zNJCODF3WZIwGIj3FbxvCOpdCYi2NhCO8
 oLcgDk57tpoKpB3gvAmYVQHP9FIepFa/WAWyPIADA7PkpYrwgc4v+cLEHXpd8SRv
 viLLIa5QuNdMeaK+Md9OKmKZFd7uFD9jiMtmdm6IpEVDDjMgoteb2XSoEtNebmtY
 MfbW4okn118a2dFKKaPTKcXVW/a5FRp2JGfB0A58RQHaJWj3JsY1bFn/xWPEpTOA
 IWB/HHMln0LYTL2AXN9HcaL1jnGI1Wq5eWBurX+cXQ/ij1A6jfoRKYglx7AQqOHj
 iWcGYtKLLJCgiWFnLSwcljZhfoYr0/z7rhns6yo7/vhN0riy+M84OgN4HbAmUzc1
 Bgy9PnJTNo8=
 =8PtJ
 -----END PGP SIGNATURE-----

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

Pull ARM SoC device tree changes from Arnd Bergmann:
 "These changes from 30 individual branches for the most part update
  device tree files, but there are also a few source code changes that
  have crept in this time, usually in order to atomically move over a
  driver from using hardcoded data to DT probing.

  A number of platforms change their DT files to use the C preprocessor,
  which is causing a bit of churn, but that is hopefully only this once"

* tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (372 commits)
  ARM: at91: dt: rm9200ek: add spi support
  ARM: at91: dt: rm9200: add spi support
  ARM: at91/DT: at91sam9n12: add SPI DMA client infos
  ARM: at91/DT: sama5d3: add SPI DMA client infos
  ARM: at91/DT: fix SPI compatibility string
  ARM: Kirkwood: Fix the internal register ranges translation
  ARM: dts: bcm281xx: change comment to C89 style
  ARM: mmc: bcm281xx SDHCI driver (dt mods)
  ARM: nomadik: add the new clocks to the device tree
  clk: nomadik: implement the Nomadik clocks properly
  ARM: dts: omap5-uevm: Provide USB Host PHY clock frequency
  ARM: dts: omap4-panda: Fix DVI EDID reads
  ARM: dts: omap4-panda: Add USB Host support
  arm: mvebu: enable mini-PCIe connectors on Armada 370 RD
  ARM: shmobile: irqpin: add a DT property to enable masking on parent
  ARM: dts: AM43x EPOS EVM support
  ARM: dts: OMAP5: Add bandgap DT entry
  ARM: dts: AM33XX: Add pinmux configuration for CPSW to am335x EVM
  ARM: dts: AM33XX: Add pinmux configuration for CPSW to EVMsk
  ARM: dts: AM33XX: Add pinmux configuration for CPSW to beaglebone
  ...
2013-07-02 14:23:01 -07:00
Olof Johansson
9214cbe50f mvebu dt changes for v3.11 (round 5)
- mvebu
     - set aliases for ethernet interfaces
     - PCIe range for armada-xp-db
     - rm unused properties on A370
 
  - kirkwood
     - assign sheevaplug pinmuxs to correct devices
     - enable second PCIe port for ts219
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQEcBAABAgAGBQJRujTWAAoJEAi3KVZQDZAewwYH/iWl8JcRm0i0xyjYjj6v+XMk
 2NauOq3A5yTWbI0H3oXi8QH0BBlUie30SuT85O675KS9no0tIbv8JlLx3PfhTjoB
 3hrDKkhcD6jTqg7TgWL9w3Qdq2S0/XLgoZ4RDo35nrXsCodpkr5XaEPJP3ES1Zo+
 n57cAgyw7edhohcIT/mKSv5WyOajbU4uWPxBr9i8sqZf9uTFOyOYQpWZMCvbJKc2
 /MrQ0UfRhMgymcaYiO5oqihYn8C0HhxRBno1muXemR4Ovaxgdp040gPB0QnmGONo
 oibfWbOWnlx6KK8I/B231uCWuDEFm5q1sr/L/e17f1hi0S+R6fwREVgH/5Hf6MQ=
 =UXHW
 -----END PGP SIGNATURE-----

Merge tag 'dt-3.11-5' of git://git.infradead.org/users/jcooper/linux into next/dt

From Jason Cooper:
mvebu dt changes for v3.11 (round 5)
 - mvebu
    - set aliases for ethernet interfaces
    - PCIe range for armada-xp-db
    - rm unused properties on A370
 - kirkwood
    - assign sheevaplug pinmuxs to correct devices
    - enable second PCIe port for ts219

* tag 'dt-3.11-5' of git://git.infradead.org/users/jcooper/linux:
  ARM: Kirkwood: ts219: Enable second PCIe port in DT.
  ARM: mvebu: Remove device tree unused properties on A370
  arm: mvebu: armada-xp-db: ensure PCIe range is specified
  arm: kirkwood: sheevaplug: move pinmux configs to the right devices
  ARM: mvebu: set aliases for ethernet controllers

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-14 15:06:19 -07:00
Olof Johansson
54edc2524d Merge branch 'dts-cpus-updates' of git://linux-arm.org/linux-2.6-lp into next/dt
From Lorenzo Pieralisi, this is a series of patches that cleans up the CPU
nodes in most of the SoC dtsi files to conform to the standard bindings.

* 'dts-cpus-updates' of git://linux-arm.org/linux-2.6-lp:
  ARM: dts: sunxi: cpus/cpu nodes dts updates
  ARM: dts: spear: cpus/cpu nodes dts updates
  ARM: dts: sh7372: cpus/cpu nodes dts updates
  ARM: dts: r8a7740: cpus/cpu nodes dts updates
  ARM: dts: pxa2xx: cpus/cpu nodes dts updates
  ARM: dts: prima2: cpus/cpu node dts updates
  ARM: dts: picoxcell: cpus/cpu nodes dts updates
  ARM: dts: omap: cpus/cpu nodes dts updates
  ARM: dts: lpc32xx: cpus/cpu nodes dts updates
  ARM: dts: imx: cpus/cpu nodes dts updates
  ARM: dts: exynos5440: cpus/cpu nodes dts updates
  ARM: dts: at91: cpus/cpu node dts updates
  ARM: dts: armada-370-xp: cpus/cpu node dts updates
  ARM: dts: am33xx: cpus/cpu nodes dts updates

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-06-07 16:39:38 -07:00
Willy Tarreau
be5a9389e8 ARM: mvebu: set aliases for ethernet controllers
These aliases are used when feeding the DT from ATAGS to set the
devices MAC addresses.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-06-04 14:15:07 +00:00
Olof Johansson
d1ba78cd72 mvebu dt changes for v3.11 (round 3)
- mvebu
     - enable two usb interfaces on Armada XP-GP
 
  - kirkwood
     - move pinmux configs to their individual devices
     - group the pinmux configs on OpenBlocks A6
     - add the Init button for the OpenBlocks A6
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRpPZAAAoJEAi3KVZQDZAe/6AIAIvtbKlec9up7/QoIzM7varY
 Qfb7OU6EQYnNmTiY+n/y2REz03mUC/cnrvRZ0YD31i5WwHZWGQiz1R692Tt1e07A
 Cugl75yLuOFnsSKqkvRy0Km2QF35Irk22stBRP85csGu/LjjSqr0gXDsJ2++oQfZ
 ssco7I5MsTEFJDpeVAB5jFaFm+hs+uM8/WsUf7l7qjyImqkz1WZPZfkgevWm3UjH
 Mz2Ur2Sbapq5gU+/h8GdzWJdCuSM0wmZ3TKGOk2BCbMFBFSr72tPUgVDwYge7Ae4
 5lPoeHg00o8TM6kpf5OBGW8kq6oMij33e7YjVpAp/YdsAmyua1gFCFikW3APuJU=
 =SWgl
 -----END PGP SIGNATURE-----

Merge tag 'dt-3.11-3' of git://git.infradead.org/users/jcooper/linux into next/dt

From jason Cooper, mvebu dt changes for v3.11.

Signed-off-by: Olof Johansson <olof@lixom.net>

* tag 'dt-3.11-3' of git://git.infradead.org/users/jcooper/linux: (27 commits)
  arm: kirkwood: openblocks-a6: add support for Init button
  arm: kirkwood: openblocks-a6: group pinmux configurations
  arm: kirkwood: ts219: move pinmux configs to the right devices
  arm: kirkwood: topkick: move pinmux configs to the right devices
  arm: kirkwood: openblocks_a6: move pinmux configs to the right devices
  arm: kirkwood: nsa310: move pinmux configs to the right devices
  arm: kirkwood: readynas: move pinmux configs to the right devices
  arm: kirkwood: mplcec4: move pinmux configs to the right devices
  arm: kirkwood: buffalo linkstation: move pinmux configs to the right devices
  arm: kirkwood: keymile: move pinmux configs to the right devices
  arm: kirkwood: ns2: move pinmux configs to the right devices
  arm: kirkwood: iomega ix2-200: move pinmux configs to the right devices
  arm: kirkwood: iconnect: move pinmux configs to the right devices
  arm: kirkwood: iconnect: give meaningful names to pinmux configs
  arm: kirkwood: ib62x0: move pinmux configs to the right devices
  arm: kirkwood: guruplug: move pinmux configs to the right devices
  arm: kirkwood: goflexnet: move pinmux configs to the right devices
  arm: kirkwood: dreamplug: move pinmux configs to the right devices
  arm: kirkwood: dockstar: move pinmux configs to the right devices
  arm: kirkwood: dlink dns: move pinmux configs to the right devices
  ...
2013-05-31 22:47:53 -07:00
Thomas Petazzoni
cf8088c5ca arm: mvebu: fix length of Ethernet registers area in .dtsi
The length of the registers area for the Marvell 370/XP Ethernet
controller was incorrect in the .dtsi: 0x2400 while it should have
been 0x4000. Until now, this problem wasn't noticed because there was
a large static mapping for all I/Os set up by ->map_io(). But since
we're going to get rid of this static mapping, we need to ensure that
the register areas are properly sized.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-05-28 14:48:28 +00:00
Thomas Petazzoni
911492de45 arm: mvebu: fix length of SATA registers area in .dtsi
The length of the registers area for the Marvell 370/XP SATA
controller was incorrect in the .dtsi: 0x2400 while it should have
been 0x5000. Until now, this problem wasn't noticed because there was
a large static mapping for all I/Os set up by ->map_io(). But since
we're going to get rid of this static mapping, we need to ensure that
the register areas are properly sized.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-05-28 14:48:15 +00:00
Lorenzo Pieralisi
7a7ed29072 ARM: dts: armada-370-xp: cpus/cpu node dts updates
This patch updates the in-kernel dts files according to the latest cpus
and cpu bindings updates for ARM.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
2013-05-23 10:45:09 +01:00
Thomas Petazzoni
8eed481e6f arm: mvebu: fix the 'ranges' property to handle PCIe
Since 82a682676 ('ARM: dts: mvebu: Convert all the mvebu files to use
the range property') all the device nodes of Armada 370/XP are under a
common 'ranges' property that translates the device register addresses
into their absolute address, thanks to the base address of the
internal register space.

However, beyond just the register areas, there are also PCIe I/O and
memory regions, whose addresses should be properly translated. This
patch fixes the Armada 370 and XP ranges property to take PCIe into
account properly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-05-19 20:25:17 +00:00
Simon Baatz
d87b5fbbe1 ARM: mvebu: Use standard MMC binding for all users of mvsdio
In order to prepare the switch to the standard MMC device tree parser
for mvsdio, adapt all current uses of mvsdio in the dts files to the
standard format.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-05-15 00:28:13 +00:00
Gregory CLEMENT
74898364e7 ARM: dts: mvebu: Convert mvebu device tree files to 64 bits
In order to be able to use more than 4GB of RAM when the LPAE is
activated, the dts must be converted in 64 bits.

Only Armada XP is LPAE capable, but as it shares a common dtsi file
with Armada 370, then the common file include the skeleton64. Thanks
to the use of the overload capability of the device tree format,
armada-370 include the 32 bit skeleton and all the armada 370 based
dts can remain the same.

This was heavily based on the work of Lior Amsalem.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-15 15:00:29 +00:00
Gregory CLEMENT
467f54b215 ARM: dts: mvebu: introduce internal-regs node
Introduce a 'internal-regs' subnode, under which all devices are
moved. This is not really needed for now, but will be for the
mvebu-mbus driver. This generates a lot of code movement since it's
indenting by one more tab all the devices.  So it was a good
opportunity to fix all the bad indentation.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-15 15:00:24 +00:00
Gregory CLEMENT
82a682676c ARM: dts: mvebu: Convert all the mvebu files to use the range property
This conversion will allow to keep 32 bits addresses for the internal
registers whereas the memory of the system will be 64 bits.
Later it will also ease the move of the mvebu-mbus driver to the
device tree support.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-15 15:00:21 +00:00
Thomas Petazzoni
b18ea4dc77 ARM: dts: mvebu: move all peripherals inside soc
reorganize the .dts and .dtsi files so that all devices are under the
soc { } node (currently some devices such as the interrupt controller,
the L2 cache and a few others are outside).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-15 15:00:17 +00:00
Jason Cooper
b757f17e91 mvebu soc changes for v3.10
- use the mvebu-mbus driver
  - prep for LPAE support
 
 Depends:
  - mvebu/cleanup (tags/cleanup_for_v3.10)
  - mvebu/drivers (tags/drivers_for_v3.10)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRbApqAAoJEAi3KVZQDZAeiUkH+gI3KNnIEmwbMANGy+zdX70Y
 mVj5X51MkXCawqNPLT6KYTO16Ap8STBXDxLfQfll1BuIeATgQgqs8dCcykiYQ4me
 45Hj9+6uZhfPpN43u4syFPoYaLSAMT9Oe/9ntcpdnyu4fEsRmGGh2Dg8bhYcG1B2
 +IVB67qSJ3vU0D2bcqsbSPuSu9MW2Qloc5+SMR74TcsyseZw10kbvL6cdwi9DpNt
 ru2c/bXqO88U1pmeedJ8Cxl0KGFDhocYWV6orqph+2jIxuCDYd7DjOXFKeMHwcDX
 lj54wMUyp8EzTs+huhnK3qL6waXTyccmMDDvgIL6WiFywvklTOJOFz0BnfHIHpk=
 =RK7u
 -----END PGP SIGNATURE-----

Merge tag 'tags/soc_for_v3.10' into mvebu/dt

Pulling in mvebu branches which contain changes to armada*.dts? files for LPAE
conversion.

mvebu soc changes for v3.10

 - use the mvebu-mbus driver
 - prep for LPAE support

Depends:
 - mvebu/cleanup (tags/cleanup_for_v3.10)
 - mvebu/drivers (tags/drivers_for_v3.10)
2013-04-15 14:55:23 +00:00
Jason Cooper
3c76a8a95d mvebu fixes for v3.9 round 3
- Kirkwood
     - a couple of small fixes for the Iomega ix2-200 board (ether and led)
  - mvebu
     - allow GPIO button to work on Mirabox when running SMP
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRZZxwAAoJEAi3KVZQDZAerwcIAKR1xRKuagtXvfij+xfVVRQ6
 1G645hTIthFXmNiEeo3Y/mswHhVooZvu8SWh3o3J2Wsbnzeh+ch6jTsl+g6Tnb3E
 KmRFU0mcalRmsyYsh4PH9nDi8/oWyP+i3ZytgfcMlsSPNiE+Ek35NdTTWMLCTT8V
 MkGysVc8MWoOmMf47mNboy5UUUTXRdnSUJSjv1ubrsTK33LT7Ii9Ce+eoNvpvF+5
 +6RenfRMzRSwkZf9AaCRPAhXISQKbMAwz6lKGo2GGAW+73Z+JclXXmiCfQ8pWie2
 pfyqiEYigZFqe6Ly5BUtGoVfDjmOLDs+ATTUDOlOj0uaEc7pOwwKoAtpVRdck24=
 =yK1f
 -----END PGP SIGNATURE-----

Merge tag 'tags/mvebu_fixes_for_v3.9_round3' into mvebu/dt

pulling in mvebu branches which changes armada*.dts? files for LPAE changes

mvebu fixes for v3.9 round 3

 - Kirkwood
    - a couple of small fixes for the Iomega ix2-200 board (ether and led)
 - mvebu
    - allow GPIO button to work on Mirabox when running SMP
2013-04-15 14:54:05 +00:00
Thomas Petazzoni
87e1bed406 arm: mach-mvebu: convert to use mvebu-mbus driver
The changes needed to migrate the mach-mvebu (Armada 370 and Armada
XP) to the mvebu-mbus driver are fairly minimal, since not many
devices currently supported on those SoCs use address decoding
windows. The only one being the BootROM window, used to bring up
secondary CPUs.

However, this BootROM window needed for SMP brings an important
requirement: the mvebu-mbus driver must be initialized at the
->early_init() time, otherwise the BootROM window cannot be setup
early enough to be ready before the secondary CPUs are started.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-15 14:06:16 +00:00
Ezequiel Garcia
3d76e1f386 ARM: mvebu: Add Device Bus support for Armada 370/XP SoC
Armada 370 and Armada XP SoC have a Device Bus controller to
handle NOR, NAND, SRAM and FPGA devices.
This patch adds the device tree node to enable the controller.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-11 17:28:51 +00:00
Thomas Petazzoni
1b72b78fda arm: mvebu: fix address-cells in mpic DT node
There is no need to have a #address-cells property in the MPIC Device
Tree node, and more than that, having it confuses the of_irq_map_raw()
logic, which will be used by the Marvell PCIe driver.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-03-08 22:15:54 +00:00
Heikki Krogerus
e366154f70 arm: mvebu: Reduce reg-io-width with UARTs
Setting the reg-io-width to 1 byte represents more accurate
description of the HW.

This will fix an issue where UART driver causes kernel
panic during bootup. Gregory CLEMENT traced the issue to
autoconfig() in 8250.c, where the existence of FIFO is
checked from UART_IIR register. The register is now read as
32-bit value as the reg-io-width is set to 4-bytes. The
retuned value seems to contain bogus data for bits 31:8,
causing the issue.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-03-08 22:03:44 +00:00
Ezequiel Garcia
d5dc035eaa arm: mvebu: Add support for SPI controller in Armada 370/XP
The Armada 370 and Armada XP SoC has an SPI controller.
This patch adds support for this controller in Armada 370
and Armada XP SoC common device tree files.

Note that the Armada XP SPI register length is 0x50 bytes,
while Armada 370 SPI register length is 0x28 bytes,
so we choose the smaller of the two.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Lior Amsalem <alior@marvell.com>
Acked-by: Gregory Clement <gregory.clement@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-02-28 18:57:14 +01:00
Gregory CLEMENT
e1dd464901 arm: mvebu: update DT to support local timers
Now that the time-armada-370-xp support local timers, updated the
device tree to take it into account.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-02-28 18:57:14 +01:00
Ezequiel Garcia
b2bb806f55 arm: mvebu: Add support for USB host controllers in Armada 370/XP
The Armada 370 and Armada XP SoC has an Orion EHCI USB controller.
This patch adds support for this controller in Armada 370
and Armada XP SoC common device tree files.

Cc: Lior Amsalem <alior@marvell.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-02-28 18:57:13 +01:00
Thomas Petazzoni
42bb531671 arm: mvebu: add DT information for the SDIO interface of Armada 370/XP
Now that the mvsdio MMC driver has a Device Tree binding, we add the
Device Tree informations to describe the SDIO interface available in
the Armada 370/XP SoCs.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-02-28 18:57:09 +01:00
Gregory CLEMENT
0db98549bd arm: mvebu: Add RTC support for Armada 370 and Armada XP
The Armada 370 and Armada XP Socs have the same controller that the
one used in the orion platforms. This patch updates the device tree
for these SoCs.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-02-28 18:57:09 +01:00
Gregory CLEMENT
b24212fbfb arm: mvebu: Use dw-apb-uart instead of ns16650 as UART driver
The UART controller used in the Armada 370 and Armada XP SoCs is the
Synopsys DesignWare 8250 (aka Synopsys DesignWare ABP UART). The
improper use of the ns16550 can lead to a kernel oops during boot if
a character is sent to the UART before the initialization of the
driver. The DW APB has an extra interrupt that gets raised when
writing to the LCR when busy. This explains why we need to use
dw-apb-uart driver to handle this.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-01-06 17:41:14 +00:00
Jason Cooper
56580bb422 Merge branch 'mvebu-misc-fixes' of git://github.com/MISL-EBU-System-SW/mainline-public into mvebu/everything 2012-11-24 04:08:49 +00:00
Thomas Petazzoni
1112b36094 SMP support for Armada XP
The purpose of this series is to add the SMP support for the Armada XP
 SoCs. Beside the SMP support itself brought by the last 3 commits,
 this series also adds the support for the coherency fabric unit and
 the power management service unit.
 
 The coherency fabric is responsible for ensuring hardware coherency
 between all CPUs and between CPUs and I/O masters. This unit is also
 available for Armada 370 and will be used in an incoming patch set
 for hardware I/O cache coherency.
 
 The power management service unit is responsible for powering down and
 waking up CPUs and other SOC units.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlCs+5oACgkQCwYYjhRyO9UywACfVp3WPDHLxE8ypew3AWoTyxe3
 JcMAoIjojnjWCd44cqDJ4uEpvi6KNquE
 =BR8m
 -----END PGP SIGNATURE-----

Merge tag 'marvell-armadaxp-smp-for-3.8' of github.com:MISL-EBU-System-SW/mainline-public into mevbu-dt-additions

SMP support for Armada XP

The purpose of this series is to add the SMP support for the Armada XP
SoCs. Beside the SMP support itself brought by the last 3 commits,
this series also adds the support for the coherency fabric unit and
the power management service unit.

The coherency fabric is responsible for ensuring hardware coherency
between all CPUs and between CPUs and I/O masters. This unit is also
available for Armada 370 and will be used in an incoming patch set
for hardware I/O cache coherency.

The power management service unit is responsible for powering down and
waking up CPUs and other SOC units.

Conflicts:
	arch/arm/mach-mvebu/armada-370-xp.c
2012-11-22 10:55:09 +01:00
Thomas Petazzoni
a79cfde1b1 Merge branch 'for-jason-1/cleanup' into mevbu-dt-additions 2012-11-22 10:50:55 +01:00
Jason Cooper
4e76b1b232 Marvell SATA and I2C enabling for OpenBlocks AX3-4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlCtU90ACgkQ9lPLMJjT96dSdQCfcmuU/3oXziktW6coEOwWD0rZ
 rpAAoITtWPO7RNRqhCVQGFJKuuy5sid7
 =ME0a
 -----END PGP SIGNATURE-----

Merge tag 'marvell-openblocks-i2c-sata-for-3.8' of git://github.com/MISL-EBU-System-SW/mainline-public into mvebu/everything

Marvell SATA and I2C enabling for OpenBlocks AX3-4
2012-11-22 03:28:05 +00:00
Nobuhiro Iwamatsu
539eb5bca0 ARM: mvebu: Add support for I2C controllers in Armada 370/XP
The Armada 370 and Armada XP have the same I2C controllers as previous
Marvell SoCs, so the existing mv64xxx-i2c driver works fine.

[Thomas Petazzoni: updated on top of other Armada 370/XP changes,
rephrased the commit log].
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-11-21 23:17:34 +01:00
Jason Cooper
32d6448a08 Add hardware I/O coherency support for Armada 370/XP
The purpose of this patch set is to add hardware I/O Coherency support
 for Armada 370 and Armada XP. Theses SoCs come with an unit called
 coherency fabric. A beginning of the support for this unit have been
 introduced with the SMP patch set. This series extend this support:
 the coherency fabric unit allows to use the Armada XP and the Armada
 370 as nearly coherent architectures.
 
 The third patches enables this new feature and register our own set
 of DMA ops, to benefit this hardware enhancement.
 
 The first patches exports a dma operation function needed to register
 our own set of dma ops.
 
 The second patch introduces a new flag for the address decoding
 configuration in order to be able to set the memory windows as
 shared memory.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlCs/LcACgkQCwYYjhRyO9WrOgCfeWpA9XdQnwexySw5tPXS7Qdp
 aJEAn2ql07SECpTRWezTJptHL0oI1dFF
 =b0T7
 -----END PGP SIGNATURE-----

Merge tag 'marvell-hwiocc-for-3.8' of git://github.com/MISL-EBU-System-SW/mainline-public into mvebu/everything

Add hardware I/O coherency support for Armada 370/XP

The purpose of this patch set is to add hardware I/O Coherency support
for Armada 370 and Armada XP. Theses SoCs come with an unit called
coherency fabric. A beginning of the support for this unit have been
introduced with the SMP patch set. This series extend this support:
the coherency fabric unit allows to use the Armada XP and the Armada
370 as nearly coherent architectures.

The third patches enables this new feature and register our own set
of DMA ops, to benefit this hardware enhancement.

The first patches exports a dma operation function needed to register
our own set of dma ops.

The second patch introduces a new flag for the address decoding
configuration in order to be able to set the memory windows as
shared memory.
2012-11-21 20:02:46 +00:00
Jason Cooper
86b7d3f779 SMP support for Armada XP
The purpose of this series is to add the SMP support for the Armada XP
 SoCs. Beside the SMP support itself brought by the last 3 commits,
 this series also adds the support for the coherency fabric unit and
 the power management service unit.
 
 The coherency fabric is responsible for ensuring hardware coherency
 between all CPUs and between CPUs and I/O masters. This unit is also
 available for Armada 370 and will be used in an incoming patch set
 for hardware I/O cache coherency.
 
 The power management service unit is responsible for powering down and
 waking up CPUs and other SOC units.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlCs+5oACgkQCwYYjhRyO9UywACfVp3WPDHLxE8ypew3AWoTyxe3
 JcMAoIjojnjWCd44cqDJ4uEpvi6KNquE
 =BR8m
 -----END PGP SIGNATURE-----

Merge tag 'marvell-armadaxp-smp-for-3.8' of git://github.com/MISL-EBU-System-SW/mainline-public into mvebu/everything

SMP support for Armada XP

The purpose of this series is to add the SMP support for the Armada XP
SoCs. Beside the SMP support itself brought by the last 3 commits,
this series also adds the support for the coherency fabric unit and
the power management service unit.

The coherency fabric is responsible for ensuring hardware coherency
between all CPUs and between CPUs and I/O masters. This unit is also
available for Armada 370 and will be used in an incoming patch set
for hardware I/O cache coherency.

The power management service unit is responsible for powering down and
waking up CPUs and other SOC units.
2012-11-21 20:01:15 +00:00
Gregory CLEMENT
e60304f8cb arm: mvebu: Add hardware I/O Coherency support
Armada 370 and XP come with an unit called coherency fabric. This unit
allows to use the Armada 370/XP as a nearly coherent architecture. The
coherency mechanism uses snoop filters to ensure the coherency between
caches, DRAM and devices. This mechanism needs a synchronization
barrier which guarantees that all the memory writes initiated by the
devices have reached their target and do not reside in intermediate
write buffers. That's why the architecture is not totally coherent and
we need to provide our own functions for some DMA operations.

Beside the use of the coherency fabric, the device units will have to
set the attribute flag of the decoding address window to select the
accurate coherency process for the memory transaction. This is done
each device driver programs the DRAM address windows. The value of the
attribute set by the driver is retrieved through the
orion_addr_map_cfg struct filled during the early initialization of
the platform.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Yehuda Yitschak <yehuday@marvell.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-11-21 17:07:49 +01:00
Gregory CLEMENT
009f13159b arm: mvebu: Add support for coherency fabric in mach-mvebu
The Armada 370 and Armada XP SOCs have a coherency fabric unit which
is responsible for ensuring hardware coherency between all CPUs and
between CPUs and I/O masters. This patch provides the basic support
needed for SMP.

Signed-off-by: Yehuda Yitschak <yehuday@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
2012-11-21 16:49:06 +01:00
Thomas Petazzoni
4aa935a2cf arm: mvebu: add 'clocks' property to Ethernet nodes for Armada 370/XP SoCs
The mvneta driver now understands a standard 'clocks' clock pointer
property in the Device Tree nodes for the Ethernet devices, so we add
the right clock reference for the different Ethernet ports of the
Armada 370/XP SoCs.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-11-20 23:15:47 +01:00
Thomas Petazzoni
05e121af94 Marvell boards changes related to Ethernet, for 3.8
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlCmB6oACgkQ9lPLMJjT96elAwCfQyZY9HP0PW+0y2VRbKLYlrTW
 vaQAoJMNKRaxjBwnF5As4I4/5g0rsE/H
 =hRb7
 -----END PGP SIGNATURE-----

Merge tag 'marvell-boards-net-for-3.8' of github.com:MISL-EBU-System-SW/mainline-public into test-the-merge

Marvell boards changes related to Ethernet, for 3.8

Conflicts:
	arch/arm/boot/dts/armada-370-xp.dtsi
	arch/arm/boot/dts/armada-xp-db.dts
2012-11-20 23:09:20 +01:00
Gregory CLEMENT
a6a6de1a0a arm: mvebu: SATA support: SoC-level DT data for Armada 370/XP
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Lior Amsalem <alior@marvell.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-11-20 15:42:06 +01:00
Gregory CLEMENT
307c2bf467 clocksource: convert time-armada-370-xp to clk framework
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by Gregory CLEMENT <gregory.clement@free-electrons.com>
2012-11-20 14:46:49 +01:00
Thomas Petazzoni
323c10101f arm: mvebu: add Ethernet controllers using mvneta driver for Armada 370/XP
The Armada 370 SoC has two network units, while the Armada XP has four
network units. The first two network units are common to both the
Armada XP and Armada 370, so they are added to armada-370-xp.dtsi,
while the other two network units are specific to the Armada XP and
therefore added to armada-xp.dtsi.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-11-16 10:17:41 +01:00