arm64: marvell: improve support for Armada 7K/8K
Subsystems (3)
v3 cover arm64: marvell: improve support for Armada 7K/8K
Hello,
This is the third version of the set of patches improving support for Marvell Armada 7K/8K. It brings:
- Cleanups to the existing Device Tree files, suggested by Andreas F?rber.
- Switch to the new clock binding for the AP806 and misc other improvements (stdout-path, SPI flash description improvements, etc.)
- Addition of the description for the CP110 part of the Armada 7K/8K, which brings features like PCIe, SATA, USB3, more I2C and SPI controllers.
Changes since v3:
- Integration of the patches from Andreas F?rber regarding the 7K/8K platform. I took them in my patch series as they interacted/conflicted badly with the other changes I had.
- Addition of a patch making use of stdout-path, as suggested by Andreas F?rber.
- Addition of a patch improving the SPI flash description, for the SPI flash connected to the AP part.
- Addition of a patch fixing the AP I2C controller description to make use of the bridge/offload functionality.
- Addition of support for SATA, USB3, I2C and SPI in the description of the CP110.
- Addition of patches updating the arm64 defconfig with necessary additional drivers, and updating the MAINTAINERS entry for Armada platforms.
Thanks!
Thomas
Andreas F?rber (2):
arm64: dts: marvell: clean up armada-7040-db
arm64: dts: marvell: rename armada-ap806 XOR nodes
Thomas Petazzoni (9):
arm64: marvell: enable AP806 and CP110 syscon driver
arm64: dts: marvell: add UART aliases and define stdout-path
arm64: dts: marvell: use new clock binding on Armada AP806
arm64: dts: marvell: improve SPI flash description on Armada 7040-DB
arm64: dts: marvell: use the proper I2C controller compatible string
for 7K/8K
arm64: dts: marvell: initial DT description of Armada 7K/8K CP110
master
arm64: dts: marvell: enable several CP interfaces on Armada 7040-DB
arm64: configs: add options useful for Armada 7K/8K support
MAINTAINERS: update entry for Marvell ARM platform maintainers
MAINTAINERS | 2 +- arch/arm64/Kconfig.platforms | 4 +- arch/arm64/boot/dts/marvell/armada-7020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-7040-db.dts | 108 +++++++--- arch/arm64/boot/dts/marvell/armada-7040.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8040.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi | 1 - arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 2 - arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 56 +++-- .../boot/dts/marvell/armada-cp110-master.dtsi | 228 +++++++++++++++++++++ arch/arm64/configs/defconfig | 4 + 12 files changed, 345 insertions(+), 64 deletions(-) create mode 100644 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
Signature · 1 line
2.6.4
PATCH v3 1/11 arm64: marvell: enable AP806 and CP110 syscon driver
The Marvell Armada 7K/8K support needs the AP806 and CP110 syscon drivers to be enabled, as they provide amongst other things, the main clocks for those platforms.
--- arch/arm64/Kconfig.platforms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/Kconfig.platforms +2 -2
@@ -64,8 +64,8 @@ config ARCH_MESON config ARCH_MVEBU bool "Marvell EBU SoC Family" - select ARMADA_AP806_CORE_CLK - select ARMADA_AP806_RING_CLK + select ARMADA_AP806_SYSCON + select ARMADA_CP110_SYSCON select MVEBU_ODMI help This enables support for Marvell EBU familly, including:
Signature · 1 line
2.6.4
PATCH v3 2/11 arm64: dts: marvell: clean up armada-7040-db
In reply to Thomas PetazzoniFrom: Andreas F?rber <[email protected]>
Instead of duplicating the node hierarchy, reference the nodes by label, adding labels where necessary.
Drop some trailing or inconsistent white lines while at it.
--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 52 ++++++++++------------ arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi | 1 - arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 2 - arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 7 +-- 4 files changed, 26 insertions(+), 36 deletions(-)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +24 -28
@@ -55,38 +55,34 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; +}; - ap806 { - config-space { - spi at 510600 { - status = "okay"; - - spi-flash at 0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "n25q128a13"; - reg = <0>; /* Chip select 0 */ - spi-max-frequency = <10000000>; +&i2c0 { + status = "okay"; + clock-frequency = <100000>; +}; - partition at 0 { - label = "U-Boot"; - reg = <0 0x200000>; - }; - partition at 400000 { - label = "Filesystem"; - reg = <0x200000 0xce0000>; - }; - }; - }; +&spi0 { + status = "okay"; - i2c at 511000 { - status = "okay"; - clock-frequency = <100000>; - }; + spi-flash at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "n25q128a13"; + reg = <0>; /* Chip select 0 */ + spi-max-frequency = <10000000>; - serial at 512000 { - status = "okay"; - }; + partition at 0 { + label = "U-Boot"; + reg = <0 0x200000>; + }; + partition at 400000 { + label = "Filesystem"; + reg = <0x200000 0xce0000>; }; }; }; + +&uart0 { + status = "okay"; +};
arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi +0 -1
@@ -68,4 +68,3 @@ }; }; }; -
arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi +0 -2
@@ -79,6 +79,4 @@ enable-method = "psci"; }; }; - }; -
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +2 -5
@@ -59,7 +59,6 @@ method = "smc"; }; - ap806 { #address-cells = <2>; #size-cells = <2>;
@@ -190,7 +189,7 @@ status = "disabled"; }; - serial at 512000 { + uart0: serial at 512000 { compatible = "snps,dw-apb-uart"; reg = <0x512000 0x100>; reg-shift = <2>;
@@ -200,7 +199,7 @@ status = "disabled"; }; - serial at 512100 { + uart1: serial at 512100 { compatible = "snps,dw-apb-uart"; reg = <0x512100 0x100>; reg-shift = <2>;
@@ -232,6 +231,4 @@ }; }; }; - }; -
Signature · 1 line
2.6.4
PATCH v3 3/11 arm64: dts: marvell: rename armada-ap806 XOR nodes
In reply to Thomas PetazzoniFrom: Andreas F?rber <[email protected]>
Node names should not contain an instance number, the unit address serves to distinguish nodes of the same name. So rename the XOR nodes to just xor@<address>.
[Thomas:
- remove labels, they are really not needed for XOR engines.
- remove the Fixes: tag, as this is not a fix.]
--- arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +4 -4
@@ -135,7 +135,7 @@ marvell,spi-base = <128>, <136>, <144>, <152>; }; - xor0 at 400000 { + xor at 400000 { compatible = "marvell,mv-xor-v2"; reg = <0x400000 0x1000>, <0x410000 0x1000>;
@@ -143,7 +143,7 @@ dma-coherent; }; - xor1 at 420000 { + xor at 420000 { compatible = "marvell,mv-xor-v2"; reg = <0x420000 0x1000>, <0x430000 0x1000>;
@@ -151,7 +151,7 @@ dma-coherent; }; - xor2 at 440000 { + xor at 440000 { compatible = "marvell,mv-xor-v2"; reg = <0x440000 0x1000>, <0x450000 0x1000>;
@@ -159,7 +159,7 @@ dma-coherent; }; - xor3 at 460000 { + xor at 460000 { compatible = "marvell,mv-xor-v2"; reg = <0x460000 0x1000>, <0x470000 0x1000>;
Signature · 1 line
2.6.4
PATCH v3 4/11 arm64: dts: marvell: add UART aliases and define stdout-path
In reply to Thomas PetazzoniThis commit adds the necessary UART aliases to the main Armada 7K/8K .dtsi file, and uses them to define the /chosen/stdout-path property on the Armada 7040 DB board.
--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 4 ++++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 5 +++++ 2 files changed, 9 insertions(+)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +4 -0
@@ -51,6 +51,10 @@ compatible = "marvell,armada7040-db", "marvell,armada7040", "marvell,armada-ap806-quad", "marvell,armada-ap806"; + chosen { + stdout-path = "serial0:115200n8"; + }; + memory at 00000000 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>;
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +5 -0
@@ -54,6 +54,11 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + serial0 = &uart0; + serial1 = &uart1; + }; + psci { compatible = "arm,psci-0.2"; method = "smc";
Signature · 1 line
2.6.4
PATCH v3 5/11 arm64: dts: marvell: use new clock binding on Armada AP806
In reply to Thomas PetazzoniThis commit updates the Marvell AP806 Device Tree description to make use of the accepted clock Device Tree binding.
--- arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 34 ++++++++++----------------- 1 file changed, 12 insertions(+), 22 deletions(-)
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +12 -22
@@ -179,7 +179,7 @@ #size-cells = <0>; cell-index = <0>; interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&ringclk 2>; + clocks = <&ap_syscon 3>; status = "disabled"; };
@@ -190,7 +190,7 @@ #size-cells = <0>; interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; timeout-ms = <1000>; - clocks = <&ringclk 2>; + clocks = <&ap_syscon 3>; status = "disabled"; };
@@ -200,7 +200,7 @@ reg-shift = <2>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <1>; - clocks = <&ringclk 2>; + clocks = <&ap_syscon 3>; status = "disabled"; };
@@ -210,29 +210,19 @@ reg-shift = <2>; interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; reg-io-width = <1>; - clocks = <&ringclk 2>; + clocks = <&ap_syscon 3>; status = "disabled"; }; - dfx-server at 6f8000 { - compatible = "simple-mfd", "syscon"; - reg = <0x6f8000 0x70000>; - - coreclk: clk at 204 { - compatible = "marvell,armada-ap806-core-clock"; - #clock-cells = <1>; - clock-output-names = "ddr", "ring", "cpu"; - }; - - ringclk: clk at 250 { - compatible = "marvell,armada-ap806-ring-clock"; - #clock-cells = <1>; - clock-output-names = "ring-0", "ring-2", - "ring-3", "ring-4", - "ring-5"; - clocks = <&coreclk 1>; - }; + ap_syscon: system-controller at 6f4000 { + compatible = "marvell,ap806-system-controller", + "syscon"; + #clock-cells = <1>; + clock-output-names = "ap-cpu-cluster-0", + "ap-cpu-cluster-1", + "ap-fixed", "ap-mss"; + reg = <0x6f4000 0x1000>; }; }; };
Signature · 1 line
2.6.4
PATCH v3 6/11 arm64: dts: marvell: improve SPI flash description on Armada 7040-DB
In reply to Thomas PetazzoniThis commit slightly improves the description of the SPI flash connected to the SPI controller of the Armada 7040, by:
- Using the more generic "jedec,spi-nor" compatible string, which lets the driver auto-detect the exact SPI flash type.
- Removing the silly comment about the Chip Select, since reg = <0> is explicit enough.
- Switching to the new Device Tree binding to describe flash partitions.
--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +15 -9
@@ -72,17 +72,23 @@ spi-flash at 0 { #address-cells = <1>; #size-cells = <1>; - compatible = "n25q128a13"; - reg = <0>; /* Chip select 0 */ + compatible = "jedec,spi-nor"; + reg = <0>; spi-max-frequency = <10000000>; - partition at 0 { - label = "U-Boot"; - reg = <0 0x200000>; - }; - partition at 400000 { - label = "Filesystem"; - reg = <0x200000 0xce0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "U-Boot"; + reg = <0 0x200000>; + }; + partition at 400000 { + label = "Filesystem"; + reg = <0x200000 0xce0000>; + }; }; }; };
Signature · 1 line
2.6.4
PATCH v3 7/11 arm64: dts: marvell: use the proper I2C controller compatible string for 7K/8K
In reply to Thomas PetazzoniThe I2C controller found in the Marvell Armada 7K/8K provides the bridge/offloading features, so the Device Tree should use the marvell,mv78230-i2c compatible string instead of marvell,mv64xxx-i2c.
--- arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/marvell/armada-ap806.dtsi +1 -1
@@ -184,7 +184,7 @@ }; i2c0: i2c at 511000 { - compatible = "marvell,mv64xxx-i2c"; + compatible = "marvell,mv78230-i2c"; reg = <0x511000 0x20>; #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.6.4
PATCH v3 8/11 arm64: dts: marvell: initial DT description of Armada 7K/8K CP110 master
In reply to Thomas PetazzoniThis commit adds an initial Device Tree description for the CP110 master that is found in the Armada 7K and 8K SoCs. This initial description describes:
- the system controller (to provide clocks)
- three PCIe interfaces
- the SATA interface
- the I2C controllers
- the SPI controllers
For the record, the organization of the SoCs is as follows:
- 7020: dual-core AP, one CP110 (master)
- 7040: quad-core AP, one CP110 (master)
- 8020: dual-core AP, two CP110s (master and slave)
- 8040: quad-core AP, two CP110s (master and slave)
For this reason, all of the 7020, 7040, 8020 and 8040 include armada-cp110-master.dtsi. When support for the second CP110 (slave) used in 8020 and 8040 will be added, the .dtsi files for those SoCs will in addition include armada-cp110-slave.dtsi.
--- arch/arm64/boot/dts/marvell/armada-7020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-7040.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8040.dtsi | 1 + .../boot/dts/marvell/armada-cp110-master.dtsi | 228 +++++++++++++++++++++ 5 files changed, 232 insertions(+) create mode 100644 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
arch/arm64/boot/dts/marvell/armada-7020.dtsi +1 -0
@@ -46,6 +46,7 @@ */ #include "armada-ap806-dual.dtsi" +#include "armada-cp110-master.dtsi" / { model = "Marvell Armada 7020";
arch/arm64/boot/dts/marvell/armada-7040.dtsi +1 -0
@@ -46,6 +46,7 @@ */ #include "armada-ap806-quad.dtsi" +#include "armada-cp110-master.dtsi" / { model = "Marvell Armada 7040";
arch/arm64/boot/dts/marvell/armada-8020.dtsi +1 -0
@@ -46,6 +46,7 @@ */ #include "armada-ap806-dual.dtsi" +#include "armada-cp110-master.dtsi" / { model = "Marvell Armada 8020";
arch/arm64/boot/dts/marvell/armada-8040.dtsi +1 -0
@@ -46,6 +46,7 @@ */ #include "armada-ap806-quad.dtsi" +#include "armada-cp110-master.dtsi" / { model = "Marvell Armada 8040";
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi new file +228 -0
228 lines not on this page · raw message
Signature · 1 line
2.6.4
PATCH v3 9/11 arm64: dts: marvell: enable several CP interfaces on Armada 7040-DB
In reply to Thomas PetazzoniThis commit enables several interfaces of the CP side of the Armada 7040 for the Armada 7040 DB board:
- one PCIe interface
- one SPI controller with an attached SPI flash
- one I2C controller
- one SATA controller
- two USB3 controllers
--- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
arch/arm64/boot/dts/marvell/armada-7040-db.dts +50 -0
@@ -96,3 +96,53 @@ &uart0 { status = "okay"; }; + + +&cpm_pcie2 { + status = "okay"; +}; + +&cpm_i2c0 { + status = "okay"; + clock-frequency = <100000>; +}; + +&cpm_spi1 { + status = "okay"; + + spi-flash at 0 { + #address-cells = <0x1>; + #size-cells = <0x1>; + compatible = "jedec,spi-nor"; + reg = <0x0>; + spi-max-frequency = <20000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "U-Boot"; + reg = <0x0 0x200000>; + }; + + partition at 400000 { + label = "Filesystem"; + reg = <0x200000 0xe00000>; + }; + }; + }; +}; + +&cpm_sata0 { + status = "okay"; +}; + +&cpm_usb3_0 { + status = "okay"; +}; + +&cpm_usb3_1 { + status = "okay"; +};
Signature · 1 line
2.6.4
PATCH v3 10/11 arm64: configs: add options useful for Armada 7K/8K support
In reply to Thomas PetazzoniThis commit updates the ARM64 defconfig to include additional options useful to support the Armada 7K/8K platforms:
- the SPI controller driver, spi-orion
- the support for SPI flashes
--- arch/arm64/configs/defconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/configs/defconfig +4 -0
@@ -90,6 +90,9 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_DMA_CMA=y +CONFIG_MTD=y +CONFIG_MTD_M25P80=y +CONFIG_MTD_SPI_NOR=y CONFIG_BLK_DEV_LOOP=y CONFIG_VIRTIO_BLK=y # CONFIG_SCSI_PROC_FS is not set
@@ -151,6 +154,7 @@ CONFIG_I2C_QUP=y CONFIG_I2C_UNIPHIER_F=y CONFIG_I2C_RCAR=y CONFIG_SPI=y +CONFIG_SPI_ORION=y CONFIG_SPI_PL022=y CONFIG_SPI_QUP=y CONFIG_SPMI=y
Signature · 1 line
2.6.4
PATCH v3 11/11 MAINTAINERS: update entry for Marvell ARM platform maintainers
In reply to Thomas PetazzoniThe Marvell platform support is no longer limited to Armada 370, 375, 38x and XP, but now also includes the 32-bits Armada 39x and the 64-bits Armada 3700 and 7K/8K.
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -1310,7 +1310,7 @@ ARM/MAGICIAN MACHINE SUPPORT M: Philipp Zabel <[email protected]> S: Maintained -ARM/Marvell Kirkwood and Armada 370, 375, 38x, XP SOC support +ARM/Marvell Kirkwood and Armada 370, 375, 38x, 39x, XP, 3700, 7K/8K SOC support M: Jason Cooper <[email protected]> M: Andrew Lunn <[email protected]> M: Gregory Clement <[email protected]>
Signature · 1 line
2.6.4
v3 cover arm64: marvell: improve support for Armada 7K/8K
In reply to Thomas PetazzoniHi Thomas,
Quoted 8 lines · Thomas Petazzoni
Hello,
This is the third version of the set of patches improving support for Marvell Armada 7K/8K. It brings:
- Cleanups to the existing Device Tree files, suggested by Andreas F?rber.
Quoted 7 lines
- Switch to the new clock binding for the AP806 and misc other improvements (stdout-path, SPI flash description improvements, etc.)
- Addition of the description for the CP110 part of the Armada 7K/8K, which brings features like PCIe, SATA, USB3, more I2C and SPI controllers.
Patches 1 and 11 applied on mvebu/arm64 Patches 2 to 9 applied on mvebu/dt64 Patches 10 applied on mvebu/defconfig
Thanks,
Gregory
[...]
Quoted 37 lines
Thomas
Andreas F?rber (2):
arm64: dts: marvell: clean up armada-7040-db
arm64: dts: marvell: rename armada-ap806 XOR nodesThomas Petazzoni (9):
arm64: marvell: enable AP806 and CP110 syscon driver
arm64: dts: marvell: add UART aliases and define stdout-path
arm64: dts: marvell: use new clock binding on Armada AP806
arm64: dts: marvell: improve SPI flash description on Armada 7040-DB
arm64: dts: marvell: use the proper I2C controller compatible stringfor 7K/8Karm64: dts: marvell: initial DT description of Armada 7K/8K CP110
master
arm64: dts: marvell: enable several CP interfaces on Armada 7040-DB
arm64: configs: add options useful for Armada 7K/8K support
MAINTAINERS: update entry for Marvell ARM platform maintainersMAINTAINERS | 2 +- arch/arm64/Kconfig.platforms | 4 +- arch/arm64/boot/dts/marvell/armada-7020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-7040-db.dts | 108 +++++++--- arch/arm64/boot/dts/marvell/armada-7040.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8020.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-8040.dtsi | 1 + arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi | 1 - arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 2 - arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 56 +++-- .../boot/dts/marvell/armada-cp110-master.dtsi | 228 +++++++++++++++++++++ arch/arm64/configs/defconfig | 4 + 12 files changed, 345 insertions(+), 64 deletions(-) create mode 100644 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsiSignature · 1 line
2.6.4
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com