Skip to contentSkip to conversation

ARM: dts: pci-mvebu: Fix assigned-addresses for every PCIe Root Port

PATCH In review Pali Rohár 2 participants 10 messages Aug 17, 2022 – Nov 27, 2022 Device tree bindings

lore
Share & tools
lore
#3 lore raw

PATCH 3/6 ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port

In reply to Pali Rohár

BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.

Fixes 9d8f44f02d4a ("arm: mvebu: add PCIe Device Tree informations for Armada XP")
Fixes 12b69a599745 ("ARM: mvebu: second PCIe unit of Armada XP mv78230 is only x1 capable")
Fixes 2163e61c92d9 ("ARM: mvebu: fix second and third PCIe unit of Armada XP mv78260")
---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  8 ++++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/armada-xp-mv78230.dtsi +4 -4
index 3a709ca5ba05..b8d169c4feec 100644
@@ -107,7 +107,7 @@
 
 			pcie2: pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -135,7 +135,7 @@
 
 			pcie3: pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -163,7 +163,7 @@
 
 			pcie4: pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -191,7 +191,7 @@
 
 			pcie5: pcie@5,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
 				reg = <0x2800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-xp-mv78260.dtsi +8 -8
index 8adbd4df8ee1..febd9d98a44e 100644
@@ -122,7 +122,7 @@
 
 			pcie2: pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -150,7 +150,7 @@
 
 			pcie3: pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -178,7 +178,7 @@
 
 			pcie4: pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -206,7 +206,7 @@
 
 			pcie5: pcie@5,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
 				reg = <0x2800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -234,7 +234,7 @@
 
 			pcie6: pcie@6,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
+				assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
 				reg = <0x3000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -262,7 +262,7 @@
 
 			pcie7: pcie@7,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
+				assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
 				reg = <0x3800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -290,7 +290,7 @@
 
 			pcie8: pcie@8,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
+				assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
 				reg = <0x4000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -318,7 +318,7 @@
 
 			pcie9: pcie@9,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
+				assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
 				reg = <0x4800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
Signature · 1 line
2.20.1
#0 lore raw

cover ARM: dts: pci-mvebu: Fix assigned-addresses for every PCIe Root Port

Per IEEE Std 1275-1994 bindings documentation (to which kernel DT bindings refers), DT property assigned-addresses contains BDF address of resource. Currently more PCIe Root Port nodes have BDF address in assigned-addresses which points to different PCIe Root Port nodes. This obviously does not make sense as the address resource specified in assigned-addresses of every PCIe Root Port describes address range of internal registers which are specific for corresponding Marvell PCIe Root Port. Fix this issue and align all BDF addresses in assigned-addresses DT property to specify correct BDF address of the current PCIe Root Port.

Note that current version of pci-mvebu.c controller driver, which registers Marvell PCIe Root Ports, ignores BDF value in DT property assigned-addresses. It expects that Root Port's assigned-addresses contains address range of that root port. That is why driver currently works without any issue and nobody spotted it. But if driver or something else would do device tree validation then this issue should be spotted and throws error. Also device tree files may be used by other projects where drivers may require correct values.

This patch series aligns BDF address of every Marvell PCIe Root Port in node name, config space in reg property and mem in assigned-address property of internal registers resource.

Pali Rohár (6):
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port

 arch/arm/boot/dts/armada-370.dtsi        |  2 +-
 arch/arm/boot/dts/armada-375.dtsi        |  2 +-
 arch/arm/boot/dts/armada-380.dtsi        |  4 ++--
 arch/arm/boot/dts/armada-385.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-39x.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  8 ++++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++--------
 arch/arm/boot/dts/dove.dtsi              |  2 +-
 8 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/6 ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port

BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.

Fixes 74ecaa403a74 ("ARM: dove: add PCIe controllers to SoC DT")
---
 arch/arm/boot/dts/dove.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/dove.dtsi +1 -1
index 00a36fba2fd2..9aee3cfd3e98 100644
@@ -139,7 +139,7 @@
 			pcie1: pcie@2 {
 				device_type = "pci";
 				status = "disabled";
-				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				clocks = <&gate_clk 5>;
 				marvell,pcie-port = <1>;
Signature · 1 line
2.20.1
#5 lore raw

PATCH 5/6 ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port

In reply to Pali Rohár

BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.

Fixes 0d3d96ab0059 ("ARM: mvebu: add Device Tree description of the Armada 380/385 SoCs")
---
 arch/arm/boot/dts/armada-380.dtsi | 4 ++--
 arch/arm/boot/dts/armada-385.dtsi | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-380.dtsi +2 -2
index dd726a686a00..9334a1e64165 100644
@@ -90,7 +90,7 @@
 			/* x1 port */
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -120,7 +120,7 @@
 			/* x1 port */
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-385.dtsi +3 -3
index f71cc765a7f2..313526fed3ed 100644
@@ -94,7 +94,7 @@
 			/* x1 port */
 			pcie2: pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -123,7 +123,7 @@
 			/* x1 port */
 			pcie3: pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -155,7 +155,7 @@
 			 */
 			pcie4: pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/6 ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port

In reply to Pali Rohár

BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.

Fixes a09a0b7c6ff1 ("arm: mvebu: add PCIe Device Tree informations for Armada 370")
---
 arch/arm/boot/dts/armada-370.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-370.dtsi +1 -1
index e26005bc328a..9daece786a53 100644
@@ -84,7 +84,7 @@
 
 			pcie2: pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
Signature · 1 line
2.20.1
#4 lore raw

PATCH 4/6 ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port

In reply to Pali Rohár

BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.

Fixes 4de59085091f ("ARM: mvebu: add Device Tree description of the Armada 375 SoC")
---
 arch/arm/boot/dts/armada-375.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-375.dtsi +1 -1
index 8df7e46ce961..178a1f1dde4e 100644
@@ -597,7 +597,7 @@
 
 			pcie1: pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
Signature · 1 line
2.20.1
#6 lore raw

PATCH 6/6 ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port

In reply to Pali Rohár

BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.

Fixes 538da83ddbea ("ARM: mvebu: add Device Tree files for Armada 39x SoC and board")
---
 arch/arm/boot/dts/armada-39x.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-39x.dtsi +3 -3
index d2150d87ea7b..036f91bec618 100644
@@ -469,7 +469,7 @@
 			/* x1 port */
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -499,7 +499,7 @@
 			/* x1 port */
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -532,7 +532,7 @@
 			 */
 			pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
Signature · 1 line
2.20.1
#7 lore raw
In reply to Pali Rohár

Gregory, ping?

Quoted 45 lines · On Thursday 18 August 2022 00:30:47 Pali Rohár wrote:

Per IEEE Std 1275-1994 bindings documentation (to which kernel DT bindings refers), DT property assigned-addresses contains BDF address of resource. Currently more PCIe Root Port nodes have BDF address in assigned-addresses which points to different PCIe Root Port nodes. This obviously does not make sense as the address resource specified in assigned-addresses of every PCIe Root Port describes address range of internal registers which are specific for corresponding Marvell PCIe Root Port. Fix this issue and align all BDF addresses in assigned-addresses DT property to specify correct BDF address of the current PCIe Root Port.

Note that current version of pci-mvebu.c controller driver, which registers Marvell PCIe Root Ports, ignores BDF value in DT property assigned-addresses. It expects that Root Port's assigned-addresses contains address range of that root port. That is why driver currently works without any issue and nobody spotted it. But if driver or something else would do device tree validation then this issue should be spotted and throws error. Also device tree files may be used by other projects where drivers may require correct values.

This patch series aligns BDF address of every Marvell PCIe Root Port in node name, config space in reg property and mem in assigned-address property of internal registers resource.

Pali Rohár (6):
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port

 arch/arm/boot/dts/armada-370.dtsi        |  2 +-
 arch/arm/boot/dts/armada-375.dtsi        |  2 +-
 arch/arm/boot/dts/armada-380.dtsi        |  4 ++--
 arch/arm/boot/dts/armada-385.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-39x.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  8 ++++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++--------
 arch/arm/boot/dts/dove.dtsi              |  2 +-
 8 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
2.20.1
#8 lore raw

ping?

Quoted 48 lines · On Sunday 09 October 2022 13:15:29 Pali Rohár wrote:

Gregory, ping?

Quoted 45 lines · On Thursday 18 August 2022 00:30:47 Pali Rohár wrote:

Per IEEE Std 1275-1994 bindings documentation (to which kernel DT bindings refers), DT property assigned-addresses contains BDF address of resource. Currently more PCIe Root Port nodes have BDF address in assigned-addresses which points to different PCIe Root Port nodes. This obviously does not make sense as the address resource specified in assigned-addresses of every PCIe Root Port describes address range of internal registers which are specific for corresponding Marvell PCIe Root Port. Fix this issue and align all BDF addresses in assigned-addresses DT property to specify correct BDF address of the current PCIe Root Port.

Note that current version of pci-mvebu.c controller driver, which registers Marvell PCIe Root Ports, ignores BDF value in DT property assigned-addresses. It expects that Root Port's assigned-addresses contains address range of that root port. That is why driver currently works without any issue and nobody spotted it. But if driver or something else would do device tree validation then this issue should be spotted and throws error. Also device tree files may be used by other projects where drivers may require correct values.

This patch series aligns BDF address of every Marvell PCIe Root Port in node name, config space in reg property and mem in assigned-address property of internal registers resource.

Pali Rohár (6):
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port

 arch/arm/boot/dts/armada-370.dtsi        |  2 +-
 arch/arm/boot/dts/armada-375.dtsi        |  2 +-
 arch/arm/boot/dts/armada-380.dtsi        |  4 ++--
 arch/arm/boot/dts/armada-385.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-39x.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  8 ++++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++--------
 arch/arm/boot/dts/dove.dtsi              |  2 +-
 8 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
2.20.1
#9 lore raw
In reply to Pali Rohár
Quoted 24 lines · Pali Rohár

Per IEEE Std 1275-1994 bindings documentation (to which kernel DT bindings refers), DT property assigned-addresses contains BDF address of resource. Currently more PCIe Root Port nodes have BDF address in assigned-addresses which points to different PCIe Root Port nodes. This obviously does not make sense as the address resource specified in assigned-addresses of every PCIe Root Port describes address range of internal registers which are specific for corresponding Marvell PCIe Root Port. Fix this issue and align all BDF addresses in assigned-addresses DT property to specify correct BDF address of the current PCIe Root Port.

Note that current version of pci-mvebu.c controller driver, which registers Marvell PCIe Root Ports, ignores BDF value in DT property assigned-addresses. It expects that Root Port's assigned-addresses contains address range of that root port. That is why driver currently works without any issue and nobody spotted it. But if driver or something else would do device tree validation then this issue should be spotted and throws error. Also device tree files may be used by other projects where drivers may require correct values.

This patch series aligns BDF address of every Marvell PCIe Root Port in node name, config space in reg property and mem in assigned-address property of internal registers resource.

Quoted 7 lines

Pali Rohár (6):
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port

Series applied on mvebu/dt

Thanks,

Gregory

Quoted 14 lines
 arch/arm/boot/dts/armada-370.dtsi        |  2 +-
 arch/arm/boot/dts/armada-375.dtsi        |  2 +-
 arch/arm/boot/dts/armada-380.dtsi        |  4 ++--
 arch/arm/boot/dts/armada-385.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-39x.dtsi        |  6 +++---
 arch/arm/boot/dts/armada-xp-mv78230.dtsi |  8 ++++----
 arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++--------
 arch/arm/boot/dts/dove.dtsi              |  2 +-
 8 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
2.20.1
Signature · 3 lines
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com