Skip to contentSkip to conversation

Add support for CPM5 controller 1

PATCH Superseded Thippeswamy Havalige 3 participants 5 messages Sep 16, 2024 – Sep 17, 2024

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for CPM5 controller 1

This patch series introduces support for the second Root Port controller in the Xilinx Versal Premium CPM5 block. The Versal Premium platform features two Type-A Root Port controllers operating at Gen5 speed. However, the error interrupt registers and their corresponding bits are located at different offsets for Controller 0 and Controller 1.

To handle these differences, the series includes:

A new compatible string for the second Root Port controller in the device tree bindings.

Driver updates to manage platform-specific interrupt registers and offsets for both controllers using the new compatible string.

Thippeswamy Havalige (2):
dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 host1
PCI: xilinx-cpm: Add support for Versal CPM5 Root Port controller 1

 .../bindings/pci/xilinx-versal-cpm.yaml       |  1 +
 drivers/pci/controller/pcie-xilinx-cpm.c      | 45 ++++++++++++++-----
 2 files changed, 36 insertions(+), 10 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/2 dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 controller 1

The Xilinx Versal Premium series includes the CPM5 block, which supports two Type-A Root Port controllers operating at Gen5 speed.

This patch adds a compatible string to distinguish between the two CPM5 Root Port controllers. The error interrupt registers and corresponding bits for Controller 0 and Controller 1 are located at different offsets, making it necessary to differentiate them.

By using the new compatible string, the driver can properly handle these platform-specific differences between the controllers.

---
changes in v2:
--------------
Modify compatible string to differentiate controller 0 and controller 1

---
 Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml +1 -0
index 989fb0fa2577..3783075661e2 100644
@@ -17,6 +17,7 @@ properties:
     enum:
       - xlnx,versal-cpm-host-1.00
       - xlnx,versal-cpm5-host
+      - xlnx,versal-cpm5-host1-1
 
   reg:
     items:
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 controller 1

Quoted 25 lines · Thippeswamy Havalige

The Xilinx Versal Premium series includes the CPM5 block, which supports two Type-A Root Port controllers operating at Gen5 speed.

This patch adds a compatible string to distinguish between the two CPM5 Root Port controllers. The error interrupt registers and corresponding bits for Controller 0 and Controller 1 are located at different offsets, making it necessary to differentiate them.

By using the new compatible string, the driver can properly handle these platform-specific differences between the controllers.

---
changes in v2:
--------------
Modify compatible string to differentiate controller 0 and controller 1

---
 Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml +0 -0
index 989fb0fa2577..3783075661e2 100644

Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml properties: · line 20

Quoted 4 lines
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml +1 -0
@@ -17,6 +17,7 @@ properties:
     enum:
       - xlnx,versal-cpm-host-1.00
       - xlnx,versal-cpm5-host
+      - xlnx,versal-cpm5-host1-1

Hm, I thought my irony was obvious, but it seems was not. Apologies. "1-1", "1-2", "1-1-1" or "1-1.00-1" are all poor choices.

I was waiting for some reasonable name idea, because it is you who knows the hardware and has datasheet.

I guess if I have to come up with name then "host1" was better. Or "cpm5-1-host". Dunno, all these names "5" in "cpm5" and "-1.00" in IP version are randomly constructed.

Best regards,
Krzysztof

#3 lore raw

RE: [PATCH v2 1/2] dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 controller 1

Hi Krzysztof,

Quoted 50 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, September 17, 2024 4:20 PM
To: Havalige, Thippeswamy <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Gogada, Bharat Kumar <[email protected]>; Simek, Michal <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH v2 1/2] dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 controller 1

Quoted 28 lines · Thippeswamy Havalige

The Xilinx Versal Premium series includes the CPM5 block, which supports two Type-A Root Port controllers operating at Gen5 speed.

This patch adds a compatible string to distinguish between the two CPM5 Root Port controllers. The error interrupt registers and corresponding bits for Controller 0 and Controller 1 are located at different offsets, making it necessary to differentiate them.

By using the new compatible string, the driver can properly handle these platform-specific differences between the controllers.

---
changes in v2:
--------------
Modify compatible string to differentiate controller 0 and controller 1

---
 Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml b/Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml index 989fb0fa2577..3783075661e2 100644

Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml properties: · line 20

Quoted 4 lines
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml +1 -0
@@ -17,6 +17,7 @@ properties:
     enum:
       - xlnx,versal-cpm-host-1.00
       - xlnx,versal-cpm5-host
+      - xlnx,versal-cpm5-host1-1

Hm, I thought my irony was obvious, but it seems was not. Apologies. "1-1", "1-2", "1-1-1" or "1-1.00-1" are all poor choices.

Quoted 6 lines

I was waiting for some reasonable name idea, because it is you who knows the hardware and has datasheet.

I guess if I have to come up with name then "host1" was better. Or "cpm5-1-host". Dunno, all these names "5" in "cpm5" and "-1.00" in IP version are randomly constructed.

Here, CPM5 indicates gen5 Root Port and host1 indicates controller 1.
So, Let me resend patch with compatible string as "xlnx,versal-cpm5-host1" it looks fine.

Quoted 3 lines

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v2 1/2] dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 controller 1

Quoted 55 lines · Thippeswamy

Hi Krzysztof,

Quoted 53 lines

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, September 17, 2024 4:20 PM
To: Havalige, Thippeswamy <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Gogada, Bharat Kumar <[email protected]>; Simek, Michal <[email protected]>; [email protected]; [email protected]
Subject: Re: [PATCH v2 1/2] dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5 controller 1

Quoted 28 lines · Thippeswamy Havalige

The Xilinx Versal Premium series includes the CPM5 block, which supports two Type-A Root Port controllers operating at Gen5 speed.

This patch adds a compatible string to distinguish between the two CPM5 Root Port controllers. The error interrupt registers and corresponding bits for Controller 0 and Controller 1 are located at different offsets, making it necessary to differentiate them.

By using the new compatible string, the driver can properly handle these platform-specific differences between the controllers.

---
changes in v2:
--------------
Modify compatible string to differentiate controller 0 and controller 1

---
 Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml b/Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml index 989fb0fa2577..3783075661e2 100644

Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml properties: · line 20

Quoted 4 lines
Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml +1 -0
@@ -17,6 +17,7 @@ properties:
     enum:
       - xlnx,versal-cpm-host-1.00
       - xlnx,versal-cpm5-host
+      - xlnx,versal-cpm5-host1-1

Hm, I thought my irony was obvious, but it seems was not. Apologies. "1-1", "1-2", "1-1-1" or "1-1.00-1" are all poor choices.

I was waiting for some reasonable name idea, because it is you who knows the hardware and has datasheet.

Quoted 6 lines
Quoted 3 lines

I guess if I have to come up with name then "host1" was better. Or "cpm5-1-host". Dunno, all these names "5" in "cpm5" and "-1.00" in IP version are randomly constructed.

Here, CPM5 indicates gen5 Root Port and host1 indicates controller 1.
So, Let me resend patch with compatible string as "xlnx,versal-cpm5-host1" it looks fine.

yes, thanks.

Best regards,
Krzysztof