linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix baud rate for Armada SoCs
@ 2015-05-26  9:44 Gregory CLEMENT
  2015-05-26  9:44 ` [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP Gregory CLEMENT
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-26  9:44 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, devicetree

Hi,

The commit df59fa7f4bca "spi: orion: support armada extended baud
rates" was too optimistic for the maximum baud rate that the Armada
SoCs can support. Fixing it is the purpose of the 1st patch.

Actually the Armada SoCs do not have the same constraints, some of
them have maximum absolute values whereas for the other it is linked
to the TCLK value. The second patch takes care of managing all these
cases.

Then the third patch updates the dtsi in order to use the accurate
value.

Only the first patch fixes a bug observed on the board by using a too
high frequency on the SPI bus. The other ones allow using the best
maximum frequency available.

Thanks,

Gregory


Gregory CLEMENT (3):
  spi: orion: Fix maximum baud rates for Armada 370/XP
  spi: orion: Fix extended baud rates for each Armada SoCs
  ARM: mvebu: use improved armada spi device tree compatible name for
    each SoC

 .../devicetree/bindings/spi/spi-orion.txt          |  8 ++-
 arch/arm/boot/dts/armada-370-xp.dtsi               |  2 -
 arch/arm/boot/dts/armada-370.dtsi                  |  4 ++
 arch/arm/boot/dts/armada-375.dtsi                  |  6 +-
 arch/arm/boot/dts/armada-38x.dtsi                  |  6 +-
 arch/arm/boot/dts/armada-39x.dtsi                  |  6 +-
 arch/arm/boot/dts/armada-xp.dtsi                   |  8 +++
 drivers/spi/spi-orion.c                            | 70 ++++++++++++++++++++--
 8 files changed, 96 insertions(+), 14 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP
  2015-05-26  9:44 [PATCH 0/3] Fix baud rate for Armada SoCs Gregory CLEMENT
@ 2015-05-26  9:44 ` Gregory CLEMENT
  2015-05-26 10:36   ` Mark Brown
  2015-05-26  9:44 ` [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs Gregory CLEMENT
  2015-05-26  9:44 ` [PATCH 3/3] ARM: mvebu: use improved armada spi device tree compatible name for each SoC Gregory CLEMENT
  2 siblings, 1 reply; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-26  9:44 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, devicetree, stable

The commit df59fa7f4bca "spi: orion: support armada extended baud
rates" was too optimistic for the maximum baud rate that the Armada
SoCs can support. According to the hardware datasheet the maximum
frequency supported by the Armada 370 SoC is tclk/4. But for the
Armada XP, Armada 38x and Armada 39x SoCs the limitation is 50MHz and
for the Armada 375 it is tclk/15.

Currently the armada-370-spi compatible is only used by the Armada 370
and the Armada XP device tree. On Armada 370, tclk cannot be higher
than 200MHz. In order to be able to handle both SoCs, we can take the
minimum of 50MHz and tclk/4.

A proper solution is adding a compatible string for each SoC, but it
can't be done as a fix for compatibility reason (we can't modify
device tree that have been already released) and it will be part of a
separate patch.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reported-by: Kostya Porotchkin <kostap@marvell.com>
Cc: <stable@vger.kernel.org> #Fixes df59fa7f4bca
---
 drivers/spi/spi-orion.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index 861664776672..ff97cabdaa81 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -61,6 +61,12 @@ enum orion_spi_type {
 
 struct orion_spi_dev {
 	enum orion_spi_type	typ;
+	/*
+	 * min_divisor and max_hz should be exclusive, the only we can
+	 * have both is for managing the armada-370-spi case with old
+	 * device tree
+	 */
+	unsigned long		max_hz;
 	unsigned int		min_divisor;
 	unsigned int		max_divisor;
 	u32			prescale_mask;
@@ -387,8 +393,9 @@ static const struct orion_spi_dev orion_spi_dev_data = {
 
 static const struct orion_spi_dev armada_spi_dev_data = {
 	.typ = ARMADA_SPI,
-	.min_divisor = 1,
+	.min_divisor = 4,
 	.max_divisor = 1920,
+	.max_hz = 50000000,
 	.prescale_mask = ARMADA_SPI_CLK_PRESCALE_MASK,
 };
 
@@ -454,7 +461,21 @@ static int orion_spi_probe(struct platform_device *pdev)
 		goto out;
 
 	tclk_hz = clk_get_rate(spi->clk);
-	master->max_speed_hz = DIV_ROUND_UP(tclk_hz, devdata->min_divisor);
+
+	/*
+	 * With old device tree, armada-370-spi could be used with
+	 * Armada XP, however for this SoC the maximum frequency is
+	 * 50MHz instead of tclk/4. On Armada 370, tclk cannot be
+	 * higher than 200MHz. So, in order to be able to handle both
+	 * SoCs, we can take the minimum of 50MHz and tclk/4.
+	 */
+	if (of_device_is_compatible(pdev->dev.of_node,
+					"marvell,armada-370-spi"))
+		master->max_speed_hz = min(devdata->max_hz,
+				DIV_ROUND_UP(tclk_hz, devdata->min_divisor));
+	else
+		master->max_speed_hz =
+			DIV_ROUND_UP(tclk_hz, devdata->min_divisor);
 	master->min_speed_hz = DIV_ROUND_UP(tclk_hz, devdata->max_divisor);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-26  9:44 [PATCH 0/3] Fix baud rate for Armada SoCs Gregory CLEMENT
  2015-05-26  9:44 ` [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP Gregory CLEMENT
@ 2015-05-26  9:44 ` Gregory CLEMENT
  2015-05-26 10:38   ` Mark Brown
  2015-05-26 12:08   ` Andrew Lunn
  2015-05-26  9:44 ` [PATCH 3/3] ARM: mvebu: use improved armada spi device tree compatible name for each SoC Gregory CLEMENT
  2 siblings, 2 replies; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-26  9:44 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, devicetree

The commit df59fa7f4bca "spi: orion: support armada extended baud
rates" made the assumptions that all the Armada SoCs supported the
same maximum frequency. However, according the hardware datasheet, the
maximum frequency supported by the Armada 370 SoC is tclk/4, for the
Armada XP, Armada 38x and Armada 39x SoCs the limitation is 50MHz and
for the Armada 375 it is tclk/15.

This patch introduces new compatible strings to handle all these
case. In order to be future proof a compatible was created for each
SoC even if currently some SoCs seem using the same IP.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 .../devicetree/bindings/spi/spi-orion.txt          |  8 +++-
 drivers/spi/spi-orion.c                            | 47 ++++++++++++++++++++--
 2 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-orion.txt b/Documentation/devicetree/bindings/spi/spi-orion.txt
index 50c3a3de61c1..51d63df3d99d 100644
--- a/Documentation/devicetree/bindings/spi/spi-orion.txt
+++ b/Documentation/devicetree/bindings/spi/spi-orion.txt
@@ -1,7 +1,13 @@
 Marvell Orion SPI device
 
 Required properties:
-- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi".
+- compatible : should be on of the following:
+    - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs
+    - "marvell,armada-370-spi", for the Armada 370 SoCs
+    - "marvell,armada-375-spi", for the Armada 375 SoCs
+    - "marvell,armada-380-spi", for the Armada 38x SoCs
+    - "marvell,armada-390-spi", for the Armada 38x SoCs
+    - "marvell,armada-xp-spi", for the Armada XP SoCs
 - reg : offset and length of the register set for the device
 - cell-index : Which of multiple SPI controllers is this.
 Optional properties:
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index ff97cabdaa81..8cad107a5b3f 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -391,7 +391,7 @@ static const struct orion_spi_dev orion_spi_dev_data = {
 	.prescale_mask = ORION_SPI_CLK_PRESCALE_MASK,
 };
 
-static const struct orion_spi_dev armada_spi_dev_data = {
+static const struct orion_spi_dev armada_370_spi_dev_data = {
 	.typ = ARMADA_SPI,
 	.min_divisor = 4,
 	.max_divisor = 1920,
@@ -399,9 +399,46 @@ static const struct orion_spi_dev armada_spi_dev_data = {
 	.prescale_mask = ARMADA_SPI_CLK_PRESCALE_MASK,
 };
 
+static const struct orion_spi_dev armada_xp_spi_dev_data = {
+	.typ = ARMADA_SPI,
+	.max_hz = 50000000,
+	.max_divisor = 1920,
+	.prescale_mask = ARMADA_SPI_CLK_PRESCALE_MASK,
+};
+
+static const struct orion_spi_dev armada_375_spi_dev_data = {
+	.typ = ARMADA_SPI,
+	.min_divisor = 15,
+	.max_divisor = 1920,
+	.prescale_mask = ARMADA_SPI_CLK_PRESCALE_MASK,
+};
+
 static const struct of_device_id orion_spi_of_match_table[] = {
-	{ .compatible = "marvell,orion-spi", .data = &orion_spi_dev_data, },
-	{ .compatible = "marvell,armada-370-spi", .data = &armada_spi_dev_data, },
+	{
+		.compatible = "marvell,orion-spi",
+		.data = &orion_spi_dev_data,
+	},
+	{
+		.compatible = "marvell,armada-370-spi",
+		.data = &armada_370_spi_dev_data,
+	},
+	{
+		.compatible = "marvell,armada-375-spi",
+		.data = &armada_375_spi_dev_data,
+	},
+	{
+		.compatible = "marvell,armada-380-spi",
+		.data = &armada_xp_spi_dev_data,
+	},
+	{
+		.compatible = "marvell,armada-390-spi",
+		.data = &armada_xp_spi_dev_data,
+	},
+	{
+		.compatible = "marvell,armada-xp-spi",
+		.data = &armada_xp_spi_dev_data,
+	},
+
 	{}
 };
 MODULE_DEVICE_TABLE(of, orion_spi_of_match_table);
@@ -473,9 +510,11 @@ static int orion_spi_probe(struct platform_device *pdev)
 					"marvell,armada-370-spi"))
 		master->max_speed_hz = min(devdata->max_hz,
 				DIV_ROUND_UP(tclk_hz, devdata->min_divisor));
-	else
+	else if (devdata->min_divisor)
 		master->max_speed_hz =
 			DIV_ROUND_UP(tclk_hz, devdata->min_divisor);
+	else
+		master->max_speed_hz = devdata->max_hz;
 	master->min_speed_hz = DIV_ROUND_UP(tclk_hz, devdata->max_divisor);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/3] ARM: mvebu: use improved armada spi device tree compatible name for each SoC
  2015-05-26  9:44 [PATCH 0/3] Fix baud rate for Armada SoCs Gregory CLEMENT
  2015-05-26  9:44 ` [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP Gregory CLEMENT
  2015-05-26  9:44 ` [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs Gregory CLEMENT
@ 2015-05-26  9:44 ` Gregory CLEMENT
  2015-05-27 10:04   ` Gregory CLEMENT
  2 siblings, 1 reply; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-26  9:44 UTC (permalink / raw)
  To: Mark Brown, linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory CLEMENT
  Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, devicetree

Use the new compatible introduced in rder to beneficiate of a wider
and more accurate range of baud rates to be used.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-xp.dtsi | 2 --
 arch/arm/boot/dts/armada-370.dtsi    | 4 ++++
 arch/arm/boot/dts/armada-375.dtsi    | 6 ++++--
 arch/arm/boot/dts/armada-38x.dtsi    | 6 ++++--
 arch/arm/boot/dts/armada-39x.dtsi    | 6 ++++--
 arch/arm/boot/dts/armada-xp.dtsi     | 8 ++++++++
 6 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index ec96f0b36346..7f0252c580e4 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -149,7 +149,6 @@
 			};
 
 			spi0: spi@10600 {
-				compatible = "marvell,armada-370-spi", "marvell,orion-spi";
 				reg = <0x10600 0x28>;
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -160,7 +159,6 @@
 			};
 
 			spi1: spi@10680 {
-				compatible = "marvell,armada-370-spi", "marvell,orion-spi";
 				reg = <0x10680 0x28>;
 				#address-cells = <1>;
 				#size-cells = <0>;
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index 00b50db57c9c..3f036bd635f4 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -139,11 +139,15 @@
 			 * board level if a different configuration is used.
 			 */
 			spi0: spi@10600 {
+				compatible = "marvell,armada-370-spi",
+						"marvell,orion-spi";
 				pinctrl-0 = <&spi0_pins1>;
 				pinctrl-names = "default";
 			};
 
 			spi1: spi@10680 {
+				compatible = "marvell,armada-370-spi",
+						"marvell,orion-spi";
 				pinctrl-0 = <&spi1_pins>;
 				pinctrl-names = "default";
 			};
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index f076ff856d8b..67a0ab0f71e0 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -238,7 +238,8 @@
 			};
 
 			spi0: spi@10600 {
-				compatible = "marvell,orion-spi";
+				compatible = "marvell,armada-375-spi",
+						"marvell,orion-spi";
 				reg = <0x10600 0x50>;
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -249,7 +250,8 @@
 			};
 
 			spi1: spi@10680 {
-				compatible = "marvell,orion-spi";
+				compatible = "marvell,armada-375-spi",
+						"marvell,orion-spi";
 				reg = <0x10680 0x50>;
 				#address-cells = <1>;
 				#size-cells = <0>;
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 218a2acd36e5..eace85db7c8c 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -167,7 +167,8 @@
 			};
 
 			spi0: spi@10600 {
-				compatible = "marvell,orion-spi";
+				compatible = "marvell,armada-380-spi",
+						"marvell,orion-spi";
 				reg = <0x10600 0x50>;
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -178,7 +179,8 @@
 			};
 
 			spi1: spi@10680 {
-				compatible = "marvell,orion-spi";
+				compatible = "marvell,armada-380-spi",
+						"marvell,orion-spi";
 				reg = <0x10680 0x50>;
 				#address-cells = <1>;
 				#size-cells = <0>;
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
index ecd1318109ba..fc9864f85fc2 100644
--- a/arch/arm/boot/dts/armada-39x.dtsi
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -128,7 +128,8 @@
 			};
 
 			spi0: spi@10600 {
-				compatible = "marvell,orion-spi";
+				compatible = "marvell,armada-390-spi",
+						"marvell,orion-spi";
 				reg = <0x10600 0x50>;
 				#address-cells = <1>;
 				#size-cells = <0>;
@@ -139,7 +140,8 @@
 			};
 
 			spi1: spi@10680 {
-				compatible = "marvell,orion-spi";
+				compatible = "marvell,armada-390-spi",
+						"marvell,orion-spi";
 				reg = <0x10680 0x50>;
 				#address-cells = <1>;
 				#size-cells = <0>;
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 013d63f69e36..e78ce4ab6b75 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -85,10 +85,18 @@
 			};
 
 			spi0: spi@10600 {
+				compatible = "marvell,armada-xp-spi",
+						"marvell,orion-spi";
 				pinctrl-0 = <&spi0_pins>;
 				pinctrl-names = "default";
 			};
 
+			spi1: spi@10680 {
+				compatible = "marvell,armada-xp-spi",
+						"marvell,orion-spi";
+			};
+
+
 			i2c0: i2c@11000 {
 				compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
 				reg = <0x11000 0x100>;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP
  2015-05-26  9:44 ` [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP Gregory CLEMENT
@ 2015-05-26 10:36   ` Mark Brown
  2015-05-26 12:08     ` Gregory CLEMENT
  0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2015-05-26 10:36 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree, stable

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

On Tue, May 26, 2015 at 11:44:42AM +0200, Gregory CLEMENT wrote:

> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> Reported-by: Kostya Porotchkin <kostap@marvell.com>
> Cc: <stable@vger.kernel.org> #Fixes df59fa7f4bca

Applied, but please format this stuff in a standard fashion - use a
Fixes: tag to reference commits you're fixing.  This makes it easier for
tooling to work with the information you're providing.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-26  9:44 ` [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs Gregory CLEMENT
@ 2015-05-26 10:38   ` Mark Brown
  2015-05-26 12:08   ` Andrew Lunn
  1 sibling, 0 replies; 13+ messages in thread
From: Mark Brown @ 2015-05-26 10:38 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On Tue, May 26, 2015 at 11:44:43AM +0200, Gregory CLEMENT wrote:
> The commit df59fa7f4bca "spi: orion: support armada extended baud
> rates" made the assumptions that all the Armada SoCs supported the
> same maximum frequency. However, according the hardware datasheet, the
> maximum frequency supported by the Armada 370 SoC is tclk/4, for the
> Armada XP, Armada 38x and Armada 39x SoCs the limitation is 50MHz and
> for the Armada 375 it is tclk/15.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP
  2015-05-26 10:36   ` Mark Brown
@ 2015-05-26 12:08     ` Gregory CLEMENT
  0 siblings, 0 replies; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-26 12:08 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-spi, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree, stable

Hi Mark,

On 26/05/2015 12:36, Mark Brown wrote:
> On Tue, May 26, 2015 at 11:44:42AM +0200, Gregory CLEMENT wrote:
> 
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> Reported-by: Kostya Porotchkin <kostap@marvell.com>
>> Cc: <stable@vger.kernel.org> #Fixes df59fa7f4bca
> 
> Applied, but please format this stuff in a standard fashion - use a
> Fixes: tag to reference commits you're fixing.  This makes it easier for
> tooling to work with the information you're providing.

Yes, sure, I will do. I followed the Documentation/stable_kernel_rules.txt
file and I missed the new information in Documentation/SubmittingPatches
about this tag.

Thanks,

Gregory




-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-26  9:44 ` [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs Gregory CLEMENT
  2015-05-26 10:38   ` Mark Brown
@ 2015-05-26 12:08   ` Andrew Lunn
  2015-05-26 12:20     ` Gregory CLEMENT
  1 sibling, 1 reply; 13+ messages in thread
From: Andrew Lunn @ 2015-05-26 12:08 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Mark Brown, linux-spi, linux-kernel, Jason Cooper,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree

> --- a/Documentation/devicetree/bindings/spi/spi-orion.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-orion.txt
> @@ -1,7 +1,13 @@
>  Marvell Orion SPI device
>  
>  Required properties:
> -- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi".
> +- compatible : should be on of the following:
> +    - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs
> +    - "marvell,armada-370-spi", for the Armada 370 SoCs
> +    - "marvell,armada-375-spi", for the Armada 375 SoCs
> +    - "marvell,armada-380-spi", for the Armada 38x SoCs
> +    - "marvell,armada-390-spi", for the Armada 38x SoCs

Hi Gregory

Is that a typ0?

   Andrew

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-26 12:08   ` Andrew Lunn
@ 2015-05-26 12:20     ` Gregory CLEMENT
  2015-05-27 17:45       ` Mark Brown
  0 siblings, 1 reply; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-26 12:20 UTC (permalink / raw)
  To: Andrew Lunn, Mark Brown
  Cc: linux-spi, linux-kernel, Jason Cooper, Sebastian Hesselbarth,
	Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel,
	Maxime Ripard, Boris BREZILLON, Lior Amsalem, Tawfik Bayouk,
	Nadav Haklai, devicetree

Hi Andrew, Mark,

On 26/05/2015 14:08, Andrew Lunn wrote:
>> --- a/Documentation/devicetree/bindings/spi/spi-orion.txt
>> +++ b/Documentation/devicetree/bindings/spi/spi-orion.txt
>> @@ -1,7 +1,13 @@
>>  Marvell Orion SPI device
>>  
>>  Required properties:
>> -- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi".
>> +- compatible : should be on of the following:
>> +    - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs
>> +    - "marvell,armada-370-spi", for the Armada 370 SoCs
>> +    - "marvell,armada-375-spi", for the Armada 375 SoCs
>> +    - "marvell,armada-380-spi", for the Armada 38x SoCs
>> +    - "marvell,armada-390-spi", for the Armada 38x SoCs
> 
> Hi Gregory
> 
> Is that a typ0?

yes it is! :/

Mark do you want a new patch or do you prefer fixing the typo
yourself ? it should be
    - "marvell,armada-390-spi", for the Armada 39x SoCs
instead of
    - "marvell,armada-390-spi", for the Armada 38x SoCs

s/38x/39x/ on this line.


Thanks,

Gregory


> 
>    Andrew
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/3] ARM: mvebu: use improved armada spi device tree compatible name for each SoC
  2015-05-26  9:44 ` [PATCH 3/3] ARM: mvebu: use improved armada spi device tree compatible name for each SoC Gregory CLEMENT
@ 2015-05-27 10:04   ` Gregory CLEMENT
  0 siblings, 0 replies; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-27 10:04 UTC (permalink / raw)
  To: linux-spi
  Cc: Mark Brown, linux-kernel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree

Hi,

On 26/05/2015 11:44, Gregory CLEMENT wrote:
> Use the new compatible introduced in rder to beneficiate of a wider
> and more accurate range of baud rates to be used.
> 

As the driver part was applied, I applied this patch
on mvebu/dt
Thanks,

Gregory


> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  arch/arm/boot/dts/armada-370-xp.dtsi | 2 --
>  arch/arm/boot/dts/armada-370.dtsi    | 4 ++++
>  arch/arm/boot/dts/armada-375.dtsi    | 6 ++++--
>  arch/arm/boot/dts/armada-38x.dtsi    | 6 ++++--
>  arch/arm/boot/dts/armada-39x.dtsi    | 6 ++++--
>  arch/arm/boot/dts/armada-xp.dtsi     | 8 ++++++++
>  6 files changed, 24 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
> index ec96f0b36346..7f0252c580e4 100644
> --- a/arch/arm/boot/dts/armada-370-xp.dtsi
> +++ b/arch/arm/boot/dts/armada-370-xp.dtsi
> @@ -149,7 +149,6 @@
>  			};
>  
>  			spi0: spi@10600 {
> -				compatible = "marvell,armada-370-spi", "marvell,orion-spi";
>  				reg = <0x10600 0x28>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> @@ -160,7 +159,6 @@
>  			};
>  
>  			spi1: spi@10680 {
> -				compatible = "marvell,armada-370-spi", "marvell,orion-spi";
>  				reg = <0x10680 0x28>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
> index 00b50db57c9c..3f036bd635f4 100644
> --- a/arch/arm/boot/dts/armada-370.dtsi
> +++ b/arch/arm/boot/dts/armada-370.dtsi
> @@ -139,11 +139,15 @@
>  			 * board level if a different configuration is used.
>  			 */
>  			spi0: spi@10600 {
> +				compatible = "marvell,armada-370-spi",
> +						"marvell,orion-spi";
>  				pinctrl-0 = <&spi0_pins1>;
>  				pinctrl-names = "default";
>  			};
>  
>  			spi1: spi@10680 {
> +				compatible = "marvell,armada-370-spi",
> +						"marvell,orion-spi";
>  				pinctrl-0 = <&spi1_pins>;
>  				pinctrl-names = "default";
>  			};
> diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
> index f076ff856d8b..67a0ab0f71e0 100644
> --- a/arch/arm/boot/dts/armada-375.dtsi
> +++ b/arch/arm/boot/dts/armada-375.dtsi
> @@ -238,7 +238,8 @@
>  			};
>  
>  			spi0: spi@10600 {
> -				compatible = "marvell,orion-spi";
> +				compatible = "marvell,armada-375-spi",
> +						"marvell,orion-spi";
>  				reg = <0x10600 0x50>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> @@ -249,7 +250,8 @@
>  			};
>  
>  			spi1: spi@10680 {
> -				compatible = "marvell,orion-spi";
> +				compatible = "marvell,armada-375-spi",
> +						"marvell,orion-spi";
>  				reg = <0x10680 0x50>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
> index 218a2acd36e5..eace85db7c8c 100644
> --- a/arch/arm/boot/dts/armada-38x.dtsi
> +++ b/arch/arm/boot/dts/armada-38x.dtsi
> @@ -167,7 +167,8 @@
>  			};
>  
>  			spi0: spi@10600 {
> -				compatible = "marvell,orion-spi";
> +				compatible = "marvell,armada-380-spi",
> +						"marvell,orion-spi";
>  				reg = <0x10600 0x50>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> @@ -178,7 +179,8 @@
>  			};
>  
>  			spi1: spi@10680 {
> -				compatible = "marvell,orion-spi";
> +				compatible = "marvell,armada-380-spi",
> +						"marvell,orion-spi";
>  				reg = <0x10680 0x50>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
> index ecd1318109ba..fc9864f85fc2 100644
> --- a/arch/arm/boot/dts/armada-39x.dtsi
> +++ b/arch/arm/boot/dts/armada-39x.dtsi
> @@ -128,7 +128,8 @@
>  			};
>  
>  			spi0: spi@10600 {
> -				compatible = "marvell,orion-spi";
> +				compatible = "marvell,armada-390-spi",
> +						"marvell,orion-spi";
>  				reg = <0x10600 0x50>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> @@ -139,7 +140,8 @@
>  			};
>  
>  			spi1: spi@10680 {
> -				compatible = "marvell,orion-spi";
> +				compatible = "marvell,armada-390-spi",
> +						"marvell,orion-spi";
>  				reg = <0x10680 0x50>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
> diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
> index 013d63f69e36..e78ce4ab6b75 100644
> --- a/arch/arm/boot/dts/armada-xp.dtsi
> +++ b/arch/arm/boot/dts/armada-xp.dtsi
> @@ -85,10 +85,18 @@
>  			};
>  
>  			spi0: spi@10600 {
> +				compatible = "marvell,armada-xp-spi",
> +						"marvell,orion-spi";
>  				pinctrl-0 = <&spi0_pins>;
>  				pinctrl-names = "default";
>  			};
>  
> +			spi1: spi@10680 {
> +				compatible = "marvell,armada-xp-spi",
> +						"marvell,orion-spi";
> +			};
> +
> +
>  			i2c0: i2c@11000 {
>  				compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
>  				reg = <0x11000 0x100>;
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-26 12:20     ` Gregory CLEMENT
@ 2015-05-27 17:45       ` Mark Brown
  2015-05-27 17:47         ` Gregory CLEMENT
  0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2015-05-27 17:45 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Andrew Lunn, linux-spi, linux-kernel, Jason Cooper,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

On Tue, May 26, 2015 at 02:20:08PM +0200, Gregory CLEMENT wrote:

> Mark do you want a new patch or do you prefer fixing the typo
> yourself ? it should be

I fixed it up locally (in general it's easier to just send the patch
though).

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-27 17:45       ` Mark Brown
@ 2015-05-27 17:47         ` Gregory CLEMENT
  2015-05-27 18:39           ` Mark Brown
  0 siblings, 1 reply; 13+ messages in thread
From: Gregory CLEMENT @ 2015-05-27 17:47 UTC (permalink / raw)
  To: Mark Brown
  Cc: Andrew Lunn, linux-spi, linux-kernel, Jason Cooper,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree

Hi Mark,

On 27/05/2015 19:45, Mark Brown wrote:
> On Tue, May 26, 2015 at 02:20:08PM +0200, Gregory CLEMENT wrote:
> 
>> Mark do you want a new patch or do you prefer fixing the typo
>> yourself ? it should be
> 
> I fixed it up locally (in general it's easier to just send the patch
> though).
> 

Thanks! And next time I will send a v2 then if it is easier for you.

Gregory


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs
  2015-05-27 17:47         ` Gregory CLEMENT
@ 2015-05-27 18:39           ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2015-05-27 18:39 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Andrew Lunn, linux-spi, linux-kernel, Jason Cooper,
	Sebastian Hesselbarth, Thomas Petazzoni, Ezequiel Garcia,
	linux-arm-kernel, Maxime Ripard, Boris BREZILLON, Lior Amsalem,
	Tawfik Bayouk, Nadav Haklai, devicetree

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

On Wed, May 27, 2015 at 07:47:47PM +0200, Gregory CLEMENT wrote:
> On 27/05/2015 19:45, Mark Brown wrote:

> > I fixed it up locally (in general it's easier to just send the patch
> > though).

> Thanks! And next time I will send a v2 then if it is easier for you.

I'd say it's just easier in general - "can you please either fix this up
locally or apply this patch" means that whatever the answer is it can be
acted on immediately.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-05-27 18:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26  9:44 [PATCH 0/3] Fix baud rate for Armada SoCs Gregory CLEMENT
2015-05-26  9:44 ` [PATCH 1/3] spi: orion: Fix maximum baud rates for Armada 370/XP Gregory CLEMENT
2015-05-26 10:36   ` Mark Brown
2015-05-26 12:08     ` Gregory CLEMENT
2015-05-26  9:44 ` [PATCH 2/3] spi: orion: Fix extended baud rates for each Armada SoCs Gregory CLEMENT
2015-05-26 10:38   ` Mark Brown
2015-05-26 12:08   ` Andrew Lunn
2015-05-26 12:20     ` Gregory CLEMENT
2015-05-27 17:45       ` Mark Brown
2015-05-27 17:47         ` Gregory CLEMENT
2015-05-27 18:39           ` Mark Brown
2015-05-26  9:44 ` [PATCH 3/3] ARM: mvebu: use improved armada spi device tree compatible name for each SoC Gregory CLEMENT
2015-05-27 10:04   ` Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).