0111-dt-bindings-dma-snps-dw-axi-dmac-constrain-the-items.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From c2f59eeeee68bb66a3db8555474fe94e73b65b02 Mon Sep 17 00:00:00 2001
  2. From: Walker Chen <[email protected]>
  3. Date: Wed, 22 Mar 2023 17:48:17 +0800
  4. Subject: [PATCH 111/122] dt-bindings: dma: snps,dw-axi-dmac: constrain the
  5. items of resets for JH7110 dma
  6. The DMA controller needs two reset items to work properly on JH7110 SoC,
  7. so there is need to constrain the items' value to 2, other platforms
  8. have 1 reset item at most.
  9. Reviewed-by: Rob Herring <[email protected]>
  10. Signed-off-by: Walker Chen <[email protected]>
  11. ---
  12. .../bindings/dma/snps,dw-axi-dmac.yaml | 23 ++++++++++++++++++-
  13. 1 file changed, 22 insertions(+), 1 deletion(-)
  14. --- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
  15. +++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml
  16. @@ -21,6 +21,7 @@ properties:
  17. enum:
  18. - snps,axi-dma-1.01a
  19. - intel,kmb-axi-dma
  20. + - starfive,jh7110-axi-dma
  21. reg:
  22. minItems: 1
  23. @@ -59,7 +60,8 @@ properties:
  24. maximum: 8
  25. resets:
  26. - maxItems: 1
  27. + minItems: 1
  28. + maxItems: 2
  29. snps,dma-masters:
  30. description: |
  31. @@ -110,6 +112,25 @@ required:
  32. - snps,priority
  33. - snps,block-size
  34. +if:
  35. + properties:
  36. + compatible:
  37. + contains:
  38. + enum:
  39. + - starfive,jh7110-axi-dma
  40. +then:
  41. + properties:
  42. + resets:
  43. + minItems: 2
  44. + items:
  45. + - description: AXI reset line
  46. + - description: AHB reset line
  47. + - description: module reset
  48. +else:
  49. + properties:
  50. + resets:
  51. + maxItems: 1
  52. +
  53. additionalProperties: false
  54. examples: