diff mbox series

[v5,04/16] dt-bindings: imx6q-pcie: Add linux,pci-domain as required for iMX8MQ

Message ID 20231220213615.1561528-5-Frank.Li@nxp.com (mailing list archive)
State Superseded
Headers show
Series PCI: imx6: Clean up and add imx95 pci support | expand

Commit Message

Frank Li Dec. 20, 2023, 9:36 p.m. UTC
iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required
proptery for iMX8MQ to indicate pci controller index.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---

Notes:
    Change from v4 to v5
    - new patch at v5

 .../bindings/pci/fsl,imx6q-pcie-common.yaml           | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Krzysztof Kozlowski Dec. 23, 2023, 6:40 p.m. UTC | #1
On 20/12/2023 22:36, Frank Li wrote:
> iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required
> proptery for iMX8MQ to indicate pci controller index.


Why it has to be required? Everything will work fine if skipped.
Otherwise please provide reason why it must be *required*.

Best regards,
Krzysztof
Frank Li Dec. 24, 2023, 4:29 a.m. UTC | #2
On Sat, Dec 23, 2023 at 07:40:28PM +0100, Krzysztof Kozlowski wrote:
> On 20/12/2023 22:36, Frank Li wrote:
> > iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required
> > proptery for iMX8MQ to indicate pci controller index.
> 
> 
> Why it has to be required? Everything will work fine if skipped.
> Otherwise please provide reason why it must be *required*.

Next patch will use "linux,pci-domain" as PCI slot ID, instead compared
with hard code register address.

The below code will be removed.

-		if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
-			imx6_pcie->controller_id = 1;


when there are more than 2 controller, this compare logic will become
complex. 

So after next patch, "linux,pci-domain" will be required.

Frank

> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Dec. 24, 2023, 9:02 a.m. UTC | #3
On 24/12/2023 05:29, Frank Li wrote:
> On Sat, Dec 23, 2023 at 07:40:28PM +0100, Krzysztof Kozlowski wrote:
>> On 20/12/2023 22:36, Frank Li wrote:
>>> iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required
>>> proptery for iMX8MQ to indicate pci controller index.
>>
>>
>> Why it has to be required? Everything will work fine if skipped.
>> Otherwise please provide reason why it must be *required*.
> 
> Next patch will use "linux,pci-domain" as PCI slot ID, instead compared
> with hard code register address.
> 
> The below code will be removed.
> 
> -		if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
> -			imx6_pcie->controller_id = 1;
> 
> 
> when there are more than 2 controller, this compare logic will become
> complex. 
> 
> So after next patch, "linux,pci-domain" will be required.

Nothing in commit msg explains this. Why you cannot use some
auto-incremented values when this is missing?

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
index d91b639ae7ae7..8f39b4e6e8491 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
@@ -265,6 +265,17 @@  allOf:
             - const: apps
             - const: turnoff
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx8mq-pcie
+              - fsl,imx8mq-pcie-ep
+    then:
+      required:
+        - linux,pci-domain
+
 additionalProperties: true
 
 ...