diff mbox series

[v5,09/16] dt-bindings: imx6q-pcie: Clean up irrationality clocks check

Message ID 20231220213615.1561528-10-Frank.Li@nxp.com
State Superseded
Headers show
Series [v5,01/16] PCI: imx6: Simplify clock handling by using bulk_clk_*() function | expand

Commit Message

Frank Li Dec. 20, 2023, 9:36 p.m. UTC
There are clocks and clock-names restriction for difference compatible
string. So needn't irrationality check again for clock's miniItems and
maxItems.

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

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

 .../bindings/pci/fsl,imx6q-pcie-common.yaml      | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

Krzysztof Kozlowski Dec. 23, 2023, 6:42 p.m. UTC | #1
On 20/12/2023 22:36, Frank Li wrote:
> There are clocks and clock-names restriction for difference compatible
> string. So needn't irrationality check again for clock's miniItems and
> maxItems.

That's not really true. Other entry does not restrict clocks and leave
items quite flexible. These entries should be combined so all
constraints are fixed for all variants.

Best regards,
Krzysztof
Frank Li Dec. 24, 2023, 4:43 a.m. UTC | #2
On Sat, Dec 23, 2023 at 07:42:12PM +0100, Krzysztof Kozlowski wrote:
> On 20/12/2023 22:36, Frank Li wrote:
> > There are clocks and clock-names restriction for difference compatible
> > string. So needn't irrationality check again for clock's miniItems and
> > maxItems.
> 
> That's not really true. Other entry does not restrict clocks and leave
> items quite flexible. These entries should be combined so all
> constraints are fixed for all variants.

There are 7 compatible string at pci/fsl,imx6q-pcie.yaml 

- fsl,imx6q-pcie                                                     
      - fsl,imx6sx-pcie                                                    
      - fsl,imx6qp-pcie                                                    
      - fsl,imx7d-pcie                                                     
      - fsl,imx8mq-pcie                                                    
      - fsl,imx8mm-pcie                                                    
      - fsl,imx8mp-pcie                                                    
      - fsl,imx95-pcie                                                     
                      
All 7 compatible string have check

 - if:                                                                    
      properties:                                                          
        compatible:                                                        
          enum:                                                            
            - fsl,imx6sx-pcie
...
- if:                                                                    
      properties:                                                          
        compatible:                                                        
          enum:                                                            
            - fsl,imx8mq-pcie

...
- if:                                                                    
      properties:                                                          
        compatible:                                                        
          enum:                                                            
            - fsl,imx6q-pcie                                               
            - fsl,imx6qp-pcie                                              
            - fsl,imx7d-pcie
...
  - if:                                                                    
      properties:                                                          
        compatible:                                                        
          enum:                                                            
            - fsl,imx8mm-pcie                                              
            - fsl,imx8mp-pcie
...

This check was not necessary at all. 

> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Dec. 24, 2023, 9:04 a.m. UTC | #3
On 24/12/2023 05:43, Frank Li wrote:
> On Sat, Dec 23, 2023 at 07:42:12PM +0100, Krzysztof Kozlowski wrote:
>> On 20/12/2023 22:36, Frank Li wrote:
>>> There are clocks and clock-names restriction for difference compatible
>>> string. So needn't irrationality check again for clock's miniItems and
>>> maxItems.
>>
>> That's not really true. Other entry does not restrict clocks and leave
>> items quite flexible. These entries should be combined so all
>> constraints are fixed for all variants.
> 
> There are 7 compatible string at pci/fsl,imx6q-pcie.yaml 

Then explain it in the commit msg. The file you are touching has
something entirely else.

And what about -ep binding? Commit msg explains nothing here as well.


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 8f39b4e6e8491..a284a27c5e873 100644
--- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml
@@ -150,22 +150,6 @@  allOf:
             - {}
             - const: pcie_phy
             - const: pcie_aux
-  - if:
-      properties:
-        compatible:
-          not:
-            contains:
-              enum:
-                - fsl,imx6sx-pcie
-                - fsl,imx8mq-pcie
-                - fsl,imx6sx-pcie-ep
-                - fsl,imx8mq-pcie-ep
-    then:
-      properties:
-        clocks:
-          maxItems: 3
-        clock-names:
-          maxItems: 3
 
   - if:
       properties: