d1: add new target
[openwrt/staging/mans0n.git] / target / linux / d1 / patches-6.1 / 0067-ASoC-dt-bindings-sun4i-spdif-Add-compatible-for-D1.patch
1 From 4e72722bfb7dec028e11278a924bb8bef3e10897 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sat, 13 Nov 2021 10:48:24 -0600
4 Subject: [PATCH 067/117] ASoC: dt-bindings: sun4i-spdif: Add compatible for D1
5
6 D1 mostly keeps the existing register layout, but it separates the
7 module clock into separate clocks for the RX block and the TX block.
8
9 Signed-off-by: Samuel Holland <samuel@sholland.org>
10 ---
11 .../sound/allwinner,sun4i-a10-spdif.yaml | 54 +++++++++++++++----
12 1 file changed, 44 insertions(+), 10 deletions(-)
13
14 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
15 +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
16 @@ -18,10 +18,12 @@ properties:
17
18 compatible:
19 oneOf:
20 - - const: allwinner,sun4i-a10-spdif
21 - - const: allwinner,sun6i-a31-spdif
22 - - const: allwinner,sun8i-h3-spdif
23 - - const: allwinner,sun50i-h6-spdif
24 + - enum:
25 + - allwinner,sun4i-a10-spdif
26 + - allwinner,sun6i-a31-spdif
27 + - allwinner,sun8i-h3-spdif
28 + - allwinner,sun20i-d1-spdif
29 + - allwinner,sun50i-h6-spdif
30 - items:
31 - const: allwinner,sun8i-a83t-spdif
32 - const: allwinner,sun8i-h3-spdif
33 @@ -36,14 +38,12 @@ properties:
34 maxItems: 1
35
36 clocks:
37 - items:
38 - - description: Bus Clock
39 - - description: Module Clock
40 + minItems: 2
41 + maxItems: 3
42
43 clock-names:
44 - items:
45 - - const: apb
46 - - const: spdif
47 + minItems: 2
48 + maxItems: 3
49
50 # Even though it only applies to subschemas under the conditionals,
51 # not listing them here will trigger a warning because of the
52 @@ -59,8 +59,42 @@ allOf:
53 compatible:
54 contains:
55 enum:
56 + - allwinner,sun20i-d1-spdif
57 +
58 + then:
59 + properties:
60 + clocks:
61 + items:
62 + - description: Bus Clock
63 + - description: RX Module Clock
64 + - description: TX Module Clock
65 +
66 + clock-names:
67 + items:
68 + - const: apb
69 + - const: rx
70 + - const: tx
71 +
72 + else:
73 + properties:
74 + clocks:
75 + items:
76 + - description: Bus Clock
77 + - description: Module Clock
78 +
79 + clock-names:
80 + items:
81 + - const: apb
82 + - const: spdif
83 +
84 + - if:
85 + properties:
86 + compatible:
87 + contains:
88 + enum:
89 - allwinner,sun6i-a31-spdif
90 - allwinner,sun8i-h3-spdif
91 + - allwinner,sun20i-d1-spdif
92 - allwinner,sun50i-h6-spdif
93
94 then: