diff mbox series

[v4,2/7] dt-bindings: PCI: dw: rockchip: Add rk3576 support

Message ID 20250107074911.550057-3-kever.yang@rock-chips.com (mailing list archive)
State New
Delegated to: Krzysztof WilczyƄski
Headers show
Series Rockchip: add Rockchip rk3576 EVB1 board | expand

Commit Message

Kever Yang Jan. 7, 2025, 7:49 a.m. UTC
rk3576 is using dwc controller, with msi interrupt directly to gic instead
of to gic its, so
- no its support is required and the 'msi-map' is not need anymore,
- a new 'msi' interrupt is needed.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

Changes in v4:
- Fix wrong indentation in dt_binding_check report by Rob

Changes in v3:
- Fix dtb check broken on rk3588
- Update commit message

Changes in v2:
- remove required 'msi-map'
- add interrupt name 'msi'

 .../devicetree/bindings/pci/rockchip-dw-pcie-common.yaml      | 4 +++-
 Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml   | 4 +---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Krzysztof Kozlowski Jan. 8, 2025, 8:16 a.m. UTC | #1
On Tue, Jan 07, 2025 at 03:49:06PM +0800, Kever Yang wrote:
> rk3576 is using dwc controller, with msi interrupt directly to gic instead
> of to gic its, so
> - no its support is required and the 'msi-map' is not need anymore,
> - a new 'msi' interrupt is needed.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
> Changes in v4:
> - Fix wrong indentation in dt_binding_check report by Rob
> 
> Changes in v3:
> - Fix dtb check broken on rk3588
> - Update commit message
> 
> Changes in v2:
> - remove required 'msi-map'
> - add interrupt name 'msi'
> 
>  .../devicetree/bindings/pci/rockchip-dw-pcie-common.yaml      | 4 +++-
>  Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml   | 4 +---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
> index cc9adfc7611c..e4fcc2dff413 100644
> --- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
> +++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
> @@ -81,7 +81,9 @@ properties:
>        - const: msg
>        - const: legacy
>        - const: err
> -      - const: dma0
> +      - enum:
> +          - msi
> +          - dma0

Commit msg said new interrupt, but this basically replaces existing DMA0
interrupt. Maybe that's the problem with this common binding and you
just miss constraining in each device binding. If so: fix also them.

Also: your interrupts property does not match this anymore.

Best regards,
Krzysztof
Kever Yang Jan. 10, 2025, 7:33 a.m. UTC | #2
Hi Krzysztof,

On 2025/1/8 16:16, Krzysztof Kozlowski wrote:
> On Tue, Jan 07, 2025 at 03:49:06PM +0800, Kever Yang wrote:
>> rk3576 is using dwc controller, with msi interrupt directly to gic instead
>> of to gic its, so
>> - no its support is required and the 'msi-map' is not need anymore,
>> - a new 'msi' interrupt is needed.
>>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> ---
>>
>> Changes in v4:
>> - Fix wrong indentation in dt_binding_check report by Rob
>>
>> Changes in v3:
>> - Fix dtb check broken on rk3588
>> - Update commit message
>>
>> Changes in v2:
>> - remove required 'msi-map'
>> - add interrupt name 'msi'
>>
>>   .../devicetree/bindings/pci/rockchip-dw-pcie-common.yaml      | 4 +++-
>>   Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml   | 4 +---
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
>> index cc9adfc7611c..e4fcc2dff413 100644
>> --- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
>> +++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
>> @@ -81,7 +81,9 @@ properties:
>>         - const: msg
>>         - const: legacy
>>         - const: err
>> -      - const: dma0
>> +      - enum:
>> +          - msi
>> +          - dma0
> Commit msg said new interrupt, but this basically replaces existing DMA0
> interrupt. Maybe that's the problem with this common binding and you
> just miss constraining in each device binding. If so: fix also them.
rk3588 has 9 interrupt, and the 6th-9th is dma0-3;
rk3568 only has 5 interrupts, no dma0-3;
rk3576 add one more "msi" interrupt which is the 6th interrupt;
The upcomming rk3562 is the same as rk3576.
I'm sorry I'm not so good at this yaml grammar, how should I take care 
of this case?


Thanks,
- Kever
>
> Also: your interrupts property does not match this anymore.
>
> Best regards,
> Krzysztof
>
>
Krzysztof Kozlowski Jan. 10, 2025, 12:34 p.m. UTC | #3
On 10/01/2025 08:33, Kever Yang wrote:
>>>
>>>   .../devicetree/bindings/pci/rockchip-dw-pcie-common.yaml      | 4 +++-
>>>   Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml   | 4 +---
>>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
>>> index cc9adfc7611c..e4fcc2dff413 100644
>>> --- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
>>> +++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
>>> @@ -81,7 +81,9 @@ properties:
>>>         - const: msg
>>>         - const: legacy
>>>         - const: err
>>> -      - const: dma0
>>> +      - enum:
>>> +          - msi
>>> +          - dma0
>> Commit msg said new interrupt, but this basically replaces existing DMA0
>> interrupt. Maybe that's the problem with this common binding and you
>> just miss constraining in each device binding. If so: fix also them.
> rk3588 has 9 interrupt, and the 6th-9th is dma0-3;
> rk3568 only has 5 interrupts, no dma0-3;
> rk3576 add one more "msi" interrupt which is the 6th interrupt;
> The upcomming rk3562 is the same as rk3576.
> I'm sorry I'm not so good at this yaml grammar, how should I take care 
> of this case?

Explain this in commit msg and add proper constraints per device, e.g.:
https://elixir.bootlin.com/linux/v6.11-rc6/source/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml#L127

This change for interrupts in top-level could stay.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
index cc9adfc7611c..e4fcc2dff413 100644
--- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
+++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie-common.yaml
@@ -81,7 +81,9 @@  properties:
       - const: msg
       - const: legacy
       - const: err
-      - const: dma0
+      - enum:
+          - msi
+          - dma0
       - const: dma1
       - const: dma2
       - const: dma3
diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
index 550d8a684af3..9a464731fa4a 100644
--- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
@@ -26,6 +26,7 @@  properties:
       - const: rockchip,rk3568-pcie
       - items:
           - enum:
+              - rockchip,rk3576-pcie
               - rockchip,rk3588-pcie
           - const: rockchip,rk3568-pcie
 
@@ -71,9 +72,6 @@  properties:
 
   vpcie3v3-supply: true
 
-required:
-  - msi-map
-
 unevaluatedProperties: false
 
 examples: