ARM: mvebu: Armada 39x basic support, and preparatory cleanups
Subsystems (9)
v3 cover ARM: mvebu: Armada 39x basic support, and preparatory cleanups
Hello,
This is the third version of the patch series adding Armada 39x basic support.
This set of patches add basic support for a new family of Marvell EBU
processors: the Armada 39x. They are based on Cortex-A9 (like Armada 375 and 38x) and the most important new feature is probably the addition of 10 GbE support.
See http://www.marvell.com/embedded-processors/armada-39x/ for a basic introduction.
Note that this web page talks about an Armada 395 and Armada 398, but so far the technical documentation we have been given access to only describes Armada 390 and Armada 398, so this series supports only Armada 390 and Armada 398 so far. Support for Armada 395 might be added in the future, once we get access to the appropriate technical details.
Changes v2 -> v3:
- Rebased on top of v4.0-rc1
- Add support for the L2 cache
- Added Acked-by from Gregory Clement on
ARM: mvebu: add __initconst specifiers on DT_MACHINE_START dt_compat tables
ARM: mvebu: fix usb@ unit address on Armada 38x to match register address
ARM: mvebu: add missing UART alias on Armada 38x
devicetree: bindings: add DT binding for the Marvell Armada 39x SoC family
- Renamed 'ARM: mvebu: add missing UART alias on Armada 38x' to 'ARM:
mvebu: add missing UART labels on Armada 38x'.
- Added a patch 'ARM: mvebu: add UART labels to Armada 375'.
- Change 'ARM: mvebu: add stdout-path to all armada-*.dts' to go further and eliminate completely /chosen/bootargs. This removes the non-desired 'earlyprintk' argument, and since console= was the only remaining kernel parameter, using stdout-path makes more sense. Requested by Rob Herring and Mark Rutland.
- Dropped the patch "ARM: mvebu: use IRQ macros to define the SDHCI interrupt on Armada 38x" from the series, since Gregory Clement already submitted it as part of a different series.
- Added patches 'ARM: mvebu: enable Armada 39x in mvebu_v7_defconfig' and 'ARM: configs: enable Marvell Armada 39x in multi_v7_defconfig' to update mvebu_v7_defconfig and multi_v7_defconfig so that they enable Marvell Armada 39x by default. Suggested by Gregory Clement.
- Fix the unit address of the MPIC interrupt controller, in both the newly added Armada 39x support, as well as in the existing Armada 370, 375, 38x and XP support. Suggested by Gregory Clement.
Changes v1 -> v2:
- At the SoC level, add the description of SPI controller 0 and 1, NAND flash controller, SDHCI controller, Core Divider Clock (needed by the NAND flash controller), the main PLL clock (needed by the Core Divider Clock) and the XOR engines.
- At the board level, add the description of the SPI flash connected to SPI bus 1, which contains the bootloader, and the description of the NAND flash.
- Fix space vs. tab.
- Use __initconst when defining the dt_compat table for Armada 39x. Suggested by Stephen Boyd.
- Fix typo in commit log of "ARM: mvebu: add core support for Armada 39x", noticed by Maxime Ripard.
- Remove earlyprintk from /chosen/bootargs. Suggested by Andrew Lunn.
- Add aliases for uart[0-3]. Suggested by Andrew Lunn.
- Add /chosen/stdout-path to Armada 398 DB DT. Suggested by Andrew Lunn.
- Move pinctrl configurations at the SoC level. Suggested by Andrew Lunn.
- Add several preparation/cleanup patches not related to Armada 39x directly, but whose topics were found while working on Armada 39x support:
- Add __initconst to all dt_compat table in mach-mvebu.
- Fixup usb@ unit address on Armada 38x
- Add stdout-path to all armada-*.dts
- Use GIC and IRQ macros in SDHCI definition of Armada 38x
- Add missing UART alias on Armada 38x
Thanks!
Thomas
Thomas Petazzoni (20):
ARM: mvebu: add __initconst specifiers on DT_MACHINE_START dt_compat
tables
ARM: mvebu: fix usb@ unit address on Armada 38x to match register
address
ARM: mvebu: add missing UART labels on Armada 38x
ARM: mvebu: add UART labels to Armada 375
ARM: mvebu: remove aliases for Ethernet devices on Armada
370/375/38x/XP
ARM: mvebu: add serial port aliases on Armada 370/375/38x/XP
ARM: mvebu: use stdout-path in all armada-*.dts
ARM: mvebu: fix unit address of MPIC nodes
devicetree: bindings: add DT binding for the Marvell Armada 39x SoC
family
devicetree: bindings: update DT bindings for Marvell EBU clock support
devicetree: bindings: add Device Tree bindings for Armada 39x
pin-muxing controller
devicetree: bindings: add new SMP enable method for Marvell Armada 39x
clk: mvebu: extend common code to allow an optional refclk
clk: mvebu: add Marvell Armada 39x driver
pinctrl: mvebu: add pinctrl driver for Marvell Armada 39x
ARM: mvebu: add core support for Armada 39x
ARM: mvebu: add Device Tree files for Armada 39x SoC and board
Documentation: arm: update supported Marvell EBU processors
ARM: mvebu: enable Armada 39x in mvebu_v7_defconfig
ARM: configs: enable Marvell Armada 39x in multi_v7_defconfig
Documentation/arm/Marvell/README | 5 +
.../devicetree/bindings/arm/armada-39x.txt | 20 +
Documentation/devicetree/bindings/arm/cpus.txt | 1 +
.../devicetree/bindings/clock/mvebu-core-clock.txt | 9 +
.../bindings/clock/mvebu-gated-clock.txt | 15 +-
.../pinctrl/marvell,armada-39x-pinctrl.txt | 78 ++++
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/armada-370-db.dts | 2 +-
arch/arm/boot/dts/armada-370-mirabox.dts | 2 +-
arch/arm/boot/dts/armada-370-netgear-rn102.dts | 2 +-
arch/arm/boot/dts/armada-370-netgear-rn104.dts | 2 +-
arch/arm/boot/dts/armada-370-rd.dts | 2 +-
arch/arm/boot/dts/armada-370-synology-ds213j.dts | 3 +-
arch/arm/boot/dts/armada-370-xp.dtsi | 6 +-
arch/arm/boot/dts/armada-370.dtsi | 2 +-
arch/arm/boot/dts/armada-375-db.dts | 2 +-
arch/arm/boot/dts/armada-375.dtsi | 10 +-
arch/arm/boot/dts/armada-385-db-ap.dts | 3 +-
arch/arm/boot/dts/armada-388-db.dts | 4 +-
arch/arm/boot/dts/armada-388-gp.dts | 5 +-
arch/arm/boot/dts/armada-388-rd.dts | 2 +-
arch/arm/boot/dts/armada-38x.dtsi | 11 +-
.../dts/{armada-xp-matrix.dts => armada-390.dtsi} | 71 +---
.../dts/{armada-388-db.dts => armada-398-db.dts} | 111 ++---
.../dts/{armada-xp-matrix.dts => armada-398.dtsi} | 70 +---
.../boot/dts/{armada-375.dtsi => armada-39x.dtsi} | 446 ++++++++-------------
arch/arm/boot/dts/armada-xp-axpwifiap.dts | 2 +-
arch/arm/boot/dts/armada-xp-db.dts | 2 +-
arch/arm/boot/dts/armada-xp-gp.dts | 2 +-
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 3 +-
arch/arm/boot/dts/armada-xp-matrix.dts | 2 +-
arch/arm/boot/dts/armada-xp-mv78260.dtsi | 1 -
arch/arm/boot/dts/armada-xp-mv78460.dtsi | 1 -
arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 2 +-
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 2 +-
arch/arm/boot/dts/armada-xp-synology-ds414.dts | 3 +-
arch/arm/boot/dts/armada-xp.dtsi | 5 +-
arch/arm/configs/multi_v7_defconfig | 1 +
arch/arm/configs/mvebu_v7_defconfig | 1 +
arch/arm/mach-mvebu/Kconfig | 14 +
arch/arm/mach-mvebu/board-v7.c | 20 +-
arch/arm/mach-mvebu/dove.c | 2 +-
arch/arm/mach-mvebu/kirkwood.c | 2 +-
arch/arm/mach-mvebu/platsmp-a9.c | 2 +
drivers/clk/mvebu/Kconfig | 4 +
drivers/clk/mvebu/Makefile | 1 +
drivers/clk/mvebu/armada-39x.c | 156 +++++++
drivers/clk/mvebu/common.c | 17 +
drivers/clk/mvebu/common.h | 1 +
drivers/pinctrl/mvebu/Kconfig | 4 +
drivers/pinctrl/mvebu/Makefile | 1 +
drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 432 ++++++++++++++++++++
52 files changed, 1045 insertions(+), 524 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/armada-39x.txt
create mode 100644 Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
copy arch/arm/boot/dts/{armada-xp-matrix.dts => armada-390.dtsi} (61%)
copy arch/arm/boot/dts/{armada-388-db.dts => armada-398-db.dts} (70%)
copy arch/arm/boot/dts/{armada-xp-matrix.dts => armada-398.dtsi} (61%)
copy arch/arm/boot/dts/{armada-375.dtsi => armada-39x.dtsi} (55%)
create mode 100644 drivers/clk/mvebu/armada-39x.c
create mode 100644 drivers/pinctrl/mvebu/pinctrl-armada-39x.cSignature · 1 line
2.1.0
PATCH v3 1/20 ARM: mvebu: add __initconst specifiers on DT_MACHINE_START dt_compat tables
As suggested by Stephen Boyd, this commit adds the __initconst specifier to the dt_compat table declarations used by the DT_MACHINE_START structures in mach-mvebu land.
--- arch/arm/mach-mvebu/board-v7.c | 6 +++--- arch/arm/mach-mvebu/dove.c | 2 +- arch/arm/mach-mvebu/kirkwood.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-mvebu/board-v7.c +3 -3
@@ -184,7 +184,7 @@ static void __init mvebu_dt_init(void)of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); } -static const char *const armada_370_xp_dt_compat[] = { +static const char *const armada_370_xp_dt_compat[]__initconst = {"marvell,armada-370-xp" ,NULL , };
@@ -205,7 +205,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)") .dt_compat = armada_370_xp_dt_compat,MACHINE_END -static const char * const armada_375_dt_compat[] = { +static const char * const armada_375_dt_compat[] __initconst = {"marvell,armada375" ,NULL , };
@@ -219,7 +219,7 @@ DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") .dt_compat = armada_375_dt_compat,MACHINE_END -static const char * const armada_38x_dt_compat[] = { +static const char * const armada_38x_dt_compat[] __initconst = {"marvell,armada380" ,"marvell,armada385" ,NULL ,
arch/arm/mach-mvebu/dove.c +1 -1
@@ -27,7 +27,7 @@ static void __init dove_init(void)of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); } -static const char *const dove_dt_compat[] = { +static const char *const dove_dt_compat[]__initconst = {"marvell,dove" ,NULL };
arch/arm/mach-mvebu/kirkwood.c +1 -1
@@ -186,7 +186,7 @@ static void __init kirkwood_dt_init(void)of_platform_populate (NULL , of_default_bus_match_table, auxdata,NULL ); } -static const char *const kirkwood_dt_board_compat[] = { +static const char *const kirkwood_dt_board_compat[]__initconst = {"marvell,kirkwood" ,NULL };
Signature · 1 line
2.1.0
PATCH v3 2/20 ARM: mvebu: fix usb@ unit address on Armada 38x to match register address
In reply to Thomas PetazzoniOn Marvell Armada 38x, the USB2 controller registers are at 0x58000, so the corresponding Device Tree node should have a unit address of 58000, and not 50000. We were using 50000 due to an incorrect copy/pastebin of Armada 370/XP code.
--- arch/arm/boot/dts/armada-388-db.dts | 2 +- arch/arm/boot/dts/armada-388-gp.dts | 2 +- arch/arm/boot/dts/armada-38x.dtsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-388-db.dts +1 -1
@@ -99,7 +99,7 @@ phy-mode = "rgmii-id"; }; - usb at 50000 { + usb at 58000 { status = "ok"; };
arch/arm/boot/dts/armada-388-gp.dts +1 -1
@@ -135,7 +135,7 @@ }; /* CON4 */ - usb at 50000 { + usb at 58000 { vcc-supply = <®_usb2_0_vbus>; status = "okay"; };
arch/arm/boot/dts/armada-38x.dtsi +1 -1
@@ -435,7 +435,7 @@ status = "disabled"; }; - usb at 50000 { + usb at 58000 { compatible = "marvell,orion-ehci"; reg = <0x58000 0x500>; interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.1.0
PATCH v3 3/20 ARM: mvebu: add missing UART labels on Armada 38x
In reply to Thomas PetazzoniThe Armada 38x had a label for UART0, but not UART1. This commit fixes that.
--- arch/arm/boot/dts/armada-38x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-38x.dtsi +1 -1
@@ -216,7 +216,7 @@ status = "disabled"; }; - serial at 12100 { + uart1: serial at 12100 { compatible = "snps,dw-apb-uart"; reg = <0x12100 0x100>; reg-shift = <2>;
Signature · 1 line
2.1.0
PATCH v3 4/20 ARM: mvebu: add UART labels to Armada 375
In reply to Thomas PetazzoniThis commit adds the standard uart0 and uart1 DT labels to the Device Tree description of the Marvell Armada 375 SoC.
--- arch/arm/boot/dts/armada-375.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-375.dtsi +2 -2
@@ -276,7 +276,7 @@ status = "disabled"; }; - serial at 12000 { + uart0: serial at 12000 { compatible = "snps,dw-apb-uart"; reg = <0x12000 0x100>; reg-shift = <2>;
@@ -286,7 +286,7 @@ status = "disabled"; }; - serial at 12100 { + uart1: serial at 12100 { compatible = "snps,dw-apb-uart"; reg = <0x12100 0x100>; reg-shift = <2>;
Signature · 1 line
2.1.0
PATCH v3 5/20 ARM: mvebu: remove aliases for Ethernet devices on Armada 370/375/38x/XP
In reply to Thomas PetazzoniHaving aliases for Ethernet devices is useless, since the networking subsystem unfortunately doesn't care about aliases to name network interfaces.
Note that the 'aliases' nodes in armada-370-xp.dtsi and armada-xp.dtsi become empty, but that we keep it as is since a followup patch will re-add some aliases to it.
--- arch/arm/boot/dts/armada-370-xp.dtsi | 2 -- arch/arm/boot/dts/armada-375.dtsi | 2 -- arch/arm/boot/dts/armada-38x.dtsi | 3 --- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 1 - arch/arm/boot/dts/armada-xp-mv78460.dtsi | 1 - arch/arm/boot/dts/armada-xp.dtsi | 1 - 6 files changed, 10 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +0 -2
@@ -59,8 +59,6 @@ compatible = "marvell,armada-370-xp"; aliases { - eth0 = ð0; - eth1 = ð1; }; cpus {
arch/arm/boot/dts/armada-375.dtsi +0 -2
@@ -60,8 +60,6 @@ gpio0 = &gpio0; gpio1 = &gpio1; gpio2 = &gpio2; - ethernet0 = ð0; - ethernet1 = ð1; }; clocks {
arch/arm/boot/dts/armada-38x.dtsi +0 -3
@@ -59,9 +59,6 @@ aliases { gpio0 = &gpio0; gpio1 = &gpio1; - ethernet0 = ð0; - ethernet1 = ð1; - ethernet2 = ð2; }; soc {
arch/arm/boot/dts/armada-xp-mv78260.dtsi +0 -1
@@ -57,7 +57,6 @@ gpio0 = &gpio0; gpio1 = &gpio1; gpio2 = &gpio2; - eth3 = ð3; }; cpus {
arch/arm/boot/dts/armada-xp-mv78460.dtsi +0 -1
@@ -57,7 +57,6 @@ gpio0 = &gpio0; gpio1 = &gpio1; gpio2 = &gpio2; - eth3 = ð3; };
arch/arm/boot/dts/armada-xp.dtsi +0 -1
@@ -57,7 +57,6 @@ compatible = "marvell,armadaxp", "marvell,armada-370-xp"; aliases { - eth2 = ð2; }; soc {
Signature · 1 line
2.1.0
PATCH v3 6/20 ARM: mvebu: add serial port aliases on Armada 370/375/38x/XP
In reply to Thomas PetazzoniThis commit adds 'serialX' aliases for the various serial ports on Armada 370, 375, 38x and XP platforms. It will allow the usage of the stdout-path property.
--- arch/arm/boot/dts/armada-370-xp.dtsi | 2 ++ arch/arm/boot/dts/armada-375.dtsi | 2 ++ arch/arm/boot/dts/armada-38x.dtsi | 2 ++ arch/arm/boot/dts/armada-xp.dtsi | 2 ++ 4 files changed, 8 insertions(+)
arch/arm/boot/dts/armada-370-xp.dtsi +2 -0
@@ -59,6 +59,8 @@ compatible = "marvell,armada-370-xp"; aliases { + serial0 = &uart0; + serial1 = &uart1; }; cpus {
arch/arm/boot/dts/armada-375.dtsi +2 -0
@@ -60,6 +60,8 @@ gpio0 = &gpio0; gpio1 = &gpio1; gpio2 = &gpio2; + serial0 = &uart0; + serial1 = &uart1; }; clocks {
arch/arm/boot/dts/armada-38x.dtsi +2 -0
@@ -59,6 +59,8 @@ aliases { gpio0 = &gpio0; gpio1 = &gpio1; + serial0 = &uart0; + serial1 = &uart1; }; soc {
arch/arm/boot/dts/armada-xp.dtsi +2 -0
@@ -57,6 +57,8 @@ compatible = "marvell,armadaxp", "marvell,armada-370-xp"; aliases { + serial2 = &uart2; + serial3 = &uart3; }; soc {
Signature · 1 line
2.1.0
PATCH v3 7/20 ARM: mvebu: use stdout-path in all armada-*.dts
In reply to Thomas PetazzoniThis commit adds the stdout-path property in /chosen for all Armada boards that were not yet carrying this property, and gets rid of /chosen/bootargs which becomes unneeded: earlyprintk should not be used by default, and the console= parameter is replaced by the /chosen/stdout-path property.
--- arch/arm/boot/dts/armada-370-db.dts | 2 +- arch/arm/boot/dts/armada-370-mirabox.dts | 2 +- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 2 +- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 2 +- arch/arm/boot/dts/armada-370-rd.dts | 2 +- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 3 +-- arch/arm/boot/dts/armada-375-db.dts | 2 +- arch/arm/boot/dts/armada-385-db-ap.dts | 3 +-- arch/arm/boot/dts/armada-388-db.dts | 2 +- arch/arm/boot/dts/armada-388-gp.dts | 3 +-- arch/arm/boot/dts/armada-388-rd.dts | 2 +- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 2 +- arch/arm/boot/dts/armada-xp-db.dts | 2 +- arch/arm/boot/dts/armada-xp-gp.dts | 2 +- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 3 +-- arch/arm/boot/dts/armada-xp-matrix.dts | 2 +- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 2 +- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 2 +- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 3 +-- 19 files changed, 19 insertions(+), 24 deletions(-)
arch/arm/boot/dts/armada-370-db.dts +1 -1
@@ -55,7 +55,7 @@ compatible = "marvell,a370-db", "marvell,armada370", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-370-mirabox.dts +1 -1
@@ -51,7 +51,7 @@ compatible = "globalscale,mirabox", "marvell,armada370", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-370-netgear-rn102.dts +1 -1
@@ -53,7 +53,7 @@ compatible = "netgear,readynas-102", "marvell,armada370", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-370-netgear-rn104.dts +1 -1
@@ -53,7 +53,7 @@ compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-370-rd.dts +1 -1
@@ -64,7 +64,7 @@ compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-370-synology-ds213j.dts +1 -2
@@ -67,8 +67,7 @@ "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; - stdout-path = &uart0; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-375-db.dts +1 -1
@@ -55,7 +55,7 @@ compatible = "marvell,a375-db", "marvell,armada375"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-385-db-ap.dts +1 -2
@@ -49,8 +49,7 @@ compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada38x"; chosen { - bootargs = "console=ttyS0,115200"; - stdout-path = &uart1; + stdout-path = "serial1:115200n8"; }; memory {
arch/arm/boot/dts/armada-388-db.dts +1 -1
@@ -54,7 +54,7 @@ "marvell,armada385", "marvell,armada380"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-388-gp.dts +1 -2
@@ -48,8 +48,7 @@ compatible = "marvell,a385-gp", "marvell,armada388", "marvell,armada380"; chosen { - bootargs = "console=ttyS0,115200"; - stdout-path = &uart0; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-388-rd.dts +1 -1
@@ -55,7 +55,7 @@ "marvell,armada385","marvell,armada380"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-axpwifiap.dts +1 -1
@@ -59,7 +59,7 @@ compatible = "marvell,rd-axpwifiap", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-db.dts +1 -1
@@ -64,7 +64,7 @@ compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-gp.dts +1 -1
@@ -65,7 +65,7 @@ compatible = "marvell,axp-gp", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts +1 -2
@@ -54,8 +54,7 @@ "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; - stdout-path = &uart0; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-matrix.dts +1 -1
@@ -52,7 +52,7 @@ compatible = "marvell,axp-matrix", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-netgear-rn2120.dts +1 -1
@@ -53,7 +53,7 @@ compatible = "netgear,readynas-2120", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +1 -1
@@ -54,7 +54,7 @@ compatible = "plathome,openblocks-ax3-4", "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; + stdout-path = "serial0:115200n8"; }; memory {
arch/arm/boot/dts/armada-xp-synology-ds414.dts +1 -2
@@ -67,8 +67,7 @@ "marvell,armadaxp", "marvell,armada-370-xp"; chosen { - bootargs = "console=ttyS0,115200 earlyprintk"; - stdout-path = &uart0; + stdout-path = "serial0:115200n8"; }; memory {
Signature · 1 line
2.1.0
PATCH v3 8/20 ARM: mvebu: fix unit address of MPIC nodes
In reply to Thomas PetazzoniThe Device Tree nodes describing the MPIC nodes on Armada 370, 375, 38x and XP had a unit address that did not match the first reg property, as suggested by the ePAPR. This commit fixes that.
--- arch/arm/boot/dts/armada-370-xp.dtsi | 2 +- arch/arm/boot/dts/armada-370.dtsi | 2 +- arch/arm/boot/dts/armada-375.dtsi | 2 +- arch/arm/boot/dts/armada-38x.dtsi | 2 +- arch/arm/boot/dts/armada-xp.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +1 -1
@@ -223,7 +223,7 @@ <0x20250 0x8>; }; - mpic: interrupt-controller at 20000 { + mpic: interrupt-controller at 20a00 { compatible = "marvell,mpic"; #interrupt-cells = <1>; #size-cells = <1>;
arch/arm/boot/dts/armada-370.dtsi +1 -1
@@ -232,7 +232,7 @@ reg = <0x18330 0x4>; }; - interrupt-controller at 20000 { + interrupt-controller at 20a00 { reg = <0x20a00 0x1d0>, <0x21870 0x58>; };
arch/arm/boot/dts/armada-375.dtsi +1 -1
@@ -394,7 +394,7 @@ reg = <0x20000 0x100>, <0x20180 0x20>; }; - mpic: interrupt-controller at 20000 { + mpic: interrupt-controller at 20a00 { compatible = "marvell,mpic"; reg = <0x20a00 0x2d0>, <0x21070 0x58>; #interrupt-cells = <1>;
arch/arm/boot/dts/armada-38x.dtsi +1 -1
@@ -367,7 +367,7 @@ reg = <0x20000 0x100>, <0x20180 0x20>; }; - mpic: interrupt-controller at 20000 { + mpic: interrupt-controller at 20a00 { compatible = "marvell,mpic"; reg = <0x20a00 0x2d0>, <0x21070 0x58>; #interrupt-cells = <1>;
arch/arm/boot/dts/armada-xp.dtsi +1 -1
@@ -154,7 +154,7 @@ clocks = <&coreclk 1>; }; - interrupt-controller at 20000 { + interrupt-controller at 20a00 { reg = <0x20a00 0x2d0>, <0x21070 0x58>; };
Signature · 1 line
2.1.0
PATCH v3 9/20 devicetree: bindings: add DT binding for the Marvell Armada 39x SoC family
In reply to Thomas PetazzoniThe Marvell Armada 39x is a family of two SoCs: the Armada 390 and the Armada 398, with a slightly different number of interfaces. This commit introduces the Device Tree binding that documents the top-level compatible strings for Armada 39x based platforms.
--- Documentation/devicetree/bindings/arm/armada-39x.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/armada-39x.txt
Documentation/devicetree/bindings/arm/armada-39x.txt new file +20 -0
@@ -0,0 +1,20 @@ +Marvell Armada 39x Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 39x family shall have the +following property: + +Required root node property: + + - compatible: must contain "marvell,armada390" + +In addition, boards using the Marvell Armada 398 SoC shall have the +following property before the previous one: + +Required root node property: + +compatible: must contain "marvell,armada398" + +Example: + +compatible = "marvell,a398-db", "marvell,armada398", "marvell,armada390";
Signature · 1 line
2.1.0
PATCH v3 10/20 devicetree: bindings: update DT bindings for Marvell EBU clock support
In reply to Thomas PetazzoniWith the introduction of the Marvell Armada 39x SoC, the DT bindings for Marvell EBU clocks need to be extended. This commit include the corresponding update to the Device Tree bindings documentation.
--- .../devicetree/bindings/clock/mvebu-core-clock.txt | 9 +++++++++ .../devicetree/bindings/clock/mvebu-gated-clock.txt | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/clock/mvebu-core-clock.txt +9 -0
@@ -23,6 +23,14 @@ The following is a list of provided IDs and clock names on Armada 380/385: 2 = l2clk (L2 Cache clock) 3 = ddrclk (DDR clock) +The following is a list of provided IDs and clock names on Armada 39x: + 0 = tclk (Internal Bus clock) + 1 = cpuclk (CPU clock) + 2 = nbclk (Coherent Fabric clock) + 3 = hclk (SDRAM Controller Internal Clock) + 4 = dclk (SDRAM Interface Clock) + 5 = refclk (Reference Clock) + The following is a list of provided IDs and clock names on Kirkwood and Dove: 0 = tclk (Internal Bus clock) 1 = cpuclk (CPU0 clock)
@@ -39,6 +47,7 @@ Required properties: "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks "marvell,armada-375-core-clock" - For Armada 375 SoC core clocks "marvell,armada-380-core-clock" - For Armada 380/385 SoC core clocks + "marvell,armada-390-core-clock" - For Armada 39x SoC core clocks "marvell,armada-xp-core-clock" - For Armada XP SoC core clocks "marvell,dove-core-clock" - for Dove SoC core clocks "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180)
Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt +14 -1
@@ -1,6 +1,6 @@ * Gated Clock bindings for Marvell EBU SoCs -Marvell Armada 370/375/380/385/XP, Dove and Kirkwood allow some +Marvell Armada 370/375/380/385/39x/XP, Dove and Kirkwood allow some peripheral clocks to be gated to save some power. The clock consumer should specify the desired clock by having the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to the
@@ -77,6 +77,18 @@ ID Clock Peripheral 28 xor1 XOR 1 30 sata1 SATA 1 +The following is a list of provided IDs for Armada 39x: +ID Clock Peripheral +----------------------------------- +5 pex1 PCIe 1 +6 pex2 PCIe 2 +7 pex3 PCIe 3 +8 pex0 PCIe 0 +9 usb3h0 USB3 Host 0 +17 sdio SDIO +22 xor0 XOR 0 +28 xor1 XOR 1 + The following is a list of provided IDs for Armada XP: ID Clock Peripheral -----------------------------------
@@ -152,6 +164,7 @@ Required properties: "marvell,armada-370-gating-clock" - for Armada 370 SoC clock gating "marvell,armada-375-gating-clock" - for Armada 375 SoC clock gating "marvell,armada-380-gating-clock" - for Armada 380/385 SoC clock gating + "marvell,armada-390-gating-clock" - for Armada 39x SoC clock gating "marvell,armada-xp-gating-clock" - for Armada XP SoC clock gating "marvell,dove-gating-clock" - for Dove SoC clock gating "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating
Signature · 1 line
2.1.0
PATCH v3 11/20 devicetree: bindings: add Device Tree bindings for Armada 39x pin-muxing controller
In reply to Thomas PetazzoniThis commit adds the Device Tree binding documentation to describe the pin-muxing controller of the Marvell Armada 39x processors. Two variants are supported for the moment: the 88F6920 (Armada 390) and 88F6928 (Armada 398).
--- .../pinctrl/marvell,armada-39x-pinctrl.txt | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt new file +78 -0
@@ -0,0 +1,78 @@ +* Marvell Armada 39x SoC pinctrl driver for mpp + +Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding +part and usage. + +Required properties: +- compatible: "marvell,88f6920-pinctrl", "marvell,88f6928-pinctrl" + depending on the specific variant of the SoC being used. +- reg: register specifier of MPP registers + +Available mpp pins/groups and functions: +Note: brackets (x) are not part of the mpp name for marvell,function and given +only for more detailed description in this document. + +name pins functions +================================================================================ +mpp0 0 gpio, ua0(rxd) +mpp1 1 gpio, ua0(txd) +mpp2 2 gpio, i2c0(sck) +mpp3 3 gpio, i2c0(sda) +mpp4 4 gpio, ua1(txd), ua0(rts), smi(mdc) +mpp5 5 gpio, ua1(rxd), ua0(cts), smi(mdio) +mpp6 6 gpio, dev(cs3), xsmi(mdio) +mpp7 7 gpio, dev(ad9), xsmi(mdc) +mpp8 8 gpio, dev(ad10), ptp(trig) +mpp9 9 gpio, dev(ad11), ptp(clk) +mpp10 10 gpio, dev(ad12), ptp(event) +mpp11 11 gpio, dev(ad13), led(clk) +mpp12 12 gpio, pcie0(rstout), dev(ad14), led(stb) +mpp13 13 gpio, dev(ad15), led(data) +mpp14 14 gpio, m(vtt), dev(wen1), ua1(txd) +mpp15 15 gpio, pcie0(rstout), spi0(mosi), i2c1(sck) +mpp16 16 gpio, m(decc), spi0(miso), i2c1(sda) +mpp17 17 gpio, ua1(rxd), spi0(sck), smi(mdio) +mpp18 18 gpio, ua1(txd), spi0(cs0), i2c2(sck) +mpp19 19 gpio, sata1(present) [1], ua0(cts), ua1(rxd), i2c2(sda) +mpp20 20 gpio, sata0(present) [1], ua0(rts), ua1(txd), smi(mdc) +mpp21 21 gpio, spi0(cs1), sata0(present) [1], sd(cmd), dev(bootcs), ge(rxd0) +mpp22 22 gpio, spi0(mosi), dev(ad0) +mpp23 23 gpio, spi0(sck), dev(ad2) +mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd(d4), dev(readyn) +mpp25 25 gpio, spi0(cs0), ua0(rts), ua1(txd), sd(d5), dev(cs0) +mpp26 26 gpio, spi0(cs2), i2c1(sck), sd(d6), dev(cs1) +mpp27 27 gpio, spi0(cs3), i2c1(sda), sd(d7), dev(cs2), ge(txclkout) +mpp28 28 gpio, sd(clk), dev(ad5), ge(txd0) +mpp29 29 gpio, dev(ale0), ge(txd1) +mpp30 30 gpio, dev(oen), ge(txd2) +mpp31 31 gpio, dev(ale1), ge(txd3) +mpp32 32 gpio, dev(wen0), ge(txctl) +mpp33 33 gpio, m(decc), dev(ad3) +mpp34 34 gpio, dev(ad1) +mpp35 35 gpio, ref(clk), dev(a1) +mpp36 36 gpio, dev(a0) +mpp37 37 gpio, sd(d3), dev(ad8), ge(rxclk) +mpp38 38 gpio, ref(clk), sd(d0), dev(ad4), ge(rxd1) +mpp39 39 gpio, i2c1(sck), ua0(cts), sd(d1), dev(a2), ge(rxd2) +mpp40 40 gpio, i2c1(sda), ua0(rts), sd(d2), dev(ad6), ge(rxd3) +mpp41 41 gpio, ua1(rxd), ua0(cts), spi1(cs3), dev(burstn), nd(rbn0), ge(rxctl) +mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7) +mpp43 43 gpio, pcie0(clkreq), m(vtt), m(decc), spi1(cs2), dev(clkout), nd(rbn1) +mpp44 44 gpio, sata0(present) [1], sata1(present) [1], led(clk) +mpp45 45 gpio, ref(clk), pcie0(rstout), ua1(rxd) +mpp46 46 gpio, ref(clk), pcie0(rstout), ua1(txd), led(stb) +mpp47 47 gpio, sata0(present) [1], sata1(present) [1], led(data) +mpp48 48 gpio, sata0(present) [1], m(vtt), tdm(pclk) [1], audio(mclk) [1], sd(d4), pcie0(clkreq), ua1(txd) +mpp49 49 gpio, tdm(fsync) [1], audio(lrclk) [1], sd(d5), ua2(rxd) +mpp50 50 gpio, pcie0(rstout), tdm(drx) [1], audio(extclk) [1], sd(cmd), ua2(rxd) +mpp51 51 gpio, tdm(dtx) [1], audio(sdo) [1], m(decc), ua2(txd) +mpp52 52 gpio, pcie0(rstout), tdm(intn) [1], audio(sdi) [1], sd(d6), i2c3(sck) +mpp53 53 gpio, sata1(present) [1], sata0(present) [1], tdm(rstn) [1], audio(bclk) [1], sd(d7), i2c3(sda) +mpp54 54 gpio, sata0(present) [1], sata1(present) [1], pcie0(rstout), sd(d3), ua3(txd) +mpp55 55 gpio, ua1(cts), spi1(cs1), sd(d0), ua1(rxd), ua3(rxd) +mpp56 56 gpio, ua1(rts), m(decc), spi1(mosi), ua1(txd) +mpp57 57 gpio, spi1(sck), sd(clk), ua1(txd) +mpp58 58 gpio, i2c1(sck), pcie2(clkreq), spi1(miso), sd(d1), ua1(rxd) +mpp59 59 gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd(d2) + +[1]: only available on 88F6928
Signature · 1 line
2.1.0
PATCH v3 11/20 devicetree: bindings: add Device Tree bindings for Armada 39x pin-muxing controller
Quoted 6 lines · Thomas Petazzoni
This commit adds the Device Tree binding documentation to describe the pin-muxing controller of the Marvell Armada 39x processors. Two variants are supported for the moment: the 88F6920 (Armada 390) and 88F6928 (Armada 398).
Signed-off-by Thomas Petazzoni <[email protected]>
Patch applied to the pinctrl tree.
Yours,
Linus Walleij
PATCH v3 12/20 devicetree: bindings: add new SMP enable method for Marvell Armada 39x
In reply to Thomas PetazzoniThis commit updates the ARM CPUs Device Tree binding to document a new enable method of Marvell Armada 39x processors.
--- Documentation/devicetree/bindings/arm/cpus.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.txt +1 -0
@@ -192,6 +192,7 @@ nodes to be present and contain the properties described below. "brcm,brahma-b15" "marvell,armada-375-smp" "marvell,armada-380-smp" + "marvell,armada-390-smp" "marvell,armada-xp-smp" "qcom,gcc-msm8660" "qcom,kpss-acc-v1"
Signature · 1 line
2.1.0
PATCH v3 13/20 clk: mvebu: extend common code to allow an optional refclk
In reply to Thomas PetazzoniThe Armada 39x, contrary to its predecessor, has a configurable reference clock frequency, of either 25 Mhz, or 40 Mhz. For the previous SoCs, it was fixed to 25 Mhz and described directly as such in the Device Tree.
For Armada 39x, we need to read certain registers to know whether the frequency is 25 or 40 Mhz. Therefore, this commit extends the common mvebu clock code to allow the SoC-specific code to say it wants to register a reference clock, by giving a non-NULL ->get_refclk_freq() function pointer in its coreclk_soc_desc structure.
--- drivers/clk/mvebu/common.c | 17 +++++++++++++++++ drivers/clk/mvebu/common.h | 1 + 2 files changed, 18 insertions(+)
drivers/clk/mvebu/common.c +17 -0
@@ -121,6 +121,11 @@ void __init mvebu_coreclk_setup(struct device_node *np,/* Allocate struct for TCLK, cpu clk, and core ratio clocks */ clk_data.clk_num =2 + desc->num_ratios; + +/* One more clock for the optional refclk */ +if (desc->get_refclk_freq) + clk_data.clk_num +=1 ; + clk_data.clks =kzalloc (clk_data.clk_num *sizeof (struct clk *),GFP_KERNEL );if (WARN_ON (!clk_data.clks)) {
@@ -162,6 +167,18 @@ void __init mvebu_coreclk_setup(struct device_node *np,WARN_ON (IS_ERR (clk_data.clks[2 +n])); }; +/* Register optional refclk */ +if (desc->get_refclk_freq) { +const char *name ="refclk" ; +of_property_read_string_index (np,"clock-output-names" , +2 + desc->num_ratios, &name); + rate = desc->get_refclk_freq (base); + clk_data.clks[2 + desc->num_ratios] = +clk_register_fixed_rate (NULL , name,NULL , +CLK_IS_ROOT , rate); +WARN_ON (IS_ERR (clk_data.clks[2 + desc->num_ratios])); + } +/* SAR register isn't needed anymore */ iounmap (base);
drivers/clk/mvebu/common.h +1 -0
@@ -30,6 +30,7 @@ struct coreclk_soc_desc {u32 (*get_tclk_freq)(void__iomem *sar);u32 (*get_cpu_freq)(void__iomem *sar);void (*get_clk_ratio)(void __iomem *sar,int id,int *mult,int *div); +u32 (*get_refclk_freq)(void__iomem *sar);bool (*is_sscg_enabled)(void __iomem *sar);u32 (*fix_sscg_deviation)(u32 system_clk);const struct coreclk_ratio *ratios;
Signature · 1 line
2.1.0
PATCH v3 14/20 clk: mvebu: add Marvell Armada 39x driver
In reply to Thomas PetazzoniThis commit adds a new clock driver for the Marvell Armada 39x family of processors. This driver is fairly similar to the ones already used on other Marvell EBU processors, with the following main differences:
* Different set of ratios
* Different set of core clocks
* Configurable reference clock in frequency
--- drivers/clk/mvebu/Kconfig | 4 ++ drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/armada-39x.c | 156 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 drivers/clk/mvebu/armada-39x.c
drivers/clk/mvebu/Kconfig +4 -0
@@ -21,6 +21,10 @@ config ARMADA_38X_CLK bool select MVEBU_CLK_COMMON +config ARMADA_39X_CLK + bool + select MVEBU_CLK_COMMON + config ARMADA_XP_CLK bool select MVEBU_CLK_COMMON
drivers/clk/mvebu/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_MVEBU_CLK_COREDIV) += clk-corediv.o obj-$(CONFIG_ARMADA_370_CLK) += armada-370.o obj-$(CONFIG_ARMADA_375_CLK) += armada-375.o obj-$(CONFIG_ARMADA_38X_CLK) += armada-38x.o +obj-$(CONFIG_ARMADA_39X_CLK) += armada-39x.o obj-$(CONFIG_ARMADA_XP_CLK) += armada-xp.o obj-$(CONFIG_DOVE_CLK) += dove.o obj-$(CONFIG_KIRKWOOD_CLK) += kirkwood.o
drivers/clk/mvebu/armada-39x.c new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH v3 15/20 pinctrl: mvebu: add pinctrl driver for Marvell Armada 39x
In reply to Thomas PetazzoniThis commit adds a new pinctrl driver for the Marvell Armada 39x family of processors, which hooks into the existing infrastructure to support pin-muxing on Marvell EBU processors. Two variants of the Armada 39x are supported: 88F6920 (Armada 390) and 88F6928 (Armada 398), which have a few differences in the available functions for certain pins.
--- drivers/pinctrl/mvebu/Kconfig | 4 + drivers/pinctrl/mvebu/Makefile | 1 + drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 432 +++++++++++++++++++++++++++++ 3 files changed, 437 insertions(+) create mode 100644 drivers/pinctrl/mvebu/pinctrl-armada-39x.c
drivers/pinctrl/mvebu/Kconfig +4 -0
@@ -26,6 +26,10 @@ config PINCTRL_ARMADA_38X bool select PINCTRL_MVEBU +config PINCTRL_ARMADA_39X + bool + select PINCTRL_MVEBU + config PINCTRL_ARMADA_XP bool select PINCTRL_MVEBU
drivers/pinctrl/mvebu/Makefile +1 -0
@@ -4,5 +4,6 @@ obj-$(CONFIG_PINCTRL_KIRKWOOD) += pinctrl-kirkwood.o obj-$(CONFIG_PINCTRL_ARMADA_370) += pinctrl-armada-370.o obj-$(CONFIG_PINCTRL_ARMADA_375) += pinctrl-armada-375.o obj-$(CONFIG_PINCTRL_ARMADA_38X) += pinctrl-armada-38x.o +obj-$(CONFIG_PINCTRL_ARMADA_39X) += pinctrl-armada-39x.o obj-$(CONFIG_PINCTRL_ARMADA_XP) += pinctrl-armada-xp.o obj-$(CONFIG_PINCTRL_ORION) += pinctrl-orion.o
drivers/pinctrl/mvebu/pinctrl-armada-39x.c new file +432 -0
432 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH v3 15/20 pinctrl: mvebu: add pinctrl driver for Marvell Armada 39x
Quoted 8 lines · Thomas Petazzoni
This commit adds a new pinctrl driver for the Marvell Armada 39x family of processors, which hooks into the existing infrastructure to support pin-muxing on Marvell EBU processors. Two variants of the Armada 39x are supported: 88F6920 (Armada 390) and 88F6928 (Armada 398), which have a few differences in the available functions for certain pins.
Signed-off-by Thomas Petazzoni <[email protected]>
Already applied this some time ago...
Yours,
Linus Walleij
PATCH v3 16/20 ARM: mvebu: add core support for Armada 39x
In reply to Thomas PetazzoniThis commit adds the core support for Armada 39x, which is quite simple:
- a new Kconfig option which selects the appropriate clock and pinctrl drivers as well as other common features (GIC, L2 cache, SMP, etc.)
- a new DT_MACHINE_START which references the top-level compatible strings supported for the Marvell Armada 39x.
- a new SMP enable-method. The mechanism to enable CPUs for Armada 39x appears to be the same as Armada 38x. However, we do not want to use marvell,armada-380-smp in the Device Tree, in the case of the discovery of a subtle difference in the future, which would require changing the Device Tree. And the enable-method isn't a compatible string: you can't specify several values and expect a fallback on the second string if the first one isn't supported. Therefore, we simply declare the SMP enable method "marvell,armada-390-smp" as doing the same thing as the "marvell,armada-380-smp" one.
--- arch/arm/mach-mvebu/Kconfig | 14 ++++++++++++++ arch/arm/mach-mvebu/board-v7.c | 14 ++++++++++++++ arch/arm/mach-mvebu/platsmp-a9.c | 2 ++ 3 files changed, 30 insertions(+)
arch/arm/mach-mvebu/Kconfig +14 -0
@@ -64,6 +64,20 @@ config MACH_ARMADA_38X Say 'Y' here if you want your kernel to support boards based on the Marvell Armada 380/385 SoC with device tree. +config MACH_ARMADA_39X + bool "Marvell Armada 39x boards" if ARCH_MULTI_V7 + select ARM_GIC + select ARMADA_39X_CLK + select CACHE_L2X0 + select HAVE_ARM_SCU + select HAVE_ARM_TWD if SMP + select HAVE_SMP + select MACH_MVEBU_V7 + select PINCTRL_ARMADA_39X + help + Say 'Y' here if you want your kernel to support boards based + on the Marvell Armada 39x SoC with device tree. + config MACH_ARMADA_XP bool "Marvell Armada XP boards" if ARCH_MULTI_V7 select ARMADA_XP_CLK
arch/arm/mach-mvebu/board-v7.c +14 -0
@@ -232,3 +232,17 @@ DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") .restart = mvebu_restart, .dt_compat = armada_38x_dt_compat, MACHINE_END + +static const char * const armada_39x_dt_compat[] __initconst = { +"marvell,armada390" , +"marvell,armada398" , +NULL , +}; + +DT_MACHINE_START (ARMADA_39X_DT ,"Marvell Armada 39x (Device Tree)" ) + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, + .init_irq = mvebu_init_irq, + .restart = mvebu_restart, + .dt_compat = armada_39x_dt_compat, +MACHINE_END
arch/arm/mach-mvebu/platsmp-a9.c +2 -0
@@ -110,3 +110,5 @@ CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp", &mvebu_cortex_a9_smp_ops);CPU_METHOD_OF_DECLARE (mvebu_armada_380_smp,"marvell,armada-380-smp" , &armada_38x_smp_ops); +CPU_METHOD_OF_DECLARE (mvebu_armada_390_smp,"marvell,armada-390-smp" , + &armada_38x_smp_ops);
Signature · 1 line
2.1.0
PATCH v3 17/20 ARM: mvebu: add Device Tree files for Armada 39x SoC and board
In reply to Thomas PetazzoniThis commit adds the Device Tree files for the Armada 39x family of processors, as well as one Armada 398 Development Board.
Like for other Marvell EBU families, a common armada-39x.dtsi contains the description of the common features of all Armada 39x SoCs, while armada-390.dtsi and armada-398.dtsi respectively describe the specificities of those SoCs.
Finally, an armada-398-db.dts file is added to describe the Armada 398 Development Board itself.
So far, the following features are supported:
* SMP: dual Cortex-A9
* Basic ARM IPs: SCU, timer, GIC, L2 cache
* Basic Marvell IPs: pin-muxing, clocks, system controller, MBus controller, MPIC interrupt controller, timer, CPU reset for SMP, PMSU.
* I2C
* SPI
* SDHCI
* XOR
* NAND
* UART
* PCIe
Additional features will be supported in the future.
--- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/armada-390.dtsi | 57 ++++ arch/arm/boot/dts/armada-398-db.dts | 153 +++++++++++ arch/arm/boot/dts/armada-398.dtsi | 60 +++++ arch/arm/boot/dts/armada-39x.dtsi | 508 ++++++++++++++++++++++++++++++++++++ 5 files changed, 780 insertions(+) create mode 100644 arch/arm/boot/dts/armada-390.dtsi create mode 100644 arch/arm/boot/dts/armada-398-db.dts create mode 100644 arch/arm/boot/dts/armada-398.dtsi create mode 100644 arch/arm/boot/dts/armada-39x.dtsi
arch/arm/boot/dts/Makefile +2 -0
@@ -624,6 +624,8 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \ armada-388-db.dtb \ armada-388-gp.dtb \ armada-388-rd.dtb +dtb-$(CONFIG_MACH_ARMADA_39X) += \ + armada-398-db.dtb dtb-$(CONFIG_MACH_ARMADA_XP) += \ armada-xp-axpwifiap.dtb \ armada-xp-db.dtb \
arch/arm/boot/dts/armada-390.dtsi new file +57 -0
57 lines not on this page · raw message
arch/arm/boot/dts/armada-398-db.dts new file +153 -0
153 lines not on this page · raw message
arch/arm/boot/dts/armada-398.dtsi new file +60 -0
60 lines not on this page · raw message
arch/arm/boot/dts/armada-39x.dtsi new file +508 -0
508 lines not on this page · raw message
Signature · 1 line
2.1.0
PATCH v3 18/20 Documentation: arm: update supported Marvell EBU processors
In reply to Thomas PetazzoniNow that we support Armada 39x, let's add this family of SoC to the Marvell documentation, and a reference to a link with more details about those processors. Unfortunately, no datasheet is publicly available at this time.
--- Documentation/arm/Marvell/README | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/arm/Marvell/README +5 -0
@@ -96,6 +96,11 @@ EBU Armada family 88F6820 88F6828 + Armada 390/398 Flavors: + 88F6920 + 88F6928 + Product infos: http://www.marvell.com/embedded-processors/armada-39x/ + Armada XP Flavors: MV78230 MV78260
Signature · 1 line
2.1.0
PATCH v3 19/20 ARM: mvebu: enable Armada 39x in mvebu_v7_defconfig
In reply to Thomas PetazzoniFollowing the introduction of the Marvell Armada 39x support, let's enabled it by default in mvebu_v7_defconfig.
--- arch/arm/configs/mvebu_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/mvebu_v7_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_ARCH_MVEBU=y CONFIG_MACH_ARMADA_370=y CONFIG_MACH_ARMADA_375=y CONFIG_MACH_ARMADA_38X=y +CONFIG_MACH_ARMADA_39X=y CONFIG_MACH_ARMADA_XP=y CONFIG_MACH_DOVE=y CONFIG_PCI=y
Signature · 1 line
2.1.0
PATCH v3 20/20 ARM: configs: enable Marvell Armada 39x in multi_v7_defconfig
In reply to Thomas PetazzoniFollowing the introduction of the Marvell Armada 39x support, let's enable this support by default in multi_v7_defconfig.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_ARCH_MVEBU=y CONFIG_MACH_ARMADA_370=y CONFIG_MACH_ARMADA_375=y CONFIG_MACH_ARMADA_38X=y +CONFIG_MACH_ARMADA_39X=y CONFIG_MACH_ARMADA_XP=y CONFIG_MACH_DOVE=y CONFIG_ARCH_BCM=y
Signature · 1 line
2.1.0
Olof Johansson
AppliedPATCH v3 20/20 ARM: configs: enable Marvell Armada 39x in multi_v7_defconfig
Quoted 5 lines · Thomas Petazzoni
Following the introduction of the Marvell Armada 39x support, let's enable this support by default in
multi_v7_defconfig.Signed-off-by Thomas Petazzoni <[email protected]>Cc <[email protected]>
Thanks, applied.
-Olof
v3 cover ARM: mvebu: Armada 39x basic support, and preparatory cleanups
In reply to Thomas PetazzoniHi Thomas,
Quoted 118 lines · Thomas Petazzoni
Hello,
This is the third version of the patch series adding Armada 39x basic support.
This set of patches add basic support for a new family of Marvell EBU
processors: the Armada 39x. They are based on Cortex-A9 (like Armada 375 and 38x) and the most important new feature is probably the addition of 10 GbE support.See http://www.marvell.com/embedded-processors/armada-39x/ for a basic introduction.
Note that this web page talks about an Armada 395 and Armada 398, but so far the technical documentation we have been given access to only describes Armada 390 and Armada 398, so this series supports only Armada 390 and Armada 398 so far. Support for Armada 395 might be added in the future, once we get access to the appropriate technical details.
Changes v2 -> v3:
- Rebased on top of v4.0-rc1
- Add support for the L2 cache
- Added Acked-by from Gregory Clement on
ARM: mvebu: add
__initconstspecifiers onDT_MACHINE_STARTdt_compattables
ARM: mvebu: fix usb@ unit address on Armada 38x to match register address
ARM: mvebu: add missing UART alias on Armada 38x
devicetree: bindings: add DT binding for the Marvell Armada 39x SoC family- Renamed 'ARM: mvebu: add missing UART alias on Armada 38x' to 'ARM:
mvebu: add missing UART labels on Armada 38x'.- Added a patch 'ARM: mvebu: add UART labels to Armada 375'.
- Change 'ARM: mvebu: add stdout-path to all armada-*.dts' to go further and eliminate completely /chosen/bootargs. This removes the non-desired 'earlyprintk' argument, and since console= was the only remaining kernel parameter, using stdout-path makes more sense. Requested by Rob Herring and Mark Rutland.
- Dropped the patch "ARM: mvebu: use IRQ macros to define the SDHCI interrupt on Armada 38x" from the series, since Gregory Clement already submitted it as part of a different series.
- Added patches 'ARM: mvebu: enable Armada 39x in
mvebu_v7_defconfig' and 'ARM: configs: enable Marvell Armada 39x inmulti_v7_defconfig' to updatemvebu_v7_defconfigandmulti_v7_defconfigso that they enable Marvell Armada 39x by default. Suggested by Gregory Clement.- Fix the unit address of the MPIC interrupt controller, in both the newly added Armada 39x support, as well as in the existing Armada 370, 375, 38x and XP support. Suggested by Gregory Clement.
Changes v1 -> v2:
- At the SoC level, add the description of SPI controller 0 and 1, NAND flash controller, SDHCI controller, Core Divider Clock (needed by the NAND flash controller), the main PLL clock (needed by the Core Divider Clock) and the XOR engines.
- At the board level, add the description of the SPI flash connected to SPI bus 1, which contains the bootloader, and the description of the NAND flash.
- Fix space vs. tab.
- Use
__initconstwhen defining thedt_compattable for Armada 39x. Suggested by Stephen Boyd.- Fix typo in commit log of "ARM: mvebu: add core support for Armada 39x", noticed by Maxime Ripard.
- Remove earlyprintk from /chosen/bootargs. Suggested by Andrew Lunn.
- Add aliases for uart[0-3]. Suggested by Andrew Lunn.
- Add /chosen/stdout-path to Armada 398 DB DT. Suggested by Andrew Lunn.
- Move pinctrl configurations at the SoC level. Suggested by Andrew Lunn.
- Add several preparation/cleanup patches not related to Armada 39x directly, but whose topics were found while working on Armada 39x support:
- Add
__initconstto alldt_compattable in mach-mvebu.
- Fixup usb@ unit address on Armada 38x
- Add stdout-path to all armada-*.dts
- Use GIC and IRQ macros in SDHCI definition of Armada 38x
- Add missing UART alias on Armada 38xThanks!
Thomas
Thomas Petazzoni (20):
ARM: mvebu: add__initconstspecifiers onDT_MACHINE_STARTdt_compat
tables
ARM: mvebu: fix usb@ unit address on Armada 38x to match register
address
ARM: mvebu: add missing UART labels on Armada 38x
ARM: mvebu: add UART labels to Armada 375
ARM: mvebu: remove aliases for Ethernet devices on Armada370/375/38x/XPARM: mvebu: add serial port aliases on Armada 370/375/38x/XP
ARM: mvebu: use stdout-path in all armada-*.dts
ARM: mvebu: fix unit address of MPIC nodes
devicetree: bindings: add DT binding for the Marvell Armada 39x SoC
family
devicetree: bindings: update DT bindings for Marvell EBU clock support
devicetree: bindings: add Device Tree bindings for Armada 39x
pin-muxing controller
devicetree: bindings: add new SMP enable method for Marvell Armada 39x
Quoted 8 lines
clk: mvebu: extend common code to allow an optional refclk
clk: mvebu: add Marvell Armada 39x driver
pinctrl: mvebu: add pinctrl driver for Marvell Armada 39x
ARM: mvebu: add core support for Armada 39x
ARM: mvebu: add Device Tree files for Armada 39x SoC and board
Documentation: arm: update supported Marvell EBU processors
ARM: mvebu: enable Armada 39x inmvebu_v7_defconfig
ARM: configs: enable Marvell Armada 39x inmulti_v7_defconfig
Patches 1 applied to mvebu/cleanup
Patches 2 to 8 and patch 17 applied to mvebu/dt
Patches 9,12,16 and 18 applied to mvebu/soc
Patch 19 applied to mvebu/defconfig
and
Patches 10,13 and 14 applied to mvebu/clk as requested by Mike.
I had to amend the patch "ARM: mvebu: fix unit address of MPIC nodes" by removing the armada-38x related part which was already applied by the patch "ARM: mvebu: Fix MPIC unit address".
Patch 20 should be directly taken by the arm-soc maintainer.
Thanks,
Gregory
Quoted 63 lines
Documentation/arm/Marvell/README | 5 +
.../devicetree/bindings/arm/armada-39x.txt | 20 +
Documentation/devicetree/bindings/arm/cpus.txt | 1 +
.../devicetree/bindings/clock/mvebu-core-clock.txt | 9 +
.../bindings/clock/mvebu-gated-clock.txt | 15 +-
.../pinctrl/marvell,armada-39x-pinctrl.txt | 78 ++++
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/armada-370-db.dts | 2 +-
arch/arm/boot/dts/armada-370-mirabox.dts | 2 +-
arch/arm/boot/dts/armada-370-netgear-rn102.dts | 2 +-
arch/arm/boot/dts/armada-370-netgear-rn104.dts | 2 +-
arch/arm/boot/dts/armada-370-rd.dts | 2 +-
arch/arm/boot/dts/armada-370-synology-ds213j.dts | 3 +-
arch/arm/boot/dts/armada-370-xp.dtsi | 6 +-
arch/arm/boot/dts/armada-370.dtsi | 2 +-
arch/arm/boot/dts/armada-375-db.dts | 2 +-
arch/arm/boot/dts/armada-375.dtsi | 10 +-
arch/arm/boot/dts/armada-385-db-ap.dts | 3 +-
arch/arm/boot/dts/armada-388-db.dts | 4 +-
arch/arm/boot/dts/armada-388-gp.dts | 5 +-
arch/arm/boot/dts/armada-388-rd.dts | 2 +-
arch/arm/boot/dts/armada-38x.dtsi | 11 +-
.../dts/{armada-xp-matrix.dts => armada-390.dtsi} | 71 +---
.../dts/{armada-388-db.dts => armada-398-db.dts} | 111 ++---
.../dts/{armada-xp-matrix.dts => armada-398.dtsi} | 70 +---
.../boot/dts/{armada-375.dtsi => armada-39x.dtsi} | 446 ++++++++-------------
arch/arm/boot/dts/armada-xp-axpwifiap.dts | 2 +-
arch/arm/boot/dts/armada-xp-db.dts | 2 +-
arch/arm/boot/dts/armada-xp-gp.dts | 2 +-
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 3 +-
arch/arm/boot/dts/armada-xp-matrix.dts | 2 +-
arch/arm/boot/dts/armada-xp-mv78260.dtsi | 1 -
arch/arm/boot/dts/armada-xp-mv78460.dtsi | 1 -
arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 2 +-
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 2 +-
arch/arm/boot/dts/armada-xp-synology-ds414.dts | 3 +-
arch/arm/boot/dts/armada-xp.dtsi | 5 +-
arch/arm/configs/multi_v7_defconfig | 1 +
arch/arm/configs/mvebu_v7_defconfig | 1 +
arch/arm/mach-mvebu/Kconfig | 14 +
arch/arm/mach-mvebu/board-v7.c | 20 +-
arch/arm/mach-mvebu/dove.c | 2 +-
arch/arm/mach-mvebu/kirkwood.c | 2 +-
arch/arm/mach-mvebu/platsmp-a9.c | 2 +
drivers/clk/mvebu/Kconfig | 4 +
drivers/clk/mvebu/Makefile | 1 +
drivers/clk/mvebu/armada-39x.c | 156 +++++++
drivers/clk/mvebu/common.c | 17 +
drivers/clk/mvebu/common.h | 1 +
drivers/pinctrl/mvebu/Kconfig | 4 +
drivers/pinctrl/mvebu/Makefile | 1 +
drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 432 ++++++++++++++++++++
52 files changed, 1045 insertions(+), 524 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/armada-39x.txt
create mode 100644 Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
copy arch/arm/boot/dts/{armada-xp-matrix.dts => armada-390.dtsi} (61%)
copy arch/arm/boot/dts/{armada-388-db.dts => armada-398-db.dts} (70%)
copy arch/arm/boot/dts/{armada-xp-matrix.dts => armada-398.dtsi} (61%)
copy arch/arm/boot/dts/{armada-375.dtsi => armada-39x.dtsi} (55%)
create mode 100644 drivers/clk/mvebu/armada-39x.c
create mode 100644 drivers/pinctrl/mvebu/pinctrl-armada-39x.cSignature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
v3 cover ARM: mvebu: Armada 39x basic support, and preparatory cleanups
Gregory,
Quoted 7 lines · Gregory CLEMENT
Patches 1 applied to mvebu/cleanup
Patches 2 to 8 and patch 17 applied to mvebu/dt
Patches 9,12,16 and 18 applied to mvebu/soc
Patch 19 applied to mvebu/defconfigand
Quoted 7 lines
Patches 10,13 and 14 applied to mvebu/clk as requested by Mike.
I had to amend the patch "ARM: mvebu: fix unit address of MPIC nodes" by removing the armada-38x related part which was already applied by the patch "ARM: mvebu: Fix MPIC unit address".
Patch 20 should be directly taken by the arm-soc maintainer.
Thanks!
So this leaves only:
[PATCH v3 11/20] devicetree: bindings: add Device Tree bindings for Armada 39x pin-muxing controller [PATCH v3 15/20] pinctrl: mvebu: add pinctrl driver for Marvell Armada 39x
to be applied, right? Patch 15/20 has been applied by Linus Walleij already, but from the v1 of the series. I also asked him to merge PATCH v3 11/20.
With this done, and PATCH v2 20/20 merged by the arm-soc maintainers, I guess we should be all set with this patch series.
Thanks again!
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com