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(-)
--
2.20.1
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")
Signed-off-by: Pali Rohár <[email protected]>
---
arch/arm/boot/dts/armada-375.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 8df7e46ce961..178a1f1dde4e 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -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>;
--
2.20.1
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")
Signed-off-by: Pali Rohár <[email protected]>
---
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(-)
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index 3a709ca5ba05..b8d169c4feec 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -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>;
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index 8adbd4df8ee1..febd9d98a44e 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -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>;
--
2.20.1
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")
Signed-off-by: Pali Rohár <[email protected]>
---
arch/arm/boot/dts/armada-370.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index e26005bc328a..9daece786a53 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -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>;
--
2.20.1
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")
Signed-off-by: Pali Rohár <[email protected]>
---
arch/arm/boot/dts/armada-39x.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
index d2150d87ea7b..036f91bec618 100644
--- a/arch/arm/boot/dts/armada-39x.dtsi
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -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>;
--
2.20.1
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")
Signed-off-by: Pali Rohár <[email protected]>
---
arch/arm/boot/dts/dove.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 00a36fba2fd2..9aee3cfd3e98 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -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>;
--
2.20.1
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")
Signed-off-by: Pali Rohár <[email protected]>
---
arch/arm/boot/dts/armada-380.dtsi | 4 ++--
arch/arm/boot/dts/armada-385.dtsi | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/armada-380.dtsi b/arch/arm/boot/dts/armada-380.dtsi
index dd726a686a00..9334a1e64165 100644
--- a/arch/arm/boot/dts/armada-380.dtsi
+++ b/arch/arm/boot/dts/armada-380.dtsi
@@ -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>;
diff --git a/arch/arm/boot/dts/armada-385.dtsi b/arch/arm/boot/dts/armada-385.dtsi
index f71cc765a7f2..313526fed3ed 100644
--- a/arch/arm/boot/dts/armada-385.dtsi
+++ b/arch/arm/boot/dts/armada-385.dtsi
@@ -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>;
--
2.20.1
Gregory, ping?
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(-)
>
> --
> 2.20.1
>
ping?
On Sunday 09 October 2022 13:15:29 Pali Rohár wrote:
> Gregory, ping?
>
> 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(-)
> >
> > --
> > 2.20.1
> >
Pali Rohár <[email protected]> writes:
> 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
Series applied on mvebu/dt
Thanks,
Gregory
>
> 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(-)
>
> --
> 2.20.1
>
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com