starfive: add new target for StarFive JH7100/7110 SoC
[openwrt/staging/981213.git] / target / linux / starfive / patches-6.1 / 0092-dt-bindings-qspi-cdns-qspi-nor-constrain-minItems-ma.patch
1 From 464fa29e8f3fb2c209647efbb365470b35daec38 Mon Sep 17 00:00:00 2001
2 From: William Qiu <william.qiu@starfivetech.com>
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
7 The QSPI controller needs three reset items to work properly on JH7110 SoC,
8 so there is need to change the maxItems's value to 3 and add minItems
9 whose value is equal to 2. Other platforms do not have this constraint.
10
11 Signed-off-by: William Qiu <william.qiu@starfivetech.com>
12 ---
13 .../bindings/spi/cdns,qspi-nor.yaml | 37 +++++++++++++++++--
14 1 file changed, 33 insertions(+), 4 deletions(-)
15
16 --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
17 +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
18 @@ -19,6 +19,33 @@ allOf:
19 then:
20 required:
21 - power-domains
22 + - if:
23 + properties:
24 + compatible:
25 + contains:
26 + const: starfive,jh7110-qspi
27 + then:
28 + properties:
29 + resets:
30 + minItems: 2
31 + maxItems: 3
32 +
33 + reset-names:
34 + minItems: 2
35 + maxItems: 3
36 + items:
37 + enum: [ qspi, qspi-ocp, rstc_ref ]
38 +
39 + else:
40 + properties:
41 + resets:
42 + maxItems: 2
43 +
44 + reset-names:
45 + minItems: 1
46 + maxItems: 2
47 + items:
48 + enum: [ qspi, qspi-ocp ]
49
50 properties:
51 compatible:
52 @@ -30,6 +57,7 @@ properties:
53 - intel,lgm-qspi
54 - xlnx,versal-ospi-1.0
55 - intel,socfpga-qspi
56 + - starfive,jh7110-qspi
57 - const: cdns,qspi-nor
58 - const: cdns,qspi-nor
59
60 @@ -79,13 +107,14 @@ properties:
61 maxItems: 1
62
63 resets:
64 - maxItems: 2
65 + minItems: 2
66 + maxItems: 3
67
68 reset-names:
69 - minItems: 1
70 - maxItems: 2
71 + minItems: 2
72 + maxItems: 3
73 items:
74 - enum: [ qspi, qspi-ocp ]
75 + enum: [ qspi, qspi-ocp, rstc_ref ]
76
77 required:
78 - compatible