Skip to contentSkip to conversation

ARM: dts: armada-{370, xp}: drop "marvell, orion-spi" from SPI controllers

PATCH New Uwe Kleine-König 4 participants 5 messages Dec 7, 2016 – Sep 9, 2021 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: armada-{370, xp}: drop "marvell, orion-spi" from SPI controllers

From: Uwe Kleine-K?nig <[email protected]>

The SPI controllers on Armada 370 and XP differ from the original Orion SPI controllers (at least) in the configuration of the baud rate. So it's wrong to claim compatibility which results in bogus baud rates.

---
 arch/arm/boot/dts/armada-370.dtsi | 4 ++--
 arch/arm/boot/dts/armada-xp.dtsi  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-370.dtsi +2 -2
index b4258105e91f..b9377c11b379 100644
@@ -435,13 +435,13 @@
  * board level if a different configuration is used.
  */
 &spi0 {
-	compatible = "marvell,armada-370-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-370-spi";
 	pinctrl-0 = <&spi0_pins1>;
 	pinctrl-names = "default";
 };
 
 &spi1 {
-	compatible = "marvell,armada-370-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-370-spi";
 	pinctrl-0 = <&spi1_pins>;
 	pinctrl-names = "default";
 };
arch/arm/boot/dts/armada-xp.dtsi +2 -2
index 4a5f99e65b51..3a416834d80b 100644
@@ -367,13 +367,13 @@
 };
 
 &spi0 {
-	compatible = "marvell,armada-xp-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-xp-spi";
 	pinctrl-0 = <&spi0_pins>;
 	pinctrl-names = "default";
 };
 
 &spi1 {
-	compatible = "marvell,armada-xp-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-xp-spi";
 	pinctrl-0 = <&spi1_pins>;
 	pinctrl-names = "default";
 };
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/1 ARM: dts: armada-{370, xp}: drop "marvell, orion-spi" from SPI controllers

Hi Uwe,

Quoted 5 lines · Uwe Kleine-K?nig

From: Uwe Kleine-K?nig <[email protected]>

The SPI controllers on Armada 370 and XP differ from the original Orion SPI controllers (at least) in the configuration of the baud rate. So it's wrong to claim compatibility which results in bogus baud rates.

Until two years ago with the commits df59fa7f4bca9658b75f0f5fee225b3a057475c5 and 4dacccfac69494ba70248b134352f299171c41b7
we used "marvell,orion-spi" compatible on Armada XP and Armada 370 without any problem.

The new compatible "marvell,armada-xp-spi" and "marvell,armada-xp-spi" allows to have more choice for the baudrate for a given clock but it is not true that Armada 370 and Armada XP are not compatible with "marvell,orion-spi".

Gregory

Quoted 50 lines
---
 arch/arm/boot/dts/armada-370.dtsi | 4 ++--
 arch/arm/boot/dts/armada-xp.dtsi  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-370.dtsi +2 -2
index b4258105e91f..b9377c11b379 100644
@@ -435,13 +435,13 @@
  * board level if a different configuration is used.
  */
 &spi0 {
-	compatible = "marvell,armada-370-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-370-spi";
 	pinctrl-0 = <&spi0_pins1>;
 	pinctrl-names = "default";
 };
 
 &spi1 {
-	compatible = "marvell,armada-370-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-370-spi";
 	pinctrl-0 = <&spi1_pins>;
 	pinctrl-names = "default";
 };
arch/arm/boot/dts/armada-xp.dtsi +2 -2
index 4a5f99e65b51..3a416834d80b 100644
@@ -367,13 +367,13 @@
 };
 
 &spi0 {
-	compatible = "marvell,armada-xp-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-xp-spi";
 	pinctrl-0 = <&spi0_pins>;
 	pinctrl-names = "default";
 };
 
 &spi1 {
-	compatible = "marvell,armada-xp-spi", "marvell,orion-spi";
+	compatible = "marvell,armada-xp-spi";
 	pinctrl-0 = <&spi1_pins>;
 	pinctrl-names = "default";
 };
Signature · 1 line
2.10.2
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 ARM: dts: armada-{370, xp}: drop "marvell, orion-spi" from SPI controllers

Hello Gregory,

Quoted 14 lines · Gregory CLEMENT
Quoted 5 lines · Uwe Kleine-K?nig

From: Uwe Kleine-K?nig <[email protected]>

The SPI controllers on Armada 370 and XP differ from the original Orion SPI controllers (at least) in the configuration of the baud rate. So it's wrong to claim compatibility which results in bogus baud rates.

Until two years ago with the commits df59fa7f4bca9658b75f0f5fee225b3a057475c5 and 4dacccfac69494ba70248b134352f299171c41b7
we used "marvell,orion-spi" compatible on Armada XP and Armada 370 without any problem.

Quoted 4 lines

The new compatible "marvell,armada-xp-spi" and "marvell,armada-xp-spi" allows to have more choice for the baudrate for a given clock but it is not true that Armada 370 and Armada XP are not compatible with "marvell,orion-spi".

The issue I was faced with that made me create this patch is that in barebox no special case for 370/XP was active. The result was that a device that could be operated at 60 MHz only got a clock of 11 MHz and the driver assumed it configured 41.666 MHz. I didn't check if the same can happen in the opposite direction (or if there are other important incompatibilities) but still I'd say this is a bug with my patch being the obvious fix.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#3 lore raw

Hello,

Quoted 22 lines · Uwe Kleine-König

Hello Gregory,

Quoted 14 lines · Gregory CLEMENT
Quoted 5 lines · Uwe Kleine-König

From: Uwe Kleine-König <[email protected]>

The SPI controllers on Armada 370 and XP differ from the original Orion SPI controllers (at least) in the configuration of the baud rate. So it's wrong to claim compatibility which results in bogus baud rates.

Until two years ago with the commits df59fa7f4bca9658b75f0f5fee225b3a057475c5 and 4dacccfac69494ba70248b134352f299171c41b7
we used "marvell,orion-spi" compatible on Armada XP and Armada 370 without any problem.

Quoted 4 lines

The new compatible "marvell,armada-xp-spi" and "marvell,armada-xp-spi" allows to have more choice for the baudrate for a given clock but it is not true that Armada 370 and Armada XP are not compatible with "marvell,orion-spi".

Quoted 7 lines

The issue I was faced with that made me create this patch is that in barebox no special case for 370/XP was active. The result was that a device that could be operated at 60 MHz only got a clock of 11 MHz and the driver assumed it configured 41.666 MHz. I didn't check if the same can happen in the opposite direction (or if there are other important incompatibilities) but still I'd say this is a bug with my patch being the obvious fix.

I just found this patch in an old branch and wonder what do to with it. It still applies fine at least.

(If the original patch already disappeared from your inbox, it can be found at https://lore.kernel.org/r/[email protected]/ )

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#4 lore raw
Quoted 33 lines · Uwe Kleine-König

Hello,

Quoted 22 lines · Uwe Kleine-König

Hello Gregory,

Quoted 14 lines · Gregory CLEMENT
Quoted 5 lines · Uwe Kleine-König

From: Uwe Kleine-König <[email protected]>

The SPI controllers on Armada 370 and XP differ from the original Orion SPI controllers (at least) in the configuration of the baud rate. So it's wrong to claim compatibility which results in bogus baud rates.

Until two years ago with the commits df59fa7f4bca9658b75f0f5fee225b3a057475c5 and 4dacccfac69494ba70248b134352f299171c41b7
we used "marvell,orion-spi" compatible on Armada XP and Armada 370 without any problem.

Quoted 4 lines

The new compatible "marvell,armada-xp-spi" and "marvell,armada-xp-spi" allows to have more choice for the baudrate for a given clock but it is not true that Armada 370 and Armada XP are not compatible with "marvell,orion-spi".

Quoted 7 lines

The issue I was faced with that made me create this patch is that in barebox no special case for 370/XP was active. The result was that a device that could be operated at 60 MHz only got a clock of 11 MHz and the driver assumed it configured 41.666 MHz. I didn't check if the same can happen in the opposite direction (or if there are other important incompatibilities) but still I'd say this is a bug with my patch being the obvious fix.

Quoted 5 lines

I just found this patch in an old branch and wonder what do to with it. It still applies fine at least.

(If the original patch already disappeared from your inbox, it can be found at https://lore.kernel.org/r/[email protected]/ )

If you remove "marvell,orion-spi" you are going to break running a new DT blob on an old kernel.

The compatible list is supposed to be most specific to most generic in order. So "marvell,orion-spi" is the fall back option for Armada, you don't get all the features, but it should work at a basic level. And in this case, barebox did its best, it gave you a working but unexpectedly slow bus. If you take away "marvell,orion-spi", and there is no support for "marvell,armada-xp-spi" and "marvell,armada-xp-spi" in barebox, does that not then mean there is no SPI support at all?

Andrew