Skip to contentSkip to conversation

ARM: mvebu: Add support for SPI flash devices in Armada 370/XP

PATCH New Ezequiel Garcia 4 participants 15 messages Feb 6, 2013 – Feb 16, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: mvebu: Add support for SPI flash devices in Armada 370/XP

This is second version of the SPI patchset for Armada 370/XP.

This series first adds support for the SPI controller and then adds the SPI flash for the Armada XP GP board.

This series is based on 3.8-rc5 plus:
* "arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"
* "arm: mvebu: i2c come back in defconfig"

Feel free to test or provide any feedback!

Ezequiel Garcia (4):
arm: mvebu: Add support for SPI controller in Armada 370/XP
ARM: mvebu: Update defconfig to select SPI support
arm: mvebu: Add SPI flash on Armada XP-GP board
ARM: mvebu: Update defconfig to select SPI flash and MTD support

 arch/arm/boot/dts/armada-370-xp.dtsi |   22 ++++++++++++++++++++++
 arch/arm/boot/dts/armada-xp-gp.dts   |   12 ++++++++++++
 arch/arm/configs/mvebu_defconfig     |    5 +++++
 3 files changed, 39 insertions(+), 0 deletions(-)

Thanks,

Ezequiel

Signature · 1 line
1.7.8.6
#1 lore raw

PATCH v2 1/4 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.

---
Changes from v1:
* Register offset must be 0x28 instead of 0x50,
as pointed out by Gregory

 arch/arm/boot/dts/armada-370-xp.dtsi |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +22 -0
index 4c0abe8..5cf8fb4 100644
@@ -131,6 +131,28 @@
 			clocks = <&coreclk 0>;
 			status = "disabled";
 		};
+
+		spi0: spi at d0010600 {
+			compatible = "marvell,orion-spi";
+			reg = <0xd0010600 0x28>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			cell-index = <0>;
+			interrupts = <30>;
+			clocks = <&coreclk 0>;
+			status = "disabled";
+		};
+
+		spi1: spi at d0010680 {
+			compatible = "marvell,orion-spi";
+			reg = <0xd0010680 0x28>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			cell-index = <1>;
+			interrupts = <92>;
+			clocks = <&coreclk 0>;
+			status = "disabled";
+		};
 	};
 };
 
Signature · 1 line
1.7.8.6
Applied
#2 lore raw

PATCH v2 1/4 arm: mvebu: Add support for SPI controller in Armada 370/XP

Quoted 12 lines · Ezequiel Garcia

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.

Quoted 7 lines

---
Changes from v1:
* Register offset must be 0x28 instead of 0x50,
as pointed out by Gregory

 arch/arm/boot/dts/armada-370-xp.dtsi |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

Applied to mvebu/dt, resolved an add/add (i2c, mvsdio, usb) conflict.

thx,

Jason.

#3 lore raw

PATCH v2 2/4 ARM: mvebu: Update defconfig to select SPI support

In reply to Ezequiel Garcia
---
 arch/arm/configs/mvebu_defconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/configs/mvebu_defconfig +2 -0
index 43a0dbf..322baca 100644
@@ -35,6 +35,8 @@ CONFIG_MARVELL_PHY=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_I2C=y
+CONFIG_SPI=y
+CONFIG_SPI_ORION=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_GPIOLIB=y
Signature · 1 line
1.7.8.6
Applied
#4 lore raw

PATCH v2 2/4 ARM: mvebu: Update defconfig to select SPI support

Quoted 7 lines · Ezequiel Garcia
---
 arch/arm/configs/mvebu_defconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Applied to mvebu/boards

thx,

Jason.

Quoted 22 lines
arch/arm/configs/mvebu_defconfig +2 -0
index 43a0dbf..322baca 100644
@@ -35,6 +35,8 @@ CONFIG_MARVELL_PHY=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_I2C=y
+CONFIG_SPI=y
+CONFIG_SPI_ORION=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_GPIOLIB=y
Signature · 7 lines
1.7.8.6


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw

PATCH v2 3/4 arm: mvebu: Add SPI flash on Armada XP-GP board

In reply to Ezequiel Garcia

This patch adds an SPI master device node for Armada XP-GP board. This master node is an SPI flash controller 'n25q128a13'.

Since there is no 'partitions' node declared, one full sized partition named as the device will be created.

---
Depends on Gregory's patch for Armada XP GP board:
"arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"

 arch/arm/boot/dts/armada-xp-gp.dts |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/boot/dts/armada-xp-gp.dts +12 -0
index 872ed04..b1aa952 100644
@@ -97,5 +97,17 @@
 			phy = <&phy3>;
 			phy-mode = "rgmii-id";
 		};
+
+		spi0: spi at d0010600 {
+			status = "okay";
+
+			spi-flash at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "n25q128a13";
+				reg = <0>; /* Chip select 0 */
+				spi-max-frequency = <108000000>;
+			};
+		};
 	};
 };
Signature · 1 line
1.7.8.6
Applied
#6 lore raw

PATCH v2 3/4 arm: mvebu: Add SPI flash on Armada XP-GP board

Quoted 10 lines · Ezequiel Garcia

This patch adds an SPI master device node for Armada XP-GP board. This master node is an SPI flash controller 'n25q128a13'.

Since there is no 'partitions' node declared, one full sized partition named as the device will be created.

Quoted 6 lines

---
Depends on Gregory's patch for Armada XP GP board:
"arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"

 arch/arm/boot/dts/armada-xp-gp.dts |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

Applied to mvebu/dt

thx,

Jason.

#7 lore raw

PATCH v2 4/4 ARM: mvebu: Update defconfig to select SPI flash and MTD support

In reply to Ezequiel Garcia

The Armada XP DB-MV784MP-GP board has an SPI flash device. These options allow to access that device over MTD.

---
Depends on patch: "arm: mvebu: i2c come back in defconfig"

 arch/arm/configs/mvebu_defconfig |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/configs/mvebu_defconfig +3 -0
index 322baca..3359535 100644
@@ -38,6 +38,9 @@ CONFIG_I2C=y
 CONFIG_SPI=y
 CONFIG_SPI_ORION=y
 CONFIG_I2C_MV64XXX=y
+CONFIG_MTD=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SERIAL_8250_DW=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
Signature · 1 line
1.7.8.6
Applied
#8 lore raw

PATCH v2 4/4 ARM: mvebu: Update defconfig to select SPI flash and MTD support

Quoted 9 lines · Ezequiel Garcia

The Armada XP DB-MV784MP-GP board has an SPI flash device. These options allow to access that device over MTD.

---
Depends on patch: "arm: mvebu: i2c come back in defconfig"

 arch/arm/configs/mvebu_defconfig |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied to mvebu/boards

thx,

Jason.

#9 lore raw

PATCH v2 4/4 ARM: mvebu: Update defconfig to select SPI flash and MTD support

Hi Jason,

Quoted 4 lines · Jason Cooper
Quoted 3 lines · Ezequiel Garcia

The Armada XP DB-MV784MP-GP board has an SPI flash device. These options allow to access that device over MTD.

Quoted 9 lines
Quoted 6 lines

---
Depends on patch: "arm: mvebu: i2c come back in defconfig"

 arch/arm/configs/mvebu_defconfig |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied to mvebu/boards

Great!

Are we still in time for a pull request for v3.9
with all of these stuff?

Thanks a lot,

Signature · 3 lines
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
#10 lore raw

PATCH v2 4/4 ARM: mvebu: Update defconfig to select SPI flash and MTD support

Quoted 14 lines · Ezequiel Garcia

Hi Jason,

Quoted 11 lines · Jason Cooper
Quoted 9 lines · Ezequiel Garcia

The Armada XP DB-MV784MP-GP board has an SPI flash device. These options allow to access that device over MTD.

---
Depends on patch: "arm: mvebu: i2c come back in defconfig"

 arch/arm/configs/mvebu_defconfig |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 7 lines
Quoted 2 lines

Applied to mvebu/boards

Great!

Are we still in time for a pull request for v3.9
with all of these stuff?

With any amount of luck, possibly ;-)

Jason.

#11 lore raw

v2 cover ARM: mvebu: Add support for SPI flash devices in Armada 370/XP

In reply to Ezequiel Garcia
Quoted 11 lines · Ezequiel Garcia

This is second version of the SPI patchset for Armada 370/XP.

This series first adds support for the SPI controller and then adds the SPI flash for the Armada XP GP board.

This series is based on 3.8-rc5 plus:
* "arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"
* "arm: mvebu: i2c come back in defconfig"

Feel free to test or provide any feedback!

Ezequiel,

I reviewed the patches, I have nothing more to say, I can add my:

on the patch that didn't have yet.

Jason,
could you add this series in your incoming pull request?

Thanks,

Quoted 15 lines

Ezequiel Garcia (4):
arm: mvebu: Add support for SPI controller in Armada 370/XP
ARM: mvebu: Update defconfig to select SPI support
arm: mvebu: Add SPI flash on Armada XP-GP board
ARM: mvebu: Update defconfig to select SPI flash and MTD support

 arch/arm/boot/dts/armada-370-xp.dtsi |   22 ++++++++++++++++++++++
 arch/arm/boot/dts/armada-xp-gp.dts   |   12 ++++++++++++
 arch/arm/configs/mvebu_defconfig     |    5 +++++
 3 files changed, 39 insertions(+), 0 deletions(-)

Thanks,

Ezequiel

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw

v2 cover ARM: mvebu: Add support for SPI flash devices in Armada 370/XP

Quoted 14 lines · Gregory CLEMENT
Quoted 11 lines · Ezequiel Garcia

This is second version of the SPI patchset for Armada 370/XP.

This series first adds support for the SPI controller and then adds the SPI flash for the Armada XP GP board.

This series is based on 3.8-rc5 plus:
* "arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"
* "arm: mvebu: i2c come back in defconfig"

Feel free to test or provide any feedback!

Ezequiel,

Quoted 8 lines

I reviewed the patches, I have nothing more to say, I can add my:

on the patch that didn't have yet.

Jason,
could you add this series in your incoming pull request?

That's the plan. I'm waiting for a response from Olof to see If I need to redo /boards and /dt. In either case, my next round of pull requests with have this and a bunch of other stuff.

thx,

Jason.

#13 lore raw

v2 cover ARM: mvebu: Add support for SPI flash devices in Armada 370/XP

Hi Jason,

Quoted 19 lines · Jason Cooper
Quoted 18 lines · Gregory CLEMENT
Quoted 11 lines · Ezequiel Garcia

This is second version of the SPI patchset for Armada 370/XP.

This series first adds support for the SPI controller and then adds the SPI flash for the Armada XP GP board.

This series is based on 3.8-rc5 plus:
* "arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"
* "arm: mvebu: i2c come back in defconfig"

Feel free to test or provide any feedback!

Ezequiel,

I reviewed the patches, I have nothing more to say, I can add my:

Quoted 9 lines
Quoted 4 lines

on the patch that didn't have yet.

Jason,
could you add this series in your incoming pull request?

That's the plan. I'm waiting for a response from Olof to see If I need to redo /boards and /dt. In either case, my next round of pull requests with have this and a bunch of other stuff.

Despite we're almost closed for v3.9 new material, I hope you don't mind a little ping on the USB and SPI stuff.

I'd *really* love to see these in v3.9, if at all possible.

Thanks,

Signature · 1 line
    Ezequiel
#14 lore raw

v2 cover ARM: mvebu: Add support for SPI flash devices in Armada 370/XP

Quoted 32 lines · Ezequiel Garcia

Hi Jason,

Quoted 19 lines · Jason Cooper
Quoted 18 lines · Gregory CLEMENT
Quoted 11 lines · Ezequiel Garcia

This is second version of the SPI patchset for Armada 370/XP.

This series first adds support for the SPI controller and then adds the SPI flash for the Armada XP GP board.

This series is based on 3.8-rc5 plus:
* "arm: mvebu: support for the new Armada XP development board(DB-MV784MP-GP)"
* "arm: mvebu: i2c come back in defconfig"

Feel free to test or provide any feedback!

Ezequiel,

I reviewed the patches, I have nothing more to say, I can add my:

Quoted 9 lines
Quoted 4 lines

on the patch that didn't have yet.

Jason,
could you add this series in your incoming pull request?

That's the plan. I'm waiting for a response from Olof to see If I need to redo /boards and /dt. In either case, my next round of pull requests with have this and a bunch of other stuff.

Quoted 4 lines

Despite we're almost closed for v3.9 new material, I hope you don't mind a little ping on the USB and SPI stuff.

I'd *really* love to see these in v3.9, if at all possible.

Yes, I got called out for a few days and just got back into things today. once I've read evreything I'll do what I can.

thx,

Jason.