0092-dt-bindings-qspi-cdns-qspi-nor-constrain-minItems-ma.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. From 464fa29e8f3fb2c209647efbb365470b35daec38 Mon Sep 17 00:00:00 2001
  2. From: William Qiu <[email protected]>
  3. Date: Thu, 2 Mar 2023 18:52:20 +0800
  4. Subject: [PATCH 092/122] dt-bindings: qspi: cdns,qspi-nor: constrain
  5. minItems/maxItems of resets
  6. The QSPI controller needs three reset items to work properly on JH7110 SoC,
  7. so there is need to change the maxItems's value to 3 and add minItems
  8. whose value is equal to 2. Other platforms do not have this constraint.
  9. Signed-off-by: William Qiu <[email protected]>
  10. ---
  11. .../bindings/spi/cdns,qspi-nor.yaml | 37 +++++++++++++++++--
  12. 1 file changed, 33 insertions(+), 4 deletions(-)
  13. --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
  14. +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
  15. @@ -19,6 +19,33 @@ allOf:
  16. then:
  17. required:
  18. - power-domains
  19. + - if:
  20. + properties:
  21. + compatible:
  22. + contains:
  23. + const: starfive,jh7110-qspi
  24. + then:
  25. + properties:
  26. + resets:
  27. + minItems: 2
  28. + maxItems: 3
  29. +
  30. + reset-names:
  31. + minItems: 2
  32. + maxItems: 3
  33. + items:
  34. + enum: [ qspi, qspi-ocp, rstc_ref ]
  35. +
  36. + else:
  37. + properties:
  38. + resets:
  39. + maxItems: 2
  40. +
  41. + reset-names:
  42. + minItems: 1
  43. + maxItems: 2
  44. + items:
  45. + enum: [ qspi, qspi-ocp ]
  46. properties:
  47. compatible:
  48. @@ -30,6 +57,7 @@ properties:
  49. - intel,lgm-qspi
  50. - xlnx,versal-ospi-1.0
  51. - intel,socfpga-qspi
  52. + - starfive,jh7110-qspi
  53. - const: cdns,qspi-nor
  54. - const: cdns,qspi-nor
  55. @@ -79,13 +107,14 @@ properties:
  56. maxItems: 1
  57. resets:
  58. - maxItems: 2
  59. + minItems: 2
  60. + maxItems: 3
  61. reset-names:
  62. - minItems: 1
  63. - maxItems: 2
  64. + minItems: 2
  65. + maxItems: 3
  66. items:
  67. - enum: [ qspi, qspi-ocp ]
  68. + enum: [ qspi, qspi-ocp, rstc_ref ]
  69. required:
  70. - compatible