ARM: dts: pci-mvebu: Fix assigned-addresses for every PCIe Root Port
PATCH 3/6 ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
In reply to Pali RohárBDF 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.
--- 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
@@ -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
@@ -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
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
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.
--- arch/arm/boot/dts/dove.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/dove.dtsi +1 -1
@@ -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
PATCH 5/6 ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
In reply to Pali RohárBDF 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.
--- 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
@@ -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
@@ -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
PATCH 2/6 ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
In reply to Pali RohárBDF 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.
--- arch/arm/boot/dts/armada-370.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-370.dtsi +1 -1
@@ -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
PATCH 4/6 ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
In reply to Pali RohárBDF 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.
--- arch/arm/boot/dts/armada-375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-375.dtsi +1 -1
@@ -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
PATCH 6/6 ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
In reply to Pali RohárBDF 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.
--- arch/arm/boot/dts/armada-39x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-39x.dtsi +3 -3
@@ -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
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.ccontroller 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 Portarch/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
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.ccontroller 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 Portarch/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
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.ccontroller 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